libevt-20170120/0000775000175000017500000000000013040343017015330 5ustar00lordyestalordyesta00000000000000libevt-20170120/pyevt/0000775000175000017500000000000013040343017016477 5ustar00lordyestalordyesta00000000000000libevt-20170120/pyevt/pyevt_file.c0000664000175000017500000011241613040340654021022 0ustar00lordyestalordyesta00000000000000/* * Python object wrapper of libevt_file_t * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyevt_codepage.h" #include "pyevt_error.h" #include "pyevt_file.h" #include "pyevt_file_object_io_handle.h" #include "pyevt_libbfio.h" #include "pyevt_libcerror.h" #include "pyevt_libclocale.h" #include "pyevt_libevt.h" #include "pyevt_python.h" #include "pyevt_record.h" #include "pyevt_records.h" #include "pyevt_unused.h" #if !defined( LIBEVT_HAVE_BFIO ) LIBEVT_EXTERN \ int libevt_file_open_file_io_handle( libevt_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libevt_error_t **error ); #endif /* !defined( LIBEVT_HAVE_BFIO ) */ PyMethodDef pyevt_file_object_methods[] = { { "signal_abort", (PyCFunction) pyevt_file_signal_abort, METH_NOARGS, "signal_abort() -> None\n" "\n" "Signals the file to abort the current activity." }, { "open", (PyCFunction) pyevt_file_open, METH_VARARGS | METH_KEYWORDS, "open(filename, mode='r') -> None\n" "\n" "Opens a file." }, { "open_file_object", (PyCFunction) pyevt_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) pyevt_file_close, METH_NOARGS, "close() -> None\n" "\n" "Closes a file." }, { "is_corrupted", (PyCFunction) pyevt_file_is_corrupted, METH_NOARGS, "is_corrupted() -> Boolean\n" "\n" "Determines if the file is corrupted." }, { "get_ascii_codepage", (PyCFunction) pyevt_file_get_ascii_codepage, METH_NOARGS, "get_ascii_codepage() -> String\n" "\n" "Retrieves the codepage for ASCII strings used in the file." }, { "set_ascii_codepage", (PyCFunction) pyevt_file_set_ascii_codepage, METH_VARARGS | METH_KEYWORDS, "set_ascii_codepage(codepage) -> None\n" "\n" "Sets the codepage for ASCII strings used in the file.\n" "Expects the codepage to be a string containing a Python codec definition." }, { "get_format_version", (PyCFunction) pyevt_file_get_format_version, METH_NOARGS, "get_format_version() -> Unicode string or None\n" "\n" "Retrieves the format version." }, { "get_number_of_records", (PyCFunction) pyevt_file_get_number_of_records, METH_NOARGS, "get_number_of_records() -> Integer or None\n" "\n" "Retrieves the number of records." }, { "get_record", (PyCFunction) pyevt_file_get_record, METH_VARARGS | METH_KEYWORDS, "get_record(record_index) -> Object or None\n" "\n" "Retrieves the record specified by the index." }, { "get_number_of_recovered_records", (PyCFunction) pyevt_file_get_number_of_recovered_records, METH_NOARGS, "get_number_of_recovered_records() -> Integer or None\n" "\n" "Retrieves the number of recovered records." }, { "get_recovered_record", (PyCFunction) pyevt_file_get_recovered_record, METH_VARARGS | METH_KEYWORDS, "get_recovered_record(record_index) -> Object or None\n" "\n" "Retrieves the recovered record specified by the index." }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyGetSetDef pyevt_file_object_get_set_definitions[] = { { "ascii_codepage", (getter) pyevt_file_get_ascii_codepage, (setter) pyevt_file_set_ascii_codepage_setter, "The codepage used for ASCII strings in the file.", NULL }, { "format_version", (getter) pyevt_file_get_format_version, (setter) 0, "The format version.", NULL }, { "number_of_records", (getter) pyevt_file_get_number_of_records, (setter) 0, "The number of records.", NULL }, { "records", (getter) pyevt_file_get_records, (setter) 0, "The records.", NULL }, { "number_of_recovered_records", (getter) pyevt_file_get_number_of_recovered_records, (setter) 0, "The number of recovered records.", NULL }, { "recovered_records", (getter) pyevt_file_get_recovered_records, (setter) 0, "The recovered records.", NULL }, /* Sentinel */ { NULL, NULL, NULL, NULL, NULL } }; PyTypeObject pyevt_file_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyevt.file", /* tp_basicsize */ sizeof( pyevt_file_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyevt_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 */ "pyevt file object (wraps libevt_file_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pyevt_file_object_methods, /* tp_members */ 0, /* tp_getset */ pyevt_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) pyevt_file_init, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ NULL, /* tp_mro */ NULL, /* tp_cache */ NULL, /* tp_subclasses */ NULL, /* tp_weaklist */ NULL, /* tp_del */ 0 }; /* Creates a new file object * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_new( void ) { pyevt_file_t *pyevt_file = NULL; static char *function = "pyevt_file_new"; pyevt_file = PyObject_New( struct pyevt_file, &pyevt_file_type_object ); if( pyevt_file == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize file.", function ); goto on_error; } if( pyevt_file_init( pyevt_file ) != 0 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize file.", function ); goto on_error; } return( (PyObject *) pyevt_file ); on_error: if( pyevt_file != NULL ) { Py_DecRef( (PyObject *) pyevt_file ); } return( NULL ); } /* Creates a new file object and opens it * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_new_open( PyObject *self PYEVT_ATTRIBUTE_UNUSED, PyObject *arguments, PyObject *keywords ) { PyObject *pyevt_file = NULL; PYEVT_UNREFERENCED_PARAMETER( self ) pyevt_file = pyevt_file_new(); pyevt_file_open( (pyevt_file_t *) pyevt_file, arguments, keywords ); return( pyevt_file ); } /* Creates a new file object and opens it using a file-like object * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_new_open_file_object( PyObject *self PYEVT_ATTRIBUTE_UNUSED, PyObject *arguments, PyObject *keywords ) { PyObject *pyevt_file = NULL; PYEVT_UNREFERENCED_PARAMETER( self ) pyevt_file = pyevt_file_new(); pyevt_file_open_file_object( (pyevt_file_t *) pyevt_file, arguments, keywords ); return( pyevt_file ); } /* Intializes a file object * Returns 0 if successful or -1 on error */ int pyevt_file_init( pyevt_file_t *pyevt_file ) { libcerror_error_t *error = NULL; static char *function = "pyevt_file_init"; if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( -1 ); } pyevt_file->file = NULL; pyevt_file->file_io_handle = NULL; if( libevt_file_initialize( &( pyevt_file->file ), &error ) != 1 ) { pyevt_error_raise( error, PyExc_MemoryError, "%s: unable to initialize file.", function ); libcerror_error_free( &error ); return( -1 ); } return( 0 ); } /* Frees a file object */ void pyevt_file_free( pyevt_file_t *pyevt_file ) { struct _typeobject *ob_type = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_file_free"; int result = 0; if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return; } if( pyevt_file->file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file - missing libevt file.", function ); return; } ob_type = Py_TYPE( pyevt_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; } Py_BEGIN_ALLOW_THREADS result = libevt_file_free( &( pyevt_file->file ), &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_MemoryError, "%s: unable to free libevt file.", function ); libcerror_error_free( &error ); } ob_type->tp_free( (PyObject*) pyevt_file ); } /* Signals the file to abort the current activity * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_signal_abort( pyevt_file_t *pyevt_file, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "pyevt_file_signal_abort"; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_file_signal_abort( pyevt_file->file, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_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 *pyevt_file_open( pyevt_file_t *pyevt_file, PyObject *arguments, PyObject *keywords ) { PyObject *string_object = NULL; libcerror_error_t *error = NULL; const char *filename_narrow = NULL; static char *function = "pyevt_file_open"; static char *keyword_list[] = { "filename", "mode", 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( pyevt_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 ) { pyevt_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 ) filename_wide = (wchar_t *) PyUnicode_AsUnicode( string_object ); Py_BEGIN_ALLOW_THREADS result = libevt_file_open_wide( pyevt_file->file, filename_wide, LIBEVT_OPEN_READ, &error ); Py_END_ALLOW_THREADS #else utf8_string_object = PyUnicode_AsUTF8String( string_object ); if( utf8_string_object == NULL ) { pyevt_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 = libevt_file_open( pyevt_file->file, filename_narrow, LIBEVT_OPEN_READ, &error ); Py_END_ALLOW_THREADS Py_DecRef( utf8_string_object ); #endif if( result != 1 ) { pyevt_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 ) { pyevt_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 = libevt_file_open( pyevt_file->file, filename_narrow, LIBEVT_OPEN_READ, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_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 *pyevt_file_open_file_object( pyevt_file_t *pyevt_file, PyObject *arguments, PyObject *keywords ) { PyObject *file_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_file_open_file_object"; static char *keyword_list[] = { "file_object", "mode", NULL }; char *mode = NULL; int result = 0; if( pyevt_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 ); } if( pyevt_file->file_io_handle != NULL ) { pyevt_error_raise( error, PyExc_IOError, "%s: invalid file - file IO handle already set.", function ); goto on_error; } if( pyevt_file_object_initialize( &( pyevt_file->file_io_handle ), file_object, &error ) != 1 ) { pyevt_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 = libevt_file_open_file_io_handle( pyevt_file->file, pyevt_file->file_io_handle, LIBEVT_OPEN_READ, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_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( pyevt_file->file_io_handle != NULL ) { libbfio_handle_free( &( pyevt_file->file_io_handle ), NULL ); } return( NULL ); } /* Closes a file * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_close( pyevt_file_t *pyevt_file, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "pyevt_file_close"; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_file_close( pyevt_file->file, &error ); Py_END_ALLOW_THREADS if( result != 0 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to close file.", function ); libcerror_error_free( &error ); return( NULL ); } if( pyevt_file->file_io_handle != NULL ) { Py_BEGIN_ALLOW_THREADS result = libbfio_handle_free( &( pyevt_file->file_io_handle ), &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_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 ); } /* Determines if the file is corrupted * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_is_corrupted( pyevt_file_t *pyevt_file, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "pyevt_file_is_corrupted"; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_file_is_corrupted( pyevt_file->file, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to determine if file is corrupted.", 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 ); } /* Retrieves the codepage used for ASCII strings in the file * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_get_ascii_codepage( pyevt_file_t *pyevt_file, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *string_object = NULL; libcerror_error_t *error = NULL; const char *codepage_string = NULL; static char *function = "pyevt_file_get_ascii_codepage"; int ascii_codepage = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_file_get_ascii_codepage( pyevt_file->file, &ascii_codepage, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve ASCII codepage.", function ); libcerror_error_free( &error ); return( NULL ); } codepage_string = pyevt_codepage_to_string( ascii_codepage ); if( codepage_string == NULL ) { PyErr_Format( PyExc_ValueError, "%s: unsupported ASCII codepage: %d.", function, ascii_codepage ); return( NULL ); } #if PY_MAJOR_VERSION >= 3 string_object = PyBytes_FromString( codepage_string ); #else string_object = PyString_FromString( codepage_string ); #endif if( string_object == NULL ) { PyErr_Format( PyExc_IOError, "%s: unable to convert codepage string into string object.", function ); return( NULL ); } return( string_object ); } /* Sets the codepage used for ASCII strings in the file * Returns 1 if successful or -1 on error */ int pyevt_file_set_ascii_codepage_from_string( pyevt_file_t *pyevt_file, const char *codepage_string ) { libcerror_error_t *error = NULL; static char *function = "pyevt_file_set_ascii_codepage_from_string"; size_t codepage_string_length = 0; uint32_t feature_flags = 0; int ascii_codepage = 0; int result = 0; if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( -1 ); } if( codepage_string == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid codepage string.", function ); return( -1 ); } codepage_string_length = narrow_string_length( codepage_string ); feature_flags = LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_WINDOWS; if( libclocale_codepage_copy_from_string( &ascii_codepage, codepage_string, codepage_string_length, feature_flags, &error ) != 1 ) { pyevt_error_raise( error, PyExc_RuntimeError, "%s: unable to determine ASCII codepage.", function ); libcerror_error_free( &error ); return( -1 ); } Py_BEGIN_ALLOW_THREADS result = libevt_file_set_ascii_codepage( pyevt_file->file, ascii_codepage, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to set ASCII codepage.", function ); libcerror_error_free( &error ); return( -1 ); } return( 1 ); } /* Sets the codepage used for ASCII strings in the file * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_set_ascii_codepage( pyevt_file_t *pyevt_file, PyObject *arguments, PyObject *keywords ) { char *codepage_string = NULL; static char *keyword_list[] = { "codepage", NULL }; int result = 0; if( PyArg_ParseTupleAndKeywords( arguments, keywords, "s", keyword_list, &codepage_string ) == 0 ) { return( NULL ); } result = pyevt_file_set_ascii_codepage_from_string( pyevt_file, codepage_string ); if( result != 1 ) { return( NULL ); } Py_IncRef( Py_None ); return( Py_None ); } /* Sets the codepage used for ASCII strings in the file * Returns a Python object if successful or NULL on error */ int pyevt_file_set_ascii_codepage_setter( pyevt_file_t *pyevt_file, PyObject *string_object, void *closure PYEVT_ATTRIBUTE_UNUSED ) { PyObject *utf8_string_object = NULL; char *codepage_string = NULL; static char *function = "pyevt_file_set_ascii_codepage_setter"; int result = 0; PYEVT_UNREFERENCED_PARAMETER( closure ) PyErr_Clear(); result = PyObject_IsInstance( string_object, (PyObject *) &PyUnicode_Type ); if( result == -1 ) { pyevt_error_fetch_and_raise( PyExc_RuntimeError, "%s: unable to determine if string object is of type unicode.", function ); return( -1 ); } else if( result != 0 ) { /* The codepage string should only contain ASCII characters. */ utf8_string_object = PyUnicode_AsUTF8String( string_object ); if( utf8_string_object == NULL ) { pyevt_error_fetch_and_raise( PyExc_RuntimeError, "%s: unable to convert unicode string to UTF-8.", function ); return( -1 ); } #if PY_MAJOR_VERSION >= 3 codepage_string = PyBytes_AsString( utf8_string_object ); #else codepage_string = PyString_AsString( utf8_string_object ); #endif if( codepage_string == NULL ) { return( -1 ); } result = pyevt_file_set_ascii_codepage_from_string( pyevt_file, codepage_string ); if( result != 1 ) { return( -1 ); } return( 0 ); } 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 ) { pyevt_error_fetch_and_raise( PyExc_RuntimeError, "%s: unable to determine if string object is of type string.", function ); return( -1 ); } else if( result != 0 ) { #if PY_MAJOR_VERSION >= 3 codepage_string = PyBytes_AsString( string_object ); #else codepage_string = PyString_AsString( string_object ); #endif if( codepage_string == NULL ) { return( -1 ); } result = pyevt_file_set_ascii_codepage_from_string( pyevt_file, codepage_string ); if( result != 1 ) { return( -1 ); } return( 0 ); } PyErr_Format( PyExc_TypeError, "%s: unsupported string object type.", function ); return( -1 ); } /* Retrieves the format version * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_get_format_version( pyevt_file_t *pyevt_file, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { char utf8_string[ 4 ]; PyObject *string_object = NULL; libcerror_error_t *error = NULL; const char *errors = NULL; static char *function = "pyevt_file_get_format_version"; uint32_t major_version = 0; uint32_t minor_version = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_file_get_format_version( pyevt_file->file, &major_version, &minor_version, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve format version.", function ); libcerror_error_free( &error ); return( NULL ); } if( major_version > 9 ) { PyErr_Format( PyExc_ValueError, "%s: major version out of bounds.", function ); return( NULL ); } if( minor_version > 9 ) { PyErr_Format( PyExc_ValueError, "%s: minor version out of bounds.", function ); return( NULL ); } utf8_string[ 0 ] = '0' + (char) major_version; utf8_string[ 1 ] = '.'; utf8_string[ 2 ] = '0' + (char) minor_version; utf8_string[ 3 ] = 0; /* 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) 3, errors ); if( string_object == NULL ) { PyErr_Format( PyExc_IOError, "%s: unable to convert UTF-8 string into Unicode object.", function ); return( NULL ); } return( string_object ); } /* Retrieves the number of records * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_get_number_of_records( pyevt_file_t *pyevt_file, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_file_get_number_of_records"; int number_of_records = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_file_get_number_of_records( pyevt_file->file, &number_of_records, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_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 the record type object * Returns a Python type object if successful or NULL on error */ PyTypeObject *pyevt_file_get_record_type_object( libevt_record_t *record PYEVT_ATTRIBUTE_UNUSED ) { PYEVT_UNREFERENCED_PARAMETER( record ) return( &pyevt_record_type_object ); } /* Retrieves a specific record by index * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_get_record_by_index( PyObject *pyevt_file, int record_index ) { PyObject *record_object = NULL; PyTypeObject *type_object = NULL; libcerror_error_t *error = NULL; libevt_record_t *record = NULL; static char *function = "pyevt_file_get_record_by_index"; int result = 0; if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_file_get_record( ( (pyevt_file_t *) pyevt_file )->file, record_index, &record, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve record: %d.", function, record_index ); libcerror_error_free( &error ); goto on_error; } type_object = pyevt_file_get_record_type_object( record ); if( type_object == NULL ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve record type object.", function ); goto on_error; } record_object = pyevt_record_new( type_object, record, (PyObject *) pyevt_file ); 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 ) { libevt_record_free( &record, NULL ); } return( NULL ); } /* Retrieves a specific record * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_get_record( pyevt_file_t *pyevt_file, 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 = pyevt_file_get_record_by_index( (PyObject *) pyevt_file, 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 *pyevt_file_get_records( pyevt_file_t *pyevt_file, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *sequence_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_file_get_records"; int number_of_records = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_file_get_number_of_records( pyevt_file->file, &number_of_records, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of records.", function ); libcerror_error_free( &error ); return( NULL ); } sequence_object = pyevt_records_new( (PyObject *) pyevt_file, &pyevt_file_get_record_by_index, number_of_records ); if( sequence_object == NULL ) { pyevt_error_raise( error, PyExc_MemoryError, "%s: unable to create sequence object.", function ); return( NULL ); } return( sequence_object ); } /* Retrieves the number of recovered records * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_get_number_of_recovered_records( pyevt_file_t *pyevt_file, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_file_get_number_of_recovered_records"; int number_of_records = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_file_get_number_of_recovered_records( pyevt_file->file, &number_of_records, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of recovered 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 recovered record by index * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_get_recovered_record_by_index( PyObject *pyevt_file, int record_index ) { PyObject *record_object = NULL; PyTypeObject *type_object = NULL; libcerror_error_t *error = NULL; libevt_record_t *record = NULL; static char *function = "pyevt_file_get_recovered_record_by_index"; int result = 0; if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_file_get_recovered_record( ( (pyevt_file_t *) pyevt_file )->file, record_index, &record, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve recovered record: %d.", function, record_index ); libcerror_error_free( &error ); goto on_error; } type_object = pyevt_file_get_record_type_object( record ); if( type_object == NULL ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve record type object.", function ); goto on_error; } record_object = pyevt_record_new( type_object, record, (PyObject *) pyevt_file ); 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 ) { libevt_record_free( &record, NULL ); } return( NULL ); } /* Retrieves a specific recovered record * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_get_recovered_record( pyevt_file_t *pyevt_file, 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 = pyevt_file_get_recovered_record_by_index( (PyObject *) pyevt_file, record_index ); return( record_object ); } /* Retrieves a sequence and iterator object for the recovered records * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_get_recovered_records( pyevt_file_t *pyevt_file, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *sequence_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_file_get_recovered_records"; int number_of_records = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_file_get_number_of_recovered_records( pyevt_file->file, &number_of_records, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of recovered records.", function ); libcerror_error_free( &error ); return( NULL ); } sequence_object = pyevt_records_new( (PyObject *) pyevt_file, &pyevt_file_get_recovered_record_by_index, number_of_records ); if( sequence_object == NULL ) { pyevt_error_raise( error, PyExc_MemoryError, "%s: unable to create sequence object.", function ); return( NULL ); } return( sequence_object ); } libevt-20170120/pyevt/pyevt_file_flags.h0000664000175000017500000000306413040331673022202 0ustar00lordyestalordyesta00000000000000/* * Python object definition of the libevt file flags * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_FILE_FLAGS_H ) #define _PYEVT_FILE_FLAGS_H #include #include #include "pyevt_libevt.h" #include "pyevt_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyevt_file_flags pyevt_file_flags_t; struct pyevt_file_flags { /* Python object initialization */ PyObject_HEAD }; extern PyTypeObject pyevt_file_flags_type_object; int pyevt_file_flags_init_type( PyTypeObject *type_object ); PyObject *pyevt_file_flags_new( void ); int pyevt_file_flags_init( pyevt_file_flags_t *definitions_object ); void pyevt_file_flags_free( pyevt_file_flags_t *definitions_object ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYEVT_FILE_FLAGS_H ) */ libevt-20170120/pyevt/pyevt_file.h0000664000175000017500000000771413040331673021034 0ustar00lordyestalordyesta00000000000000/* * Python object wrapper of libevt_file_t * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_FILE_H ) #define _PYEVT_FILE_H #include #include #include "pyevt_libbfio.h" #include "pyevt_libevt.h" #include "pyevt_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyevt_file pyevt_file_t; struct pyevt_file { /* Python object initialization */ PyObject_HEAD /* The libevt file */ libevt_file_t *file; /* The libbfio file IO handle */ libbfio_handle_t *file_io_handle; }; extern PyMethodDef pyevt_file_object_methods[]; extern PyTypeObject pyevt_file_type_object; PyObject *pyevt_file_new( void ); PyObject *pyevt_file_new_open( PyObject *self, PyObject *arguments, PyObject *keywords ); PyObject *pyevt_file_new_open_file_object( PyObject *self, PyObject *arguments, PyObject *keywords ); int pyevt_file_init( pyevt_file_t *pyevt_file ); void pyevt_file_free( pyevt_file_t *pyevt_file ); PyObject *pyevt_file_signal_abort( pyevt_file_t *pyevt_file, PyObject *arguments ); PyObject *pyevt_file_open( pyevt_file_t *pyevt_file, PyObject *arguments, PyObject *keywords ); PyObject *pyevt_file_open_file_object( pyevt_file_t *pyevt_file, PyObject *arguments, PyObject *keywords ); PyObject *pyevt_file_close( pyevt_file_t *pyevt_file, PyObject *arguments ); PyObject *pyevt_file_is_corrupted( pyevt_file_t *pyevt_file, PyObject *arguments ); PyObject *pyevt_file_get_ascii_codepage( pyevt_file_t *pyevt_file, PyObject *arguments ); int pyevt_file_set_ascii_codepage_from_string( pyevt_file_t *pyevt_file, const char *codepage_string ); PyObject *pyevt_file_set_ascii_codepage( pyevt_file_t *pyevt_file, PyObject *arguments, PyObject *keywords ); int pyevt_file_set_ascii_codepage_setter( pyevt_file_t *pyevt_file, PyObject *string_object, void *closure ); PyObject *pyevt_file_get_format_version( pyevt_file_t *pyevt_file, PyObject *arguments ); PyObject *pyevt_file_get_number_of_records( pyevt_file_t *pyevt_file, PyObject *arguments ); PyObject *pyevt_file_get_record_by_index( PyObject *pyevt_file, int record_index ); PyObject *pyevt_file_get_record( pyevt_file_t *pyevt_file, PyObject *arguments, PyObject *keywords ); PyObject *pyevt_file_get_records( pyevt_file_t *pyevt_file, PyObject *arguments ); PyObject *pyevt_file_get_number_of_recovered_records( pyevt_file_t *pyevt_file, PyObject *arguments ); PyObject *pyevt_file_get_recovered_record_by_index( PyObject *pyevt_file, int record_index ); PyObject *pyevt_file_get_recovered_record( pyevt_file_t *pyevt_file, PyObject *arguments, PyObject *keywords ); PyObject *pyevt_file_get_recovered_records( pyevt_file_t *pyevt_file, PyObject *arguments ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYEVT_FILE_H ) */ libevt-20170120/pyevt/pyevt.h0000664000175000017500000000303413040331673020024 0ustar00lordyestalordyesta00000000000000/* * Python bindings for libevt (pyevt) * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_H ) #define _PYEVT_H #include #include #include "pyevt_python.h" #if defined( __cplusplus ) extern "C" { #endif PyObject *pyevt_get_version( PyObject *self, PyObject *arguments ); PyObject *pyevt_check_file_signature( PyObject *self, PyObject *arguments, PyObject *keywords ); PyObject *pyevt_check_file_signature_file_object( PyObject *self, PyObject *arguments, PyObject *keywords ); #if PY_MAJOR_VERSION >= 3 PyMODINIT_FUNC PyInit_pyevt( void ); #else PyMODINIT_FUNC initpyevt( void ); #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _PYEVT_H ) */ libevt-20170120/pyevt/pyevt_libcerror.h0000664000175000017500000000263013040331673022070 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_LIBCERROR_H ) #define _PYEVT_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( _PYEVT_LIBCERROR_H ) */ libevt-20170120/pyevt/pyevt_file_flags.c0000664000175000017500000001371013040331673022174 0ustar00lordyestalordyesta00000000000000/* * Python object definition of the libevt file flags * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyevt_file_flags.h" #include "pyevt_libevt.h" #include "pyevt_python.h" #include "pyevt_unused.h" PyTypeObject pyevt_file_flags_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyevt.file_flags", /* tp_basicsize */ sizeof( pyevt_file_flags_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyevt_file_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 */ "pyevt file flags object (wraps LIBEVT_FILE_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) pyevt_file_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 pyevt_file_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( LIBEVT_FILE_FLAG_IS_DIRTY ); #else value_object = PyInt_FromLong( LIBEVT_FILE_FLAG_IS_DIRTY ); #endif if( PyDict_SetItemString( type_object->tp_dict, "IS_DIRTY", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBEVT_FILE_FLAG_HAS_WRAPPED ); #else value_object = PyInt_FromLong( LIBEVT_FILE_FLAG_HAS_WRAPPED ); #endif if( PyDict_SetItemString( type_object->tp_dict, "HAS_WRAPPED", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBEVT_FILE_FLAG_IS_FULL ); #else value_object = PyInt_FromLong( LIBEVT_FILE_FLAG_IS_FULL ); #endif if( PyDict_SetItemString( type_object->tp_dict, "IS_FULL", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBEVT_FILE_FLAG_ARCHIVE ); #else value_object = PyInt_FromLong( LIBEVT_FILE_FLAG_ARCHIVE ); #endif if( PyDict_SetItemString( type_object->tp_dict, "ARCHIVE", 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 flags object * Returns a Python object if successful or NULL on error */ PyObject *pyevt_file_flags_new( void ) { pyevt_file_flags_t *definitions_object = NULL; static char *function = "pyevt_file_flags_new"; definitions_object = PyObject_New( struct pyevt_file_flags, &pyevt_file_flags_type_object ); if( definitions_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create definitions object.", function ); goto on_error; } if( pyevt_file_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 ); } /* Intializes a file flags object * Returns 0 if successful or -1 on error */ int pyevt_file_flags_init( pyevt_file_flags_t *definitions_object ) { static char *function = "pyevt_file_flags_init"; if( definitions_object == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid definitions object.", function ); return( -1 ); } return( 0 ); } /* Frees a file flags object */ void pyevt_file_flags_free( pyevt_file_flags_t *definitions_object ) { struct _typeobject *ob_type = NULL; static char *function = "pyevt_file_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 ); } libevt-20170120/pyevt/Makefile.am0000664000175000017500000000236413010116427020540 0ustar00lordyestalordyesta00000000000000if HAVE_PYTHON AM_CFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ pyexec_LTLIBRARIES = pyevt.la pyevt_la_SOURCES = \ pyevt.c pyevt.h \ pyevt_codepage.c pyevt_codepage.h \ pyevt_datetime.c pyevt_datetime.h \ pyevt_error.c pyevt_error.h \ pyevt_event_types.c pyevt_event_types.h \ pyevt_file.c pyevt_file.h \ pyevt_file_flags.c pyevt_file_flags.h \ pyevt_file_object_io_handle.c pyevt_file_object_io_handle.h \ pyevt_integer.c pyevt_integer.h \ pyevt_libbfio.h \ pyevt_libcerror.h \ pyevt_libclocale.h \ pyevt_libevt.h \ pyevt_python.h \ pyevt_record.c pyevt_record.h \ pyevt_records.c pyevt_records.h \ pyevt_strings.c pyevt_strings.h \ pyevt_unused.h pyevt_la_LIBADD = \ @LIBCERROR_LIBADD@ \ ../libevt/libevt.la \ @LIBCDATA_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBBFIO_LIBADD@ pyevt_la_CPPFLAGS = $(PYTHON_CPPFLAGS) pyevt_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile libevt-20170120/pyevt/pyevt_datetime.c0000664000175000017500000003530313040331673021677 0ustar00lordyestalordyesta00000000000000/* * Date and time functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "pyevt_datetime.h" #include "pyevt_python.h" #include /* Creates a new datetime object from a FAT date time * Returns a Python object if successful or NULL on error */ PyObject *pyevt_datetime_new_from_fat_date_time( uint32_t fat_date_time ) { PyObject *datetime_object = NULL; static char *function = "pyevt_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; } /* Januari (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( month == 1 ) || ( month == 3 ) || ( month == 5 ) || ( month == 7 ) || ( month == 8 ) || ( month == 10 ) || ( month == 12 ) ) { days_in_month = 31; } 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 *pyevt_datetime_new_from_filetime( uint64_t filetime ) { PyObject *datetime_object = NULL; static char *function = "pyevt_datetime_new_from_filetime"; 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; /* 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; } while( filetime > 0 ) { if( ( year % 400 ) == 0 ) { days_in_century = 36525; } else { days_in_century = 36524; } if( filetime <= days_in_century ) { break; } filetime -= days_in_century; year += 100; } while( filetime > 0 ) { /* Check for a leap year * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 ) */ if( ( ( ( year % 4 ) == 0 ) && ( ( year % 100 ) != 0 ) ) || ( ( year % 400 ) == 0 ) ) { days_in_year = 366; } else { days_in_year = 365; } if( filetime <= days_in_year ) { break; } filetime -= days_in_year; year += 1; } /* Determine the month correct the value to days within the month */ month = 1; while( filetime > 0 ) { /* February (2) */ if( month == 2 ) { if( ( ( ( year % 4 ) == 0 ) && ( ( year % 100 ) != 0 ) ) || ( ( year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } } /* April (4), June (6), September (9), November (11) */ else if( ( month == 4 ) || ( month == 6 ) || ( month == 9 ) || ( month == 11 ) ) { days_in_month = 30; } /* Januari (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( month == 1 ) || ( month == 3 ) || ( month == 5 ) || ( month == 7 ) || ( month == 8 ) || ( month == 10 ) || ( month == 12 ) ) { days_in_month = 31; } /* This should never happen, but just in case */ else { PyErr_Format( PyExc_IOError, "%s: unsupported month: %" PRIu8 ".", function, month ); return( NULL ); } if( filetime <= days_in_month ) { break; } filetime -= days_in_month; month += 1; } /* Determine the day */ day_of_month = (uint8_t) filetime; 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 floatingtime * Returns a Python object if successful or NULL on error */ PyObject *pyevt_datetime_new_from_floatingtime( uint64_t floatingtime ) { byte_stream_float64_t timestamp; PyObject *datetime_object = NULL; static char *function = "pyevt_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; } /* Januari (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( month == 1 ) || ( month == 3 ) || ( month == 5 ) || ( month == 7 ) || ( month == 8 ) || ( month == 10 ) || ( month == 12 ) ) { days_in_month = 31; } /* This should never happen, but just in case */ else { PyErr_Format( PyExc_IOError, "%s: unsupported month: %" 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 POSIX time * Returns a Python object if successful or NULL on error */ PyObject *pyevt_datetime_new_from_posix_time( uint32_t posix_time ) { PyObject *datetime_object = NULL; static char *function = "pyevt_datetime_new_from_posix_time"; 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; /* There are 60 seconds in a minute correct the value to minutes */ seconds = posix_time % 60; posix_time /= 60; /* There are 60 minutes in an hour correct the value to hours */ minutes = posix_time % 60; posix_time /= 60; /* There are 24 hours in a day correct the value to days */ hours = posix_time % 24; posix_time /= 24; /* Add 1 day to compensate that Jan 1 1601 is represented as 0 */ posix_time += 1; /* Determine the number of years starting at '1 Jan 1970 00:00:00' * correct the value to days within the year */ year = 1970; if( posix_time >= 10957 ) { year = 2000; posix_time -= 10957; } while( posix_time > 0 ) { /* Check for a leap year * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 ) */ if( ( ( ( year % 4 ) == 0 ) && ( ( year % 100 ) != 0 ) ) || ( ( year % 400 ) == 0 ) ) { days_in_year = 366; } else { days_in_year = 365; } if( posix_time <= days_in_year ) { break; } posix_time -= days_in_year; year += 1; } /* Determine the month correct the value to days within the month */ month = 1; while( posix_time > 0 ) { /* February (2) */ if( month == 2 ) { if( ( ( ( year % 4 ) == 0 ) && ( ( year % 100 ) != 0 ) ) || ( ( year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } } /* April (4), June (6), September (9), November (11) */ else if( ( month == 4 ) || ( month == 6 ) || ( month == 9 ) || ( month == 11 ) ) { days_in_month = 30; } /* Januari (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( month == 1 ) || ( month == 3 ) || ( month == 5 ) || ( month == 7 ) || ( month == 8 ) || ( month == 10 ) || ( month == 12 ) ) { days_in_month = 31; } /* This should never happen, but just in case */ else { PyErr_Format( PyExc_IOError, "%s: unsupported month: %" PRIu8 ".", function, month ); return( NULL ); } if( posix_time <= days_in_month ) { break; } posix_time -= days_in_month; month += 1; } /* Determine the day */ day_of_month = (uint8_t) posix_time; 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 ); } libevt-20170120/pyevt/pyevt_codepage.c0000664000175000017500000000622413040331672021651 0ustar00lordyestalordyesta00000000000000/* * Codepage functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "pyevt_codepage.h" #include "pyevt_libevt.h" /* Returns a string representation of the codepage * Codecs and aliases are defined: http://docs.python.org/library/codecs.html#standard-encodings * Returns 1 if successful or NULL if codepage is not supported */ const char *pyevt_codepage_to_string( int codepage ) { switch( codepage ) { case LIBEVT_CODEPAGE_ASCII: return( "ascii" ); case LIBEVT_CODEPAGE_ISO_8859_1: return( "iso-8859-1" ); case LIBEVT_CODEPAGE_ISO_8859_2: return( "iso-8859-2" ); case LIBEVT_CODEPAGE_ISO_8859_3: return( "iso-8859-3" ); case LIBEVT_CODEPAGE_ISO_8859_4: return( "iso-8859-4" ); case LIBEVT_CODEPAGE_ISO_8859_5: return( "iso-8859-5" ); case LIBEVT_CODEPAGE_ISO_8859_6: return( "iso-8859-6" ); case LIBEVT_CODEPAGE_ISO_8859_7: return( "iso-8859-7" ); case LIBEVT_CODEPAGE_ISO_8859_8: return( "iso-8859-8" ); case LIBEVT_CODEPAGE_ISO_8859_9: return( "iso-8859-9" ); case LIBEVT_CODEPAGE_ISO_8859_10: return( "iso-8859-10" ); case LIBEVT_CODEPAGE_ISO_8859_11: return( "iso-8859-11" ); case LIBEVT_CODEPAGE_ISO_8859_13: return( "iso-8859-13" ); case LIBEVT_CODEPAGE_ISO_8859_14: return( "iso-8859-14" ); case LIBEVT_CODEPAGE_ISO_8859_15: return( "iso-8859-15" ); case LIBEVT_CODEPAGE_ISO_8859_16: return( "iso-8859-16" ); case LIBEVT_CODEPAGE_KOI8_R: return( "koi8_r" ); case LIBEVT_CODEPAGE_KOI8_U: return( "koi8_u" ); case LIBEVT_CODEPAGE_WINDOWS_874: return( "cp874" ); case LIBEVT_CODEPAGE_WINDOWS_932: return( "cp932" ); case LIBEVT_CODEPAGE_WINDOWS_936: return( "cp936" ); case LIBEVT_CODEPAGE_WINDOWS_949: return( "cp949" ); case LIBEVT_CODEPAGE_WINDOWS_950: return( "cp950" ); case LIBEVT_CODEPAGE_WINDOWS_1250: return( "cp1250" ); case LIBEVT_CODEPAGE_WINDOWS_1251: return( "cp1251" ); case LIBEVT_CODEPAGE_WINDOWS_1252: return( "cp1252" ); case LIBEVT_CODEPAGE_WINDOWS_1253: return( "cp1253" ); case LIBEVT_CODEPAGE_WINDOWS_1254: return( "cp1254" ); case LIBEVT_CODEPAGE_WINDOWS_1255: return( "cp1255" ); case LIBEVT_CODEPAGE_WINDOWS_1256: return( "cp1256" ); case LIBEVT_CODEPAGE_WINDOWS_1257: return( "cp1257" ); case LIBEVT_CODEPAGE_WINDOWS_1258: return( "cp1258" ); default: break; } return( NULL ); } libevt-20170120/pyevt/pyevt_strings.c0000664000175000017500000002140113040331673021566 0ustar00lordyestalordyesta00000000000000/* * Python object definition of the sequence and iterator object of strings * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyevt_libcerror.h" #include "pyevt_libevt.h" #include "pyevt_python.h" #include "pyevt_strings.h" PySequenceMethods pyevt_strings_sequence_methods = { /* sq_length */ (lenfunc) pyevt_strings_len, /* sq_concat */ 0, /* sq_repeat */ 0, /* sq_item */ (ssizeargfunc) pyevt_strings_getitem, /* sq_slice */ 0, /* sq_ass_item */ 0, /* sq_ass_slice */ 0, /* sq_contains */ 0, /* sq_inplace_concat */ 0, /* sq_inplace_repeat */ 0 }; PyTypeObject pyevt_strings_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyevt._strings", /* tp_basicsize */ sizeof( pyevt_strings_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyevt_strings_free, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ &pyevt_strings_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 */ "pyevt internal sequence and iterator object of strings", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ (getiterfunc) pyevt_strings_iter, /* tp_iternext */ (iternextfunc) pyevt_strings_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) pyevt_strings_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 strings object * Returns a Python object if successful or NULL on error */ PyObject *pyevt_strings_new( PyObject *parent_object, PyObject* (*get_item_by_index)( PyObject *parent_object, int index ), int number_of_items ) { pyevt_strings_t *strings_object = NULL; static char *function = "pyevt_strings_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 strings values are initialized */ strings_object = PyObject_New( struct pyevt_strings, &pyevt_strings_type_object ); if( strings_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create strings object.", function ); goto on_error; } if( pyevt_strings_init( strings_object ) != 0 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize strings object.", function ); goto on_error; } strings_object->parent_object = parent_object; strings_object->get_item_by_index = get_item_by_index; strings_object->number_of_items = number_of_items; Py_IncRef( (PyObject *) strings_object->parent_object ); return( (PyObject *) strings_object ); on_error: if( strings_object != NULL ) { Py_DecRef( (PyObject *) strings_object ); } return( NULL ); } /* Intializes a strings object * Returns 0 if successful or -1 on error */ int pyevt_strings_init( pyevt_strings_t *strings_object ) { static char *function = "pyevt_strings_init"; if( strings_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid strings object.", function ); return( -1 ); } /* Make sure the strings values are initialized */ strings_object->parent_object = NULL; strings_object->get_item_by_index = NULL; strings_object->current_index = 0; strings_object->number_of_items = 0; return( 0 ); } /* Frees a strings object */ void pyevt_strings_free( pyevt_strings_t *strings_object ) { struct _typeobject *ob_type = NULL; static char *function = "pyevt_strings_free"; if( strings_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid strings object.", function ); return; } ob_type = Py_TYPE( strings_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( strings_object->parent_object != NULL ) { Py_DecRef( (PyObject *) strings_object->parent_object ); } ob_type->tp_free( (PyObject*) strings_object ); } /* The strings len() function */ Py_ssize_t pyevt_strings_len( pyevt_strings_t *strings_object ) { static char *function = "pyevt_strings_len"; if( strings_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid strings object.", function ); return( -1 ); } return( (Py_ssize_t) strings_object->number_of_items ); } /* The strings getitem() function */ PyObject *pyevt_strings_getitem( pyevt_strings_t *strings_object, Py_ssize_t item_index ) { PyObject *string_object = NULL; static char *function = "pyevt_strings_getitem"; if( strings_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid strings object.", function ); return( NULL ); } if( strings_object->get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid strings object - missing get item by index function.", function ); return( NULL ); } if( strings_object->number_of_items < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid strings object - invalid number of items.", function ); return( NULL ); } if( ( item_index < 0 ) || ( item_index >= (Py_ssize_t) strings_object->number_of_items ) ) { PyErr_Format( PyExc_ValueError, "%s: invalid invalid item index value out of bounds.", function ); return( NULL ); } string_object = strings_object->get_item_by_index( strings_object->parent_object, (int) item_index ); return( string_object ); } /* The strings iter() function */ PyObject *pyevt_strings_iter( pyevt_strings_t *strings_object ) { static char *function = "pyevt_strings_iter"; if( strings_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid strings object.", function ); return( NULL ); } Py_IncRef( (PyObject *) strings_object ); return( (PyObject *) strings_object ); } /* The strings iternext() function */ PyObject *pyevt_strings_iternext( pyevt_strings_t *strings_object ) { PyObject *string_object = NULL; static char *function = "pyevt_strings_iternext"; if( strings_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid strings object.", function ); return( NULL ); } if( strings_object->get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid strings object - missing get item by index function.", function ); return( NULL ); } if( strings_object->current_index < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid strings object - invalid current index.", function ); return( NULL ); } if( strings_object->number_of_items < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid strings object - invalid number of items.", function ); return( NULL ); } if( strings_object->current_index >= strings_object->number_of_items ) { PyErr_SetNone( PyExc_StopIteration ); return( NULL ); } string_object = strings_object->get_item_by_index( strings_object->parent_object, strings_object->current_index ); if( string_object != NULL ) { strings_object->current_index++; } return( string_object ); } libevt-20170120/pyevt/pyevt_strings.h0000664000175000017500000000443413040331673021602 0ustar00lordyestalordyesta00000000000000/* * Python object definition of the sequence and iterator object of strings * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_STRINGS_H ) #define _PYEVT_STRINGS_H #include #include #include "pyevt_libevt.h" #include "pyevt_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyevt_strings pyevt_strings_t; struct pyevt_strings { /* 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 pyevt_strings_type_object; PyObject *pyevt_strings_new( PyObject *parent_object, PyObject* (*get_item_by_index)( PyObject *parent_object, int index ), int number_of_items ); int pyevt_strings_init( pyevt_strings_t *strings_object ); void pyevt_strings_free( pyevt_strings_t *strings_object ); Py_ssize_t pyevt_strings_len( pyevt_strings_t *strings_object ); PyObject *pyevt_strings_getitem( pyevt_strings_t *strings_object, Py_ssize_t item_index ); PyObject *pyevt_strings_iter( pyevt_strings_t *strings_object ); PyObject *pyevt_strings_iternext( pyevt_strings_t *strings_object ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYEVT_STRINGS_H ) */ libevt-20170120/pyevt/pyevt_event_types.h0000664000175000017500000000310213040331673022445 0ustar00lordyestalordyesta00000000000000/* * Python object definition of the libevt event types * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_EVENT_TYPES_H ) #define _PYEVT_EVENT_TYPES_H #include #include #include "pyevt_libevt.h" #include "pyevt_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyevt_event_types pyevt_event_types_t; struct pyevt_event_types { /* Python object initialization */ PyObject_HEAD }; extern PyTypeObject pyevt_event_types_type_object; int pyevt_event_types_init_type( PyTypeObject *type_object ); PyObject *pyevt_event_types_new( void ); int pyevt_event_types_init( pyevt_event_types_t *definitions_object ); void pyevt_event_types_free( pyevt_event_types_t *definitions_object ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYEVT_EVENT_TYPES_H ) */ libevt-20170120/pyevt/pyevt.c0000664000175000017500000003332513040331672020024 0ustar00lordyestalordyesta00000000000000/* * Python bindings module for libevt (pyevt) * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyevt.h" #include "pyevt_error.h" #include "pyevt_event_types.h" #include "pyevt_file.h" #include "pyevt_file_flags.h" #include "pyevt_file_object_io_handle.h" #include "pyevt_libcerror.h" #include "pyevt_libevt.h" #include "pyevt_python.h" #include "pyevt_record.h" #include "pyevt_records.h" #include "pyevt_strings.h" #include "pyevt_unused.h" #if !defined( LIBEVT_HAVE_BFIO ) LIBEVT_EXTERN \ int libevt_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libevt_error_t **error ); #endif /* !defined( LIBEVT_HAVE_BFIO ) */ /* The pyevt module methods */ PyMethodDef pyevt_module_methods[] = { { "get_version", (PyCFunction) pyevt_get_version, METH_NOARGS, "get_version() -> String\n" "\n" "Retrieves the version." }, { "check_file_signature", (PyCFunction) pyevt_check_file_signature, METH_VARARGS | METH_KEYWORDS, "check_file_signature(filename) -> Boolean\n" "\n" "Checks if a file has a Windows Event Log (EVT) file signature." }, { "check_file_signature_file_object", (PyCFunction) pyevt_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 Windows Event Log (EVT) file signature using a file-like object." }, { "open", (PyCFunction) pyevt_file_new_open, METH_VARARGS | METH_KEYWORDS, "open(filename, mode='r') -> Object\n" "\n" "Opens a file." }, { "open_file_object", (PyCFunction) pyevt_file_new_open_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 pyevt/libevt version * Returns a Python object if successful or NULL on error */ PyObject *pyevt_get_version( PyObject *self PYEVT_ATTRIBUTE_UNUSED, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { const char *errors = NULL; const char *version_string = NULL; size_t version_string_length = 0; PYEVT_UNREFERENCED_PARAMETER( self ) PYEVT_UNREFERENCED_PARAMETER( arguments ) Py_BEGIN_ALLOW_THREADS version_string = libevt_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, errors ) ); } /* Checks if the file has a Windows Event Log (EVT) file signature * Returns a Python object if successful or NULL on error */ PyObject *pyevt_check_file_signature( PyObject *self PYEVT_ATTRIBUTE_UNUSED, PyObject *arguments, PyObject *keywords ) { PyObject *string_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_check_file_signature"; static char *keyword_list[] = { "filename", NULL }; const char *filename_narrow = NULL; int result = 0; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) const wchar_t *filename_wide = NULL; #else PyObject *utf8_string_object = NULL; #endif PYEVT_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 ) { pyevt_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 ) filename_wide = (wchar_t *) PyUnicode_AsUnicode( string_object ); Py_BEGIN_ALLOW_THREADS result = libevt_check_file_signature_wide( filename_wide, &error ); Py_END_ALLOW_THREADS #else utf8_string_object = PyUnicode_AsUTF8String( string_object ); if( utf8_string_object == NULL ) { pyevt_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 = libevt_check_file_signature( filename_narrow, &error ); Py_END_ALLOW_THREADS Py_DecRef( utf8_string_object ); #endif if( result == -1 ) { pyevt_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 ) { pyevt_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 = libevt_check_file_signature( filename_narrow, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_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 the file has a Windows Event Log (EVT) file signature using a file-like object * Returns a Python object if successful or NULL on error */ PyObject *pyevt_check_file_signature_file_object( PyObject *self PYEVT_ATTRIBUTE_UNUSED, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; libbfio_handle_t *file_io_handle = NULL; PyObject *file_object = NULL; static char *function = "pyevt_check_file_signature_file_object"; static char *keyword_list[] = { "file_object", NULL }; int result = 0; PYEVT_UNREFERENCED_PARAMETER( self ) if( PyArg_ParseTupleAndKeywords( arguments, keywords, "|O", keyword_list, &file_object ) == 0 ) { return( NULL ); } if( pyevt_file_object_initialize( &file_io_handle, file_object, &error ) != 1 ) { pyevt_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 = libevt_check_file_signature_file_io_handle( file_io_handle, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_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 ) { pyevt_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 ); } #if PY_MAJOR_VERSION >= 3 /* The pyevt module definition */ PyModuleDef pyevt_module_definition = { PyModuleDef_HEAD_INIT, /* m_name */ "pyevt", /* m_doc */ "Python libevt module (pyevt).", /* m_size */ -1, /* m_methods */ pyevt_module_methods, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL, /* m_free */ NULL, }; #endif /* PY_MAJOR_VERSION >= 3 */ /* Initializes the pyevt module */ #if PY_MAJOR_VERSION >= 3 PyMODINIT_FUNC PyInit_pyevt( void ) #else PyMODINIT_FUNC initpyevt( void ) #endif { PyObject *module = NULL; PyTypeObject *event_types_type_object = NULL; PyTypeObject *file_type_object = NULL; PyTypeObject *file_flags_type_object = NULL; PyTypeObject *record_type_object = NULL; PyTypeObject *records_type_object = NULL; PyTypeObject *strings_type_object = NULL; PyGILState_STATE gil_state = 0; #if defined( HAVE_DEBUG_OUTPUT ) libevt_notify_set_stream( stderr, NULL ); libevt_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( &pyevt_module_definition ); #else module = Py_InitModule3( "pyevt", pyevt_module_methods, "Python libevt module (pyevt)." ); #endif if( module == NULL ) { #if PY_MAJOR_VERSION >= 3 return( NULL ); #else return; #endif } PyEval_InitThreads(); gil_state = PyGILState_Ensure(); /* Setup the file type object */ pyevt_file_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyevt_file_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyevt_file_type_object ); file_type_object = &pyevt_file_type_object; PyModule_AddObject( module, "file", (PyObject *) file_type_object ); /* Setup the records type object */ pyevt_records_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyevt_records_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyevt_records_type_object ); records_type_object = &pyevt_records_type_object; PyModule_AddObject( module, "_records", (PyObject *) records_type_object ); /* Setup the record type object */ pyevt_record_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyevt_record_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyevt_record_type_object ); record_type_object = &pyevt_record_type_object; PyModule_AddObject( module, "record", (PyObject *) record_type_object ); /* Setup the strings type object */ pyevt_strings_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyevt_strings_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyevt_strings_type_object ); strings_type_object = &pyevt_strings_type_object; PyModule_AddObject( module, "_strings", (PyObject *) strings_type_object ); /* Setup the event types type object */ pyevt_event_types_type_object.tp_new = PyType_GenericNew; if( pyevt_event_types_init_type( &pyevt_event_types_type_object ) != 1 ) { goto on_error; } if( PyType_Ready( &pyevt_event_types_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyevt_event_types_type_object ); event_types_type_object = &pyevt_event_types_type_object; PyModule_AddObject( module, "event_types", (PyObject *) event_types_type_object ); /* Setup the file flags type object */ pyevt_file_flags_type_object.tp_new = PyType_GenericNew; if( pyevt_file_flags_init_type( &pyevt_file_flags_type_object ) != 1 ) { goto on_error; } if( PyType_Ready( &pyevt_file_flags_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyevt_file_flags_type_object ); file_flags_type_object = &pyevt_file_flags_type_object; PyModule_AddObject( module, "file_flags", (PyObject *) file_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 } libevt-20170120/pyevt/pyevt_file_object_io_handle.h0000664000175000017500000000771413040331673024364 0ustar00lordyestalordyesta00000000000000/* * Python file object IO handle functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_FILE_OBJECT_IO_HANDLE_H ) #define _PYEVT_FILE_OBJECT_IO_HANDLE_H #include #include #include "pyevt_libbfio.h" #include "pyevt_libcerror.h" #include "pyevt_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyevt_file_object_io_handle pyevt_file_object_io_handle_t; struct pyevt_file_object_io_handle { /* The python file (like) object */ PyObject *file_object; /* The access flags */ int access_flags; }; int pyevt_file_object_io_handle_initialize( pyevt_file_object_io_handle_t **file_object_io_handle, PyObject *file_object, libcerror_error_t **error ); int pyevt_file_object_initialize( libbfio_handle_t **handle, PyObject *file_object, libcerror_error_t **error ); int pyevt_file_object_io_handle_free( pyevt_file_object_io_handle_t **file_object_io_handle, libcerror_error_t **error ); int pyevt_file_object_io_handle_clone( pyevt_file_object_io_handle_t **destination_file_object_io_handle, pyevt_file_object_io_handle_t *source_file_object_io_handle, libcerror_error_t **error ); int pyevt_file_object_io_handle_open( pyevt_file_object_io_handle_t *file_object_io_handle, int access_flags, libcerror_error_t **error ); int pyevt_file_object_io_handle_close( pyevt_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ); ssize_t pyevt_file_object_read_buffer( PyObject *file_object, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t pyevt_file_object_io_handle_read( pyevt_file_object_io_handle_t *file_object_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t pyevt_file_object_write_buffer( PyObject *file_object, const uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t pyevt_file_object_io_handle_write( pyevt_file_object_io_handle_t *file_object_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); int pyevt_file_object_seek_offset( PyObject *file_object, off64_t offset, int whence, libcerror_error_t **error ); int pyevt_file_object_get_offset( PyObject *file_object, off64_t *offset, libcerror_error_t **error ); off64_t pyevt_file_object_io_handle_seek_offset( pyevt_file_object_io_handle_t *file_object_io_handle, off64_t offset, int whence, libcerror_error_t **error ); int pyevt_file_object_io_handle_exists( pyevt_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ); int pyevt_file_object_io_handle_is_open( pyevt_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ); int pyevt_file_object_get_size( PyObject *file_object, size64_t *size, libcerror_error_t **error ); int pyevt_file_object_io_handle_get_size( pyevt_file_object_io_handle_t *file_object_io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYEVT_FILE_OBJECT_IO_HANDLE_H ) */ libevt-20170120/pyevt/pyevt_codepage.h0000664000175000017500000000216213040331673021654 0ustar00lordyestalordyesta00000000000000/* * Codepage functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_CODEPAGE_H ) #define _PYEVT_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif const char *pyevt_codepage_to_string( int codepage ); /* TODO add list function */ #if defined( __cplusplus ) } #endif #endif /* !defined( _PYEVT_CODEPAGE_H ) */ libevt-20170120/pyevt/pyevt_unused.h0000664000175000017500000000251613040331673021413 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_INTERNAL_UNUSED_H ) #define _PYEVT_INTERNAL_UNUSED_H #include #if !defined( PYEVT_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define PYEVT_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define PYEVT_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define PYEVT_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define PYEVT_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _PYEVT_INTERNAL_UNUSED_H ) */ libevt-20170120/pyevt/pyevt_integer.h0000664000175000017500000000277013040331673021547 0ustar00lordyestalordyesta00000000000000/* * Integer functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_INTEGER_H ) #define _PYEVT_INTEGER_H #include #include #include "pyevt_libcerror.h" #include "pyevt_python.h" #if defined( __cplusplus ) extern "C" { #endif PyObject *pyevt_integer_signed_new_from_64bit( int64_t value_64bit ); PyObject *pyevt_integer_unsigned_new_from_64bit( uint64_t value_64bit ); int pyevt_integer_signed_copy_to_64bit( PyObject *integer_object, int64_t *value_64bit, libcerror_error_t **error ); int pyevt_integer_unsigned_copy_to_64bit( PyObject *integer_object, uint64_t *value_64bit, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYEVT_INTEGER_H ) */ libevt-20170120/pyevt/pyevt_event_types.c0000664000175000017500000001450613040331673022452 0ustar00lordyestalordyesta00000000000000/* * Python object definition of the libevt event types * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyevt_event_types.h" #include "pyevt_libevt.h" #include "pyevt_python.h" #include "pyevt_unused.h" PyTypeObject pyevt_event_types_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyevt.event_types", /* tp_basicsize */ sizeof( pyevt_event_types_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyevt_event_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 */ "pyevt event types object (wraps LIBEVT_EVENT_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) pyevt_event_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 pyevt_event_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( LIBEVT_EVENT_TYPE_ERROR ); #else value_object = PyInt_FromLong( LIBEVT_EVENT_TYPE_ERROR ); #endif if( PyDict_SetItemString( type_object->tp_dict, "ERROR", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBEVT_EVENT_TYPE_WARNING ); #else value_object = PyInt_FromLong( LIBEVT_EVENT_TYPE_WARNING ); #endif if( PyDict_SetItemString( type_object->tp_dict, "WARNING", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBEVT_EVENT_TYPE_INFORMATION ); #else value_object = PyInt_FromLong( LIBEVT_EVENT_TYPE_INFORMATION ); #endif if( PyDict_SetItemString( type_object->tp_dict, "INFORMATION", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBEVT_EVENT_TYPE_AUDIT_SUCCESS ); #else value_object = PyInt_FromLong( LIBEVT_EVENT_TYPE_AUDIT_SUCCESS ); #endif if( PyDict_SetItemString( type_object->tp_dict, "AUDIT_SUCCESS", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBEVT_EVENT_TYPE_AUDIT_FAILURE ); #else value_object = PyInt_FromLong( LIBEVT_EVENT_TYPE_AUDIT_FAILURE ); #endif if( PyDict_SetItemString( type_object->tp_dict, "AUDIT_FAILURE", 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 event types object * Returns a Python object if successful or NULL on error */ PyObject *pyevt_event_types_new( void ) { pyevt_event_types_t *definitions_object = NULL; static char *function = "pyevt_event_types_new"; definitions_object = PyObject_New( struct pyevt_event_types, &pyevt_event_types_type_object ); if( definitions_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create definitions object.", function ); goto on_error; } if( pyevt_event_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 ); } /* Intializes an event types object * Returns 0 if successful or -1 on error */ int pyevt_event_types_init( pyevt_event_types_t *definitions_object ) { static char *function = "pyevt_event_types_init"; if( definitions_object == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid definitions object.", function ); return( -1 ); } return( 0 ); } /* Frees an event types object */ void pyevt_event_types_free( pyevt_event_types_t *definitions_object ) { struct _typeobject *ob_type = NULL; static char *function = "pyevt_event_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 ); } libevt-20170120/pyevt/pyevt_record.c0000664000175000017500000010641713040331673021366 0ustar00lordyestalordyesta00000000000000/* * Python object wrapper of libevt_record_t * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyevt_datetime.h" #include "pyevt_error.h" #include "pyevt_integer.h" #include "pyevt_libcerror.h" #include "pyevt_libevt.h" #include "pyevt_python.h" #include "pyevt_record.h" #include "pyevt_strings.h" #include "pyevt_unused.h" PyMethodDef pyevt_record_object_methods[] = { { "get_offset", (PyCFunction) pyevt_record_get_offset, METH_NOARGS, "get_offset() -> Integer or None\n" "\n" "Retrieves the offset." }, { "get_identifier", (PyCFunction) pyevt_record_get_identifier, METH_NOARGS, "get_identifier() -> Integer or None\n" "\n" "Retrieves the identifier." }, { "get_creation_time", (PyCFunction) pyevt_record_get_creation_time, METH_NOARGS, "get_creation_time() -> Datetime or None\n" "\n" "Retrieves the creation time." }, { "get_creation_time_as_integer", (PyCFunction) pyevt_record_get_creation_time_as_integer, METH_NOARGS, "get_creation_time_as_integer() -> Integer or None\n" "\n" "Retrieves the creation time as a 32-bit integer containing a POSIX timestamp value." }, { "get_written_time", (PyCFunction) pyevt_record_get_written_time, METH_NOARGS, "get_written_time() -> Datetime or None\n" "\n" "Retrieves the written time." }, { "get_written_time_as_integer", (PyCFunction) pyevt_record_get_written_time_as_integer, METH_NOARGS, "get_written_time_as_integer() -> Integer or None\n" "\n" "Retrieves the written time as a 32-bit integer containing a POSIX timestamp value." }, { "get_event_identifier", (PyCFunction) pyevt_record_get_event_identifier, METH_NOARGS, "get_event_identifier() -> Integer or None\n" "\n" "Retrieves the event identifier." }, { "get_event_type", (PyCFunction) pyevt_record_get_event_type, METH_NOARGS, "get_event_type() -> Integer or None\n" "\n" "Retrieves the event type." }, { "get_event_category", (PyCFunction) pyevt_record_get_event_category, METH_NOARGS, "get_event_category() -> Integer or None\n" "\n" "Retrieves the event category." }, { "get_source_name", (PyCFunction) pyevt_record_get_source_name, METH_NOARGS, "get_source_name() -> Unicode string or None\n" "\n" "Retrieves the source name." }, { "get_computer_name", (PyCFunction) pyevt_record_get_computer_name, METH_NOARGS, "get_computer_name() -> Unicode string or None\n" "\n" "Retrieves the computer name." }, { "get_user_security_identifier", (PyCFunction) pyevt_record_get_user_security_identifier, METH_NOARGS, "get_user_security_identifier() -> Unicode string or None\n" "\n" "Retrieves the user security identifier." }, { "get_number_of_strings", (PyCFunction) pyevt_record_get_number_of_strings, METH_NOARGS, "get_number_of_strings() -> Integer or None\n" "\n" "Retrieves the number of strings." }, { "get_string", (PyCFunction) pyevt_record_get_string, METH_VARARGS | METH_KEYWORDS, "get_string(string_index) -> Unicode string or None\n" "\n" "Retrieves the string specified by the index." }, { "get_data", (PyCFunction) pyevt_record_get_data, METH_NOARGS, "get_data() -> Binary string or None\n" "\n" "Retrieves the data." }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyGetSetDef pyevt_record_object_get_set_definitions[] = { { "offset", (getter) pyevt_record_get_offset, (setter) 0, "The offset.", NULL }, { "identifier", (getter) pyevt_record_get_identifier, (setter) 0, "The identifier.", NULL }, { "creation_time", (getter) pyevt_record_get_creation_time, (setter) 0, "The creation time.", NULL }, { "written_time", (getter) pyevt_record_get_written_time, (setter) 0, "The written time.", NULL }, { "event_identifier", (getter) pyevt_record_get_event_identifier, (setter) 0, "The event identifier.", NULL }, { "event_type", (getter) pyevt_record_get_event_type, (setter) 0, "The event type.", NULL }, { "event_category", (getter) pyevt_record_get_event_category, (setter) 0, "The event category.", NULL }, { "source_name", (getter) pyevt_record_get_source_name, (setter) 0, "The source name.", NULL }, { "computer_name", (getter) pyevt_record_get_computer_name, (setter) 0, "The computer name.", NULL }, { "user_security_identifier", (getter) pyevt_record_get_user_security_identifier, (setter) 0, "The user security identifier.", NULL }, { "number_of_strings", (getter) pyevt_record_get_number_of_strings, (setter) 0, "The number of strings.", NULL }, { "strings", (getter) pyevt_record_get_strings, (setter) 0, "The strings.", NULL }, { "data", (getter) pyevt_record_get_data, (setter) 0, "The data.", NULL }, /* Sentinel */ { NULL, NULL, NULL, NULL, NULL } }; PyTypeObject pyevt_record_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyevt.record", /* tp_basicsize */ sizeof( pyevt_record_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyevt_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 */ "pyevt record object (wraps libevt_record_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pyevt_record_object_methods, /* tp_members */ 0, /* tp_getset */ pyevt_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) pyevt_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 *pyevt_record_new( PyTypeObject *type_object, libevt_record_t *record, PyObject *parent_object ) { pyevt_record_t *pyevt_record = NULL; static char *function = "pyevt_record_new"; if( record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } pyevt_record = PyObject_New( struct pyevt_record, type_object ); if( pyevt_record == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize record.", function ); goto on_error; } if( pyevt_record_init( pyevt_record ) != 0 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize record.", function ); goto on_error; } pyevt_record->record = record; pyevt_record->parent_object = parent_object; Py_IncRef( (PyObject *) pyevt_record->parent_object ); return( (PyObject *) pyevt_record ); on_error: if( pyevt_record != NULL ) { Py_DecRef( (PyObject *) pyevt_record ); } return( NULL ); } /* Intializes a record object * Returns 0 if successful or -1 on error */ int pyevt_record_init( pyevt_record_t *pyevt_record ) { static char *function = "pyevt_record_init"; if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( -1 ); } /* Make sure libevt record is set to NULL */ pyevt_record->record = NULL; return( 0 ); } /* Frees a record object */ void pyevt_record_free( pyevt_record_t *pyevt_record ) { struct _typeobject *ob_type = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_record_free"; int result = 0; if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return; } if( pyevt_record->record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record - missing libevt record.", function ); return; } ob_type = Py_TYPE( pyevt_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; } Py_BEGIN_ALLOW_THREADS result = libevt_record_free( &( pyevt_record->record ), &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to free libevt record.", function ); libcerror_error_free( &error ); } if( pyevt_record->parent_object != NULL ) { Py_DecRef( (PyObject *) pyevt_record->parent_object ); } ob_type->tp_free( (PyObject*) pyevt_record ); } /* Retrieves the offset * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_offset( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_record_get_offset"; off64_t offset = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_offset( pyevt_record->record, &offset, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve offset.", function ); libcerror_error_free( &error ); return( NULL ); } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } integer_object = pyevt_integer_signed_new_from_64bit( (int64_t) offset ); return( integer_object ); } /* Retrieves the identifier * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_identifier( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_record_get_identifier"; uint32_t value_32bit = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_identifier( pyevt_record->record, &value_32bit, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve identifier.", function ); libcerror_error_free( &error ); return( NULL ); } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } integer_object = PyLong_FromUnsignedLong( (unsigned long) value_32bit ); return( integer_object ); } /* Retrieves the creation time * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_creation_time( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *datetime_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_record_get_creation_time"; uint32_t posix_time = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_creation_time( pyevt_record->record, &posix_time, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve creation time.", function ); libcerror_error_free( &error ); return( NULL ); } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } datetime_object = pyevt_datetime_new_from_posix_time( posix_time ); return( datetime_object ); } /* Retrieves the creation time as an integer * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_creation_time_as_integer( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_record_get_creation_time_as_integer"; uint32_t posix_time = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_creation_time( pyevt_record->record, &posix_time, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve creation time.", function ); libcerror_error_free( &error ); return( NULL ); } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } integer_object = PyLong_FromUnsignedLong( (unsigned long) posix_time ); return( integer_object ); } /* Retrieves the written time * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_written_time( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *datetime_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_record_get_written_time"; uint32_t posix_time = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_written_time( pyevt_record->record, &posix_time, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve written time.", function ); libcerror_error_free( &error ); return( NULL ); } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } datetime_object = pyevt_datetime_new_from_posix_time( posix_time ); return( datetime_object ); } /* Retrieves the written time as an integer * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_written_time_as_integer( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_record_get_written_time_as_integer"; uint32_t posix_time = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_written_time( pyevt_record->record, &posix_time, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve written time.", function ); libcerror_error_free( &error ); return( NULL ); } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } integer_object = PyLong_FromUnsignedLong( (unsigned long) posix_time ); return( integer_object ); } /* Retrieves the event identifier * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_event_identifier( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_record_get_event_identifier"; uint32_t value_32bit = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_event_identifier( pyevt_record->record, &value_32bit, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve event identifier.", function ); libcerror_error_free( &error ); return( NULL ); } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } integer_object = PyLong_FromUnsignedLong( (unsigned long) value_32bit ); return( integer_object ); } /* Retrieves the event type * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_event_type( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_record_get_event_type"; uint16_t event_type = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_event_type( pyevt_record->record, &event_type, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve event type.", function ); libcerror_error_free( &error ); return( NULL ); } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } #if PY_MAJOR_VERSION >= 3 integer_object = PyLong_FromLong( (long) event_type ); #else integer_object = PyInt_FromLong( (long) event_type ); #endif return( integer_object ); } /* Retrieves the event category * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_event_category( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_record_get_event_category"; uint16_t event_category = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_event_category( pyevt_record->record, &event_category, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve event category.", function ); libcerror_error_free( &error ); return( NULL ); } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } #if PY_MAJOR_VERSION >= 3 integer_object = PyLong_FromLong( (long) event_category ); #else integer_object = PyInt_FromLong( (long) event_category ); #endif return( integer_object ); } /* Retrieves the source name * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_source_name( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *string_object = NULL; libcerror_error_t *error = NULL; const char *errors = NULL; static char *function = "pyevt_record_get_source_name"; char *utf8_string = NULL; size_t utf8_string_size = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_utf8_source_name_size( pyevt_record->record, &utf8_string_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to determine size of source 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 = libevt_record_get_utf8_source_name( pyevt_record->record, (uint8_t *) utf8_string, utf8_string_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve source 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, errors ); 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 computer name * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_computer_name( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *string_object = NULL; libcerror_error_t *error = NULL; const char *errors = NULL; static char *function = "pyevt_record_get_computer_name"; char *utf8_string = NULL; size_t utf8_string_size = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_utf8_computer_name_size( pyevt_record->record, &utf8_string_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to determine size of computer 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 = libevt_record_get_utf8_computer_name( pyevt_record->record, (uint8_t *) utf8_string, utf8_string_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve computer 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, errors ); 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 user security identifier * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_user_security_identifier( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *string_object = NULL; libcerror_error_t *error = NULL; const char *errors = NULL; static char *function = "pyevt_record_get_user_security_identifier"; char *utf8_string = NULL; size_t utf8_string_size = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_utf8_user_security_identifier_size( pyevt_record->record, &utf8_string_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to determine size of user security identifier 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 = libevt_record_get_utf8_user_security_identifier( pyevt_record->record, (uint8_t *) utf8_string, utf8_string_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve user security identifier 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, errors ); 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 strings * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_number_of_strings( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_record_get_number_of_strings"; int number_of_strings = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_number_of_strings( pyevt_record->record, &number_of_strings, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of strings.", function ); libcerror_error_free( &error ); return( NULL ); } #if PY_MAJOR_VERSION >= 3 integer_object = PyLong_FromLong( (long) number_of_strings ); #else integer_object = PyInt_FromLong( (long) number_of_strings ); #endif return( integer_object ); } /* Retrieves a specific string by index * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_string_by_index( PyObject *pyevt_record, int string_index ) { PyObject *string_object = NULL; libcerror_error_t *error = NULL; uint8_t *utf8_string = NULL; const char *errors = NULL; static char *function = "pyevt_record_get_string_by_index"; size_t utf8_string_size = 0; int result = 0; if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_utf8_string_size( ( (pyevt_record_t *) pyevt_record )->record, string_index, &utf8_string_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to determine size of string: %d as UTF-8 string.", function, string_index ); libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( utf8_string_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } utf8_string = (uint8_t *) PyMem_Malloc( sizeof( uint8_t ) * 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 = libevt_record_get_utf8_string( ( (pyevt_record_t *) pyevt_record )->record, string_index, utf8_string, utf8_string_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve string: %d as UTF-8 string.", function, string_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 *) utf8_string, (Py_ssize_t) utf8_string_size - 1, errors ); 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 a specific string * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_string( pyevt_record_t *pyevt_record, PyObject *arguments, PyObject *keywords ) { PyObject *string_object = NULL; static char *keyword_list[] = { "string_index", NULL }; int string_index = 0; if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &string_index ) == 0 ) { return( NULL ); } string_object = pyevt_record_get_string_by_index( (PyObject *) pyevt_record, string_index ); return( string_object ); } /* Retrieves a sequence and iterator object for the strings * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_strings( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *sequence_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyevt_record_get_strings"; int number_of_strings = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_number_of_strings( pyevt_record->record, &number_of_strings, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of strings.", function ); libcerror_error_free( &error ); return( NULL ); } sequence_object = pyevt_strings_new( (PyObject *) pyevt_record, &pyevt_record_get_string_by_index, number_of_strings ); if( sequence_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create sequence object.", function ); return( NULL ); } return( sequence_object ); } /* Retrieves the data * Returns a Python object if successful or NULL on error */ PyObject *pyevt_record_get_data( pyevt_record_t *pyevt_record, PyObject *arguments PYEVT_ATTRIBUTE_UNUSED ) { PyObject *bytes_object = NULL; libcerror_error_t *error = NULL; char *data = NULL; static char *function = "pyevt_record_get_data"; size_t data_size = 0; int result = 0; PYEVT_UNREFERENCED_PARAMETER( arguments ) if( pyevt_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_data_size( pyevt_record->record, &data_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyevt_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 ); } data = (char *) PyMem_Malloc( sizeof( char ) * data_size ); if( data == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create data.", function ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libevt_record_get_data( pyevt_record->record, (uint8_t *) data, data_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyevt_error_raise( error, PyExc_IOError, "%s: unable to retrieve data.", function ); libcerror_error_free( &error ); goto on_error; } /* This is a binary string so include the full size */ #if PY_MAJOR_VERSION >= 3 bytes_object = PyBytes_FromStringAndSize( data, (Py_ssize_t) data_size ); #else bytes_object = PyString_FromStringAndSize( data, (Py_ssize_t) data_size ); #endif if( bytes_object == NULL ) { PyErr_Format( PyExc_IOError, "%s: unable to convert data into Bytes object.", function ); goto on_error; } PyMem_Free( data ); return( bytes_object ); on_error: if( data != NULL ) { PyMem_Free( data ); } return( NULL ); } libevt-20170120/pyevt/pyevt_records.c0000664000175000017500000002143313040331673021543 0ustar00lordyestalordyesta00000000000000/* * Python object definition of the sequence and iterator object of records * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyevt_libcerror.h" #include "pyevt_libevt.h" #include "pyevt_python.h" #include "pyevt_record.h" #include "pyevt_records.h" PySequenceMethods pyevt_records_sequence_methods = { /* sq_length */ (lenfunc) pyevt_records_len, /* sq_concat */ 0, /* sq_repeat */ 0, /* sq_item */ (ssizeargfunc) pyevt_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 pyevt_records_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyevt._records", /* tp_basicsize */ sizeof( pyevt_records_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyevt_records_free, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ &pyevt_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 */ "pyevt internal sequence and iterator object of records", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ (getiterfunc) pyevt_records_iter, /* tp_iternext */ (iternextfunc) pyevt_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) pyevt_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 object * Returns a Python object if successful or NULL on error */ PyObject *pyevt_records_new( PyObject *parent_object, PyObject* (*get_item_by_index)( PyObject *parent_object, int index ), int number_of_items ) { pyevt_records_t *records_object = NULL; static char *function = "pyevt_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 */ records_object = PyObject_New( struct pyevt_records, &pyevt_records_type_object ); if( records_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create records object.", function ); goto on_error; } if( pyevt_records_init( records_object ) != 0 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize records object.", function ); goto on_error; } records_object->parent_object = parent_object; records_object->get_item_by_index = get_item_by_index; records_object->number_of_items = number_of_items; Py_IncRef( (PyObject *) records_object->parent_object ); return( (PyObject *) records_object ); on_error: if( records_object != NULL ) { Py_DecRef( (PyObject *) records_object ); } return( NULL ); } /* Intializes a records object * Returns 0 if successful or -1 on error */ int pyevt_records_init( pyevt_records_t *records_object ) { static char *function = "pyevt_records_init"; if( records_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid records object.", function ); return( -1 ); } /* Make sure the records values are initialized */ records_object->parent_object = NULL; records_object->get_item_by_index = NULL; records_object->current_index = 0; records_object->number_of_items = 0; return( 0 ); } /* Frees a records object */ void pyevt_records_free( pyevt_records_t *records_object ) { struct _typeobject *ob_type = NULL; static char *function = "pyevt_records_free"; if( records_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid records object.", function ); return; } ob_type = Py_TYPE( records_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( records_object->parent_object != NULL ) { Py_DecRef( (PyObject *) records_object->parent_object ); } ob_type->tp_free( (PyObject*) records_object ); } /* The records len() function */ Py_ssize_t pyevt_records_len( pyevt_records_t *records_object ) { static char *function = "pyevt_records_len"; if( records_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid records object.", function ); return( -1 ); } return( (Py_ssize_t) records_object->number_of_items ); } /* The records getitem() function */ PyObject *pyevt_records_getitem( pyevt_records_t *records_object, Py_ssize_t item_index ) { PyObject *record_object = NULL; static char *function = "pyevt_records_getitem"; if( records_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid records object.", function ); return( NULL ); } if( records_object->get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid records object - missing get item by index function.", function ); return( NULL ); } if( records_object->number_of_items < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid records object - invalid number of items.", function ); return( NULL ); } if( ( item_index < 0 ) || ( item_index >= (Py_ssize_t) records_object->number_of_items ) ) { PyErr_Format( PyExc_ValueError, "%s: invalid invalid item index value out of bounds.", function ); return( NULL ); } record_object = records_object->get_item_by_index( records_object->parent_object, (int) item_index ); return( record_object ); } /* The records iter() function */ PyObject *pyevt_records_iter( pyevt_records_t *records_object ) { static char *function = "pyevt_records_iter"; if( records_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid records object.", function ); return( NULL ); } Py_IncRef( (PyObject *) records_object ); return( (PyObject *) records_object ); } /* The records iternext() function */ PyObject *pyevt_records_iternext( pyevt_records_t *records_object ) { PyObject *record_object = NULL; static char *function = "pyevt_records_iternext"; if( records_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid records object.", function ); return( NULL ); } if( records_object->get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid records object - missing get item by index function.", function ); return( NULL ); } if( records_object->current_index < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid records object - invalid current index.", function ); return( NULL ); } if( records_object->number_of_items < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid records object - invalid number of items.", function ); return( NULL ); } if( records_object->current_index >= records_object->number_of_items ) { PyErr_SetNone( PyExc_StopIteration ); return( NULL ); } record_object = records_object->get_item_by_index( records_object->parent_object, records_object->current_index ); if( record_object != NULL ) { records_object->current_index++; } return( record_object ); } libevt-20170120/pyevt/pyevt_error.c0000664000175000017500000002235113040331673021233 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #include #elif defined( HAVE_VARARGS_H ) #include #else #error Missing headers stdarg.h and varargs.h #endif #include "pyevt_error.h" #include "pyevt_libcerror.h" #include "pyevt_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( pyevt_error_fetch, libcerror_error_t **error, int error_domain, int error_code, const char *, format_string ) { va_list argument_list; char error_string[ PYEVT_ERROR_STRING_SIZE ]; PyObject *exception_traceback = NULL; PyObject *exception_type = NULL; PyObject *exception_value = NULL; PyObject *string_object = NULL; static char *function = "pyevt_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, PYEVT_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( pyevt_error_fetch_and_raise, PyObject *exception_object, const char *, format_string ) { va_list argument_list; char error_string[ PYEVT_ERROR_STRING_SIZE ]; PyObject *exception_traceback = NULL; PyObject *exception_type = NULL; PyObject *exception_value = NULL; PyObject *string_object = NULL; static char *function = "pyevt_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, PYEVT_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( pyevt_error_raise, libcerror_error_t *error, PyObject *exception_object, const char *, format_string ) { va_list argument_list; char error_string[ PYEVT_ERROR_STRING_SIZE ]; char exception_string[ PYEVT_ERROR_STRING_SIZE ]; static char *function = "pyevt_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, PYEVT_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, PYEVT_ERROR_STRING_SIZE ) != -1 ) { while( error_string_index < PYEVT_ERROR_STRING_SIZE ) { if( error_string[ error_string_index ] == 0 ) { break; } if( error_string[ error_string_index ] == '\n' ) { error_string[ error_string_index ] = ' '; } error_string_index++; } if( error_string_index >= PYEVT_ERROR_STRING_SIZE ) { error_string[ PYEVT_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 libevt-20170120/pyevt/pyevt_datetime.h0000664000175000017500000000257213040331673021706 0ustar00lordyestalordyesta00000000000000/* * Date and time functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_DATETIME_H ) #define _PYEVT_DATETIME_H #include #include #include "pyevt_python.h" #if defined( __cplusplus ) extern "C" { #endif PyObject *pyevt_datetime_new_from_fat_date_time( uint32_t fat_date_time ); PyObject *pyevt_datetime_new_from_filetime( uint64_t filetime ); PyObject *pyevt_datetime_new_from_floatingtime( uint64_t floatingtime ); PyObject *pyevt_datetime_new_from_posix_time( uint32_t posix_time ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYEVT_DATETIME_H ) */ libevt-20170120/pyevt/pyevt_records.h0000664000175000017500000000443413040331673021552 0ustar00lordyestalordyesta00000000000000/* * Python object definition of the sequence and iterator object of records * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_RECORDS_H ) #define _PYEVT_RECORDS_H #include #include #include "pyevt_libevt.h" #include "pyevt_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyevt_records pyevt_records_t; struct pyevt_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 pyevt_records_type_object; PyObject *pyevt_records_new( PyObject *parent_object, PyObject* (*get_item_by_index)( PyObject *parent_object, int index ), int number_of_items ); int pyevt_records_init( pyevt_records_t *records_object ); void pyevt_records_free( pyevt_records_t *records_object ); Py_ssize_t pyevt_records_len( pyevt_records_t *records_object ); PyObject *pyevt_records_getitem( pyevt_records_t *records_object, Py_ssize_t item_index ); PyObject *pyevt_records_iter( pyevt_records_t *records_object ); PyObject *pyevt_records_iternext( pyevt_records_t *records_object ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYEVT_RECORDS_H ) */ libevt-20170120/pyevt/pyevt_libclocale.h0000664000175000017500000000265513040331673022205 0ustar00lordyestalordyesta00000000000000/* * The internal libclocale header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_LIBCLOCALE_H ) #define _PYEVT_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( _PYEVT_LIBCLOCALE_H ) */ libevt-20170120/pyevt/Makefile.in0000664000175000017500000014147113040342660020557 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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 = pyevt ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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@pyevt_la_DEPENDENCIES = ../libevt/libevt.la am__pyevt_la_SOURCES_DIST = pyevt.c pyevt.h pyevt_codepage.c \ pyevt_codepage.h pyevt_datetime.c pyevt_datetime.h \ pyevt_error.c pyevt_error.h pyevt_event_types.c \ pyevt_event_types.h pyevt_file.c pyevt_file.h \ pyevt_file_flags.c pyevt_file_flags.h \ pyevt_file_object_io_handle.c pyevt_file_object_io_handle.h \ pyevt_integer.c pyevt_integer.h pyevt_libbfio.h \ pyevt_libcerror.h pyevt_libclocale.h pyevt_libevt.h \ pyevt_python.h pyevt_record.c pyevt_record.h pyevt_records.c \ pyevt_records.h pyevt_strings.c pyevt_strings.h pyevt_unused.h @HAVE_PYTHON_TRUE@am_pyevt_la_OBJECTS = pyevt_la-pyevt.lo \ @HAVE_PYTHON_TRUE@ pyevt_la-pyevt_codepage.lo \ @HAVE_PYTHON_TRUE@ pyevt_la-pyevt_datetime.lo \ @HAVE_PYTHON_TRUE@ pyevt_la-pyevt_error.lo \ @HAVE_PYTHON_TRUE@ pyevt_la-pyevt_event_types.lo \ @HAVE_PYTHON_TRUE@ pyevt_la-pyevt_file.lo \ @HAVE_PYTHON_TRUE@ pyevt_la-pyevt_file_flags.lo \ @HAVE_PYTHON_TRUE@ pyevt_la-pyevt_file_object_io_handle.lo \ @HAVE_PYTHON_TRUE@ pyevt_la-pyevt_integer.lo \ @HAVE_PYTHON_TRUE@ pyevt_la-pyevt_record.lo \ @HAVE_PYTHON_TRUE@ pyevt_la-pyevt_records.lo \ @HAVE_PYTHON_TRUE@ pyevt_la-pyevt_strings.lo pyevt_la_OBJECTS = $(am_pyevt_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 = pyevt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(pyevt_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_PYTHON_TRUE@am_pyevt_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__depfiles_maybe = depfiles 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 = $(pyevt_la_SOURCES) DIST_SOURCES = $(am__pyevt_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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_PYTHON_TRUE@AM_CFLAGS = \ @HAVE_PYTHON_TRUE@ -I$(top_srcdir)/include \ @HAVE_PYTHON_TRUE@ -I$(top_srcdir)/common \ @HAVE_PYTHON_TRUE@ @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@pyexec_LTLIBRARIES = pyevt.la @HAVE_PYTHON_TRUE@pyevt_la_SOURCES = \ @HAVE_PYTHON_TRUE@ pyevt.c pyevt.h \ @HAVE_PYTHON_TRUE@ pyevt_codepage.c pyevt_codepage.h \ @HAVE_PYTHON_TRUE@ pyevt_datetime.c pyevt_datetime.h \ @HAVE_PYTHON_TRUE@ pyevt_error.c pyevt_error.h \ @HAVE_PYTHON_TRUE@ pyevt_event_types.c pyevt_event_types.h \ @HAVE_PYTHON_TRUE@ pyevt_file.c pyevt_file.h \ @HAVE_PYTHON_TRUE@ pyevt_file_flags.c pyevt_file_flags.h \ @HAVE_PYTHON_TRUE@ pyevt_file_object_io_handle.c pyevt_file_object_io_handle.h \ @HAVE_PYTHON_TRUE@ pyevt_integer.c pyevt_integer.h \ @HAVE_PYTHON_TRUE@ pyevt_libbfio.h \ @HAVE_PYTHON_TRUE@ pyevt_libcerror.h \ @HAVE_PYTHON_TRUE@ pyevt_libclocale.h \ @HAVE_PYTHON_TRUE@ pyevt_libevt.h \ @HAVE_PYTHON_TRUE@ pyevt_python.h \ @HAVE_PYTHON_TRUE@ pyevt_record.c pyevt_record.h \ @HAVE_PYTHON_TRUE@ pyevt_records.c pyevt_records.h \ @HAVE_PYTHON_TRUE@ pyevt_strings.c pyevt_strings.h \ @HAVE_PYTHON_TRUE@ pyevt_unused.h @HAVE_PYTHON_TRUE@pyevt_la_LIBADD = \ @HAVE_PYTHON_TRUE@ @LIBCERROR_LIBADD@ \ @HAVE_PYTHON_TRUE@ ../libevt/libevt.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@pyevt_la_CPPFLAGS = $(PYTHON_CPPFLAGS) @HAVE_PYTHON_TRUE@pyevt_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pyevt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pyevt/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) @$(NORMAL_INSTALL) @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}; \ } pyevt.la: $(pyevt_la_OBJECTS) $(pyevt_la_DEPENDENCIES) $(EXTRA_pyevt_la_DEPENDENCIES) $(AM_V_CCLD)$(pyevt_la_LINK) $(am_pyevt_la_rpath) $(pyevt_la_OBJECTS) $(pyevt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_codepage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_datetime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_event_types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_file_flags.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_file_object_io_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_integer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_record.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_records.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_strings.Plo@am__quote@ .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 $@ $< pyevt_la-pyevt.lo: pyevt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt.Tpo -c -o pyevt_la-pyevt.lo `test -f 'pyevt.c' || echo '$(srcdir)/'`pyevt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt.Tpo $(DEPDIR)/pyevt_la-pyevt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt.c' object='pyevt_la-pyevt.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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt.lo `test -f 'pyevt.c' || echo '$(srcdir)/'`pyevt.c pyevt_la-pyevt_codepage.lo: pyevt_codepage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_codepage.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_codepage.Tpo -c -o pyevt_la-pyevt_codepage.lo `test -f 'pyevt_codepage.c' || echo '$(srcdir)/'`pyevt_codepage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_codepage.Tpo $(DEPDIR)/pyevt_la-pyevt_codepage.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_codepage.c' object='pyevt_la-pyevt_codepage.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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_codepage.lo `test -f 'pyevt_codepage.c' || echo '$(srcdir)/'`pyevt_codepage.c pyevt_la-pyevt_datetime.lo: pyevt_datetime.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_datetime.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_datetime.Tpo -c -o pyevt_la-pyevt_datetime.lo `test -f 'pyevt_datetime.c' || echo '$(srcdir)/'`pyevt_datetime.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_datetime.Tpo $(DEPDIR)/pyevt_la-pyevt_datetime.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_datetime.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_datetime.lo `test -f 'pyevt_datetime.c' || echo '$(srcdir)/'`pyevt_datetime.c pyevt_la-pyevt_error.lo: pyevt_error.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_error.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_error.Tpo -c -o pyevt_la-pyevt_error.lo `test -f 'pyevt_error.c' || echo '$(srcdir)/'`pyevt_error.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_error.Tpo $(DEPDIR)/pyevt_la-pyevt_error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_error.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_error.lo `test -f 'pyevt_error.c' || echo '$(srcdir)/'`pyevt_error.c pyevt_la-pyevt_event_types.lo: pyevt_event_types.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_event_types.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_event_types.Tpo -c -o pyevt_la-pyevt_event_types.lo `test -f 'pyevt_event_types.c' || echo '$(srcdir)/'`pyevt_event_types.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_event_types.Tpo $(DEPDIR)/pyevt_la-pyevt_event_types.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_event_types.c' object='pyevt_la-pyevt_event_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_event_types.lo `test -f 'pyevt_event_types.c' || echo '$(srcdir)/'`pyevt_event_types.c pyevt_la-pyevt_file.lo: pyevt_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_file.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_file.Tpo -c -o pyevt_la-pyevt_file.lo `test -f 'pyevt_file.c' || echo '$(srcdir)/'`pyevt_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_file.Tpo $(DEPDIR)/pyevt_la-pyevt_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_file.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_file.lo `test -f 'pyevt_file.c' || echo '$(srcdir)/'`pyevt_file.c pyevt_la-pyevt_file_flags.lo: pyevt_file_flags.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_file_flags.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_file_flags.Tpo -c -o pyevt_la-pyevt_file_flags.lo `test -f 'pyevt_file_flags.c' || echo '$(srcdir)/'`pyevt_file_flags.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_file_flags.Tpo $(DEPDIR)/pyevt_la-pyevt_file_flags.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_file_flags.c' object='pyevt_la-pyevt_file_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_file_flags.lo `test -f 'pyevt_file_flags.c' || echo '$(srcdir)/'`pyevt_file_flags.c pyevt_la-pyevt_file_object_io_handle.lo: pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_file_object_io_handle.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_file_object_io_handle.Tpo -c -o pyevt_la-pyevt_file_object_io_handle.lo `test -f 'pyevt_file_object_io_handle.c' || echo '$(srcdir)/'`pyevt_file_object_io_handle.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_file_object_io_handle.Tpo $(DEPDIR)/pyevt_la-pyevt_file_object_io_handle.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_file_object_io_handle.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_file_object_io_handle.lo `test -f 'pyevt_file_object_io_handle.c' || echo '$(srcdir)/'`pyevt_file_object_io_handle.c pyevt_la-pyevt_integer.lo: pyevt_integer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_integer.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_integer.Tpo -c -o pyevt_la-pyevt_integer.lo `test -f 'pyevt_integer.c' || echo '$(srcdir)/'`pyevt_integer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_integer.Tpo $(DEPDIR)/pyevt_la-pyevt_integer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_integer.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_integer.lo `test -f 'pyevt_integer.c' || echo '$(srcdir)/'`pyevt_integer.c pyevt_la-pyevt_record.lo: pyevt_record.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_record.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_record.Tpo -c -o pyevt_la-pyevt_record.lo `test -f 'pyevt_record.c' || echo '$(srcdir)/'`pyevt_record.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_record.Tpo $(DEPDIR)/pyevt_la-pyevt_record.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_record.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_record.lo `test -f 'pyevt_record.c' || echo '$(srcdir)/'`pyevt_record.c pyevt_la-pyevt_records.lo: pyevt_records.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_records.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_records.Tpo -c -o pyevt_la-pyevt_records.lo `test -f 'pyevt_records.c' || echo '$(srcdir)/'`pyevt_records.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_records.Tpo $(DEPDIR)/pyevt_la-pyevt_records.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_records.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_records.lo `test -f 'pyevt_records.c' || echo '$(srcdir)/'`pyevt_records.c pyevt_la-pyevt_strings.lo: pyevt_strings.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_strings.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_strings.Tpo -c -o pyevt_la-pyevt_strings.lo `test -f 'pyevt_strings.c' || echo '$(srcdir)/'`pyevt_strings.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_strings.Tpo $(DEPDIR)/pyevt_la-pyevt_strings.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_strings.c' object='pyevt_la-pyevt_strings.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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_strings.lo `test -f 'pyevt_strings.c' || echo '$(srcdir)/'`pyevt_strings.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pyexecLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-pyexecLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pyexecLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 tags tags-am uninstall uninstall-am \ uninstall-pyexecLTLIBRARIES .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/pyevt/pyevt_integer.c0000664000175000017500000002121013040331673021530 0ustar00lordyestalordyesta00000000000000/* * Integer functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "pyevt_error.h" #include "pyevt_libcerror.h" #include "pyevt_integer.h" #include "pyevt_python.h" /* Creates a new signed integer object from a 64-bit value * Returns a Python object if successful or NULL on error */ PyObject *pyevt_integer_signed_new_from_64bit( int64_t value_64bit ) { PyObject *integer_object = NULL; static char *function = "pyevt_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 *pyevt_integer_unsigned_new_from_64bit( uint64_t value_64bit ) { PyObject *integer_object = NULL; static char *function = "pyevt_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 pyevt_integer_signed_copy_to_64bit( PyObject *integer_object, int64_t *value_64bit, libcerror_error_t **error ) { static char *function = "pyevt_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 ) { pyevt_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 ) { pyevt_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() ) { pyevt_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 pyevt_integer_unsigned_copy_to_64bit( PyObject *integer_object, uint64_t *value_64bit, libcerror_error_t **error ) { static char *function = "pyevt_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 ) { pyevt_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 ) { pyevt_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() ) { pyevt_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 ); } libevt-20170120/pyevt/pyevt_record.h0000664000175000017500000000722713040333047021367 0ustar00lordyestalordyesta00000000000000/* * Python object wrapper of libevt_record_t * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_RECORD_H ) #define _PYEVT_RECORD_H #include #include #include "pyevt_libevt.h" #include "pyevt_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyevt_record pyevt_record_t; struct pyevt_record { /* Python object initialization */ PyObject_HEAD /* The libevt record */ libevt_record_t *record; /* The parent object */ PyObject *parent_object; }; extern PyMethodDef pyevt_record_object_methods[]; extern PyTypeObject pyevt_record_type_object; PyObject *pyevt_record_new( PyTypeObject *type_object, libevt_record_t *record, PyObject *parent_object ); int pyevt_record_init( pyevt_record_t *pyevt_record ); void pyevt_record_free( pyevt_record_t *pyevt_record ); PyObject *pyevt_record_get_offset( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_identifier( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_creation_time( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_creation_time_as_integer( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_written_time( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_written_time_as_integer( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_event_identifier( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_event_type( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_event_category( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_source_name( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_computer_name( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_user_security_identifier( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_number_of_strings( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_string_by_index( PyObject *pyevt_record, int string_index ); PyObject *pyevt_record_get_string( pyevt_record_t *pyevt_record, PyObject *arguments, PyObject *keywords ); PyObject *pyevt_record_get_strings( pyevt_record_t *pyevt_record, PyObject *arguments ); PyObject *pyevt_record_get_data( pyevt_record_t *pyevt_record, PyObject *arguments ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYEVT_RECORD_H ) */ libevt-20170120/pyevt/pyevt_python.h0000664000175000017500000000345313040331673021432 0ustar00lordyestalordyesta00000000000000/* * The python header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_PYTHON_H ) #define _PYEVT_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 */ #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( _PYEVT_PYTHON_H ) */ libevt-20170120/pyevt/pyevt_file_object_io_handle.c0000664000175000017500000010164313040331673024353 0ustar00lordyestalordyesta00000000000000/* * Python file object IO handle functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "pyevt_error.h" #include "pyevt_file_object_io_handle.h" #include "pyevt_integer.h" #include "pyevt_libbfio.h" #include "pyevt_libcerror.h" #include "pyevt_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 pyevt_file_object_io_handle_initialize( pyevt_file_object_io_handle_t **file_object_io_handle, PyObject *file_object, libcerror_error_t **error ) { static char *function = "pyevt_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 = (pyevt_file_object_io_handle_t *) PyMem_Malloc( sizeof( pyevt_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( pyevt_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 pyevt_file_object_initialize( libbfio_handle_t **handle, PyObject *file_object, libcerror_error_t **error ) { pyevt_file_object_io_handle_t *file_object_io_handle = NULL; static char *function = "pyevt_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( pyevt_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 **)) pyevt_file_object_io_handle_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) pyevt_file_object_io_handle_clone, (int (*)(intptr_t *, int, libcerror_error_t **)) pyevt_file_object_io_handle_open, (int (*)(intptr_t *, libcerror_error_t **)) pyevt_file_object_io_handle_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) pyevt_file_object_io_handle_read, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) pyevt_file_object_io_handle_write, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) pyevt_file_object_io_handle_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) pyevt_file_object_io_handle_exists, (int (*)(intptr_t *, libcerror_error_t **)) pyevt_file_object_io_handle_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) pyevt_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 ) { pyevt_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 pyevt_file_object_io_handle_free( pyevt_file_object_io_handle_t **file_object_io_handle, libcerror_error_t **error ) { static char *function = "pyevt_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 ); PyGILState_Release( gil_state ); PyMem_Free( *file_object_io_handle ); *file_object_io_handle = NULL; } return( 1 ); } /* Clones (duplicates) the file object IO handle and its attributes * Returns 1 if succesful or -1 on error */ int pyevt_file_object_io_handle_clone( pyevt_file_object_io_handle_t **destination_file_object_io_handle, pyevt_file_object_io_handle_t *source_file_object_io_handle, libcerror_error_t **error ) { static char *function = "pyevt_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( pyevt_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 pyevt_file_object_io_handle_open( pyevt_file_object_io_handle_t *file_object_io_handle, int access_flags, libcerror_error_t **error ) { static char *function = "pyevt_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 pyevt_file_object_io_handle_close( pyevt_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ) { static char *function = "pyevt_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 pyevt_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 = "pyevt_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() ) { pyevt_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 ) { pyevt_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 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 pyevt_file_object_io_handle_read( pyevt_file_object_io_handle_t *file_object_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "pyevt_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 = pyevt_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 pyevt_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 = "pyevt_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() ) { pyevt_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 pyevt_file_object_io_handle_write( pyevt_file_object_io_handle_t *file_object_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "pyevt_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 = pyevt_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 pyevt_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 = "pyevt_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() ) { pyevt_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 pyevt_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 = "pyevt_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() ) { pyevt_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( pyevt_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 pyevt_file_object_io_handle_seek_offset( pyevt_file_object_io_handle_t *file_object_io_handle, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "pyevt_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( pyevt_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( pyevt_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 pyevt_file_object_io_handle_exists( pyevt_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ) { static char *function = "pyevt_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 pyevt_file_object_io_handle_is_open( pyevt_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ) { static char *function = "pyevt_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 pyevt_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 = "pyevt_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() ) { pyevt_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( pyevt_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 pyevt_file_object_io_handle_get_size( pyevt_file_object_io_handle_t *file_object_io_handle, size64_t *size, libcerror_error_t **error ) { PyObject *method_name = NULL; static char *function = "pyevt_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( pyevt_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( pyevt_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( pyevt_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( pyevt_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 ); pyevt_file_object_seek_offset( file_object_io_handle->file_object, current_offset, SEEK_SET, NULL ); goto on_error; } if( pyevt_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 ); } libevt-20170120/pyevt/pyevt_error.h0000664000175000017500000000276413040331673021246 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_ERROR_H ) #define _PYEVT_ERROR_H #include #include #include "pyevt_libcerror.h" #include "pyevt_python.h" #define PYEVT_ERROR_STRING_SIZE 2048 #if defined( __cplusplus ) extern "C" { #endif void pyevt_error_fetch( libcerror_error_t **error, int error_domain, int error_code, const char *format_string, ... ); void pyevt_error_fetch_and_raise( PyObject *exception_object, const char *format_string, ... ); void pyevt_error_raise( libcerror_error_t *error, PyObject *exception_object, const char *format_string, ... ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYEVT_ERROR_H ) */ libevt-20170120/pyevt/pyevt_libevt.h0000664000175000017500000000212113040331673021365 0ustar00lordyestalordyesta00000000000000/* * The internal libevt header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_LIBEVT_H ) #define _PYEVT_LIBEVT_H #include /* If Cygwin libtool DLL support is enabled set LIBEVT_DLL_IMPORT * before including libevt.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBEVT_DLL_IMPORT #endif #include #endif libevt-20170120/pyevt/pyevt_libbfio.h0000664000175000017500000000276113040331673021520 0ustar00lordyestalordyesta00000000000000/* * The libbfio header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYEVT_LIBBFIO_H ) #define _PYEVT_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( _PYEVT_LIBBFIO_H ) */ libevt-20170120/libfwevt/0000775000175000017500000000000013040343017017152 5ustar00lordyestalordyesta00000000000000libevt-20170120/libfwevt/libfwevt_provider.c0000664000175000017500000027115313040331702023061 0ustar00lordyestalordyesta00000000000000/* * Provider functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfwevt_channel.h" #include "libfwevt_event.h" #include "libfwevt_keyword.h" #include "libfwevt_level.h" #include "libfwevt_libcdata.h" #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_libfguid.h" #include "libfwevt_libuna.h" #include "libfwevt_map.h" #include "libfwevt_opcode.h" #include "libfwevt_provider.h" #include "libfwevt_task.h" #include "libfwevt_template.h" #include "libfwevt_types.h" #include "fwevt_template.h" /* Creates a provider * Make sure the value provider is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_provider_initialize( libfwevt_provider_t **provider, const uint8_t *identifier, size_t identifier_size, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_initialize"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } if( *provider != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid provider value 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 != 16 ) { 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 ); } internal_provider = memory_allocate_structure( libfwevt_internal_provider_t ); if( internal_provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create provider.", function ); goto on_error; } if( memory_set( internal_provider, 0, sizeof( libfwevt_internal_provider_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear provider.", function ); goto on_error; } if( memory_copy( internal_provider->identifier, identifier, 16 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy identifier.", function ); goto on_error; } *provider = (libfwevt_provider_t *) internal_provider; return( 1 ); on_error: if( internal_provider != NULL ) { memory_free( internal_provider ); } return( -1 ); } /* Frees a provider * Returns 1 if successful or -1 on error */ int libfwevt_provider_free( libfwevt_provider_t **provider, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_free"; int result = 1; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } if( *provider != NULL ) { internal_provider = (libfwevt_internal_provider_t *) *provider; *provider = NULL; if( internal_provider->channels_array != NULL ) { if( libcdata_array_free( &( internal_provider->channels_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_channel_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free channels array.", function ); result = -1; } } if( internal_provider->events_array != NULL ) { if( libcdata_array_free( &( internal_provider->events_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_event_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free events array.", function ); result = -1; } } if( internal_provider->keywords_array != NULL ) { if( libcdata_array_free( &( internal_provider->keywords_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_keyword_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free keywords array.", function ); result = -1; } } if( internal_provider->levels_array != NULL ) { if( libcdata_array_free( &( internal_provider->levels_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_level_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free levels array.", function ); result = -1; } } if( internal_provider->maps_array != NULL ) { if( libcdata_array_free( &( internal_provider->maps_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_map_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free maps array.", function ); result = -1; } } if( internal_provider->opcodes_array != NULL ) { if( libcdata_array_free( &( internal_provider->opcodes_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_opcode_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free opcodes array.", function ); result = -1; } } if( internal_provider->tasks_array != NULL ) { if( libcdata_array_free( &( internal_provider->tasks_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_task_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free tasks array.", function ); result = -1; } } if( internal_provider->templates_array != NULL ) { if( libcdata_array_free( &( internal_provider->templates_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_template_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free templates array.", function ); result = -1; } } memory_free( internal_provider ); } return( result ); } /* Reads the provider * Returns 1 if successful or -1 on error */ int libfwevt_provider_read( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; fwevt_template_provider_t *wevt_provider = NULL; static char *function = "libfwevt_provider_read"; uint32_t descriptor_index = 0; uint32_t descriptor_offset = 0; uint32_t descriptor_type = 0; uint32_t number_of_descriptors = 0; uint32_t number_of_unknown2 = 0; uint32_t unknown2_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; #endif if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; 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_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( data_offset + sizeof( fwevt_template_provider_t ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } wevt_provider = (fwevt_template_provider_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading event provider data at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, data_offset, data_offset ); libcnotify_printf( "%s: event provider data:\n", function ); libcnotify_print_data( (uint8_t *) wevt_provider, sizeof( fwevt_template_provider_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( wevt_provider->number_of_descriptors, number_of_descriptors ); byte_stream_copy_to_uint32_little_endian( wevt_provider->number_of_unknown2, number_of_unknown2 ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t\t: %c%c%c%c\n", function, wevt_provider->signature[ 0 ], wevt_provider->signature[ 1 ], wevt_provider->signature[ 2 ], wevt_provider->signature[ 3 ] ); byte_stream_copy_to_uint32_little_endian( wevt_provider->size, value_32bit ); libcnotify_printf( "%s: size\t\t\t\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( wevt_provider->message_identifier, value_32bit ); libcnotify_printf( "%s: message identifier\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: number of descriptors\t\t\t\t: %" PRIu32 "\n", function, number_of_descriptors ); libcnotify_printf( "%s: number of unknown2\t\t\t\t: %" PRIu32 "\n", function, number_of_unknown2 ); libcnotify_printf( "\n" ); } #endif data_offset += sizeof( fwevt_template_provider_t ); if( memory_compare( wevt_provider->signature, "WEVT", 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported event provider signature.", function ); return( -1 ); } if( ( data_offset + ( number_of_descriptors * 8 ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } for( descriptor_index = 0; descriptor_index < number_of_descriptors; descriptor_index++ ) { byte_stream_copy_to_uint32_little_endian( &( data[ data_offset ] ), descriptor_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: descriptor: %02" PRIu32 " offset\t\t\t\t: 0x%08" PRIx32 "\n", function, descriptor_index, descriptor_offset ); byte_stream_copy_to_uint32_little_endian( &( data[ data_offset + 4 ] ), value_32bit ); libcnotify_printf( "%s: descriptor: %02" PRIu32 " unknown1\t\t\t\t: %" PRIu32 "\n", function, descriptor_index, value_32bit ); libcnotify_printf( "%s: descriptor: %02" PRIu32 " type\t\t\t\t: %c%c%c%c\n", function, descriptor_index, data[ descriptor_offset ], data[ descriptor_offset + 1 ], data[ descriptor_offset + 2 ], data[ descriptor_offset + 3 ] ); } #endif byte_stream_copy_to_uint32_big_endian( &( data[ descriptor_offset ] ), descriptor_type ); data_offset += 8; switch( descriptor_type ) { /* CHAN */ case 0x4348414e: internal_provider->channels_offset = descriptor_offset; break; /* EVTN */ case 0x45564e54: internal_provider->events_offset = descriptor_offset; break; /* KEYW */ case 0x4b455957: internal_provider->keywords_offset = descriptor_offset; break; /* LEVL */ case 0x4c45564c: internal_provider->levels_offset = descriptor_offset; break; /* MAPS */ case 0x4d415053: internal_provider->maps_offset = descriptor_offset; break; /* TASK */ case 0x5441534b: internal_provider->tasks_offset = descriptor_offset; break; /* TTBL */ case 0x5454424c: internal_provider->templates_offset = descriptor_offset; break; /* OPCO */ case 0x4f50434f: internal_provider->opcodes_offset = descriptor_offset; break; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( number_of_descriptors > 0 ) { libcnotify_printf( "\n" ); } } #endif if( ( data_offset + ( number_of_unknown2 * 4 ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } for( unknown2_index = 0; unknown2_index < number_of_unknown2; unknown2_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint32_little_endian( &( data[ data_offset ] ), value_32bit ); libcnotify_printf( "%s: unknown2: %02" PRIu32 " value\t\t\t\t: 0x%08" PRIx32 "\n", function, unknown2_index, value_32bit ); } #endif data_offset += 4; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( number_of_unknown2 > 0 ) { libcnotify_printf( "\n" ); } } #endif return( 1 ); } /* Reads the provider channels * Returns 1 if successful or -1 on error */ int libfwevt_provider_read_channels( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; libfwevt_channel_t *channel = NULL; fwevt_template_channels_t *wevt_channels = NULL; static char *function = "libfwevt_provider_read_channels"; size_t data_offset = 0; uint32_t channel_index = 0; uint32_t channels_data_size = 0; uint32_t number_of_channels = 0; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( internal_provider->channels_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid provider - channels array value 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) 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( (size_t) internal_provider->channels_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( (size_t) internal_provider->channels_offset + sizeof( fwevt_template_channels_t ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } if( internal_provider->channels_offset == 0 ) { return( 1 ); } data_offset = (size_t) internal_provider->channels_offset; wevt_channels = (fwevt_template_channels_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading channels data at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, data_offset, data_offset ); libcnotify_printf( "%s: channels data:\n", function ); libcnotify_print_data( (uint8_t *) wevt_channels, sizeof( fwevt_template_channels_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( wevt_channels->size, channels_data_size ); byte_stream_copy_to_uint32_little_endian( wevt_channels->number_of_channels, number_of_channels ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c%c%c\n", function, wevt_channels->signature[ 0 ], wevt_channels->signature[ 1 ], wevt_channels->signature[ 2 ], wevt_channels->signature[ 3 ] ); libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu32 "\n", function, channels_data_size ); libcnotify_printf( "%s: number of channels\t\t\t: %" PRIu32 "\n", function, number_of_channels ); libcnotify_printf( "\n" ); } #endif data_offset += sizeof( fwevt_template_channels_t ); if( memory_compare( wevt_channels->signature, "CHAN", 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported channels signature.", function ); goto on_error; } if( ( data_offset + ( number_of_channels * sizeof( fwevt_template_channel_t ) ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); goto on_error; } if( libcdata_array_initialize( &( internal_provider->channels_array ), (int) number_of_channels, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create channels array.", function ); goto on_error; } if( channels_data_size > 0 ) { if( ( channels_data_size < sizeof( fwevt_template_channels_t ) ) || ( channels_data_size >= data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid channels data size value out of bounds.", function ); goto on_error; } channels_data_size -= sizeof( fwevt_template_channels_t ); } for( channel_index = 0; channel_index < number_of_channels; channel_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading channel: %03" PRIu32 " at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, channel_index, data_offset, data_offset ); } #endif if( libfwevt_channel_initialize( &channel, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create channel: %" PRIu32 ".", function, channel_index ); goto on_error; } if( libfwevt_channel_read( channel, data, data_size, data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read channel: %" PRIu32 ".", function, channel_index ); goto on_error; } if( channels_data_size < sizeof( fwevt_template_channel_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid channels data size value out of bounds.", function ); goto on_error; } data_offset += sizeof( fwevt_template_channel_t ); channels_data_size -= sizeof( fwevt_template_channel_t ); if( libcdata_array_set_entry_by_index( internal_provider->channels_array, (int) channel_index, (intptr_t *) channel, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set channel: %" PRIu32 " to array.", function, channel_index ); goto on_error; } channel = NULL; } /* TODO count data size ? #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( channels_data_size > 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( data[ data_offset ] ), channels_data_size, 0 ); } } #endif */ return( 1 ); on_error: if( channel != NULL ) { libfwevt_channel_free( &channel, NULL ); } if( internal_provider->channels_array != NULL ) { libcdata_array_free( &( internal_provider->channels_array ), NULL, NULL ); } return( -1 ); } /* Reads the provider events * Returns 1 if successful or -1 on error */ int libfwevt_provider_read_events( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; libfwevt_event_t *event = NULL; fwevt_template_events_t *wevt_events = NULL; static char *function = "libfwevt_provider_read_events"; size_t data_offset = 0; uint32_t event_index = 0; uint32_t events_data_size = 0; uint32_t number_of_events = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; #endif if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( internal_provider->events_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid provider - events array value 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) 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( (size_t) internal_provider->events_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( (size_t) internal_provider->events_offset + sizeof( fwevt_template_events_t ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } if( internal_provider->events_offset == 0 ) { return( 1 ); } data_offset = (size_t) internal_provider->events_offset; wevt_events = (fwevt_template_events_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading events data at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, data_offset, data_offset ); libcnotify_printf( "%s: events data:\n", function ); libcnotify_print_data( (uint8_t *) wevt_events, sizeof( fwevt_template_events_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( wevt_events->size, events_data_size ); byte_stream_copy_to_uint32_little_endian( wevt_events->number_of_events, number_of_events ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c%c%c\n", function, wevt_events->signature[ 0 ], wevt_events->signature[ 1 ], wevt_events->signature[ 2 ], wevt_events->signature[ 3 ] ); libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu32 "\n", function, events_data_size ); libcnotify_printf( "%s: number of events\t\t\t\t: %" PRIu32 "\n", function, number_of_events ); byte_stream_copy_to_uint32_little_endian( wevt_events->unknown1, value_32bit ); libcnotify_printf( "%s: unknown1\t\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "\n" ); } #endif data_offset += sizeof( fwevt_template_events_t ); if( memory_compare( wevt_events->signature, "EVNT", 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported events signature.", function ); goto on_error; } if( ( data_offset + ( number_of_events * sizeof( fwevt_template_event_t ) ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); goto on_error; } if( libcdata_array_initialize( &( internal_provider->events_array ), (int) number_of_events, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create events array.", function ); goto on_error; } if( events_data_size > 0 ) { if( ( events_data_size < sizeof( fwevt_template_events_t ) ) || ( events_data_size >= data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid events data size value out of bounds.", function ); goto on_error; } events_data_size -= sizeof( fwevt_template_events_t ); } for( event_index = 0; event_index < number_of_events; event_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading event: %03" PRIu32 " at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, event_index, data_offset, data_offset ); } #endif if( libfwevt_event_initialize( &event, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create event: %" PRIu32 ".", function, event_index ); goto on_error; } if( libfwevt_event_read( event, data, data_size, data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read event: %" PRIu32 ".", function, event_index ); goto on_error; } if( events_data_size < sizeof( fwevt_template_event_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid events data size value out of bounds.", function ); goto on_error; } data_offset += sizeof( fwevt_template_event_t ); events_data_size -= sizeof( fwevt_template_event_t ); if( libcdata_array_set_entry_by_index( internal_provider->events_array, (int) event_index, (intptr_t *) event, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set event: %" PRIu32 " to array.", function, event_index ); goto on_error; } event = NULL; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( events_data_size > 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( data[ data_offset ] ), events_data_size, 0 ); } } #endif return( 1 ); on_error: if( event != NULL ) { libfwevt_event_free( &event, NULL ); } if( internal_provider->events_array != NULL ) { libcdata_array_free( &( internal_provider->events_array ), NULL, NULL ); } return( -1 ); } /* Reads the provider keywords * Returns 1 if successful or -1 on error */ int libfwevt_provider_read_keywords( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; libfwevt_keyword_t *keyword = NULL; fwevt_template_keywords_t *keywords = NULL; static char *function = "libfwevt_provider_read_keywords"; size_t data_offset = 0; uint32_t keyword_index = 0; uint32_t keywords_data_size = 0; uint32_t number_of_keywords = 0; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; 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( (size_t) internal_provider->keywords_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( (size_t) internal_provider->keywords_offset + sizeof( fwevt_template_keywords_t ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } if( internal_provider->keywords_offset == 0 ) { return( 1 ); } data_offset = (size_t) internal_provider->keywords_offset; keywords = (fwevt_template_keywords_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading keywords data at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, data_offset, data_offset ); libcnotify_printf( "%s: keywords data:\n", function ); libcnotify_print_data( (uint8_t *) keywords, sizeof( fwevt_template_keywords_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( keywords->size, keywords_data_size ); byte_stream_copy_to_uint32_little_endian( keywords->number_of_keywords, number_of_keywords ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c%c%c\n", function, keywords->signature[ 0 ], keywords->signature[ 1 ], keywords->signature[ 2 ], keywords->signature[ 3 ] ); libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu32 "\n", function, keywords_data_size ); libcnotify_printf( "%s: number of keywords\t\t\t: %" PRIu32 "\n", function, number_of_keywords ); libcnotify_printf( "\n" ); } #endif data_offset += sizeof( fwevt_template_keywords_t ); if( memory_compare( keywords->signature, "KEYW", 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported keywords signature.", function ); goto on_error; } if( ( data_offset + ( number_of_keywords * sizeof( fwevt_template_keyword_t ) ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); goto on_error; } if( libcdata_array_initialize( &( internal_provider->keywords_array ), (int) number_of_keywords, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create keywords array.", function ); goto on_error; } if( keywords_data_size > 0 ) { if( ( keywords_data_size < sizeof( fwevt_template_keywords_t ) ) || ( keywords_data_size >= data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid keywords data size value out of bounds.", function ); goto on_error; } keywords_data_size -= sizeof( fwevt_template_keywords_t ); } for( keyword_index = 0; keyword_index < number_of_keywords; keyword_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading keyword: %03" PRIu32 " at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, keyword_index, data_offset, data_offset ); } #endif if( libfwevt_keyword_initialize( &keyword, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create keyword: %" PRIu32 ".", function, keyword_index ); goto on_error; } if( libfwevt_keyword_read( keyword, data, data_size, data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read keyword: %" PRIu32 ".", function, keyword_index ); goto on_error; } if( keywords_data_size < sizeof( fwevt_template_keyword_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid keywords data size value out of bounds.", function ); goto on_error; } data_offset += sizeof( fwevt_template_keyword_t ); keywords_data_size -= sizeof( fwevt_template_keyword_t ); if( libcdata_array_set_entry_by_index( internal_provider->keywords_array, (int) keyword_index, (intptr_t *) keyword, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set keyword: %" PRIu32 " to array.", function, keyword_index ); goto on_error; } keyword = NULL; } /* TODO count data size ? #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( keywords_data_size > 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( data[ data_offset ] ), keywords_data_size, 0 ); } } #endif */ return( 1 ); on_error: if( keyword != NULL ) { libfwevt_keyword_free( &keyword, NULL ); } if( internal_provider->keywords_array != NULL ) { libcdata_array_free( &( internal_provider->keywords_array ), NULL, NULL ); } return( -1 ); } /* Reads the provider levels * Returns 1 if successful or -1 on error */ int libfwevt_provider_read_levels( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; libfwevt_level_t *level = NULL; fwevt_template_levels_t *levels = NULL; static char *function = "libfwevt_provider_read_levels"; size_t data_offset = 0; uint32_t level_index = 0; uint32_t levels_data_size = 0; uint32_t number_of_levels = 0; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( internal_provider->levels_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid provider - levels array value 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) 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( (size_t) internal_provider->levels_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( (size_t) internal_provider->levels_offset + sizeof( fwevt_template_levels_t ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } if( internal_provider->levels_offset == 0 ) { return( 1 ); } data_offset = (size_t) internal_provider->levels_offset; levels = (fwevt_template_levels_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading levels data at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, data_offset, data_offset ); libcnotify_printf( "%s: levels data:\n", function ); libcnotify_print_data( (uint8_t *) levels, sizeof( fwevt_template_levels_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( levels->size, levels_data_size ); byte_stream_copy_to_uint32_little_endian( levels->number_of_levels, number_of_levels ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c%c%c\n", function, levels->signature[ 0 ], levels->signature[ 1 ], levels->signature[ 2 ], levels->signature[ 3 ] ); libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu32 "\n", function, levels_data_size ); libcnotify_printf( "%s: number of levels\t\t\t\t: %" PRIu32 "\n", function, number_of_levels ); libcnotify_printf( "\n" ); } #endif data_offset += sizeof( fwevt_template_levels_t ); if( memory_compare( levels->signature, "LEVL", 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported levels signature.", function ); goto on_error; } if( ( data_offset + ( number_of_levels * sizeof( fwevt_template_level_t ) ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); goto on_error; } if( libcdata_array_initialize( &( internal_provider->levels_array ), (int) number_of_levels, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create levels array.", function ); goto on_error; } if( levels_data_size > 0 ) { if( ( levels_data_size < sizeof( fwevt_template_levels_t ) ) || ( levels_data_size >= data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid levels data size value out of bounds.", function ); goto on_error; } levels_data_size -= sizeof( fwevt_template_levels_t ); } for( level_index = 0; level_index < number_of_levels; level_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading level: %03" PRIu32 " at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, level_index, data_offset, data_offset ); } #endif if( libfwevt_level_initialize( &level, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create level: %" PRIu32 ".", function, level_index ); goto on_error; } if( libfwevt_level_read( level, data, data_size, data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read level: %" PRIu32 ".", function, level_index ); goto on_error; } if( levels_data_size < sizeof( fwevt_template_level_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid levels data size value out of bounds.", function ); goto on_error; } data_offset += sizeof( fwevt_template_level_t ); levels_data_size -= sizeof( fwevt_template_level_t ); if( libcdata_array_set_entry_by_index( internal_provider->levels_array, (int) level_index, (intptr_t *) level, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set level: %" PRIu32 " to array.", function, level_index ); goto on_error; } level = NULL; } /* TODO count data size ? #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( levels_data_size > 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( data[ data_offset ] ), levels_data_size, 0 ); } } #endif */ return( 1 ); on_error: if( level != NULL ) { libfwevt_level_free( &level, NULL ); } if( internal_provider->levels_array != NULL ) { libcdata_array_free( &( internal_provider->levels_array ), NULL, NULL ); } return( -1 ); } /* Reads the provider maps * Returns 1 if successful or -1 on error */ int libfwevt_provider_read_maps( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; libfwevt_map_t *map = NULL; fwevt_template_maps_t *maps = NULL; const uint8_t *map_offsets_data = NULL; static char *function = "libfwevt_provider_read_maps"; size_t data_offset = 0; size_t maps_header_size = 0; uint32_t map_index = 0; uint32_t map_offset = 0; uint32_t maps_data_size = 0; uint32_t number_of_maps = 0; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( internal_provider->maps_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid provider - maps array value 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) 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( (size_t) internal_provider->maps_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( (size_t) internal_provider->maps_offset + sizeof( fwevt_template_maps_t ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } if( internal_provider->maps_offset == 0 ) { return( 1 ); } data_offset = (size_t) internal_provider->maps_offset; maps = (fwevt_template_maps_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading maps data at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, data_offset, data_offset ); libcnotify_printf( "%s: maps data:\n", function ); libcnotify_print_data( (uint8_t *) maps, sizeof( fwevt_template_maps_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( maps->size, maps_data_size ); byte_stream_copy_to_uint32_little_endian( maps->number_of_maps, number_of_maps ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t\t: %c%c%c%c\n", function, maps->signature[ 0 ], maps->signature[ 1 ], maps->signature[ 2 ], maps->signature[ 3 ] ); libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu32 "\n", function, maps_data_size ); libcnotify_printf( "%s: number of maps\t\t\t\t: %" PRIu32 "\n", function, number_of_maps ); libcnotify_printf( "\n" ); } #endif data_offset += sizeof( fwevt_template_maps_t ); if( memory_compare( maps->signature, "MAPS", 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported maps signature.", function ); goto on_error; } if( number_of_maps > 1 ) { map_offsets_data = &( data[ data_offset ] ); if( ( data_offset + ( ( number_of_maps - 1 ) * sizeof( uint32_t ) ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: map descriptor offsets data:\n", function ); libcnotify_print_data( &( data[ data_offset ] ), ( number_of_maps - 1 ) * sizeof( uint32_t ), 0 ); for( map_index = 0; map_index < number_of_maps - 1; map_index++ ) { byte_stream_copy_to_uint32_little_endian( &( data[ data_offset ] ), map_offset ); data_offset += 4; libcnotify_printf( "%s: map: %03" PRIu32 " descriptor offset\t\t\t: 0x%08" PRIx32 "\n", function, map_index, map_offset ); } libcnotify_printf( "\n" ); } #else data_offset += ( number_of_maps - 1 ) * sizeof( uint32_t ); #endif } if( number_of_maps > 0 ) { if( ( data_offset + ( number_of_maps * sizeof( fwevt_template_map_t ) ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); goto on_error; } if( libcdata_array_initialize( &( internal_provider->maps_array ), (int) number_of_maps, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create maps array.", function ); goto on_error; } if( maps_data_size > 0 ) { maps_header_size = sizeof( fwevt_template_maps_t ) + ( number_of_maps * sizeof( uint32_t ) ); if( ( maps_data_size < maps_header_size ) || ( maps_data_size >= data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid maps data size value out of bounds.", function ); goto on_error; } maps_data_size -= (uint32_t) maps_header_size; } for( map_index = 0; map_index < number_of_maps; map_index++ ) { if( map_index == 0 ) { map_offset = (uint32_t) data_offset; } else { if( map_offsets_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid map offsets data value.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( map_offsets_data, map_offset ); map_offsets_data += 4; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading map: %03" PRIu32 " at offset: %" PRIu32 " (0x%08" PRIx32 "):\n", function, map_index, map_offset, map_offset ); } #endif if( libfwevt_map_initialize( &map, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create map: %" PRIu32 ".", function, map_index ); goto on_error; } if( libfwevt_map_read( map, data, data_size, (size_t) map_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read map: %" PRIu32 ".", function, map_index ); goto on_error; } if( maps_data_size < sizeof( fwevt_template_map_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid maps data size value out of bounds.", function ); goto on_error; } maps_data_size -= sizeof( fwevt_template_map_t ); if( libcdata_array_set_entry_by_index( internal_provider->maps_array, (int) map_index, (intptr_t *) map, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set map: %" PRIu32 " to array.", function, map_index ); goto on_error; } map = NULL; } } /* TODO count data size ? #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( maps_data_size > 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( data[ data_offset ] ), maps_data_size, 0 ); } } #endif */ return( 1 ); on_error: if( map != NULL ) { libfwevt_map_free( &map, NULL ); } if( internal_provider->maps_array != NULL ) { libcdata_array_free( &( internal_provider->maps_array ), NULL, NULL ); } return( -1 ); } /* Reads the provider opcodes * Returns 1 if successful or -1 on error */ int libfwevt_provider_read_opcodes( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; libfwevt_opcode_t *opcode = NULL; fwevt_template_opcodes_t *opcodes = NULL; static char *function = "libfwevt_provider_read_opcodes"; size_t data_offset = 0; uint32_t opcode_index = 0; uint32_t opcodes_data_size = 0; uint32_t number_of_opcodes = 0; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( internal_provider->opcodes_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid provider - opcodes array value 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) 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( (size_t) internal_provider->opcodes_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( (size_t) internal_provider->opcodes_offset + sizeof( fwevt_template_opcodes_t ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } if( internal_provider->opcodes_offset == 0 ) { return( 1 ); } data_offset = (size_t) internal_provider->opcodes_offset; opcodes = (fwevt_template_opcodes_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading opcodes data at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, data_offset, data_offset ); libcnotify_printf( "%s: opcodes data:\n", function ); libcnotify_print_data( (uint8_t *) opcodes, sizeof( fwevt_template_opcodes_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( opcodes->size, opcodes_data_size ); byte_stream_copy_to_uint32_little_endian( opcodes->number_of_opcodes, number_of_opcodes ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c%c%c\n", function, opcodes->signature[ 0 ], opcodes->signature[ 1 ], opcodes->signature[ 2 ], opcodes->signature[ 3 ] ); libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu32 "\n", function, opcodes_data_size ); libcnotify_printf( "%s: number of opcodes\t\t\t: %" PRIu32 "\n", function, number_of_opcodes ); libcnotify_printf( "\n" ); } #endif data_offset += sizeof( fwevt_template_opcodes_t ); if( memory_compare( opcodes->signature, "OPCO", 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported opcodes signature.", function ); goto on_error; } if( ( data_offset + ( number_of_opcodes * sizeof( fwevt_template_opcode_t ) ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); goto on_error; } if( libcdata_array_initialize( &( internal_provider->opcodes_array ), (int) number_of_opcodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create opcodes array.", function ); goto on_error; } if( opcodes_data_size > 0 ) { if( ( opcodes_data_size < sizeof( fwevt_template_opcodes_t ) ) || ( opcodes_data_size >= data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid opcodes data size value out of bounds.", function ); goto on_error; } opcodes_data_size -= sizeof( fwevt_template_opcodes_t ); } for( opcode_index = 0; opcode_index < number_of_opcodes; opcode_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading opcode: %03" PRIu32 " at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, opcode_index, data_offset, data_offset ); } #endif if( libfwevt_opcode_initialize( &opcode, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create opcode: %" PRIu32 ".", function, opcode_index ); goto on_error; } if( libfwevt_opcode_read( opcode, data, data_size, data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read opcode: %" PRIu32 ".", function, opcode_index ); goto on_error; } if( opcodes_data_size < sizeof( fwevt_template_opcode_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid opcodes data size value out of bounds.", function ); goto on_error; } data_offset += sizeof( fwevt_template_opcode_t ); opcodes_data_size -= sizeof( fwevt_template_opcode_t ); if( libcdata_array_set_entry_by_index( internal_provider->opcodes_array, (int) opcode_index, (intptr_t *) opcode, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set opcode: %" PRIu32 " to array.", function, opcode_index ); goto on_error; } opcode = NULL; } /* TODO count data size ? #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( opcodes_data_size > 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( data[ data_offset ] ), opcodes_data_size, 0 ); } } #endif */ return( 1 ); on_error: if( opcode != NULL ) { libfwevt_opcode_free( &opcode, NULL ); } if( internal_provider->opcodes_array != NULL ) { libcdata_array_free( &( internal_provider->opcodes_array ), NULL, NULL ); } return( -1 ); } /* Reads the provider tasks * Returns 1 if successful or -1 on error */ int libfwevt_provider_read_tasks( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; libfwevt_task_t *task = NULL; fwevt_template_tasks_t *tasks = NULL; static char *function = "libfwevt_provider_read_tasks"; size_t data_offset = 0; uint32_t task_index = 0; uint32_t tasks_data_size = 0; uint32_t number_of_tasks = 0; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( internal_provider->tasks_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid provider - tasks array value 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) 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( (size_t) internal_provider->tasks_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( (size_t) internal_provider->tasks_offset + sizeof( fwevt_template_tasks_t ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } if( internal_provider->tasks_offset == 0 ) { return( 1 ); } data_offset = (size_t) internal_provider->tasks_offset; tasks = (fwevt_template_tasks_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading tasks data at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, data_offset, data_offset ); libcnotify_printf( "%s: tasks data:\n", function ); libcnotify_print_data( (uint8_t *) tasks, sizeof( fwevt_template_tasks_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( tasks->size, tasks_data_size ); byte_stream_copy_to_uint32_little_endian( tasks->number_of_tasks, number_of_tasks ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t\t: %c%c%c%c\n", function, tasks->signature[ 0 ], tasks->signature[ 1 ], tasks->signature[ 2 ], tasks->signature[ 3 ] ); libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu32 "\n", function, tasks_data_size ); libcnotify_printf( "%s: number of tasks\t\t\t\t: %" PRIu32 "\n", function, number_of_tasks ); libcnotify_printf( "\n" ); } #endif data_offset += sizeof( fwevt_template_tasks_t ); if( memory_compare( tasks->signature, "TASK", 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported tasks signature.", function ); goto on_error; } if( ( data_offset + ( number_of_tasks * sizeof( fwevt_template_task_t ) ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); goto on_error; } if( libcdata_array_initialize( &( internal_provider->tasks_array ), (int) number_of_tasks, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create tasks array.", function ); goto on_error; } if( tasks_data_size > 0 ) { if( ( tasks_data_size < sizeof( fwevt_template_task_t ) ) || ( tasks_data_size >= data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tasks data size value out of bounds.", function ); goto on_error; } tasks_data_size -= sizeof( fwevt_template_task_t ); } for( task_index = 0; task_index < number_of_tasks; task_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading task: %03" PRIu32 " at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, task_index, data_offset, data_offset ); } #endif if( libfwevt_task_initialize( &task, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create task: %" PRIu32 ".", function, task_index ); goto on_error; } if( libfwevt_task_read( task, data, data_size, data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read task: %" PRIu32 ".", function, task_index ); goto on_error; } if( tasks_data_size < sizeof( fwevt_template_task_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tasks data size value out of bounds.", function ); goto on_error; } data_offset += sizeof( fwevt_template_task_t ); tasks_data_size -= sizeof( fwevt_template_task_t ); if( libcdata_array_set_entry_by_index( internal_provider->tasks_array, (int) task_index, (intptr_t *) task, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set task: %" PRIu32 " to array.", function, task_index ); goto on_error; } task = NULL; } /* TODO count data size ? #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( tasks_data_size > 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( data[ data_offset ] ), tasks_data_size, 0 ); } } #endif */ return( 1 ); on_error: if( task != NULL ) { libfwevt_task_free( &task, NULL ); } if( internal_provider->tasks_array != NULL ) { libcdata_array_free( &( internal_provider->tasks_array ), NULL, NULL ); } return( -1 ); } /* Reads the provider template table * Returns 1 if successful or -1 on error */ int libfwevt_provider_read_templates( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; libfwevt_template_t *template = NULL; fwevt_template_table_t *template_table = NULL; static char *function = "libfwevt_provider_read_templates"; size_t data_offset = 0; uint32_t number_of_templates = 0; uint32_t template_index = 0; uint32_t template_size = 0; uint32_t template_table_size = 0; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( internal_provider->templates_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid provider - templates array value 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) 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( (size_t) internal_provider->templates_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( (size_t) internal_provider->templates_offset + sizeof( fwevt_template_table_t ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } if( internal_provider->templates_offset == 0 ) { return( 1 ); } data_offset = (size_t) internal_provider->templates_offset; template_table = (fwevt_template_table_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading template table data at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, data_offset, data_offset ); libcnotify_printf( "%s: template table data:\n", function ); libcnotify_print_data( (uint8_t *) template_table, sizeof( fwevt_template_table_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( template_table->size, template_table_size ); byte_stream_copy_to_uint32_little_endian( template_table->number_of_templates, number_of_templates ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c%c%c\n", function, template_table->signature[ 0 ], template_table->signature[ 1 ], template_table->signature[ 2 ], template_table->signature[ 3 ] ); libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu32 "\n", function, template_table_size ); libcnotify_printf( "%s: number of templates\t\t\t: %" PRIu32 "\n", function, number_of_templates ); libcnotify_printf( "\n" ); } #endif data_offset += sizeof( fwevt_template_table_t ); if( memory_compare( template_table->signature, "TTBL", 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported template table signature.", function ); goto on_error; } if( ( data_offset + ( number_of_templates * sizeof( fwevt_template_header_t ) ) ) > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); goto on_error; } if( libcdata_array_initialize( &( internal_provider->templates_array ), (int) number_of_templates, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create templates array.", function ); goto on_error; } if( template_table_size > 0 ) { if( ( template_table_size < sizeof( fwevt_template_table_t ) ) || ( template_table_size >= data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template table data size value out of bounds.", function ); goto on_error; } template_table_size -= sizeof( fwevt_template_table_t ); } for( template_index = 0; template_index < number_of_templates; template_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading template: %03" PRIu32 " at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, template_index, data_offset, data_offset ); } #endif if( libfwevt_template_initialize( &template, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create template: %" PRIu32 ".", function, template_index ); goto on_error; } /* TODO handle ASCII codepage */ if( libfwevt_template_read( template, data, data_size, data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read template: %" PRIu32 ".", function, template_index ); goto on_error; } if( libfwevt_template_get_size( template, &template_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template size.", function ); goto on_error; } if( template_table_size < template_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid templates data size value out of bounds.", function ); goto on_error; } data_offset += template_size; template_table_size -= template_size; if( libcdata_array_set_entry_by_index( internal_provider->templates_array, (int) template_index, (intptr_t *) template, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set templates: %" PRIu32 " to array.", function, template_index ); goto on_error; } template = NULL; } /* TODO count data size ? #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( template_table_size > 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( data[ data_offset ] ), template_table_size, 0 ); } } #endif */ return( 1 ); on_error: if( template != NULL ) { libfwevt_template_free( &template, NULL ); } if( internal_provider->templates_array != NULL ) { libcdata_array_free( &( internal_provider->templates_array ), NULL, NULL ); } return( -1 ); } /* Compares the provider with the identifier * Returns 1 if identifier matches, 0 if not or -1 on error */ int libfwevt_provider_compare_identifier( libfwevt_provider_t *provider, const uint8_t *identifier, size_t identifier_size, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_compare_identifier"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; 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 != 16 ) { 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( memory_compare( internal_provider->identifier, identifier, 16 ) == 0 ) { return( 1 ); } return( 0 ); } /* Retrieves the number of channels * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_number_of_channels( libfwevt_provider_t *provider, int *number_of_channels, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_number_of_channels"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_number_of_entries( internal_provider->channels_array, number_of_channels, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific channel * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_channel( libfwevt_provider_t *provider, int channel_index, libfwevt_channel_t **channel, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_channel"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_entry_by_index( internal_provider->channels_array, channel_index, (intptr_t **) &channel, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d.", function, channel_index ); return( -1 ); } return( 1 ); } /* Retrieves the number of events * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_number_of_events( libfwevt_provider_t *provider, int *number_of_events, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_number_of_events"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_number_of_entries( internal_provider->events_array, number_of_events, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific event * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_event( libfwevt_provider_t *provider, int event_index, libfwevt_event_t **event, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_event"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_entry_by_index( internal_provider->events_array, event_index, (intptr_t **) &event, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d.", function, event_index ); return( -1 ); } return( 1 ); } /* Retrieves a specific event by identifier * Returns 1 if successful, 0 if not available or -1 on error */ int libfwevt_provider_get_event_by_identifier( libfwevt_provider_t *provider, uint32_t event_identifier, libfwevt_event_t **event, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_event_by_identifier"; uint32_t identifier = 0; int event_index = 0; int number_of_events = 0; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_provider->events_array, &number_of_events, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); return( -1 ); } for( event_index = 0; event_index < number_of_events; event_index++ ) { if( libcdata_array_get_entry_by_index( internal_provider->events_array, event_index, (intptr_t **) event, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d.", function, event_index ); goto on_error; } /* TODO refactor to compare function */ if( libfwevt_event_get_identifier( *event, &identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve event identifier: %d.", function, event_index ); goto on_error; } if( event_identifier == identifier ) { return( 1 ); } } *event = NULL; return( 0 ); on_error: *event = NULL; return( 1 ); } /* Retrieves the number of keywords * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_number_of_keywords( libfwevt_provider_t *provider, int *number_of_keywords, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_number_of_keywords"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_number_of_entries( internal_provider->keywords_array, number_of_keywords, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific keyword * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_keyword( libfwevt_provider_t *provider, int keyword_index, libfwevt_keyword_t **keyword, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_keyword"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_entry_by_index( internal_provider->keywords_array, keyword_index, (intptr_t **) &keyword, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d.", function, keyword_index ); return( -1 ); } return( 1 ); } /* Retrieves the number of levels * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_number_of_levels( libfwevt_provider_t *provider, int *number_of_levels, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_number_of_levels"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_number_of_entries( internal_provider->levels_array, number_of_levels, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific level * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_level( libfwevt_provider_t *provider, int level_index, libfwevt_level_t **level, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_level"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_entry_by_index( internal_provider->levels_array, level_index, (intptr_t **) &level, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d.", function, level_index ); return( -1 ); } return( 1 ); } /* Retrieves the number of maps * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_number_of_maps( libfwevt_provider_t *provider, int *number_of_maps, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_number_of_maps"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_number_of_entries( internal_provider->maps_array, number_of_maps, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific map * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_map( libfwevt_provider_t *provider, int map_index, libfwevt_map_t **map, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_map"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_entry_by_index( internal_provider->maps_array, map_index, (intptr_t **) &map, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d.", function, map_index ); return( -1 ); } return( 1 ); } /* Retrieves the number of tasks * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_number_of_tasks( libfwevt_provider_t *provider, int *number_of_tasks, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_number_of_tasks"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_number_of_entries( internal_provider->tasks_array, number_of_tasks, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific task * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_task( libfwevt_provider_t *provider, int task_index, libfwevt_task_t **task, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_task"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_entry_by_index( internal_provider->tasks_array, task_index, (intptr_t **) &task, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d.", function, task_index ); return( -1 ); } return( 1 ); } /* Retrieves the number of templates * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_number_of_templates( libfwevt_provider_t *provider, int *number_of_templates, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_number_of_templates"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_number_of_entries( internal_provider->templates_array, number_of_templates, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific template * Returns 1 if successful or -1 on error */ int libfwevt_provider_get_template( libfwevt_provider_t *provider, int template_index, libfwevt_template_t **template, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_template"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( libcdata_array_get_entry_by_index( internal_provider->templates_array, template_index, (intptr_t **) &template, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d.", function, template_index ); return( -1 ); } return( 1 ); } /* Retrieves a specific template by offset * Returns 1 if successful, 0 if not available or -1 on error */ int libfwevt_provider_get_template_by_offset( libfwevt_provider_t *provider, uint32_t offset, libfwevt_template_t **template, libcerror_error_t **error ) { libfwevt_internal_provider_t *internal_provider = NULL; static char *function = "libfwevt_provider_get_template_by_offset"; uint32_t template_offset = 0; int template_index = 0; int number_of_templates = 0; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libfwevt_internal_provider_t *) provider; if( template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_provider->templates_array, &number_of_templates, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); return( -1 ); } for( template_index = 0; template_index < number_of_templates; template_index++ ) { if( libcdata_array_get_entry_by_index( internal_provider->templates_array, template_index, (intptr_t **) template, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d.", function, template_index ); goto on_error; } if( libfwevt_template_get_offset( *template, &template_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template offset: %d.", function, template_index ); goto on_error; } if( offset == template_offset ) { return( 1 ); } } *template = NULL; return( 0 ); on_error: *template = NULL; return( -1 ); } libevt-20170120/libfwevt/libfwevt_libcerror.h0000664000175000017500000000264113040331702023211 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_LIBCERROR_H ) #define _LIBFWEVT_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( _LIBFWEVT_LIBCERROR_H ) */ libevt-20170120/libfwevt/libfwevt_xml_document.h0000664000175000017500000002205413040331702023724 0ustar00lordyestalordyesta00000000000000/* * Windows Event Log binary XML document functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_XML_DOCUMENT_H ) #define _LIBFWEVT_INTERNAL_XML_DOCUMENT_H #include #include #include "libfwevt_extern.h" #include "libfwevt_libcdata.h" #include "libfwevt_libcerror.h" #include "libfwevt_types.h" #include "libfwevt_xml_tag.h" #include "libfwevt_xml_token.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_xml_document libfwevt_internal_xml_document_t; struct libfwevt_internal_xml_document { /* The root XML tag */ libfwevt_xml_tag_t *root_xml_tag; /* The size */ size_t size; }; LIBFWEVT_EXTERN \ int libfwevt_xml_document_initialize( libfwevt_xml_document_t **xml_document, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_document_free( libfwevt_xml_document_t **xml_document, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_document_clone( libfwevt_xml_document_t **destination_xml_document, libfwevt_xml_document_t *source_xml_document, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_document_get_root_xml_tag( libfwevt_xml_document_t *xml_document, libfwevt_xml_tag_t **root_xml_tag, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_document_read( libfwevt_xml_document_t *xml_document, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcerror_error_t **error ); int libfwevt_xml_document_read_with_template_values( libfwevt_xml_document_t *xml_document, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, libcerror_error_t **error ); int libfwevt_xml_document_read_attribute( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_read_cdata_section( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_read_character_reference( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, uint8_t flags, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_read_element( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_read_entity_reference( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, uint8_t flags, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_read_fragment( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_read_fragment_header( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, libcerror_error_t **error ); int libfwevt_xml_document_read_name( libfwevt_internal_xml_document_t *xml_document, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, uint8_t flags, uint32_t *name_data_size, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_read_normal_substitution( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, size_t *template_value_offset, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_read_optional_substitution( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, size_t *template_value_offset, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_read_pi_data( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_read_pi_target( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, uint8_t flags, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_read_template_instance( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_read_template_instance_values( libfwevt_internal_xml_document_t *xml_document, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, libcdata_array_t **template_values_array, size_t *template_values_size, libcerror_error_t **error ); int libfwevt_xml_document_read_value( libfwevt_internal_xml_document_t *xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_document_substitute_template_value( libfwevt_internal_xml_document_t *xml_document, const uint8_t *binary_data, size_t binary_data_size, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, uint16_t template_value_index, uint8_t template_value_type, size_t *template_value_offset, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_document_get_utf8_xml_string_size( libfwevt_xml_document_t *xml_document, size_t *utf8_string_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_document_get_utf8_xml_string( libfwevt_xml_document_t *xml_document, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_document_get_utf16_xml_string_size( libfwevt_xml_document_t *xml_document, size_t *utf16_string_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_document_get_utf16_xml_string( libfwevt_xml_document_t *xml_document, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); #if defined( HAVE_DEBUG_OUTPUT ) LIBFWEVT_EXTERN \ int libfwevt_xml_document_debug_print( libfwevt_xml_document_t *xml_document, libcerror_error_t **error ); #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_XML_DOCUMENT_H ) */ libevt-20170120/libfwevt/libfwevt_debug.h0000664000175000017500000000223313040331702022311 0ustar00lordyestalordyesta00000000000000/* * Debug functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_DEBUG_H ) #define _LIBFWEVT_DEBUG_H #include #include #include "libfwevt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) void libfwevt_debug_print_value_type( uint8_t value_type ); #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_DEBUG_H ) */ libevt-20170120/libfwevt/Makefile.am0000664000175000017500000000302213012271512021202 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBFWEVT AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ @LIBFVALUE_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ noinst_LTLIBRARIES = libfwevt.la libfwevt_la_SOURCES = \ fwevt_template.h \ libfwevt_channel.c libfwevt_channel.h \ libfwevt_debug.c libfwevt_debug.h \ libfwevt_definitions.h \ libfwevt_extern.h \ libfwevt_error.c libfwevt_error.h \ libfwevt_event.c libfwevt_event.h \ libfwevt_libcdata.h \ libfwevt_libcerror.h \ libfwevt_libcnotify.h \ libfwevt_libfguid.h \ libfwevt_libfvalue.h \ libfwevt_libuna.h \ libfwevt_keyword.c libfwevt_keyword.h \ libfwevt_level.c libfwevt_level.h \ libfwevt_manifest.c libfwevt_manifest.h \ libfwevt_map.c libfwevt_map.h \ libfwevt_opcode.c libfwevt_opcode.h \ libfwevt_provider.c libfwevt_provider.h \ libfwevt_support.c libfwevt_support.h \ libfwevt_task.c libfwevt_task.h \ libfwevt_template.c libfwevt_template.h \ libfwevt_types.h \ libfwevt_unused.h \ libfwevt_xml_document.c libfwevt_xml_document.h \ libfwevt_xml_tag.c libfwevt_xml_tag.h \ libfwevt_xml_template_value.c libfwevt_xml_template_value.h \ libfwevt_xml_token.c libfwevt_xml_token.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfwevt ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfwevt_la_SOURCES) libevt-20170120/libfwevt/libfwevt_xml_token.h0000664000175000017500000000321013040331702023217 0ustar00lordyestalordyesta00000000000000/* * Windows Event Log binary XML token functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_XML_TOKEN_H ) #define _LIBFWEVT_XML_TOKEN_H #include #include #include "libfwevt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_xml_token libfwevt_xml_token_t; struct libfwevt_xml_token { /* The type */ uint8_t type; /* The size */ size_t size; }; int libfwevt_xml_token_initialize( libfwevt_xml_token_t **xml_token, libcerror_error_t **error ); int libfwevt_xml_token_free( libfwevt_xml_token_t **xml_token, libcerror_error_t **error ); int libfwevt_xml_token_read( libfwevt_xml_token_t *xml_token, const uint8_t *chunk_data, size_t chunk_data_size, size_t chunk_data_offset, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_XML_TOKEN_H ) */ libevt-20170120/libfwevt/libfwevt_event.h0000664000175000017500000000461413040331702022351 0ustar00lordyestalordyesta00000000000000/* * Event functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_EVENT_H ) #define _LIBFWEVT_INTERNAL_EVENT_H #include #include #include "libfwevt_extern.h" #include "libfwevt_libcerror.h" #include "libfwevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_event libfwevt_internal_event_t; struct libfwevt_internal_event { /* The identifier */ uint16_t identifier; /* The message identifier */ uint32_t message_identifier; /* The level offset */ uint32_t level_offset; /* The opcode offset */ uint32_t opcode_offset; /* The taks offset */ uint32_t task_offset; /* The template offset */ uint32_t template_offset; }; LIBFWEVT_EXTERN \ int libfwevt_event_initialize( libfwevt_event_t **event, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_event_free( libfwevt_event_t **event, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_event_read( libfwevt_event_t *event, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_event_get_identifier( libfwevt_event_t *event, uint32_t *identifier, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_event_get_message_identifier( libfwevt_event_t *event, uint32_t *message_identifier, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_event_get_template_offset( libfwevt_event_t *event, uint32_t *template_offset, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_EVENT_H ) */ libevt-20170120/libfwevt/libfwevt_level.h0000664000175000017500000000325613040331702022340 0ustar00lordyestalordyesta00000000000000/* * Level functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_LEVEL_H ) #define _LIBFWEVT_INTERNAL_LEVEL_H #include #include #include "libfwevt_extern.h" #include "libfwevt_libcerror.h" #include "libfwevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_level libfwevt_internal_level_t; struct libfwevt_internal_level { /* The identifier */ uint16_t identifier; }; LIBFWEVT_EXTERN \ int libfwevt_level_initialize( libfwevt_level_t **level, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_level_free( libfwevt_level_t **level, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_level_read( libfwevt_level_t *level, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_LEVEL_H ) */ libevt-20170120/libfwevt/libfwevt_xml_document.c0000664000175000017500000046111313040331702023722 0ustar00lordyestalordyesta00000000000000/* * Windows Event Log binary XML document functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "libfwevt_debug.h" #include "libfwevt_definitions.h" #include "libfwevt_libcdata.h" #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_libfguid.h" #include "libfwevt_libfvalue.h" #include "libfwevt_types.h" #include "libfwevt_xml_document.h" #include "libfwevt_xml_template_value.h" #include "libfwevt_xml_tag.h" #include "libfwevt_xml_token.h" /* Creates a binary XML document * Make sure the value xml_document is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_initialize( libfwevt_xml_document_t **xml_document, libcerror_error_t **error ) { libfwevt_internal_xml_document_t *internal_xml_document = NULL; static char *function = "libfwevt_xml_document_initialize"; if( xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( *xml_document != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid binary XML document value already set.", function ); return( -1 ); } internal_xml_document = memory_allocate_structure( libfwevt_internal_xml_document_t ); if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create binary XML document.", function ); goto on_error; } if( memory_set( internal_xml_document, 0, sizeof( libfwevt_internal_xml_document_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear binary XML document.", function ); goto on_error; } *xml_document = (libfwevt_xml_document_t *) internal_xml_document; return( 1 ); on_error: if( internal_xml_document != NULL ) { memory_free( internal_xml_document ); } return( -1 ); } /* Frees a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_free( libfwevt_xml_document_t **xml_document, libcerror_error_t **error ) { libfwevt_internal_xml_document_t *internal_xml_document = NULL; static char *function = "libfwevt_xml_document_free"; int result = 1; if( xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( *xml_document != NULL ) { internal_xml_document = (libfwevt_internal_xml_document_t *) *xml_document; *xml_document = NULL; if( internal_xml_document->root_xml_tag != NULL ) { if( libfwevt_xml_tag_free( &( internal_xml_document->root_xml_tag ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free root XML tag.", function ); result = -1; } } memory_free( internal_xml_document ); } return( result ); } /* Clones the binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_clone( libfwevt_xml_document_t **destination_xml_document, libfwevt_xml_document_t *source_xml_document, libcerror_error_t **error ) { libfwevt_internal_xml_document_t *internal_destination_xml_document = NULL; libfwevt_internal_xml_document_t *internal_source_xml_document = NULL; static char *function = "libfwevt_xml_document_free"; if( destination_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination binary XML document.", function ); return( -1 ); } if( *destination_xml_document != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination binary XML document value already set.", function ); return( -1 ); } if( source_xml_document == NULL ) { *destination_xml_document = NULL; return( 1 ); } /* TODO clone tags */ return( 1 ); on_error: if( *destination_xml_document != NULL ) { libfwevt_xml_document_free( destination_xml_document, NULL ); } return( -1 ); } /* Retrieves the root XML tag * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_get_root_xml_tag( libfwevt_xml_document_t *xml_document, libfwevt_xml_tag_t **root_xml_tag, libcerror_error_t **error ) { libfwevt_internal_xml_document_t *internal_xml_document = NULL; static char *function = "libfwevt_xml_document_get_root_xml_tag"; if( xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } internal_xml_document = (libfwevt_internal_xml_document_t *) xml_document; if( root_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid root XML tag.", function ); return( -1 ); } *root_xml_tag = internal_xml_document->root_xml_tag; return( 1 ); } /* Reads a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read( libfwevt_xml_document_t *xml_document, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcerror_error_t **error ) { static char *function = "libfwevt_xml_document_read"; if( libfwevt_xml_document_read_with_template_values( xml_document, binary_data, binary_data_size, binary_data_offset, ascii_codepage, flags, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read XML document.", function ); return( -1 ); } return( 1 ); } /* Reads a binary XML document with template values * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_with_template_values( libfwevt_xml_document_t *xml_document, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, libcerror_error_t **error ) { libfwevt_internal_xml_document_t *internal_xml_document = NULL; libfwevt_xml_token_t *xml_token = NULL; static char *function = "libfwevt_xml_document_read_with_template_values"; uint8_t supported_flags = 0; if( xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } internal_xml_document = (libfwevt_internal_xml_document_t *) xml_document; if( internal_xml_document->root_xml_tag != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid binary XML document - root XML tag already set.", function ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); goto on_error; } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); goto on_error; } supported_flags = LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DATA_OFFSETS | LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DEPENDENCY_IDENTIFIERS; if( ( flags & ~( supported_flags ) ) != 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( libfwevt_xml_token_initialize( &xml_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create binary XML token.", function ); goto on_error; } while( binary_data_offset < binary_data_size ) { if( libfwevt_xml_token_read( xml_token, binary_data, binary_data_size, binary_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML token.", function ); goto on_error; } /* TODO check for prologue */ /* TODO validate the order */ /* TODO check for Miscellaneous before end of file token */ switch( xml_token->type & 0xbf ) { case LIBFWEVT_XML_TOKEN_END_OF_FILE: if( ( binary_data_offset + 1 ) > binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: end of file data:\n", function ); libcnotify_print_data( &( binary_data[ binary_data_offset ] ), 1, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t: 0x%02" PRIx8 "\n", function, binary_data[ binary_data_offset ] ); libcnotify_printf( "\n" ); } #endif xml_token->size = 1; break; case LIBFWEVT_XML_TOKEN_FRAGMENT_HEADER: if( libfwevt_xml_document_read_fragment( internal_xml_document, xml_token, binary_data, binary_data_size, binary_data_offset, ascii_codepage, flags, template_values_array, internal_xml_document->root_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read fragment header.", function ); goto on_error; } break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); goto on_error; } internal_xml_document->size += xml_token->size; binary_data_offset += xml_token->size; if( xml_token->type == LIBFWEVT_XML_TOKEN_END_OF_FILE ) { break; } } if( libfwevt_xml_token_free( &xml_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free binary XML token.", function ); goto on_error; } return( 1 ); on_error: if( xml_token != NULL ) { libfwevt_xml_token_free( &xml_token, NULL ); } return( -1 ); } /* Reads an attribute from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_attribute( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { libfwevt_xml_token_t *xml_sub_token = NULL; libfwevt_xml_tag_t *attribute_xml_tag = NULL; const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_attribute"; size_t additional_value_size = 0; size_t template_value_offset = 0; size_t trailing_data_size = 0; size_t xml_document_data_offset = 0; size_t xml_document_data_size = 0; uint32_t attribute_name_offset = 0; uint32_t attribute_name_size = 0; int result = 0; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( ( xml_token->type & 0xbf ) != LIBFWEVT_XML_TOKEN_ATTRIBUTE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } if( ( flags & LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DATA_OFFSETS ) == 0 ) { additional_value_size = 4; } xml_document_data = &( binary_data[ binary_data_offset ] ); xml_document_data_size = binary_data_size - binary_data_offset; if( libfwevt_xml_token_initialize( &xml_sub_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create binary XML sub token.", function ); goto on_error; } do { if( libfwevt_xml_tag_initialize( &attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create attribute XML tag.", function ); goto on_error; } if( ( xml_document_data_offset + 1 + additional_value_size ) > xml_document_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: attribute data:\n", function ); libcnotify_print_data( xml_document_data, 1 + additional_value_size, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 0 ] ); } #endif xml_document_data_offset = 1; if( ( flags & LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DATA_OFFSETS ) == 0 ) { attribute_name_offset = (uint32_t) ( binary_data_offset + xml_document_data_offset ); } else { byte_stream_copy_to_uint32_little_endian( &( xml_document_data[ 1 ] ), attribute_name_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: name offset\t\t\t: 0x%08" PRIx32 "\n", function, attribute_name_offset ); } #endif xml_document_data_offset += 4; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif if( attribute_name_offset > ( binary_data_offset + xml_document_data_offset ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid attribute data offset value out of bounds.", function ); goto on_error; } if( ( binary_data_offset + xml_document_data_offset ) < attribute_name_offset ) { trailing_data_size = attribute_name_offset - ( binary_data_offset - xml_document_data_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( xml_document_data[ xml_document_data_offset ] ), trailing_data_size, 0 ); } #endif xml_document_data_offset += trailing_data_size; } if( libfwevt_xml_document_read_name( internal_xml_document, binary_data, binary_data_size, attribute_name_offset, flags, &attribute_name_size, attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read attribute name.", function ); goto on_error; } if( ( binary_data_offset + xml_document_data_offset ) == attribute_name_offset ) { xml_document_data_offset += attribute_name_size; } if( libfwevt_xml_token_read( xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML sub token.", function ); goto on_error; } result = 1; switch( xml_sub_token->type & 0xbf ) { case LIBFWEVT_XML_TOKEN_VALUE: if( template_value_offset != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template value offset value out of bounds.", function ); goto on_error; } if( libfwevt_xml_document_read_value( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read value.", function ); goto on_error; } break; case LIBFWEVT_XML_TOKEN_NORMAL_SUBSTITUTION: result = libfwevt_xml_document_read_normal_substitution( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, ascii_codepage, flags, template_values_array, &template_value_offset, attribute_xml_tag, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read normal substitution.", function ); goto on_error; } break; case LIBFWEVT_XML_TOKEN_OPTIONAL_SUBSTITUTION: result = libfwevt_xml_document_read_optional_substitution( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, ascii_codepage, flags, template_values_array, &template_value_offset, attribute_xml_tag, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read optional substitution.", function ); goto on_error; } break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML sub token - unsupported type: 0x%02" PRIx8 ".", function, xml_sub_token->type ); goto on_error; } if( result != 0 ) { if( libfwevt_xml_tag_append_attribute( xml_tag, attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append attribute to XML tag.", function ); goto on_error; } attribute_xml_tag = NULL; } xml_document_data_offset += xml_sub_token->size; } while( template_value_offset > 0 ); xml_token->size = xml_document_data_offset; if( attribute_xml_tag != NULL ) { if( libfwevt_xml_tag_free( &attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free attribute XML tag.", function ); goto on_error; } } if( libfwevt_xml_token_free( &xml_sub_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free binary XML sub token.", function ); goto on_error; } return( 1 ); on_error: if( attribute_xml_tag != NULL ) { libfwevt_xml_tag_free( &attribute_xml_tag, NULL ); } if( xml_sub_token != NULL ) { libfwevt_xml_token_free( &xml_sub_token, NULL ); } return( -1 ); } /* Reads a CDATA section from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_cdata_section( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_cdata_section"; size_t value_data_size = 0; size_t xml_document_data_size = 0; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( xml_token->type != LIBFWEVT_XML_TOKEN_CDATA_SECTION ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } xml_document_data = &( binary_data[ binary_data_offset ] ); xml_document_data_size = binary_data_size - binary_data_offset; if( xml_document_data_size < 3 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); return( -1 ); } if( libfwevt_xml_tag_set_type( xml_tag, LIBFWEVT_XML_TAG_TYPE_CDATA, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set XML tag type.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: cdata section data:\n", function ); libcnotify_print_data( xml_document_data, 3, 0 ); } #endif byte_stream_copy_to_uint16_little_endian( &( xml_document_data[ 1 ] ), value_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 0 ] ); libcnotify_printf( "%s: number of characters\t: %" PRIzd "\n", function, value_data_size ); } #endif xml_token->size = 3; binary_data_offset += 3; value_data_size *= 2; if( ( binary_data_offset + value_data_size ) > binary_data_size ) { 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 defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data:\n", function ); libcnotify_print_data( &( xml_document_data[ 3 ] ), value_data_size, 0 ); } #endif if( libfwevt_xml_tag_set_value_type( xml_tag, LIBFVALUE_VALUE_TYPE_STRING_UTF16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value type.", function ); return( -1 ); } if( libfwevt_xml_tag_set_value_data( xml_tag, &( binary_data[ binary_data_offset ] ), value_data_size, LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value data.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfwevt_xml_tag_value_debug_print( xml_tag, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print value.", function ); return( -1 ); } } #endif xml_token->size += value_data_size; return( 1 ); } /* Reads a character entity reference from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_character_reference( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, uint8_t flags, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { libfwevt_xml_tag_t *character_xml_tag = NULL; uint16_t *character_value_string = NULL; uint8_t *character_value_utf16_stream = NULL; const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_character_reference"; size_t character_value_string_index = 0; size_t character_value_string_size = 0; size_t character_value_utf16_stream_index = 0; size_t character_value_utf16_stream_size = 0; size_t xml_document_data_size = 0; uint16_t character_value = 0; int value_entry_index = 0; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( ( xml_token->type & 0xbf ) != LIBFWEVT_XML_TOKEN_ENTITY_REFERENCE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } xml_document_data = &( binary_data[ binary_data_offset ] ); xml_document_data_size = binary_data_size - binary_data_offset; if( xml_document_data_size < 3 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: character reference data:\n", function ); libcnotify_print_data( xml_document_data, 3, 0 ); } #endif byte_stream_copy_to_uint16_little_endian( &( xml_document_data[ 1 ] ), character_value ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 0 ] ); libcnotify_printf( "%s: character value\t\t: 0x%04" PRIx16 "\n", function, character_value ); libcnotify_printf( "\n" ); } #endif xml_token->size = 3; if( libfvalue_string_size_from_integer( &character_value_string_size, (uint64_t) character_value, 16, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of character value string.", function ); goto on_error; } character_value_string_size += 3; character_value_string = (uint16_t *) memory_allocate( sizeof( uint16_t ) * character_value_string_size ); if( character_value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create character value string.", function ); goto on_error; } character_value_string[ character_value_string_index++ ] = (uint16_t) '&'; character_value_string[ character_value_string_index++ ] = (uint16_t) '#'; if( libfvalue_utf16_string_with_index_copy_from_integer( character_value_string, character_value_string_size, &character_value_string_index, (uint64_t) character_value, 16, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy character value to UTF-16 string.", function ); goto on_error; } character_value_string[ character_value_string_size - 2 ] = (uint16_t) ';'; character_value_string[ character_value_string_size - 1 ] = 0; if( libfwevt_xml_tag_set_value_type( xml_tag, LIBFVALUE_VALUE_TYPE_STRING_UTF16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value type.", function ); return( -1 ); } /* Make sure the character value data is in UTF-16 litte-endian */ character_value_utf16_stream_size = character_value_string_size * 2; character_value_utf16_stream = (uint8_t *) memory_allocate( sizeof( uint8_t ) * character_value_utf16_stream_size ); if( character_value_utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create character value UTF-16 stream.", function ); goto on_error; } for( character_value_string_index = 0; character_value_string_index < character_value_string_size; character_value_string_index++ ) { byte_stream_copy_from_uint16_little_endian( &( character_value_utf16_stream[ character_value_utf16_stream_index ] ), character_value_string[ character_value_string_index ] ); character_value_utf16_stream_index += 2; } memory_free( character_value_string ); character_value_string = NULL; if( libfwevt_xml_tag_append_value_data( xml_tag, character_value_utf16_stream, character_value_utf16_stream_size, LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN, &value_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value data.", function ); goto on_error; } memory_free( character_value_utf16_stream ); character_value_utf16_stream = NULL; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfwevt_xml_tag_value_debug_print( xml_tag, value_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print value: %d.", function, value_entry_index ); goto on_error; } } #endif if( libfwevt_xml_tag_free( &character_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free character XML tag.", function ); goto on_error; } return( 1 ); on_error: if( character_value_utf16_stream != NULL ) { memory_free( character_value_utf16_stream ); } if( character_value_string != NULL ) { memory_free( character_value_string ); } if( character_xml_tag != NULL ) { libfwevt_xml_tag_free( &character_xml_tag, NULL ); } return( -1 ); } /* Reads an element from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_element( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { libfwevt_xml_token_t *xml_sub_token = NULL; libfwevt_xml_tag_t *element_xml_tag = NULL; const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_element"; size_t additional_value_size = 0; size_t element_size_offset = 0; size_t template_value_offset = 0; size_t trailing_data_size = 0; size_t xml_document_data_offset = 0; size_t xml_document_data_size = 0; uint32_t attribute_list_size = 0; uint32_t element_name_offset = 0; uint32_t element_name_size = 0; uint32_t element_size = 0; int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint16_t value_16bit = 0; #endif if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( ( xml_token->type & 0xbf ) != LIBFWEVT_XML_TOKEN_OPEN_START_ELEMENT_TAG ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } if( ( flags & LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DATA_OFFSETS ) == 0 ) { additional_value_size = 4; } if( ( flags & LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DEPENDENCY_IDENTIFIERS ) == 0 ) { element_size_offset = 1; } else { element_size_offset = 3; } xml_document_data = &( binary_data[ binary_data_offset ] ); xml_document_data_size = binary_data_size - binary_data_offset; if( xml_document_data_size < ( element_size_offset + 4 + additional_value_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); return( -1 ); } if( libfwevt_xml_token_initialize( &xml_sub_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create binary XML sub token.", function ); goto on_error; } do { if( libfwevt_xml_tag_initialize( &element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create element XML tag.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element data:\n", function ); libcnotify_print_data( xml_document_data, element_size_offset + 4 + additional_value_size, 0 ); } #endif byte_stream_copy_to_uint32_little_endian( &( xml_document_data[ element_size_offset ] ), element_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 0 ] ); if( element_size_offset == 3 ) { byte_stream_copy_to_uint16_little_endian( &( xml_document_data[ 1 ] ), value_16bit ); libcnotify_printf( "%s: dependency identifier\t\t: %" PRIi16 " (0x%04" PRIx16 ")\n", function, (int16_t) value_16bit, value_16bit ); } libcnotify_printf( "%s: size\t\t\t\t: %" PRIu32 "\n", function, element_size ); } #endif xml_document_data_offset = element_size_offset + 4; /* The first 5 or 7 bytes are not included in the element size */ if( ( flags & LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DATA_OFFSETS ) == 0 ) { element_name_offset = (uint32_t) ( binary_data_offset + xml_document_data_offset ); } else { byte_stream_copy_to_uint32_little_endian( &( xml_document_data[ xml_document_data_offset ] ), element_name_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: name offset\t\t\t\t: 0x%08" PRIx32 "\n", function, element_name_offset ); } #endif xml_document_data_offset += 4; element_size -= 4; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif if( element_name_offset > ( binary_data_offset + xml_document_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 ); goto on_error; } if( ( binary_data_offset + xml_document_data_offset ) < element_name_offset ) { trailing_data_size = element_name_offset - ( binary_data_offset + xml_document_data_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( xml_document_data[ xml_document_data_offset ] ), trailing_data_size, 0 ); } #endif xml_document_data_offset += trailing_data_size; element_size -= (uint32_t) trailing_data_size; } if( libfwevt_xml_document_read_name( internal_xml_document, binary_data, binary_data_size, element_name_offset, flags, &element_name_size, element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read element name.", function ); goto on_error; } if( ( binary_data_offset + xml_document_data_offset ) == element_name_offset ) { xml_document_data_offset += element_name_size; element_size -= element_name_size; } if( ( xml_token->type & LIBFWEVT_XML_TOKEN_FLAG_HAS_MORE_DATA ) != 0 ) { if( ( binary_data_offset + xml_document_data_offset + 4 ) > binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: attribute list data:\n", function ); libcnotify_print_data( &( xml_document_data[ xml_document_data_offset ] ), 4, 0 ); } #endif byte_stream_copy_to_uint32_little_endian( &( xml_document_data[ xml_document_data_offset ] ), attribute_list_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: attribute list size\t\t\t: %" PRIu32 "\n", function, attribute_list_size ); libcnotify_printf( "\n" ); } #endif xml_document_data_offset += 4; element_size -= 4; while( attribute_list_size > 0 ) { if( libfwevt_xml_token_read( xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML sub token.", function ); goto on_error; } if( libfwevt_xml_document_read_attribute( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, ascii_codepage, flags, template_values_array, element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read attribute.", function ); goto on_error; } xml_document_data_offset += xml_sub_token->size; element_size -= (uint32_t) xml_sub_token->size; if( attribute_list_size < xml_sub_token->size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid attribute list size value too small.", function ); goto on_error; } attribute_list_size -= (uint32_t) xml_sub_token->size; } } if( libfwevt_xml_token_read( xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML sub token.", function ); goto on_error; } if( ( xml_sub_token->type != LIBFWEVT_XML_TOKEN_CLOSE_START_ELEMENT_TAG ) && ( xml_sub_token->type != LIBFWEVT_XML_TOKEN_CLOSE_EMPTY_ELEMENT_TAG ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } if( ( binary_data_offset + xml_document_data_offset + 1 ) > binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: close element tag data:\n", function ); libcnotify_print_data( &( xml_document_data[ xml_document_data_offset ] ), 1, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ xml_document_data_offset ] ); libcnotify_printf( "\n" ); } #endif xml_document_data_offset += 1; element_size -= 1; if( xml_sub_token->type == LIBFWEVT_XML_TOKEN_CLOSE_START_ELEMENT_TAG ) { result = 1; while( element_size > 0 ) { if( libfwevt_xml_token_read( xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML sub token.", function ); goto on_error; } switch( xml_sub_token->type & 0xbf ) { case LIBFWEVT_XML_TOKEN_OPEN_START_ELEMENT_TAG: if( libfwevt_xml_document_read_element( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, ascii_codepage, flags, template_values_array, element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read element.", function ); goto on_error; } break; case LIBFWEVT_XML_TOKEN_CLOSE_EMPTY_ELEMENT_TAG: case LIBFWEVT_XML_TOKEN_END_ELEMENT_TAG: if( ( binary_data_offset + xml_document_data_offset + 1 ) > binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: end element tag data:\n", function ); libcnotify_print_data( &( xml_document_data[ xml_document_data_offset ] ), 1, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ xml_document_data_offset ] ); libcnotify_printf( "\n" ); } #endif xml_sub_token->size = 1; break; case LIBFWEVT_XML_TOKEN_CDATA_SECTION: if( template_value_offset != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template value offset value out of bounds.", function ); goto on_error; } if( libfwevt_xml_document_read_cdata_section( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read CDATA section.", function ); goto on_error; } break; case LIBFWEVT_XML_TOKEN_PI_TARGET: if( template_value_offset != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template value offset value out of bounds.", function ); goto on_error; } if( libfwevt_xml_document_read_pi_target( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, flags, element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read PI target.", function ); goto on_error; } break; case LIBFWEVT_XML_TOKEN_CHARACTER_REFERENCE: if( template_value_offset != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template value offset value out of bounds.", function ); goto on_error; } if( libfwevt_xml_document_read_character_reference( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, flags, element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read character reference.", function ); goto on_error; } break; case LIBFWEVT_XML_TOKEN_ENTITY_REFERENCE: if( template_value_offset != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template value offset value out of bounds.", function ); goto on_error; } if( libfwevt_xml_document_read_entity_reference( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, flags, element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read entity reference.", function ); goto on_error; } break; case LIBFWEVT_XML_TOKEN_VALUE: if( template_value_offset != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template value offset value out of bounds.", function ); goto on_error; } if( libfwevt_xml_document_read_value( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read value.", function ); goto on_error; } break; case LIBFWEVT_XML_TOKEN_NORMAL_SUBSTITUTION: result = libfwevt_xml_document_read_normal_substitution( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, ascii_codepage, flags, template_values_array, &template_value_offset, element_xml_tag, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read normal substitution.", function ); goto on_error; } break; case LIBFWEVT_XML_TOKEN_OPTIONAL_SUBSTITUTION: result = libfwevt_xml_document_read_optional_substitution( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset + xml_document_data_offset, ascii_codepage, flags, template_values_array, &template_value_offset, element_xml_tag, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read optional substitution.", function ); goto on_error; } break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML sub token - unsupported type: 0x%02" PRIx8 ".", function, xml_sub_token->type ); goto on_error; } xml_document_data_offset += xml_sub_token->size; if( element_size < xml_sub_token->size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element size value too small.", function ); goto on_error; } element_size -= (uint32_t) xml_sub_token->size; if( ( xml_sub_token->type == LIBFWEVT_XML_TOKEN_CLOSE_EMPTY_ELEMENT_TAG ) || ( xml_sub_token->type == LIBFWEVT_XML_TOKEN_END_ELEMENT_TAG ) ) { break; } } } else if( xml_sub_token->type == LIBFWEVT_XML_TOKEN_CLOSE_EMPTY_ELEMENT_TAG ) { result = 1; } if( element_size > 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element size value out of bounds.", function ); goto on_error; } if( result != 0 ) { if( xml_tag != NULL ) { if( libfwevt_xml_tag_append_element( xml_tag, element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append element to XML tag.", function ); goto on_error; } element_xml_tag = NULL; } else if( internal_xml_document->root_xml_tag == NULL ) { internal_xml_document->root_xml_tag = element_xml_tag; element_xml_tag = NULL; } } } while( template_value_offset > 0 ); xml_token->size = xml_document_data_offset; if( element_xml_tag != NULL ) { if( libfwevt_xml_tag_free( &element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free element XML tag.", function ); goto on_error; } } if( libfwevt_xml_token_free( &xml_sub_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free binary XML sub token.", function ); goto on_error; } return( 1 ); on_error: if( ( element_xml_tag != NULL ) && ( element_xml_tag != internal_xml_document->root_xml_tag ) ) { libfwevt_xml_tag_free( &element_xml_tag, NULL ); } if( xml_sub_token != NULL ) { libfwevt_xml_token_free( &xml_sub_token, NULL ); } return( -1 ); } /* Reads an entity reference from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_entity_reference( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, uint8_t flags, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { libfwevt_xml_tag_t *entity_xml_tag = NULL; uint8_t *entity_name = NULL; uint8_t *entity_value_utf16_stream = NULL; const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_entity_reference"; size_t additional_value_size = 0; size_t utf8_string_size = 0; size_t trailing_data_size = 0; size_t xml_document_data_size = 0; uint32_t entity_name_offset = 0; uint32_t entity_name_size = 0; uint8_t entity_name_match = 0; int value_entry_index = 0; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( ( xml_token->type & 0xbf ) != LIBFWEVT_XML_TOKEN_ENTITY_REFERENCE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } if( ( flags & LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DATA_OFFSETS ) == 0 ) { additional_value_size = 4; } xml_document_data = &( binary_data[ binary_data_offset ] ); xml_document_data_size = binary_data_size - binary_data_offset; if( xml_document_data_size < ( 1 + additional_value_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: entity reference data:\n", function ); libcnotify_print_data( xml_document_data, 1 + additional_value_size, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 0 ] ); } #endif xml_token->size = 1; binary_data_offset += 1; if( ( flags & LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DATA_OFFSETS ) == 0 ) { entity_name_offset = (uint32_t) ( binary_data_offset + 1 ); } else { byte_stream_copy_to_uint32_little_endian( &( xml_document_data[ 1 ] ), entity_name_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: name offset\t\t: 0x%08" PRIx32 "\n", function, entity_name_offset ); } #endif xml_token->size += 4; binary_data_offset += 4; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif if( entity_name_offset > binary_data_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entity name offset value out of bounds.", function ); goto on_error; } if( binary_data_offset < entity_name_offset ) { trailing_data_size = entity_name_offset - binary_data_offset; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( xml_document_data[ 5 ] ), trailing_data_size, 0 ); } #endif xml_token->size += trailing_data_size; binary_data_offset += trailing_data_size; } if( libfwevt_xml_tag_initialize( &entity_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create entity XML tag.", function ); goto on_error; } if( libfwevt_xml_document_read_name( internal_xml_document, binary_data, binary_data_size, entity_name_offset, flags, &entity_name_size, entity_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read entity name.", function ); goto on_error; } if( binary_data_offset == entity_name_offset ) { xml_token->size += entity_name_size; } if( libfwevt_xml_tag_get_utf8_name_size( entity_xml_tag, &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 of entity name.", function ); goto on_error; } entity_name = (uint8_t *) memory_allocate( sizeof( uint8_t ) * utf8_string_size ); if( entity_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create entity name.", function ); goto on_error; } if( libfwevt_xml_tag_get_utf8_name( entity_xml_tag, entity_name, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy entity name to UTF-16 string.", function ); goto on_error; } if( libfwevt_xml_tag_set_value_type( xml_tag, LIBFVALUE_VALUE_TYPE_STRING_UTF16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value type.", function ); goto on_error; } /* Make sure the character value data is in UTF-16 litte-endian */ entity_value_utf16_stream = (uint8_t *) memory_allocate( sizeof( uint8_t ) * 4 ); if( entity_value_utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create entity value UTF-16 stream.", function ); goto on_error; } if( utf8_string_size == 3 ) { if( ( entity_name[ 0 ] == (uint8_t) 'g' ) && ( entity_name[ 1 ] == (uint8_t) 't' ) ) { entity_value_utf16_stream[ 0 ] = (uint8_t) '>'; entity_value_utf16_stream[ 1 ] = 0; entity_name_match = 1; } else if( ( entity_name[ 0 ] == (uint8_t) 'l' ) && ( entity_name[ 1 ] == (uint8_t) 't' ) ) { entity_value_utf16_stream[ 0 ] = (uint8_t) '<'; entity_value_utf16_stream[ 1 ] = 0; entity_name_match = 1; } } else if( utf8_string_size == 4 ) { if( ( entity_name[ 0 ] == (uint8_t) 'a' ) && ( entity_name[ 1 ] == (uint8_t) 'm' ) && ( entity_name[ 2 ] == (uint8_t) 'p' ) ) { entity_value_utf16_stream[ 0 ] = (uint8_t) '&'; entity_value_utf16_stream[ 1 ] = 0; entity_name_match = 1; } } else if( utf8_string_size == 5 ) { if( ( entity_name[ 0 ] == (uint8_t) 'a' ) && ( entity_name[ 1 ] == (uint8_t) 'p' ) && ( entity_name[ 2 ] == (uint8_t) 'o' ) && ( entity_name[ 3 ] == (uint8_t) 's' ) ) { entity_value_utf16_stream[ 0 ] = (uint8_t) '\''; entity_value_utf16_stream[ 1 ] = 0; entity_name_match = 1; } else if( ( entity_name[ 0 ] == (uint8_t) 'q' ) && ( entity_name[ 1 ] == (uint8_t) 'u' ) && ( entity_name[ 2 ] == (uint8_t) 'o' ) && ( entity_name[ 3 ] == (uint8_t) 't' ) ) { entity_value_utf16_stream[ 0 ] = (uint8_t) '"'; entity_value_utf16_stream[ 1 ] = 0; entity_name_match = 1; } } if( entity_name_match == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported entity name: %s\n", function, entity_name ); goto on_error; } entity_value_utf16_stream[ 2 ] = 0; entity_value_utf16_stream[ 3 ] = 0; memory_free( entity_name ); entity_name = NULL; if( libfwevt_xml_tag_append_value_data( xml_tag, entity_value_utf16_stream, 4, LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN, &value_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value data.", function ); goto on_error; } memory_free( entity_value_utf16_stream ); entity_value_utf16_stream = NULL; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfwevt_xml_tag_value_debug_print( xml_tag, value_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print value: %d.", function, value_entry_index ); goto on_error; } } #endif if( libfwevt_xml_tag_free( &entity_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free entity XML tag.", function ); goto on_error; } return( 1 ); on_error: if( entity_value_utf16_stream != NULL ) { memory_free( entity_value_utf16_stream ); } if( entity_name != NULL ) { memory_free( entity_name ); } if( entity_xml_tag != NULL ) { libfwevt_xml_tag_free( &entity_xml_tag, NULL ); } return( -1 ); } /* Reads a fragment from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_fragment( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { libfwevt_xml_token_t *xml_sub_token = NULL; static char *function = "libfwevt_xml_document_read_fragment"; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( libfwevt_xml_document_read_fragment_header( internal_xml_document, xml_token, binary_data, binary_data_size, binary_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read fragment header.", function ); goto on_error; } binary_data_offset += xml_token->size; if( libfwevt_xml_token_initialize( &xml_sub_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create binary XML sub token.", function ); goto on_error; } if( libfwevt_xml_token_read( xml_sub_token, binary_data, binary_data_size, binary_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML sub token.", function ); goto on_error; } switch( xml_sub_token->type & 0xbf ) { case LIBFWEVT_XML_TOKEN_OPEN_START_ELEMENT_TAG: if( libfwevt_xml_document_read_element( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset, ascii_codepage, flags, template_values_array, xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read element.", function ); goto on_error; } break; case LIBFWEVT_XML_TOKEN_TEMPLATE_INSTANCE: if( libfwevt_xml_document_read_template_instance( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset, ascii_codepage, flags, xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read document template instance.", function ); goto on_error; } break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_sub_token->type ); goto on_error; } xml_token->size += xml_sub_token->size; if( libfwevt_xml_token_free( &xml_sub_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free binary XML sub token.", function ); goto on_error; } return( 1 ); on_error: if( xml_sub_token != NULL ) { libfwevt_xml_token_free( &xml_sub_token, NULL ); } return( -1 ); } /* Reads a fragment header from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_fragment_header( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, libcerror_error_t **error ) { const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_fragment_header"; size_t xml_document_data_size = 0; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( xml_token->type != LIBFWEVT_XML_TOKEN_FRAGMENT_HEADER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) xml_document_data = &( binary_data[ binary_data_offset ] ); #endif xml_document_data_size = binary_data_size - binary_data_offset; if( xml_document_data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: fragment header data:\n", function ); libcnotify_print_data( xml_document_data, 4, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 0 ] ); libcnotify_printf( "%s: major version\t\t: %" PRIu8 "\n", function, xml_document_data[ 1 ] ); libcnotify_printf( "%s: minor version\t\t: %" PRIu8 "\n", function, xml_document_data[ 2 ] ); libcnotify_printf( "%s: flags\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 3 ] ); libcnotify_printf( "\n" ); } #endif /* TODO check values */ xml_token->size = 4; return( 1 ); } /* Reads a name from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_name( libfwevt_internal_xml_document_t *internal_xml_document, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, uint8_t flags, uint32_t *name_data_size, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_name"; size_t additional_value_size = 0; size_t xml_document_data_size = 0; uint32_t name_size = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; uint16_t value_16bit = 0; #endif if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } if( name_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name data size.", function ); return( -1 ); } if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } xml_document_data = &( binary_data[ binary_data_offset ] ); xml_document_data_size = binary_data_size - binary_data_offset; if( ( flags & LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DATA_OFFSETS ) != 0 ) { additional_value_size = 4; } if( ( additional_value_size + 4 ) > xml_document_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: name header data:\n", function ); libcnotify_print_data( xml_document_data, additional_value_size + 4, 0 ); } #endif if( ( flags & LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DATA_OFFSETS ) != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint32_little_endian( xml_document_data, value_32bit ); libcnotify_printf( "%s: name unknown1\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); } #endif } byte_stream_copy_to_uint16_little_endian( &( xml_document_data[ additional_value_size + 2 ] ), name_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint16_little_endian( &( xml_document_data[ additional_value_size ] ), value_16bit ); libcnotify_printf( "%s: name hash\t\t\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); libcnotify_printf( "%s: name number of characters\t\t: %" PRIu16 "\n", function, name_size ); } #endif name_size += 1; name_size *= 2; xml_document_data_size -= additional_value_size + 4; if( name_size > xml_document_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid name size value out of bounds.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: name data:\n", function ); libcnotify_print_data( &( xml_document_data[ additional_value_size + 4 ] ), name_size, 0 ); } #endif if( libfwevt_xml_tag_set_name_data( xml_tag, &( xml_document_data[ additional_value_size + 4 ] ), name_size, LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name data.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfwevt_xml_tag_name_debug_print( xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print name.", function ); return( -1 ); } } #endif *name_data_size = (uint32_t) ( additional_value_size + 4 + name_size ); return( 1 ); } /* Reads a normal substitution from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_normal_substitution( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, size_t *template_value_offset, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_normal_substitution"; size_t xml_document_data_size = 0; uint16_t template_value_index = 0; uint8_t template_value_type = 0; int result = 0; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( xml_token->type != LIBFWEVT_XML_TOKEN_NORMAL_SUBSTITUTION ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } xml_document_data = &( binary_data[ binary_data_offset ] ); xml_document_data_size = binary_data_size - binary_data_offset; if( xml_document_data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: normal substitution data:\n", function ); libcnotify_print_data( xml_document_data, 4, 0 ); } #endif byte_stream_copy_to_uint16_little_endian( &( xml_document_data[ 1 ] ), template_value_index ); template_value_type = xml_document_data[ 3 ]; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 0 ] ); libcnotify_printf( "%s: identifier\t\t: %" PRIu16 "\n", function, template_value_index ); libcnotify_printf( "%s: value type\t\t: 0x%02" PRIx8 " (", function, template_value_type ); libfwevt_debug_print_value_type( template_value_type ); libcnotify_printf( ")\n" ); libcnotify_printf( "\n" ); } #endif xml_token->size = 4; result = libfwevt_xml_document_substitute_template_value( internal_xml_document, binary_data, binary_data_size, ascii_codepage, flags, template_values_array, template_value_index, template_value_type, template_value_offset, xml_tag, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to substitute template value.", function ); return( -1 ); } return( 1 ); } /* Reads an optional substitution from a binary XML document * Returns 1 if successful, 0 if no substitution or -1 on error */ int libfwevt_xml_document_read_optional_substitution( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, size_t *template_value_offset, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_optional_substitution"; size_t xml_document_data_size = 0; uint16_t template_value_index = 0; uint8_t template_value_type = 0; int result = 0; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( xml_token->type != LIBFWEVT_XML_TOKEN_OPTIONAL_SUBSTITUTION ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } xml_document_data = &( binary_data[ binary_data_offset ] ); xml_document_data_size = binary_data_size - binary_data_offset; if( xml_document_data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: optional substitution data:\n", function ); libcnotify_print_data( xml_document_data, 4, 0 ); } #endif byte_stream_copy_to_uint16_little_endian( &( xml_document_data[ 1 ] ), template_value_index ); template_value_type = xml_document_data[ 3 ]; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 0 ] ); libcnotify_printf( "%s: identifier\t\t: %" PRIu16 "\n", function, template_value_index ); libcnotify_printf( "%s: value type\t\t: 0x%02" PRIx8 " (", function, template_value_type ); libfwevt_debug_print_value_type( template_value_type ); libcnotify_printf( ")\n" ); libcnotify_printf( "\n" ); } #endif xml_token->size = 4; result = libfwevt_xml_document_substitute_template_value( internal_xml_document, binary_data, binary_data_size, ascii_codepage, flags, template_values_array, template_value_index, template_value_type, template_value_offset, xml_tag, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to substitute template value.", function ); return( -1 ); } return( result ); } /* Reads a PI data from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_pi_data( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_pi_data"; size_t value_data_size = 0; size_t xml_document_data_size = 0; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( xml_token->type != LIBFWEVT_XML_TOKEN_PI_DATA ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } xml_document_data = &( binary_data[ binary_data_offset ] ); xml_document_data_size = binary_data_size - binary_data_offset; if( xml_document_data_size < 3 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: PI data:\n", function ); libcnotify_print_data( xml_document_data, 3, 0 ); } #endif byte_stream_copy_to_uint16_little_endian( &( xml_document_data[ 1 ] ), value_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 0 ] ); libcnotify_printf( "%s: number of characters\t\t: %" PRIzd "\n", function, value_data_size ); } #endif xml_token->size = 3; binary_data_offset += 3; value_data_size *= 2; if( ( binary_data_offset + value_data_size ) > binary_data_size ) { 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 defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data:\n", function ); libcnotify_print_data( &( xml_document_data[ 3 ] ), value_data_size, 0 ); } #endif if( libfwevt_xml_tag_set_value_type( xml_tag, LIBFVALUE_VALUE_TYPE_STRING_UTF16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value type.", function ); return( -1 ); } if( libfwevt_xml_tag_set_value_data( xml_tag, &( binary_data[ binary_data_offset ] ), value_data_size, LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value data.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfwevt_xml_tag_value_debug_print( xml_tag, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print value.", function ); return( -1 ); } } #endif xml_token->size += value_data_size; return( 1 ); } /* Reads a PI target from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_pi_target( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, uint8_t flags, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { libfwevt_xml_token_t *xml_sub_token = NULL; libfwevt_xml_tag_t *pi_xml_tag = NULL; const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_pi_target"; size_t additional_value_size = 0; size_t trailing_data_size = 0; size_t xml_document_data_size = 0; uint32_t pi_name_offset = 0; uint32_t pi_name_size = 0; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( xml_token->type != LIBFWEVT_XML_TOKEN_PI_TARGET ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } if( ( flags & LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DATA_OFFSETS ) == 0 ) { additional_value_size = 4; } xml_document_data = &( binary_data[ binary_data_offset ] ); xml_document_data_size = binary_data_size - binary_data_offset; if( xml_document_data_size < ( 1 + additional_value_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); return( -1 ); } if( libfwevt_xml_tag_initialize( &pi_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create PI XML tag.", function ); goto on_error; } if( libfwevt_xml_tag_set_type( pi_xml_tag, LIBFWEVT_XML_TAG_TYPE_PI, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set XML tag type.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: PI target data:\n", function ); libcnotify_print_data( xml_document_data, 1 + additional_value_size, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 0 ] ); } #endif if( ( flags & LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DATA_OFFSETS ) == 0 ) { pi_name_offset = (uint32_t) ( binary_data_offset + 1 ); } else { byte_stream_copy_to_uint32_little_endian( &( xml_document_data[ 1 ] ), pi_name_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: name offset\t\t\t: 0x%08" PRIx32 "\n", function, pi_name_offset ); } #endif } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif xml_token->size = 5; binary_data_offset += 5; if( pi_name_offset > binary_data_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid PI name offset value out of bounds.", function ); return( -1 ); } if( binary_data_offset < pi_name_offset ) { trailing_data_size = pi_name_offset - binary_data_offset; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( xml_document_data[ 5 ] ), trailing_data_size, 0 ); } #endif xml_token->size += trailing_data_size; binary_data_offset += trailing_data_size; } if( libfwevt_xml_document_read_name( internal_xml_document, binary_data, binary_data_size, pi_name_offset, flags, &pi_name_size, pi_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read PI name.", function ); goto on_error; } if( binary_data_offset == pi_name_offset ) { xml_token->size += pi_name_size; binary_data_offset += pi_name_size; } if( libfwevt_xml_token_initialize( &xml_sub_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create binary XML sub token.", function ); goto on_error; } if( libfwevt_xml_token_read( xml_sub_token, binary_data, binary_data_size, binary_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML sub token.", function ); goto on_error; } if( libfwevt_xml_document_read_pi_data( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset, pi_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read PI target.", function ); goto on_error; } xml_token->size += xml_sub_token->size; if( libfwevt_xml_token_free( &xml_sub_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free binary XML sub token.", function ); goto on_error; } if( libfwevt_xml_tag_append_element( xml_tag, pi_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append PI to XML tag.", function ); goto on_error; } pi_xml_tag = NULL; return( 1 ); on_error: if( xml_sub_token != NULL ) { libfwevt_xml_token_free( &xml_sub_token, NULL ); } if( pi_xml_tag != NULL ) { libfwevt_xml_tag_free( &pi_xml_tag, NULL ); } return( -1 ); } /* Reads a template instance from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_template_instance( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, int ascii_codepage, uint8_t flags, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { libcdata_array_t *template_values_array = NULL; libfwevt_xml_token_t *xml_sub_token = NULL; const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_template_instance"; size_t template_data_offset = 0; size_t template_data_size = 0; size_t template_values_data_offset = 0; size_t template_values_data_size = 0; size_t trailing_data_size = 0; size_t xml_document_data_size = 0; uint32_t template_definition_data_offset = 0; uint32_t template_definition_data_size = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t guid_string[ 48 ]; libfguid_identifier_t *guid = NULL; uint32_t value_32bit = 0; int result = 0; #endif if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( xml_token->type != LIBFWEVT_XML_TOKEN_TEMPLATE_INSTANCE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } xml_document_data = &( binary_data[ binary_data_offset ] ); xml_document_data_size = binary_data_size - binary_data_offset; if( ( binary_data_offset + 10 ) >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: template instance header data:\n", function ); libcnotify_print_data( xml_document_data, 10, 0 ); } #endif byte_stream_copy_to_uint32_little_endian( &( xml_document_data[ 6 ] ), template_definition_data_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 0 ] ); libcnotify_printf( "%s: unknown1\t\t\t: %" PRIu8 "\n", function, xml_document_data[ 1 ] ); byte_stream_copy_to_uint32_little_endian( &( xml_document_data[ 2 ] ), value_32bit ); libcnotify_printf( "%s: unknown2\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: data offset\t\t: 0x%08" PRIx32 "\n", function, template_definition_data_offset ); libcnotify_printf( "\n" ); } #endif xml_token->size = 10; binary_data_offset += 10; if( template_definition_data_offset > binary_data_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template definition data offset value out of bounds.", function ); goto on_error; } if( binary_data_offset < template_definition_data_offset ) { trailing_data_size = template_definition_data_offset - binary_data_offset; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( binary_data[ binary_data_offset ] ), trailing_data_size, 0 ); } #endif xml_token->size += trailing_data_size; binary_data_offset += trailing_data_size; } template_data_offset = template_definition_data_offset; if( ( template_data_offset + 24 ) >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( &( binary_data[ template_data_offset + 20 ] ), template_definition_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint32_little_endian( &( binary_data[ template_data_offset ] ), value_32bit ); libcnotify_printf( "%s: offset next\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); 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, &( binary_data[ template_data_offset + 4 ] ), 16, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); goto on_error; } #if defined( 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: identifier\t\t: %" PRIs_SYSTEM "\n", function, guid_string ); if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); goto on_error; } libcnotify_printf( "%s: definition size\t\t: %" PRIu32 "\n", function, template_definition_data_size ); libcnotify_printf( "\n" ); } #endif if( template_data_offset == binary_data_offset ) { template_values_data_offset = 24 + template_definition_data_size; } else { template_values_data_offset = 0; } template_data_offset += 24; if( template_values_data_offset >= xml_document_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template values data offset value out of bounds.", function ); goto on_error; } if( libfwevt_xml_document_read_template_instance_values( internal_xml_document, binary_data, binary_data_size, binary_data_offset + template_values_data_offset, &template_values_array, &template_values_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read document template instance values.", function ); goto on_error; } xml_token->size += template_values_data_size; if( libfwevt_xml_token_initialize( &xml_sub_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create binary XML sub token.", function ); goto on_error; } if( libfwevt_xml_token_read( xml_sub_token, binary_data, binary_data_size, template_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML sub token.", function ); goto on_error; } if( libfwevt_xml_document_read_fragment_header( internal_xml_document, xml_sub_token, binary_data, binary_data_size, template_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read fragment header.", function ); goto on_error; } template_data_offset += xml_sub_token->size; if( libfwevt_xml_token_read( xml_sub_token, binary_data, binary_data_size, template_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML sub token.", function ); goto on_error; } if( libfwevt_xml_document_read_element( internal_xml_document, xml_sub_token, binary_data, binary_data_size, template_data_offset, ascii_codepage, flags, template_values_array, xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read element.", function ); goto on_error; } template_data_offset += xml_sub_token->size; if( libfwevt_xml_token_read( xml_sub_token, binary_data, binary_data_size, template_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML sub token.", function ); goto on_error; } if( xml_sub_token->type != LIBFWEVT_XML_TOKEN_END_OF_FILE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } if( ( binary_data_offset + 1 ) > binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: end of file data:\n", function ); libcnotify_print_data( &( binary_data[ binary_data_offset ] ), 1, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t: 0x%02" PRIx8 "\n", function, binary_data[ binary_data_offset ] ); libcnotify_printf( "\n" ); } #endif template_data_offset += 1; if( libfwevt_xml_token_free( &xml_sub_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free binary XML sub token.", function ); goto on_error; } if( template_definition_data_offset == binary_data_offset ) { template_data_size = template_data_offset - template_definition_data_offset; xml_token->size += template_data_size; /* The template data size does not include the first 33 bytes * of the template definition * In this case the template data size contains 24 of the 33 bytes */ if( template_definition_data_size < ( template_data_size - 24 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template definition data size value too small.", function ); goto on_error; } template_definition_data_size -= (uint32_t) ( template_data_size - 24 ); } /* TODO check if template_definition_data_size is 0 */ if( libcdata_array_free( &template_values_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_xml_template_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free template values array.", function ); goto on_error; } return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( guid != NULL ) { libfguid_identifier_free( &guid, NULL ); } #endif if( template_values_array != NULL ) { libcdata_array_free( &template_values_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_xml_template_value_free, NULL ); } if( xml_sub_token != NULL ) { libfwevt_xml_token_free( &xml_sub_token, NULL ); } return( -1 ); } /* Reads the template instance values from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_template_instance_values( libfwevt_internal_xml_document_t *internal_xml_document, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, libcdata_array_t **template_values_array, size_t *template_values_size, libcerror_error_t **error ) { libfwevt_xml_template_value_t *template_value = NULL; static char *function = "libfwevt_xml_document_read_template_instance_values"; size_t template_value_definitions_data_size = 0; size_t template_values_data_size = 0; uint32_t number_of_template_values = 0; uint32_t template_value_index = 0; uint16_t template_value_data_size = 0; uint8_t template_value_type = 0; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( ( binary_data_offset + 4 ) >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } if( template_values_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template values size.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: template instance data:\n", function ); libcnotify_print_data( &( binary_data[ binary_data_offset ] ), 4, 0 ); } #endif byte_stream_copy_to_uint32_little_endian( &( binary_data[ binary_data_offset ] ), number_of_template_values ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: number of values\t: %" PRIu32 "\n", function, number_of_template_values ); libcnotify_printf( "\n" ); } #endif *template_values_size = 4; binary_data_offset += 4; template_value_definitions_data_size = number_of_template_values * 4; if( ( binary_data_offset + template_value_definitions_data_size ) >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: template instance value descriptor data:\n", function ); libcnotify_print_data( &( binary_data[ binary_data_offset ] ), template_value_definitions_data_size, 0 ); } #endif if( libcdata_array_initialize( template_values_array, number_of_template_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create template values array.", function ); goto on_error; } for( template_value_index = 0; template_value_index < number_of_template_values; template_value_index++ ) { byte_stream_copy_to_uint16_little_endian( &( binary_data[ binary_data_offset ] ), template_value_data_size ); template_value_type = binary_data[ binary_data_offset + 2 ]; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value: %02" PRIu32 " size\t: %" PRIu16 "\n", function, template_value_index, template_value_data_size ); libcnotify_printf( "%s: value: %02" PRIu32 " type\t: 0x%02" PRIx8 " (", function, template_value_index, template_value_type ); libfwevt_debug_print_value_type( template_value_type ); libcnotify_printf( ")\n" ); libcnotify_printf( "%s: value: %02" PRIu32 " unknown1\t: 0x%02" PRIx8 "\n", function, template_value_index, binary_data[ binary_data_offset + 3 ] ); libcnotify_printf( "\n" ); } #endif *template_values_size += 4; binary_data_offset += 4; template_values_data_size += template_value_data_size; if( libfwevt_xml_template_value_initialize( &template_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create template value.", function ); goto on_error; } if( libfwevt_xml_template_value_set_type( template_value, template_value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set template value type.", function ); libfwevt_xml_template_value_free( &template_value, NULL ); goto on_error; } if( libfwevt_xml_template_value_set_size( template_value, template_value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set template value data size.", function ); libfwevt_xml_template_value_free( &template_value, NULL ); goto on_error; } if( libcdata_array_set_entry_by_index( *template_values_array, (int) template_value_index, (intptr_t *) template_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set template value: %" PRIu32 " in array.", function, template_value_index ); libfwevt_xml_template_value_free( &template_value, NULL ); goto on_error; } template_value = NULL; } if( ( binary_data_offset + template_values_data_size ) >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: values data:\n", function ); libcnotify_print_data( &( binary_data[ binary_data_offset ] ), template_values_data_size, 0 ); } #endif for( template_value_index = 0; template_value_index < number_of_template_values; template_value_index++ ) { if( libcdata_array_get_entry_by_index( *template_values_array, (int) template_value_index, (intptr_t **) &template_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template value: %" PRIu32 " from array.", function, template_value_index ); goto on_error; } if( libfwevt_xml_template_value_get_size( template_value, &template_value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template value data size.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value: %02" PRIu32 " data:\n", function, template_value_index ); libcnotify_print_data( &( binary_data[ binary_data_offset ] ), template_value_data_size, 0 ); } #endif if( libfwevt_xml_template_value_set_offset( template_value, binary_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set template value data offset.", function ); goto on_error; } binary_data_offset += template_value_data_size; } *template_values_size += template_values_data_size; return( 1 ); on_error: if( template_values_array != NULL ) { libcdata_array_free( template_values_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_xml_template_value_free, NULL ); } return( -1 ); } /* Reads a value from a binary XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_read_value( libfwevt_internal_xml_document_t *internal_xml_document, libfwevt_xml_token_t *xml_token, const uint8_t *binary_data, size_t binary_data_size, size_t binary_data_offset, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { const uint8_t *xml_document_data = NULL; static char *function = "libfwevt_xml_document_read_value"; size_t value_data_size = 0; size_t xml_document_data_size = 0; uint8_t xml_value_type = 0; int value_encoding = 0; int value_entry_index = 0; int value_type = 0; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( ( xml_token->type & 0xbf ) != LIBFWEVT_XML_TOKEN_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_token->type ); return( -1 ); } 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 XML document data size value exceeds maximum.", function ); return( -1 ); } if( binary_data_offset >= binary_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary data offset value out of bounds.", function ); return( -1 ); } if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } xml_document_data = &( binary_data[ binary_data_offset ] ); xml_document_data_size = binary_data_size - binary_data_offset; if( xml_document_data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML document data size value too small.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data:\n", function ); libcnotify_print_data( xml_document_data, 4, 0 ); } #endif xml_value_type = xml_document_data[ 1 ]; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t\t\t\t: 0x%02" PRIx8 "\n", function, xml_document_data[ 0 ] ); libcnotify_printf( "%s: value type\t\t\t\t: 0x%02" PRIx8 " (", function, xml_value_type ); libfwevt_debug_print_value_type( xml_value_type ); libcnotify_printf( ")\n" ); } #endif xml_token->size = 4; binary_data_offset += 4; switch( xml_value_type ) { case LIBFWEVT_VALUE_TYPE_STRING_UTF16: byte_stream_copy_to_uint16_little_endian( &( xml_document_data[ 2 ] ), value_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: number of characters\t\t\t: %" PRIzd "\n", function, value_data_size ); } #endif value_data_size *= 2; value_encoding = LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN; value_type = LIBFVALUE_VALUE_TYPE_STRING_UTF16; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%02" PRIx8 ".", function, value_type ); return( -1 ); } if( ( binary_data_offset + value_data_size ) > binary_data_size ) { 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 defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data:\n", function ); libcnotify_print_data( &( binary_data[ binary_data_offset ] ), value_data_size, 0 ); } #endif if( libfwevt_xml_tag_set_value_type( xml_tag, value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value type.", function ); return( -1 ); } if( libfwevt_xml_tag_append_value_data( xml_tag, &( binary_data[ binary_data_offset ] ), value_data_size, value_encoding, &value_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value data.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfwevt_xml_tag_value_debug_print( xml_tag, value_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print value: %d.", function, value_entry_index ); return( -1 ); } } #endif xml_token->size += value_data_size; return( 1 ); } /* Substitutes a substitution placeholder with a template value * Returns 1 if successful, 0 if no substitution or -1 on error */ int libfwevt_xml_document_substitute_template_value( libfwevt_internal_xml_document_t *internal_xml_document, const uint8_t *binary_data, size_t binary_data_size, int ascii_codepage, uint8_t flags, libcdata_array_t *template_values_array, uint16_t template_value_index, uint8_t template_value_type, size_t *template_value_offset, libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { libfwevt_xml_template_value_t *template_value = NULL; libfwevt_xml_token_t *xml_sub_token = NULL; const uint8_t *template_value_data = NULL; static char *function = "libfwevt_xml_document_substitute_template_value"; size_t binary_data_offset = 0; size_t template_value_data_size = 0; size_t template_value_size = 0; ssize_t read_count = 0; uint32_t value_format_flags = 0; uint16_t substitution_value_data_size = 0; uint8_t substitution_value_type = 0; uint8_t template_value_flags = 0; int value_type = 0; int value_encoding = 0; if( internal_xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } if( template_value_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template value offset.", function ); return( -1 ); } if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( template_values_array, (int) template_value_index, (intptr_t **) &template_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template value: %" PRIu16 " from array.", function, template_value_index ); goto on_error; } if( libfwevt_xml_template_value_get_flags( template_value, &template_value_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template value flags.", function ); goto on_error; } if( ( template_value_flags & LIBFWEVT_XML_TEMPLATE_VALUE_FLAG_IS_DEFINITION ) != 0 ) { substitution_value_type = LIBFWEVT_VALUE_TYPE_STRING_UTF16; } else { if( libfwevt_xml_template_value_get_type( template_value, &substitution_value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template value type.", function ); goto on_error; } } if( libfwevt_xml_template_value_get_offset( template_value, &binary_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template value data offset.", function ); goto on_error; } if( libfwevt_xml_template_value_get_size( template_value, &substitution_value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template value data size.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value: %02" PRIu32 " size\t: %" PRIu16 "\n", function, template_value_index, substitution_value_data_size ); libcnotify_printf( "%s: value: %02" PRIu32 " type\t: 0x%02" PRIx8 " (", function, template_value_index, substitution_value_type ); libfwevt_debug_print_value_type( substitution_value_type ); libcnotify_printf( ")\n" ); libcnotify_printf( "%s: value: %02" PRIu32 " data:\n", function, template_value_index ); libcnotify_print_data( &( binary_data[ binary_data_offset ] ), substitution_value_data_size, 0 ); libcnotify_printf( "\n" ); } #endif /* No substitution */ if( substitution_value_type == LIBFWEVT_VALUE_TYPE_NULL ) { return( 0 ); } #if defined( HAVE_VERBOSE_OUTPUT ) if( template_value_type != substitution_value_type ) { /* The size type can be substituded by a 32-bit or 64-bit hexadecimal integer * The same applies to it's array type */ if( ( ( template_value_type & 0x7f ) != LIBFWEVT_VALUE_TYPE_SIZE ) || ( ( ( substitution_value_type & 0x7f ) != LIBFWEVT_VALUE_TYPE_HEXADECIMAL_INTEGER_32BIT ) && ( ( substitution_value_type & 0x7f ) != LIBFWEVT_VALUE_TYPE_HEXADECIMAL_INTEGER_64BIT ) ) ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in value type ( 0x%02" PRIx8 " != 0x%02" PRIx8 " ).\n", function, template_value_type, substitution_value_type ); } } } #endif if( substitution_value_type == LIBFWEVT_VALUE_TYPE_BINARY_XML ) { if( libfwevt_xml_token_initialize( &xml_sub_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create binary XML sub token.", function ); goto on_error; } if( libfwevt_xml_token_read( xml_sub_token, binary_data, binary_data_size, binary_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML sub token.", function ); goto on_error; } switch( xml_sub_token->type & 0xbf ) { case LIBFWEVT_XML_TOKEN_OPEN_START_ELEMENT_TAG: if( libfwevt_xml_document_read_element( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset, ascii_codepage, flags & ~( LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DEPENDENCY_IDENTIFIERS ), template_values_array, xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read element.", function ); goto on_error; } break; case LIBFWEVT_XML_TOKEN_FRAGMENT_HEADER: if( libfwevt_xml_document_read_fragment( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset, ascii_codepage, flags, NULL, xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read fragment header.", function ); goto on_error; } break; case LIBFWEVT_XML_TOKEN_TEMPLATE_INSTANCE: if( libfwevt_xml_document_read_template_instance( internal_xml_document, xml_sub_token, binary_data, binary_data_size, binary_data_offset, ascii_codepage, flags, xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read document template instance.", function ); goto on_error; } break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid binary XML token - unsupported type: 0x%02" PRIx8 ".", function, xml_sub_token->type ); goto on_error; } if( libfwevt_xml_token_free( &xml_sub_token, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free binary XML sub token.", function ); goto on_error; } } else { /* TODO for now the array types are kept separate to find undocumented values * when done apply ( substitution_value_type & 0x7f ) and remove the array types */ switch( substitution_value_type ) { case LIBFWEVT_VALUE_TYPE_STRING_UTF16: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_STRING_UTF16: value_encoding = LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN; value_type = LIBFVALUE_VALUE_TYPE_STRING_UTF16; break; case LIBFWEVT_VALUE_TYPE_STRING_BYTE_STREAM: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_STRING_BYTE_STREAM: value_encoding = ascii_codepage; value_type = LIBFVALUE_VALUE_TYPE_STRING_BYTE_STREAM; break; case LIBFWEVT_VALUE_TYPE_INTEGER_8BIT: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_INTEGER_8BIT: template_value_size = 1; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL_SIGNED; value_type = LIBFVALUE_VALUE_TYPE_INTEGER_8BIT; break; case LIBFWEVT_VALUE_TYPE_UNSIGNED_INTEGER_8BIT: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_UNSIGNED_INTEGER_8BIT: template_value_size = 1; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL_UNSIGNED; value_type = LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_8BIT; break; case LIBFWEVT_VALUE_TYPE_INTEGER_16BIT: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_INTEGER_16BIT: template_value_size = 2; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL_SIGNED; value_type = LIBFVALUE_VALUE_TYPE_INTEGER_16BIT; break; case LIBFWEVT_VALUE_TYPE_UNSIGNED_INTEGER_16BIT: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_UNSIGNED_INTEGER_16BIT: template_value_size = 2; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL_UNSIGNED; value_type = LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_16BIT; break; case LIBFWEVT_VALUE_TYPE_INTEGER_32BIT: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_INTEGER_32BIT: template_value_size = 4; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL_SIGNED; value_type = LIBFVALUE_VALUE_TYPE_INTEGER_32BIT; break; case LIBFWEVT_VALUE_TYPE_UNSIGNED_INTEGER_32BIT: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_UNSIGNED_INTEGER_32BIT: template_value_size = 4; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL_UNSIGNED; value_type = LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_32BIT; break; case LIBFWEVT_VALUE_TYPE_HEXADECIMAL_INTEGER_32BIT: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_HEXADECIMAL_INTEGER_32BIT: template_value_size = 4; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL; value_type = LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_32BIT; break; case LIBFWEVT_VALUE_TYPE_INTEGER_64BIT: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_INTEGER_64BIT: template_value_size = 8; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL_SIGNED; value_type = LIBFVALUE_VALUE_TYPE_INTEGER_64BIT; break; case LIBFWEVT_VALUE_TYPE_UNSIGNED_INTEGER_64BIT: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_UNSIGNED_INTEGER_64BIT: template_value_size = 8; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL_UNSIGNED; value_type = LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_64BIT; break; case LIBFWEVT_VALUE_TYPE_HEXADECIMAL_INTEGER_64BIT: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_HEXADECIMAL_INTEGER_64BIT: template_value_size = 8; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL; value_type = LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_64BIT; break; case LIBFWEVT_VALUE_TYPE_FLOATING_POINT_32BIT: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_FLOATING_POINT_32BIT: template_value_size = 4; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL; value_type = LIBFVALUE_VALUE_TYPE_FLOATING_POINT_32BIT; break; case LIBFWEVT_VALUE_TYPE_FLOATING_POINT_64BIT: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_FLOATING_POINT_64BIT: template_value_size = 8; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL; value_type = LIBFVALUE_VALUE_TYPE_FLOATING_POINT_64BIT; break; case LIBFWEVT_VALUE_TYPE_BOOLEAN: template_value_size = 4; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN; value_type = LIBFVALUE_VALUE_TYPE_BOOLEAN; break; case LIBFWEVT_VALUE_TYPE_BINARY_DATA: value_format_flags = LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE16 | LIBFVALUE_BINARY_DATA_FORMAT_FLAG_CASE_UPPER; value_type = LIBFVALUE_VALUE_TYPE_BINARY_DATA; break; case LIBFWEVT_VALUE_TYPE_GUID: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_GUID: template_value_size = 16; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_GUID_FORMAT_FLAG_USE_UPPER_CASE | LIBFVALUE_GUID_FORMAT_FLAG_USE_SURROUNDING_BRACES; value_type = LIBFVALUE_VALUE_TYPE_GUID; break; /* TODO how to deal with array types ? */ case LIBFWEVT_VALUE_TYPE_SIZE: value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL_UNSIGNED; if( substitution_value_data_size == 4 ) { value_type = LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_32BIT; } else if( substitution_value_data_size == 8 ) { value_type = LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_64BIT; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value data size: %" PRIu16 ".", function, substitution_value_data_size ); goto on_error; } break; case LIBFWEVT_VALUE_TYPE_FILETIME: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_FILETIME: template_value_size = 8; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = (uint32_t) ( LIBFVALUE_DATE_TIME_FORMAT_TYPE_ISO8601 | LIBFVALUE_DATE_TIME_FORMAT_FLAG_DATE_TIME_NANO_SECONDS | LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIMEZONE_INDICATOR ); value_type = LIBFVALUE_VALUE_TYPE_FILETIME; break; case LIBFWEVT_VALUE_TYPE_SYSTEMTIME: case LIBFWEVT_VALUE_TYPE_ARRAY_OF_SYSTEMTIME: template_value_size = 16; value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_format_flags = (uint32_t) ( LIBFVALUE_DATE_TIME_FORMAT_TYPE_ISO8601 | LIBFVALUE_DATE_TIME_FORMAT_FLAG_DATE_TIME_MILLI_SECONDS | LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIMEZONE_INDICATOR ); value_type = LIBFVALUE_VALUE_TYPE_SYSTEMTIME; break; case LIBFWEVT_VALUE_TYPE_NT_SECURITY_IDENTIFIER: value_encoding = LIBFVALUE_ENDIAN_LITTLE; value_type = LIBFVALUE_VALUE_TYPE_NT_SECURITY_IDENTIFIER; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%02" PRIx8 ".", function, substitution_value_type ); goto on_error; } if( libfwevt_xml_tag_set_value_type( xml_tag, value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value type.", function ); goto on_error; } if( value_format_flags != 0 ) { if( libfwevt_xml_tag_set_value_format_flags( xml_tag, value_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value format flags.", function ); goto on_error; } } if( ( substitution_value_type & LIBFWEVT_VALUE_TYPE_ARRAY ) != 0 ) { if( substitution_value_data_size > 0 ) { if( *template_value_offset >= (size_t) substitution_value_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template value offset value out of bounds.", function ); goto on_error; } template_value_data = &( binary_data[ binary_data_offset + *template_value_offset ] ); template_value_data_size = substitution_value_data_size - (uint16_t) *template_value_offset; } if( ( substitution_value_type == LIBFWEVT_VALUE_TYPE_ARRAY_OF_STRING_BYTE_STREAM ) || ( substitution_value_type == LIBFWEVT_VALUE_TYPE_ARRAY_OF_STRING_UTF16 ) ) { read_count = libfwevt_xml_tag_set_value_strings_array( xml_tag, template_value_data, template_value_data_size, value_encoding, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value data.", function ); goto on_error; } *template_value_offset += read_count; } else { if( template_value_size > template_value_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template value size value out of bounds.", function ); goto on_error; } if( libfwevt_xml_tag_set_value_data( xml_tag, template_value_data, template_value_size, value_encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value data.", function ); goto on_error; } *template_value_offset += template_value_size; } if( *template_value_offset == substitution_value_data_size ) { *template_value_offset = 0; } } else { if( libfwevt_xml_tag_set_value_data( xml_tag, &( binary_data[ binary_data_offset ] ), (size_t) substitution_value_data_size, value_encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value data.", function ); goto on_error; } } if( libfwevt_xml_tag_set_flags( xml_tag, LIBFWEVT_XML_TAG_FLAG_IS_TEMPLATE_DEFINITION, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set flags.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfwevt_xml_tag_value_debug_print( xml_tag, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print value.", function ); goto on_error; } } #endif } return( 1 ); on_error: if( xml_sub_token != NULL ) { libfwevt_xml_token_free( &xml_sub_token, NULL ); } return( -1 ); } /* Retrieves the size of the UTF-8 formatted string of the XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_get_utf8_xml_string_size( libfwevt_xml_document_t *xml_document, size_t *utf8_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_document_t *internal_xml_document = NULL; static char *function = "libfwevt_xml_document_get_utf8_xml_string_size"; if( xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML document.", function ); return( -1 ); } internal_xml_document = (libfwevt_internal_xml_document_t *) xml_document; if( libfwevt_xml_tag_get_utf8_xml_string_size( internal_xml_document->root_xml_tag, 0, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of UTF-8 string of root XML tag.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 formatted string of the XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_get_utf8_xml_string( libfwevt_xml_document_t *xml_document, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_document_t *internal_xml_document = NULL; static char *function = "libfwevt_xml_document_get_utf8_xml_string"; size_t utf8_string_index = 0; if( xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML document.", function ); return( -1 ); } internal_xml_document = (libfwevt_internal_xml_document_t *) xml_document; if( libfwevt_xml_tag_get_utf8_xml_string_with_index( internal_xml_document->root_xml_tag, 0, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-8 string of root XML tag.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 formatted string of the XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_get_utf16_xml_string_size( libfwevt_xml_document_t *xml_document, size_t *utf16_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_document_t *internal_xml_document = NULL; static char *function = "libfwevt_xml_document_get_utf16_xml_string_size"; if( xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML document.", function ); return( -1 ); } internal_xml_document = (libfwevt_internal_xml_document_t *) xml_document; if( libfwevt_xml_tag_get_utf16_xml_string_size( internal_xml_document->root_xml_tag, 0, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of UTF-16 string of root XML tag.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 formatted string of the XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_get_utf16_xml_string( libfwevt_xml_document_t *xml_document, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_document_t *internal_xml_document = NULL; static char *function = "libfwevt_xml_document_get_utf16_xml_string"; size_t utf16_string_index = 0; if( xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML document.", function ); return( -1 ); } internal_xml_document = (libfwevt_internal_xml_document_t *) xml_document; if( libfwevt_xml_tag_get_utf16_xml_string_with_index( internal_xml_document->root_xml_tag, 0, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-16 string of root XML tag.", function ); return( -1 ); } return( 1 ); } #if defined( HAVE_DEBUG_OUTPUT ) /* Debug prints the XML document * Returns 1 if successful or -1 on error */ int libfwevt_xml_document_debug_print( libfwevt_xml_document_t *xml_document, libcerror_error_t **error ) { libfwevt_internal_xml_document_t *internal_xml_document = NULL; static char *function = "libfwevt_xml_document_print"; if( xml_document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML document.", function ); return( -1 ); } internal_xml_document = (libfwevt_internal_xml_document_t *) xml_document; if( libfwevt_xml_tag_debug_print( internal_xml_document->root_xml_tag, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print root XML tag.", function ); return( -1 ); } return( 1 ); } #endif libevt-20170120/libfwevt/libfwevt_map.c0000664000175000017500000001226713040331702022003 0ustar00lordyestalordyesta00000000000000/* * Map functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_map.h" #include "libfwevt_types.h" #include "fwevt_template.h" /* Creates a map * Make sure the value map is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_map_initialize( libfwevt_map_t **map, libcerror_error_t **error ) { libfwevt_internal_map_t *internal_map = NULL; static char *function = "libfwevt_map_initialize"; if( map == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid map.", function ); return( -1 ); } if( *map != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid map value already set.", function ); return( -1 ); } internal_map = memory_allocate_structure( libfwevt_internal_map_t ); if( internal_map == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create map.", function ); goto on_error; } if( memory_set( internal_map, 0, sizeof( libfwevt_internal_map_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear map.", function ); goto on_error; } *map = (libfwevt_map_t *) internal_map; return( 1 ); on_error: if( internal_map != NULL ) { memory_free( internal_map ); } return( -1 ); } /* Frees a map * Returns 1 if successful or -1 on error */ int libfwevt_map_free( libfwevt_map_t **map, libcerror_error_t **error ) { libfwevt_internal_map_t *internal_map = NULL; static char *function = "libfwevt_map_free"; if( map == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid map.", function ); return( -1 ); } if( *map != NULL ) { internal_map = (libfwevt_internal_map_t *) *map; *map = NULL; memory_free( internal_map ); } return( 1 ); } /* Reads the map * Returns 1 if successful or -1 on error */ int libfwevt_map_read( libfwevt_map_t *map, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ) { /* TODO libfwevt_internal_map_t *internal_map = NULL; */ fwevt_template_map_t *wevt_map = NULL; static char *function = "libfwevt_map_read"; if( map == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid map.", function ); return( -1 ); } /* TODO internal_map = (libfwevt_internal_map_t *) map; */ 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_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( data_size < sizeof( fwevt_template_map_t ) ) || ( data_offset > ( data_size - sizeof( fwevt_template_map_t ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) /* TODO implement map support */ wevt_map = (fwevt_template_map_t *) &( data[ data_offset ] ); #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c%c%c\n", function, wevt_map->signature[ 0 ], wevt_map->signature[ 1 ], wevt_map->signature[ 2 ], wevt_map->signature[ 3 ] ); } #endif /* TODO implement map support */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); } libevt-20170120/libfwevt/libfwevt_xml_tag.h0000664000175000017500000002154513040331702022665 0ustar00lordyestalordyesta00000000000000/* * XML tag functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_XML_TAG_H ) #define _LIBFWEVT_INTERNAL_XML_TAG_H #include #include #include "libfwevt_extern.h" #include "libfwevt_libcdata.h" #include "libfwevt_libcerror.h" #include "libfwevt_libfvalue.h" #include "libfwevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_xml_tag libfwevt_internal_xml_tag_t; struct libfwevt_internal_xml_tag { /* The type */ uint8_t type; /* The name (value) */ libfvalue_value_t *name; /* The value type */ int value_type; /* The value (value) */ libfvalue_value_t *value; /* The attributes array */ libcdata_array_t *attributes_array; /* The elements array */ libcdata_array_t *elements_array; /* The flags */ uint8_t flags; }; int libfwevt_xml_tag_initialize( libfwevt_xml_tag_t **xml_tag, libcerror_error_t **error ); int libfwevt_xml_tag_free( libfwevt_xml_tag_t **xml_tag, libcerror_error_t **error ); int libfwevt_xml_tag_set_type( libfwevt_xml_tag_t *xml_tag, uint8_t type, libcerror_error_t **error ); int libfwevt_xml_tag_set_name_data( libfwevt_xml_tag_t *xml_tag, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ); int libfwevt_xml_tag_get_value( libfwevt_xml_tag_t *xml_tag, libfvalue_value_t **value, libcerror_error_t **error ); int libfwevt_xml_tag_set_value_type( libfwevt_xml_tag_t *xml_tag, int value_type, libcerror_error_t **error ); int libfwevt_xml_tag_set_value_format_flags( libfwevt_xml_tag_t *xml_tag, uint32_t format_flags, libcerror_error_t **error ); int libfwevt_xml_tag_set_value_data( libfwevt_xml_tag_t *xml_tag, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ); int libfwevt_xml_tag_append_value_data( libfwevt_xml_tag_t *xml_tag, const uint8_t *data, size_t data_size, int encoding, int *value_entry_index, libcerror_error_t **error ); ssize_t libfwevt_xml_tag_set_value_strings_array( libfwevt_xml_tag_t *xml_tag, const uint8_t *strings_array_data, size_t strings_array_data_size, int encoding, libcerror_error_t **error ); int libfwevt_xml_tag_append_attribute( libfwevt_xml_tag_t *xml_tag, libfwevt_xml_tag_t *attribute_xml_tag, libcerror_error_t **error ); int libfwevt_xml_tag_append_element( libfwevt_xml_tag_t *xml_tag, libfwevt_xml_tag_t *element_xml_tag, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_utf8_name_size( libfwevt_xml_tag_t *xml_tag, size_t *utf8_string_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_utf8_name( libfwevt_xml_tag_t *xml_tag, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_utf16_name_size( libfwevt_xml_tag_t *xml_tag, size_t *utf16_string_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_utf16_name( libfwevt_xml_tag_t *xml_tag, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_utf8_value_size( libfwevt_xml_tag_t *xml_tag, size_t *utf8_string_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_utf8_value( libfwevt_xml_tag_t *xml_tag, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_utf16_value_size( libfwevt_xml_tag_t *xml_tag, size_t *utf16_string_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_utf16_value( libfwevt_xml_tag_t *xml_tag, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_number_of_attributes( libfwevt_xml_tag_t *xml_tag, int *number_of_attributes, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_attribute_by_index( libfwevt_xml_tag_t *xml_tag, int attribute_index, libfwevt_xml_tag_t **attribute_xml_tag, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_attribute_by_utf8_name( libfwevt_xml_tag_t *xml_tag, const uint8_t *utf8_string, size_t utf8_string_length, libfwevt_xml_tag_t **attribute_xml_tag, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_attribute_by_utf16_name( libfwevt_xml_tag_t *xml_tag, const uint16_t *utf16_string, size_t utf16_string_length, libfwevt_xml_tag_t **attribute_xml_tag, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_number_of_elements( libfwevt_xml_tag_t *xml_tag, int *number_of_elements, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_element_by_index( libfwevt_xml_tag_t *xml_tag, int element_index, libfwevt_xml_tag_t **element_xml_tag, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_element_by_utf8_name( libfwevt_xml_tag_t *xml_tag, const uint8_t *utf8_string, size_t utf8_string_length, libfwevt_xml_tag_t **element_xml_tag, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_element_by_utf16_name( libfwevt_xml_tag_t *xml_tag, const uint16_t *utf16_string, size_t utf16_string_length, libfwevt_xml_tag_t **element_xml_tag, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_xml_tag_get_flags( libfwevt_xml_tag_t *xml_tag, uint8_t *flags, libcerror_error_t **error ); int libfwevt_xml_tag_set_flags( libfwevt_xml_tag_t *xml_tag, uint8_t flags, libcerror_error_t **error ); int libfwevt_xml_tag_get_utf8_xml_value_string_size( libfwevt_internal_xml_tag_t *internal_xml_tag, size_t *utf8_string_size, libcerror_error_t **error ); int libfwevt_xml_tag_get_utf8_xml_value_string_with_index( libfwevt_internal_xml_tag_t *internal_xml_tag, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ); int libfwevt_xml_tag_get_utf8_xml_string_size( libfwevt_xml_tag_t *xml_tag, int xml_tag_level, size_t *utf8_string_size, libcerror_error_t **error ); int libfwevt_xml_tag_get_utf8_xml_string_with_index( libfwevt_xml_tag_t *xml_tag, int xml_tag_level, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ); int libfwevt_xml_tag_get_utf16_xml_value_string_size( libfwevt_internal_xml_tag_t *internal_xml_tag, size_t *utf16_string_size, libcerror_error_t **error ); int libfwevt_xml_tag_get_utf16_xml_value_string_with_index( libfwevt_internal_xml_tag_t *internal_xml_tag, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ); int libfwevt_xml_tag_get_utf16_xml_string_size( libfwevt_xml_tag_t *xml_tag, int xml_tag_level, size_t *utf16_string_size, libcerror_error_t **error ); int libfwevt_xml_tag_get_utf16_xml_string_with_index( libfwevt_xml_tag_t *xml_tag, int xml_tag_level, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ); #if defined( HAVE_DEBUG_OUTPUT ) int libfwevt_xml_tag_debug_print_value_string( libfwevt_internal_xml_tag_t *internal_xml_tag, libcerror_error_t **error ); int libfwevt_xml_tag_debug_print( libfwevt_xml_tag_t *xml_tag, int xml_tag_level, libcerror_error_t **error ); int libfwevt_xml_tag_name_debug_print( libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ); int libfwevt_xml_tag_value_debug_print( libfwevt_xml_tag_t *xml_tag, int value_entry_index, libcerror_error_t **error ); #endif /* defined( HAVE_DEBUG_OUTPUT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_XML_TAG_H ) */ libevt-20170120/libfwevt/libfwevt_task.c0000664000175000017500000002673613040331702022176 0ustar00lordyestalordyesta00000000000000/* * Task functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_libfguid.h" #include "libfwevt_libuna.h" #include "libfwevt_task.h" #include "libfwevt_types.h" #include "fwevt_template.h" /* Creates a task * Make sure the value task is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_task_initialize( libfwevt_task_t **task, libcerror_error_t **error ) { libfwevt_internal_task_t *internal_task = NULL; static char *function = "libfwevt_task_initialize"; if( task == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid task.", function ); return( -1 ); } if( *task != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid task value already set.", function ); return( -1 ); } internal_task = memory_allocate_structure( libfwevt_internal_task_t ); if( internal_task == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create task.", function ); goto on_error; } if( memory_set( internal_task, 0, sizeof( libfwevt_internal_task_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear task.", function ); goto on_error; } *task = (libfwevt_task_t *) internal_task; return( 1 ); on_error: if( internal_task != NULL ) { memory_free( internal_task ); } return( -1 ); } /* Frees a task * Returns 1 if successful or -1 on error */ int libfwevt_task_free( libfwevt_task_t **task, libcerror_error_t **error ) { libfwevt_internal_task_t *internal_task = NULL; static char *function = "libfwevt_task_free"; if( task == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid task.", function ); return( -1 ); } if( *task != NULL ) { internal_task = (libfwevt_internal_task_t *) *task; *task = NULL; memory_free( internal_task ); } return( 1 ); } /* Reads the task * Returns 1 if successful or -1 on error */ int libfwevt_task_read( libfwevt_task_t *task, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ) { libfwevt_internal_task_t *internal_task = NULL; fwevt_template_task_t *wevt_task = NULL; static char *function = "libfwevt_task_read"; uint32_t task_data_offset = 0; uint32_t task_data_size = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t guid_string[ 48 ]; libfguid_identifier_t *guid = NULL; system_character_t *value_string = NULL; size_t value_string_size = 0; uint32_t value_32bit = 0; int result = 0; #endif if( task == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid task.", function ); return( -1 ); } internal_task = (libfwevt_internal_task_t *) task; 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_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( data_size < sizeof( fwevt_template_task_t ) ) || ( data_offset > ( data_size - sizeof( fwevt_template_task_t ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } wevt_task = (fwevt_template_task_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: task data:\n", function ); libcnotify_print_data( (uint8_t *) wevt_task, sizeof( fwevt_template_task_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( wevt_task->identifier, internal_task->identifier ); byte_stream_copy_to_uint32_little_endian( wevt_task->data_offset, task_data_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: identifier\t\t\t\t\t\t: %" PRIu32 "\n", function, internal_task->identifier ); byte_stream_copy_to_uint32_little_endian( wevt_task->message_identifier, value_32bit ); libcnotify_printf( "%s: message identifier\t\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); 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, wevt_task->unknown1, 16, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); goto on_error; } #if defined( 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: unknown1\t\t\t\t\t\t: %" PRIs_SYSTEM "\n", function, guid_string ); if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); goto on_error; } libcnotify_printf( "%s: data offset\t\t\t\t\t\t: 0x%08" PRIx32 "\n", function, task_data_offset ); } #endif if( task_data_offset > 0 ) { if( task_data_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid task data offset value out of bounds.", function ); goto on_error; } if( ( task_data_size > data_size ) || ( ( task_data_offset + task_data_size ) > data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid task data size value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( &( data[ task_data_offset ] ), task_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data:\n", function ); libcnotify_print_data( &( data[ task_data_offset ] ), task_data_size, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data size\t\t\t\t\t\t: %" PRIu32 "\n", function, task_data_size ); } task_data_offset += 4; task_data_size -= 4; #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( &( data[ task_data_offset ] ), task_data_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( &( data[ task_data_offset ] ), task_data_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 data string.", function ); goto on_error; } if( ( value_string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * value_string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data string size value exceeds maximum.", 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 data string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, &( data[ task_data_offset ] ), task_data_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, &( data[ task_data_offset ] ), task_data_size, LIBUNA_ENDIAN_LITTLE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data string.", function ); goto on_error; } libcnotify_printf( "%s: name\t\t\t\t\t\t: %" PRIs_SYSTEM "\n", function, value_string ); memory_free( value_string ); value_string = NULL; } #endif } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( value_string != NULL ) { memory_free( value_string ); } if( guid != NULL ) { libfguid_identifier_free( &guid, NULL ); } #endif return( -1 ); } libevt-20170120/libfwevt/libfwevt_xml_template_value.h0000664000175000017500000000562613040331702025123 0ustar00lordyestalordyesta00000000000000/* * Binary XML template value functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_XML_TEMPLATE_VALUE_H ) #define _LIBFWEVT_INTERNAL_XML_TEMPLATE_VALUE_H #include #include #include "libfwevt_libcerror.h" #include "libfwevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_xml_template_value libfwevt_internal_xml_template_value_t; struct libfwevt_internal_xml_template_value { /* The type */ uint8_t type; /* The offset */ size_t offset; /* The size */ uint16_t size; /* The flags */ uint8_t flags; }; int libfwevt_xml_template_value_initialize( libfwevt_xml_template_value_t **xml_template_value, libcerror_error_t **error ); int libfwevt_xml_template_value_free( libfwevt_xml_template_value_t **xml_template_value, libcerror_error_t **error ); int libfwevt_xml_template_value_get_type( libfwevt_xml_template_value_t *xml_template_value, uint8_t *type, libcerror_error_t **error ); int libfwevt_xml_template_value_set_type( libfwevt_xml_template_value_t *xml_template_value, uint8_t type, libcerror_error_t **error ); int libfwevt_xml_template_value_get_offset( libfwevt_xml_template_value_t *xml_template_value, size_t *offset, libcerror_error_t **error ); int libfwevt_xml_template_value_set_offset( libfwevt_xml_template_value_t *xml_template_value, size_t offset, libcerror_error_t **error ); int libfwevt_xml_template_value_get_size( libfwevt_xml_template_value_t *xml_template_value, uint16_t *size, libcerror_error_t **error ); int libfwevt_xml_template_value_set_size( libfwevt_xml_template_value_t *xml_template_value, uint16_t size, libcerror_error_t **error ); int libfwevt_xml_template_value_get_flags( libfwevt_xml_template_value_t *xml_template_value, uint8_t *flags, libcerror_error_t **error ); int libfwevt_xml_template_value_set_flags( libfwevt_xml_template_value_t *xml_template_value, uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_XML_TEMPLATE_VALUE_H ) */ libevt-20170120/libfwevt/libfwevt_support.c0000664000175000017500000000222613040331702022734 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfwevt_definitions.h" #include "libfwevt_support.h" #if !defined( HAVE_LOCAL_LIBFWEVT ) /* Returns the library version as a string */ const char *libfwevt_get_version( void ) { return( (const char *) LIBFWEVT_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBFWEVT ) */ libevt-20170120/libfwevt/libfwevt_event.c0000664000175000017500000002661513040331702022351 0ustar00lordyestalordyesta00000000000000/* * Event functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfwevt_event.h" #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_libuna.h" #include "libfwevt_types.h" #include "fwevt_template.h" /* Creates an event * Make sure the value event is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_event_initialize( libfwevt_event_t **event, libcerror_error_t **error ) { libfwevt_internal_event_t *internal_event = NULL; static char *function = "libfwevt_event_initialize"; if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } if( *event != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid event value already set.", function ); return( -1 ); } internal_event = memory_allocate_structure( libfwevt_internal_event_t ); if( internal_event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create event.", function ); goto on_error; } if( memory_set( internal_event, 0, sizeof( libfwevt_internal_event_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear event.", function ); goto on_error; } *event = (libfwevt_event_t *) internal_event; return( 1 ); on_error: if( internal_event != NULL ) { memory_free( internal_event ); } return( -1 ); } /* Frees an even * Returns 1 if successful or -1 on error */ int libfwevt_event_free( libfwevt_event_t **event, libcerror_error_t **error ) { libfwevt_internal_event_t *internal_event = NULL; static char *function = "libfwevt_event_free"; if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } if( *event != NULL ) { internal_event = (libfwevt_internal_event_t *) *event; *event = NULL; memory_free( internal_event ); } return( 1 ); } /* Reads the event * Returns 1 if successful or -1 on error */ int libfwevt_event_read( libfwevt_event_t *event, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ) { libfwevt_internal_event_t *internal_event = NULL; fwevt_template_event_t *wevt_event = NULL; static char *function = "libfwevt_event_read"; uint32_t event_flags = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint64_t value_64bit = 0; uint32_t value_32bit = 0; uint16_t value_16bit = 0; #endif if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } internal_event = (libfwevt_internal_event_t *) event; 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_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( data_size < sizeof( fwevt_template_event_t ) ) || ( data_offset > ( data_size - sizeof( fwevt_template_event_t ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } wevt_event = (fwevt_template_event_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: event data:\n", function ); libcnotify_print_data( (uint8_t *) wevt_event, sizeof( fwevt_template_event_t ), 0 ); } #endif byte_stream_copy_to_uint16_little_endian( wevt_event->identifier, internal_event->identifier ); byte_stream_copy_to_uint32_little_endian( wevt_event->message_identifier, internal_event->message_identifier ); byte_stream_copy_to_uint32_little_endian( wevt_event->template_offset, internal_event->template_offset ); byte_stream_copy_to_uint32_little_endian( wevt_event->opcode_offset, internal_event->opcode_offset ); byte_stream_copy_to_uint32_little_endian( wevt_event->level_offset, internal_event->level_offset ); byte_stream_copy_to_uint32_little_endian( wevt_event->task_offset, internal_event->task_offset ); byte_stream_copy_to_uint32_little_endian( wevt_event->flags, event_flags ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: identifier\t\t\t\t\t\t: 0x%04" PRIx16 "\n", function, internal_event->identifier ); if( ( event_flags & 0x00000080UL ) == 0 ) { byte_stream_copy_to_uint16_little_endian( wevt_event->unknown1, value_16bit ); libcnotify_printf( "%s: unknown1\t\t\t\t\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( wevt_event->qualifiers, value_16bit ); libcnotify_printf( "%s: qualifiers\t\t\t\t\t\t: %" PRIu16 " (0x%04" PRIx16 ")\n", function, value_16bit, value_16bit ); byte_stream_copy_to_uint16_little_endian( wevt_event->unknown2, value_16bit ); libcnotify_printf( "%s: unknown2\t\t\t\t\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); } else { libcnotify_printf( "%s: version\t\t\t\t\t\t: %" PRIu8 "\n", function, wevt_event->version ); libcnotify_printf( "%s: channel\t\t\t\t\t\t: %" PRIu8 "\n", function, wevt_event->channel ); libcnotify_printf( "%s: level\t\t\t\t\t\t: %" PRIu8 "\n", function, wevt_event->level ); libcnotify_printf( "%s: opcode\t\t\t\t\t\t: %" PRIu8 "\n", function, wevt_event->opcode ); byte_stream_copy_to_uint16_little_endian( wevt_event->task, value_16bit ); libcnotify_printf( "%s: task\t\t\t\t\t\t: %" PRIu16 "\n", function, value_16bit ); } byte_stream_copy_to_uint64_little_endian( wevt_event->keywords, value_64bit ); libcnotify_printf( "%s: keywords\t\t\t\t\t\t: 0x%08" PRIx64 "\n", function, value_64bit ); libcnotify_printf( "%s: message identifier\t\t\t\t\t: 0x%08" PRIx32 "\n", function, internal_event->message_identifier ); libcnotify_printf( "%s: template offset\t\t\t\t\t: 0x%08" PRIx32 "\n", function, internal_event->template_offset ); libcnotify_printf( "%s: opcode offset\t\t\t\t\t: 0x%08" PRIx32 "\n", function, internal_event->opcode_offset ); libcnotify_printf( "%s: level offset\t\t\t\t\t: 0x%08" PRIx32 "\n", function, internal_event->level_offset ); libcnotify_printf( "%s: task offset\t\t\t\t\t: 0x%08" PRIx32 "\n", function, internal_event->task_offset ); byte_stream_copy_to_uint32_little_endian( wevt_event->unknown3, value_32bit ); libcnotify_printf( "%s: unknown3\t\t\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( wevt_event->unknown4, value_32bit ); libcnotify_printf( "%s: unknown4\t\t\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: flags\t\t\t\t\t\t: 0x%08" PRIx32 "\n", function, event_flags ); libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Retrieves the identifier * Returns 1 if successful or -1 on error */ int libfwevt_event_get_identifier( libfwevt_event_t *event, uint32_t *identifier, libcerror_error_t **error ) { libfwevt_internal_event_t *internal_event = NULL; static char *function = "libfwevt_event_get_identifier"; if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } internal_event = (libfwevt_internal_event_t *) event; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } *identifier = (uint32_t) internal_event->identifier; return( 1 ); } /* Retrieves the message identifier * Returns 1 if successful or -1 on error */ int libfwevt_event_get_message_identifier( libfwevt_event_t *event, uint32_t *message_identifier, libcerror_error_t **error ) { libfwevt_internal_event_t *internal_event = NULL; static char *function = "libfwevt_event_get_message_identifier"; if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } internal_event = (libfwevt_internal_event_t *) event; if( message_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message identifier.", function ); return( -1 ); } *message_identifier = internal_event->message_identifier; return( 1 ); } /* Retrieves the template offset * Returns 1 if successful or -1 on error */ int libfwevt_event_get_template_offset( libfwevt_event_t *event, uint32_t *template_offset, libcerror_error_t **error ) { libfwevt_internal_event_t *internal_event = NULL; static char *function = "libfwevt_event_get_template_offset"; if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } internal_event = (libfwevt_internal_event_t *) event; if( template_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template offset.", function ); return( -1 ); } *template_offset = internal_event->template_offset; return( 1 ); } libevt-20170120/libfwevt/libfwevt_keyword.h0000664000175000017500000000331613040331702022712 0ustar00lordyestalordyesta00000000000000/* * Keyword functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_KEYWORD_H ) #define _LIBFWEVT_INTERNAL_KEYWORD_H #include #include #include "libfwevt_extern.h" #include "libfwevt_libcerror.h" #include "libfwevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_keyword libfwevt_internal_keyword_t; struct libfwevt_internal_keyword { /* The identifier */ uint16_t identifier; }; LIBFWEVT_EXTERN \ int libfwevt_keyword_initialize( libfwevt_keyword_t **keyword, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_keyword_free( libfwevt_keyword_t **keyword, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_keyword_read( libfwevt_keyword_t *keyword, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_KEYWORD_H ) */ libevt-20170120/libfwevt/libfwevt_extern.h0000664000175000017500000000254513040331702022536 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_EXTERN_H ) #define _LIBFWEVT_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFWEVT for local use of libfwevt */ #if !defined( HAVE_LOCAL_LIBFWEVT ) /* If libtool DLL support is enabled set LIBFWEVT_DLL_EXPORT * before including libfwevt/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFWEVT_DLL_EXPORT #endif #include #else #define LIBFWEVT_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBFWEVT ) */ #endif /* !defined( _LIBFWEVT_INTERNAL_EXTERN_H ) */ libevt-20170120/libfwevt/libfwevt_keyword.c0000664000175000017500000002436513040331702022714 0ustar00lordyestalordyesta00000000000000/* * Keyword functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include #include "libfwevt_keyword.h" #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_libuna.h" #include "libfwevt_types.h" #include "fwevt_template.h" /* Creates a keyword * Make sure the value keyword is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_keyword_initialize( libfwevt_keyword_t **keyword, libcerror_error_t **error ) { libfwevt_internal_keyword_t *internal_keyword = NULL; static char *function = "libfwevt_keyword_initialize"; if( keyword == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid keyword.", function ); return( -1 ); } if( *keyword != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid keyword value already set.", function ); return( -1 ); } internal_keyword = memory_allocate_structure( libfwevt_internal_keyword_t ); if( internal_keyword == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create keyword.", function ); goto on_error; } if( memory_set( internal_keyword, 0, sizeof( libfwevt_internal_keyword_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear keyword.", function ); goto on_error; } *keyword = (libfwevt_keyword_t *) internal_keyword; return( 1 ); on_error: if( internal_keyword != NULL ) { memory_free( internal_keyword ); } return( -1 ); } /* Frees a keyword * Returns 1 if successful or -1 on error */ int libfwevt_keyword_free( libfwevt_keyword_t **keyword, libcerror_error_t **error ) { libfwevt_internal_keyword_t *internal_keyword = NULL; static char *function = "libfwevt_keyword_free"; if( keyword == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid keyword.", function ); return( -1 ); } if( *keyword != NULL ) { internal_keyword = (libfwevt_internal_keyword_t *) *keyword; *keyword = NULL; memory_free( internal_keyword ); } return( 1 ); } /* Reads the keyword * Returns 1 if successful or -1 on error */ int libfwevt_keyword_read( libfwevt_keyword_t *keyword, const uint8_t *resource_data, size_t resource_data_size, size_t resource_data_offset, libcerror_error_t **error ) { /* TODO libfwevt_internal_keyword_t *internal_keyword = NULL; */ fwevt_template_keyword_t *wevt_keyword = NULL; static char *function = "libfwevt_keyword_read"; uint32_t keyword_data_offset = 0; uint32_t keyword_data_size = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t *value_string = NULL; size_t value_string_size = 0; uint64_t value_64bit = 0; uint32_t value_32bit = 0; int result = 0; #endif if( keyword == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid keyword.", function ); return( -1 ); } /* TODO internal_keyword = (libfwevt_internal_keyword_t *) keyword; */ if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource data.", function ); return( -1 ); } if( resource_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid resource data size value exceeds maximum.", function ); return( -1 ); } if( resource_data_offset >= resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid resource data offset value out of bounds.", function ); return( -1 ); } if( ( resource_data_size < sizeof( fwevt_template_keyword_t ) ) || ( resource_data_offset > ( resource_data_size - sizeof( fwevt_template_keyword_t ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid resource data value too small.", function ); return( -1 ); } wevt_keyword = (fwevt_template_keyword_t *) &( resource_data[ resource_data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: keyword data:\n", function ); libcnotify_print_data( (uint8_t *) wevt_keyword, sizeof( fwevt_template_keyword_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( wevt_keyword->data_offset, keyword_data_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint64_little_endian( wevt_keyword->identifier, value_64bit ); libcnotify_printf( "%s: identifier\t\t\t\t\t: 0x%08" PRIx64 "\n", function, value_64bit ); byte_stream_copy_to_uint32_little_endian( wevt_keyword->message_identifier, value_32bit ); libcnotify_printf( "%s: message identifier\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: data offset\t\t\t\t\t: 0x%08" PRIx32 "\n", function, keyword_data_offset ); } #endif if( keyword_data_offset > 0 ) { if( keyword_data_offset >= resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid keyword data offset value out of bounds.", function ); goto on_error; } if( ( keyword_data_size > resource_data_size ) || ( ( keyword_data_offset + keyword_data_size ) > resource_data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid keyword data size value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( &( resource_data[ keyword_data_offset ] ), keyword_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data:\n", function ); libcnotify_print_data( &( resource_data[ keyword_data_offset ] ), keyword_data_size, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data size\t\t\t\t\t: %" PRIu32 "\n", function, keyword_data_size ); } keyword_data_offset += 4; keyword_data_size -= 4; #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( &( resource_data[ keyword_data_offset ] ), keyword_data_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( &( resource_data[ keyword_data_offset ] ), keyword_data_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 data string.", function ); goto on_error; } if( ( value_string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * value_string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data string size value exceeds maximum.", 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 data string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, &( resource_data[ keyword_data_offset ] ), keyword_data_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, &( resource_data[ keyword_data_offset ] ), keyword_data_size, LIBUNA_ENDIAN_LITTLE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data string.", function ); goto on_error; } libcnotify_printf( "%s: name\t\t\t\t\t\t: %" PRIs_SYSTEM "\n", function, value_string ); memory_free( value_string ); value_string = NULL; } #endif } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( value_string != NULL ) { memory_free( value_string ); } #endif return( -1 ); } libevt-20170120/libfwevt/libfwevt_libuna.h0000664000175000017500000000323513040331702022500 0ustar00lordyestalordyesta00000000000000/* * The libuna header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_LIBUNA_H ) #define _LIBFWEVT_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( _LIBFWEVT_LIBUNA_H ) */ libevt-20170120/libfwevt/libfwevt_libcdata.h0000664000175000017500000000301713040331702022767 0ustar00lordyestalordyesta00000000000000/* * The internal libcdata header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_LIBCDATA_H ) #define _LIBFWEVT_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( _LIBFWEVT_LIBCDATA_H ) */ libevt-20170120/libfwevt/libfwevt_opcode.c0000664000175000017500000002357313040331702022501 0ustar00lordyestalordyesta00000000000000/* * Opcode functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_libuna.h" #include "libfwevt_opcode.h" #include "libfwevt_types.h" #include "fwevt_template.h" /* Creates an opcode * Make sure the value opcode is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_opcode_initialize( libfwevt_opcode_t **opcode, libcerror_error_t **error ) { libfwevt_internal_opcode_t *internal_opcode = NULL; static char *function = "libfwevt_opcode_initialize"; if( opcode == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid opcode.", function ); return( -1 ); } if( *opcode != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid opcode value already set.", function ); return( -1 ); } internal_opcode = memory_allocate_structure( libfwevt_internal_opcode_t ); if( internal_opcode == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create opcode.", function ); goto on_error; } if( memory_set( internal_opcode, 0, sizeof( libfwevt_internal_opcode_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear opcode.", function ); goto on_error; } *opcode = (libfwevt_opcode_t *) internal_opcode; return( 1 ); on_error: if( internal_opcode != NULL ) { memory_free( internal_opcode ); } return( -1 ); } /* Frees an opcode * Returns 1 if successful or -1 on error */ int libfwevt_opcode_free( libfwevt_opcode_t **opcode, libcerror_error_t **error ) { libfwevt_internal_opcode_t *internal_opcode = NULL; static char *function = "libfwevt_opcode_free"; if( opcode == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid opcode.", function ); return( -1 ); } if( *opcode != NULL ) { internal_opcode = (libfwevt_internal_opcode_t *) *opcode; *opcode = NULL; memory_free( internal_opcode ); } return( 1 ); } /* Reads the opcode * Returns 1 if successful or -1 on error */ int libfwevt_opcode_read( libfwevt_opcode_t *opcode, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ) { /* TODO libfwevt_internal_opcode_t *internal_opcode = NULL; */ fwevt_template_opcode_t *wevt_opcode = NULL; static char *function = "libfwevt_opcode_read"; uint32_t opcode_data_offset = 0; uint32_t opcode_data_size = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t *value_string = NULL; size_t value_string_size = 0; uint32_t value_32bit = 0; int result = 0; #endif if( opcode == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid opcode.", function ); return( -1 ); } /* TODO internal_opcode = (libfwevt_internal_opcode_t *) opcode; */ 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_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( data_size < sizeof( fwevt_template_opcode_t ) ) || ( data_offset > ( data_size - sizeof( fwevt_template_opcode_t ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } wevt_opcode = (fwevt_template_opcode_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: opcode data:\n", function ); libcnotify_print_data( (uint8_t *) wevt_opcode, sizeof( fwevt_template_opcode_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( wevt_opcode->data_offset, opcode_data_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint32_little_endian( wevt_opcode->identifier, value_32bit ); libcnotify_printf( "%s: identifier\t\t\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( wevt_opcode->message_identifier, value_32bit ); libcnotify_printf( "%s: message identifier\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: data offset\t\t\t\t\t: 0x%08" PRIx32 "\n", function, opcode_data_offset ); } #endif if( opcode_data_offset > 0 ) { if( opcode_data_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid opcode data offset value out of bounds.", function ); goto on_error; } if( ( opcode_data_size > data_size ) || ( ( opcode_data_offset + opcode_data_size ) > data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid opcode data size value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( &( data[ opcode_data_offset ] ), opcode_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data:\n", function ); libcnotify_print_data( &( data[ opcode_data_offset ] ), opcode_data_size, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data size\t\t\t\t\t\t: %" PRIu32 "\n", function, opcode_data_size ); } opcode_data_offset += 4; opcode_data_size -= 4; #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( &( data[ opcode_data_offset ] ), opcode_data_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( &( data[ opcode_data_offset ] ), opcode_data_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 data string.", function ); goto on_error; } if( ( value_string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * value_string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data string size value exceeds maximum.", 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 data string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, &( data[ opcode_data_offset ] ), opcode_data_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, &( data[ opcode_data_offset ] ), opcode_data_size, LIBUNA_ENDIAN_LITTLE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data string.", function ); goto on_error; } libcnotify_printf( "%s: name\t\t\t\t\t\t: %" PRIs_SYSTEM "\n", function, value_string ); memory_free( value_string ); value_string = NULL; } #endif } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( value_string != NULL ) { memory_free( value_string ); } #endif return( -1 ); } libevt-20170120/libfwevt/libfwevt_debug.c0000664000175000017500000000705413040331702022312 0ustar00lordyestalordyesta00000000000000/* * Debug functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libfwevt_debug.h" #include "libfwevt_definitions.h" #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #if defined( HAVE_DEBUG_OUTPUT ) /* Prints the value type */ void libfwevt_debug_print_value_type( uint8_t value_type ) { switch( value_type & 0x7f ) { case LIBFWEVT_VALUE_TYPE_NULL: libcnotify_printf( "NULL" ); break; case LIBFWEVT_VALUE_TYPE_STRING_UTF16: libcnotify_printf( "UTF-16 string" ); break; case LIBFWEVT_VALUE_TYPE_STRING_BYTE_STREAM: libcnotify_printf( "Byte stream string" ); break; case LIBFWEVT_VALUE_TYPE_INTEGER_8BIT: libcnotify_printf( "Integer 8-bit signed" ); break; case LIBFWEVT_VALUE_TYPE_UNSIGNED_INTEGER_8BIT: libcnotify_printf( "Integer 8-bit unsigned" ); break; case LIBFWEVT_VALUE_TYPE_INTEGER_16BIT: libcnotify_printf( "Integer 16-bit signed" ); break; case LIBFWEVT_VALUE_TYPE_UNSIGNED_INTEGER_16BIT: libcnotify_printf( "Integer 16-bit unsigned" ); break; case LIBFWEVT_VALUE_TYPE_INTEGER_32BIT: libcnotify_printf( "Integer 32-bit signed" ); break; case LIBFWEVT_VALUE_TYPE_UNSIGNED_INTEGER_32BIT: libcnotify_printf( "Integer 32-bit unsigned" ); break; case LIBFWEVT_VALUE_TYPE_INTEGER_64BIT: libcnotify_printf( "Integer 64-bit signed" ); break; case LIBFWEVT_VALUE_TYPE_UNSIGNED_INTEGER_64BIT: libcnotify_printf( "Integer 64-bit unsigned" ); break; case LIBFWEVT_VALUE_TYPE_FLOATING_POINT_32BIT: libcnotify_printf( "Floating point 32-bit (single precision)" ); break; case LIBFWEVT_VALUE_TYPE_FLOATING_POINT_64BIT: libcnotify_printf( "Floating point 64-bit (double precision)" ); break; case LIBFWEVT_VALUE_TYPE_BOOLEAN: libcnotify_printf( "Boolean" ); break; case LIBFWEVT_VALUE_TYPE_BINARY_DATA: libcnotify_printf( "Binary data" ); break; case LIBFWEVT_VALUE_TYPE_GUID: libcnotify_printf( "GUID" ); break; case LIBFWEVT_VALUE_TYPE_SIZE: libcnotify_printf( "Size" ); break; case LIBFWEVT_VALUE_TYPE_FILETIME: libcnotify_printf( "Filetime" ); break; case LIBFWEVT_VALUE_TYPE_SYSTEMTIME: libcnotify_printf( "Systemtime" ); break; case LIBFWEVT_VALUE_TYPE_NT_SECURITY_IDENTIFIER: libcnotify_printf( "NT Security Identifier (SID)" ); break; case LIBFWEVT_VALUE_TYPE_HEXADECIMAL_INTEGER_32BIT: libcnotify_printf( "Hexadecimal integer 32-bit" ); break; case LIBFWEVT_VALUE_TYPE_HEXADECIMAL_INTEGER_64BIT: libcnotify_printf( "Hexadecimal integer 64-bit" ); break; case LIBFWEVT_VALUE_TYPE_BINARY_XML: libcnotify_printf( "Binary XML" ); break; default: libcnotify_printf( "UNKNOWN" ); break; } } #endif libevt-20170120/libfwevt/libfwevt_definitions.h0000664000175000017500000001227013040331702023540 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBFWEVT_INTERNAL_DEFINITIONS_H ) #define LIBFWEVT_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBFWEVT for local use of libfwevt */ #if !defined( HAVE_LOCAL_LIBFWEVT ) #include /* The definitions in are copied here * for local use of libfwevt */ #else #include #define LIBFWEVT_VERSION 20170114 /* The version string */ #define LIBFWEVT_VERSION_STRING "20170114" /* The byte order definitions */ #define LIBFWEVT_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBFWEVT_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* The binary XML document read flags */ enum LIBFWEVT_XML_DOCUMENT_READ_FLAGS { LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DATA_OFFSETS = 0x01, LIBFWEVT_XML_DOCUMENT_READ_FLAG_HAS_DEPENDENCY_IDENTIFIERS = 0x02 }; /* The binary XML token definitions */ enum LIBFWEVT_XML_TOKENS { LIBFWEVT_XML_TOKEN_END_OF_FILE = 0x00, LIBFWEVT_XML_TOKEN_OPEN_START_ELEMENT_TAG = 0x01, LIBFWEVT_XML_TOKEN_CLOSE_START_ELEMENT_TAG = 0x02, LIBFWEVT_XML_TOKEN_CLOSE_EMPTY_ELEMENT_TAG = 0x03, LIBFWEVT_XML_TOKEN_END_ELEMENT_TAG = 0x04, LIBFWEVT_XML_TOKEN_VALUE = 0x05, LIBFWEVT_XML_TOKEN_ATTRIBUTE = 0x06, LIBFWEVT_XML_TOKEN_CDATA_SECTION = 0x07, LIBFWEVT_XML_TOKEN_CHARACTER_REFERENCE = 0x08, LIBFWEVT_XML_TOKEN_ENTITY_REFERENCE = 0x09, LIBFWEVT_XML_TOKEN_PI_TARGET = 0x0a, LIBFWEVT_XML_TOKEN_PI_DATA = 0x0b, LIBFWEVT_XML_TOKEN_TEMPLATE_INSTANCE = 0x0c, LIBFWEVT_XML_TOKEN_NORMAL_SUBSTITUTION = 0x0d, LIBFWEVT_XML_TOKEN_OPTIONAL_SUBSTITUTION = 0x0e, LIBFWEVT_XML_TOKEN_FRAGMENT_HEADER = 0x0f }; #define LIBFWEVT_XML_TOKEN_FLAG_HAS_MORE_DATA 0x40 /* The value type definitions */ enum LIBFWEVT_VALUE_TYPES { LIBFWEVT_VALUE_TYPE_NULL = 0x00, LIBFWEVT_VALUE_TYPE_STRING_UTF16 = 0x01, LIBFWEVT_VALUE_TYPE_STRING_BYTE_STREAM = 0x02, LIBFWEVT_VALUE_TYPE_INTEGER_8BIT = 0x03, LIBFWEVT_VALUE_TYPE_UNSIGNED_INTEGER_8BIT = 0x04, LIBFWEVT_VALUE_TYPE_INTEGER_16BIT = 0x05, LIBFWEVT_VALUE_TYPE_UNSIGNED_INTEGER_16BIT = 0x06, LIBFWEVT_VALUE_TYPE_INTEGER_32BIT = 0x07, LIBFWEVT_VALUE_TYPE_UNSIGNED_INTEGER_32BIT = 0x08, LIBFWEVT_VALUE_TYPE_INTEGER_64BIT = 0x09, LIBFWEVT_VALUE_TYPE_UNSIGNED_INTEGER_64BIT = 0x0a, LIBFWEVT_VALUE_TYPE_FLOATING_POINT_32BIT = 0x0b, LIBFWEVT_VALUE_TYPE_FLOATING_POINT_64BIT = 0x0c, LIBFWEVT_VALUE_TYPE_BOOLEAN = 0x0d, LIBFWEVT_VALUE_TYPE_BINARY_DATA = 0x0e, LIBFWEVT_VALUE_TYPE_GUID = 0x0f, LIBFWEVT_VALUE_TYPE_SIZE = 0x10, LIBFWEVT_VALUE_TYPE_FILETIME = 0x11, LIBFWEVT_VALUE_TYPE_SYSTEMTIME = 0x12, LIBFWEVT_VALUE_TYPE_NT_SECURITY_IDENTIFIER = 0x13, LIBFWEVT_VALUE_TYPE_HEXADECIMAL_INTEGER_32BIT = 0x14, LIBFWEVT_VALUE_TYPE_HEXADECIMAL_INTEGER_64BIT = 0x15, LIBFWEVT_VALUE_TYPE_BINARY_XML = 0x21, LIBFWEVT_VALUE_TYPE_ARRAY_OF_STRING_UTF16 = 0x81, LIBFWEVT_VALUE_TYPE_ARRAY_OF_STRING_BYTE_STREAM = 0x82, LIBFWEVT_VALUE_TYPE_ARRAY_OF_INTEGER_8BIT = 0x83, LIBFWEVT_VALUE_TYPE_ARRAY_OF_UNSIGNED_INTEGER_8BIT = 0x84, LIBFWEVT_VALUE_TYPE_ARRAY_OF_INTEGER_16BIT = 0x85, LIBFWEVT_VALUE_TYPE_ARRAY_OF_UNSIGNED_INTEGER_16BIT = 0x86, LIBFWEVT_VALUE_TYPE_ARRAY_OF_INTEGER_32BIT = 0x87, LIBFWEVT_VALUE_TYPE_ARRAY_OF_UNSIGNED_INTEGER_32BIT = 0x88, LIBFWEVT_VALUE_TYPE_ARRAY_OF_INTEGER_64BIT = 0x89, LIBFWEVT_VALUE_TYPE_ARRAY_OF_UNSIGNED_INTEGER_64BIT = 0x8a, LIBFWEVT_VALUE_TYPE_ARRAY_OF_FLOATING_POINT_32BIT = 0x8b, LIBFWEVT_VALUE_TYPE_ARRAY_OF_FLOATING_POINT_64BIT = 0x8c, LIBFWEVT_VALUE_TYPE_ARRAY_OF_GUID = 0x8f, LIBFWEVT_VALUE_TYPE_ARRAY_OF_SIZE = 0x90, LIBFWEVT_VALUE_TYPE_ARRAY_OF_FILETIME = 0x91, LIBFWEVT_VALUE_TYPE_ARRAY_OF_SYSTEMTIME = 0x92, LIBFWEVT_VALUE_TYPE_ARRAY_OF_NT_SECURITY_IDENTIFIER = 0x93, LIBFWEVT_VALUE_TYPE_ARRAY_OF_HEXADECIMAL_INTEGER_32BIT = 0x94, LIBFWEVT_VALUE_TYPE_ARRAY_OF_HEXADECIMAL_INTEGER_64BIT = 0x95, }; #define LIBFWEVT_VALUE_TYPE_ARRAY 0x80 /* The XML tag type definitions */ enum LIBFWEVT_XML_TAG_TYPES { LIBFWEVT_XML_TAG_TYPE_NODE, LIBFWEVT_XML_TAG_TYPE_CDATA, LIBFWEVT_XML_TAG_TYPE_PI }; /* The XML tag flags definitions */ enum LIBFWEVT_XML_TAG_FLAGS { LIBFWEVT_XML_TAG_FLAG_IS_TEMPLATE_DEFINITION = 0x01 }; /* The XML template value flags definitions */ enum LIBFWEVT_XML_TEMPLATE_VALUE_FLAGS { LIBFWEVT_XML_TEMPLATE_VALUE_FLAG_IS_DEFINITION = 0x01 }; #endif #endif libevt-20170120/libfwevt/libfwevt_task.h0000664000175000017500000000323613040331702022171 0ustar00lordyestalordyesta00000000000000/* * Task functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_TASK_H ) #define _LIBFWEVT_INTERNAL_TASK_H #include #include #include "libfwevt_extern.h" #include "libfwevt_libcerror.h" #include "libfwevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_task libfwevt_internal_task_t; struct libfwevt_internal_task { /* The identifier */ uint32_t identifier; }; LIBFWEVT_EXTERN \ int libfwevt_task_initialize( libfwevt_task_t **task, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_task_free( libfwevt_task_t **task, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_task_read( libfwevt_task_t *task, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_TASK_H ) */ libevt-20170120/libfwevt/libfwevt_manifest.c0000664000175000017500000005053313040331702023032 0ustar00lordyestalordyesta00000000000000/* * Map functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_libfguid.h" #include "libfwevt_manifest.h" #include "libfwevt_provider.h" #include "libfwevt_types.h" #include "fwevt_template.h" /* Creates a manifest * Make sure the value manifest is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_manifest_initialize( libfwevt_manifest_t **manifest, libcerror_error_t **error ) { libfwevt_internal_manifest_t *internal_manifest = NULL; static char *function = "libfwevt_manifest_initialize"; if( manifest == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid manifest.", function ); return( -1 ); } if( *manifest != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid manifest value already set.", function ); return( -1 ); } internal_manifest = memory_allocate_structure( libfwevt_internal_manifest_t ); if( internal_manifest == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create manifest.", function ); goto on_error; } if( memory_set( internal_manifest, 0, sizeof( libfwevt_internal_manifest_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear manifest.", function ); goto on_error; } *manifest = (libfwevt_manifest_t *) internal_manifest; return( 1 ); on_error: if( internal_manifest != NULL ) { memory_free( internal_manifest ); } return( -1 ); } /* Frees a manifest * Returns 1 if successful or -1 on error */ int libfwevt_manifest_free( libfwevt_manifest_t **manifest, libcerror_error_t **error ) { libfwevt_internal_manifest_t *internal_manifest = NULL; static char *function = "libfwevt_manifest_free"; int result = 1; if( manifest == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid manifest.", function ); return( -1 ); } if( *manifest != NULL ) { internal_manifest = (libfwevt_internal_manifest_t *) *manifest; *manifest = NULL; if(internal_manifest ->providers_array != NULL ) { if( libcdata_array_free( &( internal_manifest->providers_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_provider_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free providers array.", function ); result = -1; } } memory_free( internal_manifest ); } return( result ); } /* Reads the manifest * Returns 1 if successful or -1 on error */ int libfwevt_manifest_read( libfwevt_manifest_t *manifest, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { libfwevt_internal_manifest_t *internal_manifest = NULL; libfwevt_provider_t *provider = NULL; fwevt_template_manifest_t *wevt_manifest = NULL; fwevt_template_provider_entry_t *provider_entry = NULL; static char *function = "libfwevt_manifest_read"; size_t data_offset = 0; uint32_t number_of_providers = 0; uint32_t provider_data_offset = 0; uint32_t provider_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t guid_string[ 48 ]; libfguid_identifier_t *guid = NULL; uint32_t value_32bit = 0; int result = 0; #endif if( manifest == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid manifest.", function ); return( -1 ); } internal_manifest = (libfwevt_internal_manifest_t *) manifest; 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( fwevt_template_manifest_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } wevt_manifest = (fwevt_template_manifest_t *) data; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: manifest data:\n", function ); libcnotify_print_data( (uint8_t *) wevt_manifest, sizeof( fwevt_template_manifest_t ), 0 ); } #endif byte_stream_copy_to_uint16_little_endian( wevt_manifest->major_version, internal_manifest->major_version ); byte_stream_copy_to_uint16_little_endian( wevt_manifest->minor_version, internal_manifest->minor_version ); byte_stream_copy_to_uint32_little_endian( wevt_manifest->number_of_providers, number_of_providers ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t\t: %c%c%c%c\n", function, wevt_manifest->signature[ 0 ], wevt_manifest->signature[ 1 ], wevt_manifest->signature[ 2 ], wevt_manifest->signature[ 3 ] ); byte_stream_copy_to_uint32_little_endian( wevt_manifest->size, value_32bit ); libcnotify_printf( "%s: size\t\t\t\t\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "%s: major version\t\t\t\t\t: %" PRIu16 "\n", function, internal_manifest->major_version ); libcnotify_printf( "%s: minor version\t\t\t\t\t: %" PRIu16 "\n", function, internal_manifest->minor_version ); libcnotify_printf( "%s: number of providers\t\t\t\t: %" PRIu32 "\n", function, number_of_providers ); libcnotify_printf( "\n" ); } #endif if( memory_compare( wevt_manifest->signature, "CRIM", 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported manifest signature.", function ); goto on_error; } data_offset = sizeof( fwevt_template_manifest_t ); if( libcdata_array_initialize( &( internal_manifest->providers_array ), number_of_providers, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create providers array.", function ); goto on_error; } for( provider_index = 0; provider_index < number_of_providers; provider_index++ ) { if( data_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); goto on_error; } provider_entry = (fwevt_template_provider_entry_t *) &( data[ data_offset ] ); if( ( data_offset + sizeof( fwevt_template_provider_entry_t ) ) >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data value too small.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( provider_entry->data_offset, provider_data_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); goto on_error; } if( libfguid_identifier_copy_from_byte_stream( guid, provider_entry->identifier, 16, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); goto on_error; } #if defined( 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: provider entry: %02" PRIu32 " identifier\t\t\t: %" PRIs_SYSTEM "\n", function, provider_index, guid_string ); if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); goto on_error; } libcnotify_printf( "%s: provider entry: %02" PRIu32 " data offset\t\t\t: 0x%08" PRIx32 "\n", function, provider_index, provider_data_offset ); } #endif data_offset += sizeof( fwevt_template_provider_entry_t ); if( libfwevt_provider_initialize( &provider, provider_entry->identifier, 16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create provider: %" PRIu32 ".", function, provider_index ); goto on_error; } if( libfwevt_provider_read( provider, data, data_size, (size_t) provider_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read provider: %d.", function, provider_index ); goto on_error; } if( libcdata_array_set_entry_by_index( internal_manifest->providers_array, (int) provider_index, (intptr_t *) provider, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set provider: %" PRIu32 ".", function, provider_index ); goto on_error; } provider = NULL; } /* TODO refactor to read on demand ? */ for( provider_index = 0; provider_index < number_of_providers; provider_index++ ) { if( libcdata_array_get_entry_by_index( internal_manifest->providers_array, provider_index, (intptr_t **) &provider, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve provider: %d.", function, provider_index ); provider = NULL; goto on_error; } if( libfwevt_provider_read_channels( provider, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read channels.", function ); provider = NULL; goto on_error; } if( libfwevt_provider_read_events( provider, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read events.", function ); provider = NULL; goto on_error; } if( libfwevt_provider_read_keywords( provider, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read keywords.", function ); provider = NULL; goto on_error; } if( libfwevt_provider_read_levels( provider, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read levels.", function ); provider = NULL; goto on_error; } if( libfwevt_provider_read_maps( provider, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read maps.", function ); provider = NULL; goto on_error; } if( libfwevt_provider_read_opcodes( provider, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read opcodes.", function ); provider = NULL; goto on_error; } if( libfwevt_provider_read_tasks( provider, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read tasks.", function ); provider = NULL; goto on_error; } if( libfwevt_provider_read_templates( provider, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read templates.", function ); provider = NULL; goto on_error; } } /* TODO end refactor */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( number_of_providers > 0 ) { libcnotify_printf( "\n" ); } } #endif return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( guid != NULL ) { libfguid_identifier_free( &guid, NULL ); } #endif if( provider != NULL ) { libfwevt_provider_free( &provider, NULL ); } if( internal_manifest->providers_array != NULL ) { libcdata_array_free( &( internal_manifest->providers_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_provider_free, NULL ); } return( -1 ); } /* Retrieves the number of providers * Returns 1 if successful or -1 on error */ int libfwevt_manifest_get_number_of_providers( libfwevt_manifest_t *manifest, int *number_of_providers, libcerror_error_t **error ) { libfwevt_internal_manifest_t *internal_manifest = NULL; static char *function = "libfwevt_manifest_get_number_of_providers"; if( manifest == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid manifest.", function ); return( -1 ); } internal_manifest = (libfwevt_internal_manifest_t *) manifest; if( libcdata_array_get_number_of_entries( internal_manifest->providers_array, number_of_providers, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific provider * Returns 1 if successful or -1 on error */ int libfwevt_manifest_get_provider( libfwevt_manifest_t *manifest, int provider_index, libfwevt_provider_t **provider, libcerror_error_t **error ) { libfwevt_internal_manifest_t *internal_manifest = NULL; static char *function = "libfwevt_manifest_get_provider"; if( manifest == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid manifest.", function ); return( -1 ); } internal_manifest = (libfwevt_internal_manifest_t *) manifest; if( libcdata_array_get_entry_by_index( internal_manifest->providers_array, provider_index, (intptr_t **) provider, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d.", function, provider_index ); return( -1 ); } return( 1 ); } /* Retrieves a specific provider by identifier (GUID) * Returns 1 if successful, 0 if not available or -1 on error */ int libfwevt_manifest_get_provider_by_identifier( libfwevt_manifest_t *manifest, const uint8_t *provider_identifier, size_t provider_identifier_size, libfwevt_provider_t **provider, libcerror_error_t **error ) { libfwevt_internal_manifest_t *internal_manifest = NULL; static char *function = "libfwevt_manifest_get_provider_by_identifier"; int number_of_providers = 0; int provider_index = 0; int result = 0; if( manifest == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid manifest.", function ); return( -1 ); } internal_manifest = (libfwevt_internal_manifest_t *) manifest; if( provider_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider identifier.", function ); return( -1 ); } if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } if( provider_identifier_size < 16 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid provider identifier value too small.", function ); return( -1 ); } if( provider_identifier_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid provider identifier size value exceeds maximum.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_manifest->providers_array, &number_of_providers, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); return( -1 ); } for( provider_index = 0; provider_index < number_of_providers; provider_index++ ) { if( libcdata_array_get_entry_by_index( internal_manifest->providers_array, provider_index, (intptr_t **) provider, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d.", function, provider_index ); goto on_error; } result = libfwevt_provider_compare_identifier( *provider, provider_identifier, 16, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare identifier of provider: %d.", function, provider_index ); goto on_error; } else if( result != 0 ) { return( 1 ); } } *provider = NULL; return( 0 ); on_error: *provider = NULL; return( -1 ); } libevt-20170120/libfwevt/libfwevt_channel.h0000664000175000017500000000331613040331702022636 0ustar00lordyestalordyesta00000000000000/* * Channel functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_CHANNEL_H ) #define _LIBFWEVT_INTERNAL_CHANNEL_H #include #include #include "libfwevt_extern.h" #include "libfwevt_libcerror.h" #include "libfwevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_channel libfwevt_internal_channel_t; struct libfwevt_internal_channel { /* The identifier */ uint32_t identifier; }; LIBFWEVT_EXTERN \ int libfwevt_channel_initialize( libfwevt_channel_t **channel, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_channel_free( libfwevt_channel_t **channel, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_channel_read( libfwevt_channel_t *channel, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_CHANNEL_H ) */ libevt-20170120/libfwevt/libfwevt_types.h0000664000175000017500000000512713040331702022374 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_TYPES_H ) #define _LIBFWEVT_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFWEVT for local use of libfwevt * The definitions in are copied here * for local use of libfwevt */ #if defined( HAVE_LOCAL_LIBFWEVT ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfwevt_channel {} libfwevt_channel_t; typedef struct libfwevt_event {} libfwevt_event_t; typedef struct libfwevt_keyword {} libfwevt_keyword_t; typedef struct libfwevt_level {} libfwevt_level_t; typedef struct libfwevt_manifest {} libfwevt_manifest_t; typedef struct libfwevt_map {} libfwevt_map_t; typedef struct libfwevt_opcode {} libfwevt_opcode_t; typedef struct libfwevt_provider {} libfwevt_provider_t; typedef struct libfwevt_task {} libfwevt_task_t; typedef struct libfwevt_template {} libfwevt_template_t; typedef struct libfwevt_xml_document {} libfwevt_xml_document_t; typedef struct libfwevt_xml_tag {} libfwevt_xml_tag_t; typedef struct libfwevt_xml_template_value {} libfwevt_xml_template_value_t; #else typedef intptr_t libfwevt_channel_t; typedef intptr_t libfwevt_event_t; typedef intptr_t libfwevt_keyword_t; typedef intptr_t libfwevt_level_t; typedef intptr_t libfwevt_manifest_t; typedef intptr_t libfwevt_map_t; typedef intptr_t libfwevt_opcode_t; typedef intptr_t libfwevt_provider_t; typedef intptr_t libfwevt_task_t; typedef intptr_t libfwevt_template_t; typedef intptr_t libfwevt_xml_document_t; typedef intptr_t libfwevt_xml_tag_t; typedef intptr_t libfwevt_xml_template_value_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBFWEVT ) */ #endif /* !defined( _LIBFWEVT_INTERNAL_TYPES_H ) */ libevt-20170120/libfwevt/libfwevt_xml_template_value.c0000664000175000017500000002525413040331702025115 0ustar00lordyestalordyesta00000000000000/* * Binary XML template value functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfwevt_libcerror.h" #include "libfwevt_types.h" #include "libfwevt_xml_template_value.h" /* Creates a binary XML template value * Make sure the value xml_template_value is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_xml_template_value_initialize( libfwevt_xml_template_value_t **xml_template_value, libcerror_error_t **error ) { libfwevt_internal_xml_template_value_t *internal_xml_template_value = NULL; static char *function = "libfwevt_xml_template_value_initialize"; if( xml_template_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML template value.", function ); return( -1 ); } if( *xml_template_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid binary XML template value value already set.", function ); return( -1 ); } internal_xml_template_value = memory_allocate_structure( libfwevt_internal_xml_template_value_t ); if( internal_xml_template_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create binary XML template value.", function ); goto on_error; } if( memory_set( internal_xml_template_value, 0, sizeof( libfwevt_internal_xml_template_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear binary XML template value.", function ); goto on_error; } *xml_template_value = (libfwevt_xml_template_value_t *) internal_xml_template_value; return( 1 ); on_error: if( internal_xml_template_value != NULL ) { memory_free( internal_xml_template_value ); } return( -1 ); } /* Frees a binary XML template value * Returns 1 if successful or -1 on error */ int libfwevt_xml_template_value_free( libfwevt_xml_template_value_t **xml_template_value, libcerror_error_t **error ) { libfwevt_internal_xml_template_value_t *internal_xml_template_value = NULL; static char *function = "libfwevt_xml_template_value_free"; if( xml_template_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML template value.", function ); return( -1 ); } if( *xml_template_value != NULL ) { internal_xml_template_value = (libfwevt_internal_xml_template_value_t *) *xml_template_value; *xml_template_value = NULL; memory_free( internal_xml_template_value ); } return( 1 ); } /* Retrieves the type * Returns 1 if successful or -1 on error */ int libfwevt_xml_template_value_get_type( libfwevt_xml_template_value_t *xml_template_value, uint8_t *type, libcerror_error_t **error ) { libfwevt_internal_xml_template_value_t *internal_xml_template_value = NULL; static char *function = "libfwevt_xml_template_value_get_type"; if( xml_template_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML template value.", function ); return( -1 ); } internal_xml_template_value = (libfwevt_internal_xml_template_value_t *) xml_template_value; if( type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid type.", function ); return( -1 ); } *type = internal_xml_template_value->type; return( 1 ); } /* Sets the type * Returns 1 if successful or -1 on error */ int libfwevt_xml_template_value_set_type( libfwevt_xml_template_value_t *xml_template_value, uint8_t type, libcerror_error_t **error ) { libfwevt_internal_xml_template_value_t *internal_xml_template_value = NULL; static char *function = "libfwevt_xml_template_value_set_type"; if( xml_template_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML template value.", function ); return( -1 ); } internal_xml_template_value = (libfwevt_internal_xml_template_value_t *) xml_template_value; internal_xml_template_value->type = type; return( 1 ); } /* Retrieves the offset * Returns 1 if successful or -1 on error */ int libfwevt_xml_template_value_get_offset( libfwevt_xml_template_value_t *xml_template_value, size_t *offset, libcerror_error_t **error ) { libfwevt_internal_xml_template_value_t *internal_xml_template_value = NULL; static char *function = "libfwevt_xml_template_value_get_offset"; if( xml_template_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML template value.", function ); return( -1 ); } internal_xml_template_value = (libfwevt_internal_xml_template_value_t *) xml_template_value; if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } *offset = internal_xml_template_value->offset; return( 1 ); } /* Sets the offset * Returns 1 if successful or -1 on error */ int libfwevt_xml_template_value_set_offset( libfwevt_xml_template_value_t *xml_template_value, size_t offset, libcerror_error_t **error ) { libfwevt_internal_xml_template_value_t *internal_xml_template_value = NULL; static char *function = "libfwevt_xml_template_value_set_offset"; if( xml_template_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML template value.", function ); return( -1 ); } internal_xml_template_value = (libfwevt_internal_xml_template_value_t *) xml_template_value; internal_xml_template_value->offset = offset; return( 1 ); } /* Retrieves the size * Returns 1 if successful or -1 on error */ int libfwevt_xml_template_value_get_size( libfwevt_xml_template_value_t *xml_template_value, uint16_t *size, libcerror_error_t **error ) { libfwevt_internal_xml_template_value_t *internal_xml_template_value = NULL; static char *function = "libfwevt_xml_template_value_get_size"; if( xml_template_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML template value.", function ); return( -1 ); } internal_xml_template_value = (libfwevt_internal_xml_template_value_t *) xml_template_value; if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } *size = internal_xml_template_value->size; return( 1 ); } /* Sets the size * Returns 1 if successful or -1 on error */ int libfwevt_xml_template_value_set_size( libfwevt_xml_template_value_t *xml_template_value, uint16_t size, libcerror_error_t **error ) { libfwevt_internal_xml_template_value_t *internal_xml_template_value = NULL; static char *function = "libfwevt_xml_template_value_set_size"; if( xml_template_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML template value.", function ); return( -1 ); } internal_xml_template_value = (libfwevt_internal_xml_template_value_t *) xml_template_value; internal_xml_template_value->size = size; return( 1 ); } /* Retrieves the flags * Returns 1 if successful or -1 on error */ int libfwevt_xml_template_value_get_flags( libfwevt_xml_template_value_t *xml_template_value, uint8_t *flags, libcerror_error_t **error ) { libfwevt_internal_xml_template_value_t *internal_xml_template_value = NULL; static char *function = "libfwevt_xml_template_value_get_flags"; if( xml_template_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML template value.", function ); return( -1 ); } internal_xml_template_value = (libfwevt_internal_xml_template_value_t *) xml_template_value; if( flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid flags.", function ); return( -1 ); } *flags = internal_xml_template_value->flags; return( 1 ); } /* Sets the flags * Returns 1 if successful or -1 on error */ int libfwevt_xml_template_value_set_flags( libfwevt_xml_template_value_t *xml_template_value, uint8_t flags, libcerror_error_t **error ) { libfwevt_internal_xml_template_value_t *internal_xml_template_value = NULL; static char *function = "libfwevt_xml_template_value_set_flags"; if( xml_template_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML template value.", function ); return( -1 ); } internal_xml_template_value = (libfwevt_internal_xml_template_value_t *) xml_template_value; internal_xml_template_value->flags = flags; return( 1 ); } libevt-20170120/libfwevt/libfwevt_libfvalue.h0000664000175000017500000000303213040331702023172 0ustar00lordyestalordyesta00000000000000/* * The libfvalue header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_LIBFVALUE_H ) #define _LIBFWEVT_LIBFVALUE_H #include /* Define HAVE_LOCAL_LIBFVALUE for local use of libfvalue */ #if defined( HAVE_LOCAL_LIBFVALUE ) #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBFVALUE_DLL_IMPORT * before including libfvalue.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFVALUE_DLL_IMPORT #endif #include #endif #endif libevt-20170120/libfwevt/libfwevt_manifest.h0000664000175000017500000000470213040331702023034 0ustar00lordyestalordyesta00000000000000/* * Manifest functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_MANIFEST_H ) #define _LIBFWEVT_INTERNAL_MANIFEST_H #include #include #include "libfwevt_extern.h" #include "libfwevt_libcdata.h" #include "libfwevt_libcerror.h" #include "libfwevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_manifest libfwevt_internal_manifest_t; struct libfwevt_internal_manifest { /* The major version */ uint16_t major_version; /* The minor version */ uint16_t minor_version; /* The providers array */ libcdata_array_t *providers_array; }; LIBFWEVT_EXTERN \ int libfwevt_manifest_initialize( libfwevt_manifest_t **manifest, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_manifest_free( libfwevt_manifest_t **manifest, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_manifest_read( libfwevt_manifest_t *manifest, const uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_manifest_get_number_of_providers( libfwevt_manifest_t *manifest, int *number_of_providers, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_manifest_get_provider( libfwevt_manifest_t *manifest, int provider_index, libfwevt_provider_t **provider, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_manifest_get_provider_by_identifier( libfwevt_manifest_t *manifest, const uint8_t *provider_identifier, size_t provider_identifier_size, libfwevt_provider_t **provider, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_MANIFEST_H ) */ libevt-20170120/libfwevt/libfwevt_opcode.h0000664000175000017500000000327613040331702022504 0ustar00lordyestalordyesta00000000000000/* * Opcode functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_OPCODE_H ) #define _LIBFWEVT_INTERNAL_OPCODE_H #include #include #include "libfwevt_extern.h" #include "libfwevt_libcerror.h" #include "libfwevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_opcode libfwevt_internal_opcode_t; struct libfwevt_internal_opcode { /* The identifier */ uint16_t identifier; }; LIBFWEVT_EXTERN \ int libfwevt_opcode_initialize( libfwevt_opcode_t **opcode, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_opcode_free( libfwevt_opcode_t **opcode, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_opcode_read( libfwevt_opcode_t *opcode, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_OPCODE_H ) */ libevt-20170120/libfwevt/libfwevt_provider.h0000664000175000017500000001706313040331702023064 0ustar00lordyestalordyesta00000000000000/* * Provider functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_PROVIDER_H ) #define _LIBFWEVT_INTERNAL_PROVIDER_H #include #include #include "libfwevt_channel.h" #include "libfwevt_extern.h" #include "libfwevt_event.h" #include "libfwevt_keyword.h" #include "libfwevt_level.h" #include "libfwevt_libcdata.h" #include "libfwevt_libcerror.h" #include "libfwevt_map.h" #include "libfwevt_opcode.h" #include "libfwevt_task.h" #include "libfwevt_template.h" #include "libfwevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_provider libfwevt_internal_provider_t; struct libfwevt_internal_provider { /* The channels offset */ uint32_t channels_offset; /* The events offset */ uint32_t events_offset; /* The keywords offset */ uint32_t keywords_offset; /* The levels offset */ uint32_t levels_offset; /* The maps offset */ uint32_t maps_offset; /* The opcodes offset */ uint32_t opcodes_offset; /* The tasks offset */ uint32_t tasks_offset; /* The templates offset */ uint32_t templates_offset; /* The (provider) identifier * Contains a GUID */ uint8_t identifier[ 16 ]; /* The channels array */ libcdata_array_t *channels_array; /* The events array */ libcdata_array_t *events_array; /* The keywords array */ libcdata_array_t *keywords_array; /* The levels array */ libcdata_array_t *levels_array; /* The maps array */ libcdata_array_t *maps_array; /* The opcodes array */ libcdata_array_t *opcodes_array; /* The tasks array */ libcdata_array_t *tasks_array; /* The templates array */ libcdata_array_t *templates_array; }; LIBFWEVT_EXTERN \ int libfwevt_provider_initialize( libfwevt_provider_t **provider, const uint8_t *identifier, size_t identifier_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_free( libfwevt_provider_t **provider, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_read( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_read_channels( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_read_events( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_read_keywords( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_read_levels( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_read_maps( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_read_opcodes( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_read_tasks( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_read_templates( libfwevt_provider_t *provider, const uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_compare_identifier( libfwevt_provider_t *provider, const uint8_t *identifier, size_t identifier_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_number_of_channels( libfwevt_provider_t *provider, int *number_of_channels, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_channel( libfwevt_provider_t *provider, int channel_index, libfwevt_channel_t **channel, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_number_of_events( libfwevt_provider_t *provider, int *number_of_events, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_event( libfwevt_provider_t *provider, int event_index, libfwevt_event_t **event, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_event_by_identifier( libfwevt_provider_t *provider, uint32_t event_identifier, libfwevt_event_t **event, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_number_of_keywords( libfwevt_provider_t *provider, int *number_of_keywords, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_keyword( libfwevt_provider_t *provider, int keyword_index, libfwevt_keyword_t **keyword, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_number_of_levels( libfwevt_provider_t *provider, int *number_of_levels, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_level( libfwevt_provider_t *provider, int level_index, libfwevt_level_t **level, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_number_of_maps( libfwevt_provider_t *provider, int *number_of_maps, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_map( libfwevt_provider_t *provider, int map_index, libfwevt_map_t **map, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_number_of_opcodes( libfwevt_provider_t *provider, int *number_of_opcodes, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_opcode( libfwevt_provider_t *provider, int opcode_index, libfwevt_opcode_t **opcode, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_number_of_tasks( libfwevt_provider_t *provider, int *number_of_tasks, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_task( libfwevt_provider_t *provider, int task_index, libfwevt_task_t **task, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_number_of_templates( libfwevt_provider_t *provider, int *number_of_templates, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_template( libfwevt_provider_t *provider, int template_index, libfwevt_template_t **template, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_provider_get_template_by_offset( libfwevt_provider_t *provider, uint32_t offset, libfwevt_template_t **template, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_PROVIDER_H ) */ libevt-20170120/libfwevt/Makefile.in0000664000175000017500000010536713040342660021236 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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 = libfwevt ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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) libfwevt_la_LIBADD = am__libfwevt_la_SOURCES_DIST = fwevt_template.h libfwevt_channel.c \ libfwevt_channel.h libfwevt_debug.c libfwevt_debug.h \ libfwevt_definitions.h libfwevt_extern.h libfwevt_error.c \ libfwevt_error.h libfwevt_event.c libfwevt_event.h \ libfwevt_libcdata.h libfwevt_libcerror.h libfwevt_libcnotify.h \ libfwevt_libfguid.h libfwevt_libfvalue.h libfwevt_libuna.h \ libfwevt_keyword.c libfwevt_keyword.h libfwevt_level.c \ libfwevt_level.h libfwevt_manifest.c libfwevt_manifest.h \ libfwevt_map.c libfwevt_map.h libfwevt_opcode.c \ libfwevt_opcode.h libfwevt_provider.c libfwevt_provider.h \ libfwevt_support.c libfwevt_support.h libfwevt_task.c \ libfwevt_task.h libfwevt_template.c libfwevt_template.h \ libfwevt_types.h libfwevt_unused.h libfwevt_xml_document.c \ libfwevt_xml_document.h libfwevt_xml_tag.c libfwevt_xml_tag.h \ libfwevt_xml_template_value.c libfwevt_xml_template_value.h \ libfwevt_xml_token.c libfwevt_xml_token.h @HAVE_LOCAL_LIBFWEVT_TRUE@am_libfwevt_la_OBJECTS = \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_channel.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_debug.lo libfwevt_error.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_event.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_keyword.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_level.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_manifest.lo libfwevt_map.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_opcode.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_provider.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_support.lo libfwevt_task.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_template.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_xml_document.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_xml_tag.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_xml_template_value.lo \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_xml_token.lo libfwevt_la_OBJECTS = $(am_libfwevt_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_LIBFWEVT_TRUE@am_libfwevt_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__depfiles_maybe = depfiles 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 = $(libfwevt_la_SOURCES) DIST_SOURCES = $(am__libfwevt_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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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_LIBFWEVT_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFWEVT_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFWEVT_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFWEVT_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWEVT_TRUE@ @LIBCTHREADS_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWEVT_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWEVT_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWEVT_TRUE@ @LIBFDATETIME_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWEVT_TRUE@ @LIBFGUID_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWEVT_TRUE@ @LIBFVALUE_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWEVT_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWEVT_TRUE@ @PTHREAD_CPPFLAGS@ @HAVE_LOCAL_LIBFWEVT_TRUE@noinst_LTLIBRARIES = libfwevt.la @HAVE_LOCAL_LIBFWEVT_TRUE@libfwevt_la_SOURCES = \ @HAVE_LOCAL_LIBFWEVT_TRUE@ fwevt_template.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_channel.c libfwevt_channel.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_debug.c libfwevt_debug.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_definitions.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_extern.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_error.c libfwevt_error.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_event.c libfwevt_event.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_libcdata.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_libcerror.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_libcnotify.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_libfguid.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_libfvalue.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_libuna.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_keyword.c libfwevt_keyword.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_level.c libfwevt_level.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_manifest.c libfwevt_manifest.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_map.c libfwevt_map.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_opcode.c libfwevt_opcode.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_provider.c libfwevt_provider.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_support.c libfwevt_support.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_task.c libfwevt_task.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_template.c libfwevt_template.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_types.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_unused.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_xml_document.c libfwevt_xml_document.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_xml_tag.c libfwevt_xml_tag.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_xml_template_value.c libfwevt_xml_template_value.h \ @HAVE_LOCAL_LIBFWEVT_TRUE@ libfwevt_xml_token.c libfwevt_xml_token.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfwevt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfwevt/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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}; \ } libfwevt.la: $(libfwevt_la_OBJECTS) $(libfwevt_la_DEPENDENCIES) $(EXTRA_libfwevt_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libfwevt_la_rpath) $(libfwevt_la_OBJECTS) $(libfwevt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_event.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_keyword.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_level.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_manifest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_opcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_provider.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_task.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_template.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_xml_document.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_xml_tag.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_xml_template_value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwevt_xml_token.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfwevt ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfwevt_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: libevt-20170120/libfwevt/libfwevt_template.c0000664000175000017500000010717213040331702023041 0ustar00lordyestalordyesta00000000000000/* * Template functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "libfwevt_debug.h" #include "libfwevt_definitions.h" #include "libfwevt_libcdata.h" #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_libfguid.h" #include "libfwevt_template.h" #include "libfwevt_xml_document.h" #include "libfwevt_xml_template_value.h" #include "fwevt_template.h" /* Creates a template * Make sure the value template is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_template_initialize( libfwevt_template_t **template, libcerror_error_t **error ) { libfwevt_internal_template_t *internal_template = NULL; static char *function = "libfwevt_template_initialize"; if( template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", function ); return( -1 ); } if( *template != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid template value already set.", function ); return( -1 ); } internal_template = memory_allocate_structure( libfwevt_internal_template_t ); if( internal_template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create template.", function ); goto on_error; } if( memory_set( internal_template, 0, sizeof( libfwevt_internal_template_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear template.", function ); goto on_error; } if( libcdata_array_initialize( &( internal_template->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; } internal_template->ascii_codepage = 1252; *template = (libfwevt_template_t *) internal_template; return( 1 ); on_error: if( internal_template != NULL ) { memory_free( internal_template ); } return( -1 ); } /* Frees a template * Returns 1 if successful or -1 on error */ int libfwevt_template_free( libfwevt_template_t **template, libcerror_error_t **error ) { libfwevt_internal_template_t *internal_template = NULL; static char *function = "libfwevt_template_free"; int result = 1; if( template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", function ); return( -1 ); } if( *template != NULL ) { internal_template = (libfwevt_internal_template_t *) *template; *template = NULL; if( internal_template->data != NULL ) { memory_free( internal_template->data ); } if( libcdata_array_free( &( internal_template->values_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_xml_template_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to free values array.", function ); result = -1; } memory_free( internal_template ); } return( result ); } /* Reads the template * Returns 1 if successful or -1 on error */ int libfwevt_template_read( libfwevt_template_t *template, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ) { libfwevt_internal_template_t *internal_template = NULL; static char *function = "libfwevt_template_read"; #if defined( HAVE_DEBUG_OUTPUT ) libfwevt_xml_document_t *xml_document = NULL; #endif if( template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", function ); return( -1 ); } internal_template = (libfwevt_internal_template_t *) template; 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) UINT32_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_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( libfwevt_template_read_header( internal_template, &( data[ data_offset ] ), data_size - data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read template header.", function ); goto on_error; } if( ( (size_t) internal_template->size > data_size ) || ( (size_t) internal_template->size > ( data_size - data_offset ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template size value out of bounds.", function ); goto on_error; } if( internal_template->data != NULL ) { memory_free( internal_template->data ); internal_template->data = NULL; internal_template->data_size = 0; } internal_template->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * internal_template->size ); if( internal_template->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_template->data, &( data[ data_offset ] ), (size_t) internal_template->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_template->data_size = (size_t) internal_template->size; internal_template->offset = (uint32_t) data_offset; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfwevt_xml_document_initialize( &xml_document, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create XML document.", function ); goto on_error; } if( libfwevt_template_read_xml_document( template, xml_document, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML document.", function ); goto on_error; } libcnotify_printf( "%s: XML document:\n", function ); if( libfwevt_xml_document_debug_print( xml_document, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print XML document.", function ); goto on_error; } libcnotify_printf( "\n" ); if( libfwevt_xml_document_free( &xml_document, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to free XML document.", function ); goto on_error; } } #endif return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( xml_document != NULL ) { libfwevt_xml_document_free( &xml_document, NULL ); } #endif if( internal_template->data != NULL ) { memory_free( internal_template->data ); internal_template->data = NULL; } return( -1 ); } /* Reads the template header * Returns 1 if successful or -1 on error */ int libfwevt_template_read_header( libfwevt_internal_template_t *internal_template, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { static char *function = "libfwevt_template_read_header"; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t guid_string[ 48 ]; libfguid_identifier_t *guid = NULL; uint32_t value_32bit = 0; int result = 0; #endif if( internal_template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", 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) UINT32_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( fwevt_template_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: template header data:\n", function ); libcnotify_print_data( data, sizeof( fwevt_template_header_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( ( (fwevt_template_header_t *) data )->size, internal_template->size ); byte_stream_copy_to_uint32_little_endian( ( (fwevt_template_header_t *) data )->number_of_descriptors, internal_template->number_of_descriptors ); byte_stream_copy_to_uint32_little_endian( ( (fwevt_template_header_t *) data )->number_of_names, internal_template->number_of_names ); byte_stream_copy_to_uint32_little_endian( ( (fwevt_template_header_t *) data )->instance_values_offset, internal_template->instance_values_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c%c%c\n", function, ( (fwevt_template_header_t *) data )->signature[ 0 ], ( (fwevt_template_header_t *) data )->signature[ 1 ], ( (fwevt_template_header_t *) data )->signature[ 2 ], ( (fwevt_template_header_t *) data )->signature[ 3 ] ); libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu32 "\n", function, internal_template->size ); libcnotify_printf( "%s: number of descriptors\t\t\t: %" PRIu32 "\n", function, internal_template->number_of_descriptors ); libcnotify_printf( "%s: number of names\t\t\t\t: %" PRIu32 "\n", function, internal_template->number_of_names ); libcnotify_printf( "%s: instance values offset\t\t\t: 0x%08" PRIx32 "\n", function, internal_template->instance_values_offset ); byte_stream_copy_to_uint32_little_endian( ( (fwevt_template_header_t *) data )->unknown1, value_32bit ); libcnotify_printf( "%s: unknown1\t\t\t\t\t: %" PRIu32 "\n", function, value_32bit ); 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, ( (fwevt_template_header_t *) data )->identifier, 16, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); goto on_error; } #if defined( 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: identifier\t\t\t\t: %" PRIs_SYSTEM "\n", function, guid_string ); if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); goto on_error; } libcnotify_printf( "\n" ); } #endif if( memory_compare( ( (fwevt_template_header_t *) data )->signature, "TEMP", 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported template signature.", function ); goto on_error; } return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( guid != NULL ) { libfguid_identifier_free( &guid, NULL ); } #endif return( -1 ); } /* Reads the template instance values * Returns 1 if successful or -1 on error */ int libfwevt_template_read_instance_values( libfwevt_internal_template_t *internal_template, libcerror_error_t **error ) { libfwevt_xml_template_value_t *template_value = NULL; static char *function = "libfwevt_template_read_instance_values"; uint32_t instance_values_data_offset = 0; uint32_t first_template_value_data_offset = 0; uint32_t template_value_data_offset = 0; uint16_t template_value_data_size = 0; uint8_t template_value_type = 0; int entry_index = 0; int template_value_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; uint16_t value_16bit = 0; #endif if( internal_template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", function ); return( -1 ); } if( internal_template->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid template - missing data.", function ); return( -1 ); } if( (size_t) internal_template->size > internal_template->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template - size value out of bounds.", function ); goto on_error; } if( internal_template->number_of_descriptors == 0 ) { /* The data offset should either be 0 or point to the end of the data */ if( ( internal_template->instance_values_offset != 0 ) && ( internal_template->instance_values_offset != ( internal_template->offset + internal_template->size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template - instance values offset value out of bounds.", function ); goto on_error; } return( 1 ); } if( internal_template->instance_values_offset < internal_template->offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template - instance values offset value out of bounds.", function ); goto on_error; } instance_values_data_offset = internal_template->instance_values_offset - internal_template->offset; if( ( instance_values_data_offset < sizeof( fwevt_template_header_t ) ) || ( instance_values_data_offset >= (size_t) internal_template->size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid instance values data offset value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading template instance values data at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, internal_template->instance_values_offset, internal_template->instance_values_offset ); libcnotify_printf( "%s: template instance values data:\n", function ); libcnotify_print_data( &( internal_template->data[ instance_values_data_offset ] ), internal_template->size - instance_values_data_offset, 0 ); } #endif do { if( ( instance_values_data_offset + 20 ) > internal_template->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template - data too small.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value: %02d header data:\n", function, template_value_index ); libcnotify_print_data( &( internal_template->data[ instance_values_data_offset ] ), 20, 0 ); } #endif /* TODO change xml template value to handle this type */ template_value_type = internal_template->data[ instance_values_data_offset + 4 ]; byte_stream_copy_to_uint32_little_endian( &( internal_template->data[ instance_values_data_offset + 16 ] ), template_value_data_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint32_little_endian( &( internal_template->data[ instance_values_data_offset ] ), value_32bit ); libcnotify_printf( "%s: value: %02d unknown1\t\t: 0x%08" PRIx32 "\n", function, template_value_index, value_32bit ); libcnotify_printf( "%s: value: %02d type\t\t\t: 0x%02" PRIx8 " (", function, template_value_index, template_value_type ); libfwevt_debug_print_value_type( template_value_type ); libcnotify_printf( ")\n" ); libcnotify_printf( "%s: value: %02d unknown2\t\t: 0x%02" PRIx8 "\n", function, template_value_index, internal_template->data[ instance_values_data_offset + 5 ] ); byte_stream_copy_to_uint16_little_endian( &( internal_template->data[ instance_values_data_offset + 6 ] ), value_16bit ); libcnotify_printf( "%s: value: %02d unknown3\t\t: 0x%04" PRIx16 "\n", function, template_value_index, value_16bit ); byte_stream_copy_to_uint32_little_endian( &( internal_template->data[ instance_values_data_offset + 8 ] ), value_32bit ); libcnotify_printf( "%s: value: %02d unknown4\t\t: 0x%08" PRIx32 "\n", function, template_value_index, value_32bit ); byte_stream_copy_to_uint32_little_endian( &( internal_template->data[ instance_values_data_offset + 12 ] ), value_32bit ); libcnotify_printf( "%s: value: %02d unknown5\t\t: 0x%08" PRIx32 "\n", function, template_value_index, value_32bit ); libcnotify_printf( "%s: value: %02d offset\t\t: 0x%08" PRIx32 "\n", function, template_value_index, template_value_data_offset ); } #endif instance_values_data_offset += 20; if( template_value_data_offset < internal_template->offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template value data offset value out of bounds.", function ); goto on_error; } template_value_data_offset -= internal_template->offset; if( template_value_data_offset >= internal_template->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template value data offset value out of bounds.", function ); goto on_error; } if( ( template_value_data_offset + 4 ) > internal_template->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template - data too small.", function ); goto on_error; } if( first_template_value_data_offset == 0 ) { first_template_value_data_offset = template_value_data_offset; } byte_stream_copy_to_uint32_little_endian( &( internal_template->data[ template_value_data_offset ] ), template_value_data_size ); if( ( template_value_data_offset + template_value_data_size ) > internal_template->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template - data too small.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value: %02d value data:\n", function, template_value_index ); libcnotify_print_data( &( internal_template->data[ template_value_data_offset ] ), template_value_data_size, 0 ); } #endif if( template_value_data_size > 0 ) { if( template_value_data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template value data size value out of bounds.", function ); goto on_error; } template_value_data_size -= 4; } template_value_data_offset += 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value: %02d size\t\t: %" PRIu32 "\n", function, template_value_index, template_value_data_size ); libcnotify_printf( "%s: value: %02d data:\n", function, template_value_index ); libcnotify_print_data( &( internal_template->data[ template_value_data_offset ] ), template_value_data_size, 0 ); libcnotify_printf( "\n" ); } #endif if( libfwevt_xml_template_value_initialize( &template_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create template value.", function ); goto on_error; } if( libfwevt_xml_template_value_set_flags( template_value, LIBFWEVT_XML_TEMPLATE_VALUE_FLAG_IS_DEFINITION, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set template value flags.", function ); goto on_error; } if( libfwevt_xml_template_value_set_type( template_value, template_value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set template value type.", function ); goto on_error; } if( libfwevt_xml_template_value_set_offset( template_value, template_value_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set template value data offset.", function ); goto on_error; } if( libfwevt_xml_template_value_set_size( template_value, template_value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set template value data size.", function ); goto on_error; } if( libcdata_array_append_entry( internal_template->values_array, &entry_index, (intptr_t *) template_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to append template value: %d to array.", function, template_value_index ); goto on_error; } template_value = NULL; template_value_index++; } while( instance_values_data_offset < first_template_value_data_offset ); return( 1 ); on_error: if( template_value != NULL ) { libfwevt_xml_template_value_free( &template_value, NULL ); } libcdata_array_empty( internal_template->values_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_xml_template_value_free, NULL ); return( -1 ); } /* Reads the template XML document * Returns 1 if successful or -1 on error */ int libfwevt_template_read_xml_document( libfwevt_template_t *template, libfwevt_xml_document_t *xml_document, libcerror_error_t **error ) { libfwevt_internal_template_t *internal_template = NULL; static char *function = "libfwevt_template_read_xml_document"; size_t binary_xml_data_size = 0; if( template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", function ); return( -1 ); } internal_template = (libfwevt_internal_template_t *) template; if( internal_template->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid template - missing data.", function ); return( -1 ); } if( (size_t) internal_template->size > internal_template->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template - size value out of bounds.", function ); return( -1 ); } if( internal_template->instance_values_offset == 0 ) { binary_xml_data_size = (size_t) internal_template->size; } else { if( internal_template->instance_values_offset < internal_template->offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template - instance values offset value out of bounds.", function ); return( -1 ); } binary_xml_data_size = internal_template->instance_values_offset - internal_template->offset; } if( binary_xml_data_size < sizeof( fwevt_template_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML data size value out of bounds.", function ); goto on_error; } binary_xml_data_size -= sizeof( fwevt_template_header_t ); if( ( binary_xml_data_size == 0 ) || ( binary_xml_data_size > internal_template->data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML data size value out of bounds.", function ); goto on_error; } if( libfwevt_template_read_instance_values( internal_template, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read template instance values.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading template binary XML document data at offset: %" PRIzd " (0x%08" PRIzx "):\n", function, internal_template->offset + sizeof( fwevt_template_header_t ), internal_template->offset + sizeof( fwevt_template_header_t ) ); libcnotify_printf( "%s: template binary XML document data:\n", function ); libcnotify_print_data( &( internal_template->data[ sizeof( fwevt_template_header_t ) ] ), binary_xml_data_size, 0 ); } #endif if( libfwevt_xml_document_read_with_template_values( xml_document, internal_template->data, internal_template->data_size, sizeof( fwevt_template_header_t ), internal_template->ascii_codepage, 0, internal_template->values_array, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read binary XML document.", function ); goto on_error; } return( 1 ); on_error: libcdata_array_empty( internal_template->values_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_xml_template_value_free, NULL ); return( -1 ); } /* Sets the ASCII codepage * Returns 1 if successful or -1 on error */ int libfwevt_template_set_ascii_codepage( libfwevt_template_t *template, int ascii_codepage, libcerror_error_t **error ) { libfwevt_internal_template_t *internal_template = NULL; static char *function = "libfwevt_template_set_ascii_codepage"; if( template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", function ); return( -1 ); } internal_template = (libfwevt_internal_template_t *) template; /* TODO check supported codepages ? */ internal_template->ascii_codepage = ascii_codepage; return( 1 ); } /* Retrieves the data * Returns 1 if successful or -1 on error */ int libfwevt_template_get_data( libfwevt_template_t *template, const uint8_t **data, size_t *data_size, libcerror_error_t **error ) { libfwevt_internal_template_t *internal_template = NULL; static char *function = "libfwevt_template_get_data"; if( template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", function ); return( -1 ); } internal_template = (libfwevt_internal_template_t *) template; if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } *data = internal_template->data; *data_size = internal_template->data_size; return( 1 ); } /* Sets the data * Returns 1 if successful or -1 on error */ int libfwevt_template_set_data( libfwevt_template_t *template, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { libfwevt_internal_template_t *internal_template = NULL; static char *function = "libfwevt_template_set_data"; if( template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", function ); return( -1 ); } internal_template = (libfwevt_internal_template_t *) template; 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) UINT32_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( libfwevt_template_read_header( internal_template, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read template header.", function ); goto on_error; } if( (size_t) internal_template->size > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid template size value out of bounds.", function ); goto on_error; } if( internal_template->data != NULL ) { memory_free( internal_template->data ); internal_template->data = NULL; internal_template->data_size = 0; } internal_template->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * data_size ); if( internal_template->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_template->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_template->data_size = data_size; return( 1 ); on_error: if( internal_template->data != NULL ) { memory_free( internal_template->data ); internal_template->data = NULL; } internal_template->data_size = 0; return( -1 ); } /* Retrieves the offset * Returns 1 if successful or -1 on error */ int libfwevt_template_get_offset( libfwevt_template_t *template, uint32_t *offset, libcerror_error_t **error ) { libfwevt_internal_template_t *internal_template = NULL; static char *function = "libfwevt_template_get_offset"; if( template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", function ); return( -1 ); } internal_template = (libfwevt_internal_template_t *) template; if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } *offset = internal_template->offset; return( 1 ); } /* Sets the offset * Returns 1 if successful or -1 on error */ int libfwevt_template_set_offset( libfwevt_template_t *template, uint32_t offset, libcerror_error_t **error ) { libfwevt_internal_template_t *internal_template = NULL; static char *function = "libfwevt_template_set_offset"; if( template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", function ); return( -1 ); } internal_template = (libfwevt_internal_template_t *) template; internal_template->offset = offset; return( 1 ); } /* Retrieves the size * Returns 1 if successful or -1 on error */ int libfwevt_template_get_size( libfwevt_template_t *template, uint32_t *size, libcerror_error_t **error ) { libfwevt_internal_template_t *internal_template = NULL; static char *function = "libfwevt_template_get_size"; if( template == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template.", function ); return( -1 ); } internal_template = (libfwevt_internal_template_t *) template; if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } *size = internal_template->size; return( 1 ); } libevt-20170120/libfwevt/libfwevt_xml_tag.c0000664000175000017500000044473013040331702022665 0ustar00lordyestalordyesta00000000000000/* * XML tag functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #if defined( HAVE_WCTYPE_H ) #include #endif #include "libfwevt_definitions.h" #include "libfwevt_libcdata.h" #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_libfvalue.h" #include "libfwevt_libuna.h" #include "libfwevt_types.h" #include "libfwevt_xml_tag.h" /* Creates a XML tag * Make sure the value xml_tag is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_initialize( libfwevt_xml_tag_t **xml_tag, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_initialize"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } if( *xml_tag != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid XML tag value already set.", function ); return( -1 ); } internal_xml_tag = memory_allocate_structure( libfwevt_internal_xml_tag_t ); if( internal_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create XML tag.", function ); goto on_error; } if( memory_set( internal_xml_tag, 0, sizeof( libfwevt_internal_xml_tag_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear XML tag.", function ); memory_free( internal_xml_tag ); return( -1 ); } if( libcdata_array_initialize( &( internal_xml_tag->attributes_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create attributes array.", function ); goto on_error; } if( libcdata_array_initialize( &( internal_xml_tag->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; } *xml_tag = (libfwevt_xml_tag_t *) internal_xml_tag; return( 1 ); on_error: if( internal_xml_tag != NULL ) { if( internal_xml_tag->attributes_array != NULL ) { libcdata_array_free( &( internal_xml_tag->attributes_array ), NULL, NULL ); } memory_free( internal_xml_tag ); } return( -1 ); } /* Frees a XML tag * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_free( libfwevt_xml_tag_t **xml_tag, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_free"; int result = 1; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } if( *xml_tag != NULL ) { internal_xml_tag = (libfwevt_internal_xml_tag_t *) *xml_tag; *xml_tag = NULL; if( libcdata_array_free( &( internal_xml_tag->elements_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_xml_tag_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free elements array.", function ); result = -1; } if( libcdata_array_free( &( internal_xml_tag->attributes_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_xml_tag_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free attributes array.", function ); result = -1; } if( internal_xml_tag->value != NULL ) { if( libfvalue_value_free( &( internal_xml_tag->value ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); result = -1; } } if( internal_xml_tag->name != NULL ) { if( libfvalue_value_free( &( internal_xml_tag->name ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free name.", function ); result = -1; } } memory_free( internal_xml_tag ); } return( result ); } /* Appends an attribute * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_append_attribute( libfwevt_xml_tag_t *xml_tag, libfwevt_xml_tag_t *attribute_xml_tag, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_free"; int entry_index = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libcdata_array_append_entry( internal_xml_tag->attributes_array, &entry_index, (intptr_t *) attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append attribute XML tag to array.", function ); return( -1 ); } return( 1 ); } /* Sets the type * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_set_type( libfwevt_xml_tag_t *xml_tag, uint8_t type, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_set_type"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; internal_xml_tag->type = type; return( 1 ); } /* Sets the name data * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_set_name_data( libfwevt_xml_tag_t *xml_tag, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_set_name_data"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libfvalue_value_type_initialize( &( internal_xml_tag->name ), LIBFVALUE_VALUE_TYPE_STRING_UTF16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create name.", function ); goto on_error; } if( libfvalue_value_set_data( internal_xml_tag->name, data, data_size, encoding, LIBFVALUE_VALUE_DATA_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name data.", function ); goto on_error; } return( 1 ); on_error: if( internal_xml_tag->name != NULL ) { libfvalue_value_free( &( internal_xml_tag->name ), NULL ); } return( -1 ); } /* Retrieves the value * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_value( libfwevt_xml_tag_t *xml_tag, libfvalue_value_t **value, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_value"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } *value = internal_xml_tag->value; return( 1 ); } /* Sets the value type * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_set_value_type( libfwevt_xml_tag_t *xml_tag, int value_type, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_set_value_type"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( internal_xml_tag->value == NULL ) { if( libfvalue_value_type_initialize( &( internal_xml_tag->value ), value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value.", function ); return( -1 ); } internal_xml_tag->value_type = value_type; } else if( internal_xml_tag->value_type != value_type ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value type value mismatch.", function ); return( -1 ); } return( 1 ); } /* Sets the value format flags * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_set_value_format_flags( libfwevt_xml_tag_t *xml_tag, uint32_t format_flags, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_set_value_format_flags"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libfvalue_value_set_format_flags( internal_xml_tag->value, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value format flags.", function ); return( -1 ); } return( 1 ); } /* Sets the value data * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_set_value_data( libfwevt_xml_tag_t *xml_tag, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_set_value_data"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libfvalue_value_set_data( internal_xml_tag->value, data, data_size, encoding, LIBFVALUE_VALUE_DATA_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value data.", function ); return( -1 ); } return( 1 ); } /* Appends the value data * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_append_value_data( libfwevt_xml_tag_t *xml_tag, const uint8_t *data, size_t data_size, int encoding, int *value_entry_index, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_append_value_data"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libfvalue_value_append_entry_data( internal_xml_tag->value, value_entry_index, data, data_size, encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value data.", function ); return( -1 ); } return( 1 ); } /* Sets the value strings array * Returns the number of bytes read if successful or -1 on error */ ssize_t libfwevt_xml_tag_set_value_strings_array( libfwevt_xml_tag_t *xml_tag, const uint8_t *strings_array_data, size_t strings_array_data_size, int encoding, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_set_value_strings_array"; ssize_t read_count = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; read_count = libfvalue_value_type_set_data_string( internal_xml_tag->value, strings_array_data, strings_array_data_size, encoding, LIBFVALUE_VALUE_DATA_FLAG_NON_MANAGED, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value data.", function ); return( -1 ); } return( read_count ); } /* Appends an element * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_append_element( libfwevt_xml_tag_t *xml_tag, libfwevt_xml_tag_t *element_xml_tag, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_free"; int entry_index = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libcdata_array_append_entry( internal_xml_tag->elements_array, &entry_index, (intptr_t *) element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append element XML tag to array.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 formatted name * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf8_name_size( libfwevt_xml_tag_t *xml_tag, size_t *utf8_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_utf8_name_size"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libfvalue_value_get_utf8_string_size( internal_xml_tag->name, 0, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of UTF-8 string of name.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 formatted name * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf8_name( libfwevt_xml_tag_t *xml_tag, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_utf8_name"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libfvalue_value_copy_to_utf8_string( internal_xml_tag->name, 0, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to copy name to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 formatted name * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf16_name_size( libfwevt_xml_tag_t *xml_tag, size_t *utf16_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_utf16_name_size"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libfvalue_value_get_utf16_string_size( internal_xml_tag->name, 0, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of UTF-16 string of name.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 formatted name * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf16_name( libfwevt_xml_tag_t *xml_tag, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_utf16_name"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libfvalue_value_copy_to_utf16_string( internal_xml_tag->name, 0, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to copy name to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 formatted value * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf8_value_size( libfwevt_xml_tag_t *xml_tag, size_t *utf8_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_utf8_value_size"; int result = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; result = libfvalue_value_get_utf8_string_size( internal_xml_tag->value, 0, utf8_string_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of UTF-8 string of value.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; } return( 1 ); } /* Retrieves the UTF-8 formatted value * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf8_value( libfwevt_xml_tag_t *xml_tag, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_utf8_value"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libfvalue_value_copy_to_utf8_string( internal_xml_tag->value, 0, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to copy value to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 formatted value * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf16_value_size( libfwevt_xml_tag_t *xml_tag, size_t *utf16_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_utf16_value_size"; int result = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; result = libfvalue_value_get_utf16_string_size( internal_xml_tag->value, 0, utf16_string_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of UTF-16 string of value.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; } return( 1 ); } /* Retrieves the UTF-16 formatted value * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf16_value( libfwevt_xml_tag_t *xml_tag, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_utf16_value"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libfvalue_value_copy_to_utf16_string( internal_xml_tag->value, 0, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to copy value to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of attributes * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_number_of_attributes( libfwevt_xml_tag_t *xml_tag, int *number_of_attributes, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_number_of_attributes"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libcdata_array_get_number_of_entries( internal_xml_tag->attributes_array, number_of_attributes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of attributes.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific attribute * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_attribute_by_index( libfwevt_xml_tag_t *xml_tag, int attribute_index, libfwevt_xml_tag_t **attribute_xml_tag, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_attribute_by_index"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libcdata_array_get_entry_by_index( internal_xml_tag->attributes_array, attribute_index, (intptr_t **) attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute: %d.", function, attribute_index ); return( -1 ); } return( 1 ); } /* Retrieves the attribute for the specific UTF-8 encoded name * Returns 1 if successful, 0 if no such value or -1 on error */ int libfwevt_xml_tag_get_attribute_by_utf8_name( libfwevt_xml_tag_t *xml_tag, const uint8_t *utf8_string, size_t utf8_string_length, libfwevt_xml_tag_t **attribute_xml_tag, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_attribute_xml_tag = NULL; libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; uint8_t *value_entry_data = NULL; static char *function = "libfwevt_xml_tag_get_attribute_by_utf8_name"; libuna_unicode_character_t name_character = 0; libuna_unicode_character_t string_character = 0; size_t name_index = 0; size_t utf8_string_index = 0; size_t value_entry_data_size = 0; int attribute_index = 0; int encoding = 0; int number_of_attributes = 0; int value_type = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; 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_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string length value exceeds maximum.", function ); return( -1 ); } if( attribute_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid attribute XML tag.", function ); return( -1 ); } if( *attribute_xml_tag != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: attribute XML tag already set.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_xml_tag->attributes_array, &number_of_attributes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of attributes.", function ); return( -1 ); } if( number_of_attributes == 0 ) { return( 0 ); } for( attribute_index = 0; attribute_index < number_of_attributes; attribute_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->attributes_array, attribute_index, (intptr_t **) &internal_attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute: %d.", function, attribute_index ); return( -1 ); } if( internal_attribute_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing attribute: %d.", function, attribute_index ); return( -1 ); } if( libfvalue_value_get_type( internal_attribute_xml_tag->name, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute name value type.", function ); return( -1 ); } if( value_type != LIBFVALUE_VALUE_TYPE_STRING_UTF16 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported attribute name value type: %d.", function, value_type ); return( -1 ); } if( libfvalue_value_get_entry_data( internal_attribute_xml_tag->name, 0, &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 attribute name value type.", function ); return( -1 ); } if( ( value_entry_data[ value_entry_data_size - 2 ] == 0 ) && ( value_entry_data[ value_entry_data_size - 1 ] == 0 ) ) { value_entry_data_size -= 2; } name_index = 0; utf8_string_index = 0; /* TODO compare hash */ while( name_index < value_entry_data_size ) { if( utf8_string_index >= utf8_string_length ) { break; } if( libuna_unicode_character_copy_from_utf16_stream( &name_character, value_entry_data, value_entry_data_size, &name_index, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy key name to Unicode character.", function ); return( -1 ); } if( libuna_unicode_character_copy_from_utf8( &string_character, utf8_string, utf8_string_length, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to Unicode character.", function ); return( -1 ); } if( towupper( (wint_t) name_character ) != towupper( (wint_t) string_character ) ) { break; } } if( ( name_index == value_entry_data_size ) && ( utf8_string_index == utf8_string_length ) ) { *attribute_xml_tag = (libfwevt_xml_tag_t *) internal_attribute_xml_tag; return( 1 ); } } return( 0 ); } /* Retrieves the attribute for the specific UTF-16 encoded name * Returns 1 if successful, 0 if no such value or -1 on error */ int libfwevt_xml_tag_get_attribute_by_utf16_name( libfwevt_xml_tag_t *xml_tag, const uint16_t *utf16_string, size_t utf16_string_length, libfwevt_xml_tag_t **attribute_xml_tag, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_attribute_xml_tag = NULL; libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; uint8_t *value_entry_data = NULL; static char *function = "libfwevt_xml_tag_get_attribute_by_utf16_name"; libuna_unicode_character_t name_character = 0; libuna_unicode_character_t string_character = 0; size_t name_index = 0; size_t utf16_string_index = 0; size_t value_entry_data_size = 0; int attribute_index = 0; int encoding = 0; int number_of_attributes = 0; int value_type = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; 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_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string length value exceeds maximum.", function ); return( -1 ); } if( attribute_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid attribute XML tag.", function ); return( -1 ); } if( *attribute_xml_tag != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: attribute XML tag already set.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_xml_tag->attributes_array, &number_of_attributes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of attributes.", function ); return( -1 ); } if( number_of_attributes == 0 ) { return( 0 ); } for( attribute_index = 0; attribute_index < number_of_attributes; attribute_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->attributes_array, attribute_index, (intptr_t **) &internal_attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute: %d.", function, attribute_index ); return( -1 ); } if( internal_attribute_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing attribute: %d.", function, attribute_index ); return( -1 ); } if( libfvalue_value_get_type( internal_attribute_xml_tag->name, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute name value type.", function ); return( -1 ); } if( value_type != LIBFVALUE_VALUE_TYPE_STRING_UTF16 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported attribute name value type: %d.", function, value_type ); return( -1 ); } if( libfvalue_value_get_entry_data( internal_attribute_xml_tag->name, 0, &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 attribute name value type.", function ); return( -1 ); } if( ( value_entry_data[ value_entry_data_size - 2 ] == 0 ) && ( value_entry_data[ value_entry_data_size - 1 ] == 0 ) ) { value_entry_data_size -= 2; } name_index = 0; utf16_string_index = 0; /* TODO compare hash */ while( name_index < value_entry_data_size ) { if( utf16_string_index >= utf16_string_length ) { break; } if( libuna_unicode_character_copy_from_utf16_stream( &name_character, value_entry_data, value_entry_data_size, &name_index, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy key name to Unicode character.", function ); return( -1 ); } if( libuna_unicode_character_copy_from_utf16( &string_character, utf16_string, utf16_string_length, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to Unicode character.", function ); return( -1 ); } if( towupper( (wint_t) name_character ) != towupper( (wint_t) string_character ) ) { break; } } if( ( name_index == value_entry_data_size ) && ( utf16_string_index == utf16_string_length ) ) { *attribute_xml_tag = (libfwevt_xml_tag_t *) internal_attribute_xml_tag; return( 1 ); } } return( 0 ); } /* Retrieves the number of elements * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_number_of_elements( libfwevt_xml_tag_t *xml_tag, int *number_of_elements, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_number_of_elements"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libcdata_array_get_number_of_entries( internal_xml_tag->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.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific element * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_element_by_index( libfwevt_xml_tag_t *xml_tag, int element_index, libfwevt_xml_tag_t **element_xml_tag, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_element_by_index"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( libcdata_array_get_entry_by_index( internal_xml_tag->elements_array, element_index, (intptr_t **) element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d.", function, element_index ); return( -1 ); } return( 1 ); } /* Retrieves the element for the specific UTF-8 encoded name * Returns 1 if successful, 0 if no such value or -1 on error */ int libfwevt_xml_tag_get_element_by_utf8_name( libfwevt_xml_tag_t *xml_tag, const uint8_t *utf8_string, size_t utf8_string_length, libfwevt_xml_tag_t **element_xml_tag, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_element_xml_tag = NULL; libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; uint8_t *value_entry_data = NULL; static char *function = "libfwevt_xml_tag_get_element_by_utf8_name"; libuna_unicode_character_t name_character = 0; libuna_unicode_character_t string_character = 0; size_t name_index = 0; size_t utf8_string_index = 0; size_t value_entry_data_size = 0; int element_index = 0; int encoding = 0; int number_of_elements = 0; int value_type = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; 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_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string length value exceeds maximum.", function ); return( -1 ); } if( element_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element XML tag.", function ); return( -1 ); } if( *element_xml_tag != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: element XML tag already set.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_xml_tag->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.", function ); return( -1 ); } if( number_of_elements == 0 ) { return( 0 ); } for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->elements_array, element_index, (intptr_t **) &internal_element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d.", function, element_index ); return( -1 ); } if( internal_element_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing element: %d.", function, element_index ); return( -1 ); } if( libfvalue_value_get_type( internal_element_xml_tag->name, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element name value type.", function ); return( -1 ); } if( value_type != LIBFVALUE_VALUE_TYPE_STRING_UTF16 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported element name value type: %d.", function, value_type ); return( -1 ); } if( libfvalue_value_get_entry_data( internal_element_xml_tag->name, 0, &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 element name value type.", function ); return( -1 ); } if( ( value_entry_data[ value_entry_data_size - 2 ] == 0 ) && ( value_entry_data[ value_entry_data_size - 1 ] == 0 ) ) { value_entry_data_size -= 2; } name_index = 0; utf8_string_index = 0; /* TODO compare hash */ while( name_index < value_entry_data_size ) { if( utf8_string_index >= utf8_string_length ) { break; } if( libuna_unicode_character_copy_from_utf16_stream( &name_character, value_entry_data, value_entry_data_size, &name_index, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy key name to Unicode character.", function ); return( -1 ); } if( libuna_unicode_character_copy_from_utf8( &string_character, utf8_string, utf8_string_length, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to Unicode character.", function ); return( -1 ); } if( towupper( (wint_t) name_character ) != towupper( (wint_t) string_character ) ) { break; } } if( ( name_index == value_entry_data_size ) && ( utf8_string_index == utf8_string_length ) ) { *element_xml_tag = (libfwevt_xml_tag_t *) internal_element_xml_tag; return( 1 ); } } return( 0 ); } /* Retrieves the element for the specific UTF-16 encoded name * Returns 1 if successful, 0 if no such value or -1 on error */ int libfwevt_xml_tag_get_element_by_utf16_name( libfwevt_xml_tag_t *xml_tag, const uint16_t *utf16_string, size_t utf16_string_length, libfwevt_xml_tag_t **element_xml_tag, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_element_xml_tag = NULL; libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; uint8_t *value_entry_data = NULL; static char *function = "libfwevt_xml_tag_get_element_by_utf16_name"; libuna_unicode_character_t name_character = 0; libuna_unicode_character_t string_character = 0; size_t name_index = 0; size_t utf16_string_index = 0; size_t value_entry_data_size = 0; int element_index = 0; int encoding = 0; int number_of_elements = 0; int value_type = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; 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_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string length value exceeds maximum.", function ); return( -1 ); } if( element_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element XML tag.", function ); return( -1 ); } if( *element_xml_tag != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: element XML tag already set.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_xml_tag->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.", function ); return( -1 ); } if( number_of_elements == 0 ) { return( 0 ); } for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->elements_array, element_index, (intptr_t **) &internal_element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d.", function, element_index ); return( -1 ); } if( internal_element_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing element: %d.", function, element_index ); return( -1 ); } if( libfvalue_value_get_type( internal_element_xml_tag->name, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element name value type.", function ); return( -1 ); } if( value_type != LIBFVALUE_VALUE_TYPE_STRING_UTF16 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported element name value type: %d.", function, value_type ); return( -1 ); } if( libfvalue_value_get_entry_data( internal_element_xml_tag->name, 0, &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 element name value type.", function ); return( -1 ); } if( ( value_entry_data[ value_entry_data_size - 2 ] == 0 ) && ( value_entry_data[ value_entry_data_size - 1 ] == 0 ) ) { value_entry_data_size -= 2; } name_index = 0; utf16_string_index = 0; /* TODO compare hash */ while( name_index < value_entry_data_size ) { if( utf16_string_index >= utf16_string_length ) { break; } if( libuna_unicode_character_copy_from_utf16_stream( &name_character, value_entry_data, value_entry_data_size, &name_index, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy key name to Unicode character.", function ); return( -1 ); } if( libuna_unicode_character_copy_from_utf16( &string_character, utf16_string, utf16_string_length, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to Unicode character.", function ); return( -1 ); } if( towupper( (wint_t) name_character ) != towupper( (wint_t) string_character ) ) { break; } } if( ( name_index == value_entry_data_size ) && ( utf16_string_index == utf16_string_length ) ) { *element_xml_tag = (libfwevt_xml_tag_t *) internal_element_xml_tag; return( 1 ); } } return( 0 ); } /* Retrieves the flags * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_flags( libfwevt_xml_tag_t *xml_tag, uint8_t *flags, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_flags"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid flags.", function ); return( -1 ); } *flags = internal_xml_tag->flags; return( 1 ); } /* Sets the flags * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_set_flags( libfwevt_xml_tag_t *xml_tag, uint8_t flags, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_set_flags"; uint8_t supported_flags = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; supported_flags = LIBFWEVT_XML_TAG_FLAG_IS_TEMPLATE_DEFINITION; if( ( flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } internal_xml_tag->flags = flags; return( 1 ); } /* Retrieves the size of UTF-8 formatted string of the XML value * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf8_xml_value_string_size( libfwevt_internal_xml_tag_t *internal_xml_tag, size_t *utf8_string_size, libcerror_error_t **error ) { uint8_t static_value_string[ 2 ]; uint8_t *value_string = NULL; static char *function = "libfwevt_xml_tag_get_utf8_xml_value_string_size"; size_t value_string_index = 0; size_t value_string_size = 0; int number_of_value_entries = 0; int result = 0; int value_entry_index = 0; int value_type = 0; if( internal_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } if( libfvalue_value_get_type( internal_xml_tag->value, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value type.", function ); goto on_error; } if( libfvalue_value_get_number_of_value_entries( internal_xml_tag->value, &number_of_value_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value number of value entries.", function ); goto on_error; } *utf8_string_size = 0; for( value_entry_index = 0; value_entry_index < number_of_value_entries; value_entry_index++ ) { result = libfvalue_value_get_utf8_string_size( internal_xml_tag->value, value_entry_index, &value_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 of element value entry: %d.", function, value_entry_index ); goto on_error; } if( ( result == 0 ) && ( number_of_value_entries != 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing element value entry: %d.", function, value_entry_index ); goto on_error; } if( result != 0 ) { if( ( number_of_value_entries == 1 ) && ( value_string_size == 2 ) ) { if( libfvalue_value_copy_to_utf8_string( internal_xml_tag->value, 0, static_value_string, 2, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy element value: 0 to UTF-8 string.", function ); goto on_error; } /* The value data consists of a single linefeed consider it empty */ if( static_value_string[ 0 ] == (uint8_t) '\n' ) { value_string_size -= 1; } } else if( value_type == LIBFVALUE_VALUE_TYPE_STRING_UTF16 ) { 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 create value string.", function ); goto on_error; } if( libfvalue_value_copy_to_utf8_string( internal_xml_tag->value, value_entry_index, value_string, value_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy element value: %d to UTF-8 string.", function, value_entry_index ); goto on_error; } for( value_string_index = 0; value_string_index < ( value_string_size - 1 ); value_string_index++ ) { switch( value_string[ value_string_index ] ) { /* Replace & by & */ case (uint8_t) '&': *utf8_string_size += 4; break; /* Replace < by < and > by > */ case (uint8_t) '<': case (uint8_t) '>': *utf8_string_size += 3; break; /* Replace ' by ' and " by " */ /* TODO disabled for now since Event Viewer does not uses it case (uint8_t) '\'': case (uint8_t) '"': *utf8_string_size += 5; break; */ default: break; } } memory_free( value_string ); value_string = NULL; } if( value_string_size > 1 ) { /* The size of: * value formatted as a string */ *utf8_string_size += value_string_size - 1; } } } if( *utf8_string_size != 0 ) { /* The size of: * end-of-string character */ *utf8_string_size += 1; } return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } /* Retrieves the UTF-8 formatted string of the XML value * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf8_xml_value_string_with_index( libfwevt_internal_xml_tag_t *internal_xml_tag, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { uint8_t *value_string = NULL; static char *function = "libfwevt_xml_tag_get_utf8_xml_value_string_with_index"; size_t string_index = 0; size_t value_string_index = 0; size_t value_string_size = 0; int number_of_value_entries = 0; int result = 0; int value_entry_index = 0; int value_type = 0; if( internal_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", 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 ); } string_index = *utf8_string_index; if( libfvalue_value_get_type( internal_xml_tag->value, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value type.", function ); goto on_error; } if( libfvalue_value_get_number_of_value_entries( internal_xml_tag->value, &number_of_value_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value number of value entries.", function ); goto on_error; } for( value_entry_index = 0; value_entry_index < number_of_value_entries; value_entry_index++ ) { result = libfvalue_value_get_utf8_string_size( internal_xml_tag->value, value_entry_index, &value_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 of element value entry: %d.", function, value_entry_index ); goto on_error; } if( ( result == 0 ) && ( number_of_value_entries != 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing element value entry: %d.", function, value_entry_index ); goto on_error; } if( ( result != 0 ) && ( value_string_size > 1 ) ) { if( value_type == LIBFVALUE_VALUE_TYPE_STRING_UTF16 ) { 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 create value string.", function ); goto on_error; } if( libfvalue_value_copy_to_utf8_string( internal_xml_tag->value, value_entry_index, value_string, value_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy element value: %d to UTF-8 string.", function, value_entry_index ); goto on_error; } for( value_string_index = 0; value_string_index < ( value_string_size - 1 ); value_string_index++ ) { switch( value_string[ value_string_index ] ) { /* Replace & by & */ case (uint8_t) '&': if( ( string_index + 5 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string size too small.", function ); goto on_error; } utf8_string[ string_index++ ] = (uint8_t) '&'; utf8_string[ string_index++ ] = (uint8_t) 'a'; utf8_string[ string_index++ ] = (uint8_t) 'm'; utf8_string[ string_index++ ] = (uint8_t) 'p'; utf8_string[ string_index++ ] = (uint8_t) ';'; break; /* Replace < by < */ case (uint8_t) '<': 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 size too small.", function ); goto on_error; } utf8_string[ string_index++ ] = (uint8_t) '&'; utf8_string[ string_index++ ] = (uint8_t) 'l'; utf8_string[ string_index++ ] = (uint8_t) 't'; utf8_string[ string_index++ ] = (uint8_t) ';'; break; /* Replace > by > */ case (uint8_t) '>': 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 size too small.", function ); goto on_error; } utf8_string[ string_index++ ] = (uint8_t) '&'; utf8_string[ string_index++ ] = (uint8_t) 'g'; utf8_string[ string_index++ ] = (uint8_t) 't'; utf8_string[ string_index++ ] = (uint8_t) ';'; break; /* Replace ' by ' */ /* TODO disabled for now since Event Viewer does not uses it case (uint8_t) '\'': if( ( string_index + 6 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string size too small.", function ); goto on_error; } utf8_string[ string_index++ ] = (uint8_t) '&'; utf8_string[ string_index++ ] = (uint8_t) 'a'; utf8_string[ string_index++ ] = (uint8_t) 'p'; utf8_string[ string_index++ ] = (uint8_t) 'o'; utf8_string[ string_index++ ] = (uint8_t) 's'; utf8_string[ string_index++ ] = (uint8_t) ';'; break; */ /* Replace " by " */ /* TODO disabled for now since Event Viewer does not uses it case (uint8_t) '"': if( ( string_index + 6 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string size too small.", function ); goto on_error; } utf8_string[ string_index++ ] = (uint8_t) '&'; utf8_string[ string_index++ ] = (uint8_t) 'q'; utf8_string[ string_index++ ] = (uint8_t) 'u'; utf8_string[ string_index++ ] = (uint8_t) 'o'; utf8_string[ string_index++ ] = (uint8_t) 't'; utf8_string[ string_index++ ] = (uint8_t) ';'; break; */ default: 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 size too small.", function ); goto on_error; } utf8_string[ string_index++ ] = value_string[ value_string_index ]; break; } } memory_free( value_string ); value_string = NULL; } else { if( libfvalue_value_copy_to_utf8_string_with_index( internal_xml_tag->value, value_entry_index, utf8_string, utf8_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value to UTF-8 string.", function ); goto on_error; } string_index--; } } } 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 size too small.", function ); goto on_error; } utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } /* Retrieves the size of UTF-8 formatted string of the XML tag * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf8_xml_string_size( libfwevt_xml_tag_t *xml_tag, int xml_tag_level, size_t *utf8_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_attribute_xml_tag = NULL; libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; libfwevt_xml_tag_t *element_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_utf8_xml_string_size"; size_t name_size = 0; size_t string_size = 0; size_t value_string_size = 0; int attribute_index = 0; int element_index = 0; int number_of_attributes = 0; int number_of_elements = 0; int value_type = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_xml_tag->attributes_array, &number_of_attributes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of attributes.", function ); return( -1 ); } /* The size of: * 2 x ' ' character per indentation level * 1 x '<' character */ *utf8_string_size = ( xml_tag_level * 2 ) + 1; if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_NODE ) { if( libcdata_array_get_number_of_entries( internal_xml_tag->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.", function ); return( -1 ); } if( libfvalue_value_get_utf8_string_size( internal_xml_tag->name, 0, &name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of UTF-8 string of name.", function ); return( -1 ); } /* The size of: * element name */ *utf8_string_size += name_size - 1; if( number_of_attributes > 0 ) { for( attribute_index = 0; attribute_index < number_of_attributes; attribute_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->attributes_array, attribute_index, (intptr_t **) &internal_attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute: %d.", function, attribute_index ); return( -1 ); } if( internal_attribute_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing attribute: %d.", function, attribute_index ); return( -1 ); } if( libfvalue_value_get_utf8_string_size( internal_attribute_xml_tag->name, 0, &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 of attribute: %d name.", function, attribute_index ); return( -1 ); } /* The size of: * 1 x ' ' character * attribute name * 1 x '=' character * 1 x '"' character */ *utf8_string_size += string_size + 2; if( libfvalue_value_get_type( internal_attribute_xml_tag->value, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute value type.", function ); return( -1 ); } if( libfvalue_value_get_utf8_string_size( internal_attribute_xml_tag->value, 0, &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 of attribute: %d value.", function, attribute_index ); return( -1 ); } /* The size of: * attribute value formatted as a string * 1 x '"' character */ *utf8_string_size += string_size; } } if( internal_xml_tag->value != NULL ) { if( libfwevt_xml_tag_get_utf8_xml_value_string_size( internal_xml_tag, &value_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 of element value.", function ); return( -1 ); } if( value_string_size > 0 ) { /* The size of: * 1 x '>' character * value formatted as a string * 1 x '<' character * 1 x '/' character * element name */ *utf8_string_size += value_string_size + name_size + 1; } else { /* The size of: * 1 x '/' character */ *utf8_string_size += 1; } } else if( number_of_elements > 0 ) { for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->elements_array, element_index, (intptr_t **) &element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub element: %d.", function, element_index ); return( -1 ); } if( libfwevt_xml_tag_get_utf8_xml_string_size( element_xml_tag, xml_tag_level + 1, &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 of sub element: %d.", function, element_index ); return( -1 ); } /* The size of: * sub element formatted as a string */ *utf8_string_size += string_size - 1; } /* The size of: * 1 x '>' character * 1 x '\n' character * 2 x ' ' character per indentation level * 1 x '<' character * 1 x '/' character * element name */ *utf8_string_size += ( xml_tag_level * 2 ) + name_size + 3; } else { /* The size of: * 1 x '/' character */ *utf8_string_size += 1; } } else if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_CDATA ) { if( libfvalue_value_get_utf8_string_size( internal_xml_tag->value, 0, &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 of value.", function ); return( -1 ); } /* The size of: * 1 x "![CDATA[" * value formatted as a string * 1 x "]]" */ *utf8_string_size += string_size + 9; } else if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_PI ) { if( libfvalue_value_get_utf8_string_size( internal_xml_tag->name, 0, &name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-8 string size of name.", function ); return( -1 ); } /* The size of: * 1 x '?' character * element name */ *utf8_string_size += name_size; if( libfvalue_value_get_utf8_string_size( internal_xml_tag->value, 0, &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 of value.", function ); return( -1 ); } /* The size of: * 1 x ' ' character * element name * 1 x '?' character */ *utf8_string_size += string_size + 1; } /* The size of: * 1 x '>' character * 1 x '\n' character * 1 x '\0' character */ *utf8_string_size += 3; return( 1 ); } /* Retrieves the UTF-8 formatted string of the XML tag * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf8_xml_string_with_index( libfwevt_xml_tag_t *xml_tag, int xml_tag_level, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_attribute_xml_tag = NULL; libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; libfwevt_xml_tag_t *element_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_utf8_xml_string_with_index"; size_t string_index = 0; size_t value_string_size = 0; int attribute_index = 0; int element_index = 0; int indentation_iterator = 0; int number_of_attributes = 0; int number_of_elements = 0; int value_type = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; 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 ); } string_index = *utf8_string_index; if( ( string_index + ( xml_tag_level * 2 ) + 1 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string size too small.", function ); return( -1 ); } for( indentation_iterator = 0; indentation_iterator < xml_tag_level; indentation_iterator++ ) { utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) ' '; } utf8_string[ string_index++ ] = (uint8_t) '<'; if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_NODE ) { if( libcdata_array_get_number_of_entries( internal_xml_tag->attributes_array, &number_of_attributes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of attributes.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_xml_tag->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.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf8_string_with_index( internal_xml_tag->name, 0, utf8_string, utf8_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy name to UTF-8 string.", function ); return( -1 ); } string_index--; if( number_of_attributes > 0 ) { for( attribute_index = 0; attribute_index < number_of_attributes; attribute_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->attributes_array, attribute_index, (intptr_t **) &internal_attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute: %d.", function, attribute_index ); return( -1 ); } if( internal_attribute_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing attribute: %d.", function, attribute_index ); return( -1 ); } 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) ' '; if( libfvalue_value_copy_to_utf8_string_with_index( internal_attribute_xml_tag->name, 0, utf8_string, utf8_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy attribute: %d name to UTF-8 string.", function, attribute_index ); return( -1 ); } 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) '='; utf8_string[ string_index++ ] = (uint8_t) '"'; if( libfvalue_value_get_type( internal_attribute_xml_tag->value, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute value type.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf8_string_with_index( internal_attribute_xml_tag->value, 0, utf8_string, utf8_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy attribute: %d value to UTF-8 string.", function, attribute_index ); return( -1 ); } string_index--; 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) '"'; } } if( internal_xml_tag->value != NULL ) { if( libfwevt_xml_tag_get_utf8_xml_value_string_size( internal_xml_tag, &value_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 of element value.", function ); return( -1 ); } if( value_string_size > 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) '>'; if( libfwevt_xml_tag_get_utf8_xml_value_string_with_index( internal_xml_tag, utf8_string, utf8_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-8 string of element value.", function ); return( -1 ); } 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) '<'; utf8_string[ string_index++ ] = (uint8_t) '/'; if( libfvalue_value_copy_to_utf8_string_with_index( internal_xml_tag->name, 0, utf8_string, utf8_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy name to UTF-8 string.", function ); return( -1 ); } string_index--; } else { 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) '/'; } } else if( number_of_elements > 0 ) { 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) '>'; utf8_string[ string_index++ ] = (uint8_t) '\n'; for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->elements_array, element_index, (intptr_t **) &element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub element: %d.", function, element_index ); return( -1 ); } if( libfwevt_xml_tag_get_utf8_xml_string_with_index( element_xml_tag, xml_tag_level + 1, utf8_string, utf8_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy sub element: %d to UTF-8 string.", function, element_index ); return( -1 ); } string_index--; } if( ( string_index + ( xml_tag_level * 2 ) ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string size too small.", function ); return( -1 ); } for( indentation_iterator = 0; indentation_iterator < xml_tag_level; indentation_iterator++ ) { utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) ' '; } 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) '<'; utf8_string[ string_index++ ] = (uint8_t) '/'; if( libfvalue_value_copy_to_utf8_string_with_index( internal_xml_tag->name, 0, utf8_string, utf8_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy name to UTF-8 string.", function ); return( -1 ); } string_index--; } else { 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) '/'; } 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 size too small.", function ); return( -1 ); } } else if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_CDATA ) { 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) '!'; utf8_string[ string_index++ ] = (uint8_t) '['; utf8_string[ string_index++ ] = (uint8_t) 'C'; utf8_string[ string_index++ ] = (uint8_t) 'D'; utf8_string[ string_index++ ] = (uint8_t) 'A'; utf8_string[ string_index++ ] = (uint8_t) 'T'; utf8_string[ string_index++ ] = (uint8_t) 'A'; utf8_string[ string_index++ ] = (uint8_t) '['; if( libfvalue_value_copy_to_utf8_string_with_index( internal_xml_tag->value, 0, utf8_string, utf8_string_size, &string_index, error ) != 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 ); } 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) ']'; utf8_string[ string_index++ ] = (uint8_t) ']'; } else if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_PI ) { 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) '?'; if( libfvalue_value_copy_to_utf8_string_with_index( internal_xml_tag->name, 0, utf8_string, utf8_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy name to UTF-8 string.", function ); return( -1 ); } string_index--; 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) ' '; if( libfvalue_value_copy_to_utf8_string_with_index( internal_xml_tag->value, 0, utf8_string, utf8_string_size, &string_index, error ) != 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 ); } string_index--; 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 size too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) '?'; } utf8_string[ string_index++ ] = (uint8_t) '>'; utf8_string[ string_index++ ] = (uint8_t) '\n'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; return( 1 ); } /* Retrieves the size of UTF-16 formatted string of the XML value * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf16_xml_value_string_size( libfwevt_internal_xml_tag_t *internal_xml_tag, size_t *utf16_string_size, libcerror_error_t **error ) { uint16_t static_value_string[ 2 ]; uint16_t *value_string = NULL; static char *function = "libfwevt_xml_tag_get_utf16_xml_value_string_size"; size_t value_string_index = 0; size_t value_string_size = 0; int number_of_value_entries = 0; int result = 0; int value_entry_index = 0; int value_type = 0; if( internal_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", 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 ); } if( libfvalue_value_get_type( internal_xml_tag->value, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value type.", function ); goto on_error; } if( libfvalue_value_get_number_of_value_entries( internal_xml_tag->value, &number_of_value_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value number of value entries.", function ); goto on_error; } *utf16_string_size = 0; for( value_entry_index = 0; value_entry_index < number_of_value_entries; value_entry_index++ ) { result = libfvalue_value_get_utf16_string_size( internal_xml_tag->value, value_entry_index, &value_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 of element value entry: %d.", function, value_entry_index ); goto on_error; } if( ( result == 0 ) && ( number_of_value_entries != 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing element value entry: %d.", function, value_entry_index ); goto on_error; } if( result != 0 ) { if( ( number_of_value_entries == 1 ) && ( value_string_size == 2 ) ) { if( libfvalue_value_copy_to_utf16_string( internal_xml_tag->value, 0, static_value_string, 2, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy element value: 0 to UTF-16 string.", function ); goto on_error; } /* The value data consists of a single linefeed consider it empty */ if( static_value_string[ 0 ] == (uint16_t) '\n' ) { value_string_size -= 1; } } else if( value_type == LIBFVALUE_VALUE_TYPE_STRING_UTF16 ) { value_string = (uint16_t *) memory_allocate( sizeof( uint16_t ) * 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( libfvalue_value_copy_to_utf16_string( internal_xml_tag->value, value_entry_index, value_string, value_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy element value: %d to UTF-16 string.", function, value_entry_index ); goto on_error; } for( value_string_index = 0; value_string_index < value_string_size; value_string_index++ ) { switch( value_string[ value_string_index ] ) { /* Replace & by & */ case (uint16_t) '&': *utf16_string_size += 4; break; /* Replace < by < and > by > */ case (uint16_t) '<': case (uint16_t) '>': *utf16_string_size += 3; break; /* Replace ' by ' and " by " */ /* TODO disabled for now since Event Viewer does not uses it case (uint16_t) '\'': case (uint16_t) '"': *utf16_string_size += 5; break; */ default: break; } } memory_free( value_string ); value_string = NULL; } if( value_string_size > 1 ) { /* The size of: * value formatted as a string */ *utf16_string_size += value_string_size - 1; } } } if( *utf16_string_size != 0 ) { /* The size of: * end-of-string character */ *utf16_string_size += 1; } return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } /* Retrieves the UTF-16 formatted string of the XML value * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf16_xml_value_string_with_index( libfwevt_internal_xml_tag_t *internal_xml_tag, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { uint16_t *value_string = NULL; static char *function = "libfwevt_xml_tag_get_utf16_xml_value_string_with_index"; size_t string_index = 0; size_t value_string_index = 0; size_t value_string_size = 0; int number_of_value_entries = 0; int result = 0; int value_entry_index = 0; int value_type = 0; if( internal_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", 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 ); } string_index = *utf16_string_index; if( libfvalue_value_get_type( internal_xml_tag->value, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value type.", function ); goto on_error; } if( libfvalue_value_get_number_of_value_entries( internal_xml_tag->value, &number_of_value_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value number of value entries.", function ); goto on_error; } for( value_entry_index = 0; value_entry_index < number_of_value_entries; value_entry_index++ ) { result = libfvalue_value_get_utf16_string_size( internal_xml_tag->value, value_entry_index, &value_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 of element value entry: %d.", function, value_entry_index ); goto on_error; } if( ( result == 0 ) && ( number_of_value_entries != 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing element value entry: %d.", function, value_entry_index ); goto on_error; } if( ( result != 0 ) && ( value_string_size > 1 ) ) { if( value_type == LIBFVALUE_VALUE_TYPE_STRING_UTF16 ) { value_string = (uint16_t *) memory_allocate( sizeof( uint16_t ) * 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( libfvalue_value_copy_to_utf16_string( internal_xml_tag->value, value_entry_index, value_string, value_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy element value: %d to UTF-16 string.", function, value_entry_index ); goto on_error; } for( value_string_index = 0; value_string_index < ( value_string_size - 1 ); value_string_index++ ) { switch( value_string[ value_string_index ] ) { /* Replace & by & */ case (uint16_t) '&': if( ( string_index + 5 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string size too small.", function ); goto on_error; } utf16_string[ string_index++ ] = (uint16_t) '&'; utf16_string[ string_index++ ] = (uint16_t) 'a'; utf16_string[ string_index++ ] = (uint16_t) 'm'; utf16_string[ string_index++ ] = (uint16_t) 'p'; utf16_string[ string_index++ ] = (uint16_t) ';'; break; /* Replace < by < */ case (uint16_t) '<': 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 size too small.", function ); goto on_error; } utf16_string[ string_index++ ] = (uint16_t) '&'; utf16_string[ string_index++ ] = (uint16_t) 'l'; utf16_string[ string_index++ ] = (uint16_t) 't'; utf16_string[ string_index++ ] = (uint16_t) ';'; break; /* Replace > by > */ case (uint16_t) '>': 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 size too small.", function ); goto on_error; } utf16_string[ string_index++ ] = (uint16_t) '&'; utf16_string[ string_index++ ] = (uint16_t) 'g'; utf16_string[ string_index++ ] = (uint16_t) 't'; utf16_string[ string_index++ ] = (uint16_t) ';'; break; /* Replace ' by ' */ /* TODO disabled for now since Event Viewer does not uses it case (uint16_t) '\'': if( ( string_index + 6 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string size too small.", function ); goto on_error; } utf16_string[ string_index++ ] = (uint16_t) '&'; utf16_string[ string_index++ ] = (uint16_t) 'a'; utf16_string[ string_index++ ] = (uint16_t) 'p'; utf16_string[ string_index++ ] = (uint16_t) 'o'; utf16_string[ string_index++ ] = (uint16_t) 's'; utf16_string[ string_index++ ] = (uint16_t) ';'; break; */ /* Replace " by " */ /* TODO disabled for now since Event Viewer does not uses it case (uint16_t) '"': if( ( string_index + 6 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string size too small.", function ); goto on_error; } utf16_string[ string_index++ ] = (uint16_t) '&'; utf16_string[ string_index++ ] = (uint16_t) 'q'; utf16_string[ string_index++ ] = (uint16_t) 'u'; utf16_string[ string_index++ ] = (uint16_t) 'o'; utf16_string[ string_index++ ] = (uint16_t) 't'; utf16_string[ string_index++ ] = (uint16_t) ';'; break; */ default: 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 size too small.", function ); goto on_error; } utf16_string[ string_index++ ] = value_string[ value_string_index ]; break; } } memory_free( value_string ); value_string = NULL; } else { if( libfvalue_value_copy_to_utf16_string_with_index( internal_xml_tag->value, value_entry_index, utf16_string, utf16_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value to UTF-16 string.", function ); goto on_error; } string_index--; } } } 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 size too small.", function ); goto on_error; } utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } /* Retrieves the size of UTF-16 formatted string of the XML tag * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf16_xml_string_size( libfwevt_xml_tag_t *xml_tag, int xml_tag_level, size_t *utf16_string_size, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_attribute_xml_tag = NULL; libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; libfwevt_xml_tag_t *element_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_utf16_xml_string_size"; size_t name_size = 0; size_t string_size = 0; size_t value_string_size = 0; int attribute_index = 0; int element_index = 0; int number_of_attributes = 0; int number_of_elements = 0; int value_type = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; 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 ); } if( libcdata_array_get_number_of_entries( internal_xml_tag->attributes_array, &number_of_attributes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of attributes.", function ); return( -1 ); } /* The size of: * 2 x ' ' character per indentation level * 1 x '<' character */ *utf16_string_size = ( xml_tag_level * 2 ) + 1; if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_NODE ) { if( libcdata_array_get_number_of_entries( internal_xml_tag->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.", function ); return( -1 ); } if( libfvalue_value_get_utf16_string_size( internal_xml_tag->name, 0, &name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of UTF-16 string of name.", function ); return( -1 ); } /* The size of: * element name */ *utf16_string_size += name_size - 1; if( number_of_attributes > 0 ) { for( attribute_index = 0; attribute_index < number_of_attributes; attribute_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->attributes_array, attribute_index, (intptr_t **) &internal_attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute: %d.", function, attribute_index ); return( -1 ); } if( internal_attribute_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing attribute: %d.", function, attribute_index ); return( -1 ); } if( libfvalue_value_get_utf16_string_size( internal_attribute_xml_tag->name, 0, &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 of attribute: %d name.", function, attribute_index ); return( -1 ); } /* The size of: * 1 x ' ' character * attribute name * 1 x '=' character * 1 x '"' character */ *utf16_string_size += string_size + 2; if( libfvalue_value_get_type( internal_attribute_xml_tag->value, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute value type.", function ); return( -1 ); } if( libfvalue_value_get_utf16_string_size( internal_attribute_xml_tag->value, 0, &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 of attribute: %d value.", function, attribute_index ); return( -1 ); } /* The size of: * attribute value formatted as a string * 1 x '"' character */ *utf16_string_size += string_size; } } if( internal_xml_tag->value != NULL ) { if( libfwevt_xml_tag_get_utf16_xml_value_string_size( internal_xml_tag, &value_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 of element value.", function ); return( -1 ); } if( value_string_size > 0 ) { /* The size of: * 1 x '>' character * value formatted as a string * 1 x '<' character * 1 x '/' character * element name */ *utf16_string_size += value_string_size + name_size + 1; } else { /* The size of: * 1 x '/' character */ *utf16_string_size += 1; } } else if( number_of_elements > 0 ) { for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->elements_array, element_index, (intptr_t **) &element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub element: %d.", function, element_index ); return( -1 ); } if( libfwevt_xml_tag_get_utf16_xml_string_size( element_xml_tag, xml_tag_level + 1, &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 of sub element: %d.", function, element_index ); return( -1 ); } /* The size of: * sub element formatted as a string */ *utf16_string_size += string_size - 1; } /* The size of: * 1 x '>' character * 1 x '\n' character * 2 x ' ' character per indentation level * 1 x '<' character * 1 x '/' character * element name */ *utf16_string_size += ( xml_tag_level * 2 ) + name_size + 3; } else { /* The size of: * 1 x '/' character */ *utf16_string_size += 1; } } else if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_CDATA ) { if( libfvalue_value_get_utf16_string_size( internal_xml_tag->value, 0, &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 of value.", function ); return( -1 ); } /* The size of: * 1 x "![CDATA[" * value formatted as a string * 1 x "]]" */ *utf16_string_size += string_size + 9; } else if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_PI ) { if( libfvalue_value_get_utf16_string_size( internal_xml_tag->name, 0, &name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-16 string size of name.", function ); return( -1 ); } /* The size of: * 1 x '?' character * element name */ *utf16_string_size += name_size; if( libfvalue_value_get_utf16_string_size( internal_xml_tag->value, 0, &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 of value.", function ); return( -1 ); } /* The size of: * 1 x ' ' character * element name * 1 x '?' character */ *utf16_string_size += string_size + 1; } /* The size of: * 1 x '>' character * 1 x '\n' character * 1 x '\0' character */ *utf16_string_size += 3; return( 1 ); } /* Retrieves the UTF-16 formatted string of the XML tag * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_get_utf16_xml_string_with_index( libfwevt_xml_tag_t *xml_tag, int xml_tag_level, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_attribute_xml_tag = NULL; libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; libfwevt_xml_tag_t *element_xml_tag = NULL; static char *function = "libfwevt_xml_tag_get_utf16_xml_string_with_index"; size_t string_index = 0; size_t value_string_size = 0; int attribute_index = 0; int element_index = 0; int indentation_iterator = 0; int number_of_attributes = 0; int number_of_elements = 0; int value_type = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; 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 ); } string_index = *utf16_string_index; if( ( string_index + ( xml_tag_level * 2 ) + 1 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string size too small.", function ); return( -1 ); } for( indentation_iterator = 0; indentation_iterator < xml_tag_level; indentation_iterator++ ) { utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) ' '; } utf16_string[ string_index++ ] = (uint16_t) '<'; if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_NODE ) { if( libcdata_array_get_number_of_entries( internal_xml_tag->attributes_array, &number_of_attributes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of attributes.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_xml_tag->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.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf16_string_with_index( internal_xml_tag->name, 0, utf16_string, utf16_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy name to UTF-16 string.", function ); return( -1 ); } string_index--; if( number_of_attributes > 0 ) { for( attribute_index = 0; attribute_index < number_of_attributes; attribute_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->attributes_array, attribute_index, (intptr_t **) &internal_attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute: %d.", function, attribute_index ); return( -1 ); } if( internal_attribute_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing attribute: %d.", function, attribute_index ); return( -1 ); } 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) ' '; if( libfvalue_value_copy_to_utf16_string_with_index( internal_attribute_xml_tag->name, 0, utf16_string, utf16_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy attribute: %d name to UTF-16 string.", function, attribute_index ); return( -1 ); } 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) '='; utf16_string[ string_index++ ] = (uint16_t) '"'; if( libfvalue_value_get_type( internal_attribute_xml_tag->value, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute value type.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf16_string_with_index( internal_attribute_xml_tag->value, 0, utf16_string, utf16_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy attribute: %d value to UTF-16 string.", function, attribute_index ); return( -1 ); } string_index--; 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) '"'; } } if( internal_xml_tag->value != NULL ) { if( libfwevt_xml_tag_get_utf16_xml_value_string_size( internal_xml_tag, &value_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 of element value.", function ); return( -1 ); } if( value_string_size > 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) '>'; if( libfwevt_xml_tag_get_utf16_xml_value_string_with_index( internal_xml_tag, utf16_string, utf16_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-16 string of element value.", function ); return( -1 ); } 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) '<'; utf16_string[ string_index++ ] = (uint16_t) '/'; if( libfvalue_value_copy_to_utf16_string_with_index( internal_xml_tag->name, 0, utf16_string, utf16_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy name to UTF-16 string.", function ); return( -1 ); } string_index--; } else { 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) '/'; } } else if( number_of_elements > 0 ) { 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) '>'; utf16_string[ string_index++ ] = (uint16_t) '\n'; for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->elements_array, element_index, (intptr_t **) &element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub element: %d.", function, element_index ); return( -1 ); } if( libfwevt_xml_tag_get_utf16_xml_string_with_index( element_xml_tag, xml_tag_level + 1, utf16_string, utf16_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy sub element: %d to UTF-16 string.", function, element_index ); return( -1 ); } string_index--; } if( ( string_index + ( xml_tag_level * 2 ) ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string size too small.", function ); return( -1 ); } for( indentation_iterator = 0; indentation_iterator < xml_tag_level; indentation_iterator++ ) { utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) ' '; } 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) '<'; utf16_string[ string_index++ ] = (uint16_t) '/'; if( libfvalue_value_copy_to_utf16_string_with_index( internal_xml_tag->name, 0, utf16_string, utf16_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy name to UTF-16 string.", function ); return( -1 ); } string_index--; } else { 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) '/'; } 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 size too small.", function ); return( -1 ); } } else if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_CDATA ) { 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) '!'; utf16_string[ string_index++ ] = (uint16_t) '['; utf16_string[ string_index++ ] = (uint16_t) 'C'; utf16_string[ string_index++ ] = (uint16_t) 'D'; utf16_string[ string_index++ ] = (uint16_t) 'A'; utf16_string[ string_index++ ] = (uint16_t) 'T'; utf16_string[ string_index++ ] = (uint16_t) 'A'; utf16_string[ string_index++ ] = (uint16_t) '['; if( libfvalue_value_copy_to_utf16_string_with_index( internal_xml_tag->value, 0, utf16_string, utf16_string_size, &string_index, error ) != 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 ); } 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) ']'; utf16_string[ string_index++ ] = (uint16_t) ']'; } else if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_PI ) { 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) '?'; if( libfvalue_value_copy_to_utf16_string_with_index( internal_xml_tag->name, 0, utf16_string, utf16_string_size, &string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy name to UTF-16 string.", function ); return( -1 ); } string_index--; 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) ' '; if( libfvalue_value_copy_to_utf16_string_with_index( internal_xml_tag->value, 0, utf16_string, utf16_string_size, &string_index, error ) != 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 ); } string_index--; 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 size too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) '?'; } utf16_string[ string_index++ ] = (uint16_t) '>'; utf16_string[ string_index++ ] = (uint16_t) '\n'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; return( 1 ); } #if defined( HAVE_DEBUG_OUTPUT ) /* Debug prints the XML value * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_debug_print_value_string( libfwevt_internal_xml_tag_t *internal_xml_tag, libcerror_error_t **error ) { system_character_t *value_string = NULL; static char *function = "libfwevt_xml_tag_debug_print_value_string"; size_t value_string_index = 0; size_t value_string_size = 0; int number_of_value_entries = 0; int result = 0; int value_entry_index = 0; int value_type = 0; if( internal_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } if( libfvalue_value_get_type( internal_xml_tag->value, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value type.", function ); goto on_error; } if( libfvalue_value_get_number_of_value_entries( internal_xml_tag->value, &number_of_value_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value number of value entries.", function ); goto on_error; } for( value_entry_index = 0; value_entry_index < number_of_value_entries; value_entry_index++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfvalue_value_get_utf16_string_size( internal_xml_tag->value, value_entry_index, &value_string_size, error ); #else result = libfvalue_value_get_utf8_string_size( internal_xml_tag->value, value_entry_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 string size of element value entry: %d.", function, value_entry_index ); goto on_error; } if( ( result == 0 ) && ( number_of_value_entries != 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing element value entry: %d.", function, value_entry_index ); goto on_error; } if( result != 0 ) { if( value_type == LIBFVALUE_VALUE_TYPE_STRING_UTF16 ) { 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 = libfvalue_value_copy_to_utf16_string( internal_xml_tag->value, value_entry_index, (uint16_t *) value_string, value_string_size, error ); #else result = libfvalue_value_copy_to_utf8_string( internal_xml_tag->value, value_entry_index, (uint8_t *) value_string, value_string_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy element value: %d to string.", function, value_entry_index ); goto on_error; } for( value_string_index = 0; value_string_index < ( value_string_size - 1 ); value_string_index++ ) { switch( value_string[ value_string_index ] ) { /* Replace & by & */ case (uint8_t) '&': libcnotify_printf( "&" ); break; /* Replace < by < */ case (uint8_t) '<': libcnotify_printf( "<" ); break; /* Replace > by > */ case (uint8_t) '>': libcnotify_printf( ">" ); break; /* Replace ' by ' */ /* TODO disabled for now since Event Viewer does not uses it case (uint8_t) '\'': libcnotify_printf( "'" ); break; */ /* Replace " by " */ /* TODO disabled for now since Event Viewer does not uses it case (uint8_t) '"': libcnotify_printf( """ ); break; */ default: libcnotify_printf( "%" PRIc_SYSTEM "", value_string[ value_string_index ] ); break; } } memory_free( value_string ); value_string = NULL; } else { if( libfvalue_value_print( internal_xml_tag->value, value_entry_index, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print value.", function ); goto on_error; } } } } return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } /* Debug prints the XML tag * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_debug_print( libfwevt_xml_tag_t *xml_tag, int xml_tag_level, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_attribute_xml_tag = NULL; libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; libfwevt_xml_tag_t *element_xml_tag = NULL; static char *function = "libfwevt_xml_tag_debug_print"; size_t value_string_size = 0; int attribute_index = 0; int element_index = 0; int indentation_iterator = 0; int number_of_attributes = 0; int number_of_elements = 0; int value_type = 0; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; for( indentation_iterator = 0; indentation_iterator < xml_tag_level; indentation_iterator++ ) { libcnotify_printf( " " ); } libcnotify_printf( "<" ); if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_NODE ) { if( libcdata_array_get_number_of_entries( internal_xml_tag->attributes_array, &number_of_attributes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of attributes.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_xml_tag->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.", function ); return( -1 ); } if( libfvalue_value_print( internal_xml_tag->name, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print name.", function ); return( -1 ); } if( number_of_attributes > 0 ) { for( attribute_index = 0; attribute_index < number_of_attributes; attribute_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->attributes_array, attribute_index, (intptr_t **) &internal_attribute_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute: %d.", function, attribute_index ); return( -1 ); } if( internal_attribute_xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing attribute: %d.", function, attribute_index ); return( -1 ); } libcnotify_printf( " " ); if( libfvalue_value_print( internal_attribute_xml_tag->name, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print attribute name.", function ); return( -1 ); } libcnotify_printf( "=\"" ); if( libfvalue_value_get_type( internal_attribute_xml_tag->value, &value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attribute value type.", function ); return( -1 ); } if( libfvalue_value_print( internal_attribute_xml_tag->value, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print attribute value.", function ); return( -1 ); } libcnotify_printf( "\"" ); } } if( internal_xml_tag->value != NULL ) { if( libfwevt_xml_tag_get_utf8_xml_value_string_size( internal_xml_tag, &value_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 of element value.", function ); return( -1 ); } if( value_string_size > 0 ) { libcnotify_printf( ">" ); if( libfwevt_xml_tag_debug_print_value_string( internal_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print element value.", function ); return( -1 ); } libcnotify_printf( "name, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print name.", function ); return( -1 ); } } else { libcnotify_printf( "/" ); } } else if( number_of_elements > 0 ) { libcnotify_printf( ">\n" ); for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libcdata_array_get_entry_by_index( internal_xml_tag->elements_array, element_index, (intptr_t **) &element_xml_tag, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d.", function, element_index ); return( -1 ); } if( libfwevt_xml_tag_debug_print( element_xml_tag, xml_tag_level + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print element: %d.", function, element_index ); return( -1 ); } } for( indentation_iterator = 0; indentation_iterator < xml_tag_level; indentation_iterator++ ) { libcnotify_printf( " " ); } libcnotify_printf( "name, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print name.", function ); return( -1 ); } } else { libcnotify_printf( "/" ); } } else if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_CDATA ) { libcnotify_printf( "![CDATA[" ); if( libfvalue_value_print( internal_xml_tag->value, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print value.", function ); return( -1 ); } libcnotify_printf( "]]" ); } else if( internal_xml_tag->type == LIBFWEVT_XML_TAG_TYPE_PI ) { libcnotify_printf( "?" ); if( libfvalue_value_print( internal_xml_tag->name, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print name.", function ); return( -1 ); } libcnotify_printf( " " ); if( libfvalue_value_print( internal_xml_tag->value, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print value.", function ); return( -1 ); } libcnotify_printf( "?" ); } libcnotify_printf( ">\n" ); return( 1 ); } /* Debug prints the XML tag name * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_name_debug_print( libfwevt_xml_tag_t *xml_tag, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_name_debug_print"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; libcnotify_printf( "%s: name\t\t\t\t\t: ", function ); if( libfvalue_value_print( internal_xml_tag->name, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print name.", function ); return( -1 ); } libcnotify_printf( "\n" ); libcnotify_printf( "\n" ); return( 1 ); } /* Debug prints the XML tag value * Returns 1 if successful or -1 on error */ int libfwevt_xml_tag_value_debug_print( libfwevt_xml_tag_t *xml_tag, int value_entry_index, libcerror_error_t **error ) { libfwevt_internal_xml_tag_t *internal_xml_tag = NULL; static char *function = "libfwevt_xml_tag_value_debug_print"; if( xml_tag == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XML tag.", function ); return( -1 ); } internal_xml_tag = (libfwevt_internal_xml_tag_t *) xml_tag; libcnotify_printf( "%s: value\t\t\t\t: ", function ); if( libfvalue_value_print( internal_xml_tag->value, value_entry_index, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print value.", function ); return( -1 ); } libcnotify_printf( "\n" ); libcnotify_printf( "\n" ); return( 1 ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ libevt-20170120/libfwevt/fwevt_template.h0000664000175000017500000002247713012271512022364 0ustar00lordyestalordyesta00000000000000/* * The Windows Event Template (WEVT_TEMPLATE) definitions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either mui 3 of the License, or * (at your option) any later mui. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _FWEVT_TEMPLATE_H ) #define _FWEVT_TEMPLATE_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct fwevt_template_manifest fwevt_template_manifest_t; struct fwevt_template_manifest { /* The signature * Consists of 4 bytes * Contains: "CRIM" */ uint8_t signature[ 4 ]; /* The size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* The major version * Consists of 2 bytes */ uint8_t major_version[ 2 ]; /* The minor version * Consists of 2 bytes */ uint8_t minor_version[ 2 ]; /* The number of providers * Consists of 4 bytes */ uint8_t number_of_providers[ 4 ]; }; typedef struct fwevt_template_provider_entry fwevt_template_provider_entry_t; struct fwevt_template_provider_entry { /* The identifier * Consists of 16 bytes * Contains a GUID */ uint8_t identifier[ 16 ]; /* The data offset * Consists of 4 bytes */ uint8_t data_offset[ 4 ]; }; typedef struct fwevt_template_provider fwevt_template_provider_t; struct fwevt_template_provider { /* The signature * Consists of 4 bytes * Contains: "WEVT" */ uint8_t signature[ 4 ]; /* The size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* The message-table identifier * Consists of 4 bytes */ uint8_t message_identifier[ 4 ]; /* The number of descriptors * Consists of 4 bytes */ uint8_t number_of_descriptors[ 4 ]; /* The number of unknowns * Consists of 4 bytes */ uint8_t number_of_unknown2[ 4 ]; }; typedef struct fwevt_template_channels fwevt_template_channels_t; struct fwevt_template_channels { /* The signature * Consists of 4 bytes * Contains: "CHAN" */ uint8_t signature[ 4 ]; /* The size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* The number of channels * Consists of 4 bytes */ uint8_t number_of_channels[ 4 ]; }; typedef struct fwevt_template_channel fwevt_template_channel_t; struct fwevt_template_channel { /* The identifier * Consists of 4 bytes */ uint8_t identifier[ 4 ]; /* The data offset * Consists of 4 bytes */ uint8_t data_offset[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown1[ 4 ]; /* The message-table identifier * Consists of 4 bytes */ uint8_t message_identifier[ 4 ]; }; typedef struct fwevt_template_events fwevt_template_events_t; struct fwevt_template_events { /* The signature * Consists of 4 bytes * Contains: "EVNT" */ uint8_t signature[ 4 ]; /* The size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* The number of events * Consists of 4 bytes */ uint8_t number_of_events[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown1[ 4 ]; }; typedef struct fwevt_template_event fwevt_template_event_t; struct fwevt_template_event { /* The identifier * Consists of 2 bytes */ uint8_t identifier[ 2 ]; union { struct { /* Unknown * Consists of 2 bytes */ uint8_t unknown1[ 2 ]; /* The qualifiers * Consists of 2 bytes */ uint8_t qualifiers[ 2 ]; /* Unknown * Consists of 2 bytes */ uint8_t unknown2[ 2 ]; }; struct { /* The version * Consists of 1 byte */ uint8_t version; /* The channel * Consists of 1 byte */ uint8_t channel; /* The level * Consists of 1 byte */ uint8_t level; /* The opcode * Consists of 1 byte */ uint8_t opcode; /* The task * Consists of 2 bytes */ uint8_t task[ 2 ]; }; }; /* The keywords * Consists of 8 bytes */ uint8_t keywords[ 8 ]; /* The message-table identifier * Consists of 4 bytes */ uint8_t message_identifier[ 4 ]; /* The template (definition) offset * Consists of 4 bytes */ uint8_t template_offset[ 4 ]; /* The opcode (definition) offset * Consists of 4 bytes */ uint8_t opcode_offset[ 4 ]; /* The level (definition) offset * Consists of 4 bytes */ uint8_t level_offset[ 4 ]; /* The task (definition) offset * Consists of 4 bytes */ uint8_t task_offset[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown3[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown4[ 4 ]; /* The flags * Consists of 4 bytes */ uint8_t flags[ 4 ]; }; typedef struct fwevt_template_keywords fwevt_template_keywords_t; struct fwevt_template_keywords { /* The signature * Consists of 4 bytes * Contains: "CHAN" */ uint8_t signature[ 4 ]; /* The size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* The number of keywords * Consists of 4 bytes */ uint8_t number_of_keywords[ 4 ]; }; typedef struct fwevt_template_keyword fwevt_template_keyword_t; struct fwevt_template_keyword { /* The identifier (bitmask) * Consists of 8 bytes */ uint8_t identifier[ 8 ]; /* The message-table identifier * Consists of 4 bytes */ uint8_t message_identifier[ 4 ]; /* The data offset * Consists of 4 bytes */ uint8_t data_offset[ 4 ]; }; typedef struct fwevt_template_levels fwevt_template_levels_t; struct fwevt_template_levels { /* The signature * Consists of 4 bytes * Contains: "LEVL" */ uint8_t signature[ 4 ]; /* The size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* The number of levels * Consists of 4 bytes */ uint8_t number_of_levels[ 4 ]; }; typedef struct fwevt_template_level fwevt_template_level_t; struct fwevt_template_level { /* The identifier * Consists of 4 bytes */ uint8_t identifier[ 4 ]; /* The message-table identifier * Consists of 4 bytes */ uint8_t message_identifier[ 4 ]; /* The data offset * Consists of 4 bytes */ uint8_t data_offset[ 4 ]; }; typedef struct fwevt_template_maps fwevt_template_maps_t; struct fwevt_template_maps { /* The signature * Consists of 4 bytes * Contains: "MAPS" */ uint8_t signature[ 4 ]; /* The size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* The number of maps * Consists of 4 bytes */ uint8_t number_of_maps[ 4 ]; /* The data offset * Consists of 4 bytes */ uint8_t data_offset[ 4 ]; }; typedef struct fwevt_template_map fwevt_template_map_t; struct fwevt_template_map { /* TODO */ uint8_t signature[ 4 ]; }; typedef struct fwevt_template_opcodes fwevt_template_opcodes_t; struct fwevt_template_opcodes { /* The signature * Consists of 4 bytes * Contains: "OPCO" */ uint8_t signature[ 4 ]; /* The size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* The number of opcodes * Consists of 4 bytes */ uint8_t number_of_opcodes[ 4 ]; }; typedef struct fwevt_template_opcode fwevt_template_opcode_t; struct fwevt_template_opcode { /* The identifier * Consists of 4 bytes */ uint8_t identifier[ 4 ]; /* The message-table identifier * Consists of 4 bytes */ uint8_t message_identifier[ 4 ]; /* The data offset * Consists of 4 bytes */ uint8_t data_offset[ 4 ]; }; typedef struct fwevt_template_tasks fwevt_template_tasks_t; struct fwevt_template_tasks { /* The signature * Consists of 4 bytes * Contains: "TASK" */ uint8_t signature[ 4 ]; /* The size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* The number of tasks * Consists of 4 bytes */ uint8_t number_of_tasks[ 4 ]; }; typedef struct fwevt_template_task fwevt_template_task_t; struct fwevt_template_task { /* The identifier * Consists of 4 bytes */ uint8_t identifier[ 4 ]; /* The message-table identifier * Consists of 4 bytes */ uint8_t message_identifier[ 4 ]; /* Unknown * Consists of 16 bytes * Contains a GUID */ uint8_t unknown1[ 16 ]; /* The data offset * Consists of 4 bytes */ uint8_t data_offset[ 4 ]; }; typedef struct fwevt_template_table fwevt_template_table_t; struct fwevt_template_table { /* The signature * Consists of 4 bytes * Contains: "TTBL" */ uint8_t signature[ 4 ]; /* The size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* The number of templates * Consists of 4 bytes */ uint8_t number_of_templates[ 4 ]; }; typedef struct fwevt_template_header fwevt_template_header_t; struct fwevt_template_header { /* The signature * Consists of 4 bytes * Contains: "TEMP" */ uint8_t signature[ 4 ]; /* The size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* The number of (variable) descriptors * Consists of 4 bytes */ uint8_t number_of_descriptors[ 4 ]; /* The number of (variable) names * Consists of 4 bytes */ uint8_t number_of_names[ 4 ]; /* The instance values offset * Consists of 4 bytes */ uint8_t instance_values_offset[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown1[ 4 ]; /* The template identifier * Consists of 16 bytes */ uint8_t identifier[ 16 ]; }; #if defined( __cplusplus ) } #endif #endif libevt-20170120/libfwevt/libfwevt_error.h0000664000175000017500000000340513040331702022356 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_ERROR_H ) #define _LIBFWEVT_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFWEVT ) #include #endif #include "libfwevt_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFWEVT ) LIBFWEVT_EXTERN \ void libfwevt_error_free( libfwevt_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_error_fprint( libfwevt_error_t *error, FILE *stream ); LIBFWEVT_EXTERN \ int libfwevt_error_sprint( libfwevt_error_t *error, char *string, size_t size ); LIBFWEVT_EXTERN \ int libfwevt_error_backtrace_fprint( libfwevt_error_t *error, FILE *stream ); LIBFWEVT_EXTERN \ int libfwevt_error_backtrace_sprint( libfwevt_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBFWEVT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_ERROR_H ) */ libevt-20170120/libfwevt/libfwevt_xml_token.c0000664000175000017500000001432113040331702023217 0ustar00lordyestalordyesta00000000000000/* * Windows Event Log binary XML token functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfwevt_definitions.h" #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_xml_token.h" /* Creats a binary XML token * Make sure the value xml_token is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_xml_token_initialize( libfwevt_xml_token_t **xml_token, libcerror_error_t **error ) { static char *function = "libfwevt_xml_token_initialize"; if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( *xml_token != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid binary XML token value already set.", function ); return( -1 ); } *xml_token = memory_allocate_structure( libfwevt_xml_token_t ); if( *xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create binary XML token.", function ); goto on_error; } if( memory_set( *xml_token, 0, sizeof( libfwevt_xml_token_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear binary XML token.", function ); goto on_error; } return( 1 ); on_error: if( *xml_token != NULL ) { memory_free( *xml_token ); *xml_token = NULL; } return( -1 ); } /* Frees a binary XML token * Returns 1 if successful or -1 on error */ int libfwevt_xml_token_free( libfwevt_xml_token_t **xml_token, libcerror_error_t **error ) { static char *function = "libfwevt_xml_token_free"; int result = 1; if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( *xml_token != NULL ) { memory_free( *xml_token ); *xml_token = NULL; } return( result ); } /* Reads the binary XML token * Returns 1 if successful or -1 on error */ int libfwevt_xml_token_read( libfwevt_xml_token_t *xml_token, const uint8_t *chunk_data, size_t chunk_data_size, size_t chunk_data_offset, libcerror_error_t **error ) { const uint8_t *xml_token_data = NULL; static char *function = "libfwevt_xml_token_read"; size_t xml_token_data_size = 0; if( xml_token == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary XML token.", function ); return( -1 ); } if( chunk_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid chunk data.", function ); return( -1 ); } if( chunk_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid binary XML token data size value exceeds maximum.", function ); return( -1 ); } if( chunk_data_offset >= chunk_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid chunk data offset value out of bounds.", function ); return( -1 ); } xml_token_data = &( chunk_data[ chunk_data_offset ] ); xml_token_data_size = chunk_data_size - chunk_data_offset; if( xml_token_data_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid binary XML token data size value too small.", function ); return( -1 ); } switch( xml_token_data[ 0 ] ) { case LIBFWEVT_XML_TOKEN_END_OF_FILE: case LIBFWEVT_XML_TOKEN_CLOSE_START_ELEMENT_TAG: case LIBFWEVT_XML_TOKEN_CLOSE_EMPTY_ELEMENT_TAG: case LIBFWEVT_XML_TOKEN_END_ELEMENT_TAG: case LIBFWEVT_XML_TOKEN_OPEN_START_ELEMENT_TAG: case LIBFWEVT_XML_TOKEN_OPEN_START_ELEMENT_TAG | LIBFWEVT_XML_TOKEN_FLAG_HAS_MORE_DATA: case LIBFWEVT_XML_TOKEN_VALUE: case LIBFWEVT_XML_TOKEN_VALUE | LIBFWEVT_XML_TOKEN_FLAG_HAS_MORE_DATA: case LIBFWEVT_XML_TOKEN_ATTRIBUTE: case LIBFWEVT_XML_TOKEN_ATTRIBUTE | LIBFWEVT_XML_TOKEN_FLAG_HAS_MORE_DATA: case LIBFWEVT_XML_TOKEN_CDATA_SECTION: case LIBFWEVT_XML_TOKEN_CDATA_SECTION | LIBFWEVT_XML_TOKEN_FLAG_HAS_MORE_DATA: case LIBFWEVT_XML_TOKEN_CHARACTER_REFERENCE: case LIBFWEVT_XML_TOKEN_CHARACTER_REFERENCE | LIBFWEVT_XML_TOKEN_FLAG_HAS_MORE_DATA: case LIBFWEVT_XML_TOKEN_ENTITY_REFERENCE: case LIBFWEVT_XML_TOKEN_ENTITY_REFERENCE | LIBFWEVT_XML_TOKEN_FLAG_HAS_MORE_DATA: case LIBFWEVT_XML_TOKEN_PI_TARGET: case LIBFWEVT_XML_TOKEN_PI_DATA: case LIBFWEVT_XML_TOKEN_TEMPLATE_INSTANCE: case LIBFWEVT_XML_TOKEN_NORMAL_SUBSTITUTION: case LIBFWEVT_XML_TOKEN_OPTIONAL_SUBSTITUTION: case LIBFWEVT_XML_TOKEN_FRAGMENT_HEADER: break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported binary XML token type: 0x%02" PRIx8 ".", function, xml_token_data[ 0 ] ); return( -1 ); } xml_token->type = xml_token_data[ 0 ]; return( 1 ); } libevt-20170120/libfwevt/libfwevt_level.c0000664000175000017500000002342313040331702022331 0ustar00lordyestalordyesta00000000000000/* * Level functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include #include "libfwevt_level.h" #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_libuna.h" #include "libfwevt_types.h" #include "fwevt_template.h" /* Creates a level * Make sure the value level is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_level_initialize( libfwevt_level_t **level, libcerror_error_t **error ) { libfwevt_internal_level_t *internal_level = NULL; static char *function = "libfwevt_level_initialize"; if( level == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid level.", function ); return( -1 ); } if( *level != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid level value already set.", function ); return( -1 ); } internal_level = memory_allocate_structure( libfwevt_internal_level_t ); if( internal_level == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create level.", function ); goto on_error; } if( memory_set( internal_level, 0, sizeof( libfwevt_internal_level_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear level.", function ); goto on_error; } *level = (libfwevt_level_t *) internal_level; return( 1 ); on_error: if( internal_level != NULL ) { memory_free( internal_level ); } return( -1 ); } /* Frees a level * Returns 1 if successful or -1 on error */ int libfwevt_level_free( libfwevt_level_t **level, libcerror_error_t **error ) { libfwevt_internal_level_t *internal_level = NULL; static char *function = "libfwevt_level_free"; if( level == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid level.", function ); return( -1 ); } if( *level != NULL ) { internal_level = (libfwevt_internal_level_t *) *level; *level = NULL; memory_free( internal_level ); } return( 1 ); } /* Reads the level * Returns 1 if successful or -1 on error */ int libfwevt_level_read( libfwevt_level_t *level, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ) { /* TODO libfwevt_internal_level_t *internal_level = NULL; */ fwevt_template_level_t *wevt_level = NULL; static char *function = "libfwevt_level_read"; uint32_t level_data_offset = 0; uint32_t level_data_size = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t *value_string = NULL; size_t value_string_size = 0; uint32_t value_32bit = 0; int result = 0; #endif if( level == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid level.", function ); return( -1 ); } /* TODO internal_level = (libfwevt_internal_level_t *) level; */ 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_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( data_size < sizeof( fwevt_template_level_t ) ) || ( data_offset > ( data_size - sizeof( fwevt_template_level_t ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } wevt_level = (fwevt_template_level_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: level data:\n", function ); libcnotify_print_data( (uint8_t *) wevt_level, sizeof( fwevt_template_level_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( wevt_level->data_offset, level_data_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint32_little_endian( wevt_level->identifier, value_32bit ); libcnotify_printf( "%s: identifier\t\t\t\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( wevt_level->message_identifier, value_32bit ); libcnotify_printf( "%s: message identifier\t\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: data offset\t\t\t\t\t: 0x%08" PRIx32 "\n", function, level_data_offset ); } #endif if( level_data_offset > 0 ) { if( level_data_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid level data offset value out of bounds.", function ); goto on_error; } if( ( level_data_size > data_size ) || ( ( level_data_offset + level_data_size ) > data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid level data size value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( &( data[ level_data_offset ] ), level_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data:\n", function ); libcnotify_print_data( &( data[ level_data_offset ] ), level_data_size, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data size\t\t\t\t\t\t: %" PRIu32 "\n", function, level_data_size ); } level_data_offset += 4; level_data_size -= 4; #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( &( data[ level_data_offset ] ), level_data_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( &( data[ level_data_offset ] ), level_data_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 data string.", function ); goto on_error; } if( ( value_string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * value_string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data string size value exceeds maximum.", 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 data string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, &( data[ level_data_offset ] ), level_data_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, &( data[ level_data_offset ] ), level_data_size, LIBUNA_ENDIAN_LITTLE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data string.", function ); goto on_error; } libcnotify_printf( "%s: name\t\t\t\t\t\t: %" PRIs_SYSTEM "\n", function, value_string ); memory_free( value_string ); value_string = NULL; } #endif } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( value_string != NULL ) { memory_free( value_string ); } #endif return( -1 ); } libevt-20170120/libfwevt/libfwevt_libfguid.h0000664000175000017500000000257013040331702023014 0ustar00lordyestalordyesta00000000000000/* * The libfguid header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_LIBFGUID_H ) #define _LIBFWEVT_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( _LIBFWEVT_LIBFGUID_H ) */ libevt-20170120/libfwevt/libfwevt_unused.h0000664000175000017500000000254613040331702022535 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_UNUSED_H ) #define _LIBFWEVT_INTERNAL_UNUSED_H #include #if !defined( LIBFWEVT_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFWEVT_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFWEVT_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFWEVT_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFWEVT_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBFWEVT_INTERNAL_UNUSED_H ) */ libevt-20170120/libfwevt/libfwevt_error.c0000664000175000017500000000554013040331702022353 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfwevt_error.h" #include "libfwevt_libcerror.h" #if !defined( HAVE_LOCAL_LIBFWEVT ) /* Free an error and its elements */ void libfwevt_error_free( libfwevt_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 libfwevt_error_fprint( libfwevt_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 libfwevt_error_sprint( libfwevt_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 libfwevt_error_backtrace_fprint( libfwevt_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 libfwevt_error_backtrace_sprint( libfwevt_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_LIBFWEVT ) */ libevt-20170120/libfwevt/libfwevt_libcnotify.h0000664000175000017500000000254313040331702023371 0ustar00lordyestalordyesta00000000000000/* * The internal libcnotify header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_LIBCNOTIFY_H ) #define _LIBFWEVT_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 libevt-20170120/libfwevt/libfwevt_template.h0000664000175000017500000000703413040331702023042 0ustar00lordyestalordyesta00000000000000/* * Template functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_TEMPLATE_H ) #define _LIBFWEVT_INTERNAL_TEMPLATE_H #include #include #include "libfwevt_extern.h" #include "libfwevt_libcdata.h" #include "libfwevt_libcerror.h" #include "libfwevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_template libfwevt_internal_template_t; struct libfwevt_internal_template { /* The offset */ uint32_t offset; /* The data */ uint8_t *data; /* The data size */ size_t data_size; /* The size */ uint32_t size; /* The number of descriptors */ uint32_t number_of_descriptors; /* The number of names */ uint32_t number_of_names; /* The instance values offset */ uint32_t instance_values_offset; /* The values array */ libcdata_array_t *values_array; /* The ASCII codepage */ int ascii_codepage; }; LIBFWEVT_EXTERN \ int libfwevt_template_initialize( libfwevt_template_t **template, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_template_free( libfwevt_template_t **template, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_template_read( libfwevt_template_t *template, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ); int libfwevt_template_read_header( libfwevt_internal_template_t *internal_template, const uint8_t *data, size_t data_size, libcerror_error_t **error ); int libfwevt_template_read_instance_values( libfwevt_internal_template_t *internal_template, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_template_read_xml_document( libfwevt_template_t *template, libfwevt_xml_document_t *xml_document, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_template_set_ascii_codepage( libfwevt_template_t *template, int ascii_codepage, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_template_get_data( libfwevt_template_t *template, const uint8_t **data, size_t *data_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_template_set_data( libfwevt_template_t *template, const uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_template_get_offset( libfwevt_template_t *template, uint32_t *offset, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_template_set_offset( libfwevt_template_t *template, uint32_t offset, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_template_get_size( libfwevt_template_t *template, uint32_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_TEMPLATE_H ) */ libevt-20170120/libfwevt/libfwevt_channel.c0000664000175000017500000002440213040331702022630 0ustar00lordyestalordyesta00000000000000/* * Channel functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include #include "libfwevt_channel.h" #include "libfwevt_libcerror.h" #include "libfwevt_libcnotify.h" #include "libfwevt_libuna.h" #include "libfwevt_types.h" #include "fwevt_template.h" /* Creates a channel * Make sure the value channel is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwevt_channel_initialize( libfwevt_channel_t **channel, libcerror_error_t **error ) { libfwevt_internal_channel_t *internal_channel = NULL; static char *function = "libfwevt_channel_initialize"; if( channel == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid channel.", function ); return( -1 ); } if( *channel != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid channel value already set.", function ); return( -1 ); } internal_channel = memory_allocate_structure( libfwevt_internal_channel_t ); if( internal_channel == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create channel.", function ); goto on_error; } if( memory_set( internal_channel, 0, sizeof( libfwevt_internal_channel_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear channel.", function ); goto on_error; } *channel = (libfwevt_channel_t *) internal_channel; return( 1 ); on_error: if( internal_channel != NULL ) { memory_free( internal_channel ); } return( -1 ); } /* Frees a channel * Returns 1 if successful or -1 on error */ int libfwevt_channel_free( libfwevt_channel_t **channel, libcerror_error_t **error ) { libfwevt_internal_channel_t *internal_channel = NULL; static char *function = "libfwevt_channel_free"; if( channel == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid WEVT channel descriptor.", function ); return( -1 ); } if( *channel != NULL ) { internal_channel = (libfwevt_internal_channel_t *) *channel; *channel = NULL; memory_free( internal_channel ); } return( 1 ); } /* Reads the channel * Returns 1 if successful or -1 on error */ int libfwevt_channel_read( libfwevt_channel_t *channel, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ) { libfwevt_internal_channel_t *internal_channel = NULL; fwevt_template_channel_t *wevt_channel = NULL; static char *function = "libfwevt_channel_read"; uint32_t channel_data_offset = 0; uint32_t channel_data_size = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t *value_string = NULL; size_t value_string_size = 0; uint32_t value_32bit = 0; int result = 0; #endif if( channel == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid channel.", function ); return( -1 ); } internal_channel = (libfwevt_internal_channel_t *) channel; 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_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( ( data_size < sizeof( fwevt_template_channel_t ) ) || ( data_offset > ( data_size - sizeof( fwevt_template_channel_t ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } wevt_channel = (fwevt_template_channel_t *) &( data[ data_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: channel data:\n", function ); libcnotify_print_data( (uint8_t *) wevt_channel, sizeof( fwevt_template_channel_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( wevt_channel->identifier, internal_channel->identifier ); byte_stream_copy_to_uint32_little_endian( wevt_channel->data_offset, channel_data_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: identifier\t\t\t\t\t: %" PRIu32 "\n", function, internal_channel->identifier ); libcnotify_printf( "%s: data offset\t\t\t\t\t: 0x%08" PRIx32 "\n", function, channel_data_offset ); byte_stream_copy_to_uint32_little_endian( wevt_channel->unknown1, value_32bit ); libcnotify_printf( "%s: unknown1\t\t\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( wevt_channel->message_identifier, value_32bit ); libcnotify_printf( "%s: message identifier\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); } #endif if( channel_data_offset > 0 ) { if( channel_data_offset >= data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid channel data offset value out of bounds.", function ); goto on_error; } if( ( channel_data_size > data_size ) || ( ( channel_data_offset + channel_data_size ) > data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid channel data size value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( &( data[ channel_data_offset ] ), channel_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data:\n", function ); libcnotify_print_data( &( data[ channel_data_offset ] ), channel_data_size, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data size\t\t\t\t\t: %" PRIu32 "\n", function, channel_data_size ); } channel_data_offset += 4; channel_data_size -= 4; #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( &( data[ channel_data_offset ] ), channel_data_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( &( data[ channel_data_offset ] ), channel_data_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 data string.", function ); goto on_error; } if( ( value_string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * value_string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data string size value exceeds maximum.", 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 data string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, &( data[ channel_data_offset ] ), channel_data_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, &( data[ channel_data_offset ] ), channel_data_size, LIBUNA_ENDIAN_LITTLE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data string.", function ); goto on_error; } libcnotify_printf( "%s: name\t\t\t\t\t\t: %" PRIs_SYSTEM "\n", function, value_string ); memory_free( value_string ); value_string = NULL; } #endif } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( value_string != NULL ) { memory_free( value_string ); } #endif return( -1 ); } libevt-20170120/libfwevt/libfwevt_support.h0000664000175000017500000000232013040331702022734 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_SUPPORT_H ) #define _LIBFWEVT_SUPPORT_H #include #include #include "libfwevt_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFWEVT ) LIBFWEVT_EXTERN \ const char *libfwevt_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBFWEVT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_SUPPORT_H ) */ libevt-20170120/libfwevt/libfwevt_map.h0000664000175000017500000000321613040331702022002 0ustar00lordyestalordyesta00000000000000/* * Map functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWEVT_INTERNAL_MAP_H ) #define _LIBFWEVT_INTERNAL_MAP_H #include #include #include "libfwevt_extern.h" #include "libfwevt_libcerror.h" #include "libfwevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwevt_internal_map libfwevt_internal_map_t; struct libfwevt_internal_map { /* The identifier */ uint16_t identifier; }; LIBFWEVT_EXTERN \ int libfwevt_map_initialize( libfwevt_map_t **map, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_map_free( libfwevt_map_t **map, libcerror_error_t **error ); LIBFWEVT_EXTERN \ int libfwevt_map_read( libfwevt_map_t *map, const uint8_t *data, size_t data_size, size_t data_offset, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWEVT_INTERNAL_MAP_H ) */ libevt-20170120/libfcache/0000775000175000017500000000000013040343016017227 5ustar00lordyestalordyesta00000000000000libevt-20170120/libfcache/libfcache_extern.h0000664000175000017500000000256113040331700022666 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_EXTERN_H ) #define _LIBFCACHE_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFCACHE for local use of libfcache */ #if !defined( HAVE_LOCAL_LIBFCACHE ) /* If libtool DLL support is enabled set LIBFCACHE_DLL_EXPORT * before including libfcache/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFCACHE_DLL_EXPORT #endif #include #else #define LIBFCACHE_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */ #endif /* !defined( _LIBFCACHE_INTERNAL_EXTERN_H ) */ libevt-20170120/libfcache/libfcache_types.h0000664000175000017500000000312513040331700022522 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_TYPES_H ) #define _LIBFCACHE_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFCACHE for local use of libfcache * The definitions in are copied here * for local use of libfcache */ #if defined( HAVE_LOCAL_LIBFCACHE ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfcache_cache {} libfcache_cache_t; 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 ) */ libevt-20170120/libfcache/libfcache_cache.h0000664000175000017500000000601113040331700022416 0ustar00lordyestalordyesta00000000000000/* * The cache functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_CACHE_H ) #define _LIBFCACHE_INTERNAL_CACHE_H #include #include #include "libfcache_cache_value.h" #include "libfcache_date_time.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; /* 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 ); /* Cache value functions */ 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_index( libfcache_cache_t *cache, int cache_entry_index, int file_index, off64_t offset, time_t timestamp, intptr_t *value, int (*free_value)( intptr_t **value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFCACHE_INTERNAL_CACHE_H ) */ libevt-20170120/libfcache/libfcache_support.h0000664000175000017500000000233013040331700023067 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_SUPPORT_H ) #define _LIBFCACHE_SUPPORT_H #include #include #include "libfcache_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFCACHE ) LIBFCACHE_EXTERN \ const char *libfcache_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFCACHE_SUPPORT_H ) */ libevt-20170120/libfcache/libfcache_support.c0000664000175000017500000000223413040331700023065 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfcache_definitions.h" #include "libfcache_support.h" #if !defined( HAVE_LOCAL_LIBFCACHE ) /* Returns the library version as a string */ const char *libfcache_get_version( void ) { return( (const char *) LIBFCACHE_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */ libevt-20170120/libfcache/Makefile.am0000664000175000017500000000151413012271502021263 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBFCACHE AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfcache ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfcache_la_SOURCES) libevt-20170120/libfcache/libfcache_libcdata.h0000664000175000017500000000302213040331700023115 0ustar00lordyestalordyesta00000000000000/* * The internal libcdata header * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_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 ) */ libevt-20170120/libfcache/libfcache_unused.h0000664000175000017500000000255613040331700022670 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_UNUSED_H ) #define _LIBFCACHE_INTERNAL_UNUSED_H #include #if !defined( LIBFCACHE_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFCACHE_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFCACHE_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFCACHE_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFCACHE_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBFCACHE_INTERNAL_UNUSED_H ) */ libevt-20170120/libfcache/libfcache_libcerror.h0000664000175000017500000000264413040331700023346 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_LIBCERROR_H ) #define _LIBFCACHE_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFCACHE_LIBCERROR_H ) */ libevt-20170120/libfcache/libfcache_definitions.h0000664000175000017500000000306713040331700023676 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_DEFINITIONS_H ) #define _LIBFCACHE_INTERNAL_DEFINITIONS_H #include /* Define HAVE_LOCAL_LIBFCACHE for local use of libfcache */ #if !defined( HAVE_LOCAL_LIBFCACHE ) #include /* The definitions in are copied here * for local use of libfcache */ #else #define LIBFCACHE_VERSION 20170111 /* The libfcache version string */ #define LIBFCACHE_VERSION_STRING "20170111" /* The cache value flags definitions */ enum LIBFCACHE_CACHE_VALUE_FLAGS { /* The cache value is not managed by the library */ LIBFCACHE_CACHE_VALUE_FLAG_NON_MANAGED = 0x00, /* The cache value is managed by the library */ LIBFCACHE_CACHE_VALUE_FLAG_MANAGED = 0x01 }; #endif #endif libevt-20170120/libfcache/libfcache_cache_value.h0000664000175000017500000000547013040331700023622 0ustar00lordyestalordyesta00000000000000/* * Cache value functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_CACHE_VALUE_H ) #define _LIBFCACHE_INTERNAL_CACHE_VALUE_H #include #include #include "libfcache_date_time.h" #include "libfcache_extern.h" #include "libfcache_libcerror.h" #include "libfcache_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfcache_internal_cache_value libfcache_internal_cache_value_t; struct libfcache_internal_cache_value { /* The file index */ int file_index; /* The offset */ off64_t offset; /* The time stamp */ time_t timestamp; /* The value */ intptr_t *value; /* The free value function */ int (*free_value)( intptr_t **value, libcerror_error_t **error ); /* The flags */ uint8_t flags; }; int libfcache_cache_value_initialize( libfcache_cache_value_t **cache_value, libcerror_error_t **error ); 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, time_t *timestamp, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_value_set_identifier( libfcache_cache_value_t *cache_value, int file_index, off64_t offset, time_t timestamp, 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 (*free_value)( intptr_t **value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFCACHE_INTERNAL_CACHE_VALUE_H ) */ libevt-20170120/libfcache/libfcache_cache_value.c0000664000175000017500000002460713040331700023620 0ustar00lordyestalordyesta00000000000000/* * Cache value functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfcache_cache_value.h" #include "libfcache_date_time.h" #include "libfcache_definitions.h" #include "libfcache_libcerror.h" #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->free_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid cache value - missing free value function.", function ); result = -1; } else if( internal_cache_value->free_value( &( 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, time_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 ); } /* 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, time_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 ); } /* 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 (*free_value)( 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( free_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid free value function.", function ); return( -1 ); } if( ( internal_cache_value->flags & LIBFCACHE_CACHE_VALUE_FLAG_MANAGED ) != 0 ) { if( internal_cache_value->value != NULL ) { if( internal_cache_value->free_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid cache value - missing free value function.", function ); return( -1 ); } if( internal_cache_value->free_value( &( 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->free_value = free_value; internal_cache_value->flags |= flags; return( 1 ); } libevt-20170120/libfcache/Makefile.in0000664000175000017500000007705113040342657021320 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFCACHE_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFCACHE_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFCACHE_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFCACHE_TRUE@ @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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfcache/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfcache/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_cache_value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_date_time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_support.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfcache ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfcache_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libfcache/libfcache_error.c0000664000175000017500000000555613040331700022514 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfcache_error.h" #include "libfcache_libcerror.h" #if !defined( HAVE_LOCAL_LIBFCACHE ) /* Free an error and its elements */ void libfcache_error_free( libfcache_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfcache_error_fprint( libfcache_error_t *error, FILE *stream ) { 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 ) */ libevt-20170120/libfcache/libfcache_date_time.c0000664000175000017500000000306613040331700023310 0ustar00lordyestalordyesta00000000000000/* * Date and time functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #if defined( TIME_WITH_SYS_TIME ) #include #include #elif defined( HAVE_SYS_TIME_H ) #include #else #include #endif #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( time_t *timestamp, libcerror_error_t **error ) { 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 ); } *timestamp = time( NULL ); return( 1 ); } libevt-20170120/libfcache/libfcache_cache.c0000664000175000017500000003246213040331700022422 0ustar00lordyestalordyesta00000000000000/* * The cache functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfcache_cache.h" #include "libfcache_cache_value.h" #include "libfcache_date_time.h" #include "libfcache_definitions.h" #include "libfcache_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 ); goto on_error; } if( libcdata_array_initialize( &( internal_cache->entries ), maximum_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create entries array.", function ); goto on_error; } *cache = (libfcache_cache_t *) internal_cache; return( 1 ); on_error: if( internal_cache != NULL ) { memory_free( internal_cache ); } return( -1 ); } /* Frees 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_array_free( &( internal_cache->entries ), (int (*)(intptr_t **, libcerror_error_t **)) &libfcache_cache_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the entries array.", function ); result = -1; } memory_free( internal_cache ); } return( result ); } /* 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_array_clear( internal_cache->entries, (int (*)(intptr_t **, libcerror_error_t **)) &libfcache_cache_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear entries array.", function ); return( -1 ); } internal_cache->number_of_cache_values = 0; return( 1 ); } /* 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, &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, 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, number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from entries array.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of cache values * Returns 1 if successful or -1 on error */ int libfcache_cache_get_number_of_cache_values( libfcache_cache_t *cache, int *number_of_cache_values, libcerror_error_t **error ) { libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_get_number_of_cache_values"; if( cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache.", function ); return( -1 ); } internal_cache = (libfcache_internal_cache_t *) cache; if( number_of_cache_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of cache values.", function ); return( -1 ); } *number_of_cache_values = internal_cache->number_of_cache_values; return( 1 ); } /* 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, cache_entry_index, (intptr_t **) cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value: %d from entries array.", function, cache_entry_index ); return( -1 ); } return( 1 ); } /* Sets the cache value for the specific index * Returns 1 if successful or -1 on error */ int libfcache_cache_set_value_by_index( libfcache_cache_t *cache, int cache_entry_index, int file_index, off64_t offset, time_t timestamp, intptr_t *value, int (*free_value)( intptr_t **value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_set_value_by_index"; if( cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache.", function ); return( -1 ); } internal_cache = (libfcache_internal_cache_t *) cache; if( libcdata_array_get_entry_by_index( internal_cache->entries, cache_entry_index, (intptr_t **) &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value: %d from entries array.", function, cache_entry_index ); return( -1 ); } if( cache_value == NULL ) { if( libfcache_cache_value_initialize( &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create cache value.", function ); return( -1 ); } if( libcdata_array_set_entry_by_index( internal_cache->entries, cache_entry_index, (intptr_t *) cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set cache value: %d in entries array.", function, cache_entry_index ); libfcache_cache_value_free( &cache_value, NULL ); return( -1 ); } internal_cache->number_of_cache_values++; } if( libfcache_cache_value_set_value( cache_value, value, free_value, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in cache value.", function ); return( -1 ); } if( libfcache_cache_value_set_identifier( cache_value, 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 ); } libevt-20170120/libfcache/libfcache_error.h0000664000175000017500000000343413040331700022512 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_ERROR_H ) #define _LIBFCACHE_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFCACHE ) #include #endif #include "libfcache_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFCACHE ) LIBFCACHE_EXTERN \ void libfcache_error_free( libfcache_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_error_fprint( libfcache_error_t *error, FILE *stream ); LIBFCACHE_EXTERN \ int libfcache_error_sprint( libfcache_error_t *error, char *string, size_t size ); LIBFCACHE_EXTERN \ int libfcache_error_backtrace_fprint( libfcache_error_t *error, FILE *stream ); LIBFCACHE_EXTERN \ int libfcache_error_backtrace_sprint( libfcache_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFCACHE_INTERNAL_ERROR_H ) */ libevt-20170120/libfcache/libfcache_date_time.h0000664000175000017500000000260413040331700023312 0ustar00lordyestalordyesta00000000000000/* * Date and time functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_DATE_TIME_H ) #define _LIBFCACHE_DATE_TIME_H #include #if defined( TIME_WITH_SYS_TIME ) #include #include #elif defined( HAVE_SYS_TIME_H ) #include #else #include #endif #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( time_t *timestamp, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFCACHE_DATE_TIME_H ) */ libevt-20170120/libexe/0000775000175000017500000000000013040343017016600 5ustar00lordyestalordyesta00000000000000libevt-20170120/libexe/libexe_types.h0000664000175000017500000000303213012271501021440 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_INTERNAL_TYPES_H ) #define _LIBEXE_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBEXE for local use of libexe * The definitions in are copied here * for local use of libexe */ #if defined( HAVE_LOCAL_LIBEXE ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libexe_file {} libexe_file_t; typedef struct libexe_section {} libexe_section_t; #else typedef intptr_t libexe_file_t; typedef intptr_t libexe_section_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBEXE ) */ #endif /* !defined( _LIBEXE_INTERNAL_TYPES_H ) */ libevt-20170120/libexe/libexe_libcerror.h0000664000175000017500000000263313012271501022265 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_LIBCERROR_H ) #define _LIBEXE_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( _LIBEXE_LIBCERROR_H ) */ libevt-20170120/libexe/libexe_libclocale.h0000664000175000017500000000266013012271501022373 0ustar00lordyestalordyesta00000000000000/* * The internal libclocale header * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_LIBCLOCALE_H ) #define _LIBEXE_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( _LIBEXE_LIBCLOCALE_H ) */ libevt-20170120/libexe/libexe_section.h0000664000175000017500000001006413012271501021743 0ustar00lordyestalordyesta00000000000000/* * Section functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_INTERNAL_SECTION_H ) #define _LIBEXE_INTERNAL_SECTION_H #include #include #include "libexe_extern.h" #include "libexe_io_handle.h" #include "libexe_libbfio.h" #include "libexe_libcerror.h" #include "libexe_section_descriptor.h" #include "libexe_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libexe_internal_section libexe_internal_section_t; struct libexe_internal_section { /* The IO handle */ libexe_io_handle_t *io_handle; /* The file IO handle */ libbfio_handle_t *file_io_handle; /* The section descriptor */ libexe_section_descriptor_t *section_descriptor; }; int libexe_section_initialize( libexe_section_t **section, libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libexe_section_descriptor_t *section_descriptor, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_section_free( libexe_section_t **section, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_section_get_name_size( libexe_section_t *section, size_t *name_size, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_section_get_name( libexe_section_t *section, char *name, size_t name_size, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_section_get_utf8_name_size( libexe_section_t *section, size_t *utf8_string_size, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_section_get_utf8_name( libexe_section_t *section, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_section_get_utf16_name_size( libexe_section_t *section, size_t *utf16_string_size, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_section_get_utf16_name( libexe_section_t *section, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBEXE_EXTERN \ ssize_t libexe_section_read_buffer( libexe_section_t *section, void *buffer, size_t buffer_size, libcerror_error_t **error ); LIBEXE_EXTERN \ ssize_t libexe_section_read_buffer_at_offset( libexe_section_t *section, void *buffer, size_t buffer_size, off64_t offset, libcerror_error_t **error ); LIBEXE_EXTERN \ off64_t libexe_section_seek_offset( libexe_section_t *section, off64_t offset, int whence, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_section_get_offset( libexe_section_t *section, off64_t *offset, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_section_get_size( libexe_section_t *section, size64_t *size, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_section_get_start_offset( libexe_section_t *section, off64_t *start_offset, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_section_get_virtual_address( libexe_section_t *section, uint32_t *virtual_address, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_section_get_data_file_io_handle( libexe_section_t *section, libbfio_handle_t **file_io_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEXE_INTERNAL_SECTION_H ) */ libevt-20170120/libexe/libexe_definitions.h0000664000175000017500000001206313012271501022613 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_INTERNAL_DEFINITIONS_H ) #define _LIBEXE_INTERNAL_DEFINITIONS_H #include #include #define LIBEXE_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBEXE_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* Define HAVE_LOCAL_LIBEXE for local use of libexe */ #if !defined( HAVE_LOCAL_LIBEXE ) #include /* The definitions in are copied here * for local use of libexe */ #else #define LIBEXE_VERSION 20161107 /* The version string */ #define LIBEXE_VERSION_STRING "20161107" /* 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 LIBEXE_ACCESS_FLAGS { LIBEXE_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBEXE_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBEXE_OPEN_READ ( LIBEXE_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBEXE_OPEN_WRITE ( LIBEXE_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBEXE_OPEN_READ_WRITE ( LIBEXE_ACCESS_FLAG_READ | LIBEXE_ACCESS_FLAG_WRITE ) /* The executable types */ enum LIBEXE_EXECUTABLE_TYPES { LIBEXE_EXECUTABLE_TYPE_MZ, LIBEXE_EXECUTABLE_TYPE_LE, LIBEXE_EXECUTABLE_TYPE_NE, LIBEXE_EXECUTABLE_TYPE_PE_COFF, }; /* The target architecture type definitions */ enum LIBEXE_TARGET_ARCHITECTURE_TYPES { LIBEXE_TARGET_ARCHITECTURE_TYPE_UNKNOWN = 0x0000, LIBEXE_TARGET_ARCHITECTURE_TYPE_I386 = 0x014c, LIBEXE_TARGET_ARCHITECTURE_TYPE_R3000 = 0x0162, LIBEXE_TARGET_ARCHITECTURE_TYPE_R4000 = 0x0166, LIBEXE_TARGET_ARCHITECTURE_TYPE_R10000 = 0x0168, LIBEXE_TARGET_ARCHITECTURE_TYPE_ALPHA = 0x0184, LIBEXE_TARGET_ARCHITECTURE_TYPE_SH3 = 0x01a2, LIBEXE_TARGET_ARCHITECTURE_TYPE_SH4 = 0x01a6, LIBEXE_TARGET_ARCHITECTURE_TYPE_ARM = 0x01c0, LIBEXE_TARGET_ARCHITECTURE_TYPE_THUMB = 0x01c2, LIBEXE_TARGET_ARCHITECTURE_TYPE_POWERPC = 0x01f0, LIBEXE_TARGET_ARCHITECTURE_TYPE_IA64 = 0x0200, LIBEXE_TARGET_ARCHITECTURE_TYPE_MIPS16 = 0x0266, LIBEXE_TARGET_ARCHITECTURE_TYPE_M68K = 0x0268, LIBEXE_TARGET_ARCHITECTURE_TYPE_ALPHA64 = 0x0284, LIBEXE_TARGET_ARCHITECTURE_TYPE_MIPSFPU = 0x0366, LIBEXE_TARGET_ARCHITECTURE_TYPE_MIPSFPU16 = 0x0466 }; /* The file characteristic flags definitions */ enum LIBEXE_FILE_CHARACTERISTIC_FLAGS { LIBEXE_FILE_CHARACTERISTIC_FLAG_RELOCS_STRIPPED = 0x0001, LIBEXE_FILE_CHARACTERISTIC_FLAG_EXECUTABLE_IMAGE = 0x0002, LIBEXE_FILE_CHARACTERISTIC_FLAG_LINE_NUMS_STRIPPED = 0x0004, LIBEXE_FILE_CHARACTERISTIC_FLAG_LOCAL_SYMS_STRIPPED = 0x0008, LIBEXE_FILE_CHARACTERISTIC_FLAG_AGGRESSIVE_WS_TRIM = 0x0010, LIBEXE_FILE_CHARACTERISTIC_FLAG_LARGE_ADDRESS_AWARE = 0x0020, LIBEXE_FILE_CHARACTERISTIC_FLAG_16BIT_MACHINE = 0x0040, LIBEXE_FILE_CHARACTERISTIC_FLAG_BYTES_REVERSED_LO = 0x0080, LIBEXE_FILE_CHARACTERISTIC_FLAG_32BIT_MACHINE = 0x0100, LIBEXE_FILE_CHARACTERISTIC_FLAG_DEBUG_STRIPPED = 0x0200, LIBEXE_FILE_CHARACTERISTIC_FLAG_REMOVABLE_RUN_FROM_SWAP = 0x0400, LIBEXE_FILE_CHARACTERISTIC_FLAG_SYSTEM = 0x1000, LIBEXE_FILE_CHARACTERISTIC_FLAG_DLL = 0x2000, LIBEXE_FILE_CHARACTERISTIC_FLAG_UP_SYSTEM_ONLY = 0x4000, LIBEXE_FILE_CHARACTERISTIC_FLAG_BYTES_REVERSED_HI = 0x8000 }; #endif /* The COFF optional header signatures */ enum LIBEXE_COFF_OPTIONAL_HEADER_SIGNATURES { LIBEXE_COFF_OPTIONAL_HEADER_SIGNATURE_PE32 = 0x010b, LIBEXE_COFF_OPTIONAL_HEADER_SIGNATURE_PE32_PLUS = 0x020b }; /* The data directories */ enum LIBEXE_DATA_DIRECTORY { LIBEXE_DATA_DIRECTORY_EXPORT_TABLE, LIBEXE_DATA_DIRECTORY_IMPORT_TABLE, LIBEXE_DATA_DIRECTORY_RESOURCE_TABLE, LIBEXE_DATA_DIRECTORY_EXCEPTION_TABLE, LIBEXE_DATA_DIRECTORY_CERTIFICATE_TABLE, LIBEXE_DATA_DIRECTORY_BASE_RELOCATION_TABLE, LIBEXE_DATA_DIRECTORY_DEBUG_DATA, LIBEXE_DATA_DIRECTORY_THREAD_LOCAL_STORAGE_TABLE, LIBEXE_DATA_DIRECTORY_LOAD_CONFIGURATION_TABLE, LIBEXE_DATA_DIRECTORY_IMPORT_ADDRESS_TABLE, LIBEXE_DATA_DIRECTORY_DELAY_IMPORT_DESCRIPTOR, LIBEXE_DATA_DIRECTORY_COM_PLUS_RUNTIME_HEADER, LIBEXE_NUMBER_OF_DATA_DIRECTORIES }; /* The section flags */ enum LIBEXE_SECTION_FLAGS { LIBEXE_SECTION_FLAG_NON_MANAGED_FILE_IO_HANDLE = 0x00, LIBEXE_SECTION_FLAG_MANAGED_FILE_IO_HANDLE = 0x01, }; #define LIBEXE_MAXIMUM_CACHE_ENTRIES_SECTION_DATA 64 #endif libevt-20170120/libexe/libexe_export_table.h0000664000175000017500000000316313012271501022771 0ustar00lordyestalordyesta00000000000000/* * Export table functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_EXPORT_TABLE_H ) #define _LIBEXE_EXPORT_TABLE_H #include #include #include "libexe_libbfio.h" #include "libexe_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libexe_export_table libexe_export_table_t; struct libexe_export_table { /* Dummy */ int dummy; }; int libexe_export_table_initialize( libexe_export_table_t **export_table, libcerror_error_t **error ); int libexe_export_table_free( libexe_export_table_t **export_table, libcerror_error_t **error ); int libexe_export_table_read( libexe_export_table_t *export_table, libbfio_handle_t *file_io_handle, off64_t file_offset, uint32_t size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEXE_EXPORT_TABLE_H ) */ libevt-20170120/libexe/libexe_debug.h0000664000175000017500000000271413012271501021370 0ustar00lordyestalordyesta00000000000000/* * Debug functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_DEBUG_H ) #define _LIBEXE_DEBUG_H #include #include #include "libexe_libbfio.h" #include "libexe_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) void libexe_debug_print_file_characteristic_flags( uint16_t characteristic_flags ); void libexe_debug_print_dll_characteristic_flags( uint16_t characteristic_flags ); void libexe_debug_print_section_characteristic_flags( uint32_t characteristic_flags ); int libexe_debug_print_read_offsets( libbfio_handle_t *file_io_handle, libcerror_error_t **error ); #endif #if defined( __cplusplus ) } #endif #endif libevt-20170120/libexe/Makefile.am0000664000175000017500000000306113012271501020631 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBEXE AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @LIBFCACHE_CPPFLAGS@ \ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ noinst_LTLIBRARIES = libexe.la libexe_la_SOURCES = \ exe_file_header.h \ exe_section_table.h \ libexe_codepage.h \ libexe_data_directory_descriptor.h \ libexe_debug.c libexe_debug.h \ libexe_debug_data.c libexe_debug_data.h \ libexe_definitions.h \ libexe_error.c libexe_error.h \ libexe_export_table.c libexe_export_table.h \ libexe_extern.h \ libexe_file.c libexe_file.h \ libexe_import_table.c libexe_import_table.h \ libexe_io_handle.c libexe_io_handle.h \ libexe_libbfio.h \ libexe_libcdata.h \ libexe_libcerror.h \ libexe_libclocale.h \ libexe_libcnotify.h \ libexe_libfcache.h \ libexe_libfdata.h \ libexe_libfdatetime.h \ libexe_libuna.h \ libexe_notify.c libexe_notify.h \ libexe_section.c libexe_section.h \ libexe_section_descriptor.c libexe_section_descriptor.h \ libexe_section_io_handle.c libexe_section_io_handle.h \ libexe_support.c libexe_support.h \ libexe_types.h \ libexe_unused.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libexe ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libexe_la_SOURCES) libevt-20170120/libexe/libexe_libfdatetime.h0000664000175000017500000000327213012271501022733 0ustar00lordyestalordyesta00000000000000/* * The libfdatetime header wrapper * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_LIBFDATETIME_H ) #define _LIBEXE_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( _LIBEXE_LIBFDATETIME_H ) */ libevt-20170120/libexe/libexe_section_descriptor.h0000664000175000017500000000425613012271501024207 0ustar00lordyestalordyesta00000000000000/* * Section descriptor functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_SECTION_DESCRIPTOR_H ) #define _LIBEXE_SECTION_DESCRIPTOR_H #include #include #include "libexe_libcerror.h" #include "libexe_libfcache.h" #include "libexe_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libexe_section_descriptor libexe_section_descriptor_t; struct libexe_section_descriptor { /* The name */ char name[ 9 ]; /* The name size */ size_t name_size; /* The virtual address */ uint32_t virtual_address; /* The data stream */ libfdata_stream_t *data_stream; }; int libexe_section_descriptor_initialize( libexe_section_descriptor_t **section_descriptor, libcerror_error_t **error ); int libexe_section_descriptor_free( libexe_section_descriptor_t **section_descriptor, libcerror_error_t **error ); int libexe_section_descriptor_get_data_size( libexe_section_descriptor_t *section_descriptor, size64_t *data_size, libcerror_error_t **error ); int libexe_section_descriptor_get_data_range( libexe_section_descriptor_t *section_descriptor, off64_t *data_offset, size64_t *data_size, libcerror_error_t **error ); int libexe_section_descriptor_set_data_range( libexe_section_descriptor_t *section_descriptor, off64_t data_offset, size64_t data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libexe/libexe_support.c0000664000175000017500000002243413012271501022012 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "libexe_definitions.h" #include "libexe_io_handle.h" #include "libexe_libbfio.h" #include "libexe_libcerror.h" #include "libexe_libclocale.h" #include "libexe_support.h" #if !defined( HAVE_LOCAL_LIBEXE ) /* Returns the library version */ const char *libexe_get_version( void ) { return( (const char *) LIBEXE_VERSION_STRING ); } /* Returns the access flags for reading */ int libexe_get_access_flags_read( void ) { return( (int) LIBEXE_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 libexe_get_codepage( int *codepage, libcerror_error_t **error ) { static char *function = "libexe_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 libexe_set_codepage( int codepage, libcerror_error_t **error ) { static char *function = "libexe_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_LIBEXE ) */ /* Determines if a file contains an EXE file signature * Returns 1 if true, 0 if not or -1 on error */ int libexe_check_file_signature( const char *filename, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libexe_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 = libexe_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 EXE file signature * Returns 1 if true, 0 if not or -1 on error */ int libexe_check_file_signature_wide( const wchar_t *filename, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libexe_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 ); 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_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 = libexe_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 EXE file signature using a Basic File IO (bfio) handle * Returns 1 if true, 0 if not or -1 on error */ int libexe_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { uint8_t signature[ 2 ]; static char *function = "libexe_check_file_signature_file_io_handle"; ssize_t read_count = 0; int file_io_handle_is_open = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } file_io_handle_is_open = libbfio_handle_is_open( file_io_handle, error ); if( file_io_handle_is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); goto on_error; } else if( file_io_handle_is_open == 0 ) { if( libbfio_handle_open( file_io_handle, LIBBFIO_OPEN_READ, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); goto on_error; } } if( libbfio_handle_seek_offset( file_io_handle, 0, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek file header offset: 0.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, signature, 2, error ); if( read_count != 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read signature.", function ); goto on_error; } if( file_io_handle_is_open == 0 ) { if( libbfio_handle_close( file_io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close file.", function ); goto on_error; } } if( memory_compare( exe_mz_signature, signature, 2 ) == 0 ) { return( 1 ); } return( 0 ); on_error: if( file_io_handle_is_open == 0 ) { libbfio_handle_close( file_io_handle, NULL ); } return( -1 ); } libevt-20170120/libexe/libexe_libcdata.h0000664000175000017500000000301113012271501022034 0ustar00lordyestalordyesta00000000000000/* * The internal libcdata header * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_LIBCDATA_H ) #define _LIBEXE_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( _LIBEXE_LIBCDATA_H ) */ libevt-20170120/libexe/libexe_extern.h0000664000175000017500000000244313012271501021606 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_INTERNAL_EXTERN_H ) #define _LIBEXE_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBEXE for local use of libexe */ #if !defined( HAVE_LOCAL_LIBEXE ) /* If libtool DLL support is enabled set LIBEXE_DLL_EXPORT * before including libexe/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBEXE_DLL_EXPORT #endif #include #else #define LIBEXE_EXTERN extern #endif #endif /* !defined( _LIBEXE_INTERNAL_EXTERN_H ) */ libevt-20170120/libexe/libexe_file.c0000664000175000017500000011030513012271501021210 0ustar00lordyestalordyesta00000000000000/* * File functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "libexe_data_directory_descriptor.h" #include "libexe_codepage.h" #include "libexe_debug.h" #include "libexe_debug_data.h" #include "libexe_definitions.h" #include "libexe_export_table.h" #include "libexe_import_table.h" #include "libexe_io_handle.h" #include "libexe_file.h" #include "libexe_libbfio.h" #include "libexe_libcdata.h" #include "libexe_libcerror.h" #include "libexe_libcnotify.h" #include "libexe_section.h" #include "libexe_section_descriptor.h" /* Creates a file * Make sure the value file is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libexe_file_initialize( libexe_file_t **file, libcerror_error_t **error ) { libexe_internal_file_t *internal_file = NULL; static char *function = "libexe_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( libexe_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( libexe_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( libcdata_array_initialize( &( internal_file->sections_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sections array.", function ); goto on_error; } if( libexe_io_handle_initialize( &( internal_file->io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create IO handle.", function ); goto on_error; } *file = (libexe_file_t *) internal_file; return( 1 ); on_error: if( internal_file != NULL ) { if( internal_file->sections_array != NULL ) { libcdata_array_free( &( internal_file->sections_array ), NULL, NULL ); } memory_free( internal_file ); } return( -1 ); } /* Frees a file * Returns 1 if successful or -1 on error */ int libexe_file_free( libexe_file_t **file, libcerror_error_t **error ) { libexe_internal_file_t *internal_file = NULL; static char *function = "libexe_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 = (libexe_internal_file_t *) *file; if( internal_file->file_io_handle != NULL ) { if( libexe_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( libcdata_array_free( &( internal_file->sections_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libexe_section_descriptor_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sections array.", function ); result = -1; } if( libexe_io_handle_free( &( internal_file->io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free IO handle.", function ); result = -1; } memory_free( internal_file ); } return( result ); } /* Signals the file to abort its current activity * Returns 1 if successful or -1 on error */ int libexe_file_signal_abort( libexe_file_t *file, libcerror_error_t **error ) { libexe_internal_file_t *internal_file = NULL; static char *function = "libexe_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 = (libexe_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 libexe_file_open( libexe_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; libexe_internal_file_t *internal_file = NULL; static char *function = "libexe_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 = (libexe_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 & LIBEXE_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBEXE_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 & LIBEXE_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( libexe_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 libexe_file_open_wide( libexe_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; libexe_internal_file_t *internal_file = NULL; static char *function = "libexe_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 = (libexe_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 & LIBEXE_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBEXE_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 & LIBEXE_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( libexe_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 libexe_file_open_file_io_handle( libexe_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ) { libexe_internal_file_t *internal_file = NULL; static char *function = "libexe_file_open_file_io_handle"; int bfio_access_flags = 0; int file_io_handle_is_open = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libexe_internal_file_t *) file; if( internal_file->file_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - file IO handle already set.", function ); return( -1 ); } if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( ( ( access_flags & LIBEXE_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBEXE_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 & LIBEXE_ACCESS_FLAG_WRITE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: write access currently not supported.", function ); return( -1 ); } if( ( access_flags & LIBEXE_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 determine if file IO handle is open.", 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( libexe_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; } internal_file->file_io_handle = NULL; return( -1 ); } /* Closes a file * Returns 0 if successful or -1 on error */ int libexe_file_close( libexe_file_t *file, libcerror_error_t **error ) { libexe_internal_file_t *internal_file = NULL; static char *function = "libexe_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 = (libexe_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( libexe_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( libexe_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( libcdata_array_resize( internal_file->sections_array, 0, (int (*)(intptr_t **, libcerror_error_t **)) &libexe_section_descriptor_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize sections array.", function ); result = -1; } return( result ); } /* Opens a file for reading * Returns 1 if successful or -1 on error */ int libexe_file_open_read( libexe_internal_file_t *internal_file, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libexe_data_directory_descriptor_t *data_directory_descriptor = NULL; libexe_debug_data_t *debug_data = NULL; libexe_export_table_t *export_table = NULL; libexe_import_table_t *import_table = NULL; static char *function = "libexe_file_open_read"; off64_t file_offset = 0; uint16_t number_of_sections = 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->io_handle->abort != 0 ) { internal_file->io_handle->abort = 0; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading file header:\n" ); } #endif if( libexe_io_handle_read_file_header( internal_file->io_handle, file_io_handle, &number_of_sections, 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; } if( number_of_sections > 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading section table:\n" ); } #endif if( libexe_io_handle_read_section_table( internal_file->io_handle, file_io_handle, number_of_sections, internal_file->sections_array, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read section table.", function ); goto on_error; } } data_directory_descriptor = &( internal_file->io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_EXPORT_TABLE ] ); if( data_directory_descriptor->size > 0 ) { if( libexe_file_get_offset_by_relative_virtual_address( internal_file, data_directory_descriptor->virtual_address, &file_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve offset for relative virtual address: 0x%08" PRIx32 ".", function, data_directory_descriptor->virtual_address ); goto on_error; } if( libexe_export_table_initialize( &export_table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create export table.", function ); goto on_error; } if( libexe_export_table_read( export_table, file_io_handle, file_offset, data_directory_descriptor->size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read export table.", function ); goto on_error; } if( libexe_export_table_free( &export_table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free export table.", function ); goto on_error; } } data_directory_descriptor = &( internal_file->io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_IMPORT_TABLE ] ); if( data_directory_descriptor->size > 0 ) { if( libexe_file_get_offset_by_relative_virtual_address( internal_file, data_directory_descriptor->virtual_address, &file_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve offset for relative virtual address: 0x%08" PRIx32 ".", function, data_directory_descriptor->virtual_address ); goto on_error; } if( libexe_import_table_initialize( &import_table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create import table.", function ); goto on_error; } if( libexe_import_table_read( import_table, file_io_handle, file_offset, data_directory_descriptor->size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read import table.", function ); goto on_error; } if( libexe_import_table_free( &import_table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free import table.", function ); goto on_error; } } data_directory_descriptor = &( internal_file->io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_DEBUG_DATA ] ); if( data_directory_descriptor->size > 0 ) { if( libexe_file_get_offset_by_relative_virtual_address( internal_file, data_directory_descriptor->virtual_address, &file_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve offset for relative virtual address: 0x%08" PRIx32 ".", function, data_directory_descriptor->virtual_address ); goto on_error; } if( libexe_debug_data_initialize( &debug_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create debug data.", function ); goto on_error; } if( libexe_debug_data_read( debug_data, file_io_handle, file_offset, data_directory_descriptor->size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read debug data.", function ); goto on_error; } if( libexe_debug_data_free( &debug_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free debug data.", function ); goto on_error; } } return( 1 ); on_error: if( debug_data != NULL ) { libexe_debug_data_free( &debug_data, NULL ); } if( import_table != NULL ) { libexe_import_table_free( &import_table, NULL ); } if( export_table != NULL ) { libexe_export_table_free( &export_table, NULL ); } return( -1 ); } /* Retrieves the file ASCII codepage * Returns 1 if successful or -1 on error */ int libexe_file_get_ascii_codepage( libexe_file_t *file, int *ascii_codepage, libcerror_error_t **error ) { libexe_internal_file_t *internal_file = NULL; static char *function = "libexe_file_get_ascii_codepage"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libexe_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( ascii_codepage == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid ASCII codepage.", function ); return( -1 ); } *ascii_codepage = internal_file->io_handle->ascii_codepage; return( 1 ); } /* Sets the file ASCII codepage * Returns 1 if successful or -1 on error */ int libexe_file_set_ascii_codepage( libexe_file_t *file, int ascii_codepage, libcerror_error_t **error ) { libexe_internal_file_t *internal_file = NULL; static char *function = "libexe_file_set_ascii_codepage"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libexe_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( ( ascii_codepage != LIBEXE_CODEPAGE_ASCII ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_874 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_932 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_936 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_949 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_950 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_1250 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_1251 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_1252 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_1253 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_1254 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_1255 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_1256 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_1257 ) && ( ascii_codepage != LIBEXE_CODEPAGE_WINDOWS_1258 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported ASCII codepage.", function ); return( -1 ); } internal_file->io_handle->ascii_codepage = ascii_codepage; return( 1 ); } /* Retrieves offset of a relative virtual address * Returns 1 if successful, 0 if no such section or -1 on error */ int libexe_file_get_offset_by_relative_virtual_address( libexe_internal_file_t *internal_file, uint32_t virtual_address, off64_t *offset, libcerror_error_t **error ) { libexe_section_descriptor_t *section_descriptor = NULL; static char *function = "libexe_file_get_offset_by_relative_virtual_address"; size64_t section_size = 0; int number_of_sections = 0; int section_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( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_file->sections_array, &number_of_sections, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sections.", function ); return( -1 ); } for( section_index = 0; section_index < number_of_sections; section_index++ ) { if( libcdata_array_get_entry_by_index( internal_file->sections_array, section_index, (intptr_t **) §ion_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve section descriptor: %d.", function, section_index ); return( -1 ); } if( libexe_section_descriptor_get_data_range( section_descriptor, offset, §ion_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve section descriptor: %d data range.", function, section_index ); return( -1 ); } if( ( virtual_address >= section_descriptor->virtual_address ) && ( ( virtual_address - section_descriptor->virtual_address ) < section_size ) ) { *offset += virtual_address - section_descriptor->virtual_address; return( 1 ); } } *offset = 0; return( 0 ); } /* Retrieves the number of sections * Returns 1 if successful or -1 on error */ int libexe_file_get_number_of_sections( libexe_file_t *file, int *number_of_sections, libcerror_error_t **error ) { libexe_internal_file_t *internal_file = NULL; static char *function = "libexe_file_get_number_of_sections"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libexe_internal_file_t *) file; if( libcdata_array_get_number_of_entries( internal_file->sections_array, number_of_sections, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sections.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific section * Returns 1 if successful or -1 on error */ int libexe_file_get_section( libexe_file_t *file, int section_index, libexe_section_t **section, libcerror_error_t **error ) { libexe_internal_file_t *internal_file = NULL; libexe_section_descriptor_t *section_descriptor = NULL; static char *function = "libexe_file_get_section"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libexe_internal_file_t *) file; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } if( *section != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid section value already set.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_file->sections_array, section_index, (intptr_t **) §ion_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve section descriptor: %d.", function, section_index ); return( -1 ); } if( libexe_section_initialize( section, internal_file->io_handle, internal_file->file_io_handle, section_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create section.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific section by an ASCII formatted name * Returns 1 if successful, 0 if no such section or -1 on error */ int libexe_file_get_section_by_name( libexe_file_t *file, const char *name, size_t name_length, libexe_section_t **section, libcerror_error_t **error ) { libexe_internal_file_t *internal_file = NULL; libexe_section_descriptor_t *section_descriptor = NULL; static char *function = "libexe_file_get_section_by_name"; int number_of_sections = 0; int section_index = 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 = (libexe_internal_file_t *) file; 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid name length value exceeds maximum.", function ); return( -1 ); } if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } if( *section != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid section value already set.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_file->sections_array, &number_of_sections, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sections.", function ); return( -1 ); } for( section_index = 0; section_index < number_of_sections; section_index++ ) { if( libcdata_array_get_entry_by_index( internal_file->sections_array, section_index, (intptr_t **) §ion_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve section descriptor: %d.", function, section_index ); return( -1 ); } if( section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing section descriptor: %d.", function, section_index ); return( -1 ); } if( ( name_length + 1 ) == section_descriptor->name_size ) { if( narrow_string_compare( section_descriptor->name, name, name_length ) == 0 ) { if( libexe_section_initialize( section, internal_file->io_handle, internal_file->file_io_handle, section_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create section.", function ); return( -1 ); } return( 1 ); } } } return( 0 ); } libevt-20170120/libexe/libexe_libfcache.h0000664000175000017500000000263613012271501022205 0ustar00lordyestalordyesta00000000000000/* * The internal libfcache header * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_LIBFCACHE_H ) #define _LIBEXE_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( _LIBEXE_LIBFCACHE_H ) */ libevt-20170120/libexe/libexe_section_io_handle.h0000664000175000017500000000562613012271501023755 0ustar00lordyestalordyesta00000000000000/* * Section IO handle functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_SECTION_IO_HANDLE_H ) #define _LIBEXE_SECTION_IO_HANDLE_H #include #include #include "libexe_libcerror.h" #include "libexe_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libexe_section_io_handle libexe_section_io_handle_t; struct libexe_section_io_handle { /* The section */ libexe_section_t *section; /* Value to indicate the IO handle is open */ uint8_t is_open; /* The current access flags */ int access_flags; }; int libexe_section_io_handle_initialize( libexe_section_io_handle_t **io_handle, libexe_section_t *section, libcerror_error_t **error ); int libexe_section_io_handle_free( libexe_section_io_handle_t **io_handle, libcerror_error_t **error ); int libexe_section_io_handle_clone( libexe_section_io_handle_t **destination_io_handle, libexe_section_io_handle_t *source_io_handle, libcerror_error_t **error ); int libexe_section_io_handle_open( libexe_section_io_handle_t *io_handle, int flags, libcerror_error_t **error ); int libexe_section_io_handle_close( libexe_section_io_handle_t *io_handle, libcerror_error_t **error ); ssize_t libexe_section_io_handle_read( libexe_section_io_handle_t *io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t libexe_section_io_handle_write( libexe_section_io_handle_t *io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); off64_t libexe_section_io_handle_seek_offset( libexe_section_io_handle_t *io_handle, off64_t offset, int whence, libcerror_error_t **error ); int libexe_section_io_handle_exists( libexe_section_io_handle_t *io_handle, libcerror_error_t **error ); int libexe_section_io_handle_is_open( libexe_section_io_handle_t *io_handle, libcerror_error_t **error ); int libexe_section_io_handle_get_size( libexe_section_io_handle_t *io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libexe/libexe_error.h0000664000175000017500000000332713012271501021434 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_INTERNAL_ERROR_H ) #define _LIBEXE_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBEXE ) #include #endif #include "libexe_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBEXE ) LIBEXE_EXTERN \ void libexe_error_free( libexe_error_t **error ); LIBEXE_EXTERN \ int libexe_error_fprint( libexe_error_t *error, FILE *stream ); LIBEXE_EXTERN \ int libexe_error_sprint( libexe_error_t *error, char *string, size_t size ); LIBEXE_EXTERN \ int libexe_error_backtrace_fprint( libexe_error_t *error, FILE *stream ); LIBEXE_EXTERN \ int libexe_error_backtrace_sprint( libexe_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBEXE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEXE_INTERNAL_ERROR_H ) */ libevt-20170120/libexe/libexe_unused.h0000664000175000017500000000252613012271501021606 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_INTERNAL_UNUSED_H ) #define _LIBEXE_INTERNAL_UNUSED_H #include #if !defined( LIBEXE_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBEXE_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBEXE_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBEXE_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBEXE_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBEXE_INTERNAL_UNUSED_H ) */ libevt-20170120/libexe/libexe_import_table.c0000664000175000017500000001263013012271501022754 0ustar00lordyestalordyesta00000000000000/* * Import table functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libexe_import_table.h" #include "libexe_libcerror.h" #include "libexe_libcnotify.h" #include "libexe_libfcache.h" #include "libexe_libfdata.h" /* Creates an import table * Make sure the value import_table is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libexe_import_table_initialize( libexe_import_table_t **import_table, libcerror_error_t **error ) { static char *function = "libexe_import_table_initialize"; if( import_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid import table.", function ); return( -1 ); } if( *import_table != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid import table value already set.", function ); return( -1 ); } *import_table = memory_allocate_structure( libexe_import_table_t ); if( *import_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create import table.", function ); goto on_error; } if( memory_set( *import_table, 0, sizeof( libexe_import_table_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear import table.", function ); memory_free( *import_table ); *import_table = NULL; return( -1 ); } return( 1 ); on_error: if( *import_table != NULL ) { memory_free( *import_table ); *import_table = NULL; } return( -1 ); } /* Frees an import table * Returns 1 if successful or -1 on error */ int libexe_import_table_free( libexe_import_table_t **import_table, libcerror_error_t **error ) { static char *function = "libexe_import_table_free"; if( import_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid import table.", function ); return( -1 ); } if( *import_table != NULL ) { memory_free( *import_table ); *import_table = NULL; } return( 1 ); } /* Reads the import table * Returns 1 if successful or -1 on error */ int libexe_import_table_read( libexe_import_table_t *import_table, libbfio_handle_t *file_io_handle, uint32_t file_offset, uint32_t size, libcerror_error_t **error ) { uint8_t *data = NULL; static char *function = "libexe_import_table_read"; size_t read_count = 0; if( import_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid import table.", function ); return( -1 ); } #if SIZEOF_SIZE_T <= 4 if( size > (uint32_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 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading import table at offset: %" PRIu32 " (0x%08" PRIx32 ")\n", function, file_offset, file_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, (off64_t) file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek import table offset: %" PRIx32 ".", function, file_offset ); goto on_error; } data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * size ); if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create import table.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, data, size, error ); if( read_count != (ssize_t) size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read import table.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: import table:\n", function ); libcnotify_print_data( data, (size_t) size, 0 ); } #endif /* TODO extract values */ memory_free( data ); return( 1 ); on_error: if( data != NULL ) { memory_free( data ); } return( -1 ); } libevt-20170120/libexe/libexe_file.h0000664000175000017500000000741413012271501021223 0ustar00lordyestalordyesta00000000000000/* * File functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_INTERNAL_FILE_H ) #define _LIBEXE_INTERNAL_FILE_H #include #include #include "libexe_extern.h" #include "libexe_io_handle.h" #include "libexe_libbfio.h" #include "libexe_libcdata.h" #include "libexe_libcerror.h" #include "libexe_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libexe_internal_file libexe_internal_file_t; struct libexe_internal_file { /* The IO handle */ libexe_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 sections array */ libcdata_array_t *sections_array; }; LIBEXE_EXTERN \ int libexe_file_initialize( libexe_file_t **file, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_file_free( libexe_file_t **file, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_file_signal_abort( libexe_file_t *file, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_file_open( libexe_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBEXE_EXTERN \ int libexe_file_open_wide( libexe_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ LIBEXE_EXTERN \ int libexe_file_open_file_io_handle( libexe_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_file_close( libexe_file_t *file, libcerror_error_t **error ); int libexe_file_open_read( libexe_internal_file_t *internal_file, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_file_get_ascii_codepage( libexe_file_t *file, int *ascii_codepage, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_file_set_ascii_codepage( libexe_file_t *file, int ascii_codepage, libcerror_error_t **error ); int libexe_file_get_offset_by_relative_virtual_address( libexe_internal_file_t *internal_file, uint32_t virtual_address, off64_t *offset, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_file_get_number_of_sections( libexe_file_t *file, int *number_of_sections, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_file_get_section( libexe_file_t *file, int section_index, libexe_section_t **section, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_file_get_section_by_name( libexe_file_t *file, const char *name, size_t name_length, libexe_section_t **section, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEXE_INTERNAL_FILE_H ) */ libevt-20170120/libexe/libexe_debug.c0000664000175000017500000002402513012271501021362 0ustar00lordyestalordyesta00000000000000/* * Debug functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libexe_debug.h" #include "libexe_definitions.h" #include "libexe_libbfio.h" #include "libexe_libcerror.h" #include "libexe_libcnotify.h" #if defined( HAVE_DEBUG_OUTPUT ) /* Prints the COFF header characteristic flags */ void libexe_debug_print_file_characteristic_flags( uint16_t characteristic_flags ) { if( ( characteristic_flags & 0x0001 ) != 0 ) { libcnotify_printf( "\t0x0001 (IMAGE_FILE_RELOCS_STRIPPEDD)\n" ); } if( ( characteristic_flags & 0x0002 ) != 0 ) { libcnotify_printf( "\t0x0002 (IMAGE_FILE_EXECUTABLE_IMAGED)\n" ); } if( ( characteristic_flags & 0x0004 ) != 0 ) { libcnotify_printf( "\t0x0004 (IMAGE_FILE_LINE_NUMS_STRIPPEDD)\n" ); } if( ( characteristic_flags & 0x0008 ) != 0 ) { libcnotify_printf( "\t0x0008 (IMAGE_FILE_LOCAL_SYMS_STRIPPEDD)\n" ); } if( ( characteristic_flags & 0x0010 ) != 0 ) { libcnotify_printf( "\t0x0010 (IMAGE_FILE_AGGRESSIVE_WS_TRIMD)\n" ); } if( ( characteristic_flags & 0x0020 ) != 0 ) { libcnotify_printf( "\t0x0020 (IMAGE_FILE_LARGE_ADDRESS_AWARED)\n" ); } if( ( characteristic_flags & 0x0040 ) != 0 ) { libcnotify_printf( "\t0x0040 (IMAGE_FILE_16BIT_MACHINED)\n" ); } if( ( characteristic_flags & 0x0080 ) != 0 ) { libcnotify_printf( "\t0x0080 (IMAGE_FILE_BYTES_REVERSED_LOD)\n" ); } if( ( characteristic_flags & 0x0100 ) != 0 ) { libcnotify_printf( "\t0x0100 (IMAGE_FILE_32BIT_MACHINED)\n" ); } if( ( characteristic_flags & 0x0200 ) != 0 ) { libcnotify_printf( "\t0x0200 (IMAGE_FILE_DEBUG_STRIPPEDD)\n" ); } if( ( characteristic_flags & 0x0400 ) != 0 ) { libcnotify_printf( "\t0x0400 (IMAGE_FILE_REMOVABLE_RUN_FROM_SWAPD)\n" ); } if( ( characteristic_flags & 0x1000 ) != 0 ) { libcnotify_printf( "\t0x1000 (IMAGE_FILE_SYSTEMD)\n" ); } if( ( characteristic_flags & 0x2000 ) != 0 ) { libcnotify_printf( "\t0x2000 (IMAGE_FILE_DLLD)\n" ); } if( ( characteristic_flags & 0x4000 ) != 0 ) { libcnotify_printf( "\t0x4000 (IMAGE_FILE_UP_SYSTEM_ONLYD)\n" ); } if( ( characteristic_flags & 0x8000 ) != 0 ) { libcnotify_printf( "\t0x8000 (IMAGE_FILE_BYTES_REVERSED_HID)\n" ); } } /* Prints the DLL characteristic flags */ void libexe_debug_print_dll_characteristic_flags( uint16_t characteristic_flags ) { if( ( characteristic_flags & 0x0800 ) != 0 ) { libcnotify_printf( "\t0x0800 (IMAGE_DLLCHARACTERISTICS_NO_BIND)\n" ); } if( ( characteristic_flags & 0x2000 ) != 0 ) { libcnotify_printf( "\t0x2000 (IMAGE_DLLCHARACTERISTICS_WDM_DRIVER)\n" ); } if( ( characteristic_flags & 0x8000 ) != 0 ) { libcnotify_printf( "\t0x8000 (IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE)\n" ); } } /* Prints the section characteristic flags */ void libexe_debug_print_section_characteristic_flags( uint32_t characteristic_flags ) { if( characteristic_flags == 0x00000000UL ) { libcnotify_printf( "\t0x00000000 (IMAGE_SCN_TYPE_REG)\n" ); } if( ( characteristic_flags & 0x00000001UL ) != 0 ) { libcnotify_printf( "\t0x00000001 (IMAGE_SCN_TYPE_DSECT)\n" ); } if( ( characteristic_flags & 0x00000002UL ) != 0 ) { libcnotify_printf( "\t0x00000002 (IMAGE_SCN_TYPE_NOLOAD)\n" ); } if( ( characteristic_flags & 0x00000004UL ) != 0 ) { libcnotify_printf( "\t0x00000004 (IMAGE_SCN_TYPE_GROUP)\n" ); } if( ( characteristic_flags & 0x00000008UL ) != 0 ) { libcnotify_printf( "\t0x00000008 (IMAGE_SCN_TYPE_NO_PAD)\n" ); } if( ( characteristic_flags & 0x00000010UL ) != 0 ) { libcnotify_printf( "\t0x00000010 (IMAGE_SCN_TYPE_COPY)\n" ); } if( ( characteristic_flags & 0x00000020UL ) != 0 ) { libcnotify_printf( "\t0x00000020 (IMAGE_SCN_CNT_CODE)\n" ); } if( ( characteristic_flags & 0x00000040UL ) != 0 ) { libcnotify_printf( "\t0x00000040 (IMAGE_SCN_CNT_INITIALIZED_DATA)\n" ); } if( ( characteristic_flags & 0x00000080UL ) != 0 ) { libcnotify_printf( "\t0x00000080 (IMAGE_SCN_CNT_UNINITIALIZED_DATA)\n" ); } if( ( characteristic_flags & 0x00000100UL ) != 0 ) { libcnotify_printf( "\t0x00000100 (IMAGE_SCN_LNK_OTHER)\n" ); } if( ( characteristic_flags & 0x00000200UL ) != 0 ) { libcnotify_printf( "\t0x00000200 (IMAGE_SCN_LNK_INFO)\n" ); } if( ( characteristic_flags & 0x00000400UL ) != 0 ) { libcnotify_printf( "\t0x00000400 (IMAGE_SCN_TYPE_OVER)\n" ); } if( ( characteristic_flags & 0x00000800UL ) != 0 ) { libcnotify_printf( "\t0x00000800 (IMAGE_SCN_LNK_REMOVE)\n" ); } if( ( characteristic_flags & 0x00001000UL ) != 0 ) { libcnotify_printf( "\t0x00001000 (IMAGE_SCN_LNK_COMDAT)\n" ); } if( ( characteristic_flags & 0x00008000UL ) != 0 ) { libcnotify_printf( "\t0x00008000 (IMAGE_SCN_MEM_FARDATA)\n" ); } if( ( characteristic_flags & 0x00010000UL ) != 0 ) { libcnotify_printf( "\t0x00010000 (IMAGE_SCN_MEM_PURGEABLE)\n" ); } if( ( characteristic_flags & 0x00020000UL ) != 0 ) { libcnotify_printf( "\t0x00020000 (IMAGE_SCN_MEM_16BIT)\n" ); } if( ( characteristic_flags & 0x00040000UL ) != 0 ) { libcnotify_printf( "\t0x00040000 (IMAGE_SCN_MEM_LOCKED)\n" ); } if( ( characteristic_flags & 0x00080000UL ) != 0 ) { libcnotify_printf( "\t0x00080000 (IMAGE_SCN_MEM_PRELOAD)\n" ); } switch( characteristic_flags & 0x00f00000UL ) { case 0x00100000UL: libcnotify_printf( "\t0x00100000 (IMAGE_SCN_ALIGN_1BYTES)\n" ); break; case 0x00200000UL: libcnotify_printf( "\t0x00200000 (IMAGE_SCN_ALIGN_2BYTES)\n" ); break; case 0x00300000UL: libcnotify_printf( "\t0x00300000 (IMAGE_SCN_ALIGN_4BYTES)\n" ); break; case 0x00400000UL: libcnotify_printf( "\t0x00400000 (IMAGE_SCN_ALIGN_8BYTES)\n" ); break; case 0x00500000UL: libcnotify_printf( "\t0x00500000 (IMAGE_SCN_ALIGN_16BYTES)\n" ); break; case 0x00600000UL: libcnotify_printf( "\t0x00600000 (IMAGE_SCN_ALIGN_32BYTES)\n" ); break; case 0x00700000UL: libcnotify_printf( "\t0x00700000 (IMAGE_SCN_ALIGN_64BYTES)\n" ); break; case 0x00800000UL: libcnotify_printf( "\t0x00800000 (IMAGE_SCN_ALIGN_128BYTES)\n" ); break; case 0x00900000UL: libcnotify_printf( "\t0x00900000 (IMAGE_SCN_ALIGN_256BYTES)\n" ); break; case 0x00a00000UL: libcnotify_printf( "\t0x00a00000 (IMAGE_SCN_ALIGN_512BYTES)\n" ); break; case 0x00b00000UL: libcnotify_printf( "\t0x00b00000 (IMAGE_SCN_ALIGN_1024BYTES)\n" ); break; case 0x00c00000UL: libcnotify_printf( "\t0x00c00000 (IMAGE_SCN_ALIGN_2048BYTES)\n" ); break; case 0x00d00000UL: libcnotify_printf( "\t0x00d00000 (IMAGE_SCN_ALIGN_4096BYTES)\n" ); break; case 0x00e00000UL: libcnotify_printf( "\t0x00e00000 (IMAGE_SCN_ALIGN_8192BYTES)\n" ); break; default: break; } if( ( characteristic_flags & 0x01000000UL ) != 0 ) { libcnotify_printf( "\t0x01000000 (IMAGE_SCN_LNK_NRELOC_OVFL)\n" ); } if( ( characteristic_flags & 0x02000000UL ) != 0 ) { libcnotify_printf( "\t0x02000000 (IMAGE_SCN_MEM_DISCARDABLE)\n" ); } if( ( characteristic_flags & 0x04000000UL ) != 0 ) { libcnotify_printf( "\t0x04000000 (IMAGE_SCN_MEM_NOT_CACHED)\n" ); } if( ( characteristic_flags & 0x08000000UL ) != 0 ) { libcnotify_printf( "\t0x08000000 (IMAGE_SCN_MEM_NOT_PAGED)\n" ); } if( ( characteristic_flags & 0x10000000UL ) != 0 ) { libcnotify_printf( "\t0x10000000 (IMAGE_SCN_MEM_SHARED)\n" ); } if( ( characteristic_flags & 0x20000000UL ) != 0 ) { libcnotify_printf( "\t0x20000000 (IMAGE_SCN_MEM_EXECUTE)\n" ); } if( ( characteristic_flags & 0x40000000UL ) != 0 ) { libcnotify_printf( "\t0x40000000 (IMAGE_SCN_MEM_READ)\n" ); } if( ( characteristic_flags & 0x80000000UL ) != 0 ) { libcnotify_printf( "\t0x80000000 (IMAGE_SCN_MEM_WRITE)\n" ); } } /* Prints the read offsets * Returns 1 if successful or -1 on error */ int libexe_debug_print_read_offsets( libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libexe_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 + 1 ) ); return( -1 ); } libcnotify_printf( "%08" PRIi64 " ( 0x%08" PRIx64 " ) - %08" PRIi64 " ( 0x%08" PRIx64 " ) size: %" PRIu64 "\n", offset, offset, offset + size, offset + size, size ); } libcnotify_printf( "\n" ); return( 1 ); } #endif libevt-20170120/libexe/libexe_notify.c0000664000175000017500000000525413012271501021607 0ustar00lordyestalordyesta00000000000000/* * Notification functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "libexe_libcerror.h" #include "libexe_libcnotify.h" #include "libexe_notify.h" #if !defined( HAVE_LOCAL_LIBEXE ) /* Sets the verbose notification */ void libexe_notify_set_verbose( int verbose ) { libcnotify_verbose_set( verbose ); } /* Sets the notification stream * Returns 1 if successful or -1 on error */ int libexe_notify_set_stream( FILE *stream, libcerror_error_t **error ) { static char *function = "libexe_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 libexe_notify_stream_open( const char *filename, libcerror_error_t **error ) { static char *function = "libexe_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 libexe_notify_stream_close( libcerror_error_t **error ) { static char *function = "libexe_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_LIBEXE ) */ libevt-20170120/libexe/exe_section_table.h0000664000175000017500000000400013012271501022414 0ustar00lordyestalordyesta00000000000000/* * The section table definition of an executable (EXE) file * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EXE_SECTION_TABLE_H ) #define _EXE_SECTION_TABLE_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct exe_section_table_entry exe_section_table_entry_t; struct exe_section_table_entry { /* The name * Consists of 8 bytes * Contains an ASCII string */ uint8_t name[ 8 ]; /* The virtual size * Consists of 4 bytes */ uint8_t virtual_size[ 4 ]; /* The virtual address * Consists of 4 bytes */ uint8_t virtual_address[ 4 ]; /* The data size * Consists of 4 bytes */ uint8_t data_size[ 4 ]; /* The data offset * Consists of 4 bytes */ uint8_t data_offset[ 4 ]; /* The relocations offset * Consists of 4 bytes */ uint8_t relocations_offset[ 4 ]; /* The line numbers offset * Consists of 4 bytes */ uint8_t line_numbers_offset[ 4 ]; /* The number of relocations * Consists of 2 bytes */ uint8_t number_of_relocations[ 2 ]; /* The number of line numbers * Consists of 2 bytes */ uint8_t number_of_line_numbers[ 2 ]; /* The section characteristic flags * Consists of 4 bytes */ uint8_t section_characteristic_flags[ 4 ]; }; #if defined( __cplusplus ) } #endif #endif libevt-20170120/libexe/libexe_libbfio.h0000664000175000017500000000324313012271501021706 0ustar00lordyestalordyesta00000000000000/* * The libbfio header wrapper * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_LIBBFIO_H ) #define _LIBEXE_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( _LIBEXE_LIBBFIO_H ) */ libevt-20170120/libexe/libexe_import_table.h0000664000175000017500000000311313012271501022755 0ustar00lordyestalordyesta00000000000000/* * Import table functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_IMPORT_TABLE_H ) #define _LIBEXE_IMPORT_TABLE_H #include #include #include "libexe_libbfio.h" #include "libexe_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libexe_import_table libexe_import_table_t; struct libexe_import_table { /* Dummy */ int dummy; }; int libexe_import_table_initialize( libexe_import_table_t **import_table, libcerror_error_t **error ); int libexe_import_table_free( libexe_import_table_t **import_table, libcerror_error_t **error ); int libexe_import_table_read( libexe_import_table_t *import_table, libbfio_handle_t *file_io_handle, uint32_t file_offset, uint32_t size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libexe/libexe_notify.h0000664000175000017500000000303513012271501021607 0ustar00lordyestalordyesta00000000000000/* * Notification functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_NOTIFY_H ) #define _LIBEXE_NOTIFY_H #include #include #include #include "libexe_extern.h" #include "libexe_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBEXE ) LIBEXE_EXTERN \ void libexe_notify_set_verbose( int verbose ); LIBEXE_EXTERN \ int libexe_notify_set_stream( FILE *stream, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_notify_stream_open( const char *filename, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_notify_stream_close( libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBEXE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEXE_NOTIFY_H ) */ libevt-20170120/libexe/exe_file_header.h0000664000175000017500000002756613012271501022056 0ustar00lordyestalordyesta00000000000000/* * The file header definition of an executable (EXE) file * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EXE_FILE_HEADER_H ) #define _EXE_FILE_HEADER_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct exe_mz_header exe_mz_header_t; struct exe_mz_header { /* Signature * Consists of 2 bytes * "MZ" */ uint8_t signature[ 2 ]; /* The size of the last page * Consists of 2 bytes */ uint8_t last_page_size[ 2 ]; /* The number of pages * Consists of 2 bytes */ uint8_t number_of_pages[ 2 ]; /* The number of relocation entries * Consists of 2 bytes */ uint8_t number_of_relocation_entries[ 2 ]; /* The number of header paragraphs * Consists of 2 bytes */ uint8_t number_of_header_paragraphs[ 2 ]; /* The minimum number of allocated paragraphs * Consists of 2 bytes */ uint8_t minimum_allocated_paragraphs[ 2 ]; /* The maximum number of allocated paragraphs * Consists of 2 bytes */ uint8_t maximum_allocated_paragraphs[ 2 ]; /* The initial stack segment * Consists of 2 bytes */ uint8_t initial_stack_segment[ 2 ]; /* The initial stack pointer * Consists of 2 bytes */ uint8_t initial_stack_pointer[ 2 ]; /* The checksum * Consists of 2 bytes */ uint8_t checksum[ 2 ]; /* The entry point * Consists of 4 bytes */ uint8_t entry_point[ 4 ]; /* The relocation table offset * Consists of 2 bytes */ uint8_t relocation_table_offset[ 2 ]; /* The overlay number * Consists of 2 bytes */ uint8_t overlay_number[ 2 ]; /* Unknown * Consists of 32 bytes */ uint8_t unknown1[ 32 ]; /* The extended header offset * Consists of 4 bytes */ uint8_t extended_header_offset[ 4 ]; /* Unknown * Consists of 112 bytes */ uint8_t unknown2[ 112 ]; }; typedef struct exe_le_header exe_le_header_t; struct exe_le_header { /* Signature * Consists of 2 bytes * "LE" */ uint8_t signature[ 2 ]; /* TODO */ }; typedef struct exe_ne_header exe_ne_header_t; struct exe_ne_header { /* Signature * Consists of 2 bytes * "NE" */ uint8_t signature[ 2 ]; /* TODO */ /* Todo * Consists of 62 bytes */ uint8_t todo[ 62 ]; }; typedef struct exe_pe_header exe_pe_header_t; struct exe_pe_header { /* Signature * Consists of 4 bytes * "PE\x0\x0" */ uint8_t signature[ 4 ]; }; typedef struct exe_coff_header exe_coff_header_t; struct exe_coff_header { /* The target architecture type * Consists of 2 bytes */ uint8_t target_architecture_type[ 2 ]; /* The number of sections * Consists of 2 bytes */ uint8_t number_of_sections[ 2 ]; /* The number of sections * Consists of 4 bytes * Contains a POSIX timestamp */ uint8_t creation_time[ 4 ]; /* The symbol table offset * Consists of 4 bytes */ uint8_t symbol_table_offset[ 4 ]; /* The number of symbols * Consists of 4 bytes */ uint8_t number_of_symbols[ 4 ]; /* The optional header size * Consists of 2 bytes */ uint8_t optional_header_size[ 2 ]; /* The characteristic flags * Consists of 2 bytes */ uint8_t characteristic_flags[ 2 ]; }; typedef struct exe_coff_optional_header exe_coff_optional_header_t; struct exe_coff_optional_header { /* The signature * Consists of 2 bytes */ uint8_t signature[ 2 ]; /* The major linker version * Consists of 1 byte */ uint8_t major_linker_version; /* The minor linker version * Consists of 1 byte */ uint8_t minor_linker_version; /* The text section size * Consists of 4 bytes */ uint8_t text_section_size[ 4 ]; /* The initialized data section size * Consists of 4 bytes */ uint8_t initialized_data_section_size[ 4 ]; /* The uninitialized data section size * Consists of 4 bytes */ uint8_t uninitialized_data_section_size[ 4 ]; /* The entry point offset * Consists of 4 bytes */ uint8_t entry_point_offset[ 4 ]; /* The code base offset * Consists of 4 bytes */ uint8_t code_base_offset[ 4 ]; /* The data base offset * Consists of 4 bytes */ uint8_t data_base_offset[ 4 ]; }; typedef struct exe_coff_optional_header_pe32 exe_coff_optional_header_pe32_t; struct exe_coff_optional_header_pe32 { /* The image base offset * Consists of 4 bytes */ uint8_t image_base_offset[ 4 ]; /* The section alignment size * Consists of 4 bytes */ uint8_t section_alignment_size[ 4 ]; /* The file alignment size * Consists of 4 bytes */ uint8_t file_alignment_size[ 4 ]; /* The major operating system version * Consists of 2 bytes */ uint8_t major_operating_system_version[ 2 ]; /* The minor operating system version * Consists of 2 bytes */ uint8_t minor_operating_system_version[ 2 ]; /* The major image version * Consists of 2 bytes */ uint8_t major_image_version[ 2 ]; /* The minor image version * Consists of 2 bytes */ uint8_t minor_image_version[ 2 ]; /* The major subsystem version * Consists of 2 bytes */ uint8_t major_subsystem_version[ 2 ]; /* The minor subsystem version * Consists of 2 bytes */ uint8_t minor_subsystem_version[ 2 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown1[ 4 ]; /* The image size * Consists of 4 bytes */ uint8_t image_size[ 4 ]; /* The headers size * Consists of 4 bytes */ uint8_t headers_size[ 4 ]; /* The checksum * Consists of 4 bytes */ uint8_t checksum[ 4 ]; /* The subsystem * Consists of 2 bytes */ uint8_t subsystem[ 2 ]; /* The DLL characteristic flags * Consists of 2 bytes */ uint8_t dll_characteristic_flags[ 2 ]; /* The stack reservation size * Consists of 4 bytes */ uint8_t stack_reservation_size[ 4 ]; /* The stack commit size * Consists of 4 bytes */ uint8_t stack_commit_size[ 4 ]; /* The heap reservation size * Consists of 4 bytes */ uint8_t heap_reservation_size[ 4 ]; /* The heap commit size * Consists of 4 bytes */ uint8_t heap_commit_size[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown2[ 4 ]; /* The number of data-directories entries * Consists of 4 bytes */ uint8_t number_of_data_directories_entries[ 4 ]; }; typedef struct exe_coff_optional_header_pe32_plus exe_coff_optional_header_pe32_plus_t; struct exe_coff_optional_header_pe32_plus { /* The image base offset * Consists of 8 bytes */ uint8_t image_base_offset[ 8 ]; /* The section alignment size * Consists of 4 bytes */ uint8_t section_alignment_size[ 4 ]; /* The file alignment size * Consists of 4 bytes */ uint8_t file_alignment_size[ 4 ]; /* The major operating system version * Consists of 2 bytes */ uint8_t major_operating_system_version[ 2 ]; /* The minor operating system version * Consists of 2 bytes */ uint8_t minor_operating_system_version[ 2 ]; /* The major image version * Consists of 2 bytes */ uint8_t major_image_version[ 2 ]; /* The minor image version * Consists of 2 bytes */ uint8_t minor_image_version[ 2 ]; /* The major subsystem version * Consists of 2 bytes */ uint8_t major_subsystem_version[ 2 ]; /* The minor subsystem version * Consists of 2 bytes */ uint8_t minor_subsystem_version[ 2 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown1[ 4 ]; /* The image size * Consists of 4 bytes */ uint8_t image_size[ 4 ]; /* The headers size * Consists of 4 bytes */ uint8_t headers_size[ 4 ]; /* The checksum * Consists of 4 bytes */ uint8_t checksum[ 4 ]; /* The subsystem * Consists of 2 bytes */ uint8_t subsystem[ 2 ]; /* The DLL characteristic flags * Consists of 2 bytes */ uint8_t dll_characteristic_flags[ 2 ]; /* The stack reservation size * Consists of 8 bytes */ uint8_t stack_reservation_size[ 8 ]; /* The stack commit size * Consists of 8 bytes */ uint8_t stack_commit_size[ 8 ]; /* The heap reservation size * Consists of 8 bytes */ uint8_t heap_reservation_size[ 8 ]; /* The heap commit size * Consists of 8 bytes */ uint8_t heap_commit_size[ 8 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown2[ 4 ]; /* The number of data-directories entries * Consists of 4 bytes */ uint8_t number_of_data_directories_entries[ 4 ]; }; typedef struct exe_coff_optional_header_data_directories exe_coff_optional_header_data_directories_t; struct exe_coff_optional_header_data_directories { /* The export table RVA * Consists of 4 bytes */ uint8_t export_table_rva[ 4 ]; /* The export table size * Consists of 4 bytes */ uint8_t export_table_size[ 4 ]; /* The import table RVA * Consists of 4 bytes */ uint8_t import_table_rva[ 4 ]; /* The import table size * Consists of 4 bytes */ uint8_t import_table_size[ 4 ]; /* The resource table RVA * Consists of 4 bytes */ uint8_t resource_table_rva[ 4 ]; /* The resource table size * Consists of 4 bytes */ uint8_t resource_table_size[ 4 ]; /* The exception table RVA * Consists of 4 bytes */ uint8_t exception_table_rva[ 4 ]; /* The exception table size * Consists of 4 bytes */ uint8_t exception_table_size[ 4 ]; /* The certificate table RVA * Consists of 4 bytes */ uint8_t certificate_table_rva[ 4 ]; /* The certificate table size * Consists of 4 bytes */ uint8_t certificate_table_size[ 4 ]; /* The base relocation table RVA * Consists of 4 bytes */ uint8_t base_relocation_table_rva[ 4 ]; /* The base relocation table size * Consists of 4 bytes */ uint8_t base_relocation_table_size[ 4 ]; /* The debug data * Consists of 4 bytes */ uint8_t debug_data_rva[ 4 ]; /* The debug data * Consists of 4 bytes */ uint8_t debug_data_size[ 4 ]; /* The architecture-specific data * Consists of 4 bytes */ uint8_t architecture_specific_data_rva[ 4 ]; /* The architecture-specific data * Consists of 4 bytes */ uint8_t architecture_specific_data_size[ 4 ]; /* The global pointer register * Consists of 4 bytes */ uint8_t global_pointer_register[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown3[ 4 ]; /* The thread local storage table RVA * Consists of 4 bytes */ uint8_t thread_local_storage_table_rva[ 4 ]; /* The thread local storage table size * Consists of 4 bytes */ uint8_t thread_local_storage_table_size[ 4 ]; /* The load configuration table RVA * Consists of 4 bytes */ uint8_t load_configuration_table_rva[ 4 ]; /* The load configuration table size * Consists of 4 bytes */ uint8_t load_configuration_table_size[ 4 ]; /* The bound import table RVA * Consists of 4 bytes */ uint8_t bound_import_table_rva[ 4 ]; /* The bound import table size * Consists of 4 bytes */ uint8_t bound_import_table_size[ 4 ]; /* The import address table RVA * Consists of 4 bytes */ uint8_t import_address_table_rva[ 4 ]; /* The import address table size * Consists of 4 bytes */ uint8_t import_address_table_size[ 4 ]; /* The delay import descriptor RVA * Consists of 4 bytes */ uint8_t delay_import_descriptor_rva[ 4 ]; /* The delay import descriptor size * Consists of 4 bytes */ uint8_t delay_import_descriptor_size[ 4 ]; /* The COM+ runtime header RVA * Consists of 4 bytes */ uint8_t com_plus_runtime_header_rva[ 4 ]; /* The COM+ runtime header size * Consists of 4 bytes */ uint8_t com_plus_runtime_header_size[ 4 ]; /* Unknown * Consists of 8 bytes */ uint8_t unknown4[ 8 ]; }; #if defined( __cplusplus ) } #endif #endif libevt-20170120/libexe/libexe_section_descriptor.c0000664000175000017500000001655013012271501024202 0ustar00lordyestalordyesta00000000000000/* * Section decriptor functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libexe_io_handle.h" #include "libexe_libcerror.h" #include "libexe_libfcache.h" #include "libexe_libfdata.h" #include "libexe_section_descriptor.h" /* Creates a section descriptor * Make sure the value section_descriptor is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libexe_section_descriptor_initialize( libexe_section_descriptor_t **section_descriptor, libcerror_error_t **error ) { static char *function = "libexe_section_descriptor_initialize"; if( section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section descriptor.", function ); return( -1 ); } if( *section_descriptor != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid section descriptor value already set.", function ); return( -1 ); } *section_descriptor = memory_allocate_structure( libexe_section_descriptor_t ); if( *section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create section descriptor.", function ); goto on_error; } if( memory_set( *section_descriptor, 0, sizeof( libexe_section_descriptor_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear section descriptor.", function ); memory_free( *section_descriptor ); *section_descriptor = NULL; return( -1 ); } if( libfdata_stream_initialize( &( ( *section_descriptor )->data_stream ), NULL, NULL, NULL, NULL, (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libexe_io_handle_read_segment_data, NULL, (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libexe_io_handle_seek_segment_offset, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data stream.", function ); goto on_error; } if( libfdata_stream_resize( ( *section_descriptor )->data_stream, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize data stream.", function ); goto on_error; } return( 1 ); on_error: if( *section_descriptor != NULL ) { if( ( *section_descriptor )->data_stream != NULL ) { libfdata_stream_free( &( ( *section_descriptor )->data_stream ), NULL ); } memory_free( *section_descriptor ); *section_descriptor = NULL; } return( -1 ); } /* Frees a section descriptor * Returns 1 if successful or -1 on error */ int libexe_section_descriptor_free( libexe_section_descriptor_t **section_descriptor, libcerror_error_t **error ) { static char *function = "libexe_section_descriptor_free"; int result = 1; if( section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section descriptor.", function ); return( -1 ); } if( *section_descriptor != NULL ) { if( libfdata_stream_free( &( ( *section_descriptor )->data_stream ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data stream.", function ); result = -1; } memory_free( *section_descriptor ); *section_descriptor = NULL; } return( result ); } /* Retrieves the data size * Returns 1 if successful or -1 on error */ int libexe_section_descriptor_get_data_size( libexe_section_descriptor_t *section_descriptor, size64_t *data_size, libcerror_error_t **error ) { static char *function = "libexe_section_descriptor_get_data_size"; if( section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section descriptor.", function ); return( -1 ); } if( libfdata_stream_get_size( section_descriptor->data_stream, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data stream size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the data range * Returns 1 if successful or -1 on error */ int libexe_section_descriptor_get_data_range( libexe_section_descriptor_t *section_descriptor, off64_t *data_offset, size64_t *data_size, libcerror_error_t **error ) { static char *function = "libexe_section_descriptor_get_data_range"; uint32_t segment_flags = 0; int segment_file_index = 0; if( section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section descriptor.", function ); return( -1 ); } if( libfdata_stream_get_segment_by_index( section_descriptor->data_stream, 0, &segment_file_index, data_offset, data_size, &segment_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment from data stream.", function ); return( -1 ); } return( 1 ); } /* Sets the data range * Returns 1 if successful or -1 on error */ int libexe_section_descriptor_set_data_range( libexe_section_descriptor_t *section_descriptor, off64_t data_offset, size64_t data_size, libcerror_error_t **error ) { static char *function = "libexe_section_descriptor_set_data_range"; if( section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section descriptor.", function ); return( -1 ); } if( libfdata_stream_set_segment_by_index( section_descriptor->data_stream, 0, 0, data_offset, data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set segment in data stream.", function ); return( -1 ); } return( 1 ); } libevt-20170120/libexe/libexe_libuna.h0000664000175000017500000000322713012271501021554 0ustar00lordyestalordyesta00000000000000/* * The libuna header wrapper * * Copyright (C) 2011-2016, Joachim Metz * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_LIBUNA_H ) #define _LIBEXE_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( _LIBEXE_LIBUNA_H ) */ libevt-20170120/libexe/Makefile.in0000664000175000017500000010404013040342657020655 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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 = libexe ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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) libexe_la_LIBADD = am__libexe_la_SOURCES_DIST = exe_file_header.h exe_section_table.h \ libexe_codepage.h libexe_data_directory_descriptor.h \ libexe_debug.c libexe_debug.h libexe_debug_data.c \ libexe_debug_data.h libexe_definitions.h libexe_error.c \ libexe_error.h libexe_export_table.c libexe_export_table.h \ libexe_extern.h libexe_file.c libexe_file.h \ libexe_import_table.c libexe_import_table.h libexe_io_handle.c \ libexe_io_handle.h libexe_libbfio.h libexe_libcdata.h \ libexe_libcerror.h libexe_libclocale.h libexe_libcnotify.h \ libexe_libfcache.h libexe_libfdata.h libexe_libfdatetime.h \ libexe_libuna.h libexe_notify.c libexe_notify.h \ libexe_section.c libexe_section.h libexe_section_descriptor.c \ libexe_section_descriptor.h libexe_section_io_handle.c \ libexe_section_io_handle.h libexe_support.c libexe_support.h \ libexe_types.h libexe_unused.h @HAVE_LOCAL_LIBEXE_TRUE@am_libexe_la_OBJECTS = libexe_debug.lo \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_debug_data.lo libexe_error.lo \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_export_table.lo libexe_file.lo \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_import_table.lo \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_io_handle.lo libexe_notify.lo \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_section.lo \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_section_descriptor.lo \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_section_io_handle.lo \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_support.lo libexe_la_OBJECTS = $(am_libexe_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_LIBEXE_TRUE@am_libexe_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__depfiles_maybe = depfiles 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 = $(libexe_la_SOURCES) DIST_SOURCES = $(am__libexe_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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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_LIBEXE_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBEXE_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBEXE_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBCTHREADS_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBCSPLIT_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBCFILE_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBCPATH_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBBFIO_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBFCACHE_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBFDATA_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @LIBFDATETIME_CPPFLAGS@ \ @HAVE_LOCAL_LIBEXE_TRUE@ @PTHREAD_CPPFLAGS@ @HAVE_LOCAL_LIBEXE_TRUE@noinst_LTLIBRARIES = libexe.la @HAVE_LOCAL_LIBEXE_TRUE@libexe_la_SOURCES = \ @HAVE_LOCAL_LIBEXE_TRUE@ exe_file_header.h \ @HAVE_LOCAL_LIBEXE_TRUE@ exe_section_table.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_codepage.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_data_directory_descriptor.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_debug.c libexe_debug.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_debug_data.c libexe_debug_data.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_definitions.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_error.c libexe_error.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_export_table.c libexe_export_table.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_extern.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_file.c libexe_file.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_import_table.c libexe_import_table.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_io_handle.c libexe_io_handle.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_libbfio.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_libcdata.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_libcerror.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_libclocale.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_libcnotify.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_libfcache.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_libfdata.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_libfdatetime.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_libuna.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_notify.c libexe_notify.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_section.c libexe_section.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_section_descriptor.c libexe_section_descriptor.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_section_io_handle.c libexe_section_io_handle.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_support.c libexe_support.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_types.h \ @HAVE_LOCAL_LIBEXE_TRUE@ libexe_unused.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libexe/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libexe/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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}; \ } libexe.la: $(libexe_la_OBJECTS) $(libexe_la_DEPENDENCIES) $(EXTRA_libexe_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libexe_la_rpath) $(libexe_la_OBJECTS) $(libexe_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libexe_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libexe_debug_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libexe_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libexe_export_table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libexe_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libexe_import_table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libexe_io_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libexe_notify.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libexe_section.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libexe_section_descriptor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libexe_section_io_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libexe_support.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libexe ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libexe_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: libevt-20170120/libexe/libexe_data_directory_descriptor.h0000664000175000017500000000243613012271501025536 0ustar00lordyestalordyesta00000000000000/* * Data directory descriptor functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_DATA_DIRECTORY_DESCRIPTOR_H ) #define _LIBEXE_DATA_DIRECTORY_DESCRIPTOR_H #include #include #include "libexe_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libexe_data_directory_descriptor libexe_data_directory_descriptor_t; struct libexe_data_directory_descriptor { /* The virtual address */ uint32_t virtual_address; /* The size */ uint32_t size; }; #if defined( __cplusplus ) } #endif #endif libevt-20170120/libexe/libexe_libcnotify.h0000664000175000017500000000265513012271501022450 0ustar00lordyestalordyesta00000000000000/* * The internal libcnotify header * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_LIBCNOTIFY_H ) #define _LIBEXE_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( _LIBEXE_LIBCNOTIFY_H ) */ libevt-20170120/libexe/libexe_libfdata.h0000664000175000017500000000313413012271501022045 0ustar00lordyestalordyesta00000000000000/* * The libfdata header wrapper * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_LIBFDATA_H ) #define _LIBEXE_LIBFDATA_H #include /* Define HAVE_LOCAL_LIBFDATA for local use of libfdata */ #if defined( HAVE_LOCAL_LIBFDATA ) #include #include #include #include #include #include #include #include #include #include #include #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( _LIBEXE_LIBFDATA_H ) */ libevt-20170120/libexe/libexe_io_handle.c0000664000175000017500000021052413012271501022217 0ustar00lordyestalordyesta00000000000000/* * Input/Output (IO) handle functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include "libexe_codepage.h" #include "libexe_data_directory_descriptor.h" #include "libexe_debug.h" #include "libexe_definitions.h" #include "libexe_io_handle.h" #include "libexe_libbfio.h" #include "libexe_libcerror.h" #include "libexe_libcdata.h" #include "libexe_libcnotify.h" #include "libexe_libfdatetime.h" #include "libexe_section_descriptor.h" #include "libexe_unused.h" #include "exe_file_header.h" #include "exe_section_table.h" const char *exe_mz_signature = "MZ"; const char *exe_le_signature = "LE"; const char *exe_ne_signature = "NE"; const char *exe_pe_signature = "PE\x0\x0"; /* 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 libexe_io_handle_initialize( libexe_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libexe_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( libexe_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( libexe_io_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file.", function ); memory_free( *io_handle ); *io_handle = NULL; return( -1 ); } ( *io_handle )->executable_type = LIBEXE_EXECUTABLE_TYPE_MZ; ( *io_handle )->ascii_codepage = LIBEXE_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 libexe_io_handle_free( libexe_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libexe_io_handle_free"; int result = 1; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( *io_handle != NULL ) { if( libexe_io_handle_clear( *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; } memory_free( *io_handle ); *io_handle = NULL; } return( result ); } /* Clears the IO handle * Returns 1 if successful or -1 on error */ int libexe_io_handle_clear( libexe_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libexe_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( libexe_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->executable_type = LIBEXE_EXECUTABLE_TYPE_MZ; io_handle->ascii_codepage = LIBEXE_CODEPAGE_WINDOWS_1252; return( 1 ); } /* Reads the file header * Returns 1 if successful or -1 on error */ int libexe_io_handle_read_file_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint16_t *number_of_sections, libcerror_error_t **error ) { static char *function = "libexe_io_handle_read_file_header"; uint32_t extended_header_offset = 0; if( libexe_io_handle_read_mz_header( io_handle, file_io_handle, &extended_header_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read MZ header.", function ); return( -1 ); } /* TODO check if value is sane */ if( extended_header_offset != 0 ) { /* TODO print data between current offset and extended_header_offset */ if( libexe_io_handle_read_extended_header( io_handle, file_io_handle, extended_header_offset, number_of_sections, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read extended header.", function ); return( -1 ); } } return( 1 ); } /* Reads the MZ header * Returns 1 if successful or -1 on error */ int libexe_io_handle_read_mz_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t *extended_header_offset, libcerror_error_t **error ) { exe_mz_header_t mz_header; static char *function = "libexe_io_handle_read_mz_header"; ssize_t read_count = 0; uint16_t number_of_relocation_entries = 0; uint16_t relocation_table_offset = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; uint16_t value_16bit = 0; #endif if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( extended_header_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid extended header offset.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading MZ header at offset: 0 (0x00000000)\n", function ); } #endif if( libbfio_handle_seek_offset( file_io_handle, 0, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek MZ header offset: 0.", function ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, (uint8_t *) &mz_header, sizeof( exe_mz_header_t ), error ); if( read_count != (ssize_t) sizeof( exe_mz_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read MZ header.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: MZ header:\n", function ); libcnotify_print_data( (uint8_t *) &mz_header, sizeof( exe_mz_header_t ), 0 ); } #endif if( memory_compare( mz_header.signature, exe_mz_signature, 2 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid signature.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( mz_header.number_of_relocation_entries, number_of_relocation_entries ); byte_stream_copy_to_uint16_little_endian( mz_header.relocation_table_offset, relocation_table_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c\n", function, mz_header.signature[ 0 ], mz_header.signature[ 1 ] ); byte_stream_copy_to_uint16_little_endian( mz_header.last_page_size, value_16bit ); libcnotify_printf( "%s: last page size\t\t\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( mz_header.number_of_pages, value_16bit ); libcnotify_printf( "%s: number of pages\t\t\t: %" PRIu16 "\n", function, value_16bit ); libcnotify_printf( "%s: number of relocation entries\t\t: %" PRIu16 "\n", function, number_of_relocation_entries ); byte_stream_copy_to_uint16_little_endian( mz_header.number_of_header_paragraphs, value_16bit ); libcnotify_printf( "%s: number of header paragraphs\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( mz_header.minimum_allocated_paragraphs, value_16bit ); libcnotify_printf( "%s: minimum allocated paragraphs\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( mz_header.maximum_allocated_paragraphs, value_16bit ); libcnotify_printf( "%s: maximum allocated paragraphs\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( mz_header.initial_stack_segment, value_16bit ); libcnotify_printf( "%s: initial stack segment\t\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( mz_header.initial_stack_pointer, value_16bit ); libcnotify_printf( "%s: initial stack pointer\t\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( mz_header.checksum, value_16bit ); libcnotify_printf( "%s: checksum\t\t\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); byte_stream_copy_to_uint32_little_endian( mz_header.entry_point, value_32bit ); libcnotify_printf( "%s: entry point\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: relocation table offset\t\t: 0x%04" PRIx16 "\n", function, relocation_table_offset ); byte_stream_copy_to_uint16_little_endian( mz_header.overlay_number, value_16bit ); libcnotify_printf( "%s: overlay number\t\t\t\t: %" PRIu16 "\n", function, value_16bit ); libcnotify_printf( "\n" ); } #endif if( relocation_table_offset >= 0x40 ) { /* TODO read data */ byte_stream_copy_to_uint32_little_endian( mz_header.extended_header_offset, *extended_header_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unknown1:\n", function ); libcnotify_print_data( mz_header.unknown1, 32, 0 ); libcnotify_printf( "%s: extended header offset\t\t\t: 0x%08" PRIx32 "\n", function, *extended_header_offset ); libcnotify_printf( "%s: unknown2:\n", function ); libcnotify_print_data( mz_header.unknown2, 112, 0 ); } #endif } /* TODO print data between realloc and current offset */ if( number_of_relocation_entries > 0 ) { /* TODO print relation table entries */ } return( 1 ); } /* Reads the extended header * Returns 1 if successful or -1 on error */ int libexe_io_handle_read_extended_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t extended_header_offset, uint16_t *number_of_sections, libcerror_error_t **error ) { uint8_t extended_header_data[ 2 ]; static char *function = "libexe_io_handle_read_extended_header"; ssize_t read_count = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading extended header at offset: %" PRIu32 " (0x%08" PRIx32 ")\n", function, extended_header_offset, extended_header_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, (off64_t) extended_header_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek extended header offset: %" PRIu32 ".", function, extended_header_offset ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, extended_header_data, 2, error ); if( read_count != 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read first 2 bytes of extended header.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: extended header data:\n", function ); libcnotify_print_data( extended_header_data, 2, 0 ); } #endif /* TODO pass extended header, so it is read once */ if( ( extended_header_data[ 0 ] == (uint8_t) 'L' ) && ( extended_header_data[ 1 ] == (uint8_t) 'E' ) ) { if( libexe_io_handle_read_le_header( io_handle, file_io_handle, extended_header_offset, number_of_sections, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read LE header.", function ); return( -1 ); } } else if( ( extended_header_data[ 0 ] == (uint8_t) 'N' ) && ( extended_header_data[ 1 ] == (uint8_t) 'E' ) ) { if( libexe_io_handle_read_ne_header( io_handle, file_io_handle, extended_header_offset, number_of_sections, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read NE header.", function ); return( -1 ); } } else if( ( extended_header_data[ 0 ] == (uint8_t) 'P' ) && ( extended_header_data[ 1 ] == (uint8_t) 'E' ) ) { if( libexe_io_handle_read_pe_header( io_handle, file_io_handle, extended_header_offset, number_of_sections, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read PE/COFF header.", function ); return( -1 ); } } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported extended header.", function ); return( -1 ); } return( 1 ); } /* Reads the LE header * Returns 1 if successful or -1 on error */ int libexe_io_handle_read_le_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t le_header_offset, uint16_t *number_of_sections, libcerror_error_t **error ) { exe_le_header_t le_header; static char *function = "libexe_io_handle_read_le_header"; ssize_t read_count = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( number_of_sections == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of sections.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading LE header at offset: %" PRIu32 " (0x%08" PRIx32 ")\n", function, le_header_offset, le_header_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, (off64_t) le_header_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek LE header offset: %" PRIu32 ".", function, le_header_offset ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, (uint8_t *) &le_header, sizeof( exe_le_header_t ), error ); if( read_count != (ssize_t) sizeof( exe_le_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read LE header.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: LE header:\n", function ); libcnotify_print_data( (uint8_t *) &le_header, sizeof( exe_le_header_t ), 0 ); } #endif if( memory_compare( le_header.signature, exe_le_signature, 2 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid signature.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c\n", function, le_header.signature[ 0 ], le_header.signature[ 1 ] ); libcnotify_printf( "\n" ); } #endif /* TODO */ io_handle->executable_type = LIBEXE_EXECUTABLE_TYPE_LE; *number_of_sections = 0; return( 1 ); } /* Reads the NE header * Returns 1 if successful or -1 on error */ int libexe_io_handle_read_ne_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t ne_header_offset, uint16_t *number_of_sections, libcerror_error_t **error ) { exe_ne_header_t ne_header; static char *function = "libexe_io_handle_read_ne_header"; ssize_t read_count = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( number_of_sections == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of sections.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading NE header at offset: %" PRIu32 " (0x%08" PRIx32 ")\n", function, ne_header_offset, ne_header_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, (off64_t) ne_header_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek NE header offset: %" PRIu32 ".", function, ne_header_offset ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, (uint8_t *) &ne_header, sizeof( exe_ne_header_t ), error ); if( read_count != (ssize_t) sizeof( exe_ne_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read NE header.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: NE header:\n", function ); libcnotify_print_data( (uint8_t *) &ne_header, sizeof( exe_ne_header_t ), 0 ); } #endif if( memory_compare( ne_header.signature, exe_ne_signature, 2 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid signature.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c\n", function, ne_header.signature[ 0 ], ne_header.signature[ 1 ] ); libcnotify_printf( "\n" ); } #endif /* TODO */ io_handle->executable_type = LIBEXE_EXECUTABLE_TYPE_NE; *number_of_sections = 0; return( 1 ); } /* Reads the PE/COFF header * Returns 1 if successful or -1 on error */ int libexe_io_handle_read_pe_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t pe_header_offset, uint16_t *number_of_sections, libcerror_error_t **error ) { exe_pe_header_t pe_header; static char *function = "libexe_io_handle_read_pe_header"; ssize_t read_count = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading PE header at offset: %" PRIu32 " (0x%08" PRIx32 ")\n", function, pe_header_offset, pe_header_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, (off64_t) pe_header_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek PE header offset: %" PRIu32 ".", function, pe_header_offset ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, (uint8_t *) &pe_header, sizeof( exe_pe_header_t ), error ); if( read_count != (ssize_t) sizeof( exe_pe_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read PE header.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: PE header:\n", function ); libcnotify_print_data( (uint8_t *) &pe_header, sizeof( exe_pe_header_t ), 0 ); } #endif if( memory_compare( pe_header.signature, exe_pe_signature, 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid signature.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c\\x%" PRIx8 "\\x%" PRIx8 "\n", function, pe_header.signature[ 0 ], pe_header.signature[ 1 ], pe_header.signature[ 2 ], pe_header.signature[ 3 ] ); libcnotify_printf( "\n" ); } #endif if( libexe_io_handle_read_coff_header( io_handle, file_io_handle, number_of_sections, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read COFF header.", function ); return( -1 ); } io_handle->executable_type = LIBEXE_EXECUTABLE_TYPE_PE_COFF; return( 1 ); } /* Reads the COFF header * Returns 1 if successful or -1 on error */ int libexe_io_handle_read_coff_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint16_t *number_of_sections, libcerror_error_t **error ) { exe_coff_header_t coff_header; static char *function = "libexe_io_handle_read_coff_header"; ssize_t read_count = 0; uint16_t optional_header_size = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t posix_time_string[ 32 ]; libfdatetime_posix_time_t *posix_time = NULL; uint32_t value_32bit = 0; uint16_t value_16bit = 0; int result = 0; #endif if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( number_of_sections == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of sections.", function ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, (uint8_t *) &coff_header, sizeof( exe_coff_header_t ), error ); if( read_count != (ssize_t) sizeof( exe_coff_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read COFF header.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: COFF header:\n", function ); libcnotify_print_data( (uint8_t *) &coff_header, sizeof( exe_coff_header_t ), 0 ); } #endif byte_stream_copy_to_uint16_little_endian( coff_header.number_of_sections, *number_of_sections ); byte_stream_copy_to_uint32_little_endian( coff_header.creation_time, io_handle->creation_time ); byte_stream_copy_to_uint16_little_endian( coff_header.optional_header_size, optional_header_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint16_little_endian( coff_header.target_architecture_type, value_16bit ); libcnotify_printf( "%s: target architecture type\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); libcnotify_printf( "%s: number of sections\t\t\t: %" PRIu16 "\n", function, *number_of_sections ); if( libfdatetime_posix_time_initialize( &posix_time, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create POSIX time.", function ); goto on_error; } if( libfdatetime_posix_time_copy_from_byte_stream( posix_time, coff_header.creation_time, 4, LIBFDATETIME_ENDIAN_LITTLE, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED, 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 ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfdatetime_posix_time_copy_to_utf16_string( posix_time, (uint16_t *) posix_time_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, error ); #else result = libfdatetime_posix_time_copy_to_utf8_string( posix_time, (uint8_t *) posix_time_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy POSIX time to string.", function ); goto on_error; } libcnotify_printf( "%s: creation time\t\t\t: %" PRIs_SYSTEM " UTC\n", function, posix_time_string ); if( libfdatetime_posix_time_free( &posix_time, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free POSIX time.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( coff_header.symbol_table_offset, value_32bit ); libcnotify_printf( "%s: symbol table offset\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( coff_header.number_of_symbols, value_32bit ); libcnotify_printf( "%s: number of symbols\t\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "%s: optional header size\t\t\t: %" PRIu16 "\n", function, optional_header_size ); byte_stream_copy_to_uint16_little_endian( coff_header.characteristic_flags, value_16bit ); libcnotify_printf( "%s: characteristic flags\t\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); libexe_debug_print_file_characteristic_flags( value_16bit ); libcnotify_printf( "\n" ); } #endif if( libexe_io_handle_read_coff_optional_header( io_handle, file_io_handle, optional_header_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read COFF optional header.", function ); goto on_error; } return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( posix_time != NULL ) { libfdatetime_posix_time_free( &posix_time, NULL ); } #endif return( -1 ); } /* Reads the COFF optional header * Returns 1 if successful or -1 on error */ int libexe_io_handle_read_coff_optional_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint16_t optional_header_size, libcerror_error_t **error ) { libexe_data_directory_descriptor_t *data_directory_descriptor = NULL; uint8_t *coff_optional_header = NULL; uint8_t *coff_optional_header_data = NULL; static char *function = "libexe_io_handle_read_coff_optional_header"; ssize_t read_count = 0; uint32_t number_of_data_directories_entries = 0; uint16_t signature = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint64_t value_64bit = 0; uint32_t value_32bit = 0; uint16_t value_16bit = 0; #endif if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } coff_optional_header = (uint8_t *) memory_allocate( sizeof( uint8_t ) * optional_header_size ); if( coff_optional_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create COFF optional header.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, coff_optional_header, (size_t) optional_header_size, error ); if( read_count != (ssize_t) optional_header_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read COFF optional header.", function ); goto on_error; } coff_optional_header_data = coff_optional_header; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: COFF optional header:\n", function ); libcnotify_print_data( coff_optional_header_data, (size_t) optional_header_size, 0 ); } #endif byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_t *) coff_optional_header_data )->signature, signature ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: 0x%04" PRIx16 "\n", function, signature ); libcnotify_printf( "%s: major linker version\t\t: %" PRIu8 "\n", function, ( (exe_coff_optional_header_t *) coff_optional_header_data )->major_linker_version ); libcnotify_printf( "%s: minor linker version\t\t: %" PRIu8 "\n", function, ( (exe_coff_optional_header_t *) coff_optional_header_data )->minor_linker_version ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_t *) coff_optional_header_data )->text_section_size, value_32bit ); libcnotify_printf( "%s: text section size\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_t *) coff_optional_header_data )->initialized_data_section_size, value_32bit ); libcnotify_printf( "%s: initialized data section size\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_t *) coff_optional_header_data )->uninitialized_data_section_size, value_32bit ); libcnotify_printf( "%s: uninitialized data section size\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_t *) coff_optional_header_data )->entry_point_offset, value_32bit ); libcnotify_printf( "%s: entry point offset\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_t *) coff_optional_header_data )->code_base_offset, value_32bit ); libcnotify_printf( "%s: code base offset\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); if( signature == LIBEXE_COFF_OPTIONAL_HEADER_SIGNATURE_PE32 ) { byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_t *) coff_optional_header_data )->data_base_offset, value_32bit ); libcnotify_printf( "%s: data base offset\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); } libcnotify_printf( "\n" ); } #endif if( ( signature != LIBEXE_COFF_OPTIONAL_HEADER_SIGNATURE_PE32 ) && ( signature != LIBEXE_COFF_OPTIONAL_HEADER_SIGNATURE_PE32_PLUS ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported signature.", function ); goto on_error; } coff_optional_header_data += sizeof( exe_coff_optional_header_t ); if( signature == LIBEXE_COFF_OPTIONAL_HEADER_SIGNATURE_PE32 ) { byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->number_of_data_directories_entries, number_of_data_directories_entries ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->image_base_offset, value_32bit ); libcnotify_printf( "%s: image base offset\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->section_alignment_size, value_32bit ); libcnotify_printf( "%s: section alignment size\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->file_alignment_size, value_32bit ); libcnotify_printf( "%s: file alignment size\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->major_operating_system_version, value_16bit ); libcnotify_printf( "%s: major operating system version\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->minor_operating_system_version, value_16bit ); libcnotify_printf( "%s: minor operating system version\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->major_image_version, value_16bit ); libcnotify_printf( "%s: major image version\t\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->minor_image_version, value_16bit ); libcnotify_printf( "%s: minor image version\t\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->major_subsystem_version, value_16bit ); libcnotify_printf( "%s: major subsystem version\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->minor_subsystem_version, value_16bit ); libcnotify_printf( "%s: minor subsystem version\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->unknown1, value_32bit ); libcnotify_printf( "%s: unknown1\t\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->image_size, value_32bit ); libcnotify_printf( "%s: image size\t\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->headers_size, value_32bit ); libcnotify_printf( "%s: headers size\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->checksum, value_32bit ); libcnotify_printf( "%s: checksum\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->subsystem, value_16bit ); libcnotify_printf( "%s: subsystem\t\t\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->dll_characteristic_flags, value_16bit ); libcnotify_printf( "%s: DLL characteristic flags\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); libexe_debug_print_dll_characteristic_flags( value_16bit ); libcnotify_printf( "\n" ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->stack_reservation_size, value_32bit ); libcnotify_printf( "%s: stack reservation size\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->stack_commit_size, value_32bit ); libcnotify_printf( "%s: stack commit size\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->heap_reservation_size, value_32bit ); libcnotify_printf( "%s: heap reservation size\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->heap_commit_size, value_32bit ); libcnotify_printf( "%s: heap commit size\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_t *) coff_optional_header_data )->unknown2, value_32bit ); libcnotify_printf( "%s: unknown2\t\t\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "%s: number of data directory entries\t: %" PRIu32 "\n", function, number_of_data_directories_entries ); } #endif coff_optional_header_data += sizeof( exe_coff_optional_header_pe32_t ); } else if( signature == LIBEXE_COFF_OPTIONAL_HEADER_SIGNATURE_PE32 ) { byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->number_of_data_directories_entries, number_of_data_directories_entries ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint64_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->image_base_offset, value_64bit ); libcnotify_printf( "%s: image base offset\t\t\t: 0x%08" PRIx64 "\n", function, value_64bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->section_alignment_size, value_32bit ); libcnotify_printf( "%s: section alignment size\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->file_alignment_size, value_32bit ); libcnotify_printf( "%s: file alignment size\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->major_operating_system_version, value_16bit ); libcnotify_printf( "%s: major operating system version\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->minor_operating_system_version, value_16bit ); libcnotify_printf( "%s: minor operating system version\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->major_image_version, value_16bit ); libcnotify_printf( "%s: major image version\t\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->minor_image_version, value_16bit ); libcnotify_printf( "%s: minor image version\t\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->major_subsystem_version, value_16bit ); libcnotify_printf( "%s: major subsystem version\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->minor_subsystem_version, value_16bit ); libcnotify_printf( "%s: minor subsystem version\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->unknown1, value_32bit ); libcnotify_printf( "%s: unknown1\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->image_size, value_32bit ); libcnotify_printf( "%s: image size\t\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->headers_size, value_32bit ); libcnotify_printf( "%s: headers size\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->checksum, value_32bit ); libcnotify_printf( "%s: checksum\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->subsystem, value_16bit ); libcnotify_printf( "%s: subsystem\t\t\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->dll_characteristic_flags, value_16bit ); libcnotify_printf( "%s: DLL characteristic flags\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); libexe_debug_print_dll_characteristic_flags( value_16bit ); libcnotify_printf( "\n" ); byte_stream_copy_to_uint64_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->stack_reservation_size, value_64bit ); libcnotify_printf( "%s: stack reservation size\t\t: %" PRIu64 "\n", function, value_64bit ); byte_stream_copy_to_uint64_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->stack_commit_size, value_64bit ); libcnotify_printf( "%s: stack commit size\t\t\t: %" PRIu64 "\n", function, value_64bit ); byte_stream_copy_to_uint64_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->heap_reservation_size, value_64bit ); libcnotify_printf( "%s: heap reservation size\t\t: %" PRIu64 "\n", function, value_64bit ); byte_stream_copy_to_uint64_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->heap_commit_size, value_64bit ); libcnotify_printf( "%s: heap commit size\t\t\t: %" PRIu64 "\n", function, value_64bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_pe32_plus_t *) coff_optional_header_data )->unknown2, value_32bit ); libcnotify_printf( "%s: unknown2\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: number of data directory entries\t: %" PRIu32 "\n", function, number_of_data_directories_entries ); } #endif coff_optional_header_data += sizeof( exe_coff_optional_header_pe32_plus_t ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif if( number_of_data_directories_entries > 16 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported number of data directory entries: %" PRIu32 ".", function, number_of_data_directories_entries ); goto on_error; } if( number_of_data_directories_entries > 0 ) { data_directory_descriptor = &( io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_EXPORT_TABLE ] ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->export_table_rva, data_directory_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->export_table_size, data_directory_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: export table RVA\t\t\t: 0x%08" PRIx32 "\n", function, data_directory_descriptor->virtual_address ); libcnotify_printf( "%s: export table size\t\t\t: %" PRIu32 "\n", function, data_directory_descriptor->size ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { data_directory_descriptor = &( io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_IMPORT_TABLE ] ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->import_table_rva, data_directory_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->import_table_size, data_directory_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: import table RVA\t\t\t: 0x%08" PRIx32 "\n", function, data_directory_descriptor->virtual_address ); libcnotify_printf( "%s: import table size\t\t\t: %" PRIu32 "\n", function, data_directory_descriptor->size ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { data_directory_descriptor = &( io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_RESOURCE_TABLE ] ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->resource_table_rva, data_directory_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->resource_table_size, data_directory_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: resource table RVA\t\t\t: 0x%08" PRIx32 "\n", function, data_directory_descriptor->virtual_address ); libcnotify_printf( "%s: resource table size\t\t\t: %" PRIu32 "\n", function, data_directory_descriptor->size ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { data_directory_descriptor = &( io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_EXCEPTION_TABLE ] ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->exception_table_rva, data_directory_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->exception_table_size, data_directory_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: exception table RVA\t\t\t: 0x%08" PRIx32 "\n", function, data_directory_descriptor->virtual_address ); libcnotify_printf( "%s: exception table size\t\t: %" PRIu32 "\n", function, data_directory_descriptor->size ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { data_directory_descriptor = &( io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_CERTIFICATE_TABLE ] ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->certificate_table_rva, data_directory_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->certificate_table_size, data_directory_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: certificate table RVA\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: certificate table size\t\t: %" PRIu32 "\n", function, value_32bit ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { data_directory_descriptor = &( io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_BASE_RELOCATION_TABLE ] ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->base_relocation_table_rva, data_directory_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->base_relocation_table_size, data_directory_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: base relocation table RVA\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: base relocation table size\t\t: %" PRIu32 "\n", function, value_32bit ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { data_directory_descriptor = &( io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_DEBUG_DATA ] ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->debug_data_rva, data_directory_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->debug_data_size, data_directory_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: debug data RVA\t\t\t: 0x%08" PRIx32 "\n", function, data_directory_descriptor->virtual_address ); libcnotify_printf( "%s: debug data size\t\t\t: %" PRIu32 "\n", function, data_directory_descriptor->size ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->architecture_specific_data_rva, value_32bit ); libcnotify_printf( "%s: architecture-specific data RVA\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->architecture_specific_data_size, value_32bit ); libcnotify_printf( "%s: architecture-specific data size\t: %" PRIu32 "\n", function, value_32bit ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->global_pointer_register, value_32bit ); libcnotify_printf( "%s: global pointer register\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->unknown3, value_32bit ); libcnotify_printf( "%s: unknown3\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { data_directory_descriptor = &( io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_THREAD_LOCAL_STORAGE_TABLE ] ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->thread_local_storage_table_rva, data_directory_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->thread_local_storage_table_size, data_directory_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: thread local storage table RVA\t: 0x%08" PRIx32 "\n", function, data_directory_descriptor->virtual_address ); libcnotify_printf( "%s: thread local storage table size\t: %" PRIu32 "\n", function, data_directory_descriptor->size ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { data_directory_descriptor = &( io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_LOAD_CONFIGURATION_TABLE ] ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->load_configuration_table_rva, data_directory_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->load_configuration_table_size, data_directory_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: load configuration table RVA\t: 0x%08" PRIx32 "\n", function, data_directory_descriptor->virtual_address ); libcnotify_printf( "%s: load configuration table size\t: %" PRIu32 "\n", function, data_directory_descriptor->size ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { data_directory_descriptor = &( io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_IMPORT_ADDRESS_TABLE ] ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->import_address_table_rva, data_directory_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->import_address_table_size, data_directory_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: import address table RVA\t\t: 0x%08" PRIx32 "\n", function, data_directory_descriptor->virtual_address ); libcnotify_printf( "%s: import address table size\t\t: %" PRIu32 "\n", function, data_directory_descriptor->size ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { data_directory_descriptor = &( io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_DELAY_IMPORT_DESCRIPTOR ] ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->delay_import_descriptor_rva, data_directory_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->delay_import_descriptor_size, data_directory_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: delay import descriptor RVA\t\t: 0x%08" PRIx32 "\n", function, data_directory_descriptor->virtual_address ); libcnotify_printf( "%s: delay import descriptor size\t: %" PRIu32 "\n", function, data_directory_descriptor->size ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { data_directory_descriptor = &( io_handle->data_directories[ LIBEXE_DATA_DIRECTORY_COM_PLUS_RUNTIME_HEADER ] ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->com_plus_runtime_header_rva, data_directory_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->com_plus_runtime_header_size, data_directory_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: COM+ runtime header RVA\t\t: 0x%08" PRIx32 "\n", function, data_directory_descriptor->virtual_address ); libcnotify_printf( "%s: COM+ runtime header size\t\t: 0x%08" PRIx32 "\n", function, data_directory_descriptor->size ); } #endif number_of_data_directories_entries--; } if( number_of_data_directories_entries > 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint64_little_endian( ( (exe_coff_optional_header_data_directories_t *) coff_optional_header_data )->unknown4, value_64bit ); libcnotify_printf( "%s: unknown4\t\t\t\t: 0x%08" PRIx64 "\n", function, value_64bit ); libcnotify_printf( "\n" ); } #endif number_of_data_directories_entries--; } memory_free( coff_optional_header ); return( 1 ); on_error: if( coff_optional_header != NULL ) { memory_free( coff_optional_header ); } return( -1 ); } /* Reads the section table * Returns 1 if successful or -1 on error */ int libexe_io_handle_read_section_table( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint16_t number_of_sections, libcdata_array_t *sections_array, libcerror_error_t **error ) { libexe_section_descriptor_t *section_descriptor = NULL; uint8_t *section_table = NULL; uint8_t *section_table_data = NULL; static char *function = "libexe_io_handle_read_section_table"; size_t section_table_size = 0; ssize_t read_count = 0; uint32_t section_data_offset = 0; uint32_t section_data_size = 0; uint16_t section_index = 0; int entry_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; uint16_t value_16bit = 0; #endif if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } section_table_size = sizeof( exe_section_table_entry_t ) * number_of_sections; if( section_table_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid section table size value out of bounds.", function ); return( -1 ); } section_table = (uint8_t *) memory_allocate( sizeof( uint8_t ) * section_table_size ); if( section_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create section table.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, section_table, section_table_size, error ); if( read_count != (ssize_t) section_table_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read section table.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: section table data:\n", function ); libcnotify_print_data( section_table, section_table_size, 0 ); } #endif section_table_data = section_table; while( section_table_size >= sizeof( exe_section_table_entry_t ) ) { if( libexe_section_descriptor_initialize( §ion_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create section descriptor.", function ); goto on_error; } if( memory_copy( section_descriptor->name, ( (exe_section_table_entry_t *) section_table_data )->name, 8 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy name.", function ); goto on_error; } section_descriptor->name[ 8 ] = 0; section_descriptor->name_size = narrow_string_length( section_descriptor->name ); if( section_descriptor->name_size > 0 ) { section_descriptor->name_size += 1; } byte_stream_copy_to_uint32_little_endian( ( (exe_section_table_entry_t *) section_table_data )->virtual_address, section_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( ( (exe_section_table_entry_t *) section_table_data )->data_size, section_data_size ); byte_stream_copy_to_uint32_little_endian( ( (exe_section_table_entry_t *) section_table_data )->data_offset, section_data_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: entry: %02" PRIu16 " name\t\t\t\t: %s\n", function, section_index, section_descriptor->name ); byte_stream_copy_to_uint32_little_endian( ( (exe_section_table_entry_t *) section_table_data )->virtual_size, value_32bit ); libcnotify_printf( "%s: entry: %02" PRIu16 " virtual size\t\t\t: %" PRIu32 "\n", function, section_index, value_32bit ); libcnotify_printf( "%s: entry: %02" PRIu16 " virtual address\t\t\t: 0x%08" PRIx32 "\n", function, section_index, section_descriptor->virtual_address ); libcnotify_printf( "%s: entry: %02" PRIu16 " data size\t\t\t: %" PRIu32 "\n", function, section_index, section_data_size ); libcnotify_printf( "%s: entry: %02" PRIu16 " data offset\t\t\t: 0x%08" PRIx32 "\n", function, section_index, section_data_offset ); byte_stream_copy_to_uint32_little_endian( ( (exe_section_table_entry_t *) section_table_data )->relocations_offset, value_32bit ); libcnotify_printf( "%s: entry: %02" PRIu16 " relocations offset\t\t: 0x%08" PRIx32 "\n", function, section_index, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_section_table_entry_t *) section_table_data )->line_numbers_offset, value_32bit ); libcnotify_printf( "%s: entry: %02" PRIu16 " line numbers offset\t\t: 0x%08" PRIx32 "\n", function, section_index, value_32bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_section_table_entry_t *) section_table_data )->relocations_offset, value_16bit ); libcnotify_printf( "%s: entry: %02" PRIu16 " number of relocations\t\t: %" PRIu16 "\n", function, section_index, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (exe_section_table_entry_t *) section_table_data )->line_numbers_offset, value_16bit ); libcnotify_printf( "%s: entry: %02" PRIu16 " number of line numbers\t\t: %" PRIu16 "\n", function, section_index, value_16bit ); byte_stream_copy_to_uint32_little_endian( ( (exe_section_table_entry_t *) section_table_data )->section_characteristic_flags, value_32bit ); libcnotify_printf( "%s: entry: %02" PRIu16 " section characteristic flags\t: 0x%08" PRIx32 "\n", function, section_index, value_32bit ); libexe_debug_print_section_characteristic_flags( value_32bit ); libcnotify_printf( "\n" ); } #endif section_table_data += sizeof( exe_section_table_entry_t ); section_table_size -= sizeof( exe_section_table_entry_t ); if( libexe_section_descriptor_set_data_range( section_descriptor, (off64_t) section_data_offset, (size64_t) section_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range in section descriptor.", function ); goto on_error; } if( libcdata_array_append_entry( sections_array, &entry_index, (intptr_t *) section_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append section descriptor to sections array.", function ); goto on_error; } section_descriptor = NULL; section_index++; } memory_free( section_table ); return( 1 ); on_error: if( section_descriptor != NULL ) { libexe_section_descriptor_free( §ion_descriptor, NULL ); } if( section_table != NULL ) { memory_free( section_table ); } return( -1 ); } /* Reads the segment data into the buffer * Callback function for the section stream * Returns the number of bytes read or -1 on error */ ssize_t libexe_io_handle_read_segment_data( intptr_t *data_handle LIBEXE_ATTRIBUTE_UNUSED, libbfio_handle_t *file_io_handle, int segment_index LIBEXE_ATTRIBUTE_UNUSED, int segment_file_index LIBEXE_ATTRIBUTE_UNUSED, uint8_t *segment_data, size_t segment_data_size, uint32_t segment_flags LIBEXE_ATTRIBUTE_UNUSED, uint8_t read_flags LIBEXE_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { static char *function = "libexe_io_handle_read_segment_data"; ssize_t read_count = 0; LIBEXE_UNREFERENCED_PARAMETER( data_handle ) LIBEXE_UNREFERENCED_PARAMETER( segment_index ) LIBEXE_UNREFERENCED_PARAMETER( segment_file_index ) LIBEXE_UNREFERENCED_PARAMETER( segment_flags ) LIBEXE_UNREFERENCED_PARAMETER( read_flags ) read_count = libbfio_handle_read_buffer( file_io_handle, segment_data, segment_data_size, error ); if( read_count != (ssize_t) segment_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read segment data.", function ); return( -1 ); } return( read_count ); } /* Seeks a certain segment offset * Callback function for the section stream * Returns the offset or -1 on error */ off64_t libexe_io_handle_seek_segment_offset( intptr_t *data_handle LIBEXE_ATTRIBUTE_UNUSED, libbfio_handle_t *file_io_handle, int segment_index LIBEXE_ATTRIBUTE_UNUSED, int segment_file_index LIBEXE_ATTRIBUTE_UNUSED, off64_t segment_offset, libcerror_error_t **error ) { static char *function = "libexe_io_handle_seek_segment_offset"; LIBEXE_UNREFERENCED_PARAMETER( data_handle ) LIBEXE_UNREFERENCED_PARAMETER( segment_index ) LIBEXE_UNREFERENCED_PARAMETER( segment_file_index ) segment_offset = libbfio_handle_seek_offset( file_io_handle, segment_offset, SEEK_SET, error ); if( segment_offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to seek segment offset.", function ); return( -1 ); } return( segment_offset ); } libevt-20170120/libexe/libexe_debug_data.c0000664000175000017500000001247013012271501022354 0ustar00lordyestalordyesta00000000000000/* * Debug data functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libexe_debug_data.h" #include "libexe_libcerror.h" #include "libexe_libcnotify.h" #include "libexe_libfcache.h" #include "libexe_libfdata.h" /* Creates a debug data * Make sure the value debug_data is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libexe_debug_data_initialize( libexe_debug_data_t **debug_data, libcerror_error_t **error ) { static char *function = "libexe_debug_data_initialize"; if( debug_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid debug data.", function ); return( -1 ); } if( *debug_data != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid debug data value already set.", function ); return( -1 ); } *debug_data = memory_allocate_structure( libexe_debug_data_t ); if( *debug_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create debug data.", function ); goto on_error; } if( memory_set( *debug_data, 0, sizeof( libexe_debug_data_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear debug data.", function ); memory_free( *debug_data ); *debug_data = NULL; return( -1 ); } return( 1 ); on_error: if( *debug_data != NULL ) { memory_free( *debug_data ); *debug_data = NULL; } return( -1 ); } /* Frees a debug data * Returns 1 if successful or -1 on error */ int libexe_debug_data_free( libexe_debug_data_t **debug_data, libcerror_error_t **error ) { static char *function = "libexe_debug_data_free"; if( debug_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid debug data.", function ); return( -1 ); } if( *debug_data != NULL ) { memory_free( *debug_data ); *debug_data = NULL; } return( 1 ); } /* Reads the debug data * Returns 1 if successful or -1 on error */ int libexe_debug_data_read( libexe_debug_data_t *debug_data, libbfio_handle_t *file_io_handle, uint32_t file_offset, uint32_t size, libcerror_error_t **error ) { uint8_t *data = NULL; static char *function = "libexe_debug_data_read"; size_t read_count = 0; if( debug_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid debug data.", function ); return( -1 ); } #if SIZEOF_SIZE_T <= 4 if( size > (uint32_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 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading debug data at offset: %" PRIu32 " (0x%08" PRIx32 ")\n", function, file_offset, file_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, (off64_t) file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek debug data offset: %" PRIx32 ".", function, file_offset ); goto on_error; } data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * size ); if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create debug data.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, data, size, error ); if( read_count != (ssize_t) size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read debug data.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: debug data:\n", function ); libcnotify_print_data( data, (size_t) size, 0 ); } #endif /* TODO extract values */ memory_free( data ); return( 1 ); on_error: if( data != NULL ) { memory_free( data ); } return( -1 ); } libevt-20170120/libexe/libexe_section_io_handle.c0000664000175000017500000003331313012271501023742 0ustar00lordyestalordyesta00000000000000/* * Section IO handle functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libexe_definitions.h" #include "libexe_libbfio.h" #include "libexe_libcerror.h" #include "libexe_section.h" #include "libexe_section_io_handle.h" #include "libexe_types.h" /* Creates a section IO handle * Make sure the value io_handle is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libexe_section_io_handle_initialize( libexe_section_io_handle_t **io_handle, libexe_section_t *section, libcerror_error_t **error ) { static char *function = "libexe_section_io_handle_initialize"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( *io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid IO handle value already set.", function ); return( -1 ); } if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } *io_handle = memory_allocate_structure( libexe_section_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( libexe_section_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 )->section = section; return( 1 ); on_error: if( *io_handle != NULL ) { memory_free( *io_handle ); *io_handle = NULL; } return( -1 ); } /* Frees a section IO handle * Returns 1 if succesful or -1 on error */ int libexe_section_io_handle_free( libexe_section_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libexe_section_io_handle_free"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( *io_handle != NULL ) { /* The section reference is freed elsewhere */ memory_free( *io_handle ); *io_handle = NULL; } return( 1 ); } /* Clones (duplicates) the IO handle and its attributes * Returns 1 if succesful or -1 on error */ int libexe_section_io_handle_clone( libexe_section_io_handle_t **destination_io_handle, libexe_section_io_handle_t *source_io_handle, libcerror_error_t **error ) { static char *function = "libexe_section_io_handle_clone"; if( destination_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination IO handle.", function ); return( -1 ); } if( *destination_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination IO handle already set.", function ); return( -1 ); } if( source_io_handle == NULL ) { *destination_io_handle = NULL; return( 1 ); } if( libexe_section_io_handle_initialize( destination_io_handle, source_io_handle->section, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create IO handle.", function ); return( -1 ); } ( *destination_io_handle )->access_flags = source_io_handle->access_flags; return( 1 ); } /* Opens the IO handle * Returns 1 if successful or -1 on error */ int libexe_section_io_handle_open( libexe_section_io_handle_t *io_handle, int flags, libcerror_error_t **error ) { static char *function = "libexe_section_io_handle_open"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing section.", function ); return( -1 ); } if( io_handle->is_open != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: IO handle already open.", function ); return( -1 ); } if( ( flags & LIBBFIO_ACCESS_FLAG_READ ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } /* Currently only support for reading data */ if( ( flags & ~( LIBBFIO_ACCESS_FLAG_READ ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } io_handle->access_flags = flags; io_handle->is_open = 1; return( 1 ); } /* Closes the IO handle * Returns 0 if successful or -1 on error */ int libexe_section_io_handle_close( libexe_section_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libexe_section_io_handle_close"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing section.", function ); return( -1 ); } if( io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - not open.", function ); return( -1 ); } io_handle->is_open = 0; return( 0 ); } /* Reads a buffer from the IO handle * Returns the number of bytes read if successful, or -1 on error */ ssize_t libexe_section_io_handle_read( libexe_section_io_handle_t *io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libexe_section_io_handle_read"; ssize_t read_count = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing section.", function ); return( -1 ); } if( io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - not open.", function ); return( -1 ); } if( ( io_handle->access_flags & LIBBFIO_ACCESS_FLAG_READ ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - no read access.", function ); return( -1 ); } read_count = libexe_section_read_buffer( io_handle->section, buffer, size, error ); if( read_count <= -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read buffer from section.", function ); return( -1 ); } return( read_count ); } /* Writes a buffer to the IO handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t libexe_section_io_handle_write( libexe_section_io_handle_t *io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libexe_section_io_handle_write"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing section.", function ); return( -1 ); } if( io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - not open.", function ); return( -1 ); } if( ( io_handle->access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - no write access.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } return( 0 ); } /* Seeks a certain offset within the IO handle * Returns the offset if the seek is successful or -1 on error */ off64_t libexe_section_io_handle_seek_offset( libexe_section_io_handle_t *io_handle, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "libexe_section_io_handle_seek_offset"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing section.", function ); return( -1 ); } if( io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - not open.", function ); return( -1 ); } offset = libexe_section_seek_offset( io_handle->section, 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 section.", function ); return( -1 ); } return( offset ); } /* Function to determine if the attached file exists * Returns 1 if the attached file exists, 0 if not or -1 on error */ int libexe_section_io_handle_exists( libexe_section_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libexe_section_io_handle_exists"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->section == NULL ) { return( 0 ); } return( 1 ); } /* Check if the attached file is open * Returns 1 if open, 0 if not or -1 on error */ int libexe_section_io_handle_is_open( libexe_section_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libexe_section_io_handle_is_open"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing section.", function ); return( -1 ); } if( io_handle->is_open == 0 ) { return( 0 ); } return( 1 ); } /* Retrieves the attached file size * Returns 1 if successful or -1 on error */ int libexe_section_io_handle_get_size( libexe_section_io_handle_t *io_handle, size64_t *size, libcerror_error_t **error ) { static char *function = "libexe_section_io_handle_get_size"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( libexe_section_get_size( io_handle->section, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve section size.", function ); return( -1 ); } return( 1 ); } libevt-20170120/libexe/libexe_debug_data.h0000664000175000017500000000305513012271501022360 0ustar00lordyestalordyesta00000000000000/* * Debug data functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_DEBUG_DATA_H ) #define _LIBEXE_DEBUG_DATA_H #include #include #include "libexe_libbfio.h" #include "libexe_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libexe_debug_data libexe_debug_data_t; struct libexe_debug_data { /* Dummy */ int dummy; }; int libexe_debug_data_initialize( libexe_debug_data_t **debug_data, libcerror_error_t **error ); int libexe_debug_data_free( libexe_debug_data_t **debug_data, libcerror_error_t **error ); int libexe_debug_data_read( libexe_debug_data_t *debug_data, libbfio_handle_t *file_io_handle, uint32_t file_offset, uint32_t size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libexe/libexe_io_handle.h0000664000175000017500000001051413012271501022221 0ustar00lordyestalordyesta00000000000000/* * Input/Output (IO) handle functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_IO_HANDLE_H ) #define _LIBEXE_IO_HANDLE_H #include #include #include "libexe_data_directory_descriptor.h" #include "libexe_definitions.h" #include "libexe_libbfio.h" #include "libexe_libcdata.h" #include "libexe_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif extern const char *exe_mz_signature; typedef struct libexe_io_handle libexe_io_handle_t; struct libexe_io_handle { /* The executable type */ uint8_t executable_type; /* The creation time */ uint32_t creation_time; /* The data directory */ libexe_data_directory_descriptor_t data_directories[ LIBEXE_NUMBER_OF_DATA_DIRECTORIES ]; /* The codepage of the extended ASCII strings */ int ascii_codepage; /* Value to indicate if abort was signalled */ int abort; }; int libexe_io_handle_initialize( libexe_io_handle_t **io_handle, libcerror_error_t **error ); int libexe_io_handle_free( libexe_io_handle_t **io_handle, libcerror_error_t **error ); int libexe_io_handle_clear( libexe_io_handle_t *io_handle, libcerror_error_t **error ); int libexe_io_handle_read_file_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint16_t *number_of_sections, libcerror_error_t **error ); int libexe_io_handle_read_mz_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t *extended_header_offset, libcerror_error_t **error ); int libexe_io_handle_read_extended_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t extended_header_offset, uint16_t *number_of_sections, libcerror_error_t **error ); int libexe_io_handle_read_le_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t le_header_offset, uint16_t *number_of_sections, libcerror_error_t **error ); int libexe_io_handle_read_ne_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t ne_header_offset, uint16_t *number_of_sections, libcerror_error_t **error ); int libexe_io_handle_read_pe_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t pe_header_offset, uint16_t *number_of_sections, libcerror_error_t **error ); int libexe_io_handle_read_coff_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint16_t *number_of_sections, libcerror_error_t **error ); int libexe_io_handle_read_coff_optional_header( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint16_t optional_header_size, libcerror_error_t **error ); int libexe_io_handle_read_section_table( libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint16_t number_of_sections, libcdata_array_t *sections_array, libcerror_error_t **error ); ssize_t libexe_io_handle_read_segment_data( intptr_t *data_handle, libbfio_handle_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 ); off64_t libexe_io_handle_seek_segment_offset( intptr_t *data_handle, libbfio_handle_t *file_io_handle, int segment_index, int segment_file_index, off64_t segment_offset, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libexe/libexe_support.h0000664000175000017500000000364013012271501022015 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_SUPPORT_H ) #define _LIBEXE_SUPPORT_H #include #include #include "libexe_extern.h" #include "libexe_libbfio.h" #include "libexe_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBEXE ) LIBEXE_EXTERN \ const char *libexe_get_version( void ); LIBEXE_EXTERN \ int libexe_get_access_flags_read( void ); LIBEXE_EXTERN \ int libexe_get_codepage( int *codepage, libcerror_error_t **error ); LIBEXE_EXTERN \ int libexe_set_codepage( int codepage, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBEXE ) */ LIBEXE_EXTERN \ int libexe_check_file_signature( const char *filename, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBEXE_EXTERN \ int libexe_check_file_signature_wide( const wchar_t *filename, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ LIBEXE_EXTERN \ int libexe_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libexe/libexe_section.c0000664000175000017500000005762613012271501021755 0ustar00lordyestalordyesta00000000000000/* * Section functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libexe_definitions.h" #include "libexe_io_handle.h" #include "libexe_libbfio.h" #include "libexe_libcerror.h" #include "libexe_libfcache.h" #include "libexe_libfdata.h" #include "libexe_libuna.h" #include "libexe_section.h" #include "libexe_section_io_handle.h" /* Creates a section * Make sure the value section is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libexe_section_initialize( libexe_section_t **section, libexe_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libexe_section_descriptor_t *section_descriptor, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_initialize"; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } if( *section != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid section value already set.", function ); return( -1 ); } if( section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section descriptor.", function ); return( -1 ); } internal_section = memory_allocate_structure( libexe_internal_section_t ); if( internal_section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create internal section.", function ); goto on_error; } if( memory_set( internal_section, 0, sizeof( libexe_internal_section_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear internal section.", function ); memory_free( internal_section ); return( -1 ); } internal_section->file_io_handle = file_io_handle; internal_section->io_handle = io_handle; internal_section->section_descriptor = section_descriptor; *section = (libexe_section_t *) internal_section; return( 1 ); on_error: if( internal_section != NULL ) { memory_free( internal_section ); } return( -1 ); } /* Frees a section * Returns 1 if successful or -1 on error */ int libexe_section_free( libexe_section_t **section, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_free"; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } if( *section != NULL ) { internal_section = (libexe_internal_section_t *) *section; *section = NULL; /* The file_io_handle, io_handle and section_descriptor references are freed elsewhere */ memory_free( internal_section ); } return( 1 ); } /* Retrieves the size of the ASCII formatted name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libexe_section_get_name_size( libexe_section_t *section, size_t *name_size, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_get_name_size"; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } internal_section = (libexe_internal_section_t *) section; if( internal_section->section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing section descriptor.", function ); return( -1 ); } if( name_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name size.", function ); return( -1 ); } *name_size = internal_section->section_descriptor->name_size; return( 1 ); } /* Retrieves the ASCII formatted name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libexe_section_get_name( libexe_section_t *section, char *name, size_t name_size, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_get_name"; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } internal_section = (libexe_internal_section_t *) section; if( internal_section->section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing section descriptor.", function ); return( -1 ); } if( name_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid name size value exceeds maximum.", function ); return( -1 ); } if( ( name_size < 1 ) || ( name_size < internal_section->section_descriptor->name_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid name value too small.", function ); return( -1 ); } if( internal_section->section_descriptor->name_size == 0 ) { name[ 0 ] = 0; } else { if( memory_copy( name, internal_section->section_descriptor->name, internal_section->section_descriptor->name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy name.", function ); return( -1 ); } } return( 1 ); } /* Retrieves the size of the UTF-8 formatted name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libexe_section_get_utf8_name_size( libexe_section_t *section, size_t *utf8_string_size, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_get_utf8_name_size"; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } internal_section = (libexe_internal_section_t *) section; if( internal_section->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing IO handle.", function ); return( -1 ); } if( internal_section->section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing section descriptor.", function ); return( -1 ); } if( libuna_utf8_string_size_from_byte_stream( (uint8_t *) internal_section->section_descriptor->name, internal_section->section_descriptor->name_size, internal_section->io_handle->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 formatted name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libexe_section_get_utf8_name( libexe_section_t *section, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_get_utf8_name"; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } internal_section = (libexe_internal_section_t *) section; if( internal_section->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing IO handle.", function ); return( -1 ); } if( internal_section->section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing section descriptor.", function ); return( -1 ); } if( libuna_utf8_string_copy_from_byte_stream( utf8_string, utf8_string_size, (uint8_t *) internal_section->section_descriptor->name, internal_section->section_descriptor->name_size, internal_section->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy name to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 formatted name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libexe_section_get_utf16_name_size( libexe_section_t *section, size_t *utf16_string_size, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_get_utf16_name_size"; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } internal_section = (libexe_internal_section_t *) section; if( internal_section->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing IO handle.", function ); return( -1 ); } if( internal_section->section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing section descriptor.", function ); return( -1 ); } if( libuna_utf16_string_size_from_byte_stream( (uint8_t *) internal_section->section_descriptor->name, internal_section->section_descriptor->name_size, internal_section->io_handle->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 formatted name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libexe_section_get_utf16_name( libexe_section_t *section, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_get_utf16_name"; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } internal_section = (libexe_internal_section_t *) section; if( internal_section->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing IO handle.", function ); return( -1 ); } if( internal_section->section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing section descriptor.", function ); return( -1 ); } if( libuna_utf16_string_copy_from_byte_stream( utf16_string, utf16_string_size, (uint8_t *) internal_section->section_descriptor->name, internal_section->section_descriptor->name_size, internal_section->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy name to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Reads data at the current offset into a buffer * Returns the number of bytes read or -1 on error */ ssize_t libexe_section_read_buffer( libexe_section_t *section, void *buffer, size_t buffer_size, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_read_buffer"; ssize_t read_count = 0; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } internal_section = (libexe_internal_section_t *) section; if( internal_section->section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing section descriptor.", function ); return( -1 ); } read_count = libfdata_stream_read_buffer( internal_section->section_descriptor->data_stream, (intptr_t *) internal_section->file_io_handle, buffer, buffer_size, 0, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read buffer from section data stream.", function ); return( -1 ); } return( read_count ); } /* Reads data at a specific offset into a buffer * Returns the number of bytes read or -1 on error */ ssize_t libexe_section_read_buffer_at_offset( libexe_section_t *section, void *buffer, size_t buffer_size, off64_t offset, libcerror_error_t **error ) { static char *function = "libexe_section_read_buffer_at_offset"; ssize_t read_count = 0; if( libexe_section_seek_offset( section, 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 = libexe_section_read_buffer( section, buffer, 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 ); return( -1 ); } return( read_count ); } /* Seeks a certain offset of the data * Returns the offset if seek is successful or -1 on error */ off64_t libexe_section_seek_offset( libexe_section_t *section, off64_t offset, int whence, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_seek_offset"; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } internal_section = (libexe_internal_section_t *) section; if( internal_section->section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing section descriptor.", function ); return( -1 ); } offset = libfdata_stream_seek_offset( internal_section->section_descriptor->data_stream, offset, whence, error ); if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek in section data stream.", function ); return( -1 ); } return( offset ); } /* Retrieves the (current) offset * Returns 1 if successful or -1 on error */ int libexe_section_get_offset( libexe_section_t *section, off64_t *offset, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_get_offset"; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } internal_section = (libexe_internal_section_t *) section; if( internal_section->section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing section descriptor.", function ); return( -1 ); } if( libfdata_stream_get_offset( internal_section->section_descriptor->data_stream, offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve section data stream offset.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size * Returns 1 if successful or -1 on error */ int libexe_section_get_size( libexe_section_t *section, size64_t *size, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_get_size"; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } internal_section = (libexe_internal_section_t *) section; if( libexe_section_descriptor_get_data_size( internal_section->section_descriptor, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve section descriptor data size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the start offset * Returns 1 if successful or -1 on error */ int libexe_section_get_start_offset( libexe_section_t *section, off64_t *start_offset, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_get_start_offset"; size64_t segment_size = 0; uint32_t segment_flags = 0; int segment_file_index = 0; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } internal_section = (libexe_internal_section_t *) section; if( internal_section->section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing section descriptor.", function ); return( -1 ); } if( libfdata_stream_get_segment_by_index( internal_section->section_descriptor->data_stream, 0, &segment_file_index, start_offset, &segment_size, &segment_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve section data stream segment: 0.", function ); return( -1 ); } return( 1 ); } /* Retrieves the virtual address * Returns 1 if successful or -1 on error */ int libexe_section_get_virtual_address( libexe_section_t *section, uint32_t *virtual_address, libcerror_error_t **error ) { libexe_internal_section_t *internal_section = NULL; static char *function = "libexe_section_get_virtual_address"; if( section == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid section.", function ); return( -1 ); } internal_section = (libexe_internal_section_t *) section; if( internal_section->section_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid section - missing section descriptor.", function ); return( -1 ); } if( virtual_address == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid virtual address.", function ); return( -1 ); } *virtual_address = internal_section->section_descriptor->virtual_address; return( 1 ); } /* Retrieves the section data file IO handle * Returns 1 if successful -1 on error */ int libexe_section_get_data_file_io_handle( libexe_section_t *section, libbfio_handle_t **file_io_handle, libcerror_error_t **error ) { libexe_section_io_handle_t *io_handle = NULL; static char *function = "libexe_section_get_data_file_io_handle"; if( libexe_section_io_handle_initialize( &io_handle, section, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create section file IO handle.", function ); goto on_error; } if( libbfio_handle_initialize( file_io_handle, (intptr_t *) io_handle, (int (*)(intptr_t **, libcerror_error_t **)) libexe_section_io_handle_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) libexe_section_io_handle_clone, (int (*)(intptr_t *, int flags, libcerror_error_t **)) libexe_section_io_handle_open, (int (*)(intptr_t *, libcerror_error_t **)) libexe_section_io_handle_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) libexe_section_io_handle_read, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) libexe_section_io_handle_write, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libexe_section_io_handle_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) libexe_section_io_handle_exists, (int (*)(intptr_t *, libcerror_error_t **)) libexe_section_io_handle_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libexe_section_io_handle_get_size, LIBBFIO_FLAG_IO_HANDLE_MANAGED | LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file IO handle.", function ); goto on_error; } return( 1 ); on_error: if( io_handle != NULL ) { libexe_section_io_handle_free( &io_handle, NULL ); } return( -1 ); } libevt-20170120/libexe/libexe_codepage.h0000664000175000017500000000501513012271501022046 0ustar00lordyestalordyesta00000000000000/* * Codepage functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEXE_INTERNAL_CODEPAGE_H ) #define _LIBEXE_INTERNAL_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBEXE ) #include /* Define HAVE_LOCAL_LIBEXE for local use of libexe * The definitions in are copied here * for local use of libexe */ #else /* The codepage definitions */ enum LIBEXE_CODEPAGES { LIBEXE_CODEPAGE_ASCII = 20127, LIBEXE_CODEPAGE_ISO_8859_1 = 28591, LIBEXE_CODEPAGE_ISO_8859_2 = 28592, LIBEXE_CODEPAGE_ISO_8859_3 = 28593, LIBEXE_CODEPAGE_ISO_8859_4 = 28594, LIBEXE_CODEPAGE_ISO_8859_5 = 28595, LIBEXE_CODEPAGE_ISO_8859_6 = 28596, LIBEXE_CODEPAGE_ISO_8859_7 = 28597, LIBEXE_CODEPAGE_ISO_8859_8 = 28598, LIBEXE_CODEPAGE_ISO_8859_9 = 28599, LIBEXE_CODEPAGE_ISO_8859_10 = 28600, LIBEXE_CODEPAGE_ISO_8859_11 = 28601, LIBEXE_CODEPAGE_ISO_8859_13 = 28603, LIBEXE_CODEPAGE_ISO_8859_14 = 28604, LIBEXE_CODEPAGE_ISO_8859_15 = 28605, LIBEXE_CODEPAGE_ISO_8859_16 = 28606, LIBEXE_CODEPAGE_KOI8_R = 20866, LIBEXE_CODEPAGE_KOI8_U = 21866, LIBEXE_CODEPAGE_WINDOWS_874 = 874, LIBEXE_CODEPAGE_WINDOWS_932 = 932, LIBEXE_CODEPAGE_WINDOWS_936 = 936, LIBEXE_CODEPAGE_WINDOWS_949 = 949, LIBEXE_CODEPAGE_WINDOWS_950 = 950, LIBEXE_CODEPAGE_WINDOWS_1250 = 1250, LIBEXE_CODEPAGE_WINDOWS_1251 = 1251, LIBEXE_CODEPAGE_WINDOWS_1252 = 1252, LIBEXE_CODEPAGE_WINDOWS_1253 = 1253, LIBEXE_CODEPAGE_WINDOWS_1254 = 1254, LIBEXE_CODEPAGE_WINDOWS_1255 = 1255, LIBEXE_CODEPAGE_WINDOWS_1256 = 1256, LIBEXE_CODEPAGE_WINDOWS_1257 = 1257, LIBEXE_CODEPAGE_WINDOWS_1258 = 1258 }; #endif /* !defined( HAVE_LOCAL_LIBEXE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEXE_INTERNAL_CODEPAGE_H ) */ libevt-20170120/libexe/libexe_error.c0000664000175000017500000000550413012271501021426 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libexe_error.h" #include "libexe_libcerror.h" #if !defined( HAVE_LOCAL_LIBEXE ) /* Free an error and its elements */ void libexe_error_free( libexe_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 libexe_error_fprint( libexe_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 libexe_error_sprint( libexe_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 libexe_error_backtrace_fprint( libexe_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 libexe_error_backtrace_sprint( libexe_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_LIBEXE ) */ libevt-20170120/libexe/libexe_export_table.c0000664000175000017500000001262113012271501022763 0ustar00lordyestalordyesta00000000000000/* * Export table functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libexe_export_table.h" #include "libexe_libcerror.h" #include "libexe_libcnotify.h" #include "libexe_libfcache.h" #include "libexe_libfdata.h" /* Creates an export table * Make sure the value export_table is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libexe_export_table_initialize( libexe_export_table_t **export_table, libcerror_error_t **error ) { static char *function = "libexe_export_table_initialize"; if( export_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export table.", function ); return( -1 ); } if( *export_table != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid export table value already set.", function ); return( -1 ); } *export_table = memory_allocate_structure( libexe_export_table_t ); if( *export_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create export table.", function ); goto on_error; } if( memory_set( *export_table, 0, sizeof( libexe_export_table_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear export table.", function ); memory_free( *export_table ); *export_table = NULL; return( -1 ); } return( 1 ); on_error: if( *export_table != NULL ) { memory_free( *export_table ); *export_table = NULL; } return( -1 ); } /* Frees an export table * Returns 1 if successful or -1 on error */ int libexe_export_table_free( libexe_export_table_t **export_table, libcerror_error_t **error ) { static char *function = "libexe_export_table_free"; if( export_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export table.", function ); return( -1 ); } if( *export_table != NULL ) { memory_free( *export_table ); *export_table = NULL; } return( 1 ); } /* Reads the export table * Returns 1 if successful or -1 on error */ int libexe_export_table_read( libexe_export_table_t *export_table, libbfio_handle_t *file_io_handle, off64_t file_offset, uint32_t size, libcerror_error_t **error ) { uint8_t *data = NULL; static char *function = "libexe_export_table_read"; size_t read_count = 0; if( export_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export table.", function ); return( -1 ); } #if SIZEOF_SIZE_T <= 4 if( size > (uint32_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 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading export table at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, file_offset, file_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek export table offset: 0x%08" PRIx64 ".", function, file_offset ); goto on_error; } data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * size ); if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create export table.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, data, size, error ); if( read_count != (ssize_t) size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read export table.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: export table:\n", function ); libcnotify_print_data( data, (size_t) size, 0 ); } #endif /* TODO extract values */ memory_free( data ); return( 1 ); on_error: if( data != NULL ) { memory_free( data ); } return( -1 ); } libevt-20170120/common/0000775000175000017500000000000013040343016016617 5ustar00lordyestalordyesta00000000000000libevt-20170120/common/config_msc.h0000664000175000017500000000220713040331672021105 0ustar00lordyestalordyesta00000000000000/* * Configuration for the Microsoft Visual Studio C++ compiler * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _CONFIG_MSC_H ) #define _CONFIG_MSC_H /* 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 ) */ libevt-20170120/common/byte_stream.h0000664000175000017500000002430713040331672021321 0ustar00lordyestalordyesta00000000000000/* * Byte stream functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _BYTE_STREAM_H ) #define _BYTE_STREAM_H #include "common.h" #include "types.h" #if defined( __cplusplus ) extern "C" { #endif #define _BYTE_STREAM_HOST_IS_ENDIAN_BIG ( *((uint32_t *) "\x01\x02\x03\x04" ) == 0x01020304 ) #define _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ( *((uint32_t *) "\x01\x02\x03\x04" ) == 0x04030201 ) #define _BYTE_STREAM_HOST_IS_ENDIAN_MIDDLE ( *((uint32_t *) "\x01\x02\x03\x04" ) == 0x02010403 ) #define _BYTE_STREAM_ENDIAN_BIG (uint8_t) 'b' #define _BYTE_STREAM_ENDIAN_LITTLE (uint8_t) 'l' #define _BYTE_STREAM_ENDIAN_MIDDLE (uint8_t) 'm' typedef union byte_stream_float32 { float floating_point; uint32_t integer; } byte_stream_float32_t; typedef union byte_stream_float64 { double floating_point; uint64_t integer; } byte_stream_float64_t; #define byte_stream_copy_to_uint16_big_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 0 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; #define byte_stream_copy_to_uint16_little_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 0 ]; #define byte_stream_copy_to_uint24_big_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 0 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; #define byte_stream_copy_to_uint24_little_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 0 ]; #define byte_stream_copy_to_uint32_big_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 0 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 3 ]; #define byte_stream_copy_to_uint32_little_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 3 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 0 ]; #define byte_stream_copy_to_uint48_big_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 0 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 3 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 4 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 5 ]; #define byte_stream_copy_to_uint48_little_endian( byte_stream, value ) \ ( value ) |= ( byte_stream )[ 5 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 4 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 3 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 0 ]; #define byte_stream_copy_to_uint64_big_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 0 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 3 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 4 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 5 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 6 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 7 ]; #define byte_stream_copy_to_uint64_little_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 7 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 6 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 5 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 4 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 3 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 0 ]; #define byte_stream_copy_from_uint16_big_endian( byte_stream, value ) \ ( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint16_little_endian( byte_stream, value ) \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint24_big_endian( byte_stream, value ) \ ( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint24_little_endian( byte_stream, value ) \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint32_big_endian( byte_stream, value ) \ ( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 3 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint32_little_endian( byte_stream, value ) \ ( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint48_big_endian( byte_stream, value ) \ ( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 40 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 32 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \ ( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 4 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 5 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint48_little_endian( byte_stream, value ) \ ( byte_stream )[ 5 ] = (uint8_t) ( ( ( value ) >> 40 ) & 0x0ff ); \ ( byte_stream )[ 4 ] = (uint8_t) ( ( ( value ) >> 32 ) & 0x0ff ); \ ( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint64_big_endian( byte_stream, value ) \ ( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 56 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 48 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 40 ) & 0x0ff ); \ ( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 32 ) & 0x0ff ); \ ( byte_stream )[ 4 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \ ( byte_stream )[ 5 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 6 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 7 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint64_little_endian( byte_stream, value ) \ ( byte_stream )[ 7 ] = (uint8_t) ( ( ( value ) >> 56 ) & 0x0ff ); \ ( byte_stream )[ 6 ] = (uint8_t) ( ( ( value ) >> 48 ) & 0x0ff ); \ ( byte_stream )[ 5 ] = (uint8_t) ( ( ( value ) >> 40 ) & 0x0ff ); \ ( byte_stream )[ 4 ] = (uint8_t) ( ( ( value ) >> 32 ) & 0x0ff ); \ ( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_bit_rotate_left_8bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) << ( number_of_bits ) ) | ( ( byte_stream ) >> ( 8 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_right_8bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) >> ( number_of_bits ) ) | ( ( byte_stream ) << ( 8 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_left_16bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) << ( number_of_bits ) ) | ( ( byte_stream ) >> ( 16 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_right_16bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) >> ( number_of_bits ) ) | ( ( byte_stream ) << ( 16 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_left_32bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) << ( number_of_bits ) ) | ( ( byte_stream ) >> ( 32 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_right_32bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) >> ( number_of_bits ) ) | ( ( byte_stream ) << ( 32 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_left_64bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) << ( number_of_bits ) ) | ( ( byte_stream ) >> ( 64 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_right_64bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) >> ( number_of_bits ) ) | ( ( byte_stream ) << ( 64 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_left( value, number_of_bits ) \ ( ( ( value ) << ( number_of_bits ) ) | ( ( value ) >> ( ( sizeof( value ) << 3 ) - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_right( value, number_of_bits ) \ ( ( ( value ) >> ( number_of_bits ) ) | ( ( value ) << ( ( sizeof( value ) << 3 ) - ( number_of_bits ) ) ) ) #if defined( __cplusplus ) } #endif #endif /* !defined( _BYTE_STREAM_H ) */ libevt-20170120/common/common.h0000664000175000017500000000234413040331672020270 0ustar00lordyestalordyesta00000000000000/* * Common include file * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _COMMON_H ) #define _COMMON_H #if defined( HAVE_CONFIG_H ) #include "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 ) */ libevt-20170120/common/system_string.h0000664000175000017500000001064713040331672021717 0ustar00lordyestalordyesta00000000000000/* * System character string functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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_vsprintf \ wide_string_vsnwprintf #else #define system_string_vsprintf( 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_vsprintf \ narrow_string_vsnprintf #else #define system_string_vsprintf( string, size, format, ... ) \ narrow_string_vsnprintf( string, size, format, __VA_ARGS__ ) #endif #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ #if defined( _cplusplus ) } #endif #endif /* !defined( _SYSTEM_STRING_H ) */ libevt-20170120/common/Makefile.am0000664000175000017500000000057213040331663020664 0ustar00lordyestalordyesta00000000000000AM_CPPFLAGS = -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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f config.h /bin/rm -f types.h /bin/rm -f Makefile libevt-20170120/common/types.h0000664000175000017500000001357413040342671020154 0ustar00lordyestalordyesta00000000000000/* * Type and type-support defintions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _TYPES_H ) #define _TYPES_H #include "common.h" #if defined( HAVE_LIMITS_H ) || defined( WINAPI ) #include #endif /* Make sure to include inttypes.h or stdint.h before * PRI definitions are defined */ #include #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 ) ) */ /* Fix for systems without PRI definitions */ #if !defined( PRId8 ) #define PRId8 "d" #endif #if !defined( PRId16 ) #define PRId16 "d" #endif #if !defined( PRId32 ) #if defined( WINAPI ) #define PRId32 "I32d" #else #define PRId32 "d" #endif #endif #if !defined( PRId64 ) #if defined( WINAPI ) #define PRId64 "I64d" #elif __WORDSIZE == 64 #define PRId64 "ld" #else #define PRId64 "lld" #endif #endif #if !defined( PRIi8 ) #define PRIi8 "i" #endif #if !defined( PRIi16 ) #define PRIi16 "i" #endif #if !defined( PRIi32 ) #if defined( WINAPI ) #define PRIi32 "I32i" #else #define PRIi32 "i" #endif #endif #if !defined( PRIi64 ) #if defined( WINAPI ) #define PRIi64 "I64i" #elif __WORDSIZE == 64 #define PRIi64 "li" #else #define PRIi64 "lli" #endif #endif #if !defined( PRIu8 ) #define PRIu8 "u" #endif #if !defined( PRIu16 ) #define PRIu16 "u" #endif #if !defined( PRIu32 ) #if defined( WINAPI ) #define PRIu32 "I32u" #else #define PRIu32 "u" #endif #endif #if !defined( PRIu64 ) #if defined( WINAPI ) #define PRIu64 "I64u" #elif __WORDSIZE == 64 #define PRIu64 "lu" #else #define PRIu64 "llu" #endif #endif #if !defined( PRIx8 ) #define PRIx8 "x" #endif #if !defined( PRIx16 ) #define PRIx16 "x" #endif #if !defined( PRIx32 ) #if defined( WINAPI ) #define PRIx32 "I32x" #else #define PRIx32 "x" #endif #endif #if !defined( PRIx64 ) #if defined( WINAPI ) #define PRIx64 "I64x" #elif __WORDSIZE == 64 #define PRIx64 "lx" #else #define PRIx64 "llx" #endif #endif /* Fix for systems without printf %jd definition */ #if defined( HAVE_PRINTF_JD ) #define PRIjd "jd" #define PRIji "ji" #define PRIju "ju" #define PRIjx "jx" #elif SIZEOF_OFF_T == 8 #define PRIjd PRId64 #define PRIji PRIi64 #define PRIju PRIu64 #define PRIjx PRIx64 #else #define PRIjd PRId32 #define PRIji PRIi32 #define PRIju PRIu32 #define PRIjx PRIx32 #endif /* Fix for systems without printf %zd definition */ #if defined( HAVE_PRINTF_ZD ) #define PRIzd "zd" #define PRIzi "zi" #define PRIzu "zu" #define PRIzx "zx" #elif defined( WINAPI ) #define PRIzd "Id" #define PRIzi "Ii" #define PRIzu "Iu" #define PRIzx "Ix" #elif SIZEOF_SIZE_T == 8 #define PRIzd PRId64 #define PRIzi PRIi64 #define PRIzu PRIu64 #define PRIzx PRIx64 #else #define PRIzd PRId32 #define PRIzi PRIi32 #define PRIzu PRIu32 #define PRIzx PRIx32 #endif /* Fix for systems without (U)INTx_MAX definitions */ /* The maximum signed 8-bit integer is 127 (0x7f) */ #if !defined( INT8_MAX ) #define INT8_MAX (0x7f) #endif /* The maximum unsigned 8-bit integer is 256 (0xff) */ #if !defined( UINT8_MAX ) #define UINT8_MAX (0xff) #endif /* The maximum signed 16-bit integer is 32767 (0xr7ffff) */ #if !defined( INT16_MAX ) #define INT16_MAX (0x7fff) #endif /* The maximum unsigned 16-bit integer is 65535 (0xffff) */ #if !defined( UINT16_MAX ) #define UINT16_MAX (0xffff) #endif /* The maximum signed 32-bit integer is 2147483647 (0x7fffffff) */ #if !defined( INT32_MAX ) #define INT32_MAX (0x7fffffffL) #endif /* The maximum unsigned 32-bit integer is 4294967295 (0xffffffff) */ #if !defined( UINT32_MAX ) #define UINT32_MAX (0xffffffffUL) #endif /* The maximum signed 64-bit integer is 9223372036854775807 (0x7fffffffffffffff) */ #if !defined( INT64_MAX ) #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define INT64_MAX (0x7fffffffffffffffUL) #else #define INT64_MAX (0x7fffffffffffffffULL) #endif #endif /* The maximum 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 /* The maximum signed integer */ #if !defined( INT_MAX ) #define INT_MAX INT32_MAX #endif /* The maximum unsigned integer */ #if !defined( UINT_MAX ) #define UINT_MAX UINT32_MAX #endif /* The maximum signed size type is platform dependent */ #if !defined( SSIZE_MAX ) #if defined( WINAPI ) #if defined( _WIN64 ) #define SSIZE_MAX INT64_MAX #else #define SSIZE_MAX INT32_MAX #endif /* _WIN64 */ #else #if __WORDSIZE == 64 #define SSIZE_MAX INT64_MAX #else #define SSIZE_MAX INT32_MAX #endif /* __WORDSIZE == 64 */ #endif /* WINAPI */ #endif /* SSIZE_MAX */ #endif /* !defined( _TYPES_H ) */ libevt-20170120/common/types.h.in0000664000175000017500000001357713040331672020563 0ustar00lordyestalordyesta00000000000000/* * Type and type-support defintions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _TYPES_H ) #define _TYPES_H #include "common.h" #if defined( HAVE_LIMITS_H ) || defined( WINAPI ) #include #endif /* Make sure to include inttypes.h or stdint.h before * PRI definitions are defined */ #include <@PACKAGE@/types.h> #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 ) ) */ /* Fix for systems without PRI definitions */ #if !defined( PRId8 ) #define PRId8 "d" #endif #if !defined( PRId16 ) #define PRId16 "d" #endif #if !defined( PRId32 ) #if defined( WINAPI ) #define PRId32 "I32d" #else #define PRId32 "d" #endif #endif #if !defined( PRId64 ) #if defined( WINAPI ) #define PRId64 "I64d" #elif __WORDSIZE == 64 #define PRId64 "ld" #else #define PRId64 "lld" #endif #endif #if !defined( PRIi8 ) #define PRIi8 "i" #endif #if !defined( PRIi16 ) #define PRIi16 "i" #endif #if !defined( PRIi32 ) #if defined( WINAPI ) #define PRIi32 "I32i" #else #define PRIi32 "i" #endif #endif #if !defined( PRIi64 ) #if defined( WINAPI ) #define PRIi64 "I64i" #elif __WORDSIZE == 64 #define PRIi64 "li" #else #define PRIi64 "lli" #endif #endif #if !defined( PRIu8 ) #define PRIu8 "u" #endif #if !defined( PRIu16 ) #define PRIu16 "u" #endif #if !defined( PRIu32 ) #if defined( WINAPI ) #define PRIu32 "I32u" #else #define PRIu32 "u" #endif #endif #if !defined( PRIu64 ) #if defined( WINAPI ) #define PRIu64 "I64u" #elif __WORDSIZE == 64 #define PRIu64 "lu" #else #define PRIu64 "llu" #endif #endif #if !defined( PRIx8 ) #define PRIx8 "x" #endif #if !defined( PRIx16 ) #define PRIx16 "x" #endif #if !defined( PRIx32 ) #if defined( WINAPI ) #define PRIx32 "I32x" #else #define PRIx32 "x" #endif #endif #if !defined( PRIx64 ) #if defined( WINAPI ) #define PRIx64 "I64x" #elif __WORDSIZE == 64 #define PRIx64 "lx" #else #define PRIx64 "llx" #endif #endif /* Fix for systems without printf %jd definition */ #if defined( HAVE_PRINTF_JD ) #define PRIjd "jd" #define PRIji "ji" #define PRIju "ju" #define PRIjx "jx" #elif SIZEOF_OFF_T == 8 #define PRIjd PRId64 #define PRIji PRIi64 #define PRIju PRIu64 #define PRIjx PRIx64 #else #define PRIjd PRId32 #define PRIji PRIi32 #define PRIju PRIu32 #define PRIjx PRIx32 #endif /* Fix for systems without printf %zd definition */ #if defined( HAVE_PRINTF_ZD ) #define PRIzd "zd" #define PRIzi "zi" #define PRIzu "zu" #define PRIzx "zx" #elif defined( WINAPI ) #define PRIzd "Id" #define PRIzi "Ii" #define PRIzu "Iu" #define PRIzx "Ix" #elif SIZEOF_SIZE_T == 8 #define PRIzd PRId64 #define PRIzi PRIi64 #define PRIzu PRIu64 #define PRIzx PRIx64 #else #define PRIzd PRId32 #define PRIzi PRIi32 #define PRIzu PRIu32 #define PRIzx PRIx32 #endif /* Fix for systems without (U)INTx_MAX definitions */ /* The maximum signed 8-bit integer is 127 (0x7f) */ #if !defined( INT8_MAX ) #define INT8_MAX (0x7f) #endif /* The maximum unsigned 8-bit integer is 256 (0xff) */ #if !defined( UINT8_MAX ) #define UINT8_MAX (0xff) #endif /* The maximum signed 16-bit integer is 32767 (0xr7ffff) */ #if !defined( INT16_MAX ) #define INT16_MAX (0x7fff) #endif /* The maximum unsigned 16-bit integer is 65535 (0xffff) */ #if !defined( UINT16_MAX ) #define UINT16_MAX (0xffff) #endif /* The maximum signed 32-bit integer is 2147483647 (0x7fffffff) */ #if !defined( INT32_MAX ) #define INT32_MAX (0x7fffffffL) #endif /* The maximum unsigned 32-bit integer is 4294967295 (0xffffffff) */ #if !defined( UINT32_MAX ) #define UINT32_MAX (0xffffffffUL) #endif /* The maximum signed 64-bit integer is 9223372036854775807 (0x7fffffffffffffff) */ #if !defined( INT64_MAX ) #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define INT64_MAX (0x7fffffffffffffffUL) #else #define INT64_MAX (0x7fffffffffffffffULL) #endif #endif /* The maximum 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 /* The maximum signed integer */ #if !defined( INT_MAX ) #define INT_MAX INT32_MAX #endif /* The maximum unsigned integer */ #if !defined( UINT_MAX ) #define UINT_MAX UINT32_MAX #endif /* The maximum signed size type is platform dependent */ #if !defined( SSIZE_MAX ) #if defined( WINAPI ) #if defined( _WIN64 ) #define SSIZE_MAX INT64_MAX #else #define SSIZE_MAX INT32_MAX #endif /* _WIN64 */ #else #if __WORDSIZE == 64 #define SSIZE_MAX INT64_MAX #else #define SSIZE_MAX INT32_MAX #endif /* __WORDSIZE == 64 */ #endif /* WINAPI */ #endif /* SSIZE_MAX */ #endif /* !defined( _TYPES_H ) */ libevt-20170120/common/config_winapi.h0000664000175000017500000000366213040331672021620 0ustar00lordyestalordyesta00000000000000/* * Configuration file for WINAPI * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _CONFIG_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 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 ) */ libevt-20170120/common/memory.h0000664000175000017500000000603513040331672020311 0ustar00lordyestalordyesta00000000000000/* * Memory functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _MEMORY_H ) #define _MEMORY_H #include "common.h" #if defined( HAVE_GLIB_H ) #include #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_STRING_H ) || defined( WINAPI ) #include #endif #if defined( __cplusplus ) extern "C" { #endif /* Memory allocation */ #if defined( HAVE_GLIB_H ) #define memory_allocate( size ) \ g_malloc( (gsize) size ) #elif defined( 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 ) \ 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 ) */ libevt-20170120/common/config.h0000664000175000017500000004521613040342671020253 0ustar00lordyestalordyesta00000000000000/* common/config.h. Generated from config.h.in by configure. */ /* common/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 /* Define to 1 if you have the `bindtextdomain' function. */ #define HAVE_BINDTEXTDOMAIN 1 /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ /* #undef HAVE_CFLOCALECOPYCURRENT */ /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ /* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ /* Define to 1 if you have the `chdir' function. */ #define HAVE_CHDIR 1 /* Define to 1 if you have the `close' function. */ #define HAVE_CLOSE 1 /* Define to 1 if you have the `closedir' function. */ #define HAVE_CLOSEDIR 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_DIRENT_H 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 funtion 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 `cdirectory' library (-lcdirectory). */ /* #undef HAVE_LIBCDIRECTORY */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBCDIRECTORY_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 `exe' library (-lexe). */ /* #undef HAVE_LIBEXE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBEXE_H */ /* Define to 1 if you have the `fcache' library (-lfcache). */ /* #undef HAVE_LIBFCACHE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFCACHE_H */ /* Define to 1 if you have the `fdata' library (-lfdata). */ /* #undef HAVE_LIBFDATA */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFDATA_H */ /* Define to 1 if you have the `fdatetime' library (-lfdatetime). */ /* #undef HAVE_LIBFDATETIME */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFDATETIME_H */ /* Define to 1 if you have the `fguid' library (-lfguid). */ /* #undef HAVE_LIBFGUID */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFGUID_H */ /* Define to 1 if you have the `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 `fwevt' library (-lfwevt). */ /* #undef HAVE_LIBFWEVT */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFWEVT_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 `regf' library (-lregf). */ /* #undef HAVE_LIBREGF */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBREGF_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 `wrc' library (-lwrc). */ /* #undef HAVE_LIBWRC */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBWRC_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 libcdirectory is used. */ #define HAVE_LOCAL_LIBCDIRECTORY 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 libexe is used. */ #define HAVE_LOCAL_LIBEXE 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 libfvalue is used. */ #define HAVE_LOCAL_LIBFVALUE 1 /* Define to 1 if the local version of libfwevt is used. */ #define HAVE_LOCAL_LIBFWEVT 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 libregf is used. */ #define HAVE_LOCAL_LIBREGF 1 /* Define to 1 if the local version of libuna is used. */ #define HAVE_LOCAL_LIBUNA 1 /* Define to 1 if the local version of libwrc is used. */ #define HAVE_LOCAL_LIBWRC 1 /* Define to 1 if you have the `lseek' function. */ #define HAVE_LSEEK 1 /* Define to 1 if you have the `malloc' function. */ #define HAVE_MALLOC 1 /* Define to 1 if you have the `memchr' function. */ #define HAVE_MEMCHR 1 /* Define to 1 if you have the `memcmp' function. */ #define HAVE_MEMCMP 1 /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memrchr' function. */ #define HAVE_MEMRCHR 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the mkdir function. */ #define HAVE_MKDIR 1 /* Define to 1 if you have the mkdir function with a second mode argument. */ #define HAVE_MKDIR_MODE 1 /* Define to 1 if 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 `opendir' function. */ #define HAVE_OPENDIR 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 Python */ /* #undef HAVE_PYTHON */ /* Define to 1 if you have Python 2 */ /* #undef HAVE_PYTHON2 */ /* Define to 1 if you have Python 3 */ /* #undef HAVE_PYTHON3 */ /* 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 `readdir_r' function. */ #define HAVE_READDIR_R 1 /* Define to 1 if you have the `realloc' function. */ #define HAVE_REALLOC 1 /* Define to 1 if you have the `setlocale' function. */ #define HAVE_SETLOCALE 1 /* Define to 1 if you have the `setvbuf' function. */ #define HAVE_SETVBUF 1 /* Define to 1 if you have the header file. */ #define HAVE_SIGNAL_H 1 /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if you have the `sscanf' function. */ #define HAVE_SSCANF 1 /* Define to 1 if you have the `stat' function. */ #define HAVE_STAT 1 /* Define to 1 if you have the header file. */ #define HAVE_STDARG_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_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 to 1 if you have the `strerror_r' function. */ #define HAVE_STRERROR_R 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strlen' function. */ #define HAVE_STRLEN 1 /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strncmp' function. */ #define HAVE_STRNCMP 1 /* Define to 1 if you have the `strncpy' function. */ #define HAVE_STRNCPY 1 /* Define to 1 if you have the `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_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 `towupper' function. */ #define HAVE_TOWUPPER 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 "libevt" /* 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 "libevt" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "libevt 20170120" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libevt" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ #define PACKAGE_VERSION "20170120" /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 /* 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 you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define to 1 if strerror_r returns char *. */ /* #undef STRERROR_R_CHAR_P */ /* Define to 1 if you can safely include both and . */ #define TIME_WITH_SYS_TIME 1 /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ #define VERSION "20170120" /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* 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 */ libevt-20170120/common/narrow_string.h0000664000175000017500000001233713040331672021701 0ustar00lordyestalordyesta00000000000000/* * Narrow character string functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) #define narrow_string_search_character_reverse( string, character, size ) \ strrchr( string, (int) character ) #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 ) */ libevt-20170120/common/Makefile.in0000664000175000017500000006557513040342656020717 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir)/include EXTRA_DIST = \ byte_stream.h \ common.h \ config.h \ config_borlandc.h \ config_msc.h \ config_winapi.h \ file_stream.h \ memory.h \ narrow_string.h \ system_string.h \ types.h \ types.h.in \ wide_string.h MAINTAINERCLEANFILES = \ 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): config.h: stamp-h1 @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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic distclean-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: 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f config.h /bin/rm -f types.h /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/common/file_stream.h0000664000175000017500000000745013040331672021275 0ustar00lordyestalordyesta00000000000000/* * FILE stream functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _FILE_STREAM_H ) #define _FILE_STREAM_H #include "common.h" #if defined( HAVE_GLIB_H ) #include #include #endif #include #if defined( __cplusplus ) extern "C" { #endif #define FILE_STREAM_OPEN_APPEND "a" #define FILE_STREAM_OPEN_READ "r" #define FILE_STREAM_OPEN_WRITE "w" #if defined( WINAPI ) #define FILE_STREAM_BINARY_OPEN_APPEND "ab" #define FILE_STREAM_BINARY_OPEN_READ "rb" #define FILE_STREAM_BINARY_OPEN_WRITE "wb" #else #define FILE_STREAM_BINARY_OPEN_APPEND "a" #define FILE_STREAM_BINARY_OPEN_READ "r" #define FILE_STREAM_BINARY_OPEN_WRITE "w" #endif /* narrow character FILE stream open */ #if defined( HAVE_GLIB_H ) #define file_stream_open( filename, mode ) \ g_fopen( filename, mode ) #elif defined( HAVE_FOPEN ) || defined( WINAPI ) #define file_stream_open( filename, mode ) \ fopen( filename, mode ) #endif /* wide character FILE stream open */ #if defined( WINAPI ) #define file_stream_open_wide( filename, mode ) \ _wfopen( filename, mode ) #endif /* FILE stream close */ #if defined( HAVE_FCLOSE ) || defined( WINAPI ) #define file_stream_close( stream ) \ fclose( stream ) #endif /* FILE stream read */ #if defined( HAVE_FREAD ) || defined( WINAPI ) #define file_stream_read( stream, data, size ) \ fread( data, 1, size, stream ) #endif /* FILE stream write */ #if defined( HAVE_FWRITE ) || defined( WINAPI ) #define file_stream_write( stream, data, size ) \ fwrite( data, 1, size, stream ) #endif /* FILE stream seek */ #if defined( WINAPI ) #define file_stream_seek_offset( stream, offset, whence ) \ fseek( stream, offset, whence ) #elif defined( HAVE_FSEEKO ) #define file_stream_seek_offset( stream, offset, whence ) \ fseeko( stream, offset, whence ) #elif defined( HAVE_FSEEKO64 ) #define file_stream_seek_offset( stream, offset, whence ) \ fseeko64( stream, offset, whence ) #endif /* End of FILE stream */ #if defined( HAVE_FEOF ) || defined( WINAPI ) #define file_stream_at_end( stream ) \ feof( stream ) #endif /* Get narrow character string from FILE stream */ #if defined( HAVE_FGETS ) || defined( WINAPI ) #define file_stream_get_string( stream, string, size ) \ fgets( string, size, stream ) #endif /* Get wide characters string from FILE stream */ #if defined( HAVE_FGETWS ) || defined( WINAPI ) #define file_stream_get_string_wide( stream, string, size ) \ fgetws( string, size, stream ) #endif /* Variable arguments formatted print to stream function */ #if defined( HAVE_GLIB_H ) #define file_stream_vfprintf( stream, format, ... ) \ g_vfprintf( stream, format, __VA_ARGS__ ) /* 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 ) */ libevt-20170120/common/config_borlandc.h0000664000175000017500000000167713040331672022121 0ustar00lordyestalordyesta00000000000000/* * Configuration for the Borland/CodeGear C++ Builder compiler * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _CONFIG_BORLANDC_H ) #define _CONFIG_BORLANDC_H #endif /* !defined( _CONFIG_BORLANDC_H ) */ libevt-20170120/common/config.h.in0000664000175000017500000004314313040342656020660 0ustar00lordyestalordyesta00000000000000/* common/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to 1 if you have the `bindtextdomain' function. */ #undef HAVE_BINDTEXTDOMAIN /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* Define to 1 if you have the `chdir' function. */ #undef HAVE_CHDIR /* Define to 1 if you have the `close' function. */ #undef HAVE_CLOSE /* Define to 1 if you have the `closedir' function. */ #undef HAVE_CLOSEDIR /* 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_DIRENT_H /* 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 funtion 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 `cdirectory' library (-lcdirectory). */ #undef HAVE_LIBCDIRECTORY /* Define to 1 if you have the header file. */ #undef HAVE_LIBCDIRECTORY_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 `exe' library (-lexe). */ #undef HAVE_LIBEXE /* Define to 1 if you have the header file. */ #undef HAVE_LIBEXE_H /* Define to 1 if you have the `fcache' library (-lfcache). */ #undef HAVE_LIBFCACHE /* Define to 1 if you have the header file. */ #undef HAVE_LIBFCACHE_H /* Define to 1 if you have the `fdata' library (-lfdata). */ #undef HAVE_LIBFDATA /* Define to 1 if you have the header file. */ #undef HAVE_LIBFDATA_H /* Define to 1 if you have the `fdatetime' library (-lfdatetime). */ #undef HAVE_LIBFDATETIME /* Define to 1 if you have the header file. */ #undef HAVE_LIBFDATETIME_H /* Define to 1 if you have the `fguid' library (-lfguid). */ #undef HAVE_LIBFGUID /* Define to 1 if you have the header file. */ #undef HAVE_LIBFGUID_H /* Define to 1 if you have the `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 `fwevt' library (-lfwevt). */ #undef HAVE_LIBFWEVT /* Define to 1 if you have the header file. */ #undef HAVE_LIBFWEVT_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 `regf' library (-lregf). */ #undef HAVE_LIBREGF /* Define to 1 if you have the header file. */ #undef HAVE_LIBREGF_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 `wrc' library (-lwrc). */ #undef HAVE_LIBWRC /* Define to 1 if you have the header file. */ #undef HAVE_LIBWRC_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 libcdirectory is used. */ #undef HAVE_LOCAL_LIBCDIRECTORY /* 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 libexe is used. */ #undef HAVE_LOCAL_LIBEXE /* 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 libfvalue is used. */ #undef HAVE_LOCAL_LIBFVALUE /* Define to 1 if the local version of libfwevt is used. */ #undef HAVE_LOCAL_LIBFWEVT /* Define to 1 if the local version of libfwnt is used. */ #undef HAVE_LOCAL_LIBFWNT /* Define to 1 if the local version of libregf is used. */ #undef HAVE_LOCAL_LIBREGF /* Define to 1 if the local version of libuna is used. */ #undef HAVE_LOCAL_LIBUNA /* Define to 1 if the local version of libwrc is used. */ #undef HAVE_LOCAL_LIBWRC /* Define to 1 if you have the `lseek' function. */ #undef HAVE_LSEEK /* Define to 1 if you have the `malloc' function. */ #undef HAVE_MALLOC /* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR /* Define to 1 if you have the `memcmp' function. */ #undef HAVE_MEMCMP /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memrchr' function. */ #undef HAVE_MEMRCHR /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the mkdir function. */ #undef HAVE_MKDIR /* Define to 1 if you have the mkdir function with a second mode argument. */ #undef HAVE_MKDIR_MODE /* Define to 1 if 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 `opendir' function. */ #undef HAVE_OPENDIR /* 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 Python */ #undef HAVE_PYTHON /* Define to 1 if you have Python 2 */ #undef HAVE_PYTHON2 /* Define to 1 if you have Python 3 */ #undef HAVE_PYTHON3 /* 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 `readdir_r' function. */ #undef HAVE_READDIR_R /* Define to 1 if you have the `realloc' function. */ #undef HAVE_REALLOC /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the `setvbuf' function. */ #undef HAVE_SETVBUF /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the `sscanf' function. */ #undef HAVE_SSCANF /* Define to 1 if you have the `stat' function. */ #undef HAVE_STAT /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_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 to 1 if you have the `strerror_r' function. */ #undef HAVE_STRERROR_R /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlen' function. */ #undef HAVE_STRLEN /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strncmp' function. */ #undef HAVE_STRNCMP /* Define to 1 if you have the `strncpy' function. */ #undef HAVE_STRNCPY /* Define to 1 if you have the `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_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 `towupper' function. */ #undef HAVE_TOWUPPER /* 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 `off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T /* The size of `wchar_t', as computed by sizeof. */ #undef SIZEOF_WCHAR_T /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* 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 libevt-20170120/common/wide_string.h0000664000175000017500000001157413040331672021323 0ustar00lordyestalordyesta00000000000000/* * Wide character string functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) #define wide_string_search_character_reverse( string, character, size ) \ wcsrchr( string, (wchar_t) character ) #endif /* String sub-string search */ #if defined( HAVE_WCSSTR ) || defined( WINAPI ) #define 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 ) */ libevt-20170120/libevt.pc.in0000664000175000017500000000137413040331664017560 0ustar00lordyestalordyesta00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libevt Description: Library to access the Windows Event Log (EVT) format Version: @VERSION@ Libs: -L${libdir} -levt 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_libcthreads_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} libevt-20170120/libfguid/0000775000175000017500000000000013040343017017115 5ustar00lordyestalordyesta00000000000000libevt-20170120/libfguid/libfguid_identifier.c0000664000175000017500000017743013040331701023261 0ustar00lordyestalordyesta00000000000000/* * GUID functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfguid_definitions.h" #include "libfguid_identifier.h" #include "libfguid_libcerror.h" #include "libfguid_types.h" /* 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 supported_flags = 0; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } supported_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE | 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_length = 0; size_t string_index = 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 ); } supported_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE | 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 supported_flags = 0; uint8_t byte_value = 0; uint8_t node_index = 0; int8_t byte_shift = 0; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } internal_identifier = (libfguid_internal_identifier_t *) identifier; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: UTF-8 string size exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 index.", function ); return( -1 ); } supported_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE | 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_length = 0; size_t string_index = 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 ); } supported_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE | 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 supported_flags = 0; uint8_t byte_value = 0; uint8_t node_index = 0; int8_t byte_shift = 0; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } internal_identifier = (libfguid_internal_identifier_t *) identifier; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: UTF-16 string size exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 index.", function ); return( -1 ); } supported_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE | 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) '{'; } string_index = *utf16_string_index; byte_shift = 28; do { byte_value = ( internal_identifier->time.lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_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_length = 0; size_t string_index = 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 ); } supported_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE | 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 supported_flags = 0; uint8_t byte_value = 0; uint8_t node_index = 0; int8_t byte_shift = 0; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } internal_identifier = (libfguid_internal_identifier_t *) identifier; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: UTF-32 string size exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 index.", function ); return( -1 ); } supported_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE | 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) '{'; } string_index = *utf32_string_index; byte_shift = 28; do { byte_value = ( internal_identifier->time.lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_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 ); } libevt-20170120/libfguid/libfguid_support.c0000664000175000017500000000216013040331701022636 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfguid_definitions.h" #include "libfguid_support.h" #if !defined( HAVE_LOCAL_LIBFGUID ) /* Returns the library version as a string */ const char *libfguid_get_version( void ) { return( (const char *) LIBFGUID_VERSION_STRING ); } #endif libevt-20170120/libfguid/Makefile.am0000664000175000017500000000120513012271507021152 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBFGUID AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfguid ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfguid_la_SOURCES) libevt-20170120/libfguid/libfguid_support.h0000664000175000017500000000225213040331701022645 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_SUPPORT_H ) #define _LIBFGUID_SUPPORT_H #include #include #include "libfguid_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFGUID ) LIBFGUID_EXTERN \ const char *libfguid_get_version( void ); #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFGUID_SUPPORT_H ) */ libevt-20170120/libfguid/libfguid_definitions.h0000664000175000017500000000431713040331701023450 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBFGUID_INTERNAL_DEFINITIONS_H ) #define LIBFGUID_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBFGUID for local use of libfguid */ #if !defined( HAVE_LOCAL_LIBFGUID ) #include /* The definitions in are copied here * for local use of libfguid */ #else #include #define LIBFGUID_VERSION 20170112 /* The version string */ #define LIBFGUID_VERSION_STRING "20170112" /* 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 #endif libevt-20170120/libfguid/libfguid_identifier.h0000664000175000017500000001307213040331701023255 0ustar00lordyestalordyesta00000000000000/* * Global (or Universal) Unique Identifier (GUID/UUID) functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_IDENTIFIER_H ) #define _LIBFGUID_INTERNAL_IDENTIFIER_H #include #include #include "libfguid_extern.h" #include "libfguid_libcerror.h" #include "libfguid_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfguid_internal_identifier libfguid_internal_identifier_t; /* The GUID is stored as: * uint32 - uint16 - uint16 - 8 byte array */ struct libfguid_internal_identifier { /* The 4 MSB of the time upper contain the version */ struct { uint32_t lower; uint16_t middle; uint16_t upper; } time; /* The clock sequence upper also contains the reserved */ struct { uint8_t upper; uint8_t lower; } clock_sequence; uint8_t node[ 6 ]; }; LIBFGUID_EXTERN \ int libfguid_identifier_initialize( libfguid_identifier_t **identifier, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_free( libfguid_identifier_t **identifier, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_copy_from_byte_stream( libfguid_identifier_t *identifier, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_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 ) */ libevt-20170120/libfguid/libfguid_unused.h0000664000175000017500000000254613040331701022442 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_UNUSED_H ) #define _LIBFGUID_INTERNAL_UNUSED_H #include #if !defined( LIBFGUID_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFGUID_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFGUID_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFGUID_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFGUID_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBFGUID_INTERNAL_UNUSED_H ) */ libevt-20170120/libfguid/libfguid_error.h0000664000175000017500000000340513040331701022263 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_ERROR_H ) #define _LIBFGUID_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFGUID ) #include #endif #include "libfguid_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFGUID ) LIBFGUID_EXTERN \ void libfguid_error_free( libfguid_error_t **error ); LIBFGUID_EXTERN \ int libfguid_error_fprint( libfguid_error_t *error, FILE *stream ); LIBFGUID_EXTERN \ int libfguid_error_sprint( libfguid_error_t *error, char *string, size_t size ); LIBFGUID_EXTERN \ int libfguid_error_backtrace_fprint( libfguid_error_t *error, FILE *stream ); LIBFGUID_EXTERN \ int libfguid_error_backtrace_sprint( libfguid_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBFGUID ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFGUID_INTERNAL_ERROR_H ) */ libevt-20170120/libfguid/libfguid_libcerror.h0000664000175000017500000000264113040331701023116 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_LIBCERROR_H ) #define _LIBFGUID_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFGUID_LIBCERROR_H ) */ libevt-20170120/libfguid/Makefile.in0000664000175000017500000007536413040342657021212 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFGUID_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFGUID_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFGUID_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFGUID_TRUE@ @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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfguid/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfguid/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfguid_identifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfguid_support.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfguid ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfguid_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libfguid/libfguid_error.c0000664000175000017500000000554013040331701022260 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfguid_error.h" #include "libfguid_libcerror.h" #if !defined( HAVE_LOCAL_LIBFGUID ) /* Free an error and its elements */ void libfguid_error_free( libfguid_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfguid_error_fprint( libfguid_error_t *error, FILE *stream ) { 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 ) */ libevt-20170120/libfguid/libfguid_types.h0000664000175000017500000000275513040331701022305 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_TYPES_H ) #define _LIBFGUID_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFGUID for local use of libfguid * The definitions in are copied here * for local use of libfguid */ #if defined( HAVE_LOCAL_LIBFGUID ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfguid_identifier {} libfguid_identifier_t; #else typedef intptr_t libfguid_identifier_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBFGUID ) */ #endif /* !defined( _LIBFGUID_INTERNAL_TYPES_H ) */ libevt-20170120/libfguid/libfguid_extern.h0000664000175000017500000000254513040331701022443 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_EXTERN_H ) #define _LIBFGUID_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFGUID for local use of libfguid */ #if !defined( HAVE_LOCAL_LIBFGUID ) /* If libtool DLL support is enabled set LIBFGUID_DLL_EXPORT * before including libfguid/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFGUID_DLL_EXPORT #endif #include #else #define LIBFGUID_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBFGUID ) */ #endif /* !defined( _LIBFGUID_INTERNAL_EXTERN_H ) */ libevt-20170120/tests/0000775000175000017500000000000013040343017016472 5ustar00lordyestalordyesta00000000000000libevt-20170120/tests/evt_test_notify.c0000664000175000017500000000533313040331673022074 0ustar00lordyestalordyesta00000000000000/* * Library notification functions test program * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "evt_test_libevt.h" #include "evt_test_macros.h" #include "evt_test_unused.h" /* Tests the libevt_notify_set_verbose function * Returns 1 if successful or 0 if not */ int evt_test_notify_set_verbose( void ) { /* Test invocation of function only */ libevt_notify_set_verbose( 0 ); return( 1 ); } /* Tests the libevt_notify_set_stream function * Returns 1 if successful or 0 if not */ int evt_test_notify_set_stream( void ) { /* Test invocation of function only */ libevt_notify_set_stream( NULL, NULL ); return( 1 ); } /* Tests the libevt_notify_stream_open function * Returns 1 if successful or 0 if not */ int evt_test_notify_stream_open( void ) { /* Test invocation of function only */ libevt_notify_stream_open( NULL, NULL ); return( 1 ); } /* Tests the libevt_notify_stream_close function * Returns 1 if successful or 0 if not */ int evt_test_notify_stream_close( void ) { /* Test invocation of function only */ libevt_notify_stream_close( NULL ); return( 1 ); } /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc EVT_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] EVT_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc EVT_TEST_ATTRIBUTE_UNUSED, char * const argv[] EVT_TEST_ATTRIBUTE_UNUSED ) #endif { EVT_TEST_UNREFERENCED_PARAMETER( argc ) EVT_TEST_UNREFERENCED_PARAMETER( argv ) EVT_TEST_RUN( "libevt_notify_set_verbose", evt_test_notify_set_verbose ) EVT_TEST_RUN( "libevt_notify_set_stream", evt_test_notify_set_stream ) EVT_TEST_RUN( "libevt_notify_stream_open", evt_test_notify_stream_open ) EVT_TEST_RUN( "libevt_notify_stream_close", evt_test_notify_stream_close ) return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libevt-20170120/tests/evt_test_libbfio.h0000664000175000017500000000325113040331673022174 0ustar00lordyestalordyesta00000000000000/* * The libbfio header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVT_TEST_LIBBFIO_H ) #define _EVT_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( _EVT_TEST_LIBBFIO_H ) */ libevt-20170120/tests/test_library.sh0000764000175000017500000000420513040331673021540 0ustar00lordyestalordyesta00000000000000#!/bin/bash # Tests C library functions and types. # # Version: 20170115 EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_IGNORE=77; TEST_PREFIX=`dirname ${PWD}`; TEST_PREFIX=`basename ${TEST_PREFIX} | sed 's/^lib\([^-]*\).*$/\1/'`; TEST_PROFILE="lib${TEST_PREFIX}"; LIBRARY_TESTS="error io_handle notify record record_values"; LIBRARY_TESTS_WITH_INPUT="file support"; OPTION_SETS=""; TEST_TOOL_DIRECTORY="."; INPUT_DIRECTORY="input"; INPUT_GLOB="*"; run_test() { local TEST_NAME=$1; local TEST_DESCRIPTION="Testing: ${TEST_NAME}"; local TEST_EXECUTABLE="${TEST_TOOL_DIRECTORY}/${TEST_PREFIX}_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="${TEST_TOOL_DIRECTORY}/${TEST_PREFIX}_test_${TEST_NAME}"; if ! test -x "${TEST_EXECUTABLE}"; then TEST_EXECUTABLE="${TEST_EXECUTABLE}.exe"; fi run_test_on_input_directory "${TEST_PROFILE}" "${TEST_DESCRIPTION}" "default" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_DIRECTORY}" "${INPUT_GLOB}"; local RESULT=$?; return ${RESULT}; } if ! test -z ${SKIP_LIBRARY_TESTS}; then exit ${EXIT_IGNORE}; fi TEST_RUNNER="tests/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then TEST_RUNNER="./test_runner.sh"; fi 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_DIRECTORY}; 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}; libevt-20170120/tests/pyevt_test_support.py0000664000175000017500000000224613040331673023057 0ustar00lordyestalordyesta00000000000000#!/usr/bin/env python # # Python-bindings support functions test script # # Copyright (C) 2011-2017, Joachim Metz # # Refer to AUTHORS for acknowledgements. # # This software is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This software is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this software. If not, see . import unittest import pyevt class SupportFunctionsTests(unittest.TestCase): """Tests the support functions.""" def test_get_version(self): """Tests the get_version function.""" version = pyevt.get_version() # TODO: check version. # self.assertEqual(version, "00000000") if __name__ == "__main__": unittest.main(verbosity=2) libevt-20170120/tests/test_python_module.sh0000775000175000017500000000363613040333750022771 0ustar00lordyestalordyesta00000000000000#!/bin/bash # Tests Python module functions and types. # # Version: 20170115 EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_IGNORE=77; TEST_PREFIX=`dirname ${PWD}`; TEST_PREFIX=`basename ${TEST_PREFIX} | sed 's/^lib\([^-]*\).*$/\1/'`; TEST_PROFILE="py${TEST_PREFIX}"; TEST_FUNCTIONS="support"; TEST_FUNCTIONS_WITH_INPUT="file"; OPTION_SETS=""; TEST_TOOL_DIRECTORY="."; INPUT_DIRECTORY="input"; INPUT_GLOB="*"; test_python_function() { local TEST_FUNCTION=$1; local TEST_DESCRIPTION="Testing Python-bindings functions: ${TEST_FUNCTION}"; local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/py${TEST_PREFIX}_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}/py${TEST_PREFIX}_test_${TEST_FUNCTION}.py"; run_test_on_input_directory "${TEST_PROFILE}" "${TEST_DESCRIPTION}" "default" "${OPTION_SETS}" "${TEST_SCRIPT}" "${INPUT_DIRECTORY}" "${INPUT_GLOB}"; local RESULT=$?; return ${RESULT}; } if ! test -z ${SKIP_PYTHON_TESTS}; then exit ${EXIT_IGNORE}; fi TEST_RUNNER="tests/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then TEST_RUNNER="./test_runner.sh"; fi if ! test -f "${TEST_RUNNER}"; then echo "Missing test runner: ${TEST_RUNNER}"; exit ${EXIT_FAILURE}; fi source ${TEST_RUNNER}; RESULT=${EXIT_IGNORE}; for TEST_FUNCTION in ${TEST_FUNCTIONS}; do test_python_function "${TEST_FUNCTION}"; 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_FUNCTION in ${TEST_FUNCTIONS_WITH_INPUT}; do test_python_function_with_input "${TEST_FUNCTION}"; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done exit ${RESULT}; libevt-20170120/tests/evt_test_unused.h0000664000175000017500000000267113040331673022076 0ustar00lordyestalordyesta00000000000000/* * The unused definition * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVT_TEST_UNUSED_H ) #define _EVT_TEST_UNUSED_H #include #if !defined( EVT_TEST_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define EVT_TEST_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define EVT_TEST_ATTRIBUTE_UNUSED #endif /* defined( __GNUC__ ) && __GNUC__ >= 3 */ #endif /* !defined( EVT_TEST_ATTRIBUTE_UNUSED ) */ #if defined( _MSC_VER ) #define EVT_TEST_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define EVT_TEST_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif /* defined( _MSC_VER ) */ #endif /* !defined( _EVT_TEST_UNUSED_H ) */ libevt-20170120/tests/Makefile.am0000664000175000017500000000601313040333653020533 0ustar00lordyestalordyesta00000000000000AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_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@ \ @LIBEVT_DLL_IMPORT@ if HAVE_PYTHON_TESTS TESTS_PYEVT = \ test_python_module.sh endif TESTS = \ test_library.sh \ test_evtinfo.sh \ test_evtexport.sh \ $(TESTS_PYEVT) check_SCRIPTS = \ pyevt_test_file.py \ pyevt_test_support.py \ test_evtexport.sh \ test_evtinfo.sh \ test_library.sh \ test_python_module.sh \ test_runner.sh EXTRA_DIST = \ $(check_SCRIPTS) check_PROGRAMS = \ evt_test_error \ evt_test_file \ evt_test_io_handle \ evt_test_notify \ evt_test_record \ evt_test_record_values \ evt_test_support evt_test_error_SOURCES = \ evt_test_error.c \ evt_test_libevt.h \ evt_test_macros.h \ evt_test_unused.h evt_test_error_LDADD = \ ../libevt/libevt.la evt_test_file_SOURCES = \ evt_test_file.c \ evt_test_getopt.c evt_test_getopt.h \ evt_test_libcerror.h \ evt_test_libclocale.h \ evt_test_libcnotify.h \ evt_test_libevt.h \ evt_test_libuna.h \ evt_test_macros.h \ evt_test_memory.c evt_test_memory.h evt_test_file_LDADD = \ @LIBUNA_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libevt/libevt.la \ @LIBCTHREADS_LIBADD@ \ @LIBCERROR_LIBADD@ \ @PTHREAD_LIBADD@ evt_test_io_handle_SOURCES = \ evt_test_io_handle.c \ evt_test_libcerror.h \ evt_test_libevt.h \ evt_test_macros.h \ evt_test_memory.c evt_test_memory.h \ evt_test_unused.h evt_test_io_handle_LDADD = \ ../libevt/libevt.la \ @LIBCERROR_LIBADD@ evt_test_notify_SOURCES = \ evt_test_libevt.h \ evt_test_macros.h \ evt_test_notify.c \ evt_test_unused.h evt_test_notify_LDADD = \ ../libevt/libevt.la evt_test_record_SOURCES = \ evt_test_libcerror.h \ evt_test_libevt.h \ evt_test_macros.h \ evt_test_memory.c evt_test_memory.h \ evt_test_record.c \ evt_test_unused.h evt_test_record_LDADD = \ ../libevt/libevt.la \ @LIBCERROR_LIBADD@ evt_test_record_values_SOURCES = \ evt_test_libcerror.h \ evt_test_libevt.h \ evt_test_macros.h \ evt_test_memory.c evt_test_memory.h \ evt_test_record_values.c \ evt_test_unused.h evt_test_record_values_LDADD = \ ../libevt/libevt.la \ @LIBCERROR_LIBADD@ evt_test_support_SOURCES = \ evt_test_getopt.c evt_test_getopt.h \ evt_test_libbfio.h \ evt_test_libcerror.h \ evt_test_libclocale.h \ evt_test_libcnotify.h \ evt_test_libevt.h \ evt_test_libuna.h \ evt_test_macros.h \ evt_test_support.c evt_test_support_LDADD = \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libevt/libevt.la \ @LIBCERROR_LIBADD@ MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile libevt-20170120/tests/evt_test_memory.h0000664000175000017500000000265413040331673022104 0ustar00lordyestalordyesta00000000000000/* * Memory allocation functions for testing * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVT_TEST_MEMORY_H ) #define _EVT_TEST_MEMORY_H #include #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ ) #define HAVE_EVT_TEST_MEMORY 1 extern int evt_test_malloc_attempts_before_fail; extern int evt_test_memcpy_attempts_before_fail; extern int evt_test_memset_attempts_before_fail; extern int evt_test_realloc_attempts_before_fail; #endif /* defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _EVT_TEST_MEMORY_H ) */ libevt-20170120/tests/evt_test_libevt.h0000664000175000017500000000232013040331673022047 0ustar00lordyestalordyesta00000000000000/* * The internal libevt header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVT_TEST_LIBEVT_H ) #define _EVT_TEST_LIBEVT_H #include /* If Cygwin libtool DLL support is enabled and do not want to create static * executables set LIBEVT_DLL_IMPORT before including libevt.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBEVT_DLL_IMPORT #endif #include #endif /* !defined( _EVT_TEST_LIBEVT_H ) */ libevt-20170120/tests/evt_test_libcerror.h0000664000175000017500000000264113040331673022553 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVT_TEST_LIBCERROR_H ) #define _EVT_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( _EVT_TEST_LIBCERROR_H ) */ libevt-20170120/tests/evt_test_libcnotify.h0000664000175000017500000000266313040331673022736 0ustar00lordyestalordyesta00000000000000/* * The internal libcnotify header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVT_TEST_LIBCNOTIFY_H ) #define _EVT_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( _EVT_TEST_LIBCNOTIFY_H ) */ libevt-20170120/tests/evt_test_libclocale.h0000664000175000017500000000266613040331673022670 0ustar00lordyestalordyesta00000000000000/* * The internal libclocale header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVT_TEST_LIBCLOCALE_H ) #define _EVT_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( _EVT_TEST_LIBCLOCALE_H ) */ libevt-20170120/tests/evt_test_getopt.c0000664000175000017500000001016413040331673022064 0ustar00lordyestalordyesta00000000000000/* * GetOpt functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "evt_test_getopt.h" #include "evt_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; /* 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 evt_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 = "evt_test_getopt"; size_t options_string_length = 0; if( optind >= argument_count ) { return( (system_integer_t) -1 ); } argument_value = argument_values[ optind ]; /* Check if the argument value is not an empty string */ if( *argument_value == 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++; } } /* 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 ) */ libevt-20170120/tests/evt_test_record_values.c0000664000175000017500000002575413040331673023432 0ustar00lordyestalordyesta00000000000000/* * Library record_values type test program * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "evt_test_libcerror.h" #include "evt_test_libevt.h" #include "evt_test_macros.h" #include "evt_test_memory.h" #include "evt_test_unused.h" #include "../libevt/libevt_record_values.h" #if defined( __GNUC__ ) /* Tests the libevt_record_values_initialize function * Returns 1 if successful or 0 if not */ int evt_test_record_values_initialize( void ) { libcerror_error_t *error = NULL; libevt_record_values_t *record_values = NULL; int result = 0; #if defined( HAVE_EVT_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 = libevt_record_values_initialize( &record_values, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "record_values", record_values ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libevt_record_values_free( &record_values, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "record_values", record_values ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libevt_record_values_initialize( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); record_values = (libevt_record_values_t *) 0x12345678UL; result = libevt_record_values_initialize( &record_values, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); record_values = NULL; #if defined( HAVE_EVT_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libevt_record_values_initialize with malloc failing */ evt_test_malloc_attempts_before_fail = test_number; result = libevt_record_values_initialize( &record_values, &error ); if( evt_test_malloc_attempts_before_fail != -1 ) { evt_test_malloc_attempts_before_fail = -1; if( record_values != NULL ) { libevt_record_values_free( &record_values, NULL ); } } else { EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NULL( "record_values", record_values ); EVT_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 libevt_record_values_initialize with memset failing */ evt_test_memset_attempts_before_fail = test_number; result = libevt_record_values_initialize( &record_values, &error ); if( evt_test_memset_attempts_before_fail != -1 ) { evt_test_memset_attempts_before_fail = -1; if( record_values != NULL ) { libevt_record_values_free( &record_values, NULL ); } } else { EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NULL( "record_values", record_values ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_EVT_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( record_values != NULL ) { libevt_record_values_free( &record_values, NULL ); } return( 0 ); } /* Tests the libevt_record_values_free function * Returns 1 if successful or 0 if not */ int evt_test_record_values_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libevt_record_values_free( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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 libevt_record_values_clone function * Returns 1 if successful or 0 if not */ int evt_test_record_values_clone( void ) { libcerror_error_t *error = NULL; libevt_record_values_t *destination_record_values = NULL; libevt_record_values_t *source_record_values = NULL; int result = 0; /* Initialize test */ result = libevt_record_values_initialize( &source_record_values, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "source_record_values", source_record_values ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libevt_record_values_clone( &destination_record_values, source_record_values, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "destination_record_values", destination_record_values ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libevt_record_values_free( &destination_record_values, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "destination_record_values", destination_record_values ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libevt_record_values_clone( &destination_record_values, NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "destination_record_values", destination_record_values ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libevt_record_values_clone( NULL, source_record_values, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libevt_record_values_free( &source_record_values, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "source_record_values", source_record_values ); EVT_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( destination_record_values != NULL ) { libevt_record_values_free( &destination_record_values, NULL ); } if( source_record_values != NULL ) { libevt_record_values_free( &source_record_values, NULL ); } return( 0 ); } /* Tests the libevt_record_values_get_type function * Returns 1 if successful or 0 if not */ int evt_test_record_values_get_type( void ) { libcerror_error_t *error = NULL; libevt_record_values_t *record_values = NULL; uint8_t type = 0; int result = 0; int type_is_set = 0; /* Initialize test */ result = libevt_record_values_initialize( &record_values, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "record_values", record_values ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libevt_record_values_get_type( record_values, &type, &error ); EVT_TEST_ASSERT_NOT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); type_is_set = result; /* Test error cases */ result = libevt_record_values_get_type( NULL, &type, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); if( type_is_set != 0 ) { result = libevt_record_values_get_type( record_values, NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } /* Clean up */ result = libevt_record_values_free( &record_values, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "record_values", record_values ); EVT_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( record_values != NULL ) { libevt_record_values_free( &record_values, NULL ); } return( 0 ); } #endif /* defined( __GNUC__ ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc EVT_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] EVT_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc EVT_TEST_ATTRIBUTE_UNUSED, char * const argv[] EVT_TEST_ATTRIBUTE_UNUSED ) #endif { EVT_TEST_UNREFERENCED_PARAMETER( argc ) EVT_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) EVT_TEST_RUN( "libevt_record_values_initialize", evt_test_record_values_initialize ); EVT_TEST_RUN( "libevt_record_values_free", evt_test_record_values_free ); EVT_TEST_RUN( "libevt_record_values_clone", evt_test_record_values_clone ); /* TODO: add tests for libevt_record_values_read */ /* TODO: add tests for libevt_record_values_read_event */ /* TODO: add tests for libevt_record_values_read_end_of_file */ EVT_TEST_RUN( "libevt_record_values_get_type", evt_test_record_values_get_type ); /* TODO: add tests for libevt_record_values_read_element_data */ #endif /* defined( __GNUC__ ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libevt-20170120/tests/test_runner.sh0000664000175000017500000007407013040331673021413 0ustar00lordyestalordyesta00000000000000#!/bin/bash # Bash functions to run an executable for testing. # # Version: 20161115 # # 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. 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 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=$@; local INPUT_BASENAME=`basename ${INPUT_DIRECTORY}`; for LIST_ELEMENT in `echo "${IGNORE_LIST}" | tr ' ' '\n'`; 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="${TEST_EXECUTABLE}"; echo ${LIBRARY_NAME} | grep 'tools' > /dev/null 2>&1; if test $? -eq ${EXIT_SUCCESS}; then LIBRARY_NAME=`dirname ${LIBRARY_NAME}`; LIBRARY_NAME=`dirname ${LIBRARY_NAME}`; 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 # # Globals: # PYTHON_VERSION # # 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}`; PYTHON_VERSION=`echo ${PYTHON_VERSION} | cut -c1`; local PYTHON_MODULE_PATH="${TEST_EXECUTABLE}/${PYTHON_MODULE_NAME}-python${PYTHON_VERSION}/.libs"; if ! test -d "${PYTHON_MODULE_PATH}"; then PYTHON_MODULE_PATH="../${PYTHON_MODULE_NAME}-python${PYTHON_VERSION}/.libs"; fi if ! test -d "${PYTHON_MODULE_PATH}"; then PYTHON_MODULE_PATH="${TEST_EXECUTABLE}/${PYTHON_MODULE_NAME}/.libs"; fi if ! test -d "${PYTHON_MODULE_PATH}"; then PYTHON_MODULE_PATH="../${PYTHON_MODULE_NAME}/.libs"; fi echo "${PYTHON_MODULE_PATH}"; } # Determines the test 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 option set # # Returns: # a string containing the test input files # get_testion_option_file() { local TEST_SET_DIRECTORY=$1; local INPUT_FILE=$2; local OPTION_SET=$3; local INPUT_NAME=`basename "${INPUT_FILE}"`; local OPTION_FILE="${TEST_SET_DIRECTORY}/${INPUT_NAME}.${OPTION_SET}"; echo "${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'`; fi echo ${IGNORE_LIST}; } # Reads the test set 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 option set # # Returns: # a string containing the ignore list # read_option_file() { local TEST_SET_DIRECTORY=$1; local INPUT_FILE=$2; local OPTION_SET=$3; local OPTION_FILE=$(get_testion_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); local OPTIONS=() local OPTIONS_STRING=`cat "${OPTION_FILE}" | head -n 1 | sed 's/[\r\n]*$//'`; echo "${OPTIONS_STRING}"; } # Runs the test with optional arguments. # # Globals: # CHECK_WITH_GDB # CHECK_WITH_STDERR # CHECK_WITH_VALGRIND # PYTHON_VERSION # # 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`; # 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; then local PYTHON=`which python${PYTHON_VERSION} 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_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 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 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 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 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_GDB # CHECK_WITH_STDERR # CHECK_WITH_VALGRIND # PYTHON_VERSION # # 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`; # 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; then local PYTHON=`which python${PYTHON_VERSION} 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_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 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 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 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 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 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 OPTIONS=(); local TEST_OUTPUT="${INPUT_NAME}"; if test -n "${OPTION_SET}"; then OPTIONS_STRING=$(read_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); IFS=" " read -a OPTIONS <<< "${OPTIONS_STRING}"; 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[@]} ${OPTIONS[@]}; 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[@]} ${OPTIONS[@]} | sed '1,2d' > "${TEST_LOG}"); RESULT=$?; 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 else run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]} ${OPTIONS[@]}; RESULT=$?; fi rm -rf ${TMPDIR}; if test -n "${TEST_DESCRIPTION}"; then if test -z "${OPTION_SET}"; then echo -n "${TEST_DESCRIPTION} with input: ${INPUT_FILE}"; else echo -n "${TEST_DESCRIPTION} with option: ${OPTION_SET} and input: ${INPUT_FILE}"; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; then echo " (FAIL)"; else echo " (PASS)"; fi fi return ${RESULT}; } # Runs the test with options 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 option sets # 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_with_options() { local TEST_SET_DIRECTORY=$1; local TEST_DESCRIPTION=$2; local TEST_MODE=$3; local OPTION_SETS=$4; local TEST_EXECUTABLE=$5; local INPUT_FILE=$6; shift 6; local ARGUMENTS=$@; local RESULT=${EXIT_SUCCESS}; local TESTED_WITH_OPTIONS=0; for OPTION_SET in `echo ${OPTION_SETS} | tr ' ' '\n'`; do local OPTION_FILE=$(get_testion_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); if ! test -f ${OPTION_FILE}; then continue fi run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]}; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi TESTED_WITH_OPTIONS=1; done if test ${RESULT} -eq ${EXIT_SUCCESS} && test ${TESTED_WITH_OPTIONS} -eq 0; then run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]}; RESULT=$?; fi return ${RESULT}; } # Runs the test on the input directory. # # Globals: # CHECK_WITH_GDB # CHECK_WITH_VALGRIND # # Arguments: # a string containing the name of the test profile # a string containing the description of the test # a string containing the test mode, supported tests modes are: # default: the test executable should be be run without any test # conditions. # with_callback: the test executable should be run and the callback # function should be called afterwards. The name of the # callback function is "test_callback". # with_stdout_reference: the test executable should be run and its output # to stdout, except for the first 2 lines, should # be compared to a reference file, if available. # Note the globals override the test mode. # a string containing the name of the option sets # a string containing the path of the test executable # a string containing the path of the test input directory # a string containing the input glob # an array containing the arguments for the test executable # # Returns: # an integer containg the exit status of the test executable # run_test_on_input_directory() { local TEST_PROFILE=$1; local TEST_DESCRIPTION=$2; local TEST_MODE=$3; local OPTION_SETS=$4; local TEST_EXECUTABLE=$5; local TEST_INPUT_DIRECTORY=$6; local INPUT_GLOB=$7; shift 7; local ARGUMENTS=$@; assert_availability_binaries; if ! test "${TEST_MODE}" = "default" && test "${TEST_MODE}" != "with_callback" && ! test "${TEST_MODE}" = "with_stdout_reference"; then echo "Unsupported test mode: ${TEST_MODE}"; echo ""; return ${EXIT_FAILURE}; fi if ! test -f "${TEST_EXECUTABLE}"; then echo "Missing test executable: ${TEST_EXECUTABLE}"; echo ""; return ${EXIT_FAILURE}; fi if ! test -d "${TEST_INPUT_DIRECTORY}"; then echo "Test input directory: ${TEST_INPUT_DIRECTORY} not found."; return ${EXIT_IGNORE}; fi local RESULT=`ls ${TEST_INPUT_DIRECTORY}/* | tr ' ' '\n' | wc -l`; if test ${RESULT} -eq ${EXIT_SUCCESS}; then echo "No files or directories found in the test input directory: ${TEST_INPUT_DIRECTORY}"; return ${EXIT_IGNORE}; fi local TEST_PROFILE_DIRECTORY=$(get_test_profile_directory "${TEST_INPUT_DIRECTORY}" "${TEST_PROFILE}"); local IGNORE_LIST=$(read_ignore_list "${TEST_PROFILE_DIRECTORY}"); RESULT=${EXIT_SUCCESS}; for TEST_SET_INPUT_DIRECTORY in ${TEST_INPUT_DIRECTORY}/*; 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}"); local INPUT_FILES=""; if test -f "${TEST_SET_DIRECTORY}/files"; then while read -r INPUT_FILE; do run_test_on_input_file_with_options "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]}; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then return ${RESULT}; fi done < <(cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"); else while read -r INPUT_FILE; do run_test_on_input_file_with_options "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]}; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then return ${RESULT}; fi done < <(ls -1 ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}); fi done return ${RESULT}; } libevt-20170120/tests/evt_test_support.c0000664000175000017500000005316513040331673022306 0ustar00lordyestalordyesta00000000000000/* * Library support functions test program * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "evt_test_getopt.h" #include "evt_test_libbfio.h" #include "evt_test_libcerror.h" #include "evt_test_libclocale.h" #include "evt_test_libevt.h" #include "evt_test_libuna.h" #include "evt_test_macros.h" #include "evt_test_unused.h" LIBEVT_EXTERN \ int libevt_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libcerror_error_t **error ); /* Retrieves source as a narrow string * Returns 1 if successful or -1 on error */ int evt_test_support_get_narrow_source( const system_character_t *source, char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ) { static char *function = "evt_test_support_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 evt_test_support_get_wide_source( const system_character_t *source, wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ) { static char *function = "evt_test_support_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 ) */ /* Tests the libevt_get_version function * Returns 1 if successful or 0 if not */ int evt_test_get_version( void ) { const char *version_string = NULL; int result = 0; version_string = libevt_get_version(); result = narrow_string_compare( version_string, LIBEVT_VERSION_STRING, 9 ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); return( 1 ); on_error: return( 0 ); } /* Tests the libevt_get_access_flags_read function * Returns 1 if successful or 0 if not */ int evt_test_get_access_flags_read( void ) { int access_flags = 0; access_flags = libevt_get_access_flags_read(); EVT_TEST_ASSERT_EQUAL_INT( "access_flags", access_flags, LIBEVT_ACCESS_FLAG_READ ); return( 1 ); on_error: return( 0 ); } /* Tests the libevt_get_codepage function * Returns 1 if successful or 0 if not */ int evt_test_get_codepage( void ) { libcerror_error_t *error = NULL; int codepage = 0; int result = 0; result = libevt_get_codepage( &codepage, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libevt_get_codepage( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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 libevt_set_codepage function * Returns 1 if successful or 0 if not */ int evt_test_set_codepage( void ) { libcerror_error_t *error = NULL; int result = 0; result = libevt_set_codepage( 0, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libevt_set_codepage( -1, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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 libevt_check_file_signature function * Returns 1 if successful or 0 if not */ int evt_test_check_file_signature( const system_character_t *source ) { char narrow_source[ 256 ]; libcerror_error_t *error = NULL; int result = 0; /* Initialize test */ result = evt_test_support_get_narrow_source( source, narrow_source, 256, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test check file signature */ result = libevt_check_file_signature( narrow_source, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libevt_check_file_signature( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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( HAVE_WIDE_CHARACTER_TYPE ) /* Tests the libevt_check_file_signature_wide function * Returns 1 if successful or 0 if not */ int evt_test_check_file_signature_wide( const system_character_t *source ) { wchar_t wide_source[ 256 ]; libcerror_error_t *error = NULL; int result = 0; /* Initialize test */ result = evt_test_support_get_wide_source( source, wide_source, 256, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test check file signature */ result = libevt_check_file_signature_wide( wide_source, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libevt_check_file_signature_wide( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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( HAVE_WIDE_CHARACTER_TYPE ) */ /* Tests the libevt_check_file_signature_file_io_handle function * Returns 1 if successful or 0 if not */ int evt_test_check_file_signature_file_io_handle( const system_character_t *source ) { uint8_t empty_block[ 512 ]; 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 */ result = libbfio_file_initialize( &file_io_handle, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); EVT_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 EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libbfio_handle_open( file_io_handle, LIBBFIO_OPEN_READ, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test check file signature */ result = libevt_check_file_signature_file_io_handle( file_io_handle, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libevt_check_file_signature_file_io_handle( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libbfio_handle_close( file_io_handle, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libbfio_handle_free( &file_io_handle, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "file_io_handle", file_io_handle ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Initialize test */ memset_result = memory_set( empty_block, 0, sizeof( uint8_t ) * 512 ); EVT_TEST_ASSERT_IS_NOT_NULL( "memset_result", memset_result ); result = libbfio_memory_range_initialize( &file_io_handle, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libbfio_memory_range_set( file_io_handle, empty_block, sizeof( uint8_t ) * 512, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libbfio_handle_open( file_io_handle, LIBBFIO_OPEN_READ, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test check file signature */ result = libevt_check_file_signature_file_io_handle( file_io_handle, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Clean up */ result = libbfio_handle_close( file_io_handle, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libbfio_handle_free( &file_io_handle, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "file_io_handle", file_io_handle ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* TODO test file too small */ 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 = evt_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 ]; } EVT_TEST_RUN( "libevt_get_version", evt_test_get_version ); EVT_TEST_RUN( "libevt_get_access_flags_read", evt_test_get_access_flags_read ); EVT_TEST_RUN( "libevt_get_codepage", evt_test_get_codepage ); EVT_TEST_RUN( "libevt_set_codepage", evt_test_set_codepage ); #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) if( source != NULL ) { EVT_TEST_RUN_WITH_ARGS( "libevt_check_file_signature", evt_test_check_file_signature, source ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) EVT_TEST_RUN_WITH_ARGS( "libevt_check_file_signature_wide", evt_test_check_file_signature_wide, source ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ EVT_TEST_RUN_WITH_ARGS( "libevt_check_file_signature_file_io_handle", evt_test_check_file_signature_file_io_handle, source ); } #endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libevt-20170120/tests/test_evtexport.sh0000775000175000017500000000235713040331673022144 0ustar00lordyestalordyesta00000000000000#!/bin/bash # Export tool testing script # # Version: 20160328 EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_IGNORE=77; TEST_PREFIX=`dirname ${PWD}`; TEST_PREFIX=`basename ${TEST_PREFIX} | sed 's/^lib\([^-]*\).*$/\1/'`; TEST_SUFFIX="export"; TEST_PROFILE="${TEST_PREFIX}${TEST_SUFFIX}"; TEST_DESCRIPTION="${TEST_PREFIX}${TEST_SUFFIX}"; OPTION_SETS=""; TEST_TOOL_DIRECTORY="../${TEST_PREFIX}tools"; TEST_TOOL="${TEST_PREFIX}${TEST_SUFFIX}"; INPUT_DIRECTORY="input"; INPUT_GLOB="*"; if ! test -z ${SKIP_TOOLS_TESTS}; then exit ${EXIT_IGNORE}; fi TEST_EXECUTABLE="${TEST_TOOL_DIRECTORY}/${TEST_TOOL}"; if ! test -x "${TEST_EXECUTABLE}"; then TEST_EXECUTABLE="${TEST_TOOL_DIRECTORY}/${TEST_TOOL}.exe"; fi if ! test -x "${TEST_EXECUTABLE}"; then echo "Missing test executable: ${TEST_EXECUTABLE}"; exit ${EXIT_FAILURE}; fi TEST_RUNNER="tests/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then TEST_RUNNER="./test_runner.sh"; fi if ! test -f "${TEST_RUNNER}"; then echo "Missing test runner: ${TEST_RUNNER}"; exit ${EXIT_FAILURE}; fi source ${TEST_RUNNER}; run_test_on_input_directory "${TEST_PROFILE}" "${TEST_DESCRIPTION}" "with_stdout_reference" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_DIRECTORY}" "${INPUT_GLOB}"; RESULT=$?; exit ${RESULT}; libevt-20170120/tests/pyevt_test_file.py0000664000175000017500000001036413040331673022262 0ustar00lordyestalordyesta00000000000000#!/usr/bin/env python # # Python-bindings file type test script # # Copyright (C) 2011-2017, Joachim Metz # # Refer to AUTHORS for acknowledgements. # # This software is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This software is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this software. If not, see . import argparse import os import sys import unittest import pyevt class FileTypeTests(unittest.TestCase): """Tests the file type.""" def test_signal_abort(self): """Tests the signal_abort function.""" evt_file = pyevt.file() evt_file.signal_abort() def test_open(self): """Tests the open function.""" if not unittest.source: return evt_file = pyevt.file() evt_file.open(unittest.source) with self.assertRaises(IOError): evt_file.open(unittest.source) evt_file.close() with self.assertRaises(TypeError): evt_file.open(None) with self.assertRaises(ValueError): evt_file.open(unittest.source, mode="w") def test_open_file_object(self): """Tests the open_file_object function.""" if not unittest.source: return file_object = open(unittest.source, "rb") evt_file = pyevt.file() evt_file.open_file_object(file_object) with self.assertRaises(IOError): evt_file.open_file_object(file_object) evt_file.close() # TODO: change IOError into TypeError with self.assertRaises(IOError): evt_file.open_file_object(None) with self.assertRaises(ValueError): evt_file.open_file_object(file_object, mode="w") def test_close(self): """Tests the close function.""" if not unittest.source: return evt_file = pyevt.file() with self.assertRaises(IOError): evt_file.close() def test_open_close(self): """Tests the open and close functions.""" if not unittest.source: return evt_file = pyevt.file() # Test open and close. evt_file.open(unittest.source) evt_file.close() # Test open and close a second time to validate clean up on close. evt_file.open(unittest.source) evt_file.close() file_object = open(unittest.source, "rb") # Test open_file_object and close. evt_file.open_file_object(file_object) evt_file.close() # Test open_file_object and close a second time to validate clean up on close. evt_file.open_file_object(file_object) evt_file.close() # Test open_file_object and close and dereferencing file_object. evt_file.open_file_object(file_object) del file_object evt_file.close() def test_set_ascii_codepage(self): """Tests the set_ascii_codepage function.""" supported_codepages = ( "ascii", "cp874", "cp932", "cp936", "cp949", "cp950", "cp1250", "cp1251", "cp1252", "cp1253", "cp1254", "cp1255", "cp1256", "cp1257", "cp1258") evt_file = pyevt.file() for codepage in supported_codepages: evt_file.set_ascii_codepage(codepage) unsupported_codepages = ( "iso-8859-1", "iso-8859-2", "iso-8859-3", "iso-8859-4", "iso-8859-5", "iso-8859-6", "iso-8859-7", "iso-8859-8", "iso-8859-9", "iso-8859-10", "iso-8859-11", "iso-8859-13", "iso-8859-14", "iso-8859-15", "iso-8859-16", "koi8_r", "koi8_u") for codepage in unsupported_codepages: with self.assertRaises(RuntimeError): evt_file.set_ascii_codepage(codepage) if __name__ == "__main__": argument_parser = argparse.ArgumentParser() argument_parser.add_argument( "source", nargs="?", action="store", metavar="PATH", default=None, help="The 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) libevt-20170120/tests/Makefile.in0000664000175000017500000014445613040342660020560 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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 = evt_test_error$(EXEEXT) evt_test_file$(EXEEXT) \ evt_test_io_handle$(EXEEXT) evt_test_notify$(EXEEXT) \ evt_test_record$(EXEEXT) evt_test_record_values$(EXEEXT) \ evt_test_support$(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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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_evt_test_error_OBJECTS = evt_test_error.$(OBJEXT) evt_test_error_OBJECTS = $(am_evt_test_error_OBJECTS) evt_test_error_DEPENDENCIES = ../libevt/libevt.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_evt_test_file_OBJECTS = evt_test_file.$(OBJEXT) \ evt_test_getopt.$(OBJEXT) evt_test_memory.$(OBJEXT) evt_test_file_OBJECTS = $(am_evt_test_file_OBJECTS) evt_test_file_DEPENDENCIES = ../libevt/libevt.la am_evt_test_io_handle_OBJECTS = evt_test_io_handle.$(OBJEXT) \ evt_test_memory.$(OBJEXT) evt_test_io_handle_OBJECTS = $(am_evt_test_io_handle_OBJECTS) evt_test_io_handle_DEPENDENCIES = ../libevt/libevt.la am_evt_test_notify_OBJECTS = evt_test_notify.$(OBJEXT) evt_test_notify_OBJECTS = $(am_evt_test_notify_OBJECTS) evt_test_notify_DEPENDENCIES = ../libevt/libevt.la am_evt_test_record_OBJECTS = evt_test_memory.$(OBJEXT) \ evt_test_record.$(OBJEXT) evt_test_record_OBJECTS = $(am_evt_test_record_OBJECTS) evt_test_record_DEPENDENCIES = ../libevt/libevt.la am_evt_test_record_values_OBJECTS = evt_test_memory.$(OBJEXT) \ evt_test_record_values.$(OBJEXT) evt_test_record_values_OBJECTS = $(am_evt_test_record_values_OBJECTS) evt_test_record_values_DEPENDENCIES = ../libevt/libevt.la am_evt_test_support_OBJECTS = evt_test_getopt.$(OBJEXT) \ evt_test_support.$(OBJEXT) evt_test_support_OBJECTS = $(am_evt_test_support_OBJECTS) evt_test_support_DEPENDENCIES = ../libevt/libevt.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__depfiles_maybe = depfiles 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 = $(evt_test_error_SOURCES) $(evt_test_file_SOURCES) \ $(evt_test_io_handle_SOURCES) $(evt_test_notify_SOURCES) \ $(evt_test_record_SOURCES) $(evt_test_record_values_SOURCES) \ $(evt_test_support_SOURCES) DIST_SOURCES = $(evt_test_error_SOURCES) $(evt_test_file_SOURCES) \ $(evt_test_io_handle_SOURCES) $(evt_test_notify_SOURCES) \ $(evt_test_record_SOURCES) $(evt_test_record_values_SOURCES) \ $(evt_test_support_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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)` ETAGS = etags CTAGS = ctags 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` 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_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@ \ @LIBEVT_DLL_IMPORT@ @HAVE_PYTHON_TESTS_TRUE@TESTS_PYEVT = \ @HAVE_PYTHON_TESTS_TRUE@ test_python_module.sh TESTS = \ test_library.sh \ test_evtinfo.sh \ test_evtexport.sh \ $(TESTS_PYEVT) check_SCRIPTS = \ pyevt_test_file.py \ pyevt_test_support.py \ test_evtexport.sh \ test_evtinfo.sh \ test_library.sh \ test_python_module.sh \ test_runner.sh EXTRA_DIST = \ $(check_SCRIPTS) evt_test_error_SOURCES = \ evt_test_error.c \ evt_test_libevt.h \ evt_test_macros.h \ evt_test_unused.h evt_test_error_LDADD = \ ../libevt/libevt.la evt_test_file_SOURCES = \ evt_test_file.c \ evt_test_getopt.c evt_test_getopt.h \ evt_test_libcerror.h \ evt_test_libclocale.h \ evt_test_libcnotify.h \ evt_test_libevt.h \ evt_test_libuna.h \ evt_test_macros.h \ evt_test_memory.c evt_test_memory.h evt_test_file_LDADD = \ @LIBUNA_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libevt/libevt.la \ @LIBCTHREADS_LIBADD@ \ @LIBCERROR_LIBADD@ \ @PTHREAD_LIBADD@ evt_test_io_handle_SOURCES = \ evt_test_io_handle.c \ evt_test_libcerror.h \ evt_test_libevt.h \ evt_test_macros.h \ evt_test_memory.c evt_test_memory.h \ evt_test_unused.h evt_test_io_handle_LDADD = \ ../libevt/libevt.la \ @LIBCERROR_LIBADD@ evt_test_notify_SOURCES = \ evt_test_libevt.h \ evt_test_macros.h \ evt_test_notify.c \ evt_test_unused.h evt_test_notify_LDADD = \ ../libevt/libevt.la evt_test_record_SOURCES = \ evt_test_libcerror.h \ evt_test_libevt.h \ evt_test_macros.h \ evt_test_memory.c evt_test_memory.h \ evt_test_record.c \ evt_test_unused.h evt_test_record_LDADD = \ ../libevt/libevt.la \ @LIBCERROR_LIBADD@ evt_test_record_values_SOURCES = \ evt_test_libcerror.h \ evt_test_libevt.h \ evt_test_macros.h \ evt_test_memory.c evt_test_memory.h \ evt_test_record_values.c \ evt_test_unused.h evt_test_record_values_LDADD = \ ../libevt/libevt.la \ @LIBCERROR_LIBADD@ evt_test_support_SOURCES = \ evt_test_getopt.c evt_test_getopt.h \ evt_test_libbfio.h \ evt_test_libcerror.h \ evt_test_libclocale.h \ evt_test_libcnotify.h \ evt_test_libevt.h \ evt_test_libuna.h \ evt_test_macros.h \ evt_test_support.c evt_test_support_LDADD = \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libevt/libevt.la \ @LIBCERROR_LIBADD@ MAINTAINERCLEANFILES = \ Makefile.in 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list evt_test_error$(EXEEXT): $(evt_test_error_OBJECTS) $(evt_test_error_DEPENDENCIES) $(EXTRA_evt_test_error_DEPENDENCIES) @rm -f evt_test_error$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evt_test_error_OBJECTS) $(evt_test_error_LDADD) $(LIBS) evt_test_file$(EXEEXT): $(evt_test_file_OBJECTS) $(evt_test_file_DEPENDENCIES) $(EXTRA_evt_test_file_DEPENDENCIES) @rm -f evt_test_file$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evt_test_file_OBJECTS) $(evt_test_file_LDADD) $(LIBS) evt_test_io_handle$(EXEEXT): $(evt_test_io_handle_OBJECTS) $(evt_test_io_handle_DEPENDENCIES) $(EXTRA_evt_test_io_handle_DEPENDENCIES) @rm -f evt_test_io_handle$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evt_test_io_handle_OBJECTS) $(evt_test_io_handle_LDADD) $(LIBS) evt_test_notify$(EXEEXT): $(evt_test_notify_OBJECTS) $(evt_test_notify_DEPENDENCIES) $(EXTRA_evt_test_notify_DEPENDENCIES) @rm -f evt_test_notify$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evt_test_notify_OBJECTS) $(evt_test_notify_LDADD) $(LIBS) evt_test_record$(EXEEXT): $(evt_test_record_OBJECTS) $(evt_test_record_DEPENDENCIES) $(EXTRA_evt_test_record_DEPENDENCIES) @rm -f evt_test_record$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evt_test_record_OBJECTS) $(evt_test_record_LDADD) $(LIBS) evt_test_record_values$(EXEEXT): $(evt_test_record_values_OBJECTS) $(evt_test_record_values_DEPENDENCIES) $(EXTRA_evt_test_record_values_DEPENDENCIES) @rm -f evt_test_record_values$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evt_test_record_values_OBJECTS) $(evt_test_record_values_LDADD) $(LIBS) evt_test_support$(EXEEXT): $(evt_test_support_OBJECTS) $(evt_test_support_DEPENDENCIES) $(EXTRA_evt_test_support_DEPENDENCIES) @rm -f evt_test_support$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evt_test_support_OBJECTS) $(evt_test_support_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evt_test_error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evt_test_file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evt_test_getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evt_test_io_handle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evt_test_memory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evt_test_notify.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evt_test_record.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evt_test_record_values.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evt_test_support.Po@am__quote@ .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 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 for $(PACKAGE_STRING)$${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: @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_evtinfo.sh.log: test_evtinfo.sh @p='test_evtinfo.sh'; \ b='test_evtinfo.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_evtexport.sh.log: test_evtexport.sh @p='test_evtexport.sh'; \ b='test_evtexport.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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/tests/evt_test_macros.h0000664000175000017500000001172013040331673022052 0ustar00lordyestalordyesta00000000000000/* * Macros for testing * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVT_TEST_MACROS_H ) #define _EVT_TEST_MACROS_H #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #define EVT_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 EVT_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 EVT_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 EVT_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 EVT_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 EVT_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 EVT_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 EVT_TEST_ASSERT_EQUAL_UINT32( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi32 ") != %" PRIu32 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define EVT_TEST_ASSERT_LESS_THAN_UINT32( name, value, expected_value ) \ if( value >= expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi32 ") >= %" PRIu32 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define EVT_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 EVT_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 EVT_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 EVT_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 EVT_TEST_ASSERT_IS_NOT_NULL( name, value ) \ if( value == NULL ) \ { \ fprintf( stdout, "%s:%d %s == NULL\n", __FILE__, __LINE__, name ); \ goto on_error; \ } #define EVT_TEST_ASSERT_IS_NULL( name, value ) \ if( value != NULL ) \ { \ fprintf( stdout, "%s:%d %s != NULL\n", __FILE__, __LINE__, name ); \ goto on_error; \ } #define EVT_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 EVT_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 EVT_TEST_FPRINT_ERROR( error ) \ libcerror_error_backtrace_fprint( error, stdout ); #endif /* !defined( _EVT_TEST_MACROS_H ) */ libevt-20170120/tests/evt_test_io_handle.c0000664000175000017500000001407013040331673022504 0ustar00lordyestalordyesta00000000000000/* * Library io_handle type test program * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "evt_test_libcerror.h" #include "evt_test_libevt.h" #include "evt_test_macros.h" #include "evt_test_memory.h" #include "evt_test_unused.h" #include "../libevt/libevt_io_handle.h" #if defined( __GNUC__ ) /* Tests the libevt_io_handle_initialize function * Returns 1 if successful or 0 if not */ int evt_test_io_handle_initialize( void ) { libcerror_error_t *error = NULL; libevt_io_handle_t *io_handle = NULL; int result = 0; #if defined( HAVE_EVT_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 = libevt_io_handle_initialize( &io_handle, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libevt_io_handle_free( &io_handle, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libevt_io_handle_initialize( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); io_handle = (libevt_io_handle_t *) 0x12345678UL; result = libevt_io_handle_initialize( &io_handle, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); io_handle = NULL; #if defined( HAVE_EVT_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libevt_io_handle_initialize with malloc failing */ evt_test_malloc_attempts_before_fail = test_number; result = libevt_io_handle_initialize( &io_handle, &error ); if( evt_test_malloc_attempts_before_fail != -1 ) { evt_test_malloc_attempts_before_fail = -1; if( io_handle != NULL ) { libevt_io_handle_free( &io_handle, NULL ); } } else { EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); EVT_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 libevt_io_handle_initialize with memset failing */ evt_test_memset_attempts_before_fail = test_number; result = libevt_io_handle_initialize( &io_handle, &error ); if( evt_test_memset_attempts_before_fail != -1 ) { evt_test_memset_attempts_before_fail = -1; if( io_handle != NULL ) { libevt_io_handle_free( &io_handle, NULL ); } } else { EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_EVT_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( io_handle != NULL ) { libevt_io_handle_free( &io_handle, NULL ); } return( 0 ); } /* Tests the libevt_io_handle_free function * Returns 1 if successful or 0 if not */ int evt_test_io_handle_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libevt_io_handle_free( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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__ ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc EVT_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] EVT_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc EVT_TEST_ATTRIBUTE_UNUSED, char * const argv[] EVT_TEST_ATTRIBUTE_UNUSED ) #endif { EVT_TEST_UNREFERENCED_PARAMETER( argc ) EVT_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) EVT_TEST_RUN( "libevt_io_handle_initialize", evt_test_io_handle_initialize ); EVT_TEST_RUN( "libevt_io_handle_free", evt_test_io_handle_free ); /* TODO: add tests for libevt_io_handle_clear */ /* TODO: add tests for libevt_io_handle_read_file_header */ /* TODO: add tests for libevt_io_handle_read_records */ /* TODO: add tests for libevt_io_handle_end_of_file_record_scan */ /* TODO: add tests for libevt_io_handle_event_record_scan */ /* TODO: add tests for libevt_io_handle_recover_records */ #endif /* defined( __GNUC__ ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libevt-20170120/tests/test_evtinfo.sh0000775000175000017500000000235313040331673021552 0ustar00lordyestalordyesta00000000000000#!/bin/bash # Info tool testing script # # Version: 20160328 EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_IGNORE=77; TEST_PREFIX=`dirname ${PWD}`; TEST_PREFIX=`basename ${TEST_PREFIX} | sed 's/^lib\([^-]*\).*$/\1/'`; TEST_SUFFIX="info"; TEST_PROFILE="${TEST_PREFIX}${TEST_SUFFIX}"; TEST_DESCRIPTION="${TEST_PREFIX}${TEST_SUFFIX}"; OPTION_SETS=""; TEST_TOOL_DIRECTORY="../${TEST_PREFIX}tools"; TEST_TOOL="${TEST_PREFIX}${TEST_SUFFIX}"; INPUT_DIRECTORY="input"; INPUT_GLOB="*"; if ! test -z ${SKIP_TOOLS_TESTS}; then exit ${EXIT_IGNORE}; fi TEST_EXECUTABLE="${TEST_TOOL_DIRECTORY}/${TEST_TOOL}"; if ! test -x "${TEST_EXECUTABLE}"; then TEST_EXECUTABLE="${TEST_TOOL_DIRECTORY}/${TEST_TOOL}.exe"; fi if ! test -x "${TEST_EXECUTABLE}"; then echo "Missing test executable: ${TEST_EXECUTABLE}"; exit ${EXIT_FAILURE}; fi TEST_RUNNER="tests/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then TEST_RUNNER="./test_runner.sh"; fi if ! test -f "${TEST_RUNNER}"; then echo "Missing test runner: ${TEST_RUNNER}"; exit ${EXIT_FAILURE}; fi source ${TEST_RUNNER}; run_test_on_input_directory "${TEST_PROFILE}" "${TEST_DESCRIPTION}" "with_stdout_reference" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_DIRECTORY}" "${INPUT_GLOB}"; RESULT=$?; exit ${RESULT}; libevt-20170120/tests/evt_test_file.c0000664000175000017500000010734613040331673021512 0ustar00lordyestalordyesta00000000000000/* * Library file type test program * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "evt_test_getopt.h" #include "evt_test_libcerror.h" #include "evt_test_libclocale.h" #include "evt_test_libevt.h" #include "evt_test_libuna.h" #include "evt_test_macros.h" #include "evt_test_memory.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 evt_test_file generate verbose output #define EVT_TEST_FILE_VERBOSE */ /* Retrieves source as a narrow string * Returns 1 if successful or -1 on error */ int evt_test_file_get_narrow_source( const system_character_t *source, char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ) { static char *function = "evt_test_file_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 evt_test_file_get_wide_source( const system_character_t *source, wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ) { static char *function = "evt_test_file_get_wide_source"; size_t source_length = 0; size_t wide_source_size = 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, (libuna_utf8_character_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, (libuna_utf8_character_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 and opens a source file * Returns 1 if successful or -1 on error */ int evt_test_file_open_source( libevt_file_t **file, const system_character_t *source, libcerror_error_t **error ) { static char *function = "evt_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( source == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid source.", function ); return( -1 ); } if( libevt_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; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libevt_file_open_wide( *file, source, LIBEVT_OPEN_READ, error ); #else result = libevt_file_open( *file, source, LIBEVT_OPEN_READ, error ); #endif 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 ) { libevt_file_free( file, NULL ); } return( -1 ); } /* Closes and frees a source file * Returns 1 if successful or -1 on error */ int evt_test_file_close_source( libevt_file_t **file, libcerror_error_t **error ) { static char *function = "evt_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( libevt_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( libevt_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 libevt_file_initialize function * Returns 1 if successful or 0 if not */ int evt_test_file_initialize( void ) { libcerror_error_t *error = NULL; libevt_file_t *file = NULL; int result = 0; #if defined( HAVE_EVT_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 = libevt_file_initialize( &file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "file", file ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libevt_file_free( &file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "file", file ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libevt_file_initialize( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); file = (libevt_file_t *) 0x12345678UL; result = libevt_file_initialize( &file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); file = NULL; #if defined( HAVE_EVT_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libevt_file_initialize with malloc failing */ evt_test_malloc_attempts_before_fail = test_number; result = libevt_file_initialize( &file, &error ); if( evt_test_malloc_attempts_before_fail != -1 ) { evt_test_malloc_attempts_before_fail = -1; if( file != NULL ) { libevt_file_free( &file, NULL ); } } else { EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NULL( "file", file ); EVT_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 libevt_file_initialize with memset failing */ evt_test_memset_attempts_before_fail = test_number; result = libevt_file_initialize( &file, &error ); if( evt_test_memset_attempts_before_fail != -1 ) { evt_test_memset_attempts_before_fail = -1; if( file != NULL ) { libevt_file_free( &file, NULL ); } } else { EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NULL( "file", file ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_EVT_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file != NULL ) { libevt_file_free( &file, NULL ); } return( 0 ); } /* Tests the libevt_file_free function * Returns 1 if successful or 0 if not */ int evt_test_file_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libevt_file_free( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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 libevt_file_open function * Returns 1 if successful or 0 if not */ int evt_test_file_open( const system_character_t *source ) { char narrow_source[ 256 ]; libcerror_error_t *error = NULL; libevt_file_t *file = NULL; int result = 0; /* Initialize test */ result = evt_test_file_get_narrow_source( source, narrow_source, 256, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libevt_file_initialize( &file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "file", file ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test open */ result = libevt_file_open( file, narrow_source, LIBEVT_OPEN_READ, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libevt_file_open( file, narrow_source, LIBEVT_OPEN_READ, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libevt_file_free( &file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "file", file ); EVT_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file != NULL ) { libevt_file_free( &file, NULL ); } return( 0 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Tests the libevt_file_open_wide function * Returns 1 if successful or 0 if not */ int evt_test_file_open_wide( const system_character_t *source ) { wchar_t wide_source[ 256 ]; libcerror_error_t *error = NULL; libevt_file_t *file = NULL; int result = 0; /* Initialize test */ result = evt_test_file_get_wide_source( source, wide_source, 256, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libevt_file_initialize( &file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "file", file ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test open */ result = libevt_file_open_wide( file, wide_source, LIBEVT_OPEN_READ, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libevt_file_open_wide( file, wide_source, LIBEVT_OPEN_READ, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libevt_file_free( &file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "file", file ); EVT_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file != NULL ) { libevt_file_free( &file, NULL ); } return( 0 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ /* Tests the libevt_file_close function * Returns 1 if successful or 0 if not */ int evt_test_file_close( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libevt_file_close( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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 libevt_file_open and libevt_file_close functions * Returns 1 if successful or 0 if not */ int evt_test_file_open_close( const system_character_t *source ) { libcerror_error_t *error = NULL; libevt_file_t *file = NULL; int result = 0; /* Initialize test */ result = libevt_file_initialize( &file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "file", file ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test open and close */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libevt_file_open_wide( file, source, LIBEVT_OPEN_READ, &error ); #else result = libevt_file_open( file, source, LIBEVT_OPEN_READ, &error ); #endif EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libevt_file_close( file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); EVT_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 = libevt_file_open_wide( file, source, LIBEVT_OPEN_READ, &error ); #else result = libevt_file_open( file, source, LIBEVT_OPEN_READ, &error ); #endif EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); result = libevt_file_close( file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Clean up */ result = libevt_file_free( &file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "file", file ); EVT_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file != NULL ) { libevt_file_free( &file, NULL ); } return( 0 ); } /* Tests the libevt_file_signal_abort function * Returns 1 if successful or 0 if not */ int evt_test_file_signal_abort( libevt_file_t *file ) { libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libevt_file_signal_abort( file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libevt_file_signal_abort( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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 libevt_file_get_ascii_codepage function * Returns 1 if successful or 0 if not */ int evt_test_file_get_ascii_codepage( libevt_file_t *file ) { libcerror_error_t *error = NULL; int ascii_codepage = 0; int ascii_codepage_is_set = 0; int result = 0; /* Test regular cases */ result = libevt_file_get_ascii_codepage( file, &ascii_codepage, &error ); EVT_TEST_ASSERT_NOT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); ascii_codepage_is_set = result; /* Test error cases */ result = libevt_file_get_ascii_codepage( NULL, &ascii_codepage, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); if( ascii_codepage_is_set != 0 ) { result = libevt_file_get_ascii_codepage( file, NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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 libevt_file_set_ascii_codepage function * Returns 1 if successful or 0 if not */ int evt_test_file_set_ascii_codepage( libevt_file_t *file ) { int supported_codepages[ 15 ] = { LIBEVT_CODEPAGE_ASCII, LIBEVT_CODEPAGE_WINDOWS_874, LIBEVT_CODEPAGE_WINDOWS_932, LIBEVT_CODEPAGE_WINDOWS_936, LIBEVT_CODEPAGE_WINDOWS_949, LIBEVT_CODEPAGE_WINDOWS_950, LIBEVT_CODEPAGE_WINDOWS_1250, LIBEVT_CODEPAGE_WINDOWS_1251, LIBEVT_CODEPAGE_WINDOWS_1252, LIBEVT_CODEPAGE_WINDOWS_1253, LIBEVT_CODEPAGE_WINDOWS_1254, LIBEVT_CODEPAGE_WINDOWS_1255, LIBEVT_CODEPAGE_WINDOWS_1256, LIBEVT_CODEPAGE_WINDOWS_1257, LIBEVT_CODEPAGE_WINDOWS_1258 }; int unsupported_codepages[ 17 ] = { LIBEVT_CODEPAGE_ISO_8859_1, LIBEVT_CODEPAGE_ISO_8859_2, LIBEVT_CODEPAGE_ISO_8859_3, LIBEVT_CODEPAGE_ISO_8859_4, LIBEVT_CODEPAGE_ISO_8859_5, LIBEVT_CODEPAGE_ISO_8859_6, LIBEVT_CODEPAGE_ISO_8859_7, LIBEVT_CODEPAGE_ISO_8859_8, LIBEVT_CODEPAGE_ISO_8859_9, LIBEVT_CODEPAGE_ISO_8859_10, LIBEVT_CODEPAGE_ISO_8859_11, LIBEVT_CODEPAGE_ISO_8859_13, LIBEVT_CODEPAGE_ISO_8859_14, LIBEVT_CODEPAGE_ISO_8859_15, LIBEVT_CODEPAGE_ISO_8859_16, LIBEVT_CODEPAGE_KOI8_R, LIBEVT_CODEPAGE_KOI8_U }; libcerror_error_t *error = NULL; int codepage = 0; int index = 0; int result = 0; /* Test set ASCII codepage */ for( index = 0; index < 15; index++ ) { codepage = supported_codepages[ index ]; result = libevt_file_set_ascii_codepage( file, codepage, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); } /* Test error cases */ result = libevt_file_set_ascii_codepage( NULL, LIBEVT_CODEPAGE_ASCII, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); for( index = 0; index < 17; index++ ) { codepage = unsupported_codepages[ index ]; result = libevt_file_set_ascii_codepage( file, codepage, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } /* Clean up */ result = libevt_file_set_ascii_codepage( file, LIBEVT_CODEPAGE_WINDOWS_1252, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libevt_file_get_flags function * Returns 1 if successful or 0 if not */ int evt_test_file_get_flags( libevt_file_t *file ) { libcerror_error_t *error = NULL; uint32_t flags = 0; int flags_is_set = 0; int result = 0; /* Test regular cases */ result = libevt_file_get_flags( file, &flags, &error ); EVT_TEST_ASSERT_NOT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); flags_is_set = result; /* Test error cases */ result = libevt_file_get_flags( NULL, &flags, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); if( flags_is_set != 0 ) { result = libevt_file_get_flags( file, NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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 libevt_file_get_number_of_records function * Returns 1 if successful or 0 if not */ int evt_test_file_get_number_of_records( libevt_file_t *file ) { libcerror_error_t *error = NULL; int number_of_records = 0; int number_of_records_is_set = 0; int result = 0; /* Test regular cases */ result = libevt_file_get_number_of_records( file, &number_of_records, &error ); EVT_TEST_ASSERT_NOT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); number_of_records_is_set = result; /* Test error cases */ result = libevt_file_get_number_of_records( NULL, &number_of_records, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); if( number_of_records_is_set != 0 ) { result = libevt_file_get_number_of_records( file, NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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 libevt_file_get_number_of_recovered_records function * Returns 1 if successful or 0 if not */ int evt_test_file_get_number_of_recovered_records( libevt_file_t *file ) { libcerror_error_t *error = NULL; int number_of_recovered_records = 0; int number_of_recovered_records_is_set = 0; int result = 0; /* Test regular cases */ result = libevt_file_get_number_of_recovered_records( file, &number_of_recovered_records, &error ); EVT_TEST_ASSERT_NOT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NULL( "error", error ); number_of_recovered_records_is_set = result; /* Test error cases */ result = libevt_file_get_number_of_recovered_records( NULL, &number_of_recovered_records, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); if( number_of_recovered_records_is_set != 0 ) { result = libevt_file_get_number_of_recovered_records( file, NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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 { libcerror_error_t *error = NULL; libevt_file_t *file = NULL; system_character_t *source = NULL; system_integer_t option = 0; int result = 0; while( ( option = evt_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( EVT_TEST_FILE_VERBOSE ) libevt_notify_set_verbose( 1 ); libevt_notify_set_stream( stderr, NULL ); #endif EVT_TEST_RUN( "libevt_file_initialize", evt_test_file_initialize ); EVT_TEST_RUN( "libevt_file_free", evt_test_file_free ); #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) if( source != NULL ) { EVT_TEST_RUN_WITH_ARGS( "libevt_file_open", evt_test_file_open, source ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) EVT_TEST_RUN_WITH_ARGS( "libevt_file_open_wide", evt_test_file_open_wide, source ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( LIBEVT_HAVE_BFIO ) /* TODO add test for libevt_file_open_file_io_handle */ #endif /* defined( LIBEVT_HAVE_BFIO ) */ EVT_TEST_RUN( "libevt_file_close", evt_test_file_close ); EVT_TEST_RUN_WITH_ARGS( "libevt_file_open_close", evt_test_file_open_close, source ); /* Initialize test */ result = evt_test_file_open_source( &file, source, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); EVT_TEST_ASSERT_IS_NOT_NULL( "file", file ); EVT_TEST_ASSERT_IS_NULL( "error", error ); EVT_TEST_RUN_WITH_ARGS( "libevt_file_signal_abort", evt_test_file_signal_abort, file ); #if defined( __GNUC__ ) /* TODO: add tests for libevt_file_open_read */ #endif /* defined( __GNUC__ ) */ /* TODO: add tests for libevt_file_is_corrupted */ EVT_TEST_RUN_WITH_ARGS( "libevt_file_get_ascii_codepage", evt_test_file_get_ascii_codepage, file ); EVT_TEST_RUN_WITH_ARGS( "libevt_file_set_ascii_codepage", evt_test_file_set_ascii_codepage, file ); /* TODO: add tests for libevt_file_get_format_version */ /* TODO: add tests for libevt_file_get_version */ EVT_TEST_RUN_WITH_ARGS( "libevt_file_get_flags", evt_test_file_get_flags, file ); EVT_TEST_RUN_WITH_ARGS( "libevt_file_get_number_of_records", evt_test_file_get_number_of_records, file ); /* TODO: add tests for libevt_file_get_record */ EVT_TEST_RUN_WITH_ARGS( "libevt_file_get_number_of_recovered_records", evt_test_file_get_number_of_recovered_records, file ); /* TODO: add tests for libevt_file_get_recovered_record */ /* Clean up */ result = evt_test_file_close_source( &file, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); EVT_TEST_ASSERT_IS_NULL( "file", file ); EVT_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 ) { evt_test_file_close_source( &file, NULL ); } return( EXIT_FAILURE ); } libevt-20170120/tests/evt_test_record.c0000664000175000017500000001003713040333671022037 0ustar00lordyestalordyesta00000000000000/* * Library record type test program * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "evt_test_libcerror.h" #include "evt_test_libevt.h" #include "evt_test_macros.h" #include "evt_test_memory.h" #include "evt_test_unused.h" #include "../libevt/libevt_record.h" /* Tests the libevt_record_free function * Returns 1 if successful or 0 if not */ int evt_test_record_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libevt_record_free( NULL, &error ); EVT_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); EVT_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__ ) #endif /* defined( __GNUC__ ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc EVT_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] EVT_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc EVT_TEST_ATTRIBUTE_UNUSED, char * const argv[] EVT_TEST_ATTRIBUTE_UNUSED ) #endif { EVT_TEST_UNREFERENCED_PARAMETER( argc ) EVT_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) /* TODO: add tests for libevt_record_initialize */ #endif /* defined( __GNUC__ ) */ EVT_TEST_RUN( "libevt_record_free", evt_test_record_free ); #if defined( __GNUC__ ) /* TODO: add tests for libevt_record_get_offset */ /* TODO: add tests for libevt_record_get_identifier */ /* TODO: add tests for libevt_record_get_creation_time */ /* TODO: add tests for libevt_record_get_written_time */ /* TODO: add tests for libevt_record_get_event_identifier */ /* TODO: add tests for libevt_record_get_event_type */ /* TODO: add tests for libevt_record_get_event_category */ /* TODO: add tests for libevt_record_get_utf8_source_name_size */ /* TODO: add tests for libevt_record_get_utf8_source_name */ /* TODO: add tests for libevt_record_get_utf16_source_name_size */ /* TODO: add tests for libevt_record_get_utf16_source_name */ /* TODO: add tests for libevt_record_get_utf8_computer_name_size */ /* TODO: add tests for libevt_record_get_utf8_computer_name */ /* TODO: add tests for libevt_record_get_utf16_computer_name_size */ /* TODO: add tests for libevt_record_get_utf16_computer_name */ /* TODO: add tests for libevt_record_get_utf8_user_security_identifier_size */ /* TODO: add tests for libevt_record_get_utf8_user_security_identifier */ /* TODO: add tests for libevt_record_get_utf16_user_security_identifier_size */ /* TODO: add tests for libevt_record_get_utf16_user_security_identifier */ /* TODO: add tests for libevt_record_get_number_of_strings */ /* TODO: add tests for libevt_record_get_utf8_string_size */ /* TODO: add tests for libevt_record_get_utf8_string */ /* TODO: add tests for libevt_record_get_utf16_string_size */ /* TODO: add tests for libevt_record_get_utf16_string */ /* TODO: add tests for libevt_record_get_data_size */ /* TODO: add tests for libevt_record_get_data */ #endif /* defined( __GNUC__ ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libevt-20170120/tests/evt_test_memory.c0000664000175000017500000001103713040331673022072 0ustar00lordyestalordyesta00000000000000/* * Memory allocation functions for testing * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ ) #define __USE_GNU #include #undef __USE_GNU #endif #if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ ) static void *(*evt_test_real_malloc)(size_t) = NULL; static void *(*evt_test_real_memcpy)(void *, void *, size_t) = NULL; static void *(*evt_test_real_memset)(void *, int, size_t) = NULL; static void *(*evt_test_real_realloc)(void *, size_t) = NULL; int evt_test_malloc_attempts_before_fail = -1; int evt_test_memcpy_attempts_before_fail = -1; int evt_test_memset_attempts_before_fail = -1; int evt_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( evt_test_real_malloc == NULL ) { evt_test_real_malloc = dlsym( RTLD_NEXT, "malloc" ); } if( evt_test_malloc_attempts_before_fail == 0 ) { evt_test_malloc_attempts_before_fail = -1; return( NULL ); } else if( evt_test_malloc_attempts_before_fail > 0 ) { evt_test_malloc_attempts_before_fail--; } ptr = evt_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, void *source, size_t size ) { if( evt_test_real_memcpy == NULL ) { evt_test_real_memcpy = dlsym( RTLD_NEXT, "memcpy" ); } if( evt_test_memcpy_attempts_before_fail == 0 ) { evt_test_memcpy_attempts_before_fail = -1; return( NULL ); } else if( evt_test_memcpy_attempts_before_fail > 0 ) { evt_test_memcpy_attempts_before_fail--; } destination = evt_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( evt_test_real_memset == NULL ) { evt_test_real_memset = dlsym( RTLD_NEXT, "memset" ); } if( evt_test_memset_attempts_before_fail == 0 ) { evt_test_memset_attempts_before_fail = -1; return( NULL ); } else if( evt_test_memset_attempts_before_fail > 0 ) { evt_test_memset_attempts_before_fail--; } ptr = evt_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( evt_test_real_realloc == NULL ) { evt_test_real_realloc = dlsym( RTLD_NEXT, "realloc" ); } if( evt_test_realloc_attempts_before_fail == 0 ) { evt_test_realloc_attempts_before_fail = -1; return( NULL ); } else if( evt_test_realloc_attempts_before_fail > 0 ) { evt_test_realloc_attempts_before_fail--; } ptr = evt_test_real_realloc( ptr, size ); return( ptr ); } #endif /* defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ ) */ libevt-20170120/tests/evt_test_error.c0000664000175000017500000000602513040331673021714 0ustar00lordyestalordyesta00000000000000/* * Library error functions test program * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "evt_test_libcerror.h" #include "evt_test_libevt.h" #include "evt_test_macros.h" #include "evt_test_unused.h" /* Tests the libevt_error_free function * Returns 1 if successful or 0 if not */ int evt_test_error_free( void ) { /* Test invocation of function only */ libevt_error_free( NULL ); return( 1 ); } /* Tests the libevt_error_fprint function * Returns 1 if successful or 0 if not */ int evt_test_error_fprint( void ) { /* Test invocation of function only */ libevt_error_fprint( NULL, NULL ); return( 1 ); } /* Tests the libevt_error_sprint function * Returns 1 if successful or 0 if not */ int evt_test_error_sprint( void ) { /* Test invocation of function only */ libevt_error_sprint( NULL, NULL, 0 ); return( 1 ); } /* Tests the libevt_error_backtrace_fprint function * Returns 1 if successful or 0 if not */ int evt_test_error_backtrace_fprint( void ) { /* Test invocation of function only */ libevt_error_backtrace_fprint( NULL, NULL ); return( 1 ); } /* Tests the libevt_error_backtrace_sprint function * Returns 1 if successful or 0 if not */ int evt_test_error_backtrace_sprint( void ) { /* Test invocation of function only */ libevt_error_backtrace_sprint( NULL, NULL, 0 ); return( 1 ); } /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc EVT_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] EVT_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc EVT_TEST_ATTRIBUTE_UNUSED, char * const argv[] EVT_TEST_ATTRIBUTE_UNUSED ) #endif { EVT_TEST_UNREFERENCED_PARAMETER( argc ) EVT_TEST_UNREFERENCED_PARAMETER( argv ) EVT_TEST_RUN( "libevt_error_free", evt_test_error_free ); EVT_TEST_RUN( "libevt_error_fprint", evt_test_error_fprint ); EVT_TEST_RUN( "libevt_error_sprint", evt_test_error_sprint ); EVT_TEST_RUN( "libevt_error_backtrace_fprint", evt_test_error_backtrace_fprint ); EVT_TEST_RUN( "libevt_error_backtrace_sprint", evt_test_error_backtrace_sprint ); return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libevt-20170120/tests/evt_test_getopt.h0000664000175000017500000000341513040331673022072 0ustar00lordyestalordyesta00000000000000/* * GetOpt functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVT_TEST_GETOPT_H ) #define _EVT_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 evt_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 evt_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( _EVT_TEST_GETOPT_H ) */ libevt-20170120/tests/evt_test_libuna.h0000664000175000017500000000323513040331673022042 0ustar00lordyestalordyesta00000000000000/* * The libuna header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVT_TEST_LIBUNA_H ) #define _EVT_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( _EVT_TEST_LIBUNA_H ) */ libevt-20170120/libclocale/0000775000175000017500000000000013040343016017420 5ustar00lordyestalordyesta00000000000000libevt-20170120/libclocale/libclocale_wide_string.h0000664000175000017500000000324213040331676024272 0ustar00lordyestalordyesta00000000000000/* * Wide character string functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_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 ) */ libevt-20170120/libclocale/libclocale_support.c0000664000175000017500000000577713040331676023502 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_LIBINTL_H ) #include #endif #include "libclocale_codepage.h" #include "libclocale_definitions.h" #include "libclocale_libcerror.h" #include "libclocale_locale.h" #include "libclocale_support.h" #if !defined( HAVE_LOCAL_LIBCLOCALE ) /* Returns the library version as a string */ const char *libclocale_get_version( void ) { return( (const char *) LIBCLOCALE_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBCLOCALE ) */ /* Initializes the locale values * Returns 1 if successful or -1 on error */ int libclocale_initialize( const char *domain_name, libcerror_error_t **error ) { static char *function = "libclocale_initialize"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int codepage = 0; #endif if( domain_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid domain name.", function ); return( -1 ); } #if defined( HAVE_BINDTEXTDOMAIN ) && defined( HAVE_TEXTDOMAIN ) if( bindtextdomain( domain_name, LOCALEDIR ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to bind text domain.", function ); return( -1 ); } if( textdomain( domain_name ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set text domain.", function ); return( -1 ); } #endif /* defined( HAVE_BINDTEXTDOMAIN ) && defined( HAVE_TEXTDOMAIN ) */ #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 ); } libevt-20170120/libclocale/libclocale_locale.h0000664000175000017500000000303713040331676023215 0ustar00lordyestalordyesta00000000000000/* * Locale functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_LOCALE_H ) #define _LIBCLOCALE_LOCALE_H #include #include #include "libclocale_extern.h" #include "libclocale_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( WINAPI ) && ( WINVER < 0x0500 ) int libclocale_GetLocaleInfo( LCID locale_identifier, LCTYPE locale_type, LPSTR buffer, int size ); #endif /* defined( WINAPI ) && ( WINVER < 0x0500 ) */ 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 ) */ libevt-20170120/libclocale/Makefile.am0000664000175000017500000000134713012271466021471 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBCLOCALE AM_CPPFLAGS = \ -DLOCALEDIR=\"$(datadir)/locale\" \ -I$(top_srcdir)/include \ -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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libclocale ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libclocale_la_SOURCES) libevt-20170120/libclocale/libclocale_locale.c0000664000175000017500000002242713040331676023214 0ustar00lordyestalordyesta00000000000000/* * Locale functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( __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 /* 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 success, 0 if no codepage could be found or -1 on error */ int libclocale_locale_get_codepage( int *codepage, libcerror_error_t **error ) { char *locale = NULL; char *charset = NULL; static char *function = "libclocale_locale_get_codepage"; size_t charset_length = 0; size_t locale_length = 0; if( codepage == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid codepage.", function ); return( -1 ); } #if defined( HAVE_LANGINFO_CODESET ) charset = nl_langinfo( CODESET ); #endif if( ( charset != NULL ) && ( charset[ 0 ] != 0 ) ) { charset_length = narrow_string_length( charset ); } else { #if defined( HAVE_SETLOCALE ) || ( defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 ) locale = setlocale( LC_CTYPE, "" ); /* Check if the locale returned is not "C" */ if( ( locale != NULL ) && ( locale[ 0 ] != 0 ) ) { if( ( locale[ 0 ] == 'C' ) && ( locale[ 1 ] != 0 ) ) { locale = NULL; } } #endif #if defined( HAVE_GETENV ) || defined( WINAPI ) /* Check if the locale can be determined from the environment variables */ if( ( locale == NULL ) || ( locale[ 0 ] == 0 ) ) { locale = getenv( "LC_ALL" ); } if( ( locale == NULL ) || ( locale[ 0 ] == 0 ) ) { locale = getenv( "LC_TYPE" ); } if( ( locale == NULL ) || ( locale[ 0 ] == 0 ) ) { locale = getenv( "LANG" ); } #endif if( ( locale == NULL ) || ( locale[ 0 ] == 0 ) ) { return( LIBCLOCALE_CODEPAGE_ASCII ); } locale_length = narrow_string_length( locale ); charset = narrow_string_search_character( locale, '.', locale_length + 1 ); if( charset == NULL ) { return( LIBCLOCALE_CODEPAGE_ASCII ); } charset++; charset_length = locale_length - (size_t) ( charset - locale ); } /* Determine codepage */ *codepage = LIBCLOCALE_CODEPAGE_ASCII; if( *codepage == LIBCLOCALE_CODEPAGE_ASCII ) { if( charset_length == 5 ) { if( narrow_string_compare( "UTF-8", charset, 5 ) == 0 ) { *codepage = 0; } } } if( *codepage == LIBCLOCALE_CODEPAGE_ASCII ) { 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 == LIBCLOCALE_CODEPAGE_ASCII ) { 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( "utf8", charset, 4 ) == 0 ) { *codepage = 0; } } } return( 1 ); } /* Retrieves the decimal point * Returns 1 if successful or -1 on error */ int libclocale_locale_get_decimal_point( int *decimal_point, libcerror_error_t **error ) { static char *function = "libclocale_locale_get_decimal_point"; #if defined( WINAPI ) DWORD error_code = 0; DWORD locale_data = 0; #else struct lconv *locale_data = NULL; #endif if( decimal_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid decimal point.", function ); return( -1 ); } *decimal_point = -1; #if defined( WINAPI ) #if ( WINVER >= 0x0600 ) if( GetLocaleInfoEx( LOCALE_NAME_USER_DEFAULT, LOCALE_SDECIMAL, (LPWSTR) &locale_data, sizeof( DWORD ) / sizeof( wchar_t ) ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, error_code, "%s: unable to retrieve locale information.", function ); return( -1 ); } #elif ( WINVER >= 0x0500 ) if( GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, (LPSTR) &locale_data, sizeof( DWORD ) / sizeof( char ) ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, error_code, "%s: unable to retrieve locale information.", function ); return( -1 ); } #else if( libclocale_GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, (LPSTR) &locale_data, sizeof( DWORD ) / sizeof( char ) ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, error_code, "%s: unable to retrieve locale information.", function ); return( -1 ); } #endif *decimal_point = (int) locale_data; #else locale_data = localeconv(); if( locale_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid locale data.", function ); return( -1 ); } if( locale_data->decimal_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid locale data - missing decimal point.", function ); return( -1 ); } *decimal_point = ( locale_data->decimal_point )[ 0 ]; #endif return( 1 ); } libevt-20170120/libclocale/libclocale_extern.h0000664000175000017500000000257513040331676023271 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_INTERNAL_EXTERN_H ) #define _LIBCLOCALE_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if !defined( HAVE_LOCAL_LIBCLOCALE ) /* If libtool DLL support is enabled set LIBCLOCALE_DLL_EXPORT * before including libclocale/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCLOCALE_DLL_EXPORT #endif #include #else #define LIBCLOCALE_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _LIBCLOCALE_INTERNAL_EXTERN_H ) */ libevt-20170120/libclocale/libclocale_unused.h0000664000175000017500000000256613040331676023267 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_INTERNAL_UNUSED_H ) #define _LIBCLOCALE_INTERNAL_UNUSED_H #include #if !defined( LIBCLOCALE_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCLOCALE_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCLOCALE_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCLOCALE_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCLOCALE_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBCLOCALE_INTERNAL_UNUSED_H ) */ libevt-20170120/libclocale/libclocale_support.h0000664000175000017500000000260613040331676023473 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_SUPPORT_H ) #define _LIBCLOCALE_SUPPORT_H #include #include #include #include "libclocale_extern.h" #include "libclocale_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCLOCALE ) LIBCLOCALE_EXTERN \ const char *libclocale_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBCLOCALE ) */ LIBCLOCALE_EXTERN \ int libclocale_initialize( const char *domain_name, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCLOCALE_SUPPORT_H ) */ libevt-20170120/libclocale/libclocale_definitions.h0000664000175000017500000000637213040331676024276 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_INTERNAL_DEFINITIONS_H ) #define _LIBCLOCALE_INTERNAL_DEFINITIONS_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if !defined( HAVE_LOCAL_LIBCLOCALE ) #include /* The definitions in are copied here * for local use of libclocale */ #else #define LIBCLOCALE_VERSION 20170105 /* The libclocale version string */ #define LIBCLOCALE_VERSION_STRING "20170105" /* 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_CODEPAGESS { 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 #endif libevt-20170120/libclocale/libclocale_codepage.h0000664000175000017500000000360113040331676023522 0ustar00lordyestalordyesta00000000000000/* * Codepage functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_CODEPAGE_H ) #define _LIBCLOCALE_CODEPAGE_H #include #include #include "libclocale_extern.h" #include "libclocale_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( __CYGWIN__ ) extern int libclocale_codepage; #else 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 ) */ libevt-20170120/libclocale/libclocale_codepage.c0000664000175000017500000005105313040331676023521 0ustar00lordyestalordyesta00000000000000/* * Codepage functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "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 ) */ libevt-20170120/libclocale/Makefile.in0000664000175000017500000007625013040342657021511 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBCLOCALE_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ -DLOCALEDIR=\"$(datadir)/locale\" \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ @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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libclocale/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libclocale/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_locale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_wide_string.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libclocale ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libclocale_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libclocale/libclocale_wide_string.c0000664000175000017500000000366313040331676024274 0ustar00lordyestalordyesta00000000000000/* * Wide character string functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_WCTYPE_H ) #include #endif #include "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 ) */ libevt-20170120/libclocale/libclocale_libcerror.h0000664000175000017500000000252713040331676023744 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_LIBCERROR_H ) #define _LIBCLOCALE_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libevt-20170120/missing0000755000175000017500000001533013040342656016737 0ustar00lordyestalordyesta00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 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=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://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 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libevt-20170120/Makefile.am0000664000175000017500000001006313040334131017361 0ustar00lordyestalordyesta00000000000000ACLOCAL_AMFLAGS = -I m4 SUBDIRS = \ include \ common \ libcerror \ libcthreads \ libcdata \ libclocale \ libcnotify \ libcsplit \ libuna \ libcfile \ libcpath \ libbfio \ libfcache \ libfdata \ libfdatetime \ libfguid \ libfvalue \ libfwnt \ libevt \ libfwevt \ libexe \ libregf \ libwrc \ libcdirectory \ evttools \ pyevt \ pyevt-python2 \ pyevt-python3 \ po \ manuals \ tests \ msvscpp DPKG_FILES = \ dpkg/changelog \ dpkg/changelog.in \ dpkg/compat \ dpkg/control \ dpkg/copyright \ dpkg/copyright.in \ dpkg/rules \ dpkg/libevt.docs \ dpkg/libevt-dev.docs \ dpkg/libevt-python.docs \ dpkg/libevt-python3.docs \ dpkg/libevt-tools.docs \ dpkg/source/format GETTEXT_FILES = \ config.rpath \ po/Makevars.in PKGCONFIG_FILES = \ libevt.pc.in SETUP_PY_FILES = \ setup.py SPEC_FILES = \ libevt.spec \ libevt.spec.in EXTRA_DIST = \ $(DPKG_FILES) \ $(GETTEXT_FILES) \ $(PKGCONFIG_FILES) \ $(SETUP_PY_FILES) \ $(SPEC_FILES) MAINTAINERCLEANFILES = \ Makefile.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ libevt.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)/libevt && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS)) distclean: clean /bin/rm -f Makefile /bin/rm -f config.status /bin/rm -f config.cache /bin/rm -f config.log /bin/rm -f libevt.pc /bin/rm -f libevt.spec @for dir in ${subdirs}; do \ (cd $$dir && $(MAKE) distclean) \ || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" splint: (cd $(srcdir)/libcerror && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcthreads && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcdata && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libclocale && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcnotify && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcsplit && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libuna && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcfile && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcpath && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libbfio && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfcache && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdata && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdatetime && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfguid && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfvalue && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfwnt && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libevt && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfcache && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdata && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfwevt && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libexe && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libregf && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libwrc && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcdirectory && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/evttools && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/pyevt && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/tests && $(MAKE) splint $(AM_MAKEFLAGS)) libevt-20170120/aclocal.m40000664000175000017500000015306513040342653017207 0ustar00lordyestalordyesta00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 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.69],, [m4_warning([this file was generated for autoconf 2.69. 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'.])]) dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- dnl serial 11 (pkg-config-0.29) dnl 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]) 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 occurence 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 $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --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 # Copyright (C) 2002-2014 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.15' 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.15], [], [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.15])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-2014 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-2014 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-2014 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-2014 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. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 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 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_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([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 ]) 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-2014 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-2014 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-2014 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 to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 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 case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for 'mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl FIXME we are no longer going to remove this! adjust warning dnl FIXME message accordingly. AC_DIAGNOSE([obsolete], [$0: this macro is deprecated, and will soon be removed. You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead, and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.]) dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 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-2014 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-2014 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-2014 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-2014 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-2014 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-2014 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-2014 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/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/libcdirectory.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/libexe.m4]) m4_include([m4/libfcache.m4]) m4_include([m4/libfdata.m4]) m4_include([m4/libfdatetime.m4]) m4_include([m4/libfguid.m4]) m4_include([m4/libfvalue.m4]) m4_include([m4/libfwevt.m4]) m4_include([m4/libfwnt.m4]) m4_include([m4/libregf.m4]) m4_include([m4/libtool.m4]) m4_include([m4/libuna.m4]) m4_include([m4/libwrc.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]) libevt-20170120/libbfio/0000775000175000017500000000000013040343016016735 5ustar00lordyestalordyesta00000000000000libevt-20170120/libbfio/libbfio_handle.h0000664000175000017500000001733213040331700022032 0ustar00lordyestalordyesta00000000000000/* * The handle functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_HANDLE_H ) #define _LIBBFIO_INTERNAL_HANDLE_H #include #include #include "libbfio_extern.h" #include "libbfio_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 ); LIBBFIO_EXTERN \ ssize_t libbfio_handle_read_buffer( libbfio_handle_t *handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBBFIO_EXTERN \ ssize_t libbfio_handle_write_buffer( libbfio_handle_t *handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBBFIO_EXTERN \ off64_t libbfio_handle_seek_offset( libbfio_handle_t *handle, off64_t offset, int whence, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_exists( libbfio_handle_t *handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_is_open( libbfio_handle_t *handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_get_io_handle( libbfio_handle_t *handle, intptr_t **io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_get_access_flags( libbfio_handle_t *handle, int *access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_set_access_flags( libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_get_size( libbfio_handle_t *handle, size64_t *size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_get_offset( libbfio_handle_t *handle, off64_t *offset, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_set_open_on_demand( libbfio_handle_t *handle, uint8_t open_on_demand, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_set_track_offsets_read( libbfio_handle_t *handle, uint8_t track_offsets_read, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_get_number_of_offsets_read( libbfio_handle_t *handle, int *number_of_read_offsets, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_get_offset_read( libbfio_handle_t *handle, int index, off64_t *offset, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_INTERNAL_HANDLE_H ) */ libevt-20170120/libbfio/libbfio_libcerror.h0000664000175000017500000000263613040331700022563 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LIBCERROR_H ) #define _LIBBFIO_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBBFIO_LIBCERROR_H ) */ libevt-20170120/libbfio/libbfio_handle.c0000664000175000017500000015670213040331700022032 0ustar00lordyestalordyesta00000000000000/* * The handle functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #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 ); goto on_error; } 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 ); memory_free( internal_handle ); return( -1 ); } #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 ) { 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( 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 ); goto on_error; } #endif return( 1 ); on_error: if( destination_io_handle != NULL ) { if( internal_source_handle->free_io_handle == NULL ) { memory_free( destination_io_handle ); } else { internal_source_handle->free_io_handle( &destination_io_handle, NULL ); } } if( destination_handle != NULL ) { libbfio_handle_free( destination_handle, NULL ); } #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 a buffer from the handle * Returns the number of bytes read if successful, or -1 on error */ ssize_t libbfio_handle_read_buffer( libbfio_handle_t *handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_read_buffer"; ssize_t read_count = 0; int is_open = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->read == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing read function.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } #if 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; } 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 ); goto on_error; } 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 ); 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; } 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 ); goto on_error; } 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 ); goto on_error; } } } 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 ); goto on_error; } if( internal_handle->track_offsets_read != 0 ) { if( libcdata_range_list_insert_range( internal_handle->offsets_read, (uint64_t) internal_handle->current_offset, (uint64_t) read_count, NULL, NULL, NULL, error ) != 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 ); goto on_error; } } 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 ); goto on_error; } 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 ); 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( read_count ); 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 ); } /* Writes a buffer to the handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_handle_write_buffer( libbfio_handle_t *handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_write_buffer"; ssize_t write_count = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->write == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing write function.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } #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 = 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 ); goto on_error; } 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; } #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 ); 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 ); } /* 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"; off64_t seek_offset = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->seek_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing seek offset function.", function ); return( -1 ); } if( ( whence != SEEK_CUR ) && ( whence != SEEK_END ) && ( whence != SEEK_SET ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported whence.", function ); return( -1 ); } #if 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 seek_offset = internal_handle->seek_offset( internal_handle->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 handle.", function, offset ); goto on_error; } internal_handle->current_offset = seek_offset; #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( seek_offset ); 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 ); } /* 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 ); } /* 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 ); } /* 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 ); } /* 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"; 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 ); 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( 1 ); 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 information of an offset read * Returns 1 if successful or -1 on error */ int libbfio_handle_get_offset_read( libbfio_handle_t *handle, int index, off64_t *offset, size64_t *size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_get_offset_read"; intptr_t *value = NULL; 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 ); 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( 1 ); 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 ); } libevt-20170120/libbfio/libbfio_libuna.h0000664000175000017500000000323213040331700022043 0ustar00lordyestalordyesta00000000000000/* * The libuna header wrapper * * Copyright (C) 2009-2016, Joachim Metz * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LIBUNA_H ) #define _LIBBFIO_LIBUNA_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) #include #include #include #include #include #include #include #include #include #include #include #include #include #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 ) */ libevt-20170120/libbfio/libbfio_definitions.h0000664000175000017500000000514413040331700023110 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_DEFINITIONS_H ) #define _LIBBFIO_INTERNAL_DEFINITIONS_H #include /* Define HAVE_LOCAL_LIBBFIO for local use of libbfio */ #if !defined( HAVE_LOCAL_LIBBFIO ) #include /* The definitions in are copied here * for local use of libbfio */ #else #define LIBBFIO_VERSION 20161216 /* The libbfio version string */ #define LIBBFIO_VERSION_STRING "20161216" /* 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 libevt-20170120/libbfio/libbfio_libclocale.h0000664000175000017500000000266313040331700022671 0ustar00lordyestalordyesta00000000000000/* * The internal libclocale header * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LIBCLOCALE_H ) #define _LIBBFIO_LIBCLOCALE_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if defined( HAVE_LOCAL_LIBCLOCALE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT * before including libclocale.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCLOCALE_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _LIBBFIO_LIBCLOCALE_H ) */ libevt-20170120/libbfio/libbfio_codepage.h0000664000175000017500000000507013040331700022342 0ustar00lordyestalordyesta00000000000000/* * Codepage functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_CODEPAGE_H ) #define _LIBBFIO_INTERNAL_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBBFIO ) #include /* Define HAVE_LOCAL_LIBBFIO for local use of libbfio * The definitions in are copied here * for local use of libbfio */ #else /* The codepage definitions */ enum LIBBFIO_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 ) */ libevt-20170120/libbfio/libbfio_libcdata.h0000664000175000017500000000301413040331700022332 0ustar00lordyestalordyesta00000000000000/* * The internal libcdata header * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_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 ) */ libevt-20170120/libbfio/libbfio_extern.h0000664000175000017500000000253113040331700022077 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_EXTERN_H ) #define _LIBBFIO_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBBFIO for local use of libbfio */ #if !defined( HAVE_LOCAL_LIBBFIO ) /* If libtool DLL support is enabled set LIBBFIO_DLL_EXPORT * before including libbfio/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBBFIO_DLL_EXPORT #endif #include #else #define LIBBFIO_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */ #endif /* !defined( _LIBBFIO_INTERNAL_EXTERN_H ) */ libevt-20170120/libbfio/libbfio_file_range.c0000664000175000017500000010127713040331700022667 0ustar00lordyestalordyesta00000000000000/* * File range functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #include "libbfio_definitions.h" #include "libbfio_file.h" #include "libbfio_file_range.h" #include "libbfio_handle.h" #include "libbfio_libcerror.h" #include "libbfio_types.h" /* 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 ); } /* 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_open, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_range_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) libbfio_file_range_read, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) libbfio_file_range_write, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libbfio_file_range_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_range_exists, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_range_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libbfio_file_range_get_size, LIBBFIO_FLAG_IO_HANDLE_MANAGED | LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create handle.", function ); goto on_error; } return( 1 ); on_error: if( file_range_io_handle != NULL ) { libbfio_file_range_io_handle_free( &file_range_io_handle, NULL ); } return( -1 ); } /* Frees 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 handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_range_get_name_size( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_get_name_size"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( libbfio_file_io_handle_get_name_size( file_range_io_handle->file_io_handle, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name size from file IO handle.", function ); return( -1 ); } return( 1 ); } /* Retrieves the name of the file range handle * The name size should include the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_range_get_name( libbfio_handle_t *handle, char *name, size_t name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_get_name"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( libbfio_file_io_handle_get_name( file_range_io_handle->file_io_handle, name, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name from file IO handle.", function ); return( -1 ); } return( 1 ); } /* Sets the name for the file range handle * Returns 1 if succesful or -1 on error */ int libbfio_file_range_set_name( libbfio_handle_t *handle, const char *name, size_t name_length, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_set_name"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( libbfio_file_io_handle_set_name( file_range_io_handle->file_io_handle, name, name_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name in file IO handle.", function ); return( -1 ); } return( 1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Retrieves the name size of the file range handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_range_get_name_size_wide( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_get_name_size_wide"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( libbfio_file_io_handle_get_name_size_wide( file_range_io_handle->file_io_handle, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name size from file IO handle.", function ); return( -1 ); } return( 1 ); } /* Retrieves the name of the file range handle * The name size should include the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_range_get_name_wide( libbfio_handle_t *handle, wchar_t *name, size_t name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_get_name_wide"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( libbfio_file_io_handle_get_name_wide( file_range_io_handle->file_io_handle, name, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name from file IO handle.", function ); return( -1 ); } return( 1 ); } /* Sets the name for the file range handle * Returns 1 if succesful or -1 on error */ int libbfio_file_range_set_name_wide( libbfio_handle_t *handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_set_name_wide"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( libbfio_file_io_handle_set_name_wide( file_range_io_handle->file_io_handle, name, name_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name in file IO handle.", function ); return( -1 ); } return( 1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ /* Retrieves the range of the file range handle * Returns 1 if succesful or -1 on error */ int libbfio_file_range_get( libbfio_handle_t *handle, off64_t *range_offset, size64_t *range_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_get"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( range_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range offset.", function ); return( -1 ); } if( range_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range size.", function ); return( -1 ); } *range_offset = file_range_io_handle->range_offset; *range_size = file_range_io_handle->range_size; return( 1 ); } /* Sets the range of the file range handle * A range size of 0 represents that the range continues until the end of the file * Returns 1 if succesful or -1 on error */ int libbfio_file_range_set( libbfio_handle_t *handle, off64_t range_offset, size64_t range_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_set"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( range_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid range offset value less than zero.", function ); return( -1 ); } if( range_size > (size64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid range size value exceeds maximum.", function ); return( -1 ); } file_range_io_handle->range_offset = range_offset; file_range_io_handle->range_size = range_size; return( 1 ); } /* Opens the file range handle * Returns 1 if successful or -1 on error */ int libbfio_file_range_open( libbfio_file_range_io_handle_t *file_range_io_handle, int access_flags, libcerror_error_t **error ) { static char *function = "libbfio_file_range_open"; size64_t file_size = 0; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } if( libbfio_file_open( file_range_io_handle->file_io_handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file IO handle.", function ); return( -1 ); } if( libbfio_file_get_size( file_range_io_handle->file_io_handle, &file_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size from file IO handle.", function ); return( -1 ); } if( file_range_io_handle->range_offset >= (off64_t) file_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid range offset value exceeds file size.", function ); return( -1 ); } file_size -= file_range_io_handle->range_offset; if( file_range_io_handle->range_size > file_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid range size value exceeds file size.", function ); return( -1 ); } if( libbfio_file_seek_offset( file_range_io_handle->file_io_handle, file_range_io_handle->range_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek range offset in file IO handle.", function ); return( -1 ); } return( 1 ); } /* Closes the file range handle * Returns 0 if successful or -1 on error */ int libbfio_file_range_close( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_range_close"; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } if( libbfio_file_close( file_range_io_handle->file_io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close file IO handle.", function ); return( -1 ); } return( 0 ); } /* Reads a buffer from the file range handle * Returns the number of bytes read if successful, or -1 on error */ ssize_t libbfio_file_range_read( libbfio_file_range_io_handle_t *file_range_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_file_range_read"; off64_t file_offset = 0; ssize_t read_count = 0; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } file_offset = libbfio_file_seek_offset( file_range_io_handle->file_io_handle, 0, SEEK_CUR, error ); if( file_offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current offset from file IO handle.", function ); return( -1 ); } if( file_offset < file_range_io_handle->range_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid file offset value out of bounds.", function ); return( -1 ); } if( file_range_io_handle->range_size != 0 ) { if( (size64_t) file_offset >= file_range_io_handle->range_size ) { return( 0 ); } if( (size64_t) ( file_offset + size ) >= file_range_io_handle->range_size ) { size = (size_t) ( file_range_io_handle->range_offset - file_offset ); } } read_count = libbfio_file_read( file_range_io_handle->file_io_handle, buffer, size, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file IO handle.", function ); return( -1 ); } return( read_count ); } /* Writes a buffer to the file range handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_file_range_write( libbfio_file_range_io_handle_t *file_range_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_file_range_write"; off64_t file_offset = 0; ssize_t write_count = 0; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } file_offset = libbfio_file_seek_offset( file_range_io_handle->file_io_handle, 0, SEEK_CUR, error ); if( file_offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current offset from file IO handle.", function ); return( -1 ); } if( file_offset < file_range_io_handle->range_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid file offset value out of bounds.", function ); return( -1 ); } if( file_range_io_handle->range_size != 0 ) { if( (size64_t) file_offset >= file_range_io_handle->range_size ) { return( 0 ); } if( (size64_t) ( file_offset + size ) >= file_range_io_handle->range_size ) { size = (size_t) ( file_range_io_handle->range_offset - file_offset ); } } write_count = libbfio_file_write( file_range_io_handle->file_io_handle, buffer, size, error ); if( write_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to write to file IO handle.", function ); return( -1 ); } return( write_count ); } /* Seeks a certain offset within the file range handle * Returns the offset if the seek is successful or -1 on error */ off64_t libbfio_file_range_seek_offset( libbfio_file_range_io_handle_t *file_range_io_handle, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "libbfio_file_range_seek_offset"; off64_t file_offset = 0; 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_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_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_exists( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_range_exists"; int result = 0; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } result = libbfio_file_exists( file_range_io_handle->file_io_handle, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if file exists.", function ); return( -1 ); } return( result ); } /* Check if the file range is open * Returns 1 if open, 0 if not or -1 on error */ int libbfio_file_range_is_open( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_range_is_open"; int result = 0; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } result = libbfio_file_is_open( file_range_io_handle->file_io_handle, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if file is open.", function ); return( -1 ); } return( result ); } /* Retrieves the file range size * Returns 1 if successful or -1 on error */ int libbfio_file_range_get_size( libbfio_file_range_io_handle_t *file_range_io_handle, size64_t *size, libcerror_error_t **error ) { static char *function = "libbfio_file_range_get_size"; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } if( file_range_io_handle->range_size == 0 ) { if( libbfio_file_get_size( file_range_io_handle->file_io_handle, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size.", function ); return( -1 ); } *size -= file_range_io_handle->range_offset; } else { *size = file_range_io_handle->range_size; } return( 1 ); } libevt-20170120/libbfio/Makefile.am0000664000175000017500000000233413012271455021001 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBBFIO AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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_pool.c libbfio_file_pool.h \ libbfio_file_range.c libbfio_file_range.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_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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libbfio ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libbfio_la_SOURCES) libevt-20170120/libbfio/libbfio_file_pool.c0000664000175000017500000001416113040331700022537 0ustar00lordyestalordyesta00000000000000/* * File pool functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "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" /* 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 ) */ libevt-20170120/libbfio/libbfio_file.c0000664000175000017500000010565013040331700021512 0ustar00lordyestalordyesta00000000000000/* * File functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include "libbfio_definitions.h" #include "libbfio_file.h" #include "libbfio_handle.h" #include "libbfio_libcerror.h" #include "libbfio_libcfile.h" #include "libbfio_libcpath.h" #include "libbfio_system_string.h" #include "libbfio_types.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 ); } /* 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_open, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) libbfio_file_read, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) libbfio_file_write, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libbfio_file_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_exists, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libbfio_file_get_size, LIBBFIO_FLAG_IO_HANDLE_MANAGED | LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create handle.", function ); goto on_error; } return( 1 ); on_error: if( file_io_handle != NULL ) { libbfio_file_io_handle_free( &file_io_handle, NULL ); } return( -1 ); } /* Frees 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_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * source_file_io_handle->name_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid source file IO handle - name size value exceeds maximum.", function ); goto on_error; } ( *destination_file_io_handle )->name = 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 handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_get_name_size( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_file_get_name_size"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libbfio_file_io_handle_get_name_size( (libbfio_file_io_handle_t *) internal_handle->io_handle, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the name of the file handle * The name size should include the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_get_name( libbfio_handle_t *handle, char *name, size_t name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_file_get_name"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libbfio_file_io_handle_get_name( (libbfio_file_io_handle_t *) internal_handle->io_handle, name, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name.", function ); return( -1 ); } return( 1 ); } /* Sets the name for the file handle * Returns 1 if succesful or -1 on error */ int libbfio_file_set_name( libbfio_handle_t *handle, const char *name, size_t name_length, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; char *full_name = NULL; static char *function = "libbfio_file_set_name"; size_t full_name_size = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libcpath_path_get_full_path( name, name_length, &full_name, &full_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to determine full path.", function ); goto on_error; } if( libbfio_file_io_handle_set_name( (libbfio_file_io_handle_t *) internal_handle->io_handle, full_name, full_name_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name.", function ); goto on_error; } if( ( full_name != NULL ) && ( full_name != name ) ) { memory_free( full_name ); } return( 1 ); on_error: if( ( full_name != NULL ) && ( full_name != name ) ) { memory_free( full_name ); } return( -1 ); } /* Retrieves the name size of the file IO handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_io_handle_get_name_size( libbfio_file_io_handle_t *file_io_handle, size_t *name_size, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_get_name_size"; if( 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_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid name length is zero.", function ); return( -1 ); } if( 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 > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * file_io_handle->name_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid file IO handle - name size value exceeds maximum.", function ); goto on_error; } file_io_handle->name = 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 handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_get_name_size_wide( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_file_get_name_size_wide"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libbfio_file_io_handle_get_name_size_wide( (libbfio_file_io_handle_t *) internal_handle->io_handle, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the name of the file handle * The name size should include the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_get_name_wide( libbfio_handle_t *handle, wchar_t *name, size_t name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_file_get_name_wide"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libbfio_file_io_handle_get_name_wide( (libbfio_file_io_handle_t *) internal_handle->io_handle, name, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name.", function ); return( -1 ); } return( 1 ); } /* Sets the name for the file handle * Returns 1 if succesful or -1 on error */ int libbfio_file_set_name_wide( libbfio_handle_t *handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; wchar_t *full_name = NULL; static char *function = "libbfio_file_set_name_wide"; size_t full_name_size = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libcpath_path_get_full_path_wide( name, name_length, &full_name, &full_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to determine full path.", function ); goto on_error; } if( libbfio_file_io_handle_set_name_wide( (libbfio_file_io_handle_t *) internal_handle->io_handle, full_name, full_name_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name.", function ); goto on_error; } if( ( full_name != NULL ) && ( full_name != name ) ) { memory_free( full_name ); } return( 1 ); on_error: if( ( full_name != NULL ) && ( full_name != name ) ) { memory_free( full_name ); } return( -1 ); } /* Retrieves the name size of the file IO handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_io_handle_get_name_size_wide( libbfio_file_io_handle_t *file_io_handle, size_t *name_size, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_get_name_size_wide"; if( 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_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid name length is zero.", function ); return( -1 ); } if( 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 > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * file_io_handle->name_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid file IO handle - name size value exceeds maximum.", function ); goto on_error; } file_io_handle->name = 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_open( libbfio_file_io_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ) { static char *function = "libbfio_file_open"; int result = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } #if defined( 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_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_read( libbfio_file_io_handle_t *file_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_file_read"; ssize_t read_count = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } read_count = libcfile_file_read_buffer( file_io_handle->file, buffer, size, error ); if( read_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file: %" PRIs_SYSTEM ".", function, file_io_handle->name ); return( -1 ); } return( read_count ); } /* Writes a buffer to the file handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_file_write( libbfio_file_io_handle_t *file_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_file_write"; ssize_t write_count = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } write_count = libcfile_file_write_buffer( file_io_handle->file, buffer, size, error ); if( write_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to file: %" PRIs_SYSTEM ".", function, file_io_handle->name ); return( -1 ); } return( write_count ); } /* Seeks a certain offset within the file handle * Returns the offset if the seek is successful or -1 on error */ off64_t libbfio_file_seek_offset( libbfio_file_io_handle_t *file_io_handle, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "libbfio_file_seek_offset"; 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_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_is_open( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_is_open"; int result = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } result = libcfile_file_is_open( file_io_handle->file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if file is open.", function ); return( -1 ); } return( result ); } /* Retrieves the file size * Returns 1 if successful or -1 on error */ int libbfio_file_get_size( libbfio_file_io_handle_t *file_io_handle, size64_t *size, libcerror_error_t **error ) { static char *function = "libbfio_file_get_size"; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } if( libcfile_file_get_size( file_io_handle->file, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of file: %" PRIs_SYSTEM ".", function, file_io_handle->name ); return( -1 ); } return( 1 ); } libevt-20170120/libbfio/libbfio_pool.h0000664000175000017500000001274613040331700021554 0ustar00lordyestalordyesta00000000000000/* * The internal pool functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_POOL_H ) #define _LIBBFIO_POOL_H #include #include #include "libbfio_extern.h" #include "libbfio_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; /* 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_pool_open_handle( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ); int libbfio_pool_append_handle_to_last_used_list( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, libcerror_error_t **error ); int libbfio_pool_move_handle_to_front_of_last_used_list( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_get_number_of_handles( libbfio_pool_t *pool, int *number_of_handles, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_get_handle( libbfio_pool_t *pool, int entry, libbfio_handle_t **handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_append_handle( libbfio_pool_t *pool, int *entry, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_set_handle( libbfio_pool_t *pool, int entry, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_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 ); LIBBFIO_EXTERN \ int libbfio_pool_open( libbfio_pool_t *pool, int entry, int access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_reopen( libbfio_pool_t *pool, int entry, int access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_close( libbfio_pool_t *pool, int entry, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_close_all( libbfio_pool_t *pool, libcerror_error_t **error ); LIBBFIO_EXTERN \ ssize_t libbfio_pool_read_buffer( libbfio_pool_t *pool, int entry, uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBBFIO_EXTERN \ ssize_t libbfio_pool_write_buffer( libbfio_pool_t *pool, int entry, const uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBBFIO_EXTERN \ off64_t libbfio_pool_seek_offset( libbfio_pool_t *pool, int entry, off64_t offset, int whence, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_get_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 ) */ libevt-20170120/libbfio/libbfio_file_range.h0000664000175000017500000001107513040331700022670 0ustar00lordyestalordyesta00000000000000/* * File range functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_FILE_RANGE_H ) #define _LIBBFIO_FILE_RANGE_H #include #include #include "libbfio_extern.h" #include "libbfio_file.h" #include "libbfio_libcerror.h" #include "libbfio_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libbfio_file_range_io_handle libbfio_file_range_io_handle_t; struct libbfio_file_range_io_handle { /* The file IO handle */ libbfio_file_io_handle_t *file_io_handle; /* The range (start) offset */ off64_t range_offset; /* The range size */ size64_t range_size; }; int libbfio_file_range_io_handle_initialize( libbfio_file_range_io_handle_t **file_range_io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_initialize( libbfio_handle_t **handle, libcerror_error_t **error ); int libbfio_file_range_io_handle_free( libbfio_file_range_io_handle_t **file_range_io_handle, libcerror_error_t **error ); int libbfio_file_range_io_handle_clone( libbfio_file_range_io_handle_t **destination_file_range_io_handle, libbfio_file_range_io_handle_t *source_file_range_io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_get_name_size( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_get_name( libbfio_handle_t *handle, char *name, size_t name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_set_name( libbfio_handle_t *handle, const char *name, size_t name_length, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBBFIO_EXTERN \ int libbfio_file_range_get_name_size_wide( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_get_name_wide( libbfio_handle_t *handle, wchar_t *name, size_t name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_set_name_wide( libbfio_handle_t *handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ LIBBFIO_EXTERN \ int libbfio_file_range_get( libbfio_handle_t *handle, off64_t *range_offset, size64_t *range_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_set( libbfio_handle_t *handle, off64_t range_offset, size64_t range_size, libcerror_error_t **error ); int libbfio_file_range_open( libbfio_file_range_io_handle_t *file_range_io_handle, int access_flags, libcerror_error_t **error ); int libbfio_file_range_close( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ); ssize_t libbfio_file_range_read( libbfio_file_range_io_handle_t *file_range_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t libbfio_file_range_write( libbfio_file_range_io_handle_t *file_range_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); off64_t libbfio_file_range_seek_offset( libbfio_file_range_io_handle_t *file_range_io_handle, off64_t offset, int whence, libcerror_error_t **error ); int libbfio_file_range_exists( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ); int libbfio_file_range_is_open( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ); int libbfio_file_range_get_size( libbfio_file_range_io_handle_t *file_range_io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_FILE_RANGE_H ) */ libevt-20170120/libbfio/libbfio_system_string.h0000664000175000017500000000540013040331700023502 0ustar00lordyestalordyesta00000000000000/* * System string functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_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 ) */ libevt-20170120/libbfio/libbfio_file.h0000664000175000017500000001165313040331700021516 0ustar00lordyestalordyesta00000000000000/* * File functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_FILE_H ) #define _LIBBFIO_FILE_H #include #include #include "libbfio_extern.h" #include "libbfio_libcerror.h" #include "libbfio_libcfile.h" #include "libbfio_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libbfio_file_io_handle libbfio_file_io_handle_t; struct libbfio_file_io_handle { /* The name */ system_character_t *name; /* The size of the name */ size_t name_size; /* The file (handle) */ libcfile_file_t *file; /* The access flags */ int access_flags; }; int libbfio_file_io_handle_initialize( libbfio_file_io_handle_t **file_io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_initialize( libbfio_handle_t **handle, libcerror_error_t **error ); int libbfio_file_io_handle_free( libbfio_file_io_handle_t **file_io_handle, libcerror_error_t **error ); int libbfio_file_io_handle_clone( libbfio_file_io_handle_t **destination_file_io_handle, libbfio_file_io_handle_t *source_file_io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_get_name_size( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_get_name( libbfio_handle_t *handle, char *name, size_t name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_set_name( libbfio_handle_t *handle, const char *name, size_t name_length, libcerror_error_t **error ); int libbfio_file_io_handle_get_name_size( libbfio_file_io_handle_t *file_io_handle, size_t *name_size, libcerror_error_t **error ); int libbfio_file_io_handle_get_name( libbfio_file_io_handle_t *file_io_handle, char *name, size_t name_size, libcerror_error_t **error ); int libbfio_file_io_handle_set_name( libbfio_file_io_handle_t *file_io_handle, const char *name, size_t name_length, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBBFIO_EXTERN \ int libbfio_file_get_name_size_wide( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_get_name_wide( libbfio_handle_t *handle, wchar_t *name, size_t name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_set_name_wide( libbfio_handle_t *handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ); int libbfio_file_io_handle_get_name_size_wide( libbfio_file_io_handle_t *file_io_handle, size_t *name_size, libcerror_error_t **error ); int libbfio_file_io_handle_get_name_wide( libbfio_file_io_handle_t *file_io_handle, wchar_t *name, size_t name_size, libcerror_error_t **error ); int libbfio_file_io_handle_set_name_wide( libbfio_file_io_handle_t *file_io_handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ int libbfio_file_open( libbfio_file_io_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ); int libbfio_file_close( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ); ssize_t libbfio_file_read( libbfio_file_io_handle_t *file_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t libbfio_file_write( libbfio_file_io_handle_t *file_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); off64_t libbfio_file_seek_offset( libbfio_file_io_handle_t *file_io_handle, off64_t offset, int whence, libcerror_error_t **error ); int libbfio_file_exists( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ); int libbfio_file_is_open( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ); int libbfio_file_get_size( libbfio_file_io_handle_t *file_io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_FILE_H ) */ libevt-20170120/libbfio/libbfio_support.c0000664000175000017500000000442613040331700022306 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libbfio_definitions.h" #include "libbfio_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 ) */ libevt-20170120/libbfio/libbfio_file_pool.h0000664000175000017500000000315213040331700022542 0ustar00lordyestalordyesta00000000000000/* * File pool functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_FILE_POOL_H ) #define _LIBBFIO_FILE_POOL_H #include #include #include "libbfio_extern.h" #include "libbfio_libcerror.h" #include "libbfio_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBBFIO_EXTERN \ int libbfio_file_pool_append_handles_for_names( libbfio_pool_t *pool, char * const names[], int number_of_names, int access_flags, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBBFIO_EXTERN \ int libbfio_file_pool_append_handles_for_names_wide( libbfio_pool_t *pool, wchar_t * const names[], int number_of_names, int access_flags, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_FILE_POOL_H ) */ libevt-20170120/libbfio/libbfio_error.h0000664000175000017500000000335613040331700021731 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_ERROR_H ) #define _LIBBFIO_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBBFIO ) #include #endif #include "libbfio_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBBFIO ) LIBBFIO_EXTERN \ void libbfio_error_free( libbfio_error_t **error ); LIBBFIO_EXTERN \ int libbfio_error_fprint( libbfio_error_t *error, FILE *stream ); LIBBFIO_EXTERN \ int libbfio_error_sprint( libbfio_error_t *error, char *string, size_t size ); LIBBFIO_EXTERN \ int libbfio_error_backtrace_fprint( libbfio_error_t *error, FILE *stream ); LIBBFIO_EXTERN \ int libbfio_error_backtrace_sprint( libbfio_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_INTERNAL_ERROR_H ) */ libevt-20170120/libbfio/libbfio_libcthreads.h0000664000175000017500000000360113040331700023055 0ustar00lordyestalordyesta00000000000000/* * The internal libcthreads header * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_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 ) */ libevt-20170120/libbfio/libbfio_system_string.c0000664000175000017500000006170613040331700023510 0ustar00lordyestalordyesta00000000000000/* * System string functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #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 ) */ libevt-20170120/libbfio/libbfio_memory_range.h0000664000175000017500000000736513040331700023270 0ustar00lordyestalordyesta00000000000000/* * Memory range functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_MEMORY_RANGE_H ) #define _LIBBFIO_MEMORY_RANGE_H #include #include #include "libbfio_extern.h" #include "libbfio_libcerror.h" #include "libbfio_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libbfio_memory_range_io_handle libbfio_memory_range_io_handle_t; struct libbfio_memory_range_io_handle { /* The start of the memory range */ uint8_t *range_start; /* The size of the memory range */ size_t range_size; /* The current offset in the memory range */ size_t range_offset; /* Value to indicate the memory range is open */ uint8_t is_open; /* The current access flags */ int access_flags; }; int libbfio_memory_range_io_handle_initialize( libbfio_memory_range_io_handle_t **memory_range_io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_memory_range_initialize( libbfio_handle_t **handle, libcerror_error_t **error ); int libbfio_memory_range_io_handle_free( libbfio_memory_range_io_handle_t **memory_range_io_handle, libcerror_error_t **error ); int libbfio_memory_range_io_handle_clone( libbfio_memory_range_io_handle_t **destination_memory_range_io_handle, libbfio_memory_range_io_handle_t *source_memory_range_io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_memory_range_get( libbfio_handle_t *handle, uint8_t **range_start, size_t *range_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_memory_range_set( libbfio_handle_t *handle, uint8_t *range_start, size_t range_size, libcerror_error_t **error ); int libbfio_memory_range_open( libbfio_memory_range_io_handle_t *memory_range_io_handle, int access_flags, libcerror_error_t **error ); int libbfio_memory_range_close( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ); ssize_t libbfio_memory_range_read( libbfio_memory_range_io_handle_t *memory_range_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t libbfio_memory_range_write( libbfio_memory_range_io_handle_t *memory_range_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); off64_t libbfio_memory_range_seek_offset( libbfio_memory_range_io_handle_t *memory_range_io_handle, off64_t offset, int whence, libcerror_error_t **error ); int libbfio_memory_range_exists( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ); int libbfio_memory_range_is_open( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ); int libbfio_memory_range_get_size( libbfio_memory_range_io_handle_t *memory_range_io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_MEMORY_RANGE_H ) */ libevt-20170120/libbfio/libbfio_memory_range.c0000664000175000017500000005760513040331700023265 0ustar00lordyestalordyesta00000000000000/* * Memory range functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #include "libbfio_definitions.h" #include "libbfio_handle.h" #include "libbfio_libcerror.h" #include "libbfio_memory_range.h" #include "libbfio_types.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 ); } /* 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_open, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_memory_range_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) libbfio_memory_range_read, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) libbfio_memory_range_write, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libbfio_memory_range_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_memory_range_exists, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_memory_range_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libbfio_memory_range_get_size, LIBBFIO_FLAG_IO_HANDLE_MANAGED | LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create handle.", function ); goto on_error; } return( 1 ); on_error: if( memory_range_io_handle != NULL ) { libbfio_memory_range_io_handle_free( &memory_range_io_handle, NULL ); } return( -1 ); } /* Frees 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 handle.", function ); return( -1 ); } if( *destination_memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination memory range IO handle.", function ); return( -1 ); } ( *destination_memory_range_io_handle )->range_start = source_memory_range_io_handle->range_start; ( *destination_memory_range_io_handle )->range_size = source_memory_range_io_handle->range_size; ( *destination_memory_range_io_handle )->range_offset = source_memory_range_io_handle->range_offset; ( *destination_memory_range_io_handle )->access_flags = source_memory_range_io_handle->access_flags; return( 1 ); } /* Retrieves the range of the memory range handle * Returns 1 if succesful or -1 on error */ int libbfio_memory_range_get( libbfio_handle_t *handle, uint8_t **range_start, size_t *range_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_memory_range_io_handle_t *memory_range_io_handle = NULL; static char *function = "libbfio_memory_range_get"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } memory_range_io_handle = (libbfio_memory_range_io_handle_t *) internal_handle->io_handle; if( range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range start.", function ); return( -1 ); } if( range_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range size.", function ); return( -1 ); } *range_start = memory_range_io_handle->range_start; *range_size = memory_range_io_handle->range_size; return( 1 ); } /* Sets the range of the memory range handle * Returns 1 if succesful or -1 on error */ int libbfio_memory_range_set( libbfio_handle_t *handle, uint8_t *range_start, size_t range_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_memory_range_io_handle_t *memory_range_io_handle = NULL; static char *function = "libbfio_memory_range_set"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } memory_range_io_handle = (libbfio_memory_range_io_handle_t *) internal_handle->io_handle; if( range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range start.", function ); return( -1 ); } if( range_size >= (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid range size value exceeds maximum.", function ); return( -1 ); } memory_range_io_handle->range_start = range_start; memory_range_io_handle->range_size = range_size; return( 1 ); } /* Opens the memory range handle * Returns 1 if successful or -1 on error */ int libbfio_memory_range_open( libbfio_memory_range_io_handle_t *memory_range_io_handle, int access_flags, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_open"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - missing range start.", function ); return( -1 ); } if( memory_range_io_handle->is_open != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid memory range IO handle - already open.", function ); return( -1 ); } /* Either read or write flag should be set */ if( ( ( access_flags & LIBBFIO_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) == 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags: 0x%02x.", function ); return( -1 ); } memory_range_io_handle->range_offset = 0; memory_range_io_handle->access_flags = access_flags; memory_range_io_handle->is_open = 1; return( 1 ); } /* Closes the memory range handle * Returns 0 if successful or -1 on error */ int libbfio_memory_range_close( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_close"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - missing range start.", function ); return( -1 ); } if( memory_range_io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - not open.", function ); return( -1 ); } memory_range_io_handle->is_open = 0; return( 0 ); } /* Reads a buffer from the memory range handle * Returns the number of bytes read if successful, or -1 on error */ ssize_t libbfio_memory_range_read( libbfio_memory_range_io_handle_t *memory_range_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_read"; size_t read_size = 0; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - invalid range start.", function ); return( -1 ); } if( memory_range_io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - not open.", function ); return( -1 ); } if( ( memory_range_io_handle->access_flags & LIBBFIO_ACCESS_FLAG_READ ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - no read access.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( memory_range_io_handle->range_offset > memory_range_io_handle->range_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: range offset exceeds range size.", function ); return( -1 ); } /* Check if the end of the data was reached */ if( memory_range_io_handle->range_offset == memory_range_io_handle->range_size ) { return( 0 ); } /* Check the amount of data available */ read_size = memory_range_io_handle->range_size - memory_range_io_handle->range_offset; /* Cannot read more data than available */ if( read_size > size ) { read_size = size; } if( memory_copy( buffer, &( memory_range_io_handle->range_start[ memory_range_io_handle->range_offset ] ), size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to read buffer from memory range.", function ); return( -1 ); } memory_range_io_handle->range_offset += read_size; return( (ssize_t) read_size ); } /* Writes a buffer to the memory range handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_memory_range_write( libbfio_memory_range_io_handle_t *memory_range_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_write"; size_t write_size = 0; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - invalid range start.", function ); return( -1 ); } if( memory_range_io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - not open.", function ); return( -1 ); } if( ( memory_range_io_handle->access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - no write access.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( memory_range_io_handle->range_offset >= memory_range_io_handle->range_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: range offset exceeds range size.", function ); return( -1 ); } /* Check the amount of data available */ write_size = memory_range_io_handle->range_size - memory_range_io_handle->range_offset; /* Cannot write more data than available */ if( write_size > size ) { write_size = size; } if( memory_copy( &( memory_range_io_handle->range_start[ memory_range_io_handle->range_offset ] ), buffer, size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to write buffer to memory range.", function ); return( -1 ); } memory_range_io_handle->range_offset += write_size; return( (ssize_t) write_size ); } /* Seeks a certain offset within the memory range handle * Returns the offset if the seek is successful or -1 on error */ off64_t libbfio_memory_range_seek_offset( libbfio_memory_range_io_handle_t *memory_range_io_handle, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_seek_offset"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - invalid range start.", function ); return( -1 ); } if( memory_range_io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - not open.", function ); return( -1 ); } if( offset > (off64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid offset value exceeds maximum.", function ); return( -1 ); } if( ( whence != SEEK_CUR ) && ( whence != SEEK_END ) && ( whence != SEEK_SET ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported whence.", function ); return( -1 ); } if( whence == SEEK_CUR ) { offset += memory_range_io_handle->range_offset; } else if( whence == SEEK_END ) { offset += memory_range_io_handle->range_size; } if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset.", function ); return( -1 ); } if( offset > (off64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid offset value exceeds maximum.", function ); return( -1 ); } memory_range_io_handle->range_offset = (size_t) offset; return( offset ); } /* Function to determine if a memory range exists * Returns 1 if the memory range exists, 0 if not or -1 on error */ int libbfio_memory_range_exists( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_exists"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { return( 0 ); } return( 1 ); } /* Check if the memory range is open * Returns 1 if open, 0 if not or -1 on error */ int libbfio_memory_range_is_open( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_is_open"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - invalid range start.", function ); return( -1 ); } if( memory_range_io_handle->is_open == 0 ) { return( 0 ); } return( 1 ); } /* Retrieves the memory range size * Returns 1 if successful or -1 on error */ int libbfio_memory_range_get_size( libbfio_memory_range_io_handle_t *memory_range_io_handle, size64_t *size, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_get_size"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - invalid range start.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } *size = (size64_t) memory_range_io_handle->range_size; return( 1 ); } libevt-20170120/libbfio/Makefile.in0000664000175000017500000010161113040342657021014 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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_pool.c \ libbfio_file_pool.h libbfio_file_range.c libbfio_file_range.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_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 libbfio_file_pool.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file_range.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_handle.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_memory_range.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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBBFIO_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBBFIO_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBBFIO_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBBFIO_TRUE@ @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_pool.c libbfio_file_pool.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file_range.c libbfio_file_range.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_handle.c libbfio_handle.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_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_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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libbfio/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libbfio/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_file_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_file_range.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_memory_range.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_system_string.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libbfio ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libbfio_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libbfio/libbfio_pool.c0000664000175000017500000017630013040331700021544 0ustar00lordyestalordyesta00000000000000/* * The internal pool functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #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 intialize read/write lock.", function ); goto on_error; } #endif internal_pool->maximum_number_of_open_handles = maximum_number_of_open_handles; *pool = (libbfio_pool_t *) internal_pool; return( 1 ); on_error: if( internal_pool != NULL ) { if( internal_pool->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 ); return( -1 ); } 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 intialize 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_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 ); goto on_error; } #endif *destination_pool = (libbfio_pool_t *) internal_destination_pool; return( 1 ); on_error: if( internal_destination_pool != NULL ) { 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_free( &( 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"; 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( 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 ); return( -1 ); } return( 1 ); } /* Opens the handle * Returns 1 if successful or -1 on error */ int libbfio_pool_open_handle( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_pool_open_handle"; int is_open = 0; if( internal_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } if( internal_pool->last_used_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing last used list.", function ); return( -1 ); } if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } is_open = libbfio_handle_is_open( handle, error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if handle is open.", function ); return( -1 ); } else if( is_open == 1 ) { return( 1 ); } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_append_handle_to_last_used_list( internal_pool, handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append handle to last used list.", function ); return( -1 ); } } if( libbfio_handle_open( handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open handle.", function ); return( -1 ); } 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_pool_append_handle_to_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 *last_used_list_element = NULL; static char *function = "libbfio_pool_append_handle_to_last_used_list"; if( internal_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } if( internal_pool->last_used_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing last used list.", function ); return( -1 ); } if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } /* Check if there is room in the pool for another open handle */ if( ( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) && ( ( internal_pool->number_of_open_handles + 1 ) >= internal_pool->maximum_number_of_open_handles ) ) { 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 ); return( -1 ); } 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 ); return( -1 ); } 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( 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 ); libcdata_list_element_free( &last_used_list_element, NULL, NULL ); return( -1 ); } internal_handle->pool_last_used_list_element = NULL; /* Make sure the truncate flag is removed from the handle */ internal_handle->access_flags &= ~( LIBBFIO_ACCESS_FLAG_TRUNCATE ); } /* The last used list element is reused to contain the new last used entry */ } else { if( libcdata_list_element_initialize( &last_used_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create last used list element.", function ); return( -1 ); } internal_pool->number_of_open_handles++; } 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 int last used list element.", function ); return( -1 ); } internal_handle->pool_last_used_list_element = last_used_list_element; 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 ); libcdata_list_element_free( &last_used_list_element, NULL, NULL ); return( -1 ); } return( 1 ); } /* Moves the handle to the front of the last used list * Returns 1 if successful or -1 on error */ int libbfio_pool_move_handle_to_front_of_last_used_list( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, libcerror_error_t **error ) { libbfio_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_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 ); return( -1 ); } last_used_list_element = internal_handle->pool_last_used_list_element; if( last_used_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing last used list element.", function ); return( -1 ); } if( last_used_list_element != 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 ); return( -1 ); } 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 ); internal_handle->pool_last_used_list_element = NULL; libcdata_list_element_free( &last_used_list_element, NULL, NULL ); return( -1 ); } } return( 1 ); } /* Retrieves the number of handles in the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_get_number_of_handles( libbfio_pool_t *pool, int *number_of_handles, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_get_number_of_handles"; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( 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 ); return( -1 ); } return( 1 ); } /* Retrieves a certain handle from the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_get_handle( libbfio_pool_t *pool, int entry, libbfio_handle_t **handle, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_get_handle"; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; #if 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 ); goto on_error; } #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 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) libcthreads_read_write_lock_release_for_read( internal_pool->read_write_lock, NULL ); #endif return( -1 ); } /* Appends a handle to the pool * Sets the entry * Returns 1 if successful or -1 on error */ int libbfio_pool_append_handle( libbfio_pool_t *pool, int *entry, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_append_handle"; int is_open = 0; 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( internal_pool->last_used_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing last used list.", function ); return( -1 ); } if( entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry.", function ); return( -1 ); } if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } #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 /* 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 ); goto on_error; } 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 ); goto on_error; } } 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; } if( ( internal_pool->number_of_used_handles + 1 ) >= number_of_handles ) { if( libcdata_array_append_entry( internal_pool->handles_array, 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 ); goto on_error; } } else { *entry = internal_pool->number_of_used_handles; 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_GET_FAILED, "%s: unable to set handle: %d.", function, *entry ); goto on_error; } } 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_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 ); 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 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 ); } /* Sets a certain handle in the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_set_handle( libbfio_pool_t *pool, int entry, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_set_handle"; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->last_used_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing last used list.", function ); return( -1 ); } #if 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 /* 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 ); goto on_error; } 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 ); goto on_error; } } if( libcdata_array_get_entry_by_index( internal_pool->handles_array, entry, (intptr_t **) &internal_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; } /* TODO allow to re set handles, make sure all pool references are removed */ if( internal_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 ); goto on_error; } 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 ); goto on_error; } if( is_open != 0 ) { if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_append_handle_to_last_used_list( internal_pool, handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append handle to last used list.", function ); 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 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 ); } /* Removes a certain 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 *last_used_handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; libcdata_list_element_t *last_used_list_element = NULL; static char *function = "libbfio_pool_remove_handle"; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->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 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_remove_entry( internal_pool->handles_array, entry, (intptr_t **) handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove handle: %d.", function, entry ); goto on_error; } 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 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 ); } /* Retrieves the maximum number of open handles in the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_get_maximum_number_of_open_handles( libbfio_pool_t *pool, int *maximum_number_of_open_handles, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_get_maximum_number_of_open_handles"; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( maximum_number_of_open_handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid maximum number of open handles.", function ); return( -1 ); } *maximum_number_of_open_handles = internal_pool->maximum_number_of_open_handles; return( 1 ); } /* Sets the maximum number of open handles in the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_set_maximum_number_of_open_handles( libbfio_pool_t *pool, int maximum_number_of_open_handles, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; libcdata_list_element_t *last_used_list_element = NULL; static char *function = "libbfio_pool_set_maximum_number_of_open_handles"; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; internal_pool->maximum_number_of_open_handles = maximum_number_of_open_handles; while( ( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) && ( internal_pool->number_of_open_handles > internal_pool->maximum_number_of_open_handles ) ) { 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 ); return( -1 ); } 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; } 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--; internal_handle->pool_last_used_list_element = NULL; /* Make sure the truncate flag is removed from the handle */ internal_handle->access_flags &= ~( LIBBFIO_ACCESS_FLAG_TRUNCATE ); 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 ); goto on_error; } } return( 1 ); on_error: if( last_used_list_element != NULL ) { libcdata_list_element_free( &last_used_list_element, NULL, NULL ); } 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_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_open"; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; #if 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; } /* Make sure the handle is not 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 ); goto on_error; } 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 ); goto on_error; } if( libbfio_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 ); 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 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 ); } /* 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( 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 ); } 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 ); return( -1 ); } return( 1 ); } /* Closes a handle in the pool * Returns 0 if successful or -1 on error */ int libbfio_pool_close( libbfio_pool_t *pool, int entry, libcerror_error_t **error ) { libbfio_handle_t *handle = NULL; libbfio_internal_handle_t *internal_handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; libcdata_list_element_t *last_used_list_element = NULL; static char *function = "libbfio_pool_close"; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( 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 ); } 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 ); return( -1 ); } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { internal_handle = (libbfio_internal_handle_t *) handle; /* TODO add function for locks */ 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; } /* TODO add function for locks */ internal_handle->pool_last_used_list_element = NULL; 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 ); 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 ); return( -1 ); } return( 0 ); on_error: if( last_used_list_element != NULL ) { libcdata_list_element_free( &last_used_list_element, NULL, NULL ); } return( -1 ); } /* Closes all the files in the pool * Returns 0 if successful or -1 on error */ int libbfio_pool_close_all( libbfio_pool_t *pool, libcerror_error_t **error ) { libbfio_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; 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( 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 ); return( -1 ); } 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 ); result = -1; } if( handle != NULL ) { /* 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 entry: %d is open.", function, entry ); result = -1; } else if( is_open != 0 ) { /* TODO locking issue ? */ if( libbfio_pool_close( 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; } } } } return( result ); } /* Reads a buffer from a handle in the pool * Returns the number of bytes read or -1 on error */ ssize_t libbfio_pool_read_buffer( libbfio_pool_t *pool, int entry, uint8_t *buffer, size_t size, libcerror_error_t **error ) { libbfio_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_read_buffer"; ssize_t read_count = 0; int access_flags = 0; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( 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 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 == 0 ) { if( libbfio_handle_get_access_flags( 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_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 ); } } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_move_handle_to_front_of_last_used_list( internal_pool, 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 ); } } 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 ); return( -1 ); } return( read_count ); } /* Writes a buffer to a handle in the pool * Returns the number of bytes written or -1 on error */ ssize_t libbfio_pool_write_buffer( libbfio_pool_t *pool, int entry, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { libbfio_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_write_buffer"; ssize_t write_count = 0; int access_flags = 0; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( 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 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 == 0 ) { if( libbfio_handle_get_access_flags( 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_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 ); } } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_move_handle_to_front_of_last_used_list( internal_pool, 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 ); } } 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 ); return( -1 ); } return( write_count ); } /* Seeks an offset in a handle in the pool * Returns the offset if successful or -1 on error */ off64_t libbfio_pool_seek_offset( libbfio_pool_t *pool, int entry, off64_t offset, int whence, libcerror_error_t **error ) { libbfio_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_seek_offset"; off64_t seek_offset = 0; int access_flags = 0; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( 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 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 == 0 ) { if( libbfio_handle_get_access_flags( 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_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 ); } } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_move_handle_to_front_of_last_used_list( internal_pool, 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 ); } } seek_offset = libbfio_handle_seek_offset( 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 entry: %d.", function, offset, entry ); return( -1 ); } return( seek_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 access_flags = 0; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( 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 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 == 0 ) { if( libbfio_handle_get_access_flags( 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_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 ); } } 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 ); return( -1 ); } return( 1 ); } /* 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 access_flags = 0; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( 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 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 == 0 ) { if( libbfio_handle_get_access_flags( 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_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 ); } } 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 ); return( -1 ); } return( 1 ); } libevt-20170120/libbfio/libbfio_unused.h0000664000175000017500000000253613040331700022102 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_UNUSED_H ) #define _LIBBFIO_INTERNAL_UNUSED_H #include #if !defined( LIBBFIO_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBBFIO_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBBFIO_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBBFIO_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBBFIO_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBBFIO_INTERNAL_UNUSED_H ) */ libevt-20170120/libbfio/libbfio_libcpath.h0000664000175000017500000000241113040331700022355 0ustar00lordyestalordyesta00000000000000/* * The internal libcpath header * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LIBCPATH_H ) #define _LIBBFIO_LIBCPATH_H #include /* Define HAVE_LOCAL_LIBCPATH for local use of libcpath */ #if defined( HAVE_LOCAL_LIBCPATH ) #include #include #else /* If libtool DLL support is enabled set LIBCPATH_DLL_IMPORT * before including libcpath.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCPATH_DLL_IMPORT #endif #include #endif #endif libevt-20170120/libbfio/libbfio_libcfile.h0000664000175000017500000000250313040331700022342 0ustar00lordyestalordyesta00000000000000/* * The internal libcfile header * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LIBCFILE_H ) #define _LIBBFIO_LIBCFILE_H #include /* Define HAVE_LOCAL_LIBCFILE for local use of libcfile */ #if defined( HAVE_LOCAL_LIBCFILE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCFILE_DLL_IMPORT * before including libcfile.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCFILE_DLL_IMPORT #endif #include #endif #endif libevt-20170120/libbfio/libbfio_support.h0000664000175000017500000000265213040331700022312 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_SUPPORT_H ) #define _LIBBFIO_SUPPORT_H #include #include #include "libbfio_extern.h" #include "libbfio_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBBFIO ) LIBBFIO_EXTERN \ const char *libbfio_get_version( void ); LIBBFIO_EXTERN \ int libbfio_get_codepage( int *codepage, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_set_codepage( int codepage, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_SUPPORT_H ) */ libevt-20170120/libbfio/libbfio_error.c0000664000175000017500000000552213040331700021721 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libbfio_error.h" #include "libbfio_libcerror.h" #if !defined( HAVE_LOCAL_LIBBFIO ) /* Free an error and its elements */ void libbfio_error_free( libbfio_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libbfio_error_fprint( libbfio_error_t *error, FILE *stream ) { 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 ) */ libevt-20170120/libbfio/libbfio_types.h0000664000175000017500000000304613040331700021740 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_TYPES_H ) #define _LIBBFIO_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBBFIO for local use of libbfio * The definitions in are copied here * for local use of libbfio */ #if defined( HAVE_LOCAL_LIBBFIO ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libbfio_handle {} libbfio_handle_t; typedef struct libbfio_pool {} libbfio_pool_t; #else typedef intptr_t libbfio_handle_t; typedef intptr_t libbfio_pool_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBBFIO ) */ #endif /* !defined( _LIBBFIO_INTERNAL_TYPES_H ) */ libevt-20170120/COPYING0000644000175000017500000001673011642277124016403 0ustar00lordyestalordyesta00000000000000 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. libevt-20170120/README0000664000175000017500000000051512675773551016240 0ustar00lordyestalordyesta00000000000000libevt is a library to access the Windows Event Log (EVT) format. Project information: * Status: alpha * Licence: LGPLv3+ Planned: * Multi-threading support For more information see: * Project documentation: https://github.com/libyal/libevt/wiki/Home * How to build from source: https://github.com/libyal/libevt/wiki/Building libevt-20170120/include/0000775000175000017500000000000013040343016016752 5ustar00lordyestalordyesta00000000000000libevt-20170120/include/Makefile.am0000664000175000017500000000072013040331664021013 0ustar00lordyestalordyesta00000000000000include_HEADERS = \ libevt.h pkginclude_HEADERS = \ libevt/codepage.h \ libevt/definitions.h \ libevt/error.h \ libevt/extern.h \ libevt/features.h \ libevt/types.h EXTRA_DIST = \ libevt.h.in \ libevt/definitions.h.in \ libevt/features.h.in \ libevt/types.h.in MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f libevt.h /bin/rm -f libevt/definitions.h /bin/rm -f libevt/features.h /bin/rm -f libevt/types.h /bin/rm -f Makefile libevt-20170120/include/Makefile.in0000664000175000017500000007342113040342657021040 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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 = libevt.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__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)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libevt.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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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 = \ libevt.h pkginclude_HEADERS = \ libevt/codepage.h \ libevt/definitions.h \ libevt/error.h \ libevt/extern.h \ libevt/features.h \ libevt/types.h EXTRA_DIST = \ libevt.h.in \ libevt/definitions.h.in \ libevt/features.h.in \ libevt/types.h.in MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): libevt.h: $(top_builddir)/config.status $(srcdir)/libevt.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) 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS 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 \ tags tags-am uninstall uninstall-am uninstall-includeHEADERS \ uninstall-pkgincludeHEADERS .PRECIOUS: Makefile distclean: clean /bin/rm -f libevt.h /bin/rm -f libevt/definitions.h /bin/rm -f libevt/features.h /bin/rm -f libevt/types.h /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/include/libevt/0000775000175000017500000000000013040343016020237 5ustar00lordyestalordyesta00000000000000libevt-20170120/include/libevt/definitions.h.in0000664000175000017500000000412113040331672023333 0ustar00lordyestalordyesta00000000000000/* * Definitions for libevt * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_DEFINITIONS_H ) #define _LIBEVT_DEFINITIONS_H #include #define LIBEVT_VERSION @VERSION@ /* The version string */ #define LIBEVT_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 LIBEVT_ACCESS_FLAGS { LIBEVT_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBEVT_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBEVT_OPEN_READ ( LIBEVT_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBEVT_OPEN_WRITE ( LIBEVT_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBEVT_OPEN_READ_WRITE ( LIBEVT_ACCESS_FLAG_READ | LIBEVT_ACCESS_FLAG_WRITE ) /* The event type definitions */ enum LIBEVT_EVENT_TYPES { LIBEVT_EVENT_TYPE_ERROR = 0x0001, LIBEVT_EVENT_TYPE_WARNING = 0x0002, LIBEVT_EVENT_TYPE_INFORMATION = 0x0004, LIBEVT_EVENT_TYPE_AUDIT_SUCCESS = 0x0008, LIBEVT_EVENT_TYPE_AUDIT_FAILURE = 0x0010, }; /* The event file flags */ enum LIBEVT_FILE_FLAGS { LIBEVT_FILE_FLAG_IS_DIRTY = 0x00000001UL, LIBEVT_FILE_FLAG_HAS_WRAPPED = 0x00000002UL, LIBEVT_FILE_FLAG_IS_FULL = 0x00000004UL, LIBEVT_FILE_FLAG_ARCHIVE = 0x00000008UL }; #endif /* !defined( _LIBEVT_DEFINITIONS_H ) */ libevt-20170120/include/libevt/extern.h0000664000175000017500000000257213040331672021730 0ustar00lordyestalordyesta00000000000000/* * The extern definition * * This header should be included in header files that export or import * library functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_EXTERN_H ) #define _LIBEVT_EXTERN_H /* To export functions from the libevt DLL define LIBEVT_DLL_EXPORT * To import functions from the libevt DLL define LIBEVT_DLL_IMPORT * Otherwise use default extern statement */ #if defined( LIBEVT_DLL_EXPORT ) #define LIBEVT_EXTERN __declspec(dllexport) #elif defined( LIBEVT_DLL_IMPORT ) #define LIBEVT_EXTERN extern __declspec(dllimport) #else #define LIBEVT_EXTERN extern #endif #endif /* !defined( _LIBEVT_EXTERN_H ) */ libevt-20170120/include/libevt/types.h0000664000175000017500000001133413040342671021564 0ustar00lordyestalordyesta00000000000000/* * Type definitions for libevt * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_TYPES_H ) #define _LIBEVT_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# defintions instead */ #if !defined( HAVE_INT8_T ) #define HAVE_INT8_T typedef __int8 int8_t; #endif #if !defined( HAVE_UINT8_T ) #define HAVE_UINT8_T typedef unsigned __int8 uint8_t; #endif #if !defined( HAVE_INT16_T ) #define HAVE_INT16_T typedef __int16 int16_t; #endif #if !defined( HAVE_UINT16_T ) #define HAVE_UINT16_T typedef unsigned __int16 uint16_t; #endif #if !defined( HAVE_INT32_T ) #define HAVE_INT32_T typedef __int32 int32_t; #endif #if !defined( HAVE_UINT32_T ) #define HAVE_UINT32_T typedef unsigned __int32 uint32_t; #endif #if !defined( HAVE_INT64_T ) #define HAVE_INT64_T typedef __int64 int64_t; #endif #if !defined( HAVE_UINT64_T ) #define HAVE_UINT64_T typedef unsigned __int64 uint64_t; #endif #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 LIBEVT_DEFINITION_UNIX98 #endif #include #if defined( LIBEVT_DEFINITION_UNIX98 ) #undef __USE_UNIX98 #undef LIBEVT_DEFINITION_UNIX98 #endif #endif /* The following type definitions hide internal data structures */ typedef intptr_t libevt_file_t; typedef intptr_t libevt_record_t; #ifdef __cplusplus } #endif #endif /* !defined( _LIBEVT_TYPES_H ) */ libevt-20170120/include/libevt/features.h.in0000664000175000017500000000277113040331672022647 0ustar00lordyestalordyesta00000000000000/* * Features of libevt * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_FEATURES_H ) #define _LIBEVT_FEATURES_H /* The libevt type support features */ #if defined( WINAPI ) || @HAVE_WIDE_CHARACTER_TYPE@ #define LIBEVT_HAVE_WIDE_CHARACTER_TYPE 1 #endif #if defined( WINAPI ) || @HAVE_MULTI_THREAD_SUPPORT@ #define LIBEVT_HAVE_MULTI_THREAD_SUPPORT 1 #endif #if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && @HAVE_LIBBFIO@ ) #define LIBEVT_HAVE_BFIO 1 #endif #if !defined( LIBEVT_DEPRECATED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBEVT_DEPRECATED __attribute__ ((__deprecated__)) #elif defined( _MSC_VER ) #define LIBEVT_DEPRECATED __declspec(deprecated) #else #define LIBEVT_DEPRECATED #endif #endif #endif /* !defined( _LIBEVT_FEATURES_H ) */ libevt-20170120/include/libevt/types.h.in0000664000175000017500000001153713040331672022175 0ustar00lordyestalordyesta00000000000000/* * Type definitions for libevt * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_TYPES_H ) #define _LIBEVT_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# defintions instead */ #if !defined( HAVE_INT8_T ) #define HAVE_INT8_T typedef __int8 int8_t; #endif #if !defined( HAVE_UINT8_T ) #define HAVE_UINT8_T typedef unsigned __int8 uint8_t; #endif #if !defined( HAVE_INT16_T ) #define HAVE_INT16_T typedef __int16 int16_t; #endif #if !defined( HAVE_UINT16_T ) #define HAVE_UINT16_T typedef unsigned __int16 uint16_t; #endif #if !defined( HAVE_INT32_T ) #define HAVE_INT32_T typedef __int32 int32_t; #endif #if !defined( HAVE_UINT32_T ) #define HAVE_UINT32_T typedef unsigned __int32 uint32_t; #endif #if !defined( HAVE_INT64_T ) #define HAVE_INT64_T typedef __int64 int64_t; #endif #if !defined( HAVE_UINT64_T ) #define HAVE_UINT64_T typedef unsigned __int64 uint64_t; #endif #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 LIBEVT_DEFINITION_UNIX98 #endif #include #if defined( LIBEVT_DEFINITION_UNIX98 ) #undef __USE_UNIX98 #undef LIBEVT_DEFINITION_UNIX98 #endif #endif /* The following type definitions hide internal data structures */ typedef intptr_t libevt_file_t; typedef intptr_t libevt_record_t; #ifdef __cplusplus } #endif #endif /* !defined( _LIBEVT_TYPES_H ) */ libevt-20170120/include/libevt/features.h0000664000175000017500000000267113040342671022242 0ustar00lordyestalordyesta00000000000000/* * Features of libevt * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_FEATURES_H ) #define _LIBEVT_FEATURES_H /* The libevt type support features */ #if defined( WINAPI ) || 0 #define LIBEVT_HAVE_WIDE_CHARACTER_TYPE 1 #endif #if defined( WINAPI ) || 1 #define LIBEVT_HAVE_MULTI_THREAD_SUPPORT 1 #endif #if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && 0 ) #define LIBEVT_HAVE_BFIO 1 #endif #if !defined( LIBEVT_DEPRECATED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBEVT_DEPRECATED __attribute__ ((__deprecated__)) #elif defined( _MSC_VER ) #define LIBEVT_DEPRECATED __declspec(deprecated) #else #define LIBEVT_DEPRECATED #endif #endif #endif /* !defined( _LIBEVT_FEATURES_H ) */ libevt-20170120/include/libevt/definitions.h0000664000175000017500000000411713040342671022734 0ustar00lordyestalordyesta00000000000000/* * Definitions for libevt * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_DEFINITIONS_H ) #define _LIBEVT_DEFINITIONS_H #include #define LIBEVT_VERSION 20170120 /* The version string */ #define LIBEVT_VERSION_STRING "20170120" /* 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 LIBEVT_ACCESS_FLAGS { LIBEVT_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBEVT_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBEVT_OPEN_READ ( LIBEVT_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBEVT_OPEN_WRITE ( LIBEVT_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBEVT_OPEN_READ_WRITE ( LIBEVT_ACCESS_FLAG_READ | LIBEVT_ACCESS_FLAG_WRITE ) /* The event type definitions */ enum LIBEVT_EVENT_TYPES { LIBEVT_EVENT_TYPE_ERROR = 0x0001, LIBEVT_EVENT_TYPE_WARNING = 0x0002, LIBEVT_EVENT_TYPE_INFORMATION = 0x0004, LIBEVT_EVENT_TYPE_AUDIT_SUCCESS = 0x0008, LIBEVT_EVENT_TYPE_AUDIT_FAILURE = 0x0010, }; /* The event file flags */ enum LIBEVT_FILE_FLAGS { LIBEVT_FILE_FLAG_IS_DIRTY = 0x00000001UL, LIBEVT_FILE_FLAG_HAS_WRAPPED = 0x00000002UL, LIBEVT_FILE_FLAG_IS_FULL = 0x00000004UL, LIBEVT_FILE_FLAG_ARCHIVE = 0x00000008UL }; #endif /* !defined( _LIBEVT_DEFINITIONS_H ) */ libevt-20170120/include/libevt/codepage.h0000664000175000017500000001173013040331672022166 0ustar00lordyestalordyesta00000000000000/* * Codepage definitions for libevt * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_CODEPAGE_H ) #define _LIBEVT_CODEPAGE_H #include #if defined( __cplusplus ) extern "C" { #endif /* The codepage definitions */ enum LIBEVT_CODEPAGES { LIBEVT_CODEPAGE_ASCII = 20127, LIBEVT_CODEPAGE_ISO_8859_1 = 28591, LIBEVT_CODEPAGE_ISO_8859_2 = 28592, LIBEVT_CODEPAGE_ISO_8859_3 = 28593, LIBEVT_CODEPAGE_ISO_8859_4 = 28594, LIBEVT_CODEPAGE_ISO_8859_5 = 28595, LIBEVT_CODEPAGE_ISO_8859_6 = 28596, LIBEVT_CODEPAGE_ISO_8859_7 = 28597, LIBEVT_CODEPAGE_ISO_8859_8 = 28598, LIBEVT_CODEPAGE_ISO_8859_9 = 28599, LIBEVT_CODEPAGE_ISO_8859_10 = 28600, LIBEVT_CODEPAGE_ISO_8859_11 = 28601, LIBEVT_CODEPAGE_ISO_8859_13 = 28603, LIBEVT_CODEPAGE_ISO_8859_14 = 28604, LIBEVT_CODEPAGE_ISO_8859_15 = 28605, LIBEVT_CODEPAGE_ISO_8859_16 = 28606, LIBEVT_CODEPAGE_KOI8_R = 20866, LIBEVT_CODEPAGE_KOI8_U = 21866, LIBEVT_CODEPAGE_WINDOWS_874 = 874, LIBEVT_CODEPAGE_WINDOWS_932 = 932, LIBEVT_CODEPAGE_WINDOWS_936 = 936, LIBEVT_CODEPAGE_WINDOWS_949 = 949, LIBEVT_CODEPAGE_WINDOWS_950 = 950, LIBEVT_CODEPAGE_WINDOWS_1250 = 1250, LIBEVT_CODEPAGE_WINDOWS_1251 = 1251, LIBEVT_CODEPAGE_WINDOWS_1252 = 1252, LIBEVT_CODEPAGE_WINDOWS_1253 = 1253, LIBEVT_CODEPAGE_WINDOWS_1254 = 1254, LIBEVT_CODEPAGE_WINDOWS_1255 = 1255, LIBEVT_CODEPAGE_WINDOWS_1256 = 1256, LIBEVT_CODEPAGE_WINDOWS_1257 = 1257, LIBEVT_CODEPAGE_WINDOWS_1258 = 1258 }; #define LIBEVT_CODEPAGE_US_ASCII LIBEVT_CODEPAGE_ASCII #define LIBEVT_CODEPAGE_ISO_WESTERN_EUROPEAN LIBEVT_CODEPAGE_ISO_8859_1 #define LIBEVT_CODEPAGE_ISO_CENTRAL_EUROPEAN LIBEVT_CODEPAGE_ISO_8859_2 #define LIBEVT_CODEPAGE_ISO_SOUTH_EUROPEAN LIBEVT_CODEPAGE_ISO_8859_3 #define LIBEVT_CODEPAGE_ISO_NORTH_EUROPEAN LIBEVT_CODEPAGE_ISO_8859_4 #define LIBEVT_CODEPAGE_ISO_CYRILLIC LIBEVT_CODEPAGE_ISO_8859_5 #define LIBEVT_CODEPAGE_ISO_ARABIC LIBEVT_CODEPAGE_ISO_8859_6 #define LIBEVT_CODEPAGE_ISO_GREEK LIBEVT_CODEPAGE_ISO_8859_7 #define LIBEVT_CODEPAGE_ISO_HEBREW LIBEVT_CODEPAGE_ISO_8859_8 #define LIBEVT_CODEPAGE_ISO_TURKISH LIBEVT_CODEPAGE_ISO_8859_9 #define LIBEVT_CODEPAGE_ISO_NORDIC LIBEVT_CODEPAGE_ISO_8859_10 #define LIBEVT_CODEPAGE_ISO_THAI LIBEVT_CODEPAGE_ISO_8859_11 #define LIBEVT_CODEPAGE_ISO_BALTIC LIBEVT_CODEPAGE_ISO_8859_13 #define LIBEVT_CODEPAGE_ISO_CELTIC LIBEVT_CODEPAGE_ISO_8859_14 #define LIBEVT_CODEPAGE_ISO_LATIN_1 LIBEVT_CODEPAGE_ISO_8859_1 #define LIBEVT_CODEPAGE_ISO_LATIN_2 LIBEVT_CODEPAGE_ISO_8859_2 #define LIBEVT_CODEPAGE_ISO_LATIN_3 LIBEVT_CODEPAGE_ISO_8859_3 #define LIBEVT_CODEPAGE_ISO_LATIN_4 LIBEVT_CODEPAGE_ISO_8859_4 #define LIBEVT_CODEPAGE_ISO_LATIN_5 LIBEVT_CODEPAGE_ISO_8859_9 #define LIBEVT_CODEPAGE_ISO_LATIN_6 LIBEVT_CODEPAGE_ISO_8859_10 #define LIBEVT_CODEPAGE_ISO_LATIN_7 LIBEVT_CODEPAGE_ISO_8859_13 #define LIBEVT_CODEPAGE_ISO_LATIN_8 LIBEVT_CODEPAGE_ISO_8859_14 #define LIBEVT_CODEPAGE_ISO_LATIN_9 LIBEVT_CODEPAGE_ISO_8859_15 #define LIBEVT_CODEPAGE_ISO_LATIN_10 LIBEVT_CODEPAGE_ISO_8859_16 #define LIBEVT_CODEPAGE_KOI8_RUSSIAN LIBEVT_CODEPAGE_KOI8_R #define LIBEVT_CODEPAGE_KOI8_UKRAINIAN LIBEVT_CODEPAGE_KOI8_U #define LIBEVT_CODEPAGE_WINDOWS_THAI LIBEVT_CODEPAGE_WINDOWS_874 #define LIBEVT_CODEPAGE_WINDOWS_JAPANESE LIBEVT_CODEPAGE_WINDOWS_932 #define LIBEVT_CODEPAGE_WINDOWS_CHINESE_SIMPLIFIED LIBEVT_CODEPAGE_WINDOWS_936 #define LIBEVT_CODEPAGE_WINDOWS_KOREAN LIBEVT_CODEPAGE_WINDOWS_949 #define LIBEVT_CODEPAGE_WINDOWS_CHINESE_TRADITIONAL LIBEVT_CODEPAGE_WINDOWS_950 #define LIBEVT_CODEPAGE_WINDOWS_CENTRAL_EUROPEAN LIBEVT_CODEPAGE_WINDOWS_1250 #define LIBEVT_CODEPAGE_WINDOWS_CYRILLIC LIBEVT_CODEPAGE_WINDOWS_1251 #define LIBEVT_CODEPAGE_WINDOWS_WESTERN_EUROPEAN LIBEVT_CODEPAGE_WINDOWS_1252 #define LIBEVT_CODEPAGE_WINDOWS_GREEK LIBEVT_CODEPAGE_WINDOWS_1253 #define LIBEVT_CODEPAGE_WINDOWS_TURKISH LIBEVT_CODEPAGE_WINDOWS_1254 #define LIBEVT_CODEPAGE_WINDOWS_HEBREW LIBEVT_CODEPAGE_WINDOWS_1255 #define LIBEVT_CODEPAGE_WINDOWS_ARABIC LIBEVT_CODEPAGE_WINDOWS_1256 #define LIBEVT_CODEPAGE_WINDOWS_BALTIC LIBEVT_CODEPAGE_WINDOWS_1257 #define LIBEVT_CODEPAGE_WINDOWS_VIETNAMESE LIBEVT_CODEPAGE_WINDOWS_1258 #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEVT_CODEPAGE_H ) */ libevt-20170120/include/libevt/error.h0000664000175000017500000001474013040331672021554 0ustar00lordyestalordyesta00000000000000/* * The error code definitions for libevt * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_ERROR_H ) #define _LIBEVT_ERROR_H #include /* External error type definition hides internal structure */ typedef intptr_t libevt_error_t; /* The error domains */ enum LIBEVT_ERROR_DOMAINS { LIBEVT_ERROR_DOMAIN_ARGUMENTS = (int) 'a', LIBEVT_ERROR_DOMAIN_CONVERSION = (int) 'c', LIBEVT_ERROR_DOMAIN_COMPRESSION = (int) 'C', LIBEVT_ERROR_DOMAIN_IO = (int) 'I', LIBEVT_ERROR_DOMAIN_INPUT = (int) 'i', LIBEVT_ERROR_DOMAIN_MEMORY = (int) 'm', LIBEVT_ERROR_DOMAIN_OUTPUT = (int) 'o', LIBEVT_ERROR_DOMAIN_RUNTIME = (int) 'r' }; /* The argument error codes * to signify errors regarding arguments passed to a function */ enum LIBEVT_ARGUMENT_ERROR { LIBEVT_ARGUMENT_ERROR_GENERIC = 0, /* The argument contains an invalid value */ LIBEVT_ARGUMENT_ERROR_INVALID_VALUE = 1, /* The argument contains a value less than zero */ LIBEVT_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO = 2, /* The argument contains a value zero or less */ LIBEVT_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS = 3, /* The argument contains a value that exceeds the maximum * for the specific type */ LIBEVT_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM = 4, /* The argument contains a value that is too small */ LIBEVT_ARGUMENT_ERROR_VALUE_TOO_SMALL = 5, /* The argument contains a value that is too large */ LIBEVT_ARGUMENT_ERROR_VALUE_TOO_LARGE = 6, /* The argument contains a value that is out of bounds */ LIBEVT_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS = 7, /* The argument contains a value that is not supported */ LIBEVT_ARGUMENT_ERROR_UNSUPPORTED_VALUE = 8, /* The argument contains a value that conficts with another argument */ LIBEVT_ARGUMENT_ERROR_CONFLICTING_VALUE = 9 }; /* The conversion error codes * to signify errors regarding conversions */ enum LIBEVT_CONVERSION_ERROR { LIBEVT_CONVERSION_ERROR_GENERIC = 0, /* The conversion failed on the input */ LIBEVT_CONVERSION_ERROR_INPUT_FAILED = 1, /* The conversion failed on the output */ LIBEVT_CONVERSION_ERROR_OUTPUT_FAILED = 2 }; /* The compression error codes * to signify errors regarding compression */ enum LIBEVT_COMPRESSION_ERROR { LIBEVT_COMPRESSION_ERROR_GENERIC = 0, /* The compression failed */ LIBEVT_COMPRESSION_ERROR_COMPRESS_FAILED = 1, /* The decompression failed */ LIBEVT_COMPRESSION_ERROR_DECOMPRESS_FAILED = 2 }; /* The input/output error codes * to signify errors regarding input/output */ enum LIBEVT_IO_ERROR { LIBEVT_IO_ERROR_GENERIC = 0, /* The open failed */ LIBEVT_IO_ERROR_OPEN_FAILED = 1, /* The close failed */ LIBEVT_IO_ERROR_CLOSE_FAILED = 2, /* The seek failed */ LIBEVT_IO_ERROR_SEEK_FAILED = 3, /* The read failed */ LIBEVT_IO_ERROR_READ_FAILED = 4, /* The write failed */ LIBEVT_IO_ERROR_WRITE_FAILED = 5, /* Access denied */ LIBEVT_IO_ERROR_ACCESS_DENIED = 6, /* The resource is invalid i.e. a missing file */ LIBEVT_IO_ERROR_INVALID_RESOURCE = 7, /* The ioctl failed */ LIBEVT_IO_ERROR_IOCTL_FAILED = 8, /* The unlink failed */ LIBEVT_IO_ERROR_UNLINK_FAILED = 9 }; /* The input error codes * to signify errors regarding handing input data */ enum LIBEVT_INPUT_ERROR { LIBEVT_INPUT_ERROR_GENERIC = 0, /* The input contains invalid data */ LIBEVT_INPUT_ERROR_INVALID_DATA = 1, /* The input contains an unsupported signature */ LIBEVT_INPUT_ERROR_SIGNATURE_MISMATCH = 2, /* A checksum in the input did not match */ LIBEVT_INPUT_ERROR_CHECKSUM_MISMATCH = 3, /* A value in the input did not match a previously * read value or calculated value */ LIBEVT_INPUT_ERROR_VALUE_MISMATCH = 4 }; /* The memory error codes * to signify errors regarding memory */ enum LIBEVT_MEMORY_ERROR { LIBEVT_MEMORY_ERROR_GENERIC = 0, /* There is insufficient memory available */ LIBEVT_MEMORY_ERROR_INSUFFICIENT = 1, /* The memory failed to be copied */ LIBEVT_MEMORY_ERROR_COPY_FAILED = 2, /* The memory failed to be set */ LIBEVT_MEMORY_ERROR_SET_FAILED = 3 }; /* The output error codes */ enum LIBEVT_OUTPUT_ERROR { LIBEVT_OUTPUT_ERROR_GENERIC = 0, /* There is insuficient space to write the output */ LIBEVT_OUTPUT_ERROR_INSUFFICIENT_SPACE = 1 }; /* The runtime error codes * to signify errors regarding runtime processing */ enum LIBEVT_RUNTIME_ERROR { LIBEVT_RUNTIME_ERROR_GENERIC = 0, /* The value is missing */ LIBEVT_RUNTIME_ERROR_VALUE_MISSING = 1, /* The value was already set */ LIBEVT_RUNTIME_ERROR_VALUE_ALREADY_SET = 2, /* The creation and/or initialization of an internal structure failed */ LIBEVT_RUNTIME_ERROR_INITIALIZE_FAILED = 3, /* The resize of an internal structure failed */ LIBEVT_RUNTIME_ERROR_RESIZE_FAILED = 4, /* The free and/or finalization of an internal structure failed */ LIBEVT_RUNTIME_ERROR_FINALIZE_FAILED = 5, /* The value could not be determined */ LIBEVT_RUNTIME_ERROR_GET_FAILED = 6, /* The value could not be set */ LIBEVT_RUNTIME_ERROR_SET_FAILED = 7, /* The value could not be appended/prepended */ LIBEVT_RUNTIME_ERROR_APPEND_FAILED = 8, /* The value could not be copied */ LIBEVT_RUNTIME_ERROR_COPY_FAILED = 9, /* The value could not be removed */ LIBEVT_RUNTIME_ERROR_REMOVE_FAILED = 10, /* The value could not be printed */ LIBEVT_RUNTIME_ERROR_PRINT_FAILED = 11, /* The value was out of bounds */ LIBEVT_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS = 12, /* The value exceeds the maximum for its specific type */ LIBEVT_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM = 13, /* The value is unsupported */ LIBEVT_RUNTIME_ERROR_UNSUPPORTED_VALUE = 14, /* An abort was requested */ LIBEVT_RUNTIME_ERROR_ABORT_REQUESTED = 15 }; #endif /* !defined( _LIBEVT_ERROR_H ) */ libevt-20170120/include/libevt.h0000664000175000017500000004271613040342671020430 0ustar00lordyestalordyesta00000000000000/* * Library to access the Windows Event Log (EVT) format * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_H ) #define _LIBEVT_H #include #include #include #include #include #include #include #if defined( LIBEVT_HAVE_BFIO ) #include #endif #if defined( __cplusplus ) extern "C" { #endif /* ------------------------------------------------------------------------- * Support functions * ------------------------------------------------------------------------- */ /* Returns the library version */ LIBEVT_EXTERN \ const char *libevt_get_version( void ); /* Returns the access flags for reading */ LIBEVT_EXTERN \ int libevt_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 */ LIBEVT_EXTERN \ int libevt_get_codepage( int *codepage, libevt_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 */ LIBEVT_EXTERN \ int libevt_set_codepage( int codepage, libevt_error_t **error ); /* Determines if a file contains an EVT file signature * Returns 1 if true, 0 if not or -1 on error */ LIBEVT_EXTERN \ int libevt_check_file_signature( const char *filename, libevt_error_t **error ); #if defined( LIBEVT_HAVE_WIDE_CHARACTER_TYPE ) /* Determines if a file contains an EVT file signature * Returns 1 if true, 0 if not or -1 on error */ LIBEVT_EXTERN \ int libevt_check_file_signature_wide( const wchar_t *filename, libevt_error_t **error ); #endif /* defined( LIBEVT_HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( LIBEVT_HAVE_BFIO ) /* Determines if a file contains an EVT file signature using a Basic File IO (bfio) handle * Returns 1 if true, 0 if not or -1 on error */ LIBEVT_EXTERN \ int libevt_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libevt_error_t **error ); #endif /* defined( LIBEVT_HAVE_BFIO ) */ /* ------------------------------------------------------------------------- * Notify functions * ------------------------------------------------------------------------- */ /* Sets the verbose notification */ LIBEVT_EXTERN \ void libevt_notify_set_verbose( int verbose ); /* Sets the notification stream * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_notify_set_stream( FILE *stream, libevt_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 */ LIBEVT_EXTERN \ int libevt_notify_stream_open( const char *filename, libevt_error_t **error ); /* Closes the notification stream if opened using a filename * Returns 0 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_notify_stream_close( libevt_error_t **error ); /* ------------------------------------------------------------------------- * Error functions * ------------------------------------------------------------------------- */ /* Frees an error */ LIBEVT_EXTERN \ void libevt_error_free( libevt_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 */ LIBEVT_EXTERN \ int libevt_error_fprint( libevt_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 */ LIBEVT_EXTERN \ int libevt_error_sprint( libevt_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 */ LIBEVT_EXTERN \ int libevt_error_backtrace_fprint( libevt_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 */ LIBEVT_EXTERN \ int libevt_error_backtrace_sprint( libevt_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 */ LIBEVT_EXTERN \ int libevt_file_initialize( libevt_file_t **file, libevt_error_t **error ); /* Frees a file * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_free( libevt_file_t **file, libevt_error_t **error ); /* Signals the libevt file to abort its current activity * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_signal_abort( libevt_file_t *file, libevt_error_t **error ); /* Opens a file * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_open( libevt_file_t *file, const char *filename, int access_flags, libevt_error_t **error ); #if defined( LIBEVT_HAVE_WIDE_CHARACTER_TYPE ) /* Opens a file * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_open_wide( libevt_file_t *file, const wchar_t *filename, int access_flags, libevt_error_t **error ); #endif /* defined( LIBEVT_HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( LIBEVT_HAVE_BFIO ) /* Opens a file using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_open_file_io_handle( libevt_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libevt_error_t **error ); #endif /* defined( LIBEVT_HAVE_BFIO ) */ /* Closes a file * Returns 0 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_close( libevt_file_t *file, libevt_error_t **error ); /* Determine if the file corrupted * Returns 1 if corrupted, 0 if not or -1 on error */ LIBEVT_EXTERN \ int libevt_file_is_corrupted( libevt_file_t *file, libevt_error_t **error ); /* Retrieves the file ASCII codepage * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_ascii_codepage( libevt_file_t *file, int *ascii_codepage, libevt_error_t **error ); /* Sets the file ASCII codepage * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_set_ascii_codepage( libevt_file_t *file, int ascii_codepage, libevt_error_t **error ); /* Retrieves the format version * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_format_version( libevt_file_t *file, uint32_t *major_version, uint32_t *minor_version, libevt_error_t **error ); /* Retrieves the flags * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_flags( libevt_file_t *file, uint32_t *flags, libevt_error_t **error ); /* Retrieves the number of records * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_number_of_records( libevt_file_t *file, int *number_of_records, libevt_error_t **error ); /* Retrieves a specific record * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_record( libevt_file_t *file, int record_index, libevt_record_t **record, libevt_error_t **error ); /* Retrieves the number of recovered records * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_number_of_recovered_records( libevt_file_t *file, int *number_of_records, libevt_error_t **error ); /* Retrieves a specific recovered record * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_recovered_record( libevt_file_t *file, int record_index, libevt_record_t **record, libevt_error_t **error ); /* ------------------------------------------------------------------------- * File functions - deprecated * ------------------------------------------------------------------------- */ /* Retrieves the version * * This function deprecated use libevt_file_get_format_version instead * * Returns 1 if successful or -1 on error */ LIBEVT_DEPRECATED \ LIBEVT_EXTERN \ int libevt_file_get_version( libevt_file_t *file, uint32_t *major_version, uint32_t *minor_version, libevt_error_t **error ); /* ------------------------------------------------------------------------- * Record functions * ------------------------------------------------------------------------- */ /* Frees a record * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_free( libevt_record_t **record, libevt_error_t **error ); /* Retrieves the offset * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_offset( libevt_record_t *record, off64_t *offset, libevt_error_t **error ); /* Retrieves the identifier (record number) * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_identifier( libevt_record_t *record, uint32_t *identifier, libevt_error_t **error ); /* Retrieves the creation time * The timestamp is a 32-bit POSIX date and time value * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_creation_time( libevt_record_t *record, uint32_t *posix_time, libevt_error_t **error ); /* Retrieves the written time * The timestamp is a 32-bit POSIX date and time value * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_written_time( libevt_record_t *record, uint32_t *posix_time, libevt_error_t **error ); /* Retrieves the event identifier * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_event_identifier( libevt_record_t *record, uint32_t *event_identifier, libevt_error_t **error ); /* Retrieves the event type * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_event_type( libevt_record_t *record, uint16_t *event_type, libevt_error_t **error ); /* Retrieves the event category * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_event_category( libevt_record_t *record, uint16_t *event_category, libevt_error_t **error ); /* Retrieves the size of the UTF-8 encoded source name * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_source_name_size( libevt_record_t *record, size_t *utf8_string_size, libevt_error_t **error ); /* Retrieves the UTF-8 encoded source name * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_source_name( libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libevt_error_t **error ); /* Retrieves the size of the UTF-16 encoded source name * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_source_name_size( libevt_record_t *record, size_t *utf16_string_size, libevt_error_t **error ); /* Retrieves the UTF-16 encoded source name * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_source_name( libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libevt_error_t **error ); /* Retrieves the size of the UTF-8 encoded computer name * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_computer_name_size( libevt_record_t *record, size_t *utf8_string_size, libevt_error_t **error ); /* Retrieves the UTF-8 encoded computer name * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_computer_name( libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libevt_error_t **error ); /* Retrieves the size of the UTF-16 encoded computer name * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_computer_name_size( libevt_record_t *record, size_t *utf16_string_size, libevt_error_t **error ); /* Retrieves the UTF-16 encoded computer name * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_computer_name( libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libevt_error_t **error ); /* Retrieves the size of the UTF-8 encoded user security identifier (SID) * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_user_security_identifier_size( libevt_record_t *record, size_t *utf8_string_size, libevt_error_t **error ); /* Retrieves the UTF-8 encoded user security identifier (SID) * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_user_security_identifier( libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libevt_error_t **error ); /* Retrieves the size of the UTF-16 encoded user security identifier (SID) * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_user_security_identifier_size( libevt_record_t *record, size_t *utf16_string_size, libevt_error_t **error ); /* Retrieves the UTF-16 encoded user security identifier (SID) * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_user_security_identifier( libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libevt_error_t **error ); /* Retrieves the number of strings * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_number_of_strings( libevt_record_t *record, int *number_of_strings, libevt_error_t **error ); /* Retrieves the size of a specific UTF-8 encoded string * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_string_size( libevt_record_t *record, int string_index, size_t *utf8_string_size, libevt_error_t **error ); /* Retrieves a specific UTF-8 encoded string * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_string( libevt_record_t *record, int string_index, uint8_t *utf8_string, size_t utf8_string_size, libevt_error_t **error ); /* Retrieves the size of a specific UTF-16 encoded string * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_string_size( libevt_record_t *record, int string_index, size_t *utf16_string_size, libevt_error_t **error ); /* Retrieves a specific UTF-16 encoded string * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_string( libevt_record_t *record, int string_index, uint16_t *utf16_string, size_t utf16_string_size, libevt_error_t **error ); /* Retrieves the size of the data * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_data_size( libevt_record_t *record, size_t *data_size, libevt_error_t **error ); /* Retrieves the data * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_data( libevt_record_t *record, uint8_t *data, size_t data_size, libevt_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEVT_H ) */ libevt-20170120/include/libevt.h.in0000664000175000017500000004271613040331672021034 0ustar00lordyestalordyesta00000000000000/* * Library to access the Windows Event Log (EVT) format * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_H ) #define _LIBEVT_H #include #include #include #include #include #include #include #if defined( LIBEVT_HAVE_BFIO ) #include #endif #if defined( __cplusplus ) extern "C" { #endif /* ------------------------------------------------------------------------- * Support functions * ------------------------------------------------------------------------- */ /* Returns the library version */ LIBEVT_EXTERN \ const char *libevt_get_version( void ); /* Returns the access flags for reading */ LIBEVT_EXTERN \ int libevt_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 */ LIBEVT_EXTERN \ int libevt_get_codepage( int *codepage, libevt_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 */ LIBEVT_EXTERN \ int libevt_set_codepage( int codepage, libevt_error_t **error ); /* Determines if a file contains an EVT file signature * Returns 1 if true, 0 if not or -1 on error */ LIBEVT_EXTERN \ int libevt_check_file_signature( const char *filename, libevt_error_t **error ); #if defined( LIBEVT_HAVE_WIDE_CHARACTER_TYPE ) /* Determines if a file contains an EVT file signature * Returns 1 if true, 0 if not or -1 on error */ LIBEVT_EXTERN \ int libevt_check_file_signature_wide( const wchar_t *filename, libevt_error_t **error ); #endif /* defined( LIBEVT_HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( LIBEVT_HAVE_BFIO ) /* Determines if a file contains an EVT file signature using a Basic File IO (bfio) handle * Returns 1 if true, 0 if not or -1 on error */ LIBEVT_EXTERN \ int libevt_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libevt_error_t **error ); #endif /* defined( LIBEVT_HAVE_BFIO ) */ /* ------------------------------------------------------------------------- * Notify functions * ------------------------------------------------------------------------- */ /* Sets the verbose notification */ LIBEVT_EXTERN \ void libevt_notify_set_verbose( int verbose ); /* Sets the notification stream * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_notify_set_stream( FILE *stream, libevt_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 */ LIBEVT_EXTERN \ int libevt_notify_stream_open( const char *filename, libevt_error_t **error ); /* Closes the notification stream if opened using a filename * Returns 0 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_notify_stream_close( libevt_error_t **error ); /* ------------------------------------------------------------------------- * Error functions * ------------------------------------------------------------------------- */ /* Frees an error */ LIBEVT_EXTERN \ void libevt_error_free( libevt_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 */ LIBEVT_EXTERN \ int libevt_error_fprint( libevt_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 */ LIBEVT_EXTERN \ int libevt_error_sprint( libevt_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 */ LIBEVT_EXTERN \ int libevt_error_backtrace_fprint( libevt_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 */ LIBEVT_EXTERN \ int libevt_error_backtrace_sprint( libevt_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 */ LIBEVT_EXTERN \ int libevt_file_initialize( libevt_file_t **file, libevt_error_t **error ); /* Frees a file * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_free( libevt_file_t **file, libevt_error_t **error ); /* Signals the libevt file to abort its current activity * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_signal_abort( libevt_file_t *file, libevt_error_t **error ); /* Opens a file * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_open( libevt_file_t *file, const char *filename, int access_flags, libevt_error_t **error ); #if defined( LIBEVT_HAVE_WIDE_CHARACTER_TYPE ) /* Opens a file * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_open_wide( libevt_file_t *file, const wchar_t *filename, int access_flags, libevt_error_t **error ); #endif /* defined( LIBEVT_HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( LIBEVT_HAVE_BFIO ) /* Opens a file using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_open_file_io_handle( libevt_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libevt_error_t **error ); #endif /* defined( LIBEVT_HAVE_BFIO ) */ /* Closes a file * Returns 0 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_close( libevt_file_t *file, libevt_error_t **error ); /* Determine if the file corrupted * Returns 1 if corrupted, 0 if not or -1 on error */ LIBEVT_EXTERN \ int libevt_file_is_corrupted( libevt_file_t *file, libevt_error_t **error ); /* Retrieves the file ASCII codepage * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_ascii_codepage( libevt_file_t *file, int *ascii_codepage, libevt_error_t **error ); /* Sets the file ASCII codepage * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_set_ascii_codepage( libevt_file_t *file, int ascii_codepage, libevt_error_t **error ); /* Retrieves the format version * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_format_version( libevt_file_t *file, uint32_t *major_version, uint32_t *minor_version, libevt_error_t **error ); /* Retrieves the flags * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_flags( libevt_file_t *file, uint32_t *flags, libevt_error_t **error ); /* Retrieves the number of records * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_number_of_records( libevt_file_t *file, int *number_of_records, libevt_error_t **error ); /* Retrieves a specific record * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_record( libevt_file_t *file, int record_index, libevt_record_t **record, libevt_error_t **error ); /* Retrieves the number of recovered records * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_number_of_recovered_records( libevt_file_t *file, int *number_of_records, libevt_error_t **error ); /* Retrieves a specific recovered record * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_file_get_recovered_record( libevt_file_t *file, int record_index, libevt_record_t **record, libevt_error_t **error ); /* ------------------------------------------------------------------------- * File functions - deprecated * ------------------------------------------------------------------------- */ /* Retrieves the version * * This function deprecated use libevt_file_get_format_version instead * * Returns 1 if successful or -1 on error */ LIBEVT_DEPRECATED \ LIBEVT_EXTERN \ int libevt_file_get_version( libevt_file_t *file, uint32_t *major_version, uint32_t *minor_version, libevt_error_t **error ); /* ------------------------------------------------------------------------- * Record functions * ------------------------------------------------------------------------- */ /* Frees a record * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_free( libevt_record_t **record, libevt_error_t **error ); /* Retrieves the offset * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_offset( libevt_record_t *record, off64_t *offset, libevt_error_t **error ); /* Retrieves the identifier (record number) * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_identifier( libevt_record_t *record, uint32_t *identifier, libevt_error_t **error ); /* Retrieves the creation time * The timestamp is a 32-bit POSIX date and time value * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_creation_time( libevt_record_t *record, uint32_t *posix_time, libevt_error_t **error ); /* Retrieves the written time * The timestamp is a 32-bit POSIX date and time value * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_written_time( libevt_record_t *record, uint32_t *posix_time, libevt_error_t **error ); /* Retrieves the event identifier * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_event_identifier( libevt_record_t *record, uint32_t *event_identifier, libevt_error_t **error ); /* Retrieves the event type * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_event_type( libevt_record_t *record, uint16_t *event_type, libevt_error_t **error ); /* Retrieves the event category * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_event_category( libevt_record_t *record, uint16_t *event_category, libevt_error_t **error ); /* Retrieves the size of the UTF-8 encoded source name * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_source_name_size( libevt_record_t *record, size_t *utf8_string_size, libevt_error_t **error ); /* Retrieves the UTF-8 encoded source name * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_source_name( libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libevt_error_t **error ); /* Retrieves the size of the UTF-16 encoded source name * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_source_name_size( libevt_record_t *record, size_t *utf16_string_size, libevt_error_t **error ); /* Retrieves the UTF-16 encoded source name * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_source_name( libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libevt_error_t **error ); /* Retrieves the size of the UTF-8 encoded computer name * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_computer_name_size( libevt_record_t *record, size_t *utf8_string_size, libevt_error_t **error ); /* Retrieves the UTF-8 encoded computer name * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_computer_name( libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libevt_error_t **error ); /* Retrieves the size of the UTF-16 encoded computer name * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_computer_name_size( libevt_record_t *record, size_t *utf16_string_size, libevt_error_t **error ); /* Retrieves the UTF-16 encoded computer name * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_computer_name( libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libevt_error_t **error ); /* Retrieves the size of the UTF-8 encoded user security identifier (SID) * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_user_security_identifier_size( libevt_record_t *record, size_t *utf8_string_size, libevt_error_t **error ); /* Retrieves the UTF-8 encoded user security identifier (SID) * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_user_security_identifier( libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libevt_error_t **error ); /* Retrieves the size of the UTF-16 encoded user security identifier (SID) * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_user_security_identifier_size( libevt_record_t *record, size_t *utf16_string_size, libevt_error_t **error ); /* Retrieves the UTF-16 encoded user security identifier (SID) * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_user_security_identifier( libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libevt_error_t **error ); /* Retrieves the number of strings * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_number_of_strings( libevt_record_t *record, int *number_of_strings, libevt_error_t **error ); /* Retrieves the size of a specific UTF-8 encoded string * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_string_size( libevt_record_t *record, int string_index, size_t *utf8_string_size, libevt_error_t **error ); /* Retrieves a specific UTF-8 encoded string * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf8_string( libevt_record_t *record, int string_index, uint8_t *utf8_string, size_t utf8_string_size, libevt_error_t **error ); /* Retrieves the size of a specific UTF-16 encoded string * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_string_size( libevt_record_t *record, int string_index, size_t *utf16_string_size, libevt_error_t **error ); /* Retrieves a specific UTF-16 encoded string * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_utf16_string( libevt_record_t *record, int string_index, uint16_t *utf16_string, size_t utf16_string_size, libevt_error_t **error ); /* Retrieves the size of the data * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_data_size( libevt_record_t *record, size_t *data_size, libevt_error_t **error ); /* Retrieves the data * Returns 1 if successful, 0 if not available or -1 on error */ LIBEVT_EXTERN \ int libevt_record_get_data( libevt_record_t *record, uint8_t *data, size_t data_size, libevt_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEVT_H ) */ libevt-20170120/libwrc/0000775000175000017500000000000013040343017016612 5ustar00lordyestalordyesta00000000000000libevt-20170120/libwrc/libwrc_mui.c0000664000175000017500000005477313012271522021132 0ustar00lordyestalordyesta00000000000000/* * MUI (resource) functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libwrc_definitions.h" #include "libwrc_libcerror.h" #include "libwrc_libuna.h" #include "libwrc_mui.h" #include "libwrc_mui_values.h" #include "libwrc_resource.h" /* Retrieves the file type * Returns 1 if successful or -1 on error */ int libwrc_mui_get_file_type( libwrc_resource_t *resource, uint32_t language_identifier, uint32_t *file_type, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_file_type"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } if( libwrc_mui_values_get_file_type( mui_values, file_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve file type.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 formatted main name * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf8_main_name_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf8_main_name_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->main_name_size == 0 ) { return( 0 ); } if( libuna_utf8_string_size_from_utf16_stream( mui_values->main_name, mui_values->main_name_size, LIBUNA_ENDIAN_LITTLE, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of main name string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 formatted main name * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf8_main_name( libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf8_main_name"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->main_name_size == 0 ) { return( 0 ); } if( libuna_utf8_string_copy_from_utf16_stream( utf8_string, utf8_string_size, mui_values->main_name, mui_values->main_name_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set main name string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 formatted main name * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf16_main_name_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf16_main_name_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->main_name_size == 0 ) { return( 0 ); } if( libuna_utf16_string_size_from_utf16_stream( mui_values->main_name, mui_values->main_name_size, LIBUNA_ENDIAN_LITTLE, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of main name string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 formatted main name * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf16_main_name( libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf16_main_name"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->main_name_size == 0 ) { return( 0 ); } if( libuna_utf16_string_copy_from_utf16_stream( utf16_string, utf16_string_size, mui_values->main_name, mui_values->main_name_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set main name string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 formatted MUI name * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf8_mui_name_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf8_mui_name_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->mui_name_size == 0 ) { return( 0 ); } if( libuna_utf8_string_size_from_utf16_stream( mui_values->mui_name, mui_values->mui_name_size, LIBUNA_ENDIAN_LITTLE, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of MUI name string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 formatted MUI name * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf8_mui_name( libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf8_mui_name"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->mui_name_size == 0 ) { return( 0 ); } if( libuna_utf8_string_copy_from_utf16_stream( utf8_string, utf8_string_size, mui_values->mui_name, mui_values->mui_name_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set MUI name string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 formatted MUI name * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf16_mui_name_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf16_mui_name_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->mui_name_size == 0 ) { return( 0 ); } if( libuna_utf16_string_size_from_utf16_stream( mui_values->mui_name, mui_values->mui_name_size, LIBUNA_ENDIAN_LITTLE, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of MUI name string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 formatted MUI name * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf16_mui_name( libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf16_mui_name"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->mui_name_size == 0 ) { return( 0 ); } if( libuna_utf16_string_copy_from_utf16_stream( utf16_string, utf16_string_size, mui_values->mui_name, mui_values->mui_name_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set MUI name string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 formatted language * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf8_language_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf8_language_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->language_size == 0 ) { return( 0 ); } if( libuna_utf8_string_size_from_utf16_stream( mui_values->language, mui_values->language_size, LIBUNA_ENDIAN_LITTLE, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of language string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 formatted language * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf8_language( libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf8_language"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->language_size == 0 ) { return( 0 ); } if( libuna_utf8_string_copy_from_utf16_stream( utf8_string, utf8_string_size, mui_values->language, mui_values->language_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set language string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 formatted language * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf16_language_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf16_language_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->language_size == 0 ) { return( 0 ); } if( libuna_utf16_string_size_from_utf16_stream( mui_values->language, mui_values->language_size, LIBUNA_ENDIAN_LITTLE, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of language string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 formatted language * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf16_language( libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf16_language"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->language_size == 0 ) { return( 0 ); } if( libuna_utf16_string_copy_from_utf16_stream( utf16_string, utf16_string_size, mui_values->language, mui_values->language_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set language string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 formatted language * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf8_fallback_language_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf8_fallback_language_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->fallback_language_size == 0 ) { return( 0 ); } if( libuna_utf8_string_size_from_utf16_stream( mui_values->fallback_language, mui_values->fallback_language_size, LIBUNA_ENDIAN_LITTLE, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of fallback language string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 formatted fallback language * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf8_fallback_language( libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf8_fallback_language"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->fallback_language_size == 0 ) { return( 0 ); } if( libuna_utf8_string_copy_from_utf16_stream( utf8_string, utf8_string_size, mui_values->fallback_language, mui_values->fallback_language_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set fallback language string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 formatted fallback language * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf16_fallback_language_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf16_fallback_language_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->fallback_language_size == 0 ) { return( 0 ); } if( libuna_utf16_string_size_from_utf16_stream( mui_values->fallback_language, mui_values->fallback_language_size, LIBUNA_ENDIAN_LITTLE, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of fallback language string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 formatted fallback language * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_mui_get_utf16_fallback_language( libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; static char *function = "libwrc_mui_get_utf16_fallback_language"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MUI, language_identifier, 0, (intptr_t **) &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI values.", function ); return( -1 ); } /* TODO move to mui values function */ if( mui_values->fallback_language_size == 0 ) { return( 0 ); } if( libuna_utf16_string_copy_from_utf16_stream( utf16_string, utf16_string_size, mui_values->fallback_language, mui_values->fallback_language_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set fallback language string.", function ); return( -1 ); } return( 1 ); } libevt-20170120/libwrc/libwrc_wevt_keyword.c0000664000175000017500000000705313012271522023056 0ustar00lordyestalordyesta00000000000000/* * WEVT keyword functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_definitions.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #include "libwrc_wevt_keyword.h" /* Creates a keyword * Make sure the value keyword is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_wevt_keyword_initialize( libwrc_wevt_keyword_t **keyword, libfwevt_keyword_t *keyword_descriptor, libcerror_error_t **error ) { libwrc_internal_wevt_keyword_t *internal_keyword = NULL; static char *function = "libwrc_wevt_keyword_initialize"; if( keyword == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid keyword.", function ); return( -1 ); } if( *keyword != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid keyword value already set.", function ); return( -1 ); } if( keyword_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid keyword descriptor.", function ); return( -1 ); } internal_keyword = memory_allocate_structure( libwrc_internal_wevt_keyword_t ); if( internal_keyword == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create keyword.", function ); goto on_error; } if( memory_set( internal_keyword, 0, sizeof( libwrc_internal_wevt_keyword_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear keyword.", function ); goto on_error; } internal_keyword->keyword_descriptor = keyword_descriptor; *keyword = (libwrc_wevt_keyword_t *) internal_keyword; return( 1 ); on_error: if( internal_keyword != NULL ) { memory_free( internal_keyword ); } return( -1 ); } /* Frees a keyword * Returns 1 if successful or -1 on error */ int libwrc_wevt_keyword_free( libwrc_wevt_keyword_t **keyword, libcerror_error_t **error ) { libwrc_internal_wevt_keyword_t *internal_keyword = NULL; static char *function = "libwrc_wevt_keyword_free"; if( keyword == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid keyword.", function ); return( -1 ); } if( *keyword != NULL ) { internal_keyword = (libwrc_internal_wevt_keyword_t *) *keyword; *keyword = NULL; memory_free( internal_keyword ); } return( 1 ); } libevt-20170120/libwrc/libwrc_notify.c0000664000175000017500000000525413012271522021636 0ustar00lordyestalordyesta00000000000000/* * Notification functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "libwrc_libcerror.h" #include "libwrc_libcnotify.h" #include "libwrc_notify.h" #if !defined( HAVE_LOCAL_LIBWRC ) /* Sets the verbose notification */ void libwrc_notify_set_verbose( int verbose ) { libcnotify_verbose_set( verbose ); } /* Sets the notification stream * Returns 1 if successful or -1 on error */ int libwrc_notify_set_stream( FILE *stream, libcerror_error_t **error ) { static char *function = "libwrc_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 libwrc_notify_stream_open( const char *filename, libcerror_error_t **error ) { static char *function = "libwrc_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 libwrc_notify_stream_close( libcerror_error_t **error ) { static char *function = "libwrc_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_LIBWRC ) */ libevt-20170120/libwrc/libwrc_libfwnt.h0000664000175000017500000000311013012271522021765 0ustar00lordyestalordyesta00000000000000/* * The libfwnt header wrapper * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LIBFWNT_H ) #define _LIBWRC_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 #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( _LIBWRC_LIBFWNT_H ) */ libevt-20170120/libwrc/libwrc_libclocale.h0000664000175000017500000000266013012271522022422 0ustar00lordyestalordyesta00000000000000/* * The internal libclocale header * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LIBCLOCALE_H ) #define _LIBWRC_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( _LIBWRC_LIBCLOCALE_H ) */ libevt-20170120/libwrc/libwrc_wevt_channel.h0000664000175000017500000000311613012271522023003 0ustar00lordyestalordyesta00000000000000/* * WEVT channel functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_WEVT_CHANNEL_H ) #define _LIBWRC_INTERNAL_WEVT_CHANNEL_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_internal_wevt_channel libwrc_internal_wevt_channel_t; struct libwrc_internal_wevt_channel { /* The channel descriptor */ libfwevt_channel_t *channel_descriptor; }; int libwrc_wevt_channel_initialize( libwrc_wevt_channel_t **channel, libfwevt_channel_t *channel_descriptor, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_channel_free( libwrc_wevt_channel_t **channel, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_string.c0000664000175000017500000003376713012271522021646 0ustar00lordyestalordyesta00000000000000/* * String (resource) functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libwrc_definitions.h" #include "libwrc_language_entry.h" #include "libwrc_language_table.h" #include "libwrc_libcerror.h" #include "libwrc_libfvalue.h" #include "libwrc_resource.h" #include "libwrc_resource_values.h" #include "libwrc_string.h" /* Retrieves the number of strings * Returns 1 if successful or -1 on error */ int libwrc_string_get_number_of_strings( libwrc_resource_t *resource, uint32_t language_identifier, int *number_of_strings, libcerror_error_t **error ) { libwrc_internal_resource_t *internal_resource = NULL; static char *function = "libwrc_string_get_number_of_strings"; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } internal_resource = (libwrc_internal_resource_t *) resource; if( internal_resource->resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource - missing resource values.", function ); return( -1 ); } if( internal_resource->resource_values->identifier != LIBWRC_RESOURCE_IDENTIFIER_STRING ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported resource type: 0x%08" PRIx32 ".", function, internal_resource->resource_values->identifier ); return( -1 ); } if( internal_resource->value == NULL ) { if( libwrc_resource_read_value( internal_resource, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource value.", function ); return( -1 ); } } if( libwrc_language_table_get_number_of_values( (libwrc_language_table_t *) internal_resource->value, language_identifier, number_of_strings, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of values for language identifier: 0x%08" PRIx32 ".", function, language_identifier ); return( -1 ); } return( 1 ); } /* Retrieves a specific string identifier * Returns 1 if successful or -1 on error */ int libwrc_string_get_identifier( libwrc_resource_t *resource, uint32_t language_identifier, int string_index, uint32_t *string_identifier, libcerror_error_t **error ) { libfvalue_value_t *string_values = NULL; uint8_t *string_value_identifier = NULL; static char *function = "libwrc_string_get_identifier"; size_t string_value_identifier_size = 0; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_STRING, language_identifier, string_index, (intptr_t **) &string_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve string values.", function ); return( -1 ); } /* TODO move to string values function */ if( string_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string identifier.", function ); return( -1 ); } if( libfvalue_value_get_identifier( string_values, &string_value_identifier, &string_value_identifier_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve string value: %d identifier.", function, string_index ); return( -1 ); } if( string_value_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing string value identifier.", function ); return( -1 ); } if( string_value_identifier_size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: string value dentifier size value out of bound.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( string_value_identifier, *string_identifier ); return( 1 ); } /* Retrieves the string index for a specific identifier * Returns 1 if successful, 0 if no such string identifier or -1 on error */ int libwrc_string_get_index_by_identifier( libwrc_resource_t *resource, uint32_t language_identifier, uint32_t string_identifier, int *string_index, libcerror_error_t **error ) { libfvalue_value_t *string_value = NULL; libwrc_internal_resource_t *internal_resource = NULL; libwrc_language_entry_t *language_entry = NULL; uint8_t *string_value_identifier = NULL; static char *function = "libwrc_string_get_index_by_identifier"; size_t string_value_identifier_size = 0; uint32_t identifier = 0; int number_of_strings = 0; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } internal_resource = (libwrc_internal_resource_t *) resource; if( internal_resource->resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource - missing resource values.", function ); return( -1 ); } if( internal_resource->resource_values->identifier != LIBWRC_RESOURCE_IDENTIFIER_STRING ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported resource type: 0x%08" PRIx32 ".", function, internal_resource->resource_values->identifier ); return( -1 ); } if( internal_resource->value == NULL ) { if( libwrc_resource_read_value( internal_resource, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource value.", function ); return( -1 ); } } if( libwrc_language_table_get_entry_by_identifier( (libwrc_language_table_t *) internal_resource->value, language_identifier, &language_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve language entry for identifier: 0x%08" PRIx32 ".", function, language_identifier ); return( -1 ); } if( libwrc_language_entry_get_number_of_values( language_entry, &number_of_strings, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of strings.", function ); return( -1 ); } for( *string_index = 0; *string_index < number_of_strings; *string_index += 1 ) { if( libwrc_language_entry_get_value_by_index( language_entry, *string_index, (intptr_t **) &string_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve string value: %d.", function, string_index ); return( -1 ); } if( libfvalue_value_get_identifier( string_value, &string_value_identifier, &string_value_identifier_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve string value: %d identifier.", function, string_index ); return( -1 ); } if( string_value_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing string value identifier.", function ); return( -1 ); } if( string_value_identifier_size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: string size value out of bound.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( string_value_identifier, identifier ); if( identifier == string_identifier ) { return( 1 ); } } return( 0 ); } /* Retrieves the size of a specific UTF-8 formatted string * Returns 1 if successful or -1 on error */ int libwrc_string_get_utf8_string_size( libwrc_resource_t *resource, uint32_t language_identifier, int string_index, size_t *utf8_string_size, libcerror_error_t **error ) { libfvalue_value_t *string_values = NULL; static char *function = "libwrc_string_get_utf8_string_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_STRING, language_identifier, string_index, (intptr_t **) &string_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve string values.", function ); return( -1 ); } if( libfvalue_value_get_utf8_string_size( string_values, 0, 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 of string value: %d.", function, string_index ); return( -1 ); } return( 1 ); } /* Retrieves a specific UTF-8 formatted string * Returns 1 if successful or -1 on error */ int libwrc_string_get_utf8_string( libwrc_resource_t *resource, uint32_t language_identifier, int string_index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libfvalue_value_t *string_values = NULL; static char *function = "libwrc_string_get_utf8_string"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_STRING, language_identifier, string_index, (intptr_t **) &string_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve string values.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf8_string( string_values, 0, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy string value: %d to UTF-8 string.", function, string_index ); return( -1 ); } return( 1 ); } /* Retrieves the size of a specific UTF-16 formatted string * Returns 1 if successful or -1 on error */ int libwrc_string_get_utf16_string_size( libwrc_resource_t *resource, uint32_t language_identifier, int string_index, size_t *utf16_string_size, libcerror_error_t **error ) { libfvalue_value_t *string_values = NULL; static char *function = "libwrc_string_get_utf16_string_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_STRING, language_identifier, string_index, (intptr_t **) &string_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve string values.", function ); return( -1 ); } if( libfvalue_value_get_utf16_string_size( string_values, 0, 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 of string value: %d.", function, string_index ); return( -1 ); } return( 1 ); } /* Retrieves a specific UTF-16 formatted string * Returns 1 if successful or -1 on error */ int libwrc_string_get_utf16_string( libwrc_resource_t *resource, uint32_t language_identifier, int string_index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libfvalue_value_t *string_values = NULL; static char *function = "libwrc_string_get_utf16_string"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_STRING, language_identifier, string_index, (intptr_t **) &string_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve string values.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf16_string( string_values, 0, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy string value: %d to UTF-16 string.", function, string_index ); return( -1 ); } return( 1 ); } libevt-20170120/libwrc/libwrc_wevt_level.h0000664000175000017500000000305413012271522022503 0ustar00lordyestalordyesta00000000000000/* * WEVT level functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_WEVT_LEVEL_H ) #define _LIBWRC_INTERNAL_WEVT_LEVEL_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_internal_wevt_level libwrc_internal_wevt_level_t; struct libwrc_internal_wevt_level { /* The level descriptor */ libfwevt_level_t *level_descriptor; }; int libwrc_wevt_level_initialize( libwrc_wevt_level_t **level, libfwevt_level_t *level_descriptor, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_level_free( libwrc_wevt_level_t **level, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_wevt_template.c0000664000175000017500000001272013012271522023202 0ustar00lordyestalordyesta00000000000000/* * WEVT_TEMPLATE (resource) functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libwrc_definitions.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_resource.h" #include "libwrc_types.h" #include "libwrc_wevt_provider.h" #include "libwrc_wevt_template.h" #include "libwrc_wevt_template_values.h" /* Retrieves the number of providers * Returns 1 if successful or -1 on error */ int libwrc_wevt_template_get_number_of_providers( libwrc_resource_t *resource, uint32_t language_identifier, int *number_of_providers, libcerror_error_t **error ) { libfwevt_manifest_t *manifest = NULL; static char *function = "libwrc_wevt_template_get_number_of_providers"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_WEVT_TEMPLATE, language_identifier, 0, (intptr_t **) &manifest, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve WEVT_TEMPLATE manifest.", function ); return( -1 ); } if( libfwevt_manifest_get_number_of_providers( manifest, number_of_providers, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of providers.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific provider * Returns 1 if successful or -1 on error */ int libwrc_wevt_template_get_provider( libwrc_resource_t *resource, uint32_t language_identifier, int provider_index, libwrc_wevt_provider_t **provider, libcerror_error_t **error ) { libfwevt_manifest_t *manifest = NULL; libfwevt_provider_t *provider_descriptor = NULL; static char *function = "libwrc_wevt_template_get_provider"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_WEVT_TEMPLATE, language_identifier, 0, (intptr_t **) &manifest, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve WEVT_TEMPLATE manifest.", function ); return( -1 ); } if( libfwevt_manifest_get_provider( manifest, provider_index, &provider_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve provider: %d.", function, provider_index ); return( -1 ); } if( libwrc_wevt_provider_initialize( provider, provider_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create provider.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific provider by identifier (GUID) * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_wevt_template_get_provider_by_identifier( libwrc_resource_t *resource, uint32_t language_identifier, const uint8_t *provider_identifier, size_t provider_identifier_size, libwrc_wevt_provider_t **provider, libcerror_error_t **error ) { libfwevt_manifest_t *manifest = NULL; libfwevt_provider_t *provider_descriptor = NULL; static char *function = "libwrc_wevt_template_get_provider_by_identifier"; int result = 0; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_WEVT_TEMPLATE, language_identifier, 0, (intptr_t **) &manifest, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve WEVT_TEMPLATE manifest.", function ); return( -1 ); } result = libfwevt_manifest_get_provider_by_identifier( manifest, provider_identifier, provider_identifier_size, &provider_descriptor, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve provider.", function ); return( -1 ); } else if( result != 0 ) { if( libwrc_wevt_provider_initialize( provider, provider_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create provider.", function ); return( -1 ); } } return( result ); } libevt-20170120/libwrc/libwrc_language_entry.c0000664000175000017500000001546013012271522023332 0ustar00lordyestalordyesta00000000000000/* * Language (table) entry functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_definitions.h" #include "libwrc_language_entry.h" #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" #include "libwrc_libcnotify.h" /* Creates a language entry * Make sure the value language_entry is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_language_entry_initialize( libwrc_language_entry_t **language_entry, uint32_t language_identifier, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libwrc_language_entry_initialize"; if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", function ); return( -1 ); } if( *language_entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid language entry 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 ); } *language_entry = memory_allocate_structure( libwrc_language_entry_t ); if( *language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create language entry.", function ); goto on_error; } if( memory_set( *language_entry, 0, sizeof( libwrc_language_entry_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear language entry.", function ); memory_free( *language_entry ); *language_entry = NULL; return( -1 ); } if( libcdata_array_initialize( &( ( *language_entry )->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; } ( *language_entry )->language_identifier = language_identifier; ( *language_entry )->value_free_function = value_free_function; return( 1 ); on_error: if( *language_entry != NULL ) { memory_free( *language_entry ); *language_entry = NULL; } return( -1 ); } /* Frees a language entry * Returns 1 if successful or -1 on error */ int libwrc_language_entry_free( libwrc_language_entry_t **language_entry, libcerror_error_t **error ) { static char *function = "libwrc_language_entry_free"; int result = 1; if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", function ); return( -1 ); } if( *language_entry != NULL ) { if( libcdata_array_free( &( ( *language_entry )->values_array ), ( *language_entry )->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( *language_entry ); *language_entry = NULL; } return( result ); } /* Retrieves the number of values * Returns 1 if successful or -1 on error */ int libwrc_language_entry_get_number_of_values( libwrc_language_entry_t *language_entry, int *number_of_values, libcerror_error_t **error ) { static char *function = "libwrc_language_entry_get_number_of_values"; if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( language_entry->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.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific value * Returns 1 if successful or -1 on error */ int libwrc_language_entry_get_value_by_index( libwrc_language_entry_t *language_entry, int value_index, intptr_t **value, libcerror_error_t **error ) { static char *function = "libwrc_language_entry_get_value_by_index"; if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( language_entry->values_array, value_index, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d.", function, value_index ); return( -1 ); } return( 1 ); } /* Appends a value * Returns 1 if successful or -1 on error */ int libwrc_language_entry_append_value( libwrc_language_entry_t *language_entry, int *value_index, intptr_t *value, libcerror_error_t **error ) { static char *function = "libwrc_language_entry_append_value"; if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", function ); return( -1 ); } if( libcdata_array_append_entry( language_entry->values_array, value_index, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append entry.", function, value_index ); return( -1 ); } return( 1 ); } libevt-20170120/libwrc/libwrc_libcdata.h0000664000175000017500000000301113012271522022063 0ustar00lordyestalordyesta00000000000000/* * The internal libcdata header * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LIBCDATA_H ) #define _LIBWRC_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( _LIBWRC_LIBCDATA_H ) */ libevt-20170120/libwrc/libwrc_wevt_provider.h0000664000175000017500000000424513012271522023231 0ustar00lordyestalordyesta00000000000000/* * WEVT provider functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_WEVT_PROVIDER_H ) #define _LIBWRC_INTERNAL_WEVT_PROVIDER_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_resource.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_internal_wevt_provider libwrc_internal_wevt_provider_t; struct libwrc_internal_wevt_provider { /* The provider descriptor */ libfwevt_provider_t *provider_descriptor; }; int libwrc_wevt_provider_initialize( libwrc_wevt_provider_t **provider, libfwevt_provider_t *provider_descriptor, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_provider_free( libwrc_wevt_provider_t **provider, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_provider_get_number_of_events( libwrc_wevt_provider_t *provider, int *number_of_events, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_provider_get_event( libwrc_wevt_provider_t *provider, int event_index, libwrc_wevt_event_t **event, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_provider_get_event_by_identifier( libwrc_wevt_provider_t *provider, uint32_t event_identifier, libwrc_wevt_event_t **event, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_wevt_template_definition.h0000664000175000017500000000442413012271522025421 0ustar00lordyestalordyesta00000000000000/* * WEVT template definition functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_WEVT_TEMPLATE_DEFINITION_H ) #define _LIBWRC_INTERNAL_WEVT_TEMPLATE_DEFINITION_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_internal_wevt_template_definition libwrc_internal_wevt_template_definition_t; struct libwrc_internal_wevt_template_definition { /* The template descriptor */ libfwevt_template_t *template_descriptor; }; int libwrc_wevt_template_definition_initialize( libwrc_wevt_template_definition_t **template_definition, libfwevt_template_t *template_descriptor, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_template_definition_free( libwrc_wevt_template_definition_t **template_definition, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_template_definition_get_data( libwrc_wevt_template_definition_t *template_definition, uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_template_definition_get_offset( libwrc_wevt_template_definition_t *template_definition, uint32_t *offset, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_template_definition_get_size( libwrc_wevt_template_definition_t *template_definition, size_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_message_table_values.c0000664000175000017500000003261213012271522024476 0ustar00lordyestalordyesta00000000000000/* * Message table values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_data_descriptor.h" #include "libwrc_definitions.h" #include "libwrc_io_handle.h" #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #include "libwrc_libcnotify.h" #include "libwrc_libfvalue.h" #include "libwrc_language_entry.h" #include "libwrc_message_table_values.h" #include "wrc_message_table_resource.h" /* Reads message table values * Returns 1 if successful or -1 on error */ int libwrc_message_table_values_read( libwrc_language_entry_t *language_entry, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ) { libfvalue_value_t *message_table_value = NULL; uint8_t *resource_data = NULL; uint8_t *message_table_resource_data = NULL; uint8_t *message_table_string_resource_data = NULL; static char *function = "libwrc_message_table_values_read"; off64_t file_offset = 0; size_t message_entry_descriptors_size = 0; size_t resource_data_size = 0; ssize_t read_count = 0; uint32_t first_message_identifier = 0; uint32_t last_message_identifier = 0; uint16_t message_entry_descriptor_index = 0; uint16_t message_table_string_flags = 0; uint32_t message_table_string_offset = 0; uint16_t message_table_string_size = 0; uint16_t number_of_message_entry_descriptors = 0; uint16_t string_size = 0; int result = 0; int value_encoding = 0; int value_index = 0; if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", 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_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data descriptor.", function ); return( -1 ); } file_offset = data_descriptor->virtual_address - io_handle->virtual_address; if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek resource data offset: %" PRIi64 ".", function, file_offset ); goto on_error; } resource_data_size = (size_t) data_descriptor->size; resource_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * resource_data_size ); if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource data.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, resource_data, resource_data_size, error ); if( read_count != (ssize_t) resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource data.", function ); goto on_error; } message_table_resource_data = resource_data; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: resource data:\n", function ); libcnotify_print_data( message_table_resource_data, resource_data_size, 0 ); } #endif byte_stream_copy_to_uint32_little_endian( message_table_resource_data, number_of_message_entry_descriptors ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: number of message entry descriptors\t: %" PRIu32 "\n", function, number_of_message_entry_descriptors ); libcnotify_printf( "\n" ); } #endif message_table_resource_data += sizeof( uint32_t ); resource_data_size -= sizeof( uint32_t ); message_entry_descriptors_size = number_of_message_entry_descriptors * sizeof( wrc_message_table_entry_descriptor_t ); if( message_entry_descriptors_size > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: number of message entry descriptors value out of bound.", function ); goto on_error; } for( message_entry_descriptor_index = 0; message_entry_descriptor_index < number_of_message_entry_descriptors; message_entry_descriptor_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: message entry descriptor: %03d\n", function, message_entry_descriptor_index ); libcnotify_print_data( message_table_resource_data, sizeof( wrc_message_table_entry_descriptor_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( ( (wrc_message_table_entry_descriptor_t *) message_table_resource_data )->first_identifier, first_message_identifier ); byte_stream_copy_to_uint32_little_endian( ( (wrc_message_table_entry_descriptor_t *) message_table_resource_data )->last_identifier, last_message_identifier ); byte_stream_copy_to_uint32_little_endian( ( (wrc_message_table_entry_descriptor_t *) message_table_resource_data )->offset, message_table_string_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: first message identifier\t\t\t: 0x%08" PRIx32 "\n", function, first_message_identifier ); libcnotify_printf( "%s: last message identifier\t\t\t: 0x%08" PRIx32 "\n", function, last_message_identifier ); libcnotify_printf( "%s: first message string offset\t\t\t: 0x%08" PRIx32 "\n", function, message_table_string_offset ); libcnotify_printf( "\n" ); } #endif message_table_resource_data += sizeof( wrc_message_table_entry_descriptor_t ); resource_data_size -= sizeof( wrc_message_table_entry_descriptor_t ); if( first_message_identifier > last_message_identifier ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: first message identifier exceeds last.", function ); goto on_error; } while( first_message_identifier <= last_message_identifier ) { if( message_table_string_offset >= (size_t) data_descriptor->size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: number of message string offset value out of bound.", function ); goto on_error; } message_table_string_resource_data = &( resource_data[ message_table_string_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: message string: 0x%08" PRIx32 "\n", function, first_message_identifier ); libcnotify_print_data( message_table_string_resource_data, sizeof( wrc_message_table_string_t ), 0 ); } #endif byte_stream_copy_to_uint16_little_endian( ( (wrc_message_table_string_t *) message_table_string_resource_data )->size, message_table_string_size ); byte_stream_copy_to_uint16_little_endian( ( (wrc_message_table_string_t *) message_table_string_resource_data )->flags, message_table_string_flags ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: message string: 0x%08" PRIx32 " size\t\t: %" PRIu16 "\n", function, first_message_identifier, message_table_string_size ); libcnotify_printf( "%s: message string: 0x%08" PRIx32 " flags\t\t: 0x%04" PRIx16 "\n", function, first_message_identifier, message_table_string_flags ); } #endif if( message_table_string_size > sizeof( wrc_message_table_string_t ) ) { message_table_string_resource_data += sizeof( wrc_message_table_string_t ); message_table_string_offset += sizeof( wrc_message_table_string_t ); message_table_string_size -= sizeof( wrc_message_table_string_t ); if( ( message_table_string_flags & 0x0001 ) == 0 ) { result = libfvalue_value_type_initialize( &( message_table_value ), LIBFVALUE_VALUE_TYPE_STRING_BYTE_STREAM, error ); } else { result = libfvalue_value_type_initialize( &( message_table_value ), LIBFVALUE_VALUE_TYPE_STRING_UTF16, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create string value.", function ); goto on_error; } if( libfvalue_value_set_identifier( message_table_value, (uint8_t *) &first_message_identifier, 4, LIBFVALUE_VALUE_IDENTIFIER_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to set identifier of message table value.", function ); goto on_error; } if( ( message_table_string_flags & 0x0001 ) == 0 ) { value_encoding = io_handle->ascii_codepage; } else { value_encoding = LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN; } /* TODO data bounds check */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: message string: 0x%08" PRIx32 " data:\n", function, first_message_identifier ); libcnotify_print_data( message_table_string_resource_data, (size_t) message_table_string_size, 0 ); } #endif /* Strip off trailing 0-byte values */ string_size = message_table_string_size; if( ( message_table_string_flags & 0x0001 ) == 0 ) { while( string_size > 0 ) { string_size -= 1; if( message_table_string_resource_data[ string_size ] != 0 ) { break; } } string_size += 1; } else { while( string_size > 1 ) { string_size -= 2; if( ( message_table_string_resource_data[ string_size ] != 0 ) || ( message_table_string_resource_data[ string_size + 1 ] != 0 ) ) { break; } } string_size += 2; } if( libfvalue_value_set_data( message_table_value, message_table_string_resource_data, (size_t) string_size, value_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 of string value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: message string: 0x%08" PRIx32 " value\t\t: ", function, first_message_identifier ); if( libfvalue_value_print( message_table_value, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print string value.", function ); goto on_error; } libcnotify_printf( "\n" ); } #endif } #if defined( HAVE_DEBUG_OUTPUT ) else if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif message_table_string_resource_data += message_table_string_size; message_table_string_offset += message_table_string_size; if( libwrc_language_entry_append_value( language_entry, &value_index, (intptr_t *) message_table_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append message table values.", function ); goto on_error; } message_table_value = NULL; first_message_identifier++; } } memory_free( resource_data ); return( 1 ); on_error: if( message_table_value != NULL ) { libfvalue_value_free( &message_table_value, NULL ); } if( resource_data != NULL ) { memory_free( resource_data ); } return( -1 ); } libevt-20170120/libwrc/libwrc_wevt_provider.c0000664000175000017500000001717713012271522023234 0ustar00lordyestalordyesta00000000000000/* * WEVT provider functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libwrc_definitions.h" #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #include "libwrc_wevt_event.h" #include "libwrc_wevt_provider.h" /* Creates a provider * Make sure the value provider is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_wevt_provider_initialize( libwrc_wevt_provider_t **provider, libfwevt_provider_t *provider_descriptor, libcerror_error_t **error ) { libwrc_internal_wevt_provider_t *internal_provider = NULL; static char *function = "libwrc_wevt_provider_initialize"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } if( *provider != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid provider value already set.", function ); return( -1 ); } if( provider_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider descriptor.", function ); return( -1 ); } internal_provider = memory_allocate_structure( libwrc_internal_wevt_provider_t ); if( internal_provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create provider.", function ); goto on_error; } if( memory_set( internal_provider, 0, sizeof( libwrc_internal_wevt_provider_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear provider.", function ); goto on_error; } internal_provider->provider_descriptor = provider_descriptor; *provider = (libwrc_wevt_provider_t *) internal_provider; return( 1 ); on_error: if( internal_provider != NULL ) { memory_free( internal_provider ); } return( -1 ); } /* Frees a provider * Returns 1 if successful or -1 on error */ int libwrc_wevt_provider_free( libwrc_wevt_provider_t **provider, libcerror_error_t **error ) { libwrc_internal_wevt_provider_t *internal_provider = NULL; static char *function = "libwrc_wevt_provider_free"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } if( *provider != NULL ) { internal_provider = (libwrc_internal_wevt_provider_t *) *provider; *provider = NULL; memory_free( internal_provider ); } return( 1 ); } /* Retrieves the number of events * Returns 1 if successful or -1 on error */ int libwrc_wevt_provider_get_number_of_events( libwrc_wevt_provider_t *provider, int *number_of_events, libcerror_error_t **error ) { libwrc_internal_wevt_provider_t *internal_provider = NULL; static char *function = "libwrc_wevt_provider_get_number_of_events"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libwrc_internal_wevt_provider_t *) provider; if( libfwevt_provider_get_number_of_events( internal_provider->provider_descriptor, number_of_events, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of events.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific event * Returns 1 if successful or -1 on error */ int libwrc_wevt_provider_get_event( libwrc_wevt_provider_t *provider, int event_index, libwrc_wevt_event_t **event, libcerror_error_t **error ) { libwrc_internal_wevt_provider_t *internal_provider = NULL; libfwevt_event_t *event_descriptor = NULL; static char *function = "libwrc_wevt_provider_get_event"; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libwrc_internal_wevt_provider_t *) provider; if( libfwevt_provider_get_event( internal_provider->provider_descriptor, event_index, &event_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve event: %d.", function, event_index ); return( -1 ); } if( libwrc_wevt_event_initialize( event, internal_provider->provider_descriptor, event_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create event.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific event by identifier * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_wevt_provider_get_event_by_identifier( libwrc_wevt_provider_t *provider, uint32_t event_identifier, libwrc_wevt_event_t **event, libcerror_error_t **error ) { libwrc_internal_wevt_provider_t *internal_provider = NULL; libfwevt_event_t *event_descriptor = NULL; static char *function = "libwrc_wevt_provider_get_event_by_identifier"; int result = 0; if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } internal_provider = (libwrc_internal_wevt_provider_t *) provider; result = libfwevt_provider_get_event_by_identifier( internal_provider->provider_descriptor, event_identifier, &event_descriptor, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve event.", function ); return( -1 ); } else if( result != 0 ) { if( libwrc_wevt_event_initialize( event, internal_provider->provider_descriptor, event_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create event.", function ); return( -1 ); } } return( result ); } libevt-20170120/libwrc/libwrc_wevt_opcode.h0000664000175000017500000000307513012271522022650 0ustar00lordyestalordyesta00000000000000/* * WEVT opcode functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_WEVT_OPCODE_H ) #define _LIBWRC_INTERNAL_WEVT_OPCODE_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_internal_wevt_opcode libwrc_internal_wevt_opcode_t; struct libwrc_internal_wevt_opcode { /* The opcode descriptor */ libfwevt_opcode_t *opcode_descriptor; }; int libwrc_wevt_opcode_initialize( libwrc_wevt_opcode_t **opcode, libfwevt_opcode_t *opcode_descriptor, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_opcode_free( libwrc_wevt_opcode_t **opcode, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_stream.c0000664000175000017500000012264113012271522021621 0ustar00lordyestalordyesta00000000000000/* * Strea, functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "libwrc_codepage.h" #include "libwrc_debug.h" #include "libwrc_definitions.h" #include "libwrc_io_handle.h" #include "libwrc_libbfio.h" #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" #include "libwrc_libcnotify.h" #include "libwrc_libuna.h" #include "libwrc_resource.h" #include "libwrc_resource_values.h" #include "libwrc_stream.h" /* Creates a stream * Make sure the value stream is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_stream_initialize( libwrc_stream_t **stream, libcerror_error_t **error ) { libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_stream_initialize"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } if( *stream != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid stream value already set.", function ); return( -1 ); } internal_stream = memory_allocate_structure( libwrc_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( libwrc_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( libwrc_io_handle_initialize( &( internal_stream->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; } *stream = (libwrc_stream_t *) internal_stream; return( 1 ); on_error: if( internal_stream != NULL ) { memory_free( internal_stream ); } return( -1 ); } /* Frees a stream * Returns 1 if successful or -1 on error */ int libwrc_stream_free( libwrc_stream_t **stream, libcerror_error_t **error ) { libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_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 = (libwrc_internal_stream_t *) *stream; if( internal_stream->file_io_handle != NULL ) { if( libwrc_stream_close( *stream, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close stream.", function ); result = -1; } } *stream = NULL; if( libwrc_io_handle_free( &( internal_stream->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_stream ); } return( result ); } /* Signals the stream to abort its current activity * Returns 1 if successful or -1 on error */ int libwrc_stream_signal_abort( libwrc_stream_t *stream, libcerror_error_t **error ) { libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_stream_signal_abort"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libwrc_internal_stream_t *) stream; if( internal_stream->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing IO handle.", function ); return( -1 ); } internal_stream->io_handle->abort = 1; return( 1 ); } /* Opens a stream * Returns 1 if successful or -1 on error */ int libwrc_stream_open( libwrc_stream_t *stream, const char *filename, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_stream_open"; size_t filename_length = 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 = (libwrc_internal_stream_t *) stream; 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 & LIBWRC_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBWRC_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 & LIBWRC_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( libwrc_stream_open_file_io_handle( stream, file_io_handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open stream: %s.", function, filename ); goto on_error; } internal_stream->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 stream * Returns 1 if successful or -1 on error */ int libwrc_stream_open_wide( libwrc_stream_t *stream, const wchar_t *filename, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_stream_open_wide"; size_t filename_length = 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 = (libwrc_internal_stream_t *) stream; 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 & LIBWRC_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBWRC_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 & LIBWRC_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( libwrc_stream_open_file_io_handle( stream, file_io_handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open stream: %ls.", function, filename ); goto on_error; } internal_stream->file_io_handle_created_in_library = 1; return( 1 ); on_error: if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } return( -1 ); } #endif /* Opens a stream using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ int libwrc_stream_open_file_io_handle( libwrc_stream_t *stream, libbfio_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ) { libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_stream_open_file_io_handle"; int bfio_access_flags = 0; int file_io_handle_is_open = 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 = (libwrc_internal_stream_t *) stream; if( internal_stream->file_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid stream - file IO handle already set.", function ); return( -1 ); } if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( ( ( access_flags & LIBWRC_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBWRC_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 & LIBWRC_ACCESS_FLAG_WRITE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: write access currently not supported.", function ); return( -1 ); } if( ( access_flags & LIBWRC_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 determine if file IO handle is open.", 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_stream->file_io_handle_opened_in_library = 1; } if( libwrc_stream_open_read( internal_stream, 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_stream->file_io_handle = file_io_handle; return( 1 ); on_error: if( ( file_io_handle_is_open == 0 ) && ( internal_stream->file_io_handle_opened_in_library != 0 ) ) { libbfio_handle_close( file_io_handle, error ); internal_stream->file_io_handle_opened_in_library = 0; } internal_stream->file_io_handle = NULL; return( -1 ); } /* Closes a stream * Returns 0 if successful or -1 on error */ int libwrc_stream_close( libwrc_stream_t *stream, libcerror_error_t **error ) { libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_stream_close"; 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 = (libwrc_internal_stream_t *) stream; if( internal_stream->file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing file IO handle.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( internal_stream->file_io_handle_created_in_library != 0 ) { if( libwrc_debug_print_read_offsets( internal_stream->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_stream->file_io_handle_opened_in_library != 0 ) { if( libbfio_handle_close( internal_stream->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_stream->file_io_handle_opened_in_library = 0; } if( internal_stream->file_io_handle_created_in_library != 0 ) { if( libbfio_handle_free( &( internal_stream->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_stream->file_io_handle_created_in_library = 0; } internal_stream->file_io_handle = NULL; if( libwrc_io_handle_clear( internal_stream->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( libcdata_tree_node_free( &( internal_stream->resources_root_node ), (int (*)(intptr_t **, libcerror_error_t **)) &libwrc_resource_values_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free resources root node.", function ); result = -1; } return( result ); } /* Opens a stream for reading * Returns 1 if successful or -1 on error */ int libwrc_stream_open_read( libwrc_internal_stream_t *internal_stream, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libwrc_stream_open_read"; if( internal_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } if( internal_stream->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing IO handle.", function ); return( -1 ); } if( internal_stream->io_handle->abort != 0 ) { internal_stream->io_handle->abort = 0; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading resource nodes:\n" ); } #endif if( libwrc_io_handle_read_resource_nodes( internal_stream->io_handle, file_io_handle, &( internal_stream->resources_root_node ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource nodes.", function ); return( -1 ); } return( 1 ); } /* Retrieves the stream ASCII codepage * Returns 1 if successful or -1 on error */ int libwrc_stream_get_ascii_codepage( libwrc_stream_t *stream, int *ascii_codepage, libcerror_error_t **error ) { libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_stream_get_ascii_codepage"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libwrc_internal_stream_t *) stream; if( internal_stream->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing IO handle.", function ); return( -1 ); } if( ascii_codepage == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid ASCII codepage.", function ); return( -1 ); } *ascii_codepage = internal_stream->io_handle->ascii_codepage; return( 1 ); } /* Sets the stream ASCII codepage * Returns 1 if successful or -1 on error */ int libwrc_stream_set_ascii_codepage( libwrc_stream_t *stream, int ascii_codepage, libcerror_error_t **error ) { libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_stream_set_ascii_codepage"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libwrc_internal_stream_t *) stream; if( internal_stream->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing IO handle.", function ); return( -1 ); } if( ( ascii_codepage != LIBWRC_CODEPAGE_ASCII ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_874 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_932 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_936 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_949 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_950 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_1250 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_1251 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_1252 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_1253 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_1254 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_1255 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_1256 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_1257 ) && ( ascii_codepage != LIBWRC_CODEPAGE_WINDOWS_1258 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported ASCII codepage.", function ); return( -1 ); } internal_stream->io_handle->ascii_codepage = ascii_codepage; return( 1 ); } /* Retrieves the virtual address * Returns 1 if successful or -1 on error */ int libwrc_stream_get_virtual_address( libwrc_stream_t *stream, uint32_t *virtual_address, libcerror_error_t **error ) { libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_stream_get_virtual_address"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libwrc_internal_stream_t *) stream; if( internal_stream->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing IO handle.", function ); return( -1 ); } if( virtual_address == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid virtual address.", function ); return( -1 ); } *virtual_address = internal_stream->io_handle->virtual_address; return( 1 ); } /* Sets the virtual address * Returns 1 if successful or -1 on error */ int libwrc_stream_set_virtual_address( libwrc_stream_t *stream, uint32_t virtual_address, libcerror_error_t **error ) { libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_stream_set_virtual_address"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libwrc_internal_stream_t *) stream; if( internal_stream->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing IO handle.", function ); return( -1 ); } internal_stream->io_handle->virtual_address = virtual_address; return( 1 ); } /* Retrieves the number of resources * Returns 1 if successful or -1 on error */ int libwrc_stream_get_number_of_resources( libwrc_stream_t *stream, int *number_of_resources, libcerror_error_t **error ) { libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_stream_get_number_of_resources"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libwrc_internal_stream_t *) stream; if( libcdata_tree_node_get_number_of_sub_nodes( internal_stream->resources_root_node, number_of_resources, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of resources.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific resource * Returns 1 if successful or -1 on error */ int libwrc_stream_get_resource( libwrc_stream_t *stream, int resource_index, libwrc_resource_t **resource, libcerror_error_t **error ) { libcdata_tree_node_t *resource_node = NULL; libwrc_internal_stream_t *internal_stream = NULL; static char *function = "libwrc_stream_get_resource"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libwrc_internal_stream_t *) stream; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } if( *resource != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid resource value already set.", function ); return( -1 ); } if( libcdata_tree_node_get_sub_node_by_index( internal_stream->resources_root_node, resource_index, &resource_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve event resource node: %d.", function, resource_index ); return( -1 ); } if( libwrc_resource_initialize( resource, internal_stream->io_handle, internal_stream->file_io_handle, resource_node, LIBWRC_RESOURCE_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create resource.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific resource by identifier * Returns 1 if successful, 0 if no such resource or -1 on error */ int libwrc_stream_get_resource_by_identifier( libwrc_stream_t *stream, uint32_t identifier, libwrc_resource_t **resource, libcerror_error_t **error ) { libcdata_tree_node_t *resource_node = NULL; libwrc_internal_stream_t *internal_stream = NULL; libwrc_resource_values_t *resource_values = NULL; static char *function = "libwrc_stream_get_resource_by_identifier"; int number_of_resources = 0; int resource_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 = (libwrc_internal_stream_t *) stream; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } if( *resource != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid resource value already set.", function ); return( -1 ); } if( libcdata_tree_node_get_number_of_sub_nodes( internal_stream->resources_root_node, &number_of_resources, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of resources.", function ); return( -1 ); } if( libcdata_tree_node_get_sub_node_by_index( internal_stream->resources_root_node, 0, &resource_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first resource node.", function ); return( -1 ); } for( resource_index = 0; resource_index < number_of_resources; resource_index++ ) { if( libcdata_tree_node_get_value( resource_node, (intptr_t **) &resource_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value of resource node: %d.", function, resource_index ); return( -1 ); } if( resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing resource values: %d.", function, resource_index ); return( -1 ); } if( identifier == resource_values->identifier ) { if( libwrc_resource_initialize( resource, internal_stream->io_handle, internal_stream->file_io_handle, resource_node, LIBWRC_RESOURCE_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create resource.", function ); return( -1 ); } return( 1 ); } if( libcdata_tree_node_get_next_node( resource_node, &resource_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next node of resource node: %d.", function, resource_index ); return( -1 ); } } return( 0 ); } /* Retrieves a specific resource by type * Returns 1 if successful, 0 if no such resource or -1 on error */ int libwrc_stream_get_resource_by_type( libwrc_stream_t *stream, int type, libwrc_resource_t **resource, libcerror_error_t **error ) { libcdata_tree_node_t *resource_node = NULL; libwrc_internal_stream_t *internal_stream = NULL; libwrc_resource_values_t *resource_values = NULL; static char *function = "libwrc_stream_get_resource_by_type"; int number_of_resources = 0; int resource_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 = (libwrc_internal_stream_t *) stream; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } if( *resource != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid resource value already set.", function ); return( -1 ); } if( libcdata_tree_node_get_number_of_sub_nodes( internal_stream->resources_root_node, &number_of_resources, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of resources.", function ); return( -1 ); } if( libcdata_tree_node_get_sub_node_by_index( internal_stream->resources_root_node, 0, &resource_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first resource node.", function ); return( -1 ); } for( resource_index = 0; resource_index < number_of_resources; resource_index++ ) { if( libcdata_tree_node_get_value( resource_node, (intptr_t **) &resource_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value of resource node: %d.", function, resource_index ); return( -1 ); } if( resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing resource values: %d.", function, resource_index ); return( -1 ); } if( type == resource_values->type ) { if( libwrc_resource_initialize( resource, internal_stream->io_handle, internal_stream->file_io_handle, resource_node, LIBWRC_RESOURCE_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create resource.", function ); return( -1 ); } return( 1 ); } if( libcdata_tree_node_get_next_node( resource_node, &resource_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next node of resource node: %d.", function, resource_index ); return( -1 ); } } return( 0 ); } /* Retrieves a specific resource by an UTF-8 formatted name * Returns 1 if successful, 0 if no such resource or -1 on error */ int libwrc_stream_get_resource_by_utf8_name( libwrc_stream_t *stream, const uint8_t *utf8_string, size_t utf8_string_length, libwrc_resource_t **resource, libcerror_error_t **error ) { libcdata_tree_node_t *resource_node = NULL; libwrc_internal_stream_t *internal_stream = NULL; libwrc_resource_values_t *resource_values = NULL; static char *function = "libwrc_stream_get_resource_by_type"; int number_of_resources = 0; int resource_index = 0; 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 = (libwrc_internal_stream_t *) stream; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } if( *resource != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid resource value already set.", function ); return( -1 ); } if( libcdata_tree_node_get_number_of_sub_nodes( internal_stream->resources_root_node, &number_of_resources, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of resources.", function ); return( -1 ); } if( libcdata_tree_node_get_sub_node_by_index( internal_stream->resources_root_node, 0, &resource_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first resource node.", function ); return( -1 ); } for( resource_index = 0; resource_index < number_of_resources; resource_index++ ) { if( libcdata_tree_node_get_value( resource_node, (intptr_t **) &resource_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value of resource node: %d.", function, resource_index ); return( -1 ); } if( resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing resource values: %d.", function, resource_index ); return( -1 ); } if( resource_values->name_string_size > 0 ) { result = libuna_utf8_string_compare_with_utf16_stream( utf8_string, utf8_string_length + 1, resource_values->name_string, resource_values->name_string_size, LIBUNA_ENDIAN_LITTLE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare name of resource node: %d.", function, resource_index ); return( -1 ); } else if( result != 0 ) { if( libwrc_resource_initialize( resource, internal_stream->io_handle, internal_stream->file_io_handle, resource_node, LIBWRC_RESOURCE_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create resource.", function ); return( -1 ); } return( 1 ); } } if( libcdata_tree_node_get_next_node( resource_node, &resource_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next node of resource node: %d.", function, resource_index ); return( -1 ); } } return( 0 ); } /* Retrieves a specific resource by an UTF-16 formatted name * Returns 1 if successful, 0 if no such resource or -1 on error */ int libwrc_stream_get_resource_by_utf16_name( libwrc_stream_t *stream, const uint16_t *utf16_string, size_t utf16_string_length, libwrc_resource_t **resource, libcerror_error_t **error ) { libcdata_tree_node_t *resource_node = NULL; libwrc_internal_stream_t *internal_stream = NULL; libwrc_resource_values_t *resource_values = NULL; static char *function = "libwrc_stream_get_resource_by_type"; int number_of_resources = 0; int resource_index = 0; 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 = (libwrc_internal_stream_t *) stream; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } if( *resource != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid resource value already set.", function ); return( -1 ); } if( libcdata_tree_node_get_number_of_sub_nodes( internal_stream->resources_root_node, &number_of_resources, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of resources.", function ); return( -1 ); } if( libcdata_tree_node_get_sub_node_by_index( internal_stream->resources_root_node, 0, &resource_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first resource node.", function ); return( -1 ); } for( resource_index = 0; resource_index < number_of_resources; resource_index++ ) { if( libcdata_tree_node_get_value( resource_node, (intptr_t **) &resource_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value of resource node: %d.", function, resource_index ); return( -1 ); } if( resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing resource values: %d.", function, resource_index ); return( -1 ); } if( resource_values->name_string_size > 0 ) { result = libuna_utf16_string_compare_with_utf16_stream( utf16_string, utf16_string_length + 1, resource_values->name_string, resource_values->name_string_size, LIBUNA_ENDIAN_LITTLE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare name of resource node: %d.", function, resource_index ); return( -1 ); } else if( result != 0 ) { if( libwrc_resource_initialize( resource, internal_stream->io_handle, internal_stream->file_io_handle, resource_node, LIBWRC_RESOURCE_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create resource.", function ); return( -1 ); } return( 1 ); } } if( libcdata_tree_node_get_next_node( resource_node, &resource_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next node of resource node: %d.", function, resource_index ); return( -1 ); } } return( 0 ); } libevt-20170120/libwrc/libwrc_codepage.h0000664000175000017500000000501513012271522022075 0ustar00lordyestalordyesta00000000000000/* * Codepage functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_CODEPAGE_H ) #define _LIBWRC_INTERNAL_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBWRC ) #include /* Define HAVE_LOCAL_LIBWRC for local use of libwrc * The definitions in are copied here * for local use of libwrc */ #else /* The codepage definitions */ enum LIBWRC_CODEPAGES { LIBWRC_CODEPAGE_ASCII = 20127, LIBWRC_CODEPAGE_ISO_8859_1 = 28591, LIBWRC_CODEPAGE_ISO_8859_2 = 28592, LIBWRC_CODEPAGE_ISO_8859_3 = 28593, LIBWRC_CODEPAGE_ISO_8859_4 = 28594, LIBWRC_CODEPAGE_ISO_8859_5 = 28595, LIBWRC_CODEPAGE_ISO_8859_6 = 28596, LIBWRC_CODEPAGE_ISO_8859_7 = 28597, LIBWRC_CODEPAGE_ISO_8859_8 = 28598, LIBWRC_CODEPAGE_ISO_8859_9 = 28599, LIBWRC_CODEPAGE_ISO_8859_10 = 28600, LIBWRC_CODEPAGE_ISO_8859_11 = 28601, LIBWRC_CODEPAGE_ISO_8859_13 = 28603, LIBWRC_CODEPAGE_ISO_8859_14 = 28604, LIBWRC_CODEPAGE_ISO_8859_15 = 28605, LIBWRC_CODEPAGE_ISO_8859_16 = 28606, LIBWRC_CODEPAGE_KOI8_R = 20866, LIBWRC_CODEPAGE_KOI8_U = 21866, LIBWRC_CODEPAGE_WINDOWS_874 = 874, LIBWRC_CODEPAGE_WINDOWS_932 = 932, LIBWRC_CODEPAGE_WINDOWS_936 = 936, LIBWRC_CODEPAGE_WINDOWS_949 = 949, LIBWRC_CODEPAGE_WINDOWS_950 = 950, LIBWRC_CODEPAGE_WINDOWS_1250 = 1250, LIBWRC_CODEPAGE_WINDOWS_1251 = 1251, LIBWRC_CODEPAGE_WINDOWS_1252 = 1252, LIBWRC_CODEPAGE_WINDOWS_1253 = 1253, LIBWRC_CODEPAGE_WINDOWS_1254 = 1254, LIBWRC_CODEPAGE_WINDOWS_1255 = 1255, LIBWRC_CODEPAGE_WINDOWS_1256 = 1256, LIBWRC_CODEPAGE_WINDOWS_1257 = 1257, LIBWRC_CODEPAGE_WINDOWS_1258 = 1258 }; #endif /* !defined( HAVE_LOCAL_LIBWRC ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBWRC_INTERNAL_CODEPAGE_H ) */ libevt-20170120/libwrc/libwrc_version.c0000664000175000017500000000642513012271522022014 0ustar00lordyestalordyesta00000000000000/* * Version (resource) functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_definitions.h" #include "libwrc_language_entry.h" #include "libwrc_language_table.h" #include "libwrc_libcerror.h" #include "libwrc_libfvalue.h" #include "libwrc_libuna.h" #include "libwrc_resource.h" #include "libwrc_resource_values.h" #include "libwrc_version.h" #include "libwrc_version_values.h" /* Retrieves the file version * Returns 1 if successful or -1 on error */ int libwrc_version_get_file_version( libwrc_resource_t *resource, uint32_t language_identifier, uint64_t *version, libcerror_error_t **error ) { libwrc_version_values_t *version_values = NULL; static char *function = "libwrc_version_get_file_version"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_VERSION, language_identifier, 0, (intptr_t **) &version_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve version values.", function ); return( -1 ); } if( libwrc_version_values_get_file_version( version_values, version, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve file version.", function ); return( -1 ); } return( 1 ); } /* Retrieves the product version * Returns 1 if successful or -1 on error */ int libwrc_version_get_product_version( libwrc_resource_t *resource, uint32_t language_identifier, uint64_t *version, libcerror_error_t **error ) { libwrc_version_values_t *version_values = NULL; static char *function = "libwrc_version_get_product_version"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_VERSION, language_identifier, 0, (intptr_t **) &version_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve version values.", function ); return( -1 ); } if( libwrc_version_values_get_product_version( version_values, version, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve product version.", function ); return( -1 ); } return( 1 ); } libevt-20170120/libwrc/libwrc_libfcache.h0000664000175000017500000000263613012271522022234 0ustar00lordyestalordyesta00000000000000/* * The internal libfcache header * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LIBFCACHE_H ) #define _LIBWRC_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( _LIBWRC_LIBFCACHE_H ) */ libevt-20170120/libwrc/libwrc_manifest_values.h0000664000175000017500000000262013012271522023512 0ustar00lordyestalordyesta00000000000000/* * Manifest values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_MANIFEST_VALUES_H ) #define _LIBWRC_MANIFEST_VALUES_H #include #include #include "libwrc_data_descriptor.h" #include "libwrc_io_handle.h" #include "libwrc_language_entry.h" #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libwrc_manifest_values_read( libwrc_language_entry_t *language_entry, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/Makefile.am0000664000175000017500000000517013012271522020651 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBWRC AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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@ \ @LIBFWEVT_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ noinst_LTLIBRARIES = libwrc.la libwrc_la_SOURCES = \ libwrc_codepage.h \ libwrc_data_descriptor.c libwrc_data_descriptor.h \ libwrc_debug.c libwrc_debug.h \ libwrc_definitions.h \ libwrc_error.c libwrc_error.h \ libwrc_extern.h \ libwrc_io_handle.c libwrc_io_handle.h \ libwrc_language_entry.c libwrc_language_entry.h \ libwrc_language_table.c libwrc_language_table.h \ libwrc_libbfio.h \ libwrc_libcdata.h \ libwrc_libcerror.h \ libwrc_libclocale.h \ libwrc_libcnotify.h \ libwrc_libfcache.h \ libwrc_libfdata.h \ libwrc_libfguid.h \ libwrc_libfvalue.h \ libwrc_libfwevt.h \ libwrc_libfwnt.h \ libwrc_libuna.h \ libwrc_manifest.c libwrc_manifest.h \ libwrc_manifest_values.c libwrc_manifest_values.h \ libwrc_message_table.c libwrc_message_table.h \ libwrc_message_table_values.c libwrc_message_table_values.h \ libwrc_mui.c libwrc_mui.h \ libwrc_mui_values.c libwrc_mui_values.h \ libwrc_notify.c libwrc_notify.h \ libwrc_resource.c libwrc_resource.h \ libwrc_resource_values.c libwrc_resource_values.h \ libwrc_stream.c libwrc_stream.h \ libwrc_support.c libwrc_support.h \ libwrc_string.c libwrc_string.h \ libwrc_string_values.c libwrc_string_values.h \ libwrc_types.h \ libwrc_unused.h \ libwrc_version.c libwrc_version.h \ libwrc_version_values.c libwrc_version_values.h \ libwrc_wevt_channel.c libwrc_wevt_channel.h \ libwrc_wevt_event.c libwrc_wevt_event.h \ libwrc_wevt_keyword.c libwrc_wevt_keyword.h \ libwrc_wevt_level.c libwrc_wevt_level.h \ libwrc_wevt_map.c libwrc_wevt_map.h \ libwrc_wevt_opcode.c libwrc_wevt_opcode.h \ libwrc_wevt_provider.c libwrc_wevt_provider.h \ libwrc_wevt_task.c libwrc_wevt_task.h \ libwrc_wevt_template.c libwrc_wevt_template.h \ libwrc_wevt_template_definition.c libwrc_wevt_template_definition.h \ libwrc_wevt_template_values.c libwrc_wevt_template_values.h \ wrc_data_descriptor.h \ wrc_message_table_resource.h \ wrc_mui_resource.h \ wrc_resource_node.h \ wrc_version_resource.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libwrc ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libwrc_la_SOURCES) libevt-20170120/libwrc/libwrc_version_values.h0000664000175000017500000000657513012271522023406 0ustar00lordyestalordyesta00000000000000/* * Version (resource) values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_VERSION_VALUES_H ) #define _LIBWRC_VERSION_VALUES_H #include #include #include "libwrc_data_descriptor.h" #include "libwrc_io_handle.h" #include "libwrc_language_entry.h" #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_version_values libwrc_version_values_t; struct libwrc_version_values { /* The file version */ uint64_t file_version; /* The product version */ uint64_t product_version; }; int libwrc_version_values_initialize( libwrc_version_values_t **version_values, libcerror_error_t **error ); int libwrc_version_values_free( libwrc_version_values_t **version_values, libcerror_error_t **error ); int libwrc_version_values_read( libwrc_language_entry_t *language_entry, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ); ssize_t libwrc_version_values_read_string_file_information( libwrc_language_entry_t *language_entry, const uint8_t *resource_data, size_t resource_data_size, size_t resource_data_offset, libcerror_error_t **error ); ssize_t libwrc_version_values_read_string_table( libwrc_language_entry_t *language_entry, const uint8_t *resource_data, size_t resource_data_size, size_t resource_data_offset, libcerror_error_t **error ); ssize_t libwrc_version_values_read_string( libwrc_language_entry_t *language_entry, const uint8_t *resource_data, size_t resource_data_size, size_t resource_data_offset, libcerror_error_t **error ); ssize_t libwrc_version_values_read_variable_file_information( libwrc_language_entry_t *language_entry, const uint8_t *resource_data, size_t resource_data_size, size_t resource_data_offset, libcerror_error_t **error ); ssize_t libwrc_version_values_read_variable( libwrc_language_entry_t *language_entry, const uint8_t *resource_data, size_t resource_data_size, size_t resource_data_offset, libcerror_error_t **error ); int libwrc_version_values_get_file_version( libwrc_version_values_t *version_values, uint64_t *file_version, libcerror_error_t **error ); int libwrc_version_values_get_product_version( libwrc_version_values_t *version_values, uint64_t *product_version, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_resource_values.h0000664000175000017500000000422713012271522023540 0ustar00lordyestalordyesta00000000000000/* * Resource values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_RESOURCE_VALUES_H ) #define _LIBWRC_RESOURCE_VALUES_H #include #include #include "libwrc_data_descriptor.h" #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_resource_values libwrc_resource_values_t; struct libwrc_resource_values { /* The identifier */ uint32_t identifier; /* The offset */ uint32_t offset; /* The name string */ uint8_t *name_string; /* The name string size */ size_t name_string_size; /* The type */ int type; /* The data descriptor */ libwrc_data_descriptor_t *data_descriptor; }; int libwrc_resource_values_initialize( libwrc_resource_values_t **resource_values, libcerror_error_t **error ); int libwrc_resource_values_free( libwrc_resource_values_t **resource_values, libcerror_error_t **error ); int libwrc_resource_values_compare( libwrc_resource_values_t *first_resource_values, libwrc_resource_values_t *second_resource_values, libcerror_error_t **error ); int libwrc_resource_values_get_identifier( libwrc_resource_values_t *resource_values, uint32_t *identifier, libcerror_error_t **error ); int libwrc_resource_values_get_type( libwrc_resource_values_t *resource_values, int *type, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_resource.c0000664000175000017500000011016613012271522022154 0ustar00lordyestalordyesta00000000000000/* * Resource functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_definitions.h" #include "libwrc_io_handle.h" #include "libwrc_language_entry.h" #include "libwrc_language_table.h" #include "libwrc_libbfio.h" #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" #include "libwrc_libcnotify.h" #include "libwrc_libfvalue.h" #include "libwrc_libfwevt.h" #include "libwrc_libfwnt.h" #include "libwrc_manifest_values.h" #include "libwrc_message_table_values.h" #include "libwrc_mui_values.h" #include "libwrc_resource.h" #include "libwrc_resource_values.h" #include "libwrc_string_values.h" #include "libwrc_version_values.h" #include "libwrc_wevt_template_values.h" /* Creates a resource * Make sure the value resource is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_resource_initialize( libwrc_resource_t **resource, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libcdata_tree_node_t *resource_node, uint8_t flags, libcerror_error_t **error ) { libwrc_internal_resource_t *internal_resource = NULL; libwrc_resource_values_t *resource_values = NULL; static char *function = "libwrc_resource_initialize"; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } if( *resource != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid resource value already set.", function ); return( -1 ); } if( resource_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource node.", function ); return( -1 ); } if( ( flags & ~( LIBWRC_RESOURCE_FLAG_MANAGED_FILE_IO_HANDLE ) ) != 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( libcdata_tree_node_get_value( resource_node, (intptr_t **) &resource_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value of resource node.", function ); goto on_error; } if( resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource values.", function ); goto on_error; } internal_resource = memory_allocate_structure( libwrc_internal_resource_t ); if( internal_resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource.", function ); goto on_error; } if( memory_set( internal_resource, 0, sizeof( libwrc_internal_resource_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear resource.", function ); memory_free( internal_resource ); return( -1 ); } if( ( flags & LIBWRC_RESOURCE_FLAG_MANAGED_FILE_IO_HANDLE ) == 0 ) { internal_resource->file_io_handle = file_io_handle; } else { if( libbfio_handle_clone( &( internal_resource->file_io_handle ), file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy file IO handle.", function ); goto on_error; } if( libbfio_handle_set_open_on_demand( internal_resource->file_io_handle, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to set open on demand in file IO handle.", function ); goto on_error; } } internal_resource->io_handle = io_handle; internal_resource->resource_node = resource_node; internal_resource->resource_values = resource_values; internal_resource->flags = flags; *resource = (libwrc_resource_t *) internal_resource; return( 1 ); on_error: if( internal_resource != NULL ) { if( ( flags & LIBWRC_RESOURCE_FLAG_MANAGED_FILE_IO_HANDLE ) != 0 ) { if( internal_resource->file_io_handle != NULL ) { libbfio_handle_free( &( internal_resource->file_io_handle ), NULL ); } } memory_free( internal_resource ); } return( -1 ); } /* Frees a resource * Returns 1 if successful or -1 on error */ int libwrc_resource_free( libwrc_resource_t **resource, libcerror_error_t **error ) { libwrc_internal_resource_t *internal_resource = NULL; static char *function = "libwrc_resource_free"; int result = 1; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } if( *resource != NULL ) { internal_resource = (libwrc_internal_resource_t *) *resource; *resource = NULL; /* The io_handle, resource_node and resource_values references are freed elsewhere */ if( ( internal_resource->flags & LIBWRC_RESOURCE_FLAG_MANAGED_FILE_IO_HANDLE ) != 0 ) { if( internal_resource->file_io_handle != NULL ) { if( libbfio_handle_close( internal_resource->file_io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close file IO handle.", function ); result = -1; } if( libbfio_handle_free( &( internal_resource->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; } } } if( internal_resource->value != NULL ) { if( internal_resource->free_value != NULL ) { if( internal_resource->free_value( &( internal_resource->value ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free resource value.", function ); result = -1; } } } memory_free( internal_resource ); } return( result ); } /* Retrieves the resource identifier * Returns 1 if successful or -1 on error */ int libwrc_resource_get_identifier( libwrc_resource_t *resource, uint32_t *identifier, libcerror_error_t **error ) { libwrc_internal_resource_t *internal_resource = NULL; static char *function = "libwrc_resource_get_identifier"; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } internal_resource = (libwrc_internal_resource_t *) resource; if( libwrc_resource_values_get_identifier( internal_resource->resource_values, identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); return( -1 ); } return( 1 ); } /* Retrieves the resource type * Returns 1 if successful or -1 on error */ int libwrc_resource_get_type( libwrc_resource_t *resource, int *type, libcerror_error_t **error ) { libwrc_internal_resource_t *internal_resource = NULL; static char *function = "libwrc_resource_get_type"; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } internal_resource = (libwrc_internal_resource_t *) resource; if( libwrc_resource_values_get_type( internal_resource->resource_values, type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve type.", function ); return( -1 ); } return( 1 ); } /* Reads the resource * Returns 1 if successful or -1 on error */ int libwrc_resource_read( libwrc_resource_t *resource, libcerror_error_t **error ) { libwrc_internal_resource_t *internal_resource = NULL; static char *function = "libwrc_resource_read"; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } internal_resource = (libwrc_internal_resource_t *) resource; if( internal_resource->resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource - missing resource values.", function ); return( -1 ); } if( internal_resource->value == NULL ) { if( libwrc_resource_read_value( internal_resource, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource value.", function ); return( -1 ); } /* TODO if( internal_resource->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource - missing value.", function ); return( -1 ); } */ } return( 1 ); } /* Read the values * Returns 1 if successful or -1 on error */ int libwrc_resource_read_value( libwrc_internal_resource_t *internal_resource, libcerror_error_t **error ) { libcdata_tree_node_t *leaf_node = NULL; libcdata_tree_node_t *sub_node = NULL; libwrc_data_descriptor_t *data_descriptor = NULL; libwrc_language_entry_t *existing_language_entry = NULL; libwrc_language_entry_t *language_entry = NULL; libwrc_resource_values_t *leaf_resource_values = NULL; libwrc_resource_values_t *sub_resource_values = NULL; const char *resource_type_string = NULL; static char *function = "libwrc_resource_read_value"; int entry_index = 0; int leaf_node_index = 0; int number_of_leaf_nodes = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( internal_resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } if( internal_resource->resource_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource - missing resource node.", function ); return( -1 ); } if( internal_resource->resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource - missing resource values.", function ); return( -1 ); } switch( internal_resource->resource_values->type ) { case LIBWRC_RESOURCE_TYPE_STRING: resource_type_string = "string"; result = libwrc_language_table_initialize( (libwrc_language_table_t **) &( internal_resource->value ), error ); internal_resource->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libwrc_language_table_free; break; case LIBWRC_RESOURCE_TYPE_MESSAGE_TABLE: resource_type_string = "message table"; result = libwrc_language_table_initialize( (libwrc_language_table_t **) &( internal_resource->value ), error ); internal_resource->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libwrc_language_table_free; break; case LIBWRC_RESOURCE_TYPE_MANIFEST: resource_type_string = "manifest"; result = libwrc_language_table_initialize( (libwrc_language_table_t **) &( internal_resource->value ), error ); internal_resource->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libwrc_language_table_free; break; case LIBWRC_RESOURCE_TYPE_MUI: resource_type_string = "mui"; result = libwrc_language_table_initialize( (libwrc_language_table_t **) &( internal_resource->value ), error ); internal_resource->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libwrc_language_table_free; break; case LIBWRC_RESOURCE_TYPE_VERSION: resource_type_string = "version"; result = libwrc_language_table_initialize( (libwrc_language_table_t **) &( internal_resource->value ), error ); internal_resource->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libwrc_language_table_free; break; case LIBWRC_RESOURCE_TYPE_WEVT_TEMPLATE: resource_type_string = "event template"; result = libwrc_language_table_initialize( (libwrc_language_table_t **) &( internal_resource->value ), error ); internal_resource->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libwrc_language_table_free; break; default: #if defined( HAVE_DEBUG_OUTPUT ) resource_type_string = "UNKNOWN"; result = 1; break; #else libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported resource type: 0x%08" PRIx32 ".", function, internal_resource->resource_values->type ); goto on_error; #endif } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create %s resource.", function, resource_type_string ); goto on_error; } if( libcdata_tree_node_get_number_of_sub_nodes( internal_resource->resource_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( ( internal_resource->resource_values->type == LIBWRC_RESOURCE_TYPE_MESSAGE_TABLE ) || ( internal_resource->resource_values->type == LIBWRC_RESOURCE_TYPE_VERSION ) || ( internal_resource->resource_values->type == LIBWRC_RESOURCE_TYPE_MANIFEST ) || ( internal_resource->resource_values->type == LIBWRC_RESOURCE_TYPE_MUI ) || ( internal_resource->resource_values->type == LIBWRC_RESOURCE_TYPE_WEVT_TEMPLATE ) ) { if( number_of_sub_nodes != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported number of sub nodes: %d.", function, number_of_sub_nodes ); goto on_error; } } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libcdata_tree_node_get_sub_node_by_index( internal_resource->resource_node, sub_node_index, &sub_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 ); goto on_error; } if( libcdata_tree_node_get_value( sub_node, (intptr_t **) &sub_resource_values, 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, sub_node_index ); goto on_error; } if( sub_resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub resource values: %d.", function, sub_node_index ); goto on_error; } if( libcdata_tree_node_get_number_of_sub_nodes( sub_node, &number_of_leaf_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf nodes.", function ); goto on_error; } for( leaf_node_index = 0; leaf_node_index < number_of_leaf_nodes; leaf_node_index++ ) { if( libcdata_tree_node_get_sub_node_by_index( sub_node, leaf_node_index, &leaf_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node: %d.", function, leaf_node_index ); goto on_error; } if( libcdata_tree_node_get_value( leaf_node, (intptr_t **) &leaf_resource_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value of leaf node: %d.", function, leaf_node_index ); goto on_error; } if( leaf_resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid leaf resource values: %d.", function, leaf_node_index ); goto on_error; } if( leaf_resource_values->data_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid leaf resource values: 0x%08" PRIx32 " - missing data descriptor.", function, leaf_resource_values->identifier ); goto on_error; } data_descriptor = leaf_resource_values->data_descriptor; switch( internal_resource->resource_values->type ) { case LIBWRC_RESOURCE_TYPE_STRING: result = libwrc_language_table_get_entry_by_identifier( (libwrc_language_table_t *) internal_resource->value, leaf_resource_values->identifier, &existing_language_entry, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of language entry: 0x%08" PRIx32 ".", function ); goto on_error; } if( existing_language_entry != NULL ) { language_entry = existing_language_entry; } else { if( libwrc_language_entry_initialize( &language_entry, leaf_resource_values->identifier, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create language entry.", function ); goto on_error; } } break; case LIBWRC_RESOURCE_TYPE_MANIFEST: case LIBWRC_RESOURCE_TYPE_MESSAGE_TABLE: if( libwrc_language_entry_initialize( &language_entry, leaf_resource_values->identifier, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create language entry.", function ); goto on_error; } break; case LIBWRC_RESOURCE_TYPE_MUI: if( libwrc_language_entry_initialize( &language_entry, leaf_resource_values->identifier, (int (*)(intptr_t **, libcerror_error_t **)) &libwrc_mui_values_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create MUI values.", function ); goto on_error; } break; case LIBWRC_RESOURCE_TYPE_VERSION: if( libwrc_language_entry_initialize( &language_entry, leaf_resource_values->identifier, (int (*)(intptr_t **, libcerror_error_t **)) &libwrc_version_values_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create version values.", function ); goto on_error; } break; case LIBWRC_RESOURCE_TYPE_WEVT_TEMPLATE: if( libwrc_language_entry_initialize( &language_entry, leaf_resource_values->identifier, (int (*)(intptr_t **, libcerror_error_t **)) &libfwevt_manifest_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create event template values.", function ); goto on_error; } break; } #if defined( HAVE_DEBUG_OUTPUT ) switch( internal_resource->resource_values->type ) { case LIBWRC_RESOURCE_TYPE_STRING: if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading string: 0x%08" PRIx32 " for language identifier: 0x%08" PRIx32 " (%s)\n", function, sub_resource_values->identifier - 1, leaf_resource_values->identifier, libfwnt_locale_identifier_language_tag_get_identifier( leaf_resource_values->identifier & 0x0000ffffUL ) ); } break; case LIBWRC_RESOURCE_TYPE_MANIFEST: case LIBWRC_RESOURCE_TYPE_MESSAGE_TABLE: case LIBWRC_RESOURCE_TYPE_MUI: case LIBWRC_RESOURCE_TYPE_VERSION: case LIBWRC_RESOURCE_TYPE_WEVT_TEMPLATE: if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading %s for language identifier: 0x%08" PRIx32 " (%s)\n", function, resource_type_string, leaf_resource_values->identifier, libfwnt_locale_identifier_language_tag_get_identifier( leaf_resource_values->identifier & 0x0000ffffUL ) ); } break; } #endif switch( internal_resource->resource_values->type ) { case LIBWRC_RESOURCE_TYPE_STRING: result = libwrc_string_values_read( language_entry, internal_resource->io_handle, internal_resource->file_io_handle, sub_resource_values->identifier - 1, data_descriptor, error ); break; case LIBWRC_RESOURCE_TYPE_MESSAGE_TABLE: result = libwrc_message_table_values_read( language_entry, internal_resource->io_handle, internal_resource->file_io_handle, data_descriptor, error ); break; case LIBWRC_RESOURCE_TYPE_MANIFEST: result = libwrc_manifest_values_read( language_entry, internal_resource->io_handle, internal_resource->file_io_handle, data_descriptor, error ); break; case LIBWRC_RESOURCE_TYPE_MUI: result = libwrc_mui_values_read( language_entry, internal_resource->io_handle, internal_resource->file_io_handle, data_descriptor, error ); break; case LIBWRC_RESOURCE_TYPE_VERSION: result = libwrc_version_values_read( language_entry, internal_resource->io_handle, internal_resource->file_io_handle, data_descriptor, error ); break; case LIBWRC_RESOURCE_TYPE_WEVT_TEMPLATE: result = libwrc_wevt_template_values_read( language_entry, internal_resource->io_handle, internal_resource->file_io_handle, data_descriptor, error ); break; #if defined( HAVE_DEBUG_OUTPUT ) default: if( libwrc_resource_read_data_descriptor( internal_resource, internal_resource->io_handle, internal_resource->file_io_handle, data_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read unknown resource.", function ); goto on_error; } break; #endif } switch( internal_resource->resource_values->type ) { case LIBWRC_RESOURCE_TYPE_STRING: if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read %s: 0x%08" PRIx32 " for language identifier: 0x%08" PRIx32 ".", function, resource_type_string, sub_resource_values->identifier, leaf_resource_values->identifier ); goto on_error; } if( language_entry != existing_language_entry ) { if( libwrc_language_table_append_entry( (libwrc_language_table_t *) internal_resource->value, &entry_index, language_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append messages for language identifier: 0x%08" PRIx32 " to languages array.", function, leaf_resource_values->identifier ); goto on_error; } } language_entry = NULL; break; case LIBWRC_RESOURCE_TYPE_MANIFEST: case LIBWRC_RESOURCE_TYPE_MESSAGE_TABLE: case LIBWRC_RESOURCE_TYPE_MUI: case LIBWRC_RESOURCE_TYPE_VERSION: case LIBWRC_RESOURCE_TYPE_WEVT_TEMPLATE: if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read %s for language identifier: 0x%08" PRIx32 ".", function, resource_type_string, leaf_resource_values->identifier ); goto on_error; } if( libwrc_language_table_append_entry( (libwrc_language_table_t *) internal_resource->value, &entry_index, language_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append %s for language identifier: 0x%08" PRIx32 " to languages array.", function, resource_type_string, leaf_resource_values->identifier ); goto on_error; } language_entry = NULL; break; } } } return( 1 ); on_error: if( ( language_entry != NULL ) && ( language_entry != existing_language_entry ) ) { libwrc_language_entry_free( &language_entry, NULL ); } if( internal_resource->value != NULL ) { if( internal_resource->free_value != NULL ) { internal_resource->free_value( &( internal_resource->value ), NULL ); } internal_resource->free_value = NULL; } return( -1 ); } /* Reads a data descriptor * Returns 1 if successful or -1 on error */ int libwrc_resource_read_data_descriptor( libwrc_internal_resource_t *internal_resource, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ) { uint8_t *resource_data = NULL; static char *function = "libwrc_resource_read_data_descriptor"; off64_t file_offset = 0; size_t resource_data_size = 0; ssize_t read_count = 0; if( internal_resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", 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_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data descriptor.", function ); return( -1 ); } file_offset = data_descriptor->virtual_address - io_handle->virtual_address; if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek resource data offset: %" PRIi64 ".", function, file_offset ); goto on_error; } resource_data_size = (size_t) data_descriptor->size; resource_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * resource_data_size ); if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource data.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, resource_data, resource_data_size, error ); if( read_count != (ssize_t) resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource data.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: resource data:\n", function ); libcnotify_print_data( resource_data, resource_data_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif memory_free( resource_data ); return( 1 ); on_error: if( resource_data != NULL ) { memory_free( resource_data ); } return( -1 ); } /* Retrieves the number of languages * Returns 1 if successful or -1 on error */ int libwrc_resource_get_number_of_languages( libwrc_resource_t *resource, int *number_of_languages, libcerror_error_t **error ) { libwrc_internal_resource_t *internal_resource = NULL; static char *function = "libwrc_resource_get_number_of_languages"; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } internal_resource = (libwrc_internal_resource_t *) resource; if( internal_resource->resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource - missing resource values.", function ); return( -1 ); } if( internal_resource->value == NULL ) { if( libwrc_resource_read_value( internal_resource, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource value.", function ); return( -1 ); } } if( libwrc_language_table_get_number_of_entries( (libwrc_language_table_t *) internal_resource->value, number_of_languages, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of languages.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific language identifier * Returns 1 if successful or -1 on error */ int libwrc_resource_get_language_identifier( libwrc_resource_t *resource, int language_index, uint32_t *language_identifier, libcerror_error_t **error ) { libwrc_internal_resource_t *internal_resource = NULL; static char *function = "libwrc_resource_get_language_identifier"; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } internal_resource = (libwrc_internal_resource_t *) resource; if( internal_resource->resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource - missing resource values.", function ); return( -1 ); } if( internal_resource->value == NULL ) { if( libwrc_resource_read_value( internal_resource, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource value.", function ); return( -1 ); } } if( libwrc_language_table_get_identifier( (libwrc_language_table_t *) internal_resource->value, language_index, language_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier for language: %d.", function, language_index ); return( -1 ); } return( 1 ); } /* Retrieves the language specific value * Returns 1 if successful or -1 on error */ int libwrc_resource_get_value_by_language_identifier( libwrc_resource_t *resource, int resource_type, uint32_t language_identifier, int value_index, intptr_t **value, libcerror_error_t **error ) { libwrc_internal_resource_t *internal_resource = NULL; libwrc_language_entry_t *language_entry = NULL; static char *function = "libwrc_resource_get_value_by_language_identifier"; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } internal_resource = (libwrc_internal_resource_t *) resource; if( internal_resource->resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource - missing resource values.", function ); return( -1 ); } if( internal_resource->resource_values->type != resource_type ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported resource type: 0x%08" PRIx32 ".", function, internal_resource->resource_values->type ); return( -1 ); } if( internal_resource->value == NULL ) { if( libwrc_resource_read_value( internal_resource, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource value.", function ); return( -1 ); } } if( libwrc_language_table_get_entry_by_identifier( (libwrc_language_table_t *) internal_resource->value, language_identifier, &language_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve language entry for identifier: 0x%08" PRIx32 ".", function, language_identifier ); return( -1 ); } if( libwrc_language_entry_get_value_by_index( language_entry, value_index, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d.", function, value_index ); return( -1 ); } return( 1 ); } libevt-20170120/libwrc/wrc_resource_node.h0000664000175000017500000000321413012271522022472 0ustar00lordyestalordyesta00000000000000/* * The Windows RC resource node * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _WRC_RECORD_NODE_H ) #define _WRC_RECORD_NODE_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct wrc_resource_node_header wrc_resource_node_header_t; struct wrc_resource_node_header { /* The flags * Consists of 4 bytes */ uint8_t flags[ 4 ]; /* The creation date and tims * Consists of 4 bytes * Contains a POSIX timestamp */ uint8_t creation_time[ 4 ]; /* The major version * Consists of 2 bytes */ uint8_t major_version[ 2 ]; /* The minor version * Consists of 2 bytes */ uint8_t minor_version[ 2 ]; /* The number of named entries * Consists of 2 bytes */ uint8_t number_of_named_entries[ 2 ]; /* The number of unnamed entries * Consists of 2 bytes */ uint8_t number_of_unnamed_entries[ 2 ]; }; #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_stream.h0000664000175000017500000001100413012271522021614 0ustar00lordyestalordyesta00000000000000/* * Stream functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_STREAM_H ) #define _LIBWRC_INTERNAL_STREAM_H #include #include #include "libwrc_extern.h" #include "libwrc_io_handle.h" #include "libwrc_libbfio.h" #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_internal_stream libwrc_internal_stream_t; struct libwrc_internal_stream { /* The resources (tree) root node */ libcdata_tree_node_t *resources_root_node; /* The IO handle */ libwrc_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; }; LIBWRC_EXTERN \ int libwrc_stream_initialize( libwrc_stream_t **stream, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_free( libwrc_stream_t **stream, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_signal_abort( libwrc_stream_t *stream, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_open( libwrc_stream_t *stream, const char *filename, int access_flags, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBWRC_EXTERN \ int libwrc_stream_open_wide( libwrc_stream_t *stream, const wchar_t *filename, int access_flags, libcerror_error_t **error ); #endif LIBWRC_EXTERN \ int libwrc_stream_open_file_io_handle( libwrc_stream_t *stream, libbfio_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_close( libwrc_stream_t *stream, libcerror_error_t **error ); int libwrc_stream_open_read( libwrc_internal_stream_t *internal_stream, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_get_ascii_codepage( libwrc_stream_t *stream, int *ascii_codepage, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_set_ascii_codepage( libwrc_stream_t *stream, int ascii_codepage, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_get_virtual_address( libwrc_stream_t *stream, uint32_t *virtual_address, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_set_virtual_address( libwrc_stream_t *stream, uint32_t virtual_address, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_get_number_of_resources( libwrc_stream_t *stream, int *number_of_resources, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_get_resource( libwrc_stream_t *stream, int resource_index, libwrc_resource_t **resource, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_get_resource_by_identifier( libwrc_stream_t *stream, uint32_t identifier, libwrc_resource_t **resource, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_get_resource_by_type( libwrc_stream_t *stream, int type, libwrc_resource_t **resource, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_get_resource_by_utf8_name( libwrc_stream_t *stream, const uint8_t *utf8_string, size_t utf8_string_length, libwrc_resource_t **resource, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_stream_get_resource_by_utf16_name( libwrc_stream_t *stream, const uint16_t *utf16_string, size_t utf16_string_length, libwrc_resource_t **resource, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_wevt_event.h0000664000175000017500000000424313012271522022516 0ustar00lordyestalordyesta00000000000000/* * WEVT event functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_WEVT_EVENT_H ) #define _LIBWRC_INTERNAL_WEVT_EVENT_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_internal_wevt_event libwrc_internal_wevt_event_t; struct libwrc_internal_wevt_event { /* The provider descriptor */ libfwevt_provider_t *provider_descriptor; /* The event descriptor */ libfwevt_event_t *event_descriptor; }; int libwrc_wevt_event_initialize( libwrc_wevt_event_t **event, libfwevt_provider_t *provider_descriptor, libfwevt_event_t *event_descriptor, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_event_free( libwrc_wevt_event_t **event, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_event_get_identifier( libwrc_wevt_event_t *event, uint32_t *identifier, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_event_get_message_identifier( libwrc_wevt_event_t *event, uint32_t *message_identifier, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_event_get_template_definition( libwrc_wevt_event_t *event, libwrc_wevt_template_definition_t **template_definition, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_libfvalue.h0000664000175000017500000000272113012271522022300 0ustar00lordyestalordyesta00000000000000/* * The libfvalue header wrapper * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LIBFVALUE_H ) #define _LIBWRC_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 #else /* If libtool DLL support is enabled set LIBFVALUE_DLL_IMPORT * before including libfvalue.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFVALUE_DLL_IMPORT #endif #include #endif #endif libevt-20170120/libwrc/libwrc_error.c0000664000175000017500000000550413012271522021455 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_error.h" #include "libwrc_libcerror.h" #if !defined( HAVE_LOCAL_LIBWRC ) /* Free an error and its elements */ void libwrc_error_free( libwrc_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 libwrc_error_fprint( libwrc_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 libwrc_error_sprint( libwrc_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 libwrc_error_backtrace_fprint( libwrc_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 libwrc_error_backtrace_sprint( libwrc_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_LIBWRC ) */ libevt-20170120/libwrc/libwrc_manifest_values.c0000664000175000017500000001274713012271522023520 0ustar00lordyestalordyesta00000000000000/* * Manifest values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_data_descriptor.h" #include "libwrc_definitions.h" #include "libwrc_io_handle.h" #include "libwrc_language_entry.h" #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #include "libwrc_libcnotify.h" #include "libwrc_libfvalue.h" #include "libwrc_manifest_values.h" /* Reads manifest values * Returns 1 if successful or -1 on error */ int libwrc_manifest_values_read( libwrc_language_entry_t *language_entry, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ) { libfvalue_value_t *manifest_value = NULL; uint8_t *resource_data = NULL; static char *function = "libwrc_manifest_values_read"; off64_t file_offset = 0; size_t resource_data_size = 0; ssize_t read_count = 0; int value_index = 0; if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", 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_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data descriptor.", function ); return( -1 ); } file_offset = data_descriptor->virtual_address - io_handle->virtual_address; if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek resource data offset: %" PRIi64 ".", function, file_offset ); goto on_error; } resource_data_size = (size_t) data_descriptor->size; resource_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * resource_data_size ); if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource data.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, resource_data, resource_data_size, error ); if( read_count != (ssize_t) resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource data.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: resource data:\n", function ); libcnotify_print_data( resource_data, resource_data_size, 0 ); } #endif if( libfvalue_value_type_initialize( &manifest_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 manifest value.", function ); goto on_error; } if( libfvalue_value_set_data( manifest_value, resource_data, resource_data_size, LIBFVALUE_CODEPAGE_UTF8, 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 of manifest value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: manifest string:\n", function ); if( libfvalue_value_print( manifest_value, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print manifest value.", function ); goto on_error; } libcnotify_printf( "\n\n" ); } #endif if( libwrc_language_entry_append_value( language_entry, &value_index, (intptr_t *) manifest_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append manifest value.", function ); goto on_error; } manifest_value = NULL; memory_free( resource_data ); return( 1 ); on_error: if( manifest_value != NULL ) { libfvalue_value_free( &manifest_value, NULL ); } if( resource_data != NULL ) { memory_free( resource_data ); } return( -1 ); } libevt-20170120/libwrc/libwrc_error.h0000664000175000017500000000332713012271522021463 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_ERROR_H ) #define _LIBWRC_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBWRC ) #include #endif #include "libwrc_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBWRC ) LIBWRC_EXTERN \ void libwrc_error_free( libwrc_error_t **error ); LIBWRC_EXTERN \ int libwrc_error_fprint( libwrc_error_t *error, FILE *stream ); LIBWRC_EXTERN \ int libwrc_error_sprint( libwrc_error_t *error, char *string, size_t size ); LIBWRC_EXTERN \ int libwrc_error_backtrace_fprint( libwrc_error_t *error, FILE *stream ); LIBWRC_EXTERN \ int libwrc_error_backtrace_sprint( libwrc_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBWRC ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBWRC_INTERNAL_ERROR_H ) */ libevt-20170120/libwrc/libwrc_data_descriptor.h0000664000175000017500000000272213012271522023477 0ustar00lordyestalordyesta00000000000000/* * Data descriptor functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_DATA_DESCRIPTOR_H ) #define _LIBWRC_DATA_DESCRIPTOR_H #include #include #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_data_descriptor libwrc_data_descriptor_t; struct libwrc_data_descriptor { /* The virtual address */ uint32_t virtual_address; /* The size */ uint32_t size; }; int libwrc_data_descriptor_initialize( libwrc_data_descriptor_t **data_descriptor, libcerror_error_t **error ); int libwrc_data_descriptor_free( libwrc_data_descriptor_t **data_descriptor, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_version_values.c0000664000175000017500000013504413012271522023373 0ustar00lordyestalordyesta00000000000000/* * Version (resource) values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libwrc_data_descriptor.h" #include "libwrc_definitions.h" #include "libwrc_io_handle.h" #include "libwrc_language_entry.h" #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #include "libwrc_libcnotify.h" #include "libwrc_libfvalue.h" #include "libwrc_version_values.h" #include "wrc_version_resource.h" uint8_t libwrc_version_information_value_identifier[ 32 ] = \ { 'V', 0, 'S', 0, '_', 0, 'V', 0, 'E', 0, 'R', 0, 'S', 0, 'I', 0, 'O', 0, 'N', 0, '_', 0, 'I', 0, 'N', 0, 'F', 0, 'O', 0, 0, 0 }; uint8_t libwrc_version_fixed_file_information_signature[ 4 ] = \ { 0xbd, 0x04, 0xef, 0xfe }; /* Creates version values * Make sure the value version_values is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_version_values_initialize( libwrc_version_values_t **version_values, libcerror_error_t **error ) { static char *function = "libwrc_version_values_initialize"; if( version_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid version values.", function ); return( -1 ); } if( *version_values != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid version values value already set.", function ); return( -1 ); } *version_values = memory_allocate_structure( libwrc_version_values_t ); if( *version_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create version values.", function ); goto on_error; } if( memory_set( *version_values, 0, sizeof( libwrc_version_values_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear version values.", function ); goto on_error; } return( 1 ); on_error: if( *version_values != NULL ) { memory_free( *version_values ); *version_values = NULL; } return( -1 ); } /* Frees version values * Returns 1 if successful or -1 on error */ int libwrc_version_values_free( libwrc_version_values_t **version_values, libcerror_error_t **error ) { static char *function = "libwrc_version_values_free"; if( version_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid version values.", function ); return( -1 ); } if( *version_values != NULL ) { memory_free( *version_values ); *version_values = NULL; } return( 1 ); } /* Reads the version (resource) values * Returns 1 if successful or -1 on error */ int libwrc_version_values_read( libwrc_language_entry_t *language_entry, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ) { libwrc_version_values_t *version_values = NULL; libfvalue_value_t *value_identifier = NULL; uint8_t *resource_data = NULL; uint8_t *version_resource_data = NULL; static char *function = "libwrc_version_values_read"; off64_t file_offset = 0; size_t alignment_padding_size = 0; size_t resource_data_offset = 0; size_t resource_data_size = 0; ssize_t read_count = 0; uint32_t value_32bit = 0; uint16_t value_data_size = 0; uint16_t value_data_type = 0; uint16_t version_resource_data_size = 0; int value_index = 0; if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", 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_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data descriptor.", function ); return( -1 ); } if( libwrc_version_values_initialize( &version_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create version values.", function ); goto on_error; } file_offset = data_descriptor->virtual_address - io_handle->virtual_address; if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek resource data offset: %" PRIi64 ".", function, file_offset ); goto on_error; } resource_data_size = (size_t) data_descriptor->size; resource_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * resource_data_size ); if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource data.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, resource_data, resource_data_size, error ); if( read_count != (ssize_t) resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource data.", function ); goto on_error; } version_resource_data = resource_data; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: resource data:\n", function ); libcnotify_print_data( version_resource_data, resource_data_size, 0 ); } #endif byte_stream_copy_to_uint16_little_endian( ( (wrc_version_value_header_t *) version_resource_data )->size, version_resource_data_size ); byte_stream_copy_to_uint16_little_endian( ( (wrc_version_value_header_t *) version_resource_data )->value_data_size, value_data_size ); byte_stream_copy_to_uint16_little_endian( ( (wrc_version_value_header_t *) version_resource_data )->value_data_type, value_data_type ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu16 "\n", function, version_resource_data_size ); libcnotify_printf( "%s: value data size\t\t\t\t: %" PRIu16 "\n", function, value_data_size ); libcnotify_printf( "%s: value data type\t\t\t\t: %" PRIu16 "\n", function, value_data_type ); libcnotify_printf( "\n" ); } #endif resource_data_offset += sizeof( wrc_version_value_header_t ); if( libfvalue_value_type_initialize( &value_identifier, LIBFVALUE_VALUE_TYPE_STRING_UTF16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value identifier value.", function ); goto on_error; } read_count = libfvalue_value_type_set_data_string( value_identifier, &( version_resource_data[ resource_data_offset ] ), resource_data_size, LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN, LIBFVALUE_VALUE_DATA_FLAG_MANAGED, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data of value identifier value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value identifier\t\t\t\t: ", function ); if( libfvalue_value_print( value_identifier, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print value identifier value.", function ); goto on_error; } libcnotify_printf( "\n" ); } #endif if( ( read_count != 32 ) || ( memory_compare( &( version_resource_data[ resource_data_offset ] ), libwrc_version_information_value_identifier, 32 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported version resource value signature.", function ); goto on_error; } if( libfvalue_value_free( &value_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value identifier value.", function ); goto on_error; } resource_data_offset += read_count; if( ( resource_data_offset % 4 ) != 0 ) { alignment_padding_size = 4 - ( resource_data_offset % 4 ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: alignment padding:\n", function ); libcnotify_print_data( &( version_resource_data[ resource_data_offset ] ), alignment_padding_size, 0 ); } #endif resource_data_offset += alignment_padding_size; } /* TODO refactor to separate function? */ if( value_data_size > 0 ) { if( value_data_size > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data:\n", function ); libcnotify_print_data( &( version_resource_data[ resource_data_offset ] ), value_data_size, 0 ); } #endif byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 8 ] ), version_values->file_version ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 12 ] ), value_32bit ); version_values->file_version <<= 32; version_values->file_version |= value_32bit; byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 16 ] ), version_values->product_version ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 20 ] ), value_32bit ); version_values->product_version <<= 32; version_values->product_version |= value_32bit; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset ] ), value_32bit ); libcnotify_printf( "%s: signature\t\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 4 ] ), value_32bit ); libcnotify_printf( "%s: version\t\t\t\t\t: %" PRIu32 ".%" PRIu32 "\n", function, value_32bit >> 16, value_32bit & 0x0000ffffUL ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 8 ] ), value_32bit ); libcnotify_printf( "%s: file version upper\t\t\t\t: %" PRIu32 ".%" PRIu32 "\n", function, value_32bit >> 16, value_32bit & 0x0000ffffUL ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 12 ] ), value_32bit ); libcnotify_printf( "%s: file version lower\t\t\t\t: %" PRIu32 ".%" PRIu32 "\n", function, value_32bit >> 16, value_32bit & 0x0000ffffUL ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 16 ] ), value_32bit ); libcnotify_printf( "%s: product version upper\t\t\t: %" PRIu32 ".%" PRIu32 "\n", function, value_32bit >> 16, value_32bit & 0x0000ffffUL ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 20 ] ), value_32bit ); libcnotify_printf( "%s: product version lower\t\t\t: %" PRIu32 ".%" PRIu32 "\n", function, value_32bit >> 16, value_32bit & 0x0000ffffUL ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 24 ] ), value_32bit ); libcnotify_printf( "%s: file flags bitmask\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 28 ] ), value_32bit ); libcnotify_printf( "%s: file flags\t\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 32 ] ), value_32bit ); libcnotify_printf( "%s: file operating system\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 36 ] ), value_32bit ); libcnotify_printf( "%s: file type\t\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 40 ] ), value_32bit ); libcnotify_printf( "%s: file sub type\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 44 ] ), value_32bit ); libcnotify_printf( "%s: file time upper\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( &( version_resource_data[ resource_data_offset + 48 ] ), value_32bit ); libcnotify_printf( "%s: file time lower\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "\n" ); } #endif resource_data_offset += value_data_size; } if( ( resource_data_offset % 4 ) != 0 ) { alignment_padding_size = 4 - ( resource_data_offset % 4 ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: alignment padding:\n", function ); libcnotify_print_data( &( version_resource_data[ resource_data_offset ] ), alignment_padding_size, 0 ); } #endif resource_data_offset += alignment_padding_size; } read_count = libwrc_version_values_read_string_file_information( language_entry, version_resource_data, resource_data_size, resource_data_offset, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read string file information.", function ); goto on_error; } resource_data_offset += read_count; read_count = libwrc_version_values_read_variable_file_information( language_entry, version_resource_data, resource_data_size, resource_data_offset, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read variable file information.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) resource_data_offset += read_count; #endif /* TODO */ if( libwrc_language_entry_append_value( language_entry, &value_index, (intptr_t *) version_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append version values.", function ); goto on_error; } version_values = NULL; memory_free( resource_data ); return( 1 ); on_error: if( value_identifier != NULL ) { libfvalue_value_free( &value_identifier, NULL ); } if( resource_data != NULL ) { memory_free( resource_data ); } if( version_values != NULL ) { libwrc_version_values_free( &version_values, NULL ); } return( -1 ); } /* Reads the version (resource) string file information * Returns number of bytes read if successful or -1 on error */ ssize_t libwrc_version_values_read_string_file_information( libwrc_language_entry_t *language_entry, const uint8_t *resource_data, size_t resource_data_size, size_t resource_data_offset, libcerror_error_t **error ) { uint8_t *value_identifier_string = NULL; static char *function = "libwrc_version_values_read_string_file_information"; size_t alignment_padding_size = 0; size_t calculated_value_data_size = 0; size_t resource_data_start_offset = 0; size_t trailing_data_size = 0; size_t value_identifier_string_size = 0; ssize_t read_count = 0; uint16_t data_size = 0; uint16_t value_data_size = 0; uint16_t value_data_type = 0; if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", function ); return( -1 ); } if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource data.", function ); return( -1 ); } if( resource_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid resource data size value exceeds maximum.", function ); return( -1 ); } if( resource_data_offset >= resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid resource data offset value out of bounds.", function ); return( -1 ); } if( ( resource_data_offset + 2 ) > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid resource data value too small.", function ); return( -1 ); } resource_data_start_offset = resource_data_offset; byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), data_size ); resource_data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data size\t\t: %" PRIu16 "\n", function, data_size ); } #endif if( data_size != 0 ) { if( ( data_size < 8 ) || ( data_size > ( resource_data_size - ( resource_data_offset - 2 ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: data size value out of bounds.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), value_data_size ); resource_data_offset += 2; byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), value_data_type ); resource_data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data size\t: %" PRIu16 "\n", function, value_data_size ); libcnotify_printf( "%s: value data type\t: %" PRIu16 "\n", function, value_data_type ); } #endif value_identifier_string = (uint8_t *) &( resource_data[ resource_data_offset ] ); value_identifier_string_size = 0; while( ( resource_data_offset + 2 ) < resource_data_size ) { value_identifier_string_size += 2; if( ( resource_data[ resource_data_offset ] == 0 ) && ( resource_data[ resource_data_offset + 1 ] == 0 ) ) { resource_data_offset += 2; break; } resource_data_offset += 2; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value identifier string data:\n", function ); libcnotify_print_data( value_identifier_string, value_identifier_string_size, 0 ); } #endif /* TODO convert string */ if( ( resource_data_offset % 4 ) != 0 ) { alignment_padding_size = 4 - ( resource_data_offset % 4 ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: alignment padding:\n", function ); libcnotify_print_data( &( resource_data[ resource_data_offset ] ), alignment_padding_size, 0 ); } #endif resource_data_offset += alignment_padding_size; } if( value_data_type == 1 ) { /* TODO check value_data_size == 0 ? */ read_count = libwrc_version_values_read_string_table( language_entry, resource_data, resource_data_size, resource_data_offset, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read string table.", function ); return( -1 ); } resource_data_offset += read_count; } /* TODO print unsupported type warning */ calculated_value_data_size = resource_data_offset - resource_data_start_offset; if( calculated_value_data_size < data_size ) { trailing_data_size = data_size - trailing_data_size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( resource_data[ resource_data_offset ] ), trailing_data_size, 0 ); } #endif resource_data_offset += trailing_data_size; } } return( (ssize_t) data_size ); } /* Reads the version (resource) string table * Returns number of bytes read if successful or -1 on error */ ssize_t libwrc_version_values_read_string_table( libwrc_language_entry_t *language_entry, const uint8_t *resource_data, size_t resource_data_size, size_t resource_data_offset, libcerror_error_t **error ) { uint8_t *value_identifier_string = NULL; static char *function = "libwrc_version_values_read_string_table"; size_t alignment_padding_size = 0; size_t calculated_value_data_size = 0; size_t resource_data_start_offset = 0; size_t trailing_data_size = 0; size_t value_identifier_string_size = 0; ssize_t read_count = 0; uint16_t data_size = 0; uint16_t value_data_size = 0; uint16_t value_data_type = 0; if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", function ); return( -1 ); } if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource data.", function ); return( -1 ); } if( resource_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid resource data size value exceeds maximum.", function ); return( -1 ); } if( resource_data_offset >= resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid resource data offset value out of bounds.", function ); return( -1 ); } if( ( resource_data_offset + 2 ) > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid resource data value too small.", function ); return( -1 ); } resource_data_start_offset = resource_data_offset; byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), data_size ); resource_data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data size\t\t\t: %" PRIu16 "\n", function, data_size ); } #endif if( data_size != 0 ) { if( ( data_size < 8 ) || ( data_size > ( resource_data_size - ( resource_data_offset - 2 ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: data size value out of bounds.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), value_data_size ); resource_data_offset += 2; byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), value_data_type ); resource_data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data size\t\t: %" PRIu16 "\n", function, value_data_size ); libcnotify_printf( "%s: value data type\t\t: %" PRIu16 "\n", function, value_data_type ); } #endif value_identifier_string = (uint8_t *) &( resource_data[ resource_data_offset ] ); value_identifier_string_size = 0; while( ( resource_data_offset + 2 ) < resource_data_size ) { value_identifier_string_size += 2; if( ( resource_data[ resource_data_offset ] == 0 ) && ( resource_data[ resource_data_offset + 1 ] == 0 ) ) { resource_data_offset += 2; break; } resource_data_offset += 2; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value identifier string data:\n", function ); libcnotify_print_data( value_identifier_string, value_identifier_string_size, 0 ); } #endif /* TODO convert string */ if( ( resource_data_offset % 4 ) != 0 ) { alignment_padding_size = 4 - ( resource_data_offset % 4 ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: alignment padding:\n", function ); libcnotify_print_data( &( resource_data[ resource_data_offset ] ), alignment_padding_size, 0 ); } #endif resource_data_offset += alignment_padding_size; } if( value_data_type == 0 ) { /* TODO check value data size is in bounds */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data:\n", function ); libcnotify_print_data( &( resource_data[ resource_data_offset ] ), value_data_size, 0 ); } #endif resource_data_offset += value_data_size; } else if( value_data_type == 1 ) { /* TODO check value_data_size == 0 ? */ while( ( resource_data_offset + 2 ) < ( resource_data_start_offset + data_size ) ) { read_count = libwrc_version_values_read_string( language_entry, resource_data, resource_data_size, resource_data_offset, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read string.", function ); return( -1 ); } else if( read_count == 0 ) { break; } resource_data_offset += read_count; if( ( resource_data_offset % 4 ) != 0 ) { alignment_padding_size = 4 - ( resource_data_offset % 4 ); if( ( resource_data_offset + alignment_padding_size ) < ( resource_data_start_offset + data_size ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: alignment padding:\n", function ); libcnotify_print_data( &( resource_data[ resource_data_offset ] ), alignment_padding_size, 0 ); } #endif resource_data_offset += alignment_padding_size; } } } } /* TODO print unsupported type warning */ calculated_value_data_size = resource_data_offset - resource_data_start_offset; if( calculated_value_data_size < data_size ) { trailing_data_size = data_size - calculated_value_data_size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( resource_data[ resource_data_offset ] ), trailing_data_size, 0 ); } #endif resource_data_offset += trailing_data_size; } } return( (ssize_t) data_size ); } /* Reads the version (resource) string * Returns number of bytes read if successful or -1 on error */ ssize_t libwrc_version_values_read_string( libwrc_language_entry_t *language_entry, const uint8_t *resource_data, size_t resource_data_size, size_t resource_data_offset, libcerror_error_t **error ) { static char *function = "libwrc_version_values_read_string"; size_t alignment_padding_size = 0; size_t value_string_size = 0; uint16_t data_size = 0; uint16_t value_data_size = 0; uint16_t value_data_type = 0; #if defined( HAVE_DEBUG_OUTPUT ) size_t resource_data_start_offset = 0; size_t trailing_data_size = 0; size_t value_string_offset = 0; #endif if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", function ); return( -1 ); } if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource data.", function ); return( -1 ); } if( resource_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid resource data size value exceeds maximum.", function ); return( -1 ); } if( resource_data_offset >= resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid resource data offset value out of bounds.", function ); return( -1 ); } if( ( resource_data_offset + 2 ) > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid resource data value too small.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) resource_data_start_offset = resource_data_offset; #endif byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), data_size ); resource_data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data size\t\t\t\t: %" PRIu16 "\n", function, data_size ); } #endif if( data_size != 0 ) { if( ( data_size < 8 ) || ( data_size > ( resource_data_size - ( resource_data_offset - 2 ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: data size value out of bounds.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), value_data_size ); resource_data_offset += 2; byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), value_data_type ); resource_data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data size\t\t\t: %" PRIu16 "\n", function, value_data_size ); libcnotify_printf( "%s: value data type\t\t\t: %" PRIu16 "\n", function, value_data_type ); } #endif /* TODO check value_data_size == 0 ? */ /* TODO handle value_data_type != 1 */ #if defined( HAVE_DEBUG_OUTPUT ) value_string_offset = resource_data_offset; #endif value_string_size = 0; while( ( resource_data_offset + 2 ) < resource_data_size ) { value_string_size += 2; if( ( resource_data[ resource_data_offset ] == 0 ) && ( resource_data[ resource_data_offset + 1 ] == 0 ) ) { resource_data_offset += 2; break; } resource_data_offset += 2; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value identifier string data:\n", function ); libcnotify_print_data( &( resource_data[ value_string_offset ] ), value_string_size, 0 ); } #endif /* TODO convert string */ if( ( resource_data_offset % 4 ) != 0 ) { alignment_padding_size = 4 - ( resource_data_offset % 4 ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: alignment padding:\n", function ); libcnotify_print_data( &( resource_data[ resource_data_offset ] ), alignment_padding_size, 0 ); } #endif resource_data_offset += alignment_padding_size; } #if defined( HAVE_DEBUG_OUTPUT ) value_string_offset = resource_data_offset; value_string_size = 0; while( ( resource_data_offset + 2 ) < resource_data_size ) { value_string_size += 2; if( ( resource_data[ resource_data_offset ] == 0 ) && ( resource_data[ resource_data_offset + 1 ] == 0 ) ) { resource_data_offset += 2; break; } resource_data_offset += 2; } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value string data:\n", function ); libcnotify_print_data( &( resource_data[ value_string_offset ] ), value_string_size, 0 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { trailing_data_size = resource_data_offset - resource_data_start_offset; if( trailing_data_size < data_size ) { trailing_data_size = data_size - trailing_data_size; libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( resource_data[ resource_data_offset ] ), trailing_data_size, 0 ); } } #endif } return( (ssize_t) data_size ); } /* Reads the version (resource) variable file information * Returns number of bytes read if successful or -1 on error */ ssize_t libwrc_version_values_read_variable_file_information( libwrc_language_entry_t *language_entry, const uint8_t *resource_data, size_t resource_data_size, size_t resource_data_offset, libcerror_error_t **error ) { static char *function = "libwrc_version_values_read_variable_file_information"; size_t alignment_padding_size = 0; size_t resource_data_start_offset = 0; size_t value_string_size = 0; ssize_t read_count = 0; uint16_t data_size = 0; uint16_t value_data_size = 0; uint16_t value_data_type = 0; #if defined( HAVE_DEBUG_OUTPUT ) size_t trailing_data_size = 0; size_t value_string_offset = 0; #endif if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", function ); return( -1 ); } if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource data.", function ); return( -1 ); } if( resource_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid resource data size value exceeds maximum.", function ); return( -1 ); } if( resource_data_offset >= resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid resource data offset value out of bounds.", function ); return( -1 ); } if( ( resource_data_offset + 2 ) > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid resource data value too small.", function ); return( -1 ); } resource_data_start_offset = resource_data_offset; byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), data_size ); resource_data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data size\t\t: %" PRIu16 "\n", function, data_size ); } #endif if( data_size != 0 ) { if( ( data_size < 8 ) || ( data_size > ( resource_data_size - ( resource_data_offset - 2 ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: data size value out of bounds.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), value_data_size ); resource_data_offset += 2; byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), value_data_type ); resource_data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data size\t: %" PRIu16 "\n", function, value_data_size ); libcnotify_printf( "%s: value data type\t: %" PRIu16 "\n", function, value_data_type ); } #endif /* TODO check value_data_size == 0 ? */ /* TODO handle value_data_type != 1 */ #if defined( HAVE_DEBUG_OUTPUT ) value_string_offset = resource_data_offset; #endif value_string_size = 0; while( ( resource_data_offset + 2 ) < resource_data_size ) { value_string_size += 2; if( ( resource_data[ resource_data_offset ] == 0 ) && ( resource_data[ resource_data_offset + 1 ] == 0 ) ) { resource_data_offset += 2; break; } resource_data_offset += 2; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value identifier string data:\n", function ); libcnotify_print_data( &( resource_data[ value_string_offset ] ), value_string_size, 0 ); } #endif /* TODO convert string */ if( ( resource_data_offset % 4 ) != 0 ) { alignment_padding_size = 4 - ( resource_data_offset % 4 ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: alignment padding:\n", function ); libcnotify_print_data( &( resource_data[ resource_data_offset ] ), alignment_padding_size, 0 ); } #endif resource_data_offset += alignment_padding_size; } while( ( resource_data_offset + 2 ) < ( resource_data_start_offset + data_size ) ) { read_count = libwrc_version_values_read_variable( language_entry, resource_data, resource_data_size, resource_data_offset, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read variable.", function ); return( -1 ); } else if( read_count == 0 ) { break; } resource_data_offset += read_count; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { trailing_data_size = resource_data_offset - resource_data_start_offset; if( trailing_data_size < data_size ) { trailing_data_size = data_size - trailing_data_size; libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( resource_data[ resource_data_offset ] ), trailing_data_size, 0 ); } } #endif } return( (ssize_t) data_size ); } /* Reads the version (resource) variable * Returns number of bytes read if successful or -1 on error */ ssize_t libwrc_version_values_read_variable( libwrc_language_entry_t *language_entry, const uint8_t *resource_data, size_t resource_data_size, size_t resource_data_offset, libcerror_error_t **error ) { static char *function = "libwrc_version_values_read_variable"; size_t alignment_padding_size = 0; size_t value_string_size = 0; uint16_t data_size = 0; uint16_t value_data_size = 0; uint16_t value_data_type = 0; #if defined( HAVE_DEBUG_OUTPUT ) size_t resource_data_start_offset = 0; size_t trailing_data_size = 0; size_t value_string_offset = 0; #endif if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", function ); return( -1 ); } if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource data.", function ); return( -1 ); } if( resource_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid resource data size value exceeds maximum.", function ); return( -1 ); } if( resource_data_offset >= resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid resource data offset value out of bounds.", function ); return( -1 ); } if( ( resource_data_offset + 2 ) > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid resource data value too small.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) resource_data_start_offset = resource_data_offset; #endif byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), data_size ); resource_data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data size\t\t\t\t: %" PRIu16 "\n", function, data_size ); } #endif if( data_size != 0 ) { if( ( data_size < 8 ) || ( data_size > ( resource_data_size - ( resource_data_offset - 2 ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: data size value out of bounds.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), value_data_size ); resource_data_offset += 2; byte_stream_copy_to_uint16_little_endian( &( resource_data[ resource_data_offset ] ), value_data_type ); resource_data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data size\t\t\t: %" PRIu16 "\n", function, value_data_size ); libcnotify_printf( "%s: value data type\t\t\t: %" PRIu16 "\n", function, value_data_type ); } #endif /* TODO check value_data_size == 0 ? */ /* TODO handle value_data_type != 1 */ #if defined( HAVE_DEBUG_OUTPUT ) value_string_offset = resource_data_offset; #endif value_string_size = 0; while( ( resource_data_offset + 2 ) < resource_data_size ) { value_string_size += 2; if( ( resource_data[ resource_data_offset ] == 0 ) && ( resource_data[ resource_data_offset + 1 ] == 0 ) ) { resource_data_offset += 2; break; } resource_data_offset += 2; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value identifier string data:\n", function ); libcnotify_print_data( &( resource_data[ value_string_offset ] ), value_string_size, 0 ); } #endif /* TODO convert string */ if( ( resource_data_offset % 4 ) != 0 ) { alignment_padding_size = 4 - ( resource_data_offset % 4 ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: alignment padding:\n", function ); libcnotify_print_data( &( resource_data[ resource_data_offset ] ), alignment_padding_size, 0 ); } #endif resource_data_offset += alignment_padding_size; } /* TODO */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { trailing_data_size = resource_data_offset - resource_data_start_offset; if( trailing_data_size < data_size ) { trailing_data_size = data_size - trailing_data_size; libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( resource_data[ resource_data_offset ] ), trailing_data_size, 0 ); } } #endif } return( (ssize_t) data_size ); } /* Retrieves the file version * Returns 1 if successful or -1 on error */ int libwrc_version_values_get_file_version( libwrc_version_values_t *version_values, uint64_t *file_version, libcerror_error_t **error ) { static char *function = "libwrc_version_values_get_file_version"; if( version_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid version values.", function ); return( -1 ); } if( file_version == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file version.", function ); return( -1 ); } *file_version = version_values->file_version; return( 1 ); } /* Retrieves the product version * Returns 1 if successful or -1 on error */ int libwrc_version_values_get_product_version( libwrc_version_values_t *version_values, uint64_t *product_version, libcerror_error_t **error ) { static char *function = "libwrc_version_values_get_product_version"; if( version_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid version values.", function ); return( -1 ); } if( product_version == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid product version.", function ); return( -1 ); } *product_version = version_values->product_version; return( 1 ); } libevt-20170120/libwrc/wrc_mui_resource.h0000664000175000017500000000357613012271522022352 0ustar00lordyestalordyesta00000000000000/* * The Windows RC Multilingual User Interface (MUI) resource * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _WRC_MUI_RESOURCE_H ) #define _WRC_MUI_RESOURCE_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct wrc_mui_header wrc_mui_header_t; struct wrc_mui_header { /* The signature * Consists of 4 bytes * Contains: 0xfecdfecd */ uint8_t signature[ 4 ]; /* The size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* The version * Consists of 4 bytes */ uint8_t version[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown1[ 4 ]; /* The file type * Consists of 4 bytes */ uint8_t file_type[ 4 ]; /* The system attributes * Consists of 4 bytes */ uint8_t system_attributes[ 4 ]; /* The ultimate fallback location * Consists of 4 bytes */ uint8_t ultimate_fallback_location[ 4 ]; /* The service checksum * Consists of 16 bytes */ uint8_t service_checksum[ 16 ]; /* The checksum * Consists of 16 bytes */ uint8_t checksum[ 16 ]; /* Unknown * Consists of 24 bytes */ uint8_t unknown2[ 24 ]; }; #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_definitions.h0000664000175000017500000001021513012271522022637 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_DEFINITIONS_H ) #define _LIBWRC_INTERNAL_DEFINITIONS_H #include #include #define LIBWRC_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBWRC_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* Define HAVE_LOCAL_LIBWRC for local use of libwrc */ #if !defined( HAVE_LOCAL_LIBWRC ) #include /* The definitions in are copied here * for local use of libwrc */ #else #define LIBWRC_VERSION 20161107 /* The version string */ #define LIBWRC_VERSION_STRING "20161107" /* 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 LIBWRC_ACCESS_FLAGS { LIBWRC_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBWRC_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBWRC_OPEN_READ ( LIBWRC_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBWRC_OPEN_WRITE ( LIBWRC_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBWRC_OPEN_READ_WRITE ( LIBWRC_ACCESS_FLAG_READ | LIBWRC_ACCESS_FLAG_WRITE ) /* The resource identifiers */ enum LIBWRC_RESOURCE_IDENTIFIERS { LIBWRC_RESOURCE_IDENTIFIER_CURSOR = 0x01, LIBWRC_RESOURCE_IDENTIFIER_BITMAP = 0x02, LIBWRC_RESOURCE_IDENTIFIER_ICON = 0x03, LIBWRC_RESOURCE_IDENTIFIER_MENU = 0x04, LIBWRC_RESOURCE_IDENTIFIER_DIALOG = 0x05, LIBWRC_RESOURCE_IDENTIFIER_STRING = 0x06, LIBWRC_RESOURCE_IDENTIFIER_FONT_DIRECTORY = 0x07, LIBWRC_RESOURCE_IDENTIFIER_FONT = 0x08, LIBWRC_RESOURCE_IDENTIFIER_ACCELERATOR = 0x09, LIBWRC_RESOURCE_IDENTIFIER_RAW_DATA = 0x0a, LIBWRC_RESOURCE_IDENTIFIER_MESSAGE_TABLE = 0x0b, LIBWRC_RESOURCE_IDENTIFIER_GROUP_CURSOR = 0x0c, LIBWRC_RESOURCE_IDENTIFIER_GROUP_ICON = 0x0e, LIBWRC_RESOURCE_IDENTIFIER_VERSION = 0x10, LIBWRC_RESOURCE_IDENTIFIER_DIALOG_INCLUDE = 0x11, LIBWRC_RESOURCE_IDENTIFIER_PLUG_AND_PLAY = 0x13, LIBWRC_RESOURCE_IDENTIFIER_VXD = 0x14, LIBWRC_RESOURCE_IDENTIFIER_ANIMATED_CURSOR = 0x15, LIBWRC_RESOURCE_IDENTIFIER_ANIMATED_ICON = 0x16, LIBWRC_RESOURCE_IDENTIFIER_HTML = 0x17, LIBWRC_RESOURCE_IDENTIFIER_MANIFEST = 0x18 }; #define LIBWRC_RESOURCE_IDENTIFIER_FLAG_HAS_NAME 0x80000000UL /* The resource types */ enum LIBWRC_RESOURCE_TYPES { LIBWRC_RESOURCE_TYPE_UNDEFINED, LIBWRC_RESOURCE_TYPE_CURSOR, LIBWRC_RESOURCE_TYPE_BITMAP, LIBWRC_RESOURCE_TYPE_ICON, LIBWRC_RESOURCE_TYPE_MENU, LIBWRC_RESOURCE_TYPE_DIALOG, LIBWRC_RESOURCE_TYPE_STRING, LIBWRC_RESOURCE_TYPE_FONT_DIRECTORY, LIBWRC_RESOURCE_TYPE_FONT, LIBWRC_RESOURCE_TYPE_ACCELERATOR, LIBWRC_RESOURCE_TYPE_RAW_DATA, LIBWRC_RESOURCE_TYPE_MESSAGE_TABLE, LIBWRC_RESOURCE_TYPE_GROUP_CURSOR, LIBWRC_RESOURCE_TYPE_GROUP_ICON, LIBWRC_RESOURCE_TYPE_VERSION, LIBWRC_RESOURCE_TYPE_DIALOG_INCLUDE, LIBWRC_RESOURCE_TYPE_PLUG_AND_PLAY, LIBWRC_RESOURCE_TYPE_VXD, LIBWRC_RESOURCE_TYPE_ANIMATED_CURSOR, LIBWRC_RESOURCE_TYPE_ANIMATED_ICON, LIBWRC_RESOURCE_TYPE_HTML, LIBWRC_RESOURCE_TYPE_MANIFEST, LIBWRC_RESOURCE_TYPE_MOFDATA, LIBWRC_RESOURCE_TYPE_MUI, LIBWRC_RESOURCE_TYPE_WEVT_TEMPLATE, }; #endif /* The resource flags */ enum LIBWRC_RESOURCE_FLAGS { LIBWRC_RESOURCE_FLAG_NON_MANAGED_FILE_IO_HANDLE = 0x00, LIBWRC_RESOURCE_FLAG_MANAGED_FILE_IO_HANDLE = 0x01, }; #define LIBWRC_RESOURCE_FLAGS_DEFAULT LIBWRC_RESOURCE_FLAG_NON_MANAGED_FILE_IO_HANDLE #endif libevt-20170120/libwrc/libwrc_message_table.c0000664000175000017500000003506613012271522023125 0ustar00lordyestalordyesta00000000000000/* * Message table (resource) functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libwrc_definitions.h" #include "libwrc_language_entry.h" #include "libwrc_language_table.h" #include "libwrc_libcerror.h" #include "libwrc_libfvalue.h" #include "libwrc_message_table.h" #include "libwrc_resource.h" #include "libwrc_resource_values.h" /* Retrieves the number of messages * Returns 1 if successful or -1 on error */ int libwrc_message_table_get_number_of_messages( libwrc_resource_t *resource, uint32_t language_identifier, int *number_of_messages, libcerror_error_t **error ) { libwrc_internal_resource_t *internal_resource = NULL; static char *function = "libwrc_message_table_get_number_of_messages"; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } internal_resource = (libwrc_internal_resource_t *) resource; if( internal_resource->resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource - missing resource values.", function ); return( -1 ); } if( internal_resource->resource_values->identifier != LIBWRC_RESOURCE_IDENTIFIER_MESSAGE_TABLE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported resource type: 0x%08" PRIx32 ".", function, internal_resource->resource_values->identifier ); return( -1 ); } if( internal_resource->value == NULL ) { if( libwrc_resource_read_value( internal_resource, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource value.", function ); return( -1 ); } } if( libwrc_language_table_get_number_of_values( (libwrc_language_table_t *) internal_resource->value, language_identifier, number_of_messages, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of values for language identifier: 0x%08" PRIx32 ".", function, language_identifier ); return( -1 ); } return( 1 ); } /* Retrieves a specific message identifier * Returns 1 if successful or -1 on error */ int libwrc_message_table_get_identifier( libwrc_resource_t *resource, uint32_t language_identifier, int message_index, uint32_t *message_identifier, libcerror_error_t **error ) { libfvalue_value_t *message_table_values = NULL; uint8_t *message_table_value_identifier = NULL; static char *function = "libwrc_message_table_get_identifier"; size_t message_table_value_identifier_size = 0; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_IDENTIFIER_MESSAGE_TABLE, language_identifier, message_index, (intptr_t **) &message_table_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message table values.", function ); return( -1 ); } /* TODO move to message table values function */ if( message_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message identifier.", function ); return( -1 ); } if( libfvalue_value_get_identifier( message_table_values, &message_table_value_identifier, &message_table_value_identifier_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message table value: %d identifier.", function, message_index ); return( -1 ); } if( message_table_value_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing message table value identifier.", function ); return( -1 ); } if( message_table_value_identifier_size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: message table value identifier size value out of bound.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( message_table_value_identifier, *message_identifier ); return( 1 ); } /* Retrieves the message index for a specific identifier * Returns 1 if successful, 0 if no such message identifier or -1 on error */ int libwrc_message_table_get_index_by_identifier( libwrc_resource_t *resource, uint32_t language_identifier, uint32_t message_identifier, int *message_index, libcerror_error_t **error ) { libfvalue_value_t *message_table_value = NULL; libwrc_internal_resource_t *internal_resource = NULL; libwrc_language_entry_t *language_entry = NULL; uint8_t *message_table_value_identifier = NULL; static char *function = "libwrc_message_table_get_index_by_identifier"; size_t message_table_value_identifier_size = 0; uint32_t identifier = 0; int number_of_messages = 0; if( resource == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource.", function ); return( -1 ); } internal_resource = (libwrc_internal_resource_t *) resource; if( internal_resource->resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource - missing resource values.", function ); return( -1 ); } if( internal_resource->resource_values->identifier != LIBWRC_RESOURCE_IDENTIFIER_MESSAGE_TABLE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported resource type: 0x%08" PRIx32 ".", function, internal_resource->resource_values->identifier ); return( -1 ); } if( internal_resource->value == NULL ) { if( libwrc_resource_read_value( internal_resource, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource value.", function ); return( -1 ); } } if( libwrc_language_table_get_entry_by_identifier( (libwrc_language_table_t *) internal_resource->value, language_identifier, &language_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve language entry for identifier: 0x%08" PRIx32 ".", function, language_identifier ); return( -1 ); } if( libwrc_language_entry_get_number_of_values( language_entry, &number_of_messages, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of messages.", function ); return( -1 ); } for( *message_index = 0; *message_index < number_of_messages; *message_index += 1 ) { if( libwrc_language_entry_get_value_by_index( language_entry, *message_index, (intptr_t **) &message_table_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message table value: %d.", function, message_index ); return( -1 ); } if( libfvalue_value_get_identifier( message_table_value, &message_table_value_identifier, &message_table_value_identifier_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message table value: %d identifier.", function, message_index ); return( -1 ); } if( message_table_value_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing message table value identifier.", function ); return( -1 ); } if( message_table_value_identifier_size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: message table size value out of bound.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( message_table_value_identifier, identifier ); if( identifier == message_identifier ) { return( 1 ); } } return( 0 ); } /* Retrieves the size of a specific UTF-8 formatted message string * Returns 1 if successful or -1 on error */ int libwrc_message_table_get_utf8_string_size( libwrc_resource_t *resource, uint32_t language_identifier, int message_index, size_t *utf8_string_size, libcerror_error_t **error ) { libfvalue_value_t *message_table_values = NULL; static char *function = "libwrc_message_table_get_utf8_string_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_IDENTIFIER_MESSAGE_TABLE, language_identifier, message_index, (intptr_t **) &message_table_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message table values.", function ); return( -1 ); } if( libfvalue_value_get_utf8_string_size( message_table_values, 0, 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 of message table value: %d.", function, message_index ); return( -1 ); } return( 1 ); } /* Retrieves a specific UTF-8 formatted message string * Returns 1 if successful or -1 on error */ int libwrc_message_table_get_utf8_string( libwrc_resource_t *resource, uint32_t language_identifier, int message_index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libfvalue_value_t *message_table_values = NULL; static char *function = "libwrc_message_table_get_utf8_string"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_IDENTIFIER_MESSAGE_TABLE, language_identifier, message_index, (intptr_t **) &message_table_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message table values.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf8_string( message_table_values, 0, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy message table value: %d to UTF-8 string.", function, message_index ); return( -1 ); } return( 1 ); } /* Retrieves the size of a specific UTF-16 formatted message string * Returns 1 if successful or -1 on error */ int libwrc_message_table_get_utf16_string_size( libwrc_resource_t *resource, uint32_t language_identifier, int message_index, size_t *utf16_string_size, libcerror_error_t **error ) { libfvalue_value_t *message_table_values = NULL; static char *function = "libwrc_message_table_get_utf16_string_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_IDENTIFIER_MESSAGE_TABLE, language_identifier, message_index, (intptr_t **) &message_table_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message table values.", function ); return( -1 ); } if( libfvalue_value_get_utf16_string_size( message_table_values, 0, 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 of message table value: %d.", function, message_index ); return( -1 ); } return( 1 ); } /* Retrieves a specific UTF-16 formatted message string * Returns 1 if successful or -1 on error */ int libwrc_message_table_get_utf16_string( libwrc_resource_t *resource, uint32_t language_identifier, int message_index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libfvalue_value_t *message_table_values = NULL; static char *function = "libwrc_message_table_get_utf16_string"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_IDENTIFIER_MESSAGE_TABLE, language_identifier, message_index, (intptr_t **) &message_table_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message table values.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf16_string( message_table_values, 0, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy message table value: %d to UTF-16 string.", function, message_index ); return( -1 ); } return( 1 ); } libevt-20170120/libwrc/libwrc_language_table.h0000664000175000017500000000463113012271522023263 0ustar00lordyestalordyesta00000000000000/* * Language table functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LANGUAGE_TABLE_H ) #define _LIBWRC_LANGUAGE_TABLE_H #include #include #include "libwrc_language_entry.h" #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_language_table libwrc_language_table_t; struct libwrc_language_table { /* The language entries array */ libcdata_array_t *entries_array; }; int libwrc_language_table_initialize( libwrc_language_table_t **language_table, libcerror_error_t **error ); int libwrc_language_table_free( libwrc_language_table_t **language_table, libcerror_error_t **error ); int libwrc_language_table_get_number_of_entries( libwrc_language_table_t *language_table, int *number_of_entries, libcerror_error_t **error ); int libwrc_language_table_get_identifier( libwrc_language_table_t *language_table, int entry_index, uint32_t *language_identifier, libcerror_error_t **error ); int libwrc_language_table_get_entry_by_identifier( libwrc_language_table_t *language_table, uint32_t language_identifier, libwrc_language_entry_t **language_entry, libcerror_error_t **error ); int libwrc_language_table_append_entry( libwrc_language_table_t *language_table, int *entry_index, libwrc_language_entry_t *language_entry, libcerror_error_t **error ); int libwrc_language_table_get_number_of_values( libwrc_language_table_t *language_table, uint32_t language_identifier, int *number_of_values, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_message_table.h0000664000175000017500000000525113012271522023123 0ustar00lordyestalordyesta00000000000000/* * Message table (resource) functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_MESSAGE_TABLE_H ) #define _LIBWRC_MESSAGE_TABLE_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_resource.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBWRC_EXTERN \ int libwrc_message_table_get_number_of_messages( libwrc_resource_t *resource, uint32_t language_identifier, int *number_of_messages, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_message_table_get_identifier( libwrc_resource_t *resource, uint32_t language_identifier, int message_index, uint32_t *message_identifier, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_message_table_get_index_by_identifier( libwrc_resource_t *resource, uint32_t language_identifier, uint32_t message_identifier, int *message_index, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_message_table_get_utf8_string_size( libwrc_resource_t *resource, uint32_t language_identifier, int message_index, size_t *utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_message_table_get_utf8_string( libwrc_resource_t *resource, uint32_t language_identifier, int message_index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_message_table_get_utf16_string_size( libwrc_resource_t *resource, uint32_t language_identifier, int message_index, size_t *utf16_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_message_table_get_utf16_string( libwrc_resource_t *resource, uint32_t language_identifier, int message_index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_notify.h0000664000175000017500000000303513012271522021636 0ustar00lordyestalordyesta00000000000000/* * Notification functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_NOTIFY_H ) #define _LIBWRC_NOTIFY_H #include #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBWRC ) LIBWRC_EXTERN \ void libwrc_notify_set_verbose( int verbose ); LIBWRC_EXTERN \ int libwrc_notify_set_stream( FILE *stream, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_notify_stream_open( const char *filename, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_notify_stream_close( libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBWRC ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBWRC_NOTIFY_H ) */ libevt-20170120/libwrc/libwrc_debug.c0000664000175000017500000001046513012271522021414 0ustar00lordyestalordyesta00000000000000/* * Debug functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libwrc_debug.h" #include "libwrc_definitions.h" #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #include "libwrc_libcnotify.h" #if defined( HAVE_DEBUG_OUTPUT ) /* Returns a string with the resource identifier description */ const char *libwrc_debug_get_resource_identifier( uint32_t resource_identifier ) { switch( resource_identifier ) { case LIBWRC_RESOURCE_IDENTIFIER_CURSOR: return( "Cursor" ); case LIBWRC_RESOURCE_IDENTIFIER_BITMAP: return( "Bitmap" ); case LIBWRC_RESOURCE_IDENTIFIER_ICON: return( "Icon" ); case LIBWRC_RESOURCE_IDENTIFIER_MENU: return( "Menu" ); case LIBWRC_RESOURCE_IDENTIFIER_DIALOG: return( "Dialog" ); case LIBWRC_RESOURCE_IDENTIFIER_STRING: return( "String" ); case LIBWRC_RESOURCE_IDENTIFIER_FONT_DIRECTORY: return( "Font Directory" ); case LIBWRC_RESOURCE_IDENTIFIER_FONT: return( "Font" ); case LIBWRC_RESOURCE_IDENTIFIER_ACCELERATOR: return( "Accelerator" ); case LIBWRC_RESOURCE_IDENTIFIER_RAW_DATA: return( "Raw data" ); case LIBWRC_RESOURCE_IDENTIFIER_MESSAGE_TABLE: return( "Message Table" ); case LIBWRC_RESOURCE_IDENTIFIER_GROUP_CURSOR: return( "Group Cursor" ); case LIBWRC_RESOURCE_IDENTIFIER_GROUP_ICON: return( "Group Icon" ); case LIBWRC_RESOURCE_IDENTIFIER_VERSION: return( "Version" ); case LIBWRC_RESOURCE_IDENTIFIER_DIALOG_INCLUDE: return( "Dialog Include" ); case LIBWRC_RESOURCE_IDENTIFIER_PLUG_AND_PLAY: return( "Plug and Play" ); case LIBWRC_RESOURCE_IDENTIFIER_VXD: return( "VXD" ); case LIBWRC_RESOURCE_IDENTIFIER_ANIMATED_CURSOR: return( "Animated Cursor" ); case LIBWRC_RESOURCE_IDENTIFIER_ANIMATED_ICON: return( "Animated Icon" ); case LIBWRC_RESOURCE_IDENTIFIER_HTML: return( "HTML" ); case LIBWRC_RESOURCE_IDENTIFIER_MANIFEST: return( "Manifest" ); default: break; } return( "UNKNOWN" ); } /* Prints the read offsets * Returns 1 if successful or -1 on error */ int libwrc_debug_print_read_offsets( libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libwrc_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 + 1 ) ); return( -1 ); } libcnotify_printf( "%08" PRIi64 " ( 0x%08" PRIx64 " ) - %08" PRIi64 " ( 0x%08" PRIx64 " ) size: %" PRIu64 "\n", offset, offset, offset + size, offset + size, size ); } libcnotify_printf( "\n" ); return( 1 ); } #endif libevt-20170120/libwrc/libwrc_wevt_event.c0000664000175000017500000001660113012271522022512 0ustar00lordyestalordyesta00000000000000/* * WEVT event functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_definitions.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #include "libwrc_wevt_event.h" #include "libwrc_wevt_template_definition.h" /* Creates an event * Make sure the value event is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_wevt_event_initialize( libwrc_wevt_event_t **event, libfwevt_provider_t *provider_descriptor, libfwevt_event_t *event_descriptor, libcerror_error_t **error ) { libwrc_internal_wevt_event_t *internal_event = NULL; static char *function = "libwrc_wevt_event_initialize"; if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } if( *event != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid event value already set.", function ); return( -1 ); } if( event_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event descriptor.", function ); return( -1 ); } internal_event = memory_allocate_structure( libwrc_internal_wevt_event_t ); if( internal_event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create event.", function ); goto on_error; } if( memory_set( internal_event, 0, sizeof( libwrc_internal_wevt_event_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear event.", function ); goto on_error; } internal_event->provider_descriptor = provider_descriptor; internal_event->event_descriptor = event_descriptor; *event = (libwrc_wevt_event_t *) internal_event; return( 1 ); on_error: if( internal_event != NULL ) { memory_free( internal_event ); } return( -1 ); } /* Frees an event * Returns 1 if successful or -1 on error */ int libwrc_wevt_event_free( libwrc_wevt_event_t **event, libcerror_error_t **error ) { libwrc_internal_wevt_event_t *internal_event = NULL; static char *function = "libwrc_wevt_event_free"; if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } if( *event != NULL ) { internal_event = (libwrc_internal_wevt_event_t *) *event; *event = NULL; memory_free( internal_event ); } return( 1 ); } /* Retrieves the identifier * Returns 1 if successful or -1 on error */ int libwrc_wevt_event_get_identifier( libwrc_wevt_event_t *event, uint32_t *identifier, libcerror_error_t **error ) { libwrc_internal_wevt_event_t *internal_event = NULL; static char *function = "libwrc_wevt_event_get_identifier"; if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } internal_event = (libwrc_internal_wevt_event_t *) event; if( libfwevt_event_get_identifier( internal_event->event_descriptor, identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); return( -1 ); } return( 1 ); } /* Retrieves the message identifier * Returns 1 if successful or -1 on error */ int libwrc_wevt_event_get_message_identifier( libwrc_wevt_event_t *event, uint32_t *message_identifier, libcerror_error_t **error ) { libwrc_internal_wevt_event_t *internal_event = NULL; static char *function = "libwrc_wevt_event_get_message_identifier"; if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } internal_event = (libwrc_internal_wevt_event_t *) event; if( libfwevt_event_get_message_identifier( internal_event->event_descriptor, message_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message identifier.", function ); return( -1 ); } return( 1 ); } /* Retrieves the template definition * Returns 1 if successful, 0 if not available or -1 on error */ int libwrc_wevt_event_get_template_definition( libwrc_wevt_event_t *event, libwrc_wevt_template_definition_t **template_definition, libcerror_error_t **error ) { libwrc_internal_wevt_event_t *internal_event = NULL; libfwevt_template_t *template_descriptor = NULL; static char *function = "libwrc_wevt_event_get_template_definition"; uint32_t template_offset = 0; int result = 0; if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } internal_event = (libwrc_internal_wevt_event_t *) event; if( libfwevt_event_get_template_offset( internal_event->event_descriptor, &template_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template offset.", function ); return( -1 ); } if( template_offset != 0 ) { result = libfwevt_provider_get_template_by_offset( internal_event->provider_descriptor, template_offset, &template_descriptor, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template by offset.", function ); return( -1 ); } else if( result != 0 ) { if( libwrc_wevt_template_definition_initialize( template_definition, template_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create template definition.", function ); return( -1 ); } } } return( result ); } libevt-20170120/libwrc/libwrc_mui_values.c0000664000175000017500000010016713012271522022476 0ustar00lordyestalordyesta00000000000000/* * Multilingual User Interface (MUI) (resource) values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include #include "libwrc_data_descriptor.h" #include "libwrc_definitions.h" #include "libwrc_io_handle.h" #include "libwrc_language_entry.h" #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #include "libwrc_libcnotify.h" #include "libwrc_libuna.h" #include "libwrc_mui_values.h" #include "wrc_mui_resource.h" uint8_t libwrc_mui_signature[ 4 ] = { 0xcd, 0xfe, 0xcd, 0xfe }; /* Creates MUI values * Make sure the value mui_values is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_mui_values_initialize( libwrc_mui_values_t **mui_values, libcerror_error_t **error ) { static char *function = "libwrc_mui_values_initialize"; if( mui_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid MUI values.", function ); return( -1 ); } if( *mui_values != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid MUI values value already set.", function ); return( -1 ); } *mui_values = memory_allocate_structure( libwrc_mui_values_t ); if( *mui_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create MUI values.", function ); goto on_error; } if( memory_set( *mui_values, 0, sizeof( libwrc_mui_values_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear MUI values.", function ); goto on_error; } return( 1 ); on_error: if( *mui_values != NULL ) { memory_free( *mui_values ); *mui_values = NULL; } return( -1 ); } /* Frees MUI values * Returns 1 if successful or -1 on error */ int libwrc_mui_values_free( libwrc_mui_values_t **mui_values, libcerror_error_t **error ) { static char *function = "libwrc_mui_values_free"; if( mui_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid MUI values.", function ); return( -1 ); } if( *mui_values != NULL ) { if( ( *mui_values )->main_name != NULL ) { memory_free( ( *mui_values )->main_name ); } if( ( *mui_values )->mui_name != NULL ) { memory_free( ( *mui_values )->mui_name ); } if( ( *mui_values )->language != NULL ) { memory_free( ( *mui_values )->language ); } if( ( *mui_values )->fallback_language != NULL ) { memory_free( ( *mui_values )->fallback_language ); } memory_free( *mui_values ); *mui_values = NULL; } return( 1 ); } /* Reads the MUI (resource) values * Returns 1 if successful or -1 on error */ int libwrc_mui_values_read( libwrc_language_entry_t *language_entry, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ) { libwrc_mui_values_t *mui_values = NULL; uint8_t *resource_data = NULL; uint8_t *mui_resource_data = NULL; static char *function = "libwrc_mui_values_read"; off64_t file_offset = 0; size_t resource_data_offset = 0; size_t resource_data_size = 0; ssize_t read_count = 0; uint32_t data_size = 0; uint32_t value_data_offset = 0; uint32_t value_data_size = 0; int value_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t *value_string = NULL; size_t value_string_size = 0; uint32_t value_32bit = 0; int result = 0; #endif if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", 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_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data descriptor.", function ); return( -1 ); } if( libwrc_mui_values_initialize( &mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create MUI values.", function ); goto on_error; } file_offset = data_descriptor->virtual_address - io_handle->virtual_address; if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek resource data offset: %" PRIi64 ".", function, file_offset ); goto on_error; } resource_data_size = (size_t) data_descriptor->size; resource_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * resource_data_size ); if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource data.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, resource_data, resource_data_size, error ); if( read_count != (ssize_t) resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource data.", function ); goto on_error; } mui_resource_data = resource_data; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: resource data:\n", function ); libcnotify_print_data( mui_resource_data, resource_data_size, 0 ); } #endif if( memory_compare( ( (wrc_mui_header_t *) mui_resource_data )->signature, libwrc_mui_signature, 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported signature.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( ( (wrc_mui_header_t *) mui_resource_data )->size, data_size ); byte_stream_copy_to_uint32_little_endian( ( (wrc_mui_header_t *) mui_resource_data )->file_type, mui_values->file_type ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint32_little_endian( ( (wrc_mui_header_t *) mui_resource_data )->signature, value_32bit ); libcnotify_printf( "%s: signature\t\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: size\t\t\t\t\t\t: %" PRIu32 "\n", function, data_size ); byte_stream_copy_to_uint32_little_endian( ( (wrc_mui_header_t *) mui_resource_data )->version, value_32bit ); libcnotify_printf( "%s: version\t\t\t\t\t\t: %" PRIu32 ".%" PRIu32 "\n", function, value_32bit >> 16, value_32bit & 0x0000ffffUL ); byte_stream_copy_to_uint32_little_endian( ( (wrc_mui_header_t *) mui_resource_data )->unknown1, value_32bit ); libcnotify_printf( "%s: unknown1\t\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: file type\t\t\t\t\t: 0x%08" PRIx32 "\n", function, mui_values->file_type ); byte_stream_copy_to_uint32_little_endian( ( (wrc_mui_header_t *) mui_resource_data )->system_attributes, value_32bit ); libcnotify_printf( "%s: system attributes\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (wrc_mui_header_t *) mui_resource_data )->ultimate_fallback_location, value_32bit ); libcnotify_printf( "%s: ultimate fallback location\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: service checksum:\n", function ); libcnotify_print_data( ( (wrc_mui_header_t *) mui_resource_data )->service_checksum, 16, 0 ); libcnotify_printf( "%s: checksum:\n", function ); libcnotify_print_data( ( (wrc_mui_header_t *) mui_resource_data )->checksum, 16, 0 ); libcnotify_printf( "%s: unknown2:\n", function ); libcnotify_print_data( ( (wrc_mui_header_t *) mui_resource_data )->unknown2, 24, 0 ); } #endif resource_data_offset = sizeof( wrc_mui_header_t ); if( (size_t) data_size > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: data size value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( &( mui_resource_data[ resource_data_offset ] ), value_data_offset ); byte_stream_copy_to_uint32_little_endian( &( mui_resource_data[ resource_data_offset + 4 ] ), value_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: main name type data offset\t\t\t: 0x%08" PRIx32 "\n", function, value_data_offset ); libcnotify_printf( "%s: main name type data size\t\t\t: %" PRIu32 "\n", function, value_data_size ); } #endif resource_data_offset += 8; if( value_data_size > 0 ) { if( ( (size_t) value_data_offset < 0x84 ) || ( (size_t) value_data_offset >= resource_data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data offset value out of bounds.", function ); goto on_error; } if( (size_t) ( value_data_offset + value_data_size ) > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: main name type data:\n", function ); libcnotify_print_data( &( mui_resource_data[ value_data_offset ] ), value_data_size, 0 ); } #endif mui_values->main_name = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( mui_values->main_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create main name.", function ); goto on_error; } if( memory_copy( mui_values->main_name, &( mui_resource_data[ value_data_offset ] ), value_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy main name.", function ); goto on_error; } mui_values->main_name_size = value_data_size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( mui_values->main_name, mui_values->main_name_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( mui_values->main_name, mui_values->main_name_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 main name string.", function ); goto on_error; } if( ( value_string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * value_string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid main name string size value exceeds maximum.", 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 main name string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, mui_values->main_name, mui_values->main_name_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, mui_values->main_name, mui_values->main_name_size, LIBUNA_ENDIAN_LITTLE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set main name string.", function ); goto on_error; } libcnotify_printf( "%s: main name\t\t\t\t\t: %" PRIs_SYSTEM "\n", function, value_string ); memory_free( value_string ); value_string = NULL; } #endif } byte_stream_copy_to_uint32_little_endian( &( mui_resource_data[ resource_data_offset ] ), value_data_offset ); byte_stream_copy_to_uint32_little_endian( &( mui_resource_data[ resource_data_offset + 4 ] ), value_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: main identifier type data offset\t\t: 0x%08" PRIx32 "\n", function, value_data_offset ); libcnotify_printf( "%s: main identifier type data size\t\t\t: %" PRIu32 "\n", function, value_data_size ); } #endif resource_data_offset += 8; if( value_data_size > 0 ) { if( ( (size_t) value_data_offset < 0x84 ) || ( (size_t) value_data_offset >= resource_data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data offset value out of bounds.", function ); goto on_error; } if( (size_t) ( value_data_offset + value_data_size ) > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: main identifier type data:\n", function ); libcnotify_print_data( &( mui_resource_data[ value_data_offset ] ), value_data_size, 0 ); } #endif } byte_stream_copy_to_uint32_little_endian( &( mui_resource_data[ resource_data_offset ] ), value_data_offset ); byte_stream_copy_to_uint32_little_endian( &( mui_resource_data[ resource_data_offset + 4 ] ), value_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: MUI name type data offset\t\t\t: 0x%08" PRIx32 "\n", function, value_data_offset ); libcnotify_printf( "%s: MUI name type data size\t\t\t\t: %" PRIu32 "\n", function, value_data_size ); } #endif resource_data_offset += 8; if( value_data_size > 0 ) { if( ( (size_t) value_data_offset < 0x84 ) || ( (size_t) value_data_offset >= resource_data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data offset value out of bounds.", function ); goto on_error; } if( (size_t) ( value_data_offset + value_data_size ) > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: MUI name type data:\n", function ); libcnotify_print_data( &( mui_resource_data[ value_data_offset ] ), value_data_size, 0 ); } #endif mui_values->mui_name = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( mui_values->mui_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create MUI name.", function ); goto on_error; } if( memory_copy( mui_values->mui_name, &( mui_resource_data[ value_data_offset ] ), value_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy MUI name.", function ); goto on_error; } mui_values->mui_name_size = value_data_size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( mui_values->mui_name, mui_values->mui_name_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( mui_values->mui_name, mui_values->mui_name_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 MUI name string.", function ); goto on_error; } if( ( value_string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * value_string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid MUI name string size value exceeds maximum.", 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 MUI name string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, mui_values->mui_name, mui_values->mui_name_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, mui_values->mui_name, mui_values->mui_name_size, LIBUNA_ENDIAN_LITTLE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set MUI name string.", function ); goto on_error; } libcnotify_printf( "%s: MUI name\t\t\t\t\t: %" PRIs_SYSTEM "\n", function, value_string ); memory_free( value_string ); value_string = NULL; } #endif } byte_stream_copy_to_uint32_little_endian( &( mui_resource_data[ resource_data_offset ] ), value_data_offset ); byte_stream_copy_to_uint32_little_endian( &( mui_resource_data[ resource_data_offset + 4 ] ), value_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: MUI identifier type data offset\t\t\t: 0x%08" PRIx32 "\n", function, value_data_offset ); libcnotify_printf( "%s: MUI identifier type data size\t\t\t: %" PRIu32 "\n", function, value_data_size ); } #endif resource_data_offset += 8; if( value_data_size > 0 ) { if( ( (size_t) value_data_offset < 0x84 ) || ( (size_t) value_data_offset >= resource_data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data offset value out of bounds.", function ); goto on_error; } if( (size_t) ( value_data_offset + value_data_size ) > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: MUI identifier type data:\n", function ); libcnotify_print_data( &( mui_resource_data[ value_data_offset ] ), value_data_size, 0 ); } #endif } byte_stream_copy_to_uint32_little_endian( &( mui_resource_data[ resource_data_offset ] ), value_data_offset ); byte_stream_copy_to_uint32_little_endian( &( mui_resource_data[ resource_data_offset + 4 ] ), value_data_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: language data offset\t\t\t\t: 0x%08" PRIx32 "\n", function, value_data_offset ); libcnotify_printf( "%s: language data size\t\t\t\t: %" PRIu32 "\n", function, value_data_size ); } #endif resource_data_offset += 8; byte_stream_copy_to_uint32_little_endian( &( mui_resource_data[ resource_data_offset ] ), value_data_offset ); byte_stream_copy_to_uint32_little_endian( &( mui_resource_data[ resource_data_offset + 4 ] ), value_data_size ); if( value_data_size > 0 ) { if( ( (size_t) value_data_offset < 0x84 ) || ( (size_t) value_data_offset >= resource_data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data offset value out of bounds.", function ); goto on_error; } if( (size_t) ( value_data_offset + value_data_size ) > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: ultimate language data:\n", function ); libcnotify_print_data( &( mui_resource_data[ value_data_offset ] ), value_data_size, 0 ); } #endif mui_values->language = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( mui_values->language == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create language.", function ); goto on_error; } if( memory_copy( mui_values->language, &( mui_resource_data[ value_data_offset ] ), value_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy language identifier.", function ); goto on_error; } mui_values->language_size = value_data_size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( mui_values->language, mui_values->language_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( mui_values->language, mui_values->language_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 language string.", function ); goto on_error; } if( ( value_string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * value_string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid language string size value exceeds maximum.", 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 language string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, mui_values->language, mui_values->language_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, mui_values->language, mui_values->language_size, LIBUNA_ENDIAN_LITTLE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set language string.", function ); goto on_error; } libcnotify_printf( "%s: language\t\t\t\t\t: %" PRIs_SYSTEM "\n", function, value_string ); memory_free( value_string ); value_string = NULL; } #endif } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: ultimate fallback language data offset\t\t: 0x%08" PRIx32 "\n", function, value_data_offset ); libcnotify_printf( "%s: ultimate fallback language data size\t\t: %" PRIu32 "\n", function, value_data_size ); } #endif if( value_data_size > 0 ) { if( ( (size_t) value_data_offset < 0x84 ) || ( (size_t) value_data_offset >= resource_data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data offset value out of bounds.", function ); goto on_error; } if( (size_t) ( value_data_offset + value_data_size ) > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value data size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: ultimate fallback language data:\n", function ); libcnotify_print_data( &( mui_resource_data[ value_data_offset ] ), value_data_size, 0 ); } #endif mui_values->fallback_language = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( mui_values->fallback_language == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create fallback language.", function ); goto on_error; } if( memory_copy( mui_values->fallback_language, &( mui_resource_data[ value_data_offset ] ), value_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy fallback language.", function ); goto on_error; } mui_values->fallback_language_size = value_data_size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( mui_values->fallback_language, mui_values->fallback_language_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( mui_values->fallback_language, mui_values->fallback_language_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 fallback language string.", function ); goto on_error; } if( ( value_string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * value_string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid fallback language string size value exceeds maximum.", 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 fallback language string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, mui_values->fallback_language, mui_values->fallback_language_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, mui_values->fallback_language, mui_values->fallback_language_size, LIBUNA_ENDIAN_LITTLE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set fallback language string.", function ); goto on_error; } libcnotify_printf( "%s: fallback language\t\t\t\t: %" PRIs_SYSTEM "\n", function, value_string ); memory_free( value_string ); value_string = NULL; } #endif } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif /* TODO print trailing data */ if( libwrc_language_entry_append_value( language_entry, &value_index, (intptr_t *) mui_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append MUI values.", function ); goto on_error; } mui_values = NULL; memory_free( resource_data ); return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( value_string != NULL ) { memory_free( value_string ); } #endif if( resource_data != NULL ) { memory_free( resource_data ); } if( mui_values != NULL ) { libwrc_mui_values_free( &mui_values, NULL ); } return( -1 ); } /* Retrieves the file type * Returns 1 if successful or -1 on error */ int libwrc_mui_values_get_file_type( libwrc_mui_values_t *mui_values, uint32_t *file_type, libcerror_error_t **error ) { static char *function = "libwrc_mui_values_get_file_type"; if( mui_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid MUI values.", function ); return( -1 ); } if( file_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file type.", function ); return( -1 ); } *file_type = mui_values->file_type; return( 1 ); } libevt-20170120/libwrc/libwrc_wevt_map.h0000664000175000017500000000301213012271522022143 0ustar00lordyestalordyesta00000000000000/* * WEVT map functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_WEVT_MAP_H ) #define _LIBWRC_INTERNAL_WEVT_MAP_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_internal_wevt_map libwrc_internal_wevt_map_t; struct libwrc_internal_wevt_map { /* The map descriptor */ libfwevt_map_t *map_descriptor; }; int libwrc_wevt_map_initialize( libwrc_wevt_map_t **map, libfwevt_map_t *map_descriptor, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_map_free( libwrc_wevt_map_t **map, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_manifest.h0000664000175000017500000000363613012271522022143 0ustar00lordyestalordyesta00000000000000/* * Manifest (resource) functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_MANIFEST_H ) #define _LIBWRC_MANIFEST_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_resource.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBWRC_EXTERN \ int libwrc_manifest_get_utf8_string_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_manifest_get_utf8_string( libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_manifest_get_utf16_string_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_manifest_get_utf16_string( libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_types.h0000664000175000017500000000470713012271522021501 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_TYPES_H ) #define _LIBWRC_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBWRC for local use of libwrc * The definitions in are copied here * for local use of libwrc */ #if defined( HAVE_LOCAL_LIBWRC ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libwrc_resource {} libwrc_resource_t; typedef struct libwrc_stream {} libwrc_stream_t; typedef struct libwrc_wevt_channel {} libwrc_wevt_channel_t; typedef struct libwrc_wevt_event {} libwrc_wevt_event_t; typedef struct libwrc_wevt_keyword {} libwrc_wevt_keyword_t; typedef struct libwrc_wevt_level {} libwrc_wevt_level_t; typedef struct libwrc_wevt_map {} libwrc_wevt_map_t; typedef struct libwrc_wevt_opcode {} libwrc_wevt_opcode_t; typedef struct libwrc_wevt_provider {} libwrc_wevt_provider_t; typedef struct libwrc_wevt_task {} libwrc_wevt_task_t; typedef struct libwrc_wevt_template_definition {} libwrc_wevt_template_definition_t; #else typedef intptr_t libwrc_resource_t; typedef intptr_t libwrc_stream_t; typedef intptr_t libwrc_wevt_channel_t; typedef intptr_t libwrc_wevt_event_t; typedef intptr_t libwrc_wevt_keyword_t; typedef intptr_t libwrc_wevt_level_t; typedef intptr_t libwrc_wevt_map_t; typedef intptr_t libwrc_wevt_opcode_t; typedef intptr_t libwrc_wevt_provider_t; typedef intptr_t libwrc_wevt_task_t; typedef intptr_t libwrc_wevt_template_definition_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBWRC ) */ #endif /* !defined( _LIBWRC_INTERNAL_TYPES_H ) */ libevt-20170120/libwrc/libwrc_string_values.c0000664000175000017500000001711413012271522023211 0ustar00lordyestalordyesta00000000000000/* * String values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_data_descriptor.h" #include "libwrc_definitions.h" #include "libwrc_io_handle.h" #include "libwrc_language_entry.h" #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #include "libwrc_libcnotify.h" #include "libwrc_libfvalue.h" #include "libwrc_string_values.h" /* Reads string values * Returns 1 if successful or -1 on error */ int libwrc_string_values_read( libwrc_language_entry_t *language_entry, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t identifier, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ) { libfvalue_value_t *string_value = NULL; uint8_t *resource_data = NULL; uint8_t *string_resource_data = NULL; static char *function = "libwrc_string_values_read"; off64_t file_offset = 0; size_t resource_data_size = 0; ssize_t read_count = 0; uint32_t string_identifier = 0; uint32_t string_index = 0; uint32_t string_size = 0; int value_index = 0; if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", 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_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data descriptor.", function ); return( -1 ); } file_offset = data_descriptor->virtual_address - io_handle->virtual_address; if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek resource data offset: %" PRIi64 ".", function, file_offset ); goto on_error; } resource_data_size = (size_t) data_descriptor->size; resource_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * resource_data_size ); if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource data.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, resource_data, resource_data_size, error ); if( read_count != (ssize_t) resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource data.", function ); goto on_error; } string_resource_data = resource_data; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: resource data:\n", function ); libcnotify_print_data( string_resource_data, resource_data_size, 0 ); } #endif while( resource_data_size > 0 ) { byte_stream_copy_to_uint16_little_endian( string_resource_data, string_size ); string_resource_data += sizeof( uint16_t ); resource_data_size -= sizeof( uint16_t ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: string: %02" PRIu32 " length\t\t\t\t: %" PRIu32 "\n", function, string_index, string_size ); } #endif if( string_size > 0 ) { string_identifier = ( identifier << 4 ) | string_index; string_size *= 2; if( string_size > resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: string size value out of bound.", function ); goto on_error; } if( libfvalue_value_type_initialize( &string_value, LIBFVALUE_VALUE_TYPE_STRING_UTF16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create string value.", function ); goto on_error; } if( libfvalue_value_set_identifier( string_value, (uint8_t *) &string_identifier, 4, LIBFVALUE_VALUE_IDENTIFIER_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to set identifier of string value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: string: %02" PRIu32 " data:\n", function, string_index ); libcnotify_print_data( string_resource_data, (size_t) string_size, 0 ); } #endif if( libfvalue_value_set_data( string_value, string_resource_data, (size_t) string_size, LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN, 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 of string value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: string: %02" PRIu32 " value\t\t\t\t: ", function, string_index ); if( libfvalue_value_print( string_value, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print string value.", function ); goto on_error; } libcnotify_printf( "\n" ); } #endif string_resource_data += (size_t) string_size; resource_data_size -= (size_t) string_size; if( libwrc_language_entry_append_value( language_entry, &value_index, (intptr_t *) string_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append string value.", function ); goto on_error; } string_value = NULL; } #if defined( HAVE_DEBUG_OUTPUT ) else if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif string_index++; } memory_free( resource_data ); /* TODO validate if number of strings is 16 ? */ return( 1 ); on_error: if( string_value != NULL ) { libfvalue_value_free( &string_value, NULL ); } if( resource_data != NULL ) { memory_free( resource_data ); } return( -1 ); } libevt-20170120/libwrc/libwrc_wevt_task.c0000664000175000017500000000661413012271522022336 0ustar00lordyestalordyesta00000000000000/* * WEVT task functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_definitions.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #include "libwrc_wevt_task.h" /* Creates a task * Make sure the value task is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_wevt_task_initialize( libwrc_wevt_task_t **task, libfwevt_task_t *task_descriptor, libcerror_error_t **error ) { libwrc_internal_wevt_task_t *internal_task = NULL; static char *function = "libwrc_wevt_task_initialize"; if( task == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid task.", function ); return( -1 ); } if( *task != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid task value already set.", function ); return( -1 ); } if( task_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid task descriptor.", function ); return( -1 ); } internal_task = memory_allocate_structure( libwrc_internal_wevt_task_t ); if( internal_task == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create task.", function ); goto on_error; } if( memory_set( internal_task, 0, sizeof( libwrc_internal_wevt_task_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear task.", function ); goto on_error; } internal_task->task_descriptor = task_descriptor; *task = (libwrc_wevt_task_t *) internal_task; return( 1 ); on_error: if( internal_task != NULL ) { memory_free( internal_task ); } return( -1 ); } /* Frees a task * Returns 1 if successful or -1 on error */ int libwrc_wevt_task_free( libwrc_wevt_task_t **task, libcerror_error_t **error ) { libwrc_internal_wevt_task_t *internal_task = NULL; static char *function = "libwrc_wevt_task_free"; if( task == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid task.", function ); return( -1 ); } if( *task != NULL ) { internal_task = (libwrc_internal_wevt_task_t *) *task; *task = NULL; memory_free( internal_task ); } return( 1 ); } libevt-20170120/libwrc/wrc_version_resource.h0000664000175000017500000000253013012271522023232 0ustar00lordyestalordyesta00000000000000/* * The Windows RC version resource * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _WRC_VERSION_RESOURCE_H ) #define _WRC_VERSION_RESOURCE_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct wrc_version_value_header wrc_version_value_header_t; struct wrc_version_value_header { /* The size * Consists of 2 bytes */ uint8_t size[ 2 ]; /* The value data size * Consists of 2 bytes */ uint8_t value_data_size[ 2 ]; /* The value data type * Consists of 2 bytes */ uint8_t value_data_type[ 2 ]; }; #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_version.h0000664000175000017500000000272413012271522022017 0ustar00lordyestalordyesta00000000000000/* * Version (resource) functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_VERSION_H ) #define _LIBWRC_VERSION_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_resource.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBWRC_EXTERN \ int libwrc_version_get_file_version( libwrc_resource_t *resource, uint32_t language_identifier, uint64_t *version, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_version_get_product_version( libwrc_resource_t *resource, uint32_t language_identifier, uint64_t *version, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_extern.h0000664000175000017500000000244313012271522021635 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_EXTERN_H ) #define _LIBWRC_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBWRC for local use of libwrc */ #if !defined( HAVE_LOCAL_LIBWRC ) /* If libtool DLL support is enabled set LIBWRC_DLL_EXPORT * before including libwrc/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBWRC_DLL_EXPORT #endif #include #else #define LIBWRC_EXTERN extern #endif #endif /* !defined( _LIBWRC_INTERNAL_EXTERN_H ) */ libevt-20170120/libwrc/libwrc_wevt_template_values.c0000664000175000017500000001122413012271522024557 0ustar00lordyestalordyesta00000000000000/* * WEVT_TEMPLATE (resource) values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_data_descriptor.h" #include "libwrc_debug.h" #include "libwrc_definitions.h" #include "libwrc_io_handle.h" #include "libwrc_language_entry.h" #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_wevt_template_values.h" /* Reads the event template (resource) values * Returns 1 if successful or -1 on error */ int libwrc_wevt_template_values_read( libwrc_language_entry_t *language_entry, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ) { libfwevt_manifest_t *manifest = NULL; uint8_t *resource_data = NULL; static char *function = "libwrc_wevt_template_values_read"; off64_t file_offset = 0; size_t resource_data_size = 0; ssize_t read_count = 0; int value_index = 0; if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", 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_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data descriptor.", function ); return( -1 ); } if( libfwevt_manifest_initialize( &manifest, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create manifest.", function ); goto on_error; } file_offset = data_descriptor->virtual_address - io_handle->virtual_address; if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek resource data offset: %" PRIi64 ".", function, file_offset ); goto on_error; } resource_data_size = (size_t) data_descriptor->size; resource_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * resource_data_size ); if( resource_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource data.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, resource_data, resource_data_size, error ); if( read_count != (ssize_t) resource_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource data.", function ); goto on_error; } if( libfwevt_manifest_read( manifest, resource_data, resource_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read manifest.", function ); goto on_error; } if( libwrc_language_entry_append_value( language_entry, &value_index, (intptr_t *) manifest, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append manifest.", function ); goto on_error; } manifest = NULL; memory_free( resource_data ); return( 1 ); on_error: if( resource_data != NULL ) { memory_free( resource_data ); } if( manifest != NULL ) { libfwevt_manifest_free( &manifest, NULL ); } return( -1 ); } libevt-20170120/libwrc/libwrc_io_handle.c0000664000175000017500000007332413012271522022253 0ustar00lordyestalordyesta00000000000000/* * Input/Output (IO) handle functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include #include "libwrc_codepage.h" #include "libwrc_data_descriptor.h" #include "libwrc_debug.h" #include "libwrc_definitions.h" #include "libwrc_io_handle.h" #include "libwrc_libbfio.h" #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" #include "libwrc_libcnotify.h" #include "libwrc_libuna.h" #include "libwrc_resource_values.h" #include "libwrc_unused.h" #include "wrc_data_descriptor.h" #include "wrc_resource_node.h" uint8_t libwrc_resource_name_mui[ 6 ] = { 'M', 0, 'U', 0, 'I', 0 }; uint8_t libwrc_resource_name_wevt_template[ 26 ] = { 'W', 0, 'E', 0, 'V', 0, 'T', 0, '_', 0, 'T', 0, 'E', 0, 'M', 0, 'P', 0, 'L', 0, 'A', 0, 'T', 0, 'E', 0 }; /* 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 libwrc_io_handle_initialize( libwrc_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libwrc_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( libwrc_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( libwrc_io_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file.", function ); goto on_error; } ( *io_handle )->ascii_codepage = LIBWRC_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 libwrc_io_handle_free( libwrc_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libwrc_io_handle_free"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( *io_handle != NULL ) { memory_free( *io_handle ); *io_handle = NULL; } return( 1 ); } /* Clears the IO handle * Returns 1 if successful or -1 on error */ int libwrc_io_handle_clear( libwrc_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libwrc_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( libwrc_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 = LIBWRC_CODEPAGE_WINDOWS_1252; return( 1 ); } /* Reads the resource nods * Returns 1 if successful or -1 on error */ int libwrc_io_handle_read_resource_nodes( libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libcdata_tree_node_t **root_node, libcerror_error_t **error ) { static char *function = "libwrc_io_handle_read_resource_nodes"; 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( root_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid root node.", function ); return( -1 ); } if( *root_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: root node already set.", function ); return( -1 ); } if( libbfio_handle_get_size( file_io_handle, &( io_handle->stream_size ), error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to retrieve stream size.", function ); goto on_error; } if( libcdata_tree_node_initialize( 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; } if( libwrc_io_handle_read_resource_node( io_handle, file_io_handle, 0, 1, *root_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read root resource node.", function ); goto on_error; } return( 1 ); on_error: if( *root_node != NULL ) { libcdata_tree_node_free( root_node, (int (*)(intptr_t **, libcerror_error_t **)) &libwrc_resource_values_free, NULL ); } return( -1 ); } /* Reads a resource node * Returns 1 if successful or -1 on error */ int libwrc_io_handle_read_resource_node( libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, off64_t file_offset, int node_level, libcdata_tree_node_t *node, libcerror_error_t **error ) { uint8_t resource_name_size_data[ 2 ]; wrc_resource_node_header_t resource_node_header; libcdata_tree_node_t *sub_node = NULL; libwrc_resource_values_t *resource_values = NULL; libwrc_resource_values_t *sub_resource_values = NULL; uint8_t *resource_node_data = NULL; static char *function = "libwrc_io_handle_read_resource_node"; size_t resource_node_data_offset = 0; size_t resource_node_data_size = 0; ssize_t read_count = 0; uint32_t flags = 0; uint16_t number_of_named_entries = 0; uint16_t number_of_unnamed_entries = 0; int number_of_sub_nodes = 0; int resource_node_entry = 0; int sub_node_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t *value_string = NULL; size_t value_string_size = 0; uint32_t value_32bit = 0; uint16_t value_16bit = 0; int result = 0; #endif if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( node_level < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: node level value out of bounds.", function ); return( -1 ); } if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading resource node header at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, file_offset, file_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek resource node header offset: %" PRIi64 ".", function, file_offset ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, (uint8_t *) &resource_node_header, sizeof( wrc_resource_node_header_t ), error ); if( read_count != (ssize_t) sizeof( wrc_resource_node_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource node header.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: resource node header data:\n", function ); libcnotify_print_data( (uint8_t *) &resource_node_header, sizeof( wrc_resource_node_header_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( resource_node_header.flags, flags ); byte_stream_copy_to_uint16_little_endian( resource_node_header.number_of_named_entries, number_of_named_entries ); byte_stream_copy_to_uint16_little_endian( resource_node_header.number_of_unnamed_entries, number_of_unnamed_entries ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: flags\t\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( resource_node_header.flags, value_32bit ); libcnotify_printf( "%s: creation time\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint16_little_endian( resource_node_header.major_version, value_16bit ); libcnotify_printf( "%s: major version\t\t\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( resource_node_header.minor_version, value_16bit ); libcnotify_printf( "%s: minor version\t\t\t\t: %" PRIu16 "\n", function, value_16bit ); libcnotify_printf( "%s: number of named entries\t\t\t: %" PRIu16 "\n", function, number_of_named_entries ); libcnotify_printf( "%s: number of unnamed entries\t\t\t: %" PRIu16 "\n", function, number_of_unnamed_entries ); libcnotify_printf( "\n" ); } #endif if( flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } resource_node_data_size = ( (size_t) number_of_named_entries + (size_t) number_of_unnamed_entries ) * 8; if( resource_node_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid resource node data size value exceeds maximum.", function ); goto on_error; } resource_node_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * resource_node_data_size ); if( resource_node_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource node data.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, resource_node_data, resource_node_data_size, error ); if( read_count != (ssize_t) resource_node_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource node data.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: resource node data:\n", function ); libcnotify_print_data( resource_node_data, resource_node_data_size, 0 ); } #endif while( ( resource_node_data_offset + 8 ) <= resource_node_data_size ) { if( libwrc_resource_values_initialize( &resource_values, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create resource values: %d.", function, resource_node_entry ); goto on_error; } if( resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid resource values: %d.", function, resource_node_entry ); goto on_error; } byte_stream_copy_to_uint32_little_endian( &( resource_node_data[ resource_node_data_offset ] ), resource_values->identifier ); resource_node_data_offset += 4; byte_stream_copy_to_uint32_little_endian( &( resource_node_data[ resource_node_data_offset ] ), resource_values->offset ); resource_node_data_offset += 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: resource node entry: %03d identifier\t: 0x%08" PRIx32 "", function, resource_node_entry, resource_values->identifier ); if( ( node_level == 1 ) && ( ( resource_values->identifier & LIBWRC_RESOURCE_IDENTIFIER_FLAG_HAS_NAME ) == 0 ) ) { libcnotify_printf( " (%s)", libwrc_debug_get_resource_identifier( resource_values->identifier ) ); } libcnotify_printf( "\n" ); libcnotify_printf( "%s: resource node entry: %03d offset\t\t: 0x%08" PRIx32 "\n", function, resource_node_entry, resource_values->offset ); } #endif if( node_level == 1 ) { if( ( resource_values->identifier & LIBWRC_RESOURCE_IDENTIFIER_FLAG_HAS_NAME ) == 0 ) { switch( resource_values->identifier ) { case LIBWRC_RESOURCE_IDENTIFIER_CURSOR: resource_values->type = LIBWRC_RESOURCE_TYPE_CURSOR; break; case LIBWRC_RESOURCE_IDENTIFIER_BITMAP: resource_values->type = LIBWRC_RESOURCE_TYPE_BITMAP; break; case LIBWRC_RESOURCE_IDENTIFIER_ICON: resource_values->type = LIBWRC_RESOURCE_TYPE_ICON; break; case LIBWRC_RESOURCE_IDENTIFIER_MENU: resource_values->type = LIBWRC_RESOURCE_TYPE_MENU; break; case LIBWRC_RESOURCE_IDENTIFIER_DIALOG: resource_values->type = LIBWRC_RESOURCE_TYPE_DIALOG; break; case LIBWRC_RESOURCE_IDENTIFIER_STRING: resource_values->type = LIBWRC_RESOURCE_TYPE_STRING; break; case LIBWRC_RESOURCE_IDENTIFIER_FONT_DIRECTORY: resource_values->type = LIBWRC_RESOURCE_TYPE_FONT_DIRECTORY; break; case LIBWRC_RESOURCE_IDENTIFIER_FONT: resource_values->type = LIBWRC_RESOURCE_TYPE_FONT; break; case LIBWRC_RESOURCE_IDENTIFIER_ACCELERATOR: resource_values->type = LIBWRC_RESOURCE_TYPE_ACCELERATOR; break; case LIBWRC_RESOURCE_IDENTIFIER_RAW_DATA: resource_values->type = LIBWRC_RESOURCE_TYPE_RAW_DATA; break; case LIBWRC_RESOURCE_IDENTIFIER_MESSAGE_TABLE: resource_values->type = LIBWRC_RESOURCE_TYPE_MESSAGE_TABLE; break; case LIBWRC_RESOURCE_IDENTIFIER_GROUP_CURSOR: resource_values->type = LIBWRC_RESOURCE_TYPE_GROUP_CURSOR; break; case LIBWRC_RESOURCE_IDENTIFIER_GROUP_ICON: resource_values->type = LIBWRC_RESOURCE_TYPE_GROUP_ICON; break; case LIBWRC_RESOURCE_IDENTIFIER_VERSION: resource_values->type = LIBWRC_RESOURCE_TYPE_VERSION; break; case LIBWRC_RESOURCE_IDENTIFIER_DIALOG_INCLUDE: resource_values->type = LIBWRC_RESOURCE_TYPE_DIALOG_INCLUDE; break; case LIBWRC_RESOURCE_IDENTIFIER_PLUG_AND_PLAY: resource_values->type = LIBWRC_RESOURCE_TYPE_PLUG_AND_PLAY; break; case LIBWRC_RESOURCE_IDENTIFIER_VXD: resource_values->type = LIBWRC_RESOURCE_TYPE_VXD; break; case LIBWRC_RESOURCE_IDENTIFIER_ANIMATED_CURSOR: resource_values->type = LIBWRC_RESOURCE_TYPE_ANIMATED_CURSOR; break; case LIBWRC_RESOURCE_IDENTIFIER_ANIMATED_ICON: resource_values->type = LIBWRC_RESOURCE_TYPE_ANIMATED_ICON; break; case LIBWRC_RESOURCE_IDENTIFIER_HTML: resource_values->type = LIBWRC_RESOURCE_TYPE_HTML; break; case LIBWRC_RESOURCE_IDENTIFIER_MANIFEST: resource_values->type = LIBWRC_RESOURCE_TYPE_MANIFEST; break; } } else { if( libbfio_handle_seek_offset( file_io_handle, (off64_t) ( resource_values->identifier & 0x7fffffffUL ), SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek resource name string offset: %" PRIi64 ".", function, file_offset ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, resource_name_size_data, 2, error ); if( read_count != (ssize_t) 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource name string size.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( resource_name_size_data, resource_values->name_string_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: resource node entry: %03d name string size\t: %" PRIzd "\n", function, resource_node_entry, resource_values->name_string_size ); } #endif resource_values->name_string_size *= 2; if( ( resource_values->name_string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * resource_values->name_string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid name string size value exceeds maximum.", function ); goto on_error; } resource_values->name_string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * resource_values->name_string_size ); if( resource_values->name_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource node name string.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, resource_values->name_string, resource_values->name_string_size, error ); if( read_count != (ssize_t) resource_values->name_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read resource node name string.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( resource_values->name_string, resource_values->name_string_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( resource_values->name_string, resource_values->name_string_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 data string.", function ); goto on_error; } if( ( value_string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * value_string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data string size value exceeds maximum.", 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 data string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, resource_values->name_string, resource_values->name_string_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, resource_values->name_string, resource_values->name_string_size, LIBUNA_ENDIAN_LITTLE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data string.", function ); goto on_error; } libcnotify_printf( "%s: resource node entry: %03d name string\t: %" PRIs_SYSTEM "\n", function, resource_node_entry, value_string ); memory_free( value_string ); value_string = NULL; } #endif } if( resource_values->name_string_size == 6 ) { if( memory_compare( resource_values->name_string, libwrc_resource_name_mui, 6 ) == 0 ) { resource_values->type = LIBWRC_RESOURCE_TYPE_MUI; } } else if( resource_values->name_string_size == 26 ) { if( memory_compare( resource_values->name_string, libwrc_resource_name_wevt_template, 26 ) == 0 ) { resource_values->type = LIBWRC_RESOURCE_TYPE_WEVT_TEMPLATE; } } } if( libcdata_tree_node_insert_value( node, (intptr_t *) resource_values, (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libwrc_resource_values_compare, LIBCDATA_INSERT_FLAG_NON_UNIQUE_ENTRIES, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert resource node: %d.", function, resource_node_entry ); goto on_error; } resource_values = NULL; resource_node_entry++; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif } memory_free( resource_node_data ); resource_node_data = NULL; if( libcdata_tree_node_get_number_of_sub_nodes( node, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to retrieve number of sub nodes.", function ); goto on_error; } if( libcdata_tree_node_get_sub_node_by_index( node, 0, &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 ); goto on_error; } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libcdata_tree_node_get_value( sub_node, (intptr_t **) &sub_resource_values, 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, sub_node_index ); goto on_error; } if( sub_resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub resource values: %d.", function, sub_node_index ); goto on_error; } if( ( sub_resource_values->offset & 0x80000000UL ) != 0 ) { if( libwrc_io_handle_read_resource_node( io_handle, file_io_handle, (off64_t) ( sub_resource_values->offset & 0x7fffffffUL ), node_level + 1, sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub resource node: %d at offset: 0x%08" PRIx32 ".", function, sub_node_index, sub_resource_values->offset ); goto on_error; } } else { if( libwrc_data_descriptor_initialize( &( sub_resource_values->data_descriptor ), error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data descriptor: %d.", function, sub_node_index ); goto on_error; } if( libwrc_io_handle_read_data_descriptor( io_handle, file_io_handle, (off64_t) sub_resource_values->offset, sub_resource_values->data_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data descriptor: %d at offset: 0x%08" PRIx32 ".", function, sub_node_index, sub_resource_values->offset ); 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; } } return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( value_string != NULL ) { memory_free( value_string ); } #endif if( resource_values != NULL ) { libwrc_resource_values_free( &resource_values, NULL ); } if( resource_node_data != NULL ) { memory_free( resource_node_data ); } return( -1 ); } /* Reads a data descriptor * Returns 1 if successful or -1 on error */ int libwrc_io_handle_read_data_descriptor( libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, off64_t file_offset, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ) { wrc_data_descriptor_t data_descriptor_data; static char *function = "libwrc_io_handle_read_data_descriptor"; ssize_t read_count = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( data_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data descriptor.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading data descriptor at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, file_offset, file_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek data descriptor offset: %" PRIi64 ".", function, file_offset ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, (uint8_t *) &data_descriptor_data, sizeof( wrc_data_descriptor_t ), error ); if( read_count != (ssize_t) sizeof( wrc_data_descriptor_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data descriptor.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data descriptor data:\n", function ); libcnotify_print_data( (uint8_t *) &data_descriptor_data, sizeof( wrc_data_descriptor_t ), 0 ); } #endif byte_stream_copy_to_uint32_little_endian( data_descriptor_data.virtual_address, data_descriptor->virtual_address ); byte_stream_copy_to_uint32_little_endian( data_descriptor_data.size, data_descriptor->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: virtual address\t\t\t: 0x%08" PRIx32 "\n", function, data_descriptor->virtual_address ); libcnotify_printf( "%s: size\t\t\t\t: %" PRIu32 "\n", function, data_descriptor->size ); libcnotify_printf( "\n" ); } #endif if( ( data_descriptor->virtual_address < io_handle->virtual_address ) || ( (size64_t) data_descriptor->virtual_address >= ( io_handle->virtual_address + io_handle->stream_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: virtual address out of bounds.", function ); return( -1 ); } if( (size64_t) ( data_descriptor->virtual_address + data_descriptor->size ) > ( io_handle->virtual_address + io_handle->stream_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: size out of bounds.", function ); return( -1 ); } return( 1 ); } libevt-20170120/libwrc/Makefile.in0000664000175000017500000011656713040342660020702 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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 = libwrc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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) libwrc_la_LIBADD = am__libwrc_la_SOURCES_DIST = libwrc_codepage.h \ libwrc_data_descriptor.c libwrc_data_descriptor.h \ libwrc_debug.c libwrc_debug.h libwrc_definitions.h \ libwrc_error.c libwrc_error.h libwrc_extern.h \ libwrc_io_handle.c libwrc_io_handle.h libwrc_language_entry.c \ libwrc_language_entry.h libwrc_language_table.c \ libwrc_language_table.h libwrc_libbfio.h libwrc_libcdata.h \ libwrc_libcerror.h libwrc_libclocale.h libwrc_libcnotify.h \ libwrc_libfcache.h libwrc_libfdata.h libwrc_libfguid.h \ libwrc_libfvalue.h libwrc_libfwevt.h libwrc_libfwnt.h \ libwrc_libuna.h libwrc_manifest.c libwrc_manifest.h \ libwrc_manifest_values.c libwrc_manifest_values.h \ libwrc_message_table.c libwrc_message_table.h \ libwrc_message_table_values.c libwrc_message_table_values.h \ libwrc_mui.c libwrc_mui.h libwrc_mui_values.c \ libwrc_mui_values.h libwrc_notify.c libwrc_notify.h \ libwrc_resource.c libwrc_resource.h libwrc_resource_values.c \ libwrc_resource_values.h libwrc_stream.c libwrc_stream.h \ libwrc_support.c libwrc_support.h libwrc_string.c \ libwrc_string.h libwrc_string_values.c libwrc_string_values.h \ libwrc_types.h libwrc_unused.h libwrc_version.c \ libwrc_version.h libwrc_version_values.c \ libwrc_version_values.h libwrc_wevt_channel.c \ libwrc_wevt_channel.h libwrc_wevt_event.c libwrc_wevt_event.h \ libwrc_wevt_keyword.c libwrc_wevt_keyword.h \ libwrc_wevt_level.c libwrc_wevt_level.h libwrc_wevt_map.c \ libwrc_wevt_map.h libwrc_wevt_opcode.c libwrc_wevt_opcode.h \ libwrc_wevt_provider.c libwrc_wevt_provider.h \ libwrc_wevt_task.c libwrc_wevt_task.h libwrc_wevt_template.c \ libwrc_wevt_template.h libwrc_wevt_template_definition.c \ libwrc_wevt_template_definition.h \ libwrc_wevt_template_values.c libwrc_wevt_template_values.h \ wrc_data_descriptor.h wrc_message_table_resource.h \ wrc_mui_resource.h wrc_resource_node.h wrc_version_resource.h @HAVE_LOCAL_LIBWRC_TRUE@am_libwrc_la_OBJECTS = \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_data_descriptor.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_debug.lo libwrc_error.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_io_handle.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_language_entry.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_language_table.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_manifest.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_manifest_values.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_message_table.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_message_table_values.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_mui.lo libwrc_mui_values.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_notify.lo libwrc_resource.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_resource_values.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_stream.lo libwrc_support.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_string.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_string_values.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_version.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_version_values.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_channel.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_event.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_keyword.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_level.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_map.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_opcode.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_provider.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_task.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_template.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_template_definition.lo \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_template_values.lo libwrc_la_OBJECTS = $(am_libwrc_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_LIBWRC_TRUE@am_libwrc_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__depfiles_maybe = depfiles 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 = $(libwrc_la_SOURCES) DIST_SOURCES = $(am__libwrc_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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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_LIBWRC_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBWRC_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBWRC_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBCSPLIT_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBCFILE_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBCPATH_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBBFIO_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBFCACHE_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBFDATA_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBFDATETIME_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBFGUID_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBFVALUE_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBFWEVT_CPPFLAGS@ \ @HAVE_LOCAL_LIBWRC_TRUE@ @LIBFWNT_CPPFLAGS@ @HAVE_LOCAL_LIBWRC_TRUE@noinst_LTLIBRARIES = libwrc.la @HAVE_LOCAL_LIBWRC_TRUE@libwrc_la_SOURCES = \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_codepage.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_data_descriptor.c libwrc_data_descriptor.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_debug.c libwrc_debug.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_definitions.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_error.c libwrc_error.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_extern.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_io_handle.c libwrc_io_handle.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_language_entry.c libwrc_language_entry.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_language_table.c libwrc_language_table.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_libbfio.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_libcdata.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_libcerror.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_libclocale.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_libcnotify.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_libfcache.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_libfdata.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_libfguid.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_libfvalue.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_libfwevt.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_libfwnt.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_libuna.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_manifest.c libwrc_manifest.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_manifest_values.c libwrc_manifest_values.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_message_table.c libwrc_message_table.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_message_table_values.c libwrc_message_table_values.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_mui.c libwrc_mui.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_mui_values.c libwrc_mui_values.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_notify.c libwrc_notify.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_resource.c libwrc_resource.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_resource_values.c libwrc_resource_values.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_stream.c libwrc_stream.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_support.c libwrc_support.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_string.c libwrc_string.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_string_values.c libwrc_string_values.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_types.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_unused.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_version.c libwrc_version.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_version_values.c libwrc_version_values.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_channel.c libwrc_wevt_channel.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_event.c libwrc_wevt_event.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_keyword.c libwrc_wevt_keyword.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_level.c libwrc_wevt_level.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_map.c libwrc_wevt_map.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_opcode.c libwrc_wevt_opcode.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_provider.c libwrc_wevt_provider.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_task.c libwrc_wevt_task.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_template.c libwrc_wevt_template.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_template_definition.c libwrc_wevt_template_definition.h \ @HAVE_LOCAL_LIBWRC_TRUE@ libwrc_wevt_template_values.c libwrc_wevt_template_values.h \ @HAVE_LOCAL_LIBWRC_TRUE@ wrc_data_descriptor.h \ @HAVE_LOCAL_LIBWRC_TRUE@ wrc_message_table_resource.h \ @HAVE_LOCAL_LIBWRC_TRUE@ wrc_mui_resource.h \ @HAVE_LOCAL_LIBWRC_TRUE@ wrc_resource_node.h \ @HAVE_LOCAL_LIBWRC_TRUE@ wrc_version_resource.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libwrc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libwrc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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}; \ } libwrc.la: $(libwrc_la_OBJECTS) $(libwrc_la_DEPENDENCIES) $(EXTRA_libwrc_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libwrc_la_rpath) $(libwrc_la_OBJECTS) $(libwrc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_data_descriptor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_io_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_language_entry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_language_table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_manifest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_manifest_values.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_message_table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_message_table_values.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_mui.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_mui_values.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_notify.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_resource.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_resource_values.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_string_values.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_version.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_version_values.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_wevt_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_wevt_event.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_wevt_keyword.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_wevt_level.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_wevt_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_wevt_opcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_wevt_provider.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_wevt_task.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_wevt_template.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_wevt_template_definition.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwrc_wevt_template_values.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libwrc ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libwrc_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: libevt-20170120/libwrc/libwrc_string_values.h0000664000175000017500000000264213012271522023216 0ustar00lordyestalordyesta00000000000000/* * String values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_STRING_VALUES_H ) #define _LIBWRC_STRING_VALUES_H #include #include #include "libwrc_data_descriptor.h" #include "libwrc_io_handle.h" #include "libwrc_language_entry.h" #include "libwrc_libcerror.h" #include "libwrc_libbfio.h" #if defined( __cplusplus ) extern "C" { #endif int libwrc_string_values_read( libwrc_language_entry_t *language_entry, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t identifier, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_resource_values.c0000664000175000017500000001412213012271522023526 0ustar00lordyestalordyesta00000000000000/* * Resource values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_data_descriptor.h" #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" #include "libwrc_resource_values.h" /* Creates resource values * Make sure the value resource_values is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_resource_values_initialize( libwrc_resource_values_t **resource_values, libcerror_error_t **error ) { static char *function = "libwrc_resource_values_initialize"; if( resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource values.", function ); return( -1 ); } if( *resource_values != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid resource values value already set.", function ); return( -1 ); } *resource_values = memory_allocate_structure( libwrc_resource_values_t ); if( *resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource values.", function ); goto on_error; } if( memory_set( *resource_values, 0, sizeof( libwrc_resource_values_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear resource values.", function ); goto on_error; } return( 1 ); on_error: if( *resource_values != NULL ) { memory_free( *resource_values ); *resource_values = NULL; } return( -1 ); } /* Frees resource values * Returns 1 if successful or -1 on error */ int libwrc_resource_values_free( libwrc_resource_values_t **resource_values, libcerror_error_t **error ) { static char *function = "libwrc_resource_values_free"; int result = 1; if( resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource values.", function ); return( -1 ); } if( *resource_values != NULL ) { if( libwrc_data_descriptor_free( &( ( *resource_values )->data_descriptor ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data descriptor.", function ); result = -1; } if( ( *resource_values )->name_string != NULL ) { memory_free( ( *resource_values )->name_string ); } memory_free( *resource_values ); *resource_values = NULL; } return( result ); } /* Compares two resource values * Returns LIBCDATA_COMPARE_LESS, LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error */ int libwrc_resource_values_compare( libwrc_resource_values_t *first_resource_values, libwrc_resource_values_t *second_resource_values, libcerror_error_t **error ) { static char *function = "libwrc_resource_values_compare"; if( first_resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first resource values.", function ); return( -1 ); } if( second_resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid second resource values.", function ); return( -1 ); } if( first_resource_values->identifier < second_resource_values->identifier ) { return( LIBCDATA_COMPARE_LESS ); } else if( first_resource_values->identifier > second_resource_values->identifier ) { return( LIBCDATA_COMPARE_GREATER ); } return( LIBCDATA_COMPARE_EQUAL ); } /* Retrieves the identifier * Returns 1 if successful or -1 on error */ int libwrc_resource_values_get_identifier( libwrc_resource_values_t *resource_values, uint32_t *identifier, libcerror_error_t **error ) { static char *function = "libwrc_resource_values_get_identifier"; if( resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource values.", 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 = resource_values->identifier; return( 1 ); } /* Retrieves the type * Returns 1 if successful or -1 on error */ int libwrc_resource_values_get_type( libwrc_resource_values_t *resource_values, int *type, libcerror_error_t **error ) { static char *function = "libwrc_resource_values_get_type"; if( resource_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource values.", 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 = resource_values->type; return( 1 ); } libevt-20170120/libwrc/libwrc_manifest.c0000664000175000017500000001324413012271522022132 0ustar00lordyestalordyesta00000000000000/* * Manifest (resource) functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libwrc_definitions.h" #include "libwrc_language_entry.h" #include "libwrc_language_table.h" #include "libwrc_libcerror.h" #include "libwrc_libfvalue.h" #include "libwrc_manifest.h" #include "libwrc_resource.h" #include "libwrc_resource_values.h" /* Retrieves the size of a specific UTF-8 formatted string * Returns 1 if successful or -1 on error */ int libwrc_manifest_get_utf8_string_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libcerror_error_t **error ) { libfvalue_value_t *manifest_values = NULL; static char *function = "libwrc_manifest_get_utf8_string_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MANIFEST, language_identifier, 0, (intptr_t **) &manifest_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve manifest values.", function ); return( -1 ); } if( libfvalue_value_get_utf8_string_size( manifest_values, 0, 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 of manifest value.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific UTF-8 formatted string * Returns 1 if successful or -1 on error */ int libwrc_manifest_get_utf8_string( libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libfvalue_value_t *manifest_values = NULL; static char *function = "libwrc_manifest_get_utf8_string"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MANIFEST, language_identifier, 0, (intptr_t **) &manifest_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve manifest values.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf8_string( manifest_values, 0, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy manifest value to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of a specific UTF-16 formatted string * Returns 1 if successful or -1 on error */ int libwrc_manifest_get_utf16_string_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libcerror_error_t **error ) { libfvalue_value_t *manifest_values = NULL; static char *function = "libwrc_manifest_get_utf16_string_size"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MANIFEST, language_identifier, 0, (intptr_t **) &manifest_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve manifest values.", function ); return( -1 ); } if( libfvalue_value_get_utf16_string_size( manifest_values, 0, 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 of manifest value.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific UTF-16 formatted string * Returns 1 if successful or -1 on error */ int libwrc_manifest_get_utf16_string( libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libfvalue_value_t *manifest_values = NULL; static char *function = "libwrc_manifest_get_utf16_string"; if( libwrc_resource_get_value_by_language_identifier( resource, LIBWRC_RESOURCE_TYPE_MANIFEST, language_identifier, 0, (intptr_t **) &manifest_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve manifest values.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf16_string( manifest_values, 0, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy manifest value to UTF-16 string.", function ); return( -1 ); } return( 1 ); } libevt-20170120/libwrc/libwrc_language_table.c0000664000175000017500000002454613012271522023265 0ustar00lordyestalordyesta00000000000000/* * Language table functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_language_entry.h" #include "libwrc_language_table.h" #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" /* Creates a language table * Make sure the value language_table is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_language_table_initialize( libwrc_language_table_t **language_table, libcerror_error_t **error ) { static char *function = "libwrc_language_table_initialize"; if( language_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language table.", function ); return( -1 ); } if( *language_table != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid language table value already set.", function ); return( -1 ); } *language_table = memory_allocate_structure( libwrc_language_table_t ); if( *language_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create language table.", function ); goto on_error; } if( memory_set( *language_table, 0, sizeof( libwrc_language_table_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear language table.", function ); memory_free( *language_table ); *language_table = NULL; return( -1 ); } if( libcdata_array_initialize( &( ( *language_table )->entries_array ), 0, 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; } return( 1 ); on_error: if( *language_table != NULL ) { memory_free( *language_table ); *language_table = NULL; } return( -1 ); } /* Frees a language table * Returns 1 if successful or -1 on error */ int libwrc_language_table_free( libwrc_language_table_t **language_table, libcerror_error_t **error ) { static char *function = "libwrc_language_table_free"; int result = 1; if( language_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language table.", function ); return( -1 ); } if( *language_table != NULL ) { if( libcdata_array_free( &( ( *language_table )->entries_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libwrc_language_entry_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( *language_table ); *language_table = NULL; } return( result ); } /* Retrieves the number of entries * Returns 1 if successful or -1 on error */ int libwrc_language_table_get_number_of_entries( libwrc_language_table_t *language_table, int *number_of_entries, libcerror_error_t **error ) { static char *function = "libwrc_language_table_get_number_of_entries"; if( language_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language table.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( language_table->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.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific language identifier * Returns 1 if successful or -1 on error */ int libwrc_language_table_get_identifier( libwrc_language_table_t *language_table, int entry_index, uint32_t *language_identifier, libcerror_error_t **error ) { libwrc_language_entry_t *language_entry = NULL; static char *function = "libwrc_language_table_get_identifier"; if( language_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language table.", function ); return( -1 ); } if( language_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language identifier.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( language_table->entries_array, entry_index, (intptr_t **) &language_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve language entry: %d.", function, entry_index ); return( -1 ); } if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing language entry: %d.", function, entry_index ); return( -1 ); } *language_identifier = language_entry->language_identifier; return( 1 ); } /* Retrieves the entry for a specific language identifier * Returns 1 if successful, 0 if no such language or -1 on error */ int libwrc_language_table_get_entry_by_identifier( libwrc_language_table_t *language_table, uint32_t language_identifier, libwrc_language_entry_t **language_entry, libcerror_error_t **error ) { static char *function = "libwrc_language_table_get_entry_by_identifier"; int entry_index = 0; int number_of_entries = 0; if( language_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language table.", function ); return( -1 ); } if( language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language entry.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( language_table->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.", function ); return( -1 ); } for( entry_index = 0; entry_index < number_of_entries; entry_index++ ) { if( libcdata_array_get_entry_by_index( language_table->entries_array, entry_index, (intptr_t **) language_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve language entry: %d.", function, entry_index ); return( -1 ); } if( *language_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing language entry: %d.", function, entry_index ); return( -1 ); } if( ( *language_entry )->language_identifier == language_identifier ) { return( 1 ); } } *language_entry = NULL; return( 0 ); } /* Appends a language entry * Returns 1 if successful or -1 on error */ int libwrc_language_table_append_entry( libwrc_language_table_t *language_table, int *entry_index, libwrc_language_entry_t *language_entry, libcerror_error_t **error ) { static char *function = "libwrc_language_table_append_entry"; if( language_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language table.", function ); return( -1 ); } if( libcdata_array_append_entry( language_table->entries_array, entry_index, (intptr_t *) language_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append entry.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of values for a specific language identifier * Returns 1 if successful or -1 on error */ int libwrc_language_table_get_number_of_values( libwrc_language_table_t *language_table, uint32_t language_identifier, int *number_of_values, libcerror_error_t **error ) { libwrc_language_entry_t *language_entry = NULL; static char *function = "libwrc_language_table_get_number_of_values"; if( language_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language table.", function ); return( -1 ); } if( libwrc_language_table_get_entry_by_identifier( language_table, language_identifier, &language_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve language entry for identifier: 0x%08" PRIx32 ".", function, language_identifier ); return( -1 ); } if( libwrc_language_entry_get_number_of_values( language_entry, number_of_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of values.", function ); return( -1 ); } return( 1 ); } libevt-20170120/libwrc/libwrc_libcnotify.h0000664000175000017500000000265513012271522022477 0ustar00lordyestalordyesta00000000000000/* * The internal libcnotify header * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LIBCNOTIFY_H ) #define _LIBWRC_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( _LIBWRC_LIBCNOTIFY_H ) */ libevt-20170120/libwrc/wrc_message_table_resource.h0000664000175000017500000000324113012271522024340 0ustar00lordyestalordyesta00000000000000/* * The Windows RC message table resource * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _WRC_MESSAGE_TABLE_RESOURCE_H ) #define _WRC_MESSAGE_TABLE_RESOURCE_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct wrc_message_table_entry_descriptor wrc_message_table_entry_descriptor_t; struct wrc_message_table_entry_descriptor { /* The first (message) identifier * Consists of 4 bytes */ uint8_t first_identifier[ 4 ]; /* The last (message) identifier * Consists of 4 bytes */ uint8_t last_identifier[ 4 ]; /* The offset of the first message * Consists of 4 bytes */ uint8_t offset[ 4 ]; }; typedef struct wrc_message_table_string wrc_message_table_string_t; struct wrc_message_table_string { /* The size * Consists of 2 bytes */ uint8_t size[ 2 ]; /* The flags * Consists of 2 bytes */ uint8_t flags[ 2 ]; }; #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_resource.h0000664000175000017500000000666013012271522022164 0ustar00lordyestalordyesta00000000000000/* * Resource functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_RESOURCE_H ) #define _LIBWRC_INTERNAL_RESOURCE_H #include #include #include "libwrc_extern.h" #include "libwrc_io_handle.h" #include "libwrc_libbfio.h" #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" #include "libwrc_resource_values.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_internal_resource libwrc_internal_resource_t; struct libwrc_internal_resource { /* The IO handle */ libwrc_io_handle_t *io_handle; /* The file IO handle */ libbfio_handle_t *file_io_handle; /* The resource node */ libcdata_tree_node_t *resource_node; /* The resource values */ libwrc_resource_values_t *resource_values; /* The resource value */ intptr_t *value; /* The resource free value function */ int (*free_value)( intptr_t **value, libcerror_error_t **error ); /* The flags */ uint8_t flags; }; int libwrc_resource_initialize( libwrc_resource_t **resource, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libcdata_tree_node_t *resource_node, uint8_t flags, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_resource_free( libwrc_resource_t **resource, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_resource_get_identifier( libwrc_resource_t *resource, uint32_t *identifier, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_resource_get_type( libwrc_resource_t *resource, int *type, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_resource_read( libwrc_resource_t *resource, libcerror_error_t **error ); int libwrc_resource_read_value( libwrc_internal_resource_t *internal_resource, libcerror_error_t **error ); int libwrc_resource_read_data_descriptor( libwrc_internal_resource_t *internal_resource, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_resource_get_number_of_languages( libwrc_resource_t *resource, int *number_of_languages, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_resource_get_language_identifier( libwrc_resource_t *resource, int language_index, uint32_t *language_identifier, libcerror_error_t **error ); int libwrc_resource_get_value_by_language_identifier( libwrc_resource_t *resource, int resource_type, uint32_t language_identifier, int value_index, intptr_t **value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_language_entry.h0000664000175000017500000000442313012271522023334 0ustar00lordyestalordyesta00000000000000/* * Language (table) entry functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LANGUAGE_ENTRY_H ) #define _LIBWRC_LANGUAGE_ENTRY_H #include #include #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_language_entry libwrc_language_entry_t; struct libwrc_language_entry { /* The language identifier */ uint32_t language_identifier; /* The values array */ libcdata_array_t *values_array; /* The language entry value free function */ int (*value_free_function)( intptr_t **value, libcerror_error_t **error ); }; int libwrc_language_entry_initialize( libwrc_language_entry_t **language_entry, uint32_t language_identifier, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libwrc_language_entry_free( libwrc_language_entry_t **language_entry, libcerror_error_t **error ); int libwrc_language_entry_get_number_of_values( libwrc_language_entry_t *language_entry, int *number_of_values, libcerror_error_t **error ); int libwrc_language_entry_get_value_by_index( libwrc_language_entry_t *language_entry, int value_index, intptr_t **value, libcerror_error_t **error ); int libwrc_language_entry_append_value( libwrc_language_entry_t *language_entry, int *value_index, intptr_t *value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_wevt_template.h0000664000175000017500000000350613012271522023211 0ustar00lordyestalordyesta00000000000000/* * WEVT_TEMPLATE (resource) functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_WEVT_TEMPLATE_H ) #define _LIBWRC_WEVT_TEMPLATE_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_resource.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBWRC_EXTERN \ int libwrc_wevt_template_get_number_of_providers( libwrc_resource_t *resource, uint32_t language_identifier, int *number_of_providers, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_template_get_provider( libwrc_resource_t *resource, uint32_t language_identifier, int provider_index, libwrc_wevt_provider_t **provider, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_template_get_provider_by_identifier( libwrc_resource_t *resource, uint32_t language_identifier, const uint8_t *provider_identifier, size_t provider_identifier_size, libwrc_wevt_provider_t **provider, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_support.h0000664000175000017500000000273513012271522022050 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_SUPPORT_H ) #define _LIBWRC_SUPPORT_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBWRC ) LIBWRC_EXTERN \ const char *libwrc_get_version( void ); LIBWRC_EXTERN \ int libwrc_get_access_flags_read( void ); LIBWRC_EXTERN \ int libwrc_get_codepage( int *codepage, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_set_codepage( int codepage, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBWRC ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBWRC_SUPPORT_H ) */ libevt-20170120/libwrc/libwrc_wevt_level.c0000664000175000017500000000670113012271522022500 0ustar00lordyestalordyesta00000000000000/* * WEVT level functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_definitions.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #include "libwrc_wevt_level.h" /* Creates a level * Make sure the value level is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_wevt_level_initialize( libwrc_wevt_level_t **level, libfwevt_level_t *level_descriptor, libcerror_error_t **error ) { libwrc_internal_wevt_level_t *internal_level = NULL; static char *function = "libwrc_wevt_level_initialize"; if( level == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid level.", function ); return( -1 ); } if( *level != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid level value already set.", function ); return( -1 ); } if( level_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid level descriptor.", function ); return( -1 ); } internal_level = memory_allocate_structure( libwrc_internal_wevt_level_t ); if( internal_level == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create level.", function ); goto on_error; } if( memory_set( internal_level, 0, sizeof( libwrc_internal_wevt_level_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear level.", function ); goto on_error; } internal_level->level_descriptor = level_descriptor; *level = (libwrc_wevt_level_t *) internal_level; return( 1 ); on_error: if( internal_level != NULL ) { memory_free( internal_level ); } return( -1 ); } /* Frees a level * Returns 1 if successful or -1 on error */ int libwrc_wevt_level_free( libwrc_wevt_level_t **level, libcerror_error_t **error ) { libwrc_internal_wevt_level_t *internal_level = NULL; static char *function = "libwrc_wevt_level_free"; if( level == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid level.", function ); return( -1 ); } if( *level != NULL ) { internal_level = (libwrc_internal_wevt_level_t *) *level; *level = NULL; memory_free( internal_level ); } return( 1 ); } libevt-20170120/libwrc/libwrc_wevt_map.c0000664000175000017500000000653313012271522022151 0ustar00lordyestalordyesta00000000000000/* * WEVT map functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_definitions.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #include "libwrc_wevt_map.h" /* Creates a map * Make sure the value map is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_wevt_map_initialize( libwrc_wevt_map_t **map, libfwevt_map_t *map_descriptor, libcerror_error_t **error ) { libwrc_internal_wevt_map_t *internal_map = NULL; static char *function = "libwrc_wevt_map_initialize"; if( map == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid map.", function ); return( -1 ); } if( *map != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid map value already set.", function ); return( -1 ); } if( map_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid map descriptor.", function ); return( -1 ); } internal_map = memory_allocate_structure( libwrc_internal_wevt_map_t ); if( internal_map == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create map.", function ); goto on_error; } if( memory_set( internal_map, 0, sizeof( libwrc_internal_wevt_map_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear map.", function ); goto on_error; } internal_map->map_descriptor = map_descriptor; *map = (libwrc_wevt_map_t *) internal_map; return( 1 ); on_error: if( internal_map != NULL ) { memory_free( internal_map ); } return( -1 ); } /* Frees a map * Returns 1 if successful or -1 on error */ int libwrc_wevt_map_free( libwrc_wevt_map_t **map, libcerror_error_t **error ) { libwrc_internal_wevt_map_t *internal_map = NULL; static char *function = "libwrc_wevt_map_free"; if( map == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid map.", function ); return( -1 ); } if( *map != NULL ) { internal_map = (libwrc_internal_wevt_map_t *) *map; *map = NULL; memory_free( internal_map ); } return( 1 ); } libevt-20170120/libwrc/libwrc_libbfio.h0000664000175000017500000000324313012271522021735 0ustar00lordyestalordyesta00000000000000/* * The libbfio header wrapper * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LIBBFIO_H ) #define _LIBWRC_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( _LIBWRC_LIBBFIO_H ) */ libevt-20170120/libwrc/libwrc_string.h0000664000175000017500000000513113012271522021633 0ustar00lordyestalordyesta00000000000000/* * String (resource) functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_STRING_H ) #define _LIBWRC_STRING_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_resource.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBWRC_EXTERN \ int libwrc_string_get_number_of_strings( libwrc_resource_t *resource, uint32_t language_identifier, int *number_of_strings, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_string_get_identifier( libwrc_resource_t *resource, uint32_t language_identifier, int string_index, uint32_t *string_identifier, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_string_get_index_by_identifier( libwrc_resource_t *resource, uint32_t language_identifier, uint32_t string_identifier, int *string_index, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_string_get_utf8_string_size( libwrc_resource_t *resource, uint32_t language_identifier, int string_index, size_t *utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_string_get_utf8_string( libwrc_resource_t *resource, uint32_t language_identifier, int string_index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_string_get_utf16_string_size( libwrc_resource_t *resource, uint32_t language_identifier, int string_index, size_t *utf16_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_string_get_utf16_string( libwrc_resource_t *resource, uint32_t language_identifier, int string_index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_debug.h0000664000175000017500000000243113012271522021413 0ustar00lordyestalordyesta00000000000000/* * Debug functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_DEBUG_H ) #define _LIBWRC_DEBUG_H #include #include #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) const char *libwrc_debug_get_resource_identifier( uint32_t resource_identifier ); int libwrc_debug_print_read_offsets( libbfio_handle_t *file_io_handle, libcerror_error_t **error ); #endif #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_libfwevt.h0000664000175000017500000000322413012271522022150 0ustar00lordyestalordyesta00000000000000/* * The libfwevt header wrapper * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LIBFWEVT_H ) #define _LIBWRC_LIBFWEVT_H #include /* Define HAVE_LOCAL_LIBFWEVT for local use of libfwevt */ #if defined( HAVE_LOCAL_LIBFWEVT ) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBFWEVT_DLL_IMPORT * before including libfwevt.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFWEVT_DLL_IMPORT #endif #include #endif #endif libevt-20170120/libwrc/wrc_data_descriptor.h0000664000175000017500000000237713012271522023016 0ustar00lordyestalordyesta00000000000000/* * The Windows RC data descriptor * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _WRC_DATA_DESCRIPTOR_H ) #define _WRC_DATA_DESCRIPTOR_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct wrc_data_descriptor wrc_data_descriptor_t; struct wrc_data_descriptor { /* The (data) virtual address * Consists of 4 bytes */ uint8_t virtual_address[ 4 ]; /* The (data) size * Consists of 4 bytes */ uint8_t size[ 4 ]; }; #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_wevt_template_definition.c0000664000175000017500000002065313012271522025416 0ustar00lordyestalordyesta00000000000000/* * WEVT template definition functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_definitions.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #include "libwrc_wevt_template_definition.h" /* Creates a template definition * Make sure the value template_definition is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_wevt_template_definition_initialize( libwrc_wevt_template_definition_t **template_definition, libfwevt_template_t *template_descriptor, libcerror_error_t **error ) { libwrc_internal_wevt_template_definition_t *internal_template_definition = NULL; static char *function = "libwrc_wevt_template_definition_initialize"; if( template_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template definition.", function ); return( -1 ); } if( *template_definition != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid template definition value already set.", function ); return( -1 ); } if( template_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template descriptor.", function ); return( -1 ); } internal_template_definition = memory_allocate_structure( libwrc_internal_wevt_template_definition_t ); if( internal_template_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create template definition.", function ); goto on_error; } if( memory_set( internal_template_definition, 0, sizeof( libwrc_internal_wevt_template_definition_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear template definition.", function ); goto on_error; } internal_template_definition->template_descriptor = template_descriptor; *template_definition = (libwrc_wevt_template_definition_t *) internal_template_definition; return( 1 ); on_error: if( internal_template_definition != NULL ) { memory_free( internal_template_definition ); } return( -1 ); } /* Frees a template definition * Returns 1 if successful or -1 on error */ int libwrc_wevt_template_definition_free( libwrc_wevt_template_definition_t **template_definition, libcerror_error_t **error ) { libwrc_internal_wevt_template_definition_t *internal_template_definition = NULL; static char *function = "libwrc_wevt_template_definition_free"; if( template_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template definition.", function ); return( -1 ); } if( *template_definition != NULL ) { internal_template_definition = (libwrc_internal_wevt_template_definition_t *) *template_definition; *template_definition = NULL; memory_free( internal_template_definition ); } return( 1 ); } /* Retrieves the data * Returns 1 if successful or -1 on error */ int libwrc_wevt_template_definition_get_data( libwrc_wevt_template_definition_t *template_definition, uint8_t *data, size_t data_size, libcerror_error_t **error ) { libwrc_internal_wevt_template_definition_t *internal_template_definition = NULL; const uint8_t *template_data = NULL; static char *function = "libwrc_wevt_template_definition_get_data"; size_t template_data_size = 0; if( template_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template definition.", function ); return( -1 ); } internal_template_definition = (libwrc_internal_wevt_template_definition_t *) template_definition; 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( libfwevt_template_get_data( internal_template_definition->template_descriptor, &template_data, &template_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data.", function ); return( -1 ); } if( data_size < template_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data value too small.", function ); return( -1 ); } if( memory_copy( data, template_data, template_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 offset * Returns 1 if successful or -1 on error */ int libwrc_wevt_template_definition_get_offset( libwrc_wevt_template_definition_t *template_definition, uint32_t *offset, libcerror_error_t **error ) { libwrc_internal_wevt_template_definition_t *internal_template_definition = NULL; static char *function = "libwrc_wevt_template_definition_get_offset"; if( template_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template definition.", function ); return( -1 ); } internal_template_definition = (libwrc_internal_wevt_template_definition_t *) template_definition; if( libfwevt_template_get_offset( internal_template_definition->template_descriptor, offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve offest.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size * Returns 1 if successful or -1 on error */ int libwrc_wevt_template_definition_get_size( libwrc_wevt_template_definition_t *template_definition, size_t *size, libcerror_error_t **error ) { libwrc_internal_wevt_template_definition_t *internal_template_definition = NULL; static char *function = "libwrc_wevt_template_definition_get_size"; if( template_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid template definition.", function ); return( -1 ); } internal_template_definition = (libwrc_internal_wevt_template_definition_t *) template_definition; if( libfwevt_template_get_size( internal_template_definition->template_descriptor, (uint32_t *) size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size.", function ); return( -1 ); } return( 1 ); } libevt-20170120/libwrc/libwrc_wevt_template_values.h0000664000175000017500000000265713012271522024576 0ustar00lordyestalordyesta00000000000000/* * WEVT_TEMPLATE (resource) values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_WEVT_TEMPLATE_VALUES_H ) #define _LIBWRC_WEVT_TEMPLATE_VALUES_H #include #include #include "libwrc_data_descriptor.h" #include "libwrc_io_handle.h" #include "libwrc_language_entry.h" #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libwrc_wevt_template_values_read( libwrc_language_entry_t *language_entry, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_unused.h0000664000175000017500000000252613012271522021635 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_UNUSED_H ) #define _LIBWRC_INTERNAL_UNUSED_H #include #if !defined( LIBWRC_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBWRC_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBWRC_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBWRC_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBWRC_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBWRC_INTERNAL_UNUSED_H ) */ libevt-20170120/libwrc/libwrc_wevt_channel.c0000664000175000017500000000705313012271522023002 0ustar00lordyestalordyesta00000000000000/* * WEVT channel functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_definitions.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #include "libwrc_wevt_channel.h" /* Creates a channel * Make sure the value channel is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_wevt_channel_initialize( libwrc_wevt_channel_t **channel, libfwevt_channel_t *channel_descriptor, libcerror_error_t **error ) { libwrc_internal_wevt_channel_t *internal_channel = NULL; static char *function = "libwrc_wevt_channel_initialize"; if( channel == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid channel.", function ); return( -1 ); } if( *channel != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid channel value already set.", function ); return( -1 ); } if( channel_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid channel descriptor.", function ); return( -1 ); } internal_channel = memory_allocate_structure( libwrc_internal_wevt_channel_t ); if( internal_channel == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create channel.", function ); goto on_error; } if( memory_set( internal_channel, 0, sizeof( libwrc_internal_wevt_channel_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear channel.", function ); goto on_error; } internal_channel->channel_descriptor = channel_descriptor; *channel = (libwrc_wevt_channel_t *) internal_channel; return( 1 ); on_error: if( internal_channel != NULL ) { memory_free( internal_channel ); } return( -1 ); } /* Frees a channel * Returns 1 if successful or -1 on error */ int libwrc_wevt_channel_free( libwrc_wevt_channel_t **channel, libcerror_error_t **error ) { libwrc_internal_wevt_channel_t *internal_channel = NULL; static char *function = "libwrc_wevt_channel_free"; if( channel == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid channel.", function ); return( -1 ); } if( *channel != NULL ) { internal_channel = (libwrc_internal_wevt_channel_t *) *channel; *channel = NULL; memory_free( internal_channel ); } return( 1 ); } libevt-20170120/libwrc/libwrc_support.c0000664000175000017500000000463313012271522022042 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_definitions.h" #include "libwrc_libcerror.h" #include "libwrc_libclocale.h" #include "libwrc_support.h" #if !defined( HAVE_LOCAL_LIBWRC ) /* Returns the library version */ const char *libwrc_get_version( void ) { return( (const char *) LIBWRC_VERSION_STRING ); } /* Returns the access flags for reading */ int libwrc_get_access_flags_read( void ) { return( (int) LIBWRC_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 libwrc_get_codepage( int *codepage, libcerror_error_t **error ) { static char *function = "libwrc_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 libwrc_set_codepage( int codepage, libcerror_error_t **error ) { static char *function = "libwrc_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_LIBWRC ) */ libevt-20170120/libwrc/libwrc_libcerror.h0000664000175000017500000000263313012271522022314 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LIBCERROR_H ) #define _LIBWRC_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( _LIBWRC_LIBCERROR_H ) */ libevt-20170120/libwrc/libwrc_wevt_opcode.c0000664000175000017500000000677013012271522022650 0ustar00lordyestalordyesta00000000000000/* * WEVT opcode functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_definitions.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #include "libwrc_wevt_opcode.h" /* Creates an opcode * Make sure the value opcode is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_wevt_opcode_initialize( libwrc_wevt_opcode_t **opcode, libfwevt_opcode_t *opcode_descriptor, libcerror_error_t **error ) { libwrc_internal_wevt_opcode_t *internal_opcode = NULL; static char *function = "libwrc_wevt_opcode_initialize"; if( opcode == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid opcode.", function ); return( -1 ); } if( *opcode != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid opcode value already set.", function ); return( -1 ); } if( opcode_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid opcode descriptor.", function ); return( -1 ); } internal_opcode = memory_allocate_structure( libwrc_internal_wevt_opcode_t ); if( internal_opcode == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create opcode.", function ); goto on_error; } if( memory_set( internal_opcode, 0, sizeof( libwrc_internal_wevt_opcode_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear opcode.", function ); goto on_error; } internal_opcode->opcode_descriptor = opcode_descriptor; *opcode = (libwrc_wevt_opcode_t *) internal_opcode; return( 1 ); on_error: if( internal_opcode != NULL ) { memory_free( internal_opcode ); } return( -1 ); } /* Frees an opcode * Returns 1 if successful or -1 on error */ int libwrc_wevt_opcode_free( libwrc_wevt_opcode_t **opcode, libcerror_error_t **error ) { libwrc_internal_wevt_opcode_t *internal_opcode = NULL; static char *function = "libwrc_wevt_opcode_free"; if( opcode == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid opcode.", function ); return( -1 ); } if( *opcode != NULL ) { internal_opcode = (libwrc_internal_wevt_opcode_t *) *opcode; *opcode = NULL; memory_free( internal_opcode ); } return( 1 ); } libevt-20170120/libwrc/libwrc_libuna.h0000664000175000017500000000322713012271522021603 0ustar00lordyestalordyesta00000000000000/* * The libuna header wrapper * * Copyright (C) 2011-2016, Joachim Metz * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LIBUNA_H ) #define _LIBWRC_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( _LIBWRC_LIBUNA_H ) */ libevt-20170120/libwrc/libwrc_io_handle.h0000664000175000017500000000463713012271522022261 0ustar00lordyestalordyesta00000000000000/* * Input/Output (IO) handle functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_IO_HANDLE_H ) #define _LIBWRC_IO_HANDLE_H #include #include #include "libwrc_data_descriptor.h" #include "libwrc_libbfio.h" #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif extern const char *wrc_mz_signature; typedef struct libwrc_io_handle libwrc_io_handle_t; struct libwrc_io_handle { /* The virtual address */ uint32_t virtual_address; /* The stream size */ size64_t stream_size; /* The codepage of the extended ASCII strings */ int ascii_codepage; /* Value to indicate if abort was signalled */ int abort; }; int libwrc_io_handle_initialize( libwrc_io_handle_t **io_handle, libcerror_error_t **error ); int libwrc_io_handle_free( libwrc_io_handle_t **io_handle, libcerror_error_t **error ); int libwrc_io_handle_clear( libwrc_io_handle_t *io_handle, libcerror_error_t **error ); int libwrc_io_handle_read_resource_nodes( libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libcdata_tree_node_t **root_node, libcerror_error_t **error ); int libwrc_io_handle_read_resource_node( libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, off64_t file_offset, int node_level, libcdata_tree_node_t *node, libcerror_error_t **error ); int libwrc_io_handle_read_data_descriptor( libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, off64_t file_offset, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_message_table_values.h0000664000175000017500000000270213012271522024500 0ustar00lordyestalordyesta00000000000000/* * Message table values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_MESSAGE_TABLE_VALUES_H ) #define _LIBWRC_MESSAGE_TABLE_VALUES_H #include #include #include "libwrc_data_descriptor.h" #include "libwrc_io_handle.h" #include "libwrc_language_entry.h" #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #include "libwrc_libfvalue.h" #if defined( __cplusplus ) extern "C" { #endif int libwrc_message_table_values_read( libwrc_language_entry_t *language_entry, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_libfdata.h0000664000175000017500000000313413012271522022074 0ustar00lordyestalordyesta00000000000000/* * The libfdata header wrapper * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LIBFDATA_H ) #define _LIBWRC_LIBFDATA_H #include /* Define HAVE_LOCAL_LIBFDATA for local use of libfdata */ #if defined( HAVE_LOCAL_LIBFDATA ) #include #include #include #include #include #include #include #include #include #include #include #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( _LIBWRC_LIBFDATA_H ) */ libevt-20170120/libwrc/libwrc_mui.h0000664000175000017500000001072313012271522021122 0ustar00lordyestalordyesta00000000000000/* * MUI (resource) functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_MUI_H ) #define _LIBWRC_MUI_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_resource.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBWRC_EXTERN \ int libwrc_mui_get_file_type( libwrc_resource_t *resource, uint32_t language_identifier, uint32_t *file_type, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf8_main_name_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf8_main_name( libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf16_main_name_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf16_main_name( libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf8_mui_name_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf8_mui_name( libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf16_mui_name_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf16_mui_name( libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf8_language_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf8_language( libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf16_language_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf16_language( libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf8_fallback_language_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf8_fallback_language( libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf16_fallback_language_size( libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_mui_get_utf16_fallback_language( libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_libfguid.h0000664000175000017500000000256213012271522022117 0ustar00lordyestalordyesta00000000000000/* * The libfguid header wrapper * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_LIBFGUID_H ) #define _LIBWRC_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( _LIBWRC_LIBFGUID_H ) */ libevt-20170120/libwrc/libwrc_wevt_task.h0000664000175000017500000000303313012271522022333 0ustar00lordyestalordyesta00000000000000/* * WEVT task functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_WEVT_TASK_H ) #define _LIBWRC_INTERNAL_WEVT_TASK_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_internal_wevt_task libwrc_internal_wevt_task_t; struct libwrc_internal_wevt_task { /* The task descriptor */ libfwevt_task_t *task_descriptor; }; int libwrc_wevt_task_initialize( libwrc_wevt_task_t **task, libfwevt_task_t *task_descriptor, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_task_free( libwrc_wevt_task_t **task, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_mui_values.h0000664000175000017500000000451413012271522022502 0ustar00lordyestalordyesta00000000000000/* * Multilingual User Interface (MUI) (resource) values functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_MUI_VALUES_H ) #define _LIBWRC_MUI_VALUES_H #include #include #include "libwrc_data_descriptor.h" #include "libwrc_io_handle.h" #include "libwrc_language_entry.h" #include "libwrc_libbfio.h" #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif extern uint8_t libwrc_mui_signature[ 4 ]; typedef struct libwrc_mui_values libwrc_mui_values_t; struct libwrc_mui_values { /* The file type */ uint32_t file_type; /* The main name */ uint8_t *main_name; /* The main name size */ size_t main_name_size; /* The MUI name */ uint8_t *mui_name; /* The MUI name size */ size_t mui_name_size; /* The language */ uint8_t *language; /* The language size */ size_t language_size; /* The fallback language */ uint8_t *fallback_language; /* The fallback language size */ size_t fallback_language_size; }; int libwrc_mui_values_initialize( libwrc_mui_values_t **mui_values, libcerror_error_t **error ); int libwrc_mui_values_free( libwrc_mui_values_t **mui_values, libcerror_error_t **error ); int libwrc_mui_values_read( libwrc_language_entry_t *language_entry, libwrc_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libwrc_data_descriptor_t *data_descriptor, libcerror_error_t **error ); int libwrc_mui_values_get_file_type( libwrc_mui_values_t *mui_values, uint32_t *file_type, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_wevt_keyword.h0000664000175000017500000000311613012271522023057 0ustar00lordyestalordyesta00000000000000/* * WEVT keyword functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBWRC_INTERNAL_WEVT_KEYWORD_H ) #define _LIBWRC_INTERNAL_WEVT_KEYWORD_H #include #include #include "libwrc_extern.h" #include "libwrc_libcerror.h" #include "libwrc_libfwevt.h" #include "libwrc_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_internal_wevt_keyword libwrc_internal_wevt_keyword_t; struct libwrc_internal_wevt_keyword { /* The keyword descriptor */ libfwevt_keyword_t *keyword_descriptor; }; int libwrc_wevt_keyword_initialize( libwrc_wevt_keyword_t **keyword, libfwevt_keyword_t *keyword_descriptor, libcerror_error_t **error ); LIBWRC_EXTERN \ int libwrc_wevt_keyword_free( libwrc_wevt_keyword_t **keyword, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libevt-20170120/libwrc/libwrc_data_descriptor.c0000664000175000017500000000577613012271522023506 0ustar00lordyestalordyesta00000000000000/* * Data descriptor functions * * Copyright (C) 2011-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libwrc_data_descriptor.h" #include "libwrc_libcerror.h" /* Creates a data descriptor * Make sure the value data_descriptor is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libwrc_data_descriptor_initialize( libwrc_data_descriptor_t **data_descriptor, libcerror_error_t **error ) { static char *function = "libwrc_data_descriptor_initialize"; if( data_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data descriptor.", function ); return( -1 ); } if( *data_descriptor != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid data descriptor value already set.", function ); return( -1 ); } *data_descriptor = memory_allocate_structure( libwrc_data_descriptor_t ); if( *data_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data descriptor.", function ); goto on_error; } if( memory_set( *data_descriptor, 0, sizeof( libwrc_data_descriptor_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear data descriptor.", function ); goto on_error; } return( 1 ); on_error: if( *data_descriptor != NULL ) { memory_free( *data_descriptor ); *data_descriptor = NULL; } return( -1 ); } /* Frees a data descriptor * Returns 1 if successful or -1 on error */ int libwrc_data_descriptor_free( libwrc_data_descriptor_t **data_descriptor, libcerror_error_t **error ) { static char *function = "libwrc_data_descriptor_free"; if( data_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data descriptor.", function ); return( -1 ); } if( *data_descriptor != NULL ) { memory_free( *data_descriptor ); *data_descriptor = NULL; } return( 1 ); } libevt-20170120/pyevt-python3/0000775000175000017500000000000013040343017020101 5ustar00lordyestalordyesta00000000000000libevt-20170120/pyevt-python3/Makefile.am0000664000175000017500000000331013040331671022135 0ustar00lordyestalordyesta00000000000000# Note that we cannot use: AUTOMAKE_OPTIONS = subdir-objects # subdir-objects will compile the source files to a single version of Python. # Since subdir-objects is being deprecated we copy the source files instead. am__installdirs = "$(DESTDIR)$(pyexecdir3)" pyexecdir = $(pyexecdir3) if HAVE_PYTHON3 AM_CFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ am_pyevt_la_rpath = -rpath $(pyexecdir3) BUILT_SOURCES = \ pyevt.c pyevt.h \ pyevt_codepage.c pyevt_codepage.h \ pyevt_datetime.c pyevt_datetime.h \ pyevt_error.c pyevt_error.h \ pyevt_event_types.c pyevt_event_types.h \ pyevt_file.c pyevt_file.h \ pyevt_file_flags.c pyevt_file_flags.h \ pyevt_file_object_io_handle.c pyevt_file_object_io_handle.h \ pyevt_integer.c pyevt_integer.h \ pyevt_libbfio.h \ pyevt_libcerror.h \ pyevt_libclocale.h \ pyevt_libevt.h \ pyevt_python.h \ pyevt_record.c pyevt_record.h \ pyevt_records.c pyevt_records.h \ pyevt_strings.c pyevt_strings.h \ pyevt_unused.h pyexec_LTLIBRARIES = pyevt.la nodist_pyevt_la_SOURCES = $(BUILT_SOURCES) pyevt_la_LIBADD = \ @LIBCERROR_LIBADD@ \ ../libevt/libevt.la \ @LIBCDATA_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBBFIO_LIBADD@ pyevt_la_CPPFLAGS = $(PYTHON3_CPPFLAGS) pyevt_la_LDFLAGS = -module -avoid-version $(PYTHON3_LDFLAGS) $(BUILT_SOURCES): /bin/cp -f $(top_srcdir)/pyevt/$@ $@ endif MAINTAINERCLEANFILES = \ Makefile.in clean-local: /bin/rm -f pyevt*.[ch] distclean: clean /bin/rm -f Makefile libevt-20170120/pyevt-python3/Makefile.in0000664000175000017500000014200713040342660022155 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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 = pyevt-python3 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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; }; \ } LTLIBRARIES = $(pyexec_LTLIBRARIES) @HAVE_PYTHON3_TRUE@pyevt_la_DEPENDENCIES = ../libevt/libevt.la @HAVE_PYTHON3_TRUE@am__objects_1 = pyevt_la-pyevt.lo \ @HAVE_PYTHON3_TRUE@ pyevt_la-pyevt_codepage.lo \ @HAVE_PYTHON3_TRUE@ pyevt_la-pyevt_datetime.lo \ @HAVE_PYTHON3_TRUE@ pyevt_la-pyevt_error.lo \ @HAVE_PYTHON3_TRUE@ pyevt_la-pyevt_event_types.lo \ @HAVE_PYTHON3_TRUE@ pyevt_la-pyevt_file.lo \ @HAVE_PYTHON3_TRUE@ pyevt_la-pyevt_file_flags.lo \ @HAVE_PYTHON3_TRUE@ pyevt_la-pyevt_file_object_io_handle.lo \ @HAVE_PYTHON3_TRUE@ pyevt_la-pyevt_integer.lo \ @HAVE_PYTHON3_TRUE@ pyevt_la-pyevt_record.lo \ @HAVE_PYTHON3_TRUE@ pyevt_la-pyevt_records.lo \ @HAVE_PYTHON3_TRUE@ pyevt_la-pyevt_strings.lo @HAVE_PYTHON3_TRUE@nodist_pyevt_la_OBJECTS = $(am__objects_1) pyevt_la_OBJECTS = $(nodist_pyevt_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 = pyevt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(pyevt_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__depfiles_maybe = depfiles 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 = $(nodist_pyevt_la_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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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 = $(pyexecdir3) pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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@ # Note that we cannot use: AUTOMAKE_OPTIONS = subdir-objects # subdir-objects will compile the source files to a single version of Python. # Since subdir-objects is being deprecated we copy the source files instead. am__installdirs = "$(DESTDIR)$(pyexecdir3)" @HAVE_PYTHON3_TRUE@AM_CFLAGS = \ @HAVE_PYTHON3_TRUE@ -I$(top_srcdir)/include \ @HAVE_PYTHON3_TRUE@ -I$(top_srcdir)/common \ @HAVE_PYTHON3_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_PYTHON3_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_PYTHON3_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_PYTHON3_TRUE@ @LIBCSPLIT_CPPFLAGS@ \ @HAVE_PYTHON3_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_PYTHON3_TRUE@ @LIBCFILE_CPPFLAGS@ \ @HAVE_PYTHON3_TRUE@ @LIBCPATH_CPPFLAGS@ \ @HAVE_PYTHON3_TRUE@ @LIBBFIO_CPPFLAGS@ @HAVE_PYTHON3_TRUE@am_pyevt_la_rpath = -rpath $(pyexecdir3) @HAVE_PYTHON3_TRUE@BUILT_SOURCES = \ @HAVE_PYTHON3_TRUE@ pyevt.c pyevt.h \ @HAVE_PYTHON3_TRUE@ pyevt_codepage.c pyevt_codepage.h \ @HAVE_PYTHON3_TRUE@ pyevt_datetime.c pyevt_datetime.h \ @HAVE_PYTHON3_TRUE@ pyevt_error.c pyevt_error.h \ @HAVE_PYTHON3_TRUE@ pyevt_event_types.c pyevt_event_types.h \ @HAVE_PYTHON3_TRUE@ pyevt_file.c pyevt_file.h \ @HAVE_PYTHON3_TRUE@ pyevt_file_flags.c pyevt_file_flags.h \ @HAVE_PYTHON3_TRUE@ pyevt_file_object_io_handle.c pyevt_file_object_io_handle.h \ @HAVE_PYTHON3_TRUE@ pyevt_integer.c pyevt_integer.h \ @HAVE_PYTHON3_TRUE@ pyevt_libbfio.h \ @HAVE_PYTHON3_TRUE@ pyevt_libcerror.h \ @HAVE_PYTHON3_TRUE@ pyevt_libclocale.h \ @HAVE_PYTHON3_TRUE@ pyevt_libevt.h \ @HAVE_PYTHON3_TRUE@ pyevt_python.h \ @HAVE_PYTHON3_TRUE@ pyevt_record.c pyevt_record.h \ @HAVE_PYTHON3_TRUE@ pyevt_records.c pyevt_records.h \ @HAVE_PYTHON3_TRUE@ pyevt_strings.c pyevt_strings.h \ @HAVE_PYTHON3_TRUE@ pyevt_unused.h @HAVE_PYTHON3_TRUE@pyexec_LTLIBRARIES = pyevt.la @HAVE_PYTHON3_TRUE@nodist_pyevt_la_SOURCES = $(BUILT_SOURCES) @HAVE_PYTHON3_TRUE@pyevt_la_LIBADD = \ @HAVE_PYTHON3_TRUE@ @LIBCERROR_LIBADD@ \ @HAVE_PYTHON3_TRUE@ ../libevt/libevt.la \ @HAVE_PYTHON3_TRUE@ @LIBCDATA_LIBADD@ \ @HAVE_PYTHON3_TRUE@ @LIBCLOCALE_LIBADD@ \ @HAVE_PYTHON3_TRUE@ @LIBCSPLIT_LIBADD@ \ @HAVE_PYTHON3_TRUE@ @LIBUNA_LIBADD@ \ @HAVE_PYTHON3_TRUE@ @LIBCFILE_LIBADD@ \ @HAVE_PYTHON3_TRUE@ @LIBCPATH_LIBADD@ \ @HAVE_PYTHON3_TRUE@ @LIBBFIO_LIBADD@ @HAVE_PYTHON3_TRUE@pyevt_la_CPPFLAGS = $(PYTHON3_CPPFLAGS) @HAVE_PYTHON3_TRUE@pyevt_la_LDFLAGS = -module -avoid-version $(PYTHON3_LDFLAGS) MAINTAINERCLEANFILES = \ Makefile.in all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pyevt-python3/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pyevt-python3/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) @$(NORMAL_INSTALL) @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}; \ } pyevt.la: $(pyevt_la_OBJECTS) $(pyevt_la_DEPENDENCIES) $(EXTRA_pyevt_la_DEPENDENCIES) $(AM_V_CCLD)$(pyevt_la_LINK) $(am_pyevt_la_rpath) $(pyevt_la_OBJECTS) $(pyevt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_codepage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_datetime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_event_types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_file_flags.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_file_object_io_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_integer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_record.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_records.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_strings.Plo@am__quote@ .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 $@ $< pyevt_la-pyevt.lo: pyevt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt.Tpo -c -o pyevt_la-pyevt.lo `test -f 'pyevt.c' || echo '$(srcdir)/'`pyevt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt.Tpo $(DEPDIR)/pyevt_la-pyevt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt.c' object='pyevt_la-pyevt.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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt.lo `test -f 'pyevt.c' || echo '$(srcdir)/'`pyevt.c pyevt_la-pyevt_codepage.lo: pyevt_codepage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_codepage.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_codepage.Tpo -c -o pyevt_la-pyevt_codepage.lo `test -f 'pyevt_codepage.c' || echo '$(srcdir)/'`pyevt_codepage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_codepage.Tpo $(DEPDIR)/pyevt_la-pyevt_codepage.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_codepage.c' object='pyevt_la-pyevt_codepage.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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_codepage.lo `test -f 'pyevt_codepage.c' || echo '$(srcdir)/'`pyevt_codepage.c pyevt_la-pyevt_datetime.lo: pyevt_datetime.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_datetime.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_datetime.Tpo -c -o pyevt_la-pyevt_datetime.lo `test -f 'pyevt_datetime.c' || echo '$(srcdir)/'`pyevt_datetime.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_datetime.Tpo $(DEPDIR)/pyevt_la-pyevt_datetime.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_datetime.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_datetime.lo `test -f 'pyevt_datetime.c' || echo '$(srcdir)/'`pyevt_datetime.c pyevt_la-pyevt_error.lo: pyevt_error.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_error.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_error.Tpo -c -o pyevt_la-pyevt_error.lo `test -f 'pyevt_error.c' || echo '$(srcdir)/'`pyevt_error.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_error.Tpo $(DEPDIR)/pyevt_la-pyevt_error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_error.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_error.lo `test -f 'pyevt_error.c' || echo '$(srcdir)/'`pyevt_error.c pyevt_la-pyevt_event_types.lo: pyevt_event_types.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_event_types.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_event_types.Tpo -c -o pyevt_la-pyevt_event_types.lo `test -f 'pyevt_event_types.c' || echo '$(srcdir)/'`pyevt_event_types.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_event_types.Tpo $(DEPDIR)/pyevt_la-pyevt_event_types.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_event_types.c' object='pyevt_la-pyevt_event_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_event_types.lo `test -f 'pyevt_event_types.c' || echo '$(srcdir)/'`pyevt_event_types.c pyevt_la-pyevt_file.lo: pyevt_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_file.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_file.Tpo -c -o pyevt_la-pyevt_file.lo `test -f 'pyevt_file.c' || echo '$(srcdir)/'`pyevt_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_file.Tpo $(DEPDIR)/pyevt_la-pyevt_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_file.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_file.lo `test -f 'pyevt_file.c' || echo '$(srcdir)/'`pyevt_file.c pyevt_la-pyevt_file_flags.lo: pyevt_file_flags.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_file_flags.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_file_flags.Tpo -c -o pyevt_la-pyevt_file_flags.lo `test -f 'pyevt_file_flags.c' || echo '$(srcdir)/'`pyevt_file_flags.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_file_flags.Tpo $(DEPDIR)/pyevt_la-pyevt_file_flags.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_file_flags.c' object='pyevt_la-pyevt_file_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_file_flags.lo `test -f 'pyevt_file_flags.c' || echo '$(srcdir)/'`pyevt_file_flags.c pyevt_la-pyevt_file_object_io_handle.lo: pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_file_object_io_handle.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_file_object_io_handle.Tpo -c -o pyevt_la-pyevt_file_object_io_handle.lo `test -f 'pyevt_file_object_io_handle.c' || echo '$(srcdir)/'`pyevt_file_object_io_handle.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_file_object_io_handle.Tpo $(DEPDIR)/pyevt_la-pyevt_file_object_io_handle.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_file_object_io_handle.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_file_object_io_handle.lo `test -f 'pyevt_file_object_io_handle.c' || echo '$(srcdir)/'`pyevt_file_object_io_handle.c pyevt_la-pyevt_integer.lo: pyevt_integer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_integer.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_integer.Tpo -c -o pyevt_la-pyevt_integer.lo `test -f 'pyevt_integer.c' || echo '$(srcdir)/'`pyevt_integer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_integer.Tpo $(DEPDIR)/pyevt_la-pyevt_integer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_integer.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_integer.lo `test -f 'pyevt_integer.c' || echo '$(srcdir)/'`pyevt_integer.c pyevt_la-pyevt_record.lo: pyevt_record.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_record.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_record.Tpo -c -o pyevt_la-pyevt_record.lo `test -f 'pyevt_record.c' || echo '$(srcdir)/'`pyevt_record.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_record.Tpo $(DEPDIR)/pyevt_la-pyevt_record.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_record.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_record.lo `test -f 'pyevt_record.c' || echo '$(srcdir)/'`pyevt_record.c pyevt_la-pyevt_records.lo: pyevt_records.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_records.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_records.Tpo -c -o pyevt_la-pyevt_records.lo `test -f 'pyevt_records.c' || echo '$(srcdir)/'`pyevt_records.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_records.Tpo $(DEPDIR)/pyevt_la-pyevt_records.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_records.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_records.lo `test -f 'pyevt_records.c' || echo '$(srcdir)/'`pyevt_records.c pyevt_la-pyevt_strings.lo: pyevt_strings.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_strings.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_strings.Tpo -c -o pyevt_la-pyevt_strings.lo `test -f 'pyevt_strings.c' || echo '$(srcdir)/'`pyevt_strings.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_strings.Tpo $(DEPDIR)/pyevt_la-pyevt_strings.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_strings.c' object='pyevt_la-pyevt_strings.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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_strings.lo `test -f 'pyevt_strings.c' || echo '$(srcdir)/'`pyevt_strings.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pyexecdir3)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-local \ clean-pyexecLTLIBRARIES mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-pyexecLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pyexecLTLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-local 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 \ tags tags-am uninstall uninstall-am \ uninstall-pyexecLTLIBRARIES .PRECIOUS: Makefile @HAVE_PYTHON3_TRUE@$(BUILT_SOURCES): @HAVE_PYTHON3_TRUE@ /bin/cp -f $(top_srcdir)/pyevt/$@ $@ clean-local: /bin/rm -f pyevt*.[ch] distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/install-sh0000755000175000017500000003452313040342656017351 0ustar00lordyestalordyesta00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # 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 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 the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -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=$? 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; won't work # if double slashes aren't ignored. 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 dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac 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=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && 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 # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libevt-20170120/INSTALL0000644000175000017500000003661013040342656016375 0ustar00lordyestalordyesta00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2013 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 time stamps 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. libevt-20170120/dpkg/0000775000175000017500000000000013040343016016254 5ustar00lordyestalordyesta00000000000000libevt-20170120/dpkg/libevt.docs0000664000175000017500000000003412675771062020433 0ustar00lordyestalordyesta00000000000000AUTHORS COPYING NEWS README libevt-20170120/dpkg/changelog.in0000664000175000017500000000016713040331673020545 0ustar00lordyestalordyesta00000000000000libevt (@VERSION@-1) unstable; urgency=low * Auto-generated -- Joachim Metz @DPKG_DATE@ libevt-20170120/dpkg/changelog0000664000175000017500000000021213040342671020127 0ustar00lordyestalordyesta00000000000000libevt (20170120-1) unstable; urgency=low * Auto-generated -- Joachim Metz Fri, 20 Jan 2017 09:09:28 +0100 libevt-20170120/dpkg/libevt-dev.docs0000664000175000017500000000003412675773547021221 0ustar00lordyestalordyesta00000000000000AUTHORS COPYING NEWS README libevt-20170120/dpkg/copyright0000664000175000017500000000257013040342671020221 0ustar00lordyestalordyesta00000000000000This work was packaged for Debian by: Joachim Metz on Fri, 20 Jan 2017 09:09:28 +0100 It was downloaded from https://github.com/libyal/libevt/ Upstream Author(s): Joachim Metz Copyright: Copyright (C) 2010-2017, Joachim Metz License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/LGPL-3'. The Debian packaging is: Copyright (C) 2010-2017, Joachim Metz and is licensed under the GNU Lesser General Public License, see `/usr/share/common-licenses/LGPL-3'. libevt-20170120/dpkg/libevt-python3.docs0000664000175000017500000000003412675773551022042 0ustar00lordyestalordyesta00000000000000AUTHORS COPYING NEWS README libevt-20170120/dpkg/libevt-python.docs0000664000175000017500000000003412675773551021757 0ustar00lordyestalordyesta00000000000000AUTHORS COPYING NEWS README libevt-20170120/dpkg/source/0000775000175000017500000000000013040343016017554 5ustar00lordyestalordyesta00000000000000libevt-20170120/dpkg/source/format0000664000175000017500000000000412675773550021010 0ustar00lordyestalordyesta000000000000001.0 libevt-20170120/dpkg/rules0000775000175000017500000000517012675773551017367 0ustar00lordyestalordyesta00000000000000#!/usr/bin/make -f # debian/rules that uses debhelper >= 7. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS %: dh $@ .PHONY: override_dh_auto_configure override_dh_auto_configure: dh_auto_configure -- --enable-python2 --enable-python3 CFLAGS="-g" .PHONY: override_dh_auto_test override_dh_auto_test: .PHONY: override_dh_install override_dh_install: # Create the libevt package. dh_install "debian/tmp/usr/lib/lib*.so.*.*.*" -p libevt # Create the libevt-dev package. dh_install "debian/tmp/usr/include/*.h" -p libevt-dev dh_install "debian/tmp/usr/include/lib*/*.h" -p libevt-dev dh_install "debian/tmp/usr/lib/*.a" -p libevt-dev dh_install "debian/tmp/usr/lib/*.la" -p libevt-dev dh_install "debian/tmp/usr/lib/*.so" -p libevt-dev dh_install "debian/tmp/usr/lib/pkgconfig/*" -p libevt-dev dh_install "debian/tmp/usr/share/man/man3/*" -p libevt-dev # Create the libevt-tools package. dh_install "debian/tmp/usr/bin/*" -p libevt-tools dh_install "debian/tmp/usr/share/man/man1/*" -p libevt-tools # Create the libevt-python package. dh_install -X"*_d.so" "debian/tmp/usr/lib/python2*/*" -p libevt-python # Create the libevt-python3 package. dh_install -X"*_d.so" "debian/tmp/usr/lib/python3*/*" -p libevt-python3 # The libevt-dbg, libevt-python-dbg and libevt-python3-dbg packages # are created by dh_strip. dh_install .PHONY: override_dh_installmenu override_dh_installmenu: .PHONY: override_dh_installmime override_dh_installmime: .PHONY: override_dh_installmodules override_dh_installmodules: .PHONY: override_dh_installlogcheck override_dh_installlogcheck: .PHONY: override_dh_installlogrotate override_dh_installlogrotate: .PHONY: override_dh_installpam override_dh_installpam: .PHONY: override_dh_installppp override_dh_installppp: .PHONY: override_dh_installudev override_dh_installudev: .PHONY: override_dh_installwm override_dh_installwm: .PHONY: override_dh_installxfonts override_dh_installxfonts: .PHONY: override_dh_gconf override_dh_gconf: .PHONY: override_dh_icons override_dh_icons: .PHONY: override_dh_perl override_dh_perl: .PHONY: override_dh_pysupport override_dh_pysupport: .PHONY: override_dh_strip override_dh_strip: ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) dh_strip -plibevt --dbg-package=libevt-dbg dh_strip -plibevt-python --dbg-package=libevt-python-dbg dh_strip -plibevt-python3 --dbg-package=libevt-python3-dbg endif .PHONY: override_dh_shlibdeps override_dh_shlibdeps: dh_shlibdeps -Llibevt -l${CURDIR}/debian/tmp/usr/lib .PHONY: override_dh_makeshlibs override_dh_makeshlibs: dh_makeshlibs -Xlibevt-dev libevt-20170120/dpkg/compat0000664000175000017500000000000212675771062017475 0ustar00lordyestalordyesta000000000000007 libevt-20170120/dpkg/control0000664000175000017500000000402412762206272017673 0ustar00lordyestalordyesta00000000000000Source: libevt Section: libs Priority: extra Maintainer: Joachim Metz Build-Depends: debhelper (>= 7), autotools-dev, python-all-dev, python3-all-dev Standards-Version: 3.9.5 Homepage: https://github.com/libyal/libevt/ Package: libevt Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: libevt-dbg Description: Library to access the Windows Event Log (EVT) format libevt is a library to access the Windows Event Log (EVT) format. Package: libevt-dbg Architecture: any Section: debug Depends: libevt (= ${binary:Version}), ${misc:Depends} Description: Debugging symbols for libevt Debugging symbols for libevt. Package: libevt-dev Section: libdevel Architecture: any Depends: libevt (= ${binary:Version}), ${misc:Depends} Description: Header files and libraries for developing applications for libevt Header files and libraries for developing applications for libevt. Package: libevt-tools Section: utils Architecture: any Depends: libevt (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: Several tools for reading Windows Event Log (EVT) files Several tools for reading Windows Event Log (EVT) files. Package: libevt-python Section: python Architecture: any Depends: libevt (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Suggests: libevt-python-dbg Description: Python 2 bindings for libevt Python 2 bindings for libevt. Package: libevt-python-dbg Section: debug Architecture: any Depends: libevt-python (= ${binary:Version}), ${misc:Depends} Description: Debugging symbols for libevt-python Debugging symbols for libevt-python. Package: libevt-python3 Section: python Architecture: any Depends: libevt (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Suggests: libevt-python3-dbg Description: Python 3 bindings for libevt Python 3 bindings for libevt. Package: libevt-python3-dbg Section: debug Architecture: any Depends: libevt-python3 (= ${binary:Version}), ${misc:Depends} Description: Debugging symbols for libevt-python3 Debugging symbols for libevt-python3. libevt-20170120/dpkg/libevt-tools.docs0000664000175000017500000000003412675771062021571 0ustar00lordyestalordyesta00000000000000AUTHORS COPYING NEWS README libevt-20170120/dpkg/copyright.in0000664000175000017500000000254413040331673020627 0ustar00lordyestalordyesta00000000000000This work was packaged for Debian by: Joachim Metz on @DPKG_DATE@ It was downloaded from https://github.com/libyal/libevt/ Upstream Author(s): Joachim Metz Copyright: Copyright (C) 2010-2017, Joachim Metz License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/LGPL-3'. The Debian packaging is: Copyright (C) 2010-2017, Joachim Metz and is licensed under the GNU Lesser General Public License, see `/usr/share/common-licenses/LGPL-3'. libevt-20170120/libfdatetime/0000775000175000017500000000000013040343016017760 5ustar00lordyestalordyesta00000000000000libevt-20170120/libfdatetime/libfdatetime_support.c0000664000175000017500000000220413040331701024345 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_support.h" #if !defined( HAVE_LOCAL_LIBFDATETIME ) /* Returns the library version as a string */ const char *libfdatetime_get_version( void ) { return( (const char *) LIBFDATETIME_VERSION_STRING ); } #endif libevt-20170120/libfdatetime/libfdatetime_systemtime.h0000664000175000017500000001014713040331701025046 0ustar00lordyestalordyesta00000000000000/* * SYSTEMTIME functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_SYSTEMTIME_H ) #define _LIBFDATETIME_INTERNAL_SYSTEMTIME_H #include #include #include "libfdatetime_extern.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_internal_systemtime libfdatetime_internal_systemtime_t; struct libfdatetime_internal_systemtime { /* The year */ uint16_t year; /* The month */ uint16_t month; /* The day of week */ uint16_t day_of_week; /* The day of month */ uint16_t day_of_month; /* The hours */ uint16_t hours; /* The minutes */ uint16_t minutes; /* The seconds */ uint16_t seconds; /* The milli seconds */ uint16_t milli_seconds; }; LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_initialize( libfdatetime_systemtime_t **systemtime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_free( libfdatetime_systemtime_t **systemtime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_from_byte_stream( libfdatetime_systemtime_t *systemtime, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); int libfdatetime_systemtime_copy_to_date_time_values( libfdatetime_internal_systemtime_t *internal_systemtime, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_get_string_size( libfdatetime_systemtime_t *systemtime, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_to_utf8_string( libfdatetime_systemtime_t *systemtime, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_to_utf8_string_with_index( libfdatetime_systemtime_t *systemtime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_to_utf16_string( libfdatetime_systemtime_t *systemtime, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_to_utf16_string_with_index( libfdatetime_systemtime_t *systemtime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_to_utf32_string( libfdatetime_systemtime_t *systemtime, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_to_utf32_string_with_index( libfdatetime_systemtime_t *systemtime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATETIME_INTERNAL_SYSTEMTIME_H ) */ libevt-20170120/libfdatetime/libfdatetime_error.h0000664000175000017500000000354113040331701023774 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_ERROR_H ) #define _LIBFDATETIME_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFDATETIME ) #include #endif #include "libfdatetime_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFDATETIME ) LIBFDATETIME_EXTERN \ void libfdatetime_error_free( libfdatetime_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_error_fprint( libfdatetime_error_t *error, FILE *stream ); LIBFDATETIME_EXTERN \ int libfdatetime_error_sprint( libfdatetime_error_t *error, char *string, size_t size ); LIBFDATETIME_EXTERN \ int libfdatetime_error_backtrace_fprint( libfdatetime_error_t *error, FILE *stream ); LIBFDATETIME_EXTERN \ int libfdatetime_error_backtrace_sprint( libfdatetime_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBFDATETIME ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATETIME_INTERNAL_ERROR_H ) */ libevt-20170120/libfdatetime/Makefile.am0000664000175000017500000000213013012271506022013 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBFDATETIME AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfdatetime ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdatetime_la_SOURCES) libevt-20170120/libfdatetime/libfdatetime_unused.h0000664000175000017500000000260613040331701024147 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_UNUSED_H ) #define _LIBFDATETIME_INTERNAL_UNUSED_H #include #if !defined( LIBFDATETIME_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFDATETIME_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFDATETIME_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFDATETIME_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFDATETIME_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBFDATETIME_INTERNAL_UNUSED_H ) */ libevt-20170120/libfdatetime/libfdatetime_error.c0000664000175000017500000000563013040331701023770 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdatetime_error.h" #include "libfdatetime_libcerror.h" #if !defined( HAVE_LOCAL_LIBFDATETIME ) /* Free an error and its elements */ void libfdatetime_error_free( libfdatetime_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfdatetime_error_fprint( libfdatetime_error_t *error, FILE *stream ) { 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 ) */ libevt-20170120/libfdatetime/libfdatetime_posix_time.c0000664000175000017500000011220613040331701025015 0ustar00lordyestalordyesta00000000000000/* * POSIX time functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_posix_time.h" #include "libfdatetime_types.h" /* 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 ) ) { 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 ) ) { 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 ) ) { 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_posix_time_copy_to_date_time_values( libfdatetime_internal_posix_time_t *internal_posix_time, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_posix_time_copy_to_date_time_values"; uint64_t posix_timestamp = 0; uint16_t days_in_year = 0; uint8_t days_in_month = 0; uint8_t is_signed = 0; if( internal_posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } if( ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_UNSIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_SIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_UNSIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_SIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid POSIX time - unsupported value type.", function ); return( -1 ); } if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } posix_timestamp = internal_posix_time->timestamp; if( ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_UNSIGNED ) ) { is_signed = (uint8_t) ( posix_timestamp >> 31 ); posix_timestamp &= 0x7fffffffUL; } else if( ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_SIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_UNSIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_SIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_UNSIGNED ) ) { is_signed = (uint8_t) ( posix_timestamp >> 63 ); #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_MICRO_SECONDS_64BIT_SIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_UNSIGNED ) ) { /* The timestamp is in units of micro seconds correct the value to seconds */ if( is_signed == 0 ) { date_time_values->micro_seconds = posix_timestamp % 1000; } 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; date_time_values->year = 1970; if( posix_timestamp >= 10957 ) { date_time_values->year = 2000; posix_timestamp -= 10957; } } else { /* Remove 1 day to compensate that Jan 1, 1970 is represented as 0 */ posix_timestamp -= 1; date_time_values->year = 1969; } while( posix_timestamp > 0 ) { /* Check for a leap year * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 ) */ if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_year = 366; } else { days_in_year = 365; } if( posix_timestamp <= days_in_year ) { break; } posix_timestamp -= days_in_year; if( is_signed == 0 ) { date_time_values->year += 1; } else { date_time_values->year -= 1; } } /* Determine the month correct the value to days within the month */ if( is_signed == 0 ) { date_time_values->month = 1; } else { date_time_values->month = 12; } do { /* February (2) */ if( date_time_values->month == 2 ) { if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } } /* April (4), June (6), September (9), November (11) */ else if( ( date_time_values->month == 4 ) || ( date_time_values->month == 6 ) || ( date_time_values->month == 9 ) || ( date_time_values->month == 11 ) ) { days_in_month = 30; } /* January (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( date_time_values->month == 1 ) || ( date_time_values->month == 3 ) || ( date_time_values->month == 5 ) || ( date_time_values->month == 7 ) || ( date_time_values->month == 8 ) || ( date_time_values->month == 10 ) || ( date_time_values->month == 12 ) ) { days_in_month = 31; } /* This should never happen, but just in case */ else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported month: %d.", function, date_time_values->month ); return( -1 ); } if( posix_timestamp <= days_in_month ) { break; } posix_timestamp -= days_in_month; if( is_signed == 0 ) { date_time_values->month += 1; } else { date_time_values->month -= 1; } } while( posix_timestamp > 0 ); /* 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; 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 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } if( libfdatetime_posix_time_copy_to_date_time_values( (libfdatetime_internal_posix_time_t *) posix_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } 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 ); } else if( result == 0 ) { /* Make sure the string can hold the hexadecimal representation of the POSIX time */ *string_size = 13; } return( 1 ); } /* Converts the POSIX time into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_utf8_string( libfdatetime_posix_time_t *posix_time, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_posix_time_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_posix_time_copy_to_utf8_string_with_index( posix_time, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy POSIX time to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the POSIX time into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_utf8_string_with_index( libfdatetime_posix_time_t *posix_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_posix_time_t *internal_posix_time = NULL; static char *function = "libfdatetime_posix_time_copy_to_utf8_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } internal_posix_time = (libfdatetime_internal_posix_time_t *) posix_time; if( libfdatetime_posix_time_copy_to_date_time_values( internal_posix_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( ( *utf8_string_index + 13 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 28; do { byte_value = ( internal_posix_time->timestamp >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ')'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; } return( 1 ); } /* Converts the POSIX time into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_utf16_string( libfdatetime_posix_time_t *posix_time, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_posix_time_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_posix_time_copy_to_utf16_string_with_index( posix_time, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy POSIX time to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the POSIX time into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_utf16_string_with_index( libfdatetime_posix_time_t *posix_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_posix_time_t *internal_posix_time = NULL; static char *function = "libfdatetime_posix_time_copy_to_utf16_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } internal_posix_time = (libfdatetime_internal_posix_time_t *) posix_time; if( libfdatetime_posix_time_copy_to_date_time_values( internal_posix_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( ( *utf16_string_index + 13 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 28; do { byte_value = ( internal_posix_time->timestamp >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ')'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; } return( 1 ); return( 1 ); } /* Converts the POSIX time into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_utf32_string( libfdatetime_posix_time_t *posix_time, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_posix_time_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_posix_time_copy_to_utf32_string_with_index( posix_time, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy POSIX time to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the POSIX time into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_utf32_string_with_index( libfdatetime_posix_time_t *posix_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_posix_time_t *internal_posix_time = NULL; static char *function = "libfdatetime_posix_time_copy_to_utf32_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } internal_posix_time = (libfdatetime_internal_posix_time_t *) posix_time; if( libfdatetime_posix_time_copy_to_date_time_values( internal_posix_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( ( *utf32_string_index + 13 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 28; do { byte_value = ( internal_posix_time->timestamp >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ')'; utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; } return( 1 ); } libevt-20170120/libfdatetime/libfdatetime_fat_date_time.h0000664000175000017500000001065013040331701025427 0ustar00lordyestalordyesta00000000000000/* * FAT date and time functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_FAT_DATE_TIME_H ) #define _LIBFDATETIME_INTERNAL_FAT_DATE_TIME_H #include #include #include "libfdatetime_extern.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_internal_fat_date_time libfdatetime_internal_fat_date_time_t; /* Contains two 16-bit value representing * a date since 1980 * a time in 2 second intervals */ struct libfdatetime_internal_fat_date_time { /* The date part */ uint16_t date; /* The time part */ uint16_t time; }; LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_initialize( libfdatetime_fat_date_time_t **fat_date_time, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_free( libfdatetime_fat_date_time_t **fat_date_time, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_from_byte_stream( libfdatetime_fat_date_time_t *fat_date_time, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_from_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_fat_dat_time_copy_to_date_time_values( libfdatetime_internal_fat_date_time_t *internal_fat_date_time, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_get_string_size( libfdatetime_fat_date_time_t *fat_date_time, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_utf8_string( libfdatetime_fat_date_time_t *fat_date_time, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_utf8_string_with_index( libfdatetime_fat_date_time_t *fat_date_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_utf16_string( libfdatetime_fat_date_time_t *fat_date_time, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_utf16_string_with_index( libfdatetime_fat_date_time_t *fat_date_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_utf32_string( libfdatetime_fat_date_time_t *fat_date_time, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_utf32_string_with_index( libfdatetime_fat_date_time_t *fat_date_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATETIME_INTERNAL_FAT_DATE_TIME_H ) */ libevt-20170120/libfdatetime/libfdatetime_types.h0000664000175000017500000000464613040331701024016 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_TYPES_H ) #define _LIBFDATETIME_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFDATETIME for local use of libfdatetime * The definitions in are copied here * for local use of libfdatetime */ #if defined( HAVE_LOCAL_LIBFDATETIME ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfdatetime_fat_date {} 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 ) */ libevt-20170120/libfdatetime/libfdatetime_floatingtime.c0000664000175000017500000006347313040331701025332 0ustar00lordyestalordyesta00000000000000/* * Floatingtime functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_floatingtime.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" /* 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_floatingtime_copy_to_date_time_values( libfdatetime_internal_floatingtime_t *internal_floatingtime, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_floatingtime_copy_to_date_time_values"; double floatingtimestamp = 0; uint32_t days_in_century = 0; uint16_t days_in_year = 0; uint8_t days_in_month = 0; if( internal_floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", function ); return( -1 ); } if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } floatingtimestamp = internal_floatingtime->timestamp.floating_point; /* Determine the number of years starting at '30 Dec 1899 00:00:00' * correct the value to days within the year */ date_time_values->year = 1899; if( floatingtimestamp >= 2 ) { date_time_values->year = 1900; floatingtimestamp -= 2; } while( floatingtimestamp > 0 ) { if( ( date_time_values->year % 400 ) == 0 ) { days_in_century = 36525; } else { days_in_century = 36524; } if( floatingtimestamp <= days_in_century ) { break; } floatingtimestamp -= days_in_century; date_time_values->year += 100; } while( floatingtimestamp > 0 ) { /* Check for a leap year * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 ) */ if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_year = 366; } else { days_in_year = 365; } if( floatingtimestamp <= days_in_year ) { break; } floatingtimestamp -= days_in_year; date_time_values->year += 1; } /* Determine the month correct the value to days within the month */ date_time_values->month = 1; while( floatingtimestamp > 0 ) { /* February (2) */ if( date_time_values->month == 2 ) { if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } } /* April (4), June (6), September (9), November (11) */ else if( ( date_time_values->month == 4 ) || ( date_time_values->month == 6 ) || ( date_time_values->month == 9 ) || ( date_time_values->month == 11 ) ) { days_in_month = 30; } /* January (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( date_time_values->month == 1 ) || ( date_time_values->month == 3 ) || ( date_time_values->month == 5 ) || ( date_time_values->month == 7 ) || ( date_time_values->month == 8 ) || ( date_time_values->month == 10 ) || ( date_time_values->month == 12 ) ) { days_in_month = 31; } /* This should never happen, but just in case */ else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported month: %d.", function, date_time_values->month ); return( -1 ); } if( floatingtimestamp <= days_in_month ) { break; } floatingtimestamp -= days_in_month; date_time_values->month += 1; } /* Determine the day */ date_time_values->day = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->day; /* There are 24 hours in a day correct the value to hours */ floatingtimestamp *= 24; date_time_values->hours = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->hours; /* There are 60 minutes in an hour correct the value to minutes */ floatingtimestamp *= 60; date_time_values->minutes = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->minutes; /* There are 60 seconds in a minute correct the value to seconds */ floatingtimestamp *= 60; date_time_values->seconds = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->seconds; /* There are 1000 milli seconds in a seconds correct the value to milli seconds */ floatingtimestamp *= 1000; date_time_values->milli_seconds = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->milli_seconds; /* There are 1000 micro seconds in a seconds correct the value to micro seconds */ floatingtimestamp *= 1000; date_time_values->micro_seconds = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->micro_seconds; /* There are 1000 nano seconds in a seconds correct the value to nano seconds */ floatingtimestamp *= 1000; date_time_values->nano_seconds = (uint8_t) floatingtimestamp; 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 ); } if( libfdatetime_floatingtime_copy_to_date_time_values( (libfdatetime_internal_floatingtime_t *) floatingtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to date time values.", function ); return( -1 ); } 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 ); } else if( result == 0 ) { /* 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 * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_utf8_string( libfdatetime_floatingtime_t *floatingtime, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_floatingtime_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_floatingtime_copy_to_utf8_string_with_index( floatingtime, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the floatingtime into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_utf8_string_with_index( libfdatetime_floatingtime_t *floatingtime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_floatingtime_t *internal_floatingtime = NULL; static char *function = "libfdatetime_floatingtime_copy_to_utf8_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", function ); return( -1 ); } internal_floatingtime = (libfdatetime_internal_floatingtime_t *) floatingtime; if( libfdatetime_floatingtime_copy_to_date_time_values( internal_floatingtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( ( *utf8_string_index + 24 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 60; do { byte_value = ( internal_floatingtime->timestamp.integer >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ')'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; } return( 1 ); } /* Converts the floatingtime into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_utf16_string( libfdatetime_floatingtime_t *floatingtime, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_floatingtime_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_floatingtime_copy_to_utf16_string_with_index( floatingtime, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the floatingtime into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_utf16_string_with_index( libfdatetime_floatingtime_t *floatingtime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_floatingtime_t *internal_floatingtime = NULL; static char *function = "libfdatetime_floatingtime_copy_to_utf16_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", function ); return( -1 ); } internal_floatingtime = (libfdatetime_internal_floatingtime_t *) floatingtime; if( libfdatetime_floatingtime_copy_to_date_time_values( internal_floatingtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( ( *utf16_string_index + 24 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 60; do { byte_value = ( internal_floatingtime->timestamp.integer >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ')'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; } return( 1 ); } /* Converts the floatingtime into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_utf32_string( libfdatetime_floatingtime_t *floatingtime, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_floatingtime_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_floatingtime_copy_to_utf32_string_with_index( floatingtime, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the floatingtime into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_utf32_string_with_index( libfdatetime_floatingtime_t *floatingtime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_floatingtime_t *internal_floatingtime = NULL; static char *function = "libfdatetime_floatingtime_copy_to_utf32_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", function ); return( -1 ); } internal_floatingtime = (libfdatetime_internal_floatingtime_t *) floatingtime; if( libfdatetime_floatingtime_copy_to_date_time_values( internal_floatingtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( ( *utf32_string_index + 24 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 60; do { byte_value = ( internal_floatingtime->timestamp.integer >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; utf32_string[ string_index++ ] = (uint32_t) ')'; utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; } return( 1 ); } libevt-20170120/libfdatetime/libfdatetime_hfs_time.h0000664000175000017500000001021213040331701024432 0ustar00lordyestalordyesta00000000000000/* * HFS time functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_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_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 ); 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 ); 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 ); 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 ) */ libevt-20170120/libfdatetime/libfdatetime_support.h0000664000175000017500000000230613040331701024355 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_SUPPORT_H ) #define _LIBFDATETIME_SUPPORT_H #include #include #include "libfdatetime_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFDATETIME ) LIBFDATETIME_EXTERN \ const char *libfdatetime_get_version( void ); #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATETIME_SUPPORT_H ) */ libevt-20170120/libfdatetime/libfdatetime_extern.h0000664000175000017500000000262513040331701024152 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_EXTERN_H ) #define _LIBFDATETIME_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFDATETIME for local use of libfdatetime */ #if !defined( HAVE_LOCAL_LIBFDATETIME ) /* If libtool DLL support is enabled set LIBFDATETIME_DLL_EXPORT * before including libfdatetime/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFDATETIME_DLL_EXPORT #endif #include #else #define LIBFDATETIME_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBFDATETIME ) */ #endif /* !defined( _LIBFDATETIME_INTERNAL_EXTERN_H ) */ libevt-20170120/libfdatetime/libfdatetime_filetime.h0000664000175000017500000001072413040331701024442 0ustar00lordyestalordyesta00000000000000/* * FILETIME functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_FILETIME_H ) #define _LIBFDATETIME_INTERNAL_FILETIME_H #include #include #include "libfdatetime_extern.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_internal_filetime libfdatetime_internal_filetime_t; /* Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC) * The upper and lower part are separated due to byte alignment */ struct libfdatetime_internal_filetime { /* The lower filetime part */ uint32_t lower; /* The upper filetime part */ uint32_t upper; }; LIBFDATETIME_EXTERN \ int libfdatetime_filetime_initialize( libfdatetime_filetime_t **filetime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_free( libfdatetime_filetime_t **filetime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_add( libfdatetime_filetime_t *filetime, libfdatetime_filetime_t *additional_filetime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_from_byte_stream( libfdatetime_filetime_t *filetime, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_from_64bit( libfdatetime_filetime_t *filetime, uint64_t value_64bit, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_64bit( libfdatetime_filetime_t *filetime, uint64_t *value_64bit, libcerror_error_t **error ); int libfdatetime_filetime_copy_to_date_time_values( libfdatetime_internal_filetime_t *internal_filetime, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_get_string_size( libfdatetime_filetime_t *filetime, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_utf8_string( libfdatetime_filetime_t *filetime, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_utf8_string_with_index( libfdatetime_filetime_t *filetime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_utf16_string( libfdatetime_filetime_t *filetime, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_utf16_string_with_index( libfdatetime_filetime_t *filetime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_utf32_string( libfdatetime_filetime_t *filetime, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_utf32_string_with_index( libfdatetime_filetime_t *filetime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATETIME_INTERNAL_FILETIME_H ) */ libevt-20170120/libfdatetime/libfdatetime_date_time_values.c0000664000175000017500000014753713040331701026166 0ustar00lordyestalordyesta00000000000000/* * Date and time values functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" /* 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 ); } libevt-20170120/libfdatetime/libfdatetime_floatingtime.h0000664000175000017500000001076213040331701025330 0ustar00lordyestalordyesta00000000000000/* * Floatingtime functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_FLOATINGTIME_H ) #define _LIBFDATETIME_INTERNAL_FLOATINGTIME_H #include #include #include #include "libfdatetime_extern.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_internal_floatingtime libfdatetime_internal_floatingtime_t; /* Contains a 64-bit value containing a floating point where the whole number part represents * the number of days since December 30, 1899 and the fractional part fraction of a day since midnight */ struct libfdatetime_internal_floatingtime { /* The floatingtime floating point */ byte_stream_float64_t timestamp; }; LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_initialize( libfdatetime_floatingtime_t **floatingtime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_free( libfdatetime_floatingtime_t **floatingtime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_from_byte_stream( libfdatetime_floatingtime_t *floatingtime, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_from_64bit( libfdatetime_floatingtime_t *floatingtime, uint64_t value_64bit, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_64bit( libfdatetime_floatingtime_t *floatingtime, uint64_t *value_64bit, libcerror_error_t **error ); int libfdatetime_floatingtime_copy_to_date_time_values( libfdatetime_internal_floatingtime_t *internal_floatingtime, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_get_string_size( libfdatetime_floatingtime_t *floatingtime, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_utf8_string( libfdatetime_floatingtime_t *floatingtime, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_utf8_string_with_index( libfdatetime_floatingtime_t *floatingtime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_utf16_string( libfdatetime_floatingtime_t *floatingtime, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_utf16_string_with_index( libfdatetime_floatingtime_t *floatingtime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_utf32_string( libfdatetime_floatingtime_t *floatingtime, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_utf32_string_with_index( libfdatetime_floatingtime_t *floatingtime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATETIME_INTERNAL_FLOATINGTIME_H ) */ libevt-20170120/libfdatetime/libfdatetime_libcerror.h0000664000175000017500000000265513040331701024633 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_LIBCERROR_H ) #define _LIBFDATETIME_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFDATETIME_LIBCERROR_H ) */ libevt-20170120/libfdatetime/Makefile.in0000664000175000017500000010203513040342657022040 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFDATETIME_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ @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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfdatetime/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfdatetime/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_fat_date_time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_filetime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_floatingtime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_hfs_time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_nsf_timedate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_posix_time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_systemtime.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfdatetime ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdatetime_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libfdatetime/libfdatetime_nsf_timedate.c0000664000175000017500000007121513040331701025303 0ustar00lordyestalordyesta00000000000000/* * Notes Storage Facility (NSF) timedate functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_nsf_timedate.h" #include "libfdatetime_types.h" /* 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_nsf_timedate_copy_to_date_time_values( libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_nsf_timedate_copy_to_date_time_values"; uint32_t nsf_julian_day = 0; uint32_t nsf_time = 0; uint32_t number_of_years = 0; uint32_t number_of_months = 0; uint32_t julian_quad_cycles = 0; uint32_t gregorian_cent_cycles = 0; uint32_t gregorian_quad_cycles = 0; uint32_t roman_annual_cycles = 0; if( internal_nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", function ); return( -1 ); } if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } /* TODO what about dates before 1582 ? */ /* Retrieve the Julian day value which is stored in the 24 LSB of the upper value * the NSF Julian day starts with January 1, 4713 BC 00:00 UTC * instead of January 1, 4713 BC 12:00 UTC */ nsf_julian_day = internal_nsf_timedate->upper & 0x00ffffffUL; /* Shift the epoch back to March 1, 4800 BC 00:00 * This is the beginning of the Gregorian quadricentennial * which is 32044 days before the Julian period */ nsf_julian_day += 32044; /* Determine the number of Gregorian quadricentennial cycles * 1 cycle consists of 146097 days */ gregorian_quad_cycles = nsf_julian_day / 146097; nsf_julian_day %= 146097; /* Determine the number of Gregorian centennial cycles * 1 cycle consists of 36524 days * Correct for leap years per cycle, either 3 or 4 */ gregorian_cent_cycles = ( ( ( nsf_julian_day / 36524 ) + 1 ) * 3 ) / 4; nsf_julian_day -= gregorian_cent_cycles * 36524; /* Determine the number of Julian quadrennial cycles * 1 cycle consists of 1461 days per 4 year */ julian_quad_cycles = nsf_julian_day / 1461; nsf_julian_day %= 1461; /* Determine the number of Roman annual cycles * 1 cycle consists of 365 days * Correct for leap years per cycle, either 3 or 4 */ roman_annual_cycles = ( ( ( nsf_julian_day / 365 ) + 1 ) * 3 ) / 4; /* The number of days remaining in the current Julian year */ nsf_julian_day -= roman_annual_cycles * 365; /* Determine the number of years since March 1, 4801 BC */ number_of_years = ( gregorian_quad_cycles * 400 ) + ( gregorian_cent_cycles * 100 ) + ( julian_quad_cycles * 4 ) + roman_annual_cycles; /* Determine the number of months since March */ number_of_months = ( ( ( nsf_julian_day * 5 ) + 308 ) / 153 ) - 2; /* Determine the number of days since the 1st of the month */ nsf_julian_day -= ( ( ( number_of_months + 4 ) * 153 ) / 5 ); nsf_julian_day += 122; /* Determine the year */ date_time_values->year = (uint16_t) ( number_of_years - 4800 + ( ( number_of_months + 2 ) / 12 ) ); /* Determine the month */ date_time_values->month = ( ( number_of_months + 2 ) % 12 ) + 1; /* Determine the day of the month */ date_time_values->day = (uint8_t) ( nsf_julian_day + 1 ); /* Retrieve the number of seconds from the lower part of the NFS timedate */ nsf_time = internal_nsf_timedate->lower; /* The timestamp is in units of 10 milli seconds correct the value to seconds */ date_time_values->nano_seconds = 0; date_time_values->micro_seconds = 0; date_time_values->milli_seconds = ( nsf_time % 100 ) * 10; nsf_time /= 100; /* There are 60 seconds in a minute correct the value to minutes */ date_time_values->seconds = nsf_time % 60; nsf_time /= 60; /* There are 60 minutes in an hour correct the value to hours */ date_time_values->minutes = nsf_time % 60; nsf_time /= 60; /* There are 24 hours in a day correct the value to days */ date_time_values->hours = (uint8_t) nsf_time; /* TODO day light savings and timezone */ return( 1 ); } /* Deterimes the size of the string for the NSF timedate * The string size includes the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_get_string_size( libfdatetime_nsf_timedate_t *nsf_timedate, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; static char *function = "libfdatetime_nsf_timedate_get_string_size"; 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 ); } if( libfdatetime_nsf_timedate_copy_to_date_time_values( (libfdatetime_internal_nsf_timedate_t *) nsf_timedate, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } 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 ); } else if( result == 0 ) { /* 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 * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_utf8_string( libfdatetime_nsf_timedate_t *nsf_timedate, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_nsf_timedate_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_nsf_timedate_copy_to_utf8_string_with_index( nsf_timedate, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy NSF timedate to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the NSF timedate into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_utf8_string_with_index( libfdatetime_nsf_timedate_t *nsf_timedate, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate = NULL; static char *function = "libfdatetime_nsf_timedate_copy_to_utf8_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", function ); return( -1 ); } internal_nsf_timedate = (libfdatetime_internal_nsf_timedate_t *) nsf_timedate; if( libfdatetime_nsf_timedate_copy_to_date_time_values( internal_nsf_timedate, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( ( *utf8_string_index + 24 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 28; do { byte_value = ( internal_nsf_timedate->upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 28; do { byte_value = ( internal_nsf_timedate->lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ')'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; } return( 1 ); } /* Converts the NSF timedate into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_utf16_string( libfdatetime_nsf_timedate_t *nsf_timedate, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_nsf_timedate_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_nsf_timedate_copy_to_utf16_string_with_index( nsf_timedate, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy NSF timedate to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the NSF timedate into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_utf16_string_with_index( libfdatetime_nsf_timedate_t *nsf_timedate, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate = NULL; static char *function = "libfdatetime_nsf_timedate_copy_to_utf16_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", function ); return( -1 ); } internal_nsf_timedate = (libfdatetime_internal_nsf_timedate_t *) nsf_timedate; if( libfdatetime_nsf_timedate_copy_to_date_time_values( internal_nsf_timedate, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( ( *utf16_string_index + 24 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 28; do { byte_value = ( internal_nsf_timedate->upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 28; do { byte_value = ( internal_nsf_timedate->lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ')'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; } return( 1 ); } /* Converts the NSF timedate into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_utf32_string( libfdatetime_nsf_timedate_t *nsf_timedate, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_nsf_timedate_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_nsf_timedate_copy_to_utf32_string_with_index( nsf_timedate, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy NSF timedate to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the NSF timedate into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_utf32_string_with_index( libfdatetime_nsf_timedate_t *nsf_timedate, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate = NULL; static char *function = "libfdatetime_nsf_timedate_copy_to_utf32_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", function ); return( -1 ); } internal_nsf_timedate = (libfdatetime_internal_nsf_timedate_t *) nsf_timedate; if( libfdatetime_nsf_timedate_copy_to_date_time_values( internal_nsf_timedate, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( ( *utf32_string_index + 24 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 28; do { byte_value = ( internal_nsf_timedate->upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 28; do { byte_value = ( internal_nsf_timedate->lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ')'; utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; } return( 1 ); } libevt-20170120/libfdatetime/libfdatetime_date_time_values.h0000664000175000017500000000607513040331701026162 0ustar00lordyestalordyesta00000000000000/* * Date and time values functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_DATE_TIME_VALUES_H ) #define _LIBFDATETIME_DATE_TIME_VALUES_H #include #include #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_date_time_values libfdatetime_date_time_values_t; struct libfdatetime_date_time_values { /* The year */ uint16_t year; /* The month * 1 represents January */ uint8_t month; /* The day of the month */ uint8_t day; /* The number of hours in 24 hour format * E.g. 13 represents 1 PM */ uint8_t hours; /* The number of minutes */ uint8_t minutes; /* The number of seconds */ uint8_t seconds; /* The number of milli seconds */ uint16_t milli_seconds; /* The number of micro seconds */ uint16_t micro_seconds; /* The number of nano seconds */ uint16_t nano_seconds; }; int libfdatetime_date_time_values_initialize( libfdatetime_date_time_values_t **date_time_values, libcerror_error_t **error ); int libfdatetime_date_time_values_free( libfdatetime_date_time_values_t **date_time_values, libcerror_error_t **error ); int libfdatetime_date_time_values_get_string_size( libfdatetime_date_time_values_t *date_time_values, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfdatetime_date_time_values_copy_to_utf8_string_with_index( libfdatetime_date_time_values_t *date_time_values, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfdatetime_date_time_values_copy_to_utf16_string_with_index( libfdatetime_date_time_values_t *date_time_values, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfdatetime_date_time_values_copy_to_utf32_string_with_index( libfdatetime_date_time_values_t *date_time_values, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATETIME_DATE_TIME_VALUES_H ) */ libevt-20170120/libfdatetime/libfdatetime_hfs_time.c0000664000175000017500000006353313040331701024443 0ustar00lordyestalordyesta00000000000000/* * HFS time functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_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_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_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 ); } if( libfdatetime_hfs_time_copy_to_date_time_values( (libfdatetime_internal_hfs_time_t *) hfs_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } 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 ); } else if( result == 0 ) { /* 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 * 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"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; 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; if( libfdatetime_hfs_time_copy_to_date_time_values( internal_hfs_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( ( *utf8_string_index + 13 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 28; do { byte_value = ( internal_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-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"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; 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; if( libfdatetime_hfs_time_copy_to_date_time_values( internal_hfs_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( ( *utf16_string_index + 13 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 28; do { byte_value = ( internal_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-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"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; 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; if( libfdatetime_hfs_time_copy_to_date_time_values( internal_hfs_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( ( *utf32_string_index + 13 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 28; do { byte_value = ( internal_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 ); } libevt-20170120/libfdatetime/libfdatetime_posix_time.h0000664000175000017500000001156113040331701025024 0ustar00lordyestalordyesta00000000000000/* * POSIX time functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_POSIX_TIME_H ) #define _LIBFDATETIME_INTERNAL_POSIX_TIME_H #include #include #include "libfdatetime_extern.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_internal_posix_time libfdatetime_internal_posix_time_t; /* Contains a value representing the number of seconds since January 1, 1970 (UTC) * Normally this value is a 32-bit signed integer where negative numbers predate * the epoch, but different variations exists */ struct libfdatetime_internal_posix_time { /* The timestamp */ uint64_t timestamp; /* The value type */ uint8_t value_type; }; LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_initialize( libfdatetime_posix_time_t **posix_time, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_free( libfdatetime_posix_time_t **posix_time, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_from_byte_stream( libfdatetime_posix_time_t *posix_time, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, uint8_t value_type, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_from_32bit( libfdatetime_posix_time_t *posix_time, uint32_t value_32bit, uint8_t value_type, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_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_posix_time_copy_to_date_time_values( libfdatetime_internal_posix_time_t *internal_posix_time, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_get_string_size( libfdatetime_posix_time_t *posix_time, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_utf8_string( libfdatetime_posix_time_t *posix_time, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_utf8_string_with_index( libfdatetime_posix_time_t *posix_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_utf16_string( libfdatetime_posix_time_t *posix_time, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_utf16_string_with_index( libfdatetime_posix_time_t *posix_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_utf32_string( libfdatetime_posix_time_t *posix_time, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_utf32_string_with_index( libfdatetime_posix_time_t *posix_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATETIME_INTERNAL_POSIX_TIME_H ) */ libevt-20170120/libfdatetime/libfdatetime_fat_date_time.c0000664000175000017500000006535013040331701025431 0ustar00lordyestalordyesta00000000000000/* * FAT date and time functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_fat_date_time.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" /* 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_fat_date_time_copy_to_date_time_values( libfdatetime_internal_fat_date_time_t *internal_fat_date_time, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_fat_date_time_copy_to_date_time_values"; if( internal_fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 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 ); } if( libfdatetime_fat_date_time_copy_to_date_time_values( (libfdatetime_internal_fat_date_time_t *) fat_date_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } 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 ); } else if( result == 0 ) { /* 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 * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_utf8_string( libfdatetime_fat_date_time_t *fat_date_time, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_fat_date_time_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_fat_date_time_copy_to_utf8_string_with_index( fat_date_time, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy FAT date time to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the FAT date and time into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_utf8_string_with_index( libfdatetime_fat_date_time_t *fat_date_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_fat_date_time_t *internal_fat_date_time = NULL; static char *function = "libfdatetime_fat_date_time_copy_to_utf8_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FAT date time.", function ); return( -1 ); } internal_fat_date_time = (libfdatetime_internal_fat_date_time_t *) fat_date_time; if( libfdatetime_fat_date_time_copy_to_date_time_values( internal_fat_date_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-8 string.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( ( *utf8_string_index + 16 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 12; do { byte_value = ( internal_fat_date_time->date >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 12; do { byte_value = ( internal_fat_date_time->time >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ')'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; } return( 1 ); } /* Converts the FAT date and time into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_utf16_string( libfdatetime_fat_date_time_t *fat_date_time, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_fat_date_time_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_fat_date_time_copy_to_utf16_string_with_index( fat_date_time, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy FAT date time to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the FAT date and time into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_utf16_string_with_index( libfdatetime_fat_date_time_t *fat_date_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_fat_date_time_t *internal_fat_date_time = NULL; static char *function = "libfdatetime_fat_date_time_copy_to_utf16_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FAT date time.", function ); return( -1 ); } internal_fat_date_time = (libfdatetime_internal_fat_date_time_t *) fat_date_time; if( libfdatetime_fat_date_time_copy_to_date_time_values( internal_fat_date_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-16 string.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( ( *utf16_string_index + 16 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 12; do { byte_value = ( internal_fat_date_time->date >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 12; do { byte_value = ( internal_fat_date_time->time >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ')'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; } return( 1 ); } /* Converts the FAT date and time into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_utf32_string( libfdatetime_fat_date_time_t *fat_date_time, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_fat_date_time_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_fat_date_time_copy_to_utf32_string_with_index( fat_date_time, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy FAT date time to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the FAT date and time into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_utf32_string_with_index( libfdatetime_fat_date_time_t *fat_date_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_fat_date_time_t *internal_fat_date_time = NULL; static char *function = "libfdatetime_fat_date_time_copy_to_utf32_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FAT date time.", function ); return( -1 ); } internal_fat_date_time = (libfdatetime_internal_fat_date_time_t *) fat_date_time; if( libfdatetime_fat_date_time_copy_to_date_time_values( internal_fat_date_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-32 string.", function ); return( -1 ); } else if( result == 0 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( ( *utf32_string_index + 16 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 12; do { byte_value = ( internal_fat_date_time->date >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 12; do { byte_value = ( internal_fat_date_time->time >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ')'; utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; } return( 1 ); } libevt-20170120/libfdatetime/libfdatetime_nsf_timedate.h0000664000175000017500000001152513040331701025306 0ustar00lordyestalordyesta00000000000000/* * Notes Storage Facility (NSF) timedate functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_NSF_TIMEDATE_H ) #define _LIBFDATETIME_INTERNAL_NSF_TIMEDATE_H #include #include #include "libfdatetime_extern.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_internal_nsf_timedate libfdatetime_internal_nsf_timedate_t; /* Contains a 64-bit value which consists of: * The lower 32-bit value represents the number of 100th seconds * The upper 32-bit value which consists of: * a 24-bit value which contains the number of Julian day * a 4-bit value which contains the UTC timezone difference in hours * a 2-bit value which contains the UTC timezone difference in 15 minutes periods * a 1-bit value to indicate if the timezone difference is negative (0) or positive (1) * a 1-bit value to indicate if the day light savings are active */ struct libfdatetime_internal_nsf_timedate { /* The lower nsf timedate part */ uint32_t lower; /* The upper nsf timedate part */ uint32_t upper; }; LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_initialize( libfdatetime_nsf_timedate_t **nsf_timedate, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_free( libfdatetime_nsf_timedate_t **nsf_timedate, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_from_byte_stream( libfdatetime_nsf_timedate_t *nsf_timedate, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_from_64bit( libfdatetime_nsf_timedate_t *nsf_timedate, uint64_t value_64bit, libcerror_error_t **error ); 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_nsf_timedate_copy_to_date_time_values( libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_get_string_size( libfdatetime_nsf_timedate_t *nsf_timedate, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_utf8_string( libfdatetime_nsf_timedate_t *nsf_timedate, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_utf8_string_with_index( libfdatetime_nsf_timedate_t *nsf_timedate, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_utf16_string( libfdatetime_nsf_timedate_t *nsf_timedate, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_utf16_string_with_index( libfdatetime_nsf_timedate_t *nsf_timedate, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_utf32_string( libfdatetime_nsf_timedate_t *nsf_timedate, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_utf32_string_with_index( libfdatetime_nsf_timedate_t *nsf_timedate, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATETIME_INTERNAL_NSF_TIMEDATE_H ) */ libevt-20170120/libfdatetime/libfdatetime_definitions.h0000664000175000017500000000755213040331701025164 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBFDATETIME_INTERNAL_DEFINITIONS_H ) #define LIBFDATETIME_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBFDATETIME for local use of libfdatetime */ #if !defined( HAVE_LOCAL_LIBFDATETIME ) #include /* The definitions in are copied here * for local use of libfdatetime */ #else #include #define LIBFDATETIME_VERSION 20170112 /* The version string */ #define LIBFDATETIME_VERSION_STRING "20170112" /* 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 }; #endif #endif libevt-20170120/libfdatetime/libfdatetime_systemtime.c0000664000175000017500000011206313040331701025041 0ustar00lordyestalordyesta00000000000000/* * SYSTEMTIME functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_systemtime.h" #include "libfdatetime_types.h" /* 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_systemtime_copy_to_date_time_values( libfdatetime_internal_systemtime_t *internal_systemtime, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_systemtime_copy_to_date_time_values"; uint8_t days_in_month = 0; if( internal_systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 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 ); } if( libfdatetime_systemtime_copy_to_date_time_values( (libfdatetime_internal_systemtime_t *) systemtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to date time values.", function ); return( -1 ); } 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 ); } else if( result == 0 ) { /* Make sure the string can hold the hexadecimal representation of the systemtime */ *string_size = 57; } return( 1 ); } /* Converts the systemtime into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_utf8_string( libfdatetime_systemtime_t *systemtime, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_systemtime_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_systemtime_copy_to_utf8_string_with_index( systemtime, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the systemtime into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_utf8_string_with_index( libfdatetime_systemtime_t *systemtime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_systemtime_t *internal_systemtime = NULL; static char *function = "libfdatetime_systemtime_copy_to_utf8_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid systemtime.", function ); return( -1 ); } internal_systemtime = (libfdatetime_internal_systemtime_t *) systemtime; if( libfdatetime_systemtime_copy_to_date_time_values( internal_systemtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( ( *utf8_string_index + 57 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->year >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->month >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->day_of_week >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->day_of_month >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->hours >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->minutes >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->seconds >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->milli_seconds >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ')'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; } return( 1 ); } /* Converts the systemtime into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_utf16_string( libfdatetime_systemtime_t *systemtime, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_systemtime_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_systemtime_copy_to_utf16_string_with_index( systemtime, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the systemtime into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_utf16_string_with_index( libfdatetime_systemtime_t *systemtime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_systemtime_t *internal_systemtime = NULL; static char *function = "libfdatetime_systemtime_copy_to_utf16_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid systemtime.", function ); return( -1 ); } internal_systemtime = (libfdatetime_internal_systemtime_t *) systemtime; if( libfdatetime_systemtime_copy_to_date_time_values( internal_systemtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( ( *utf16_string_index + 57 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->year >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->month >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->day_of_week >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->day_of_month >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->hours >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->minutes >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->seconds >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->milli_seconds >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ')'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; } return( 1 ); } /* Converts the systemtime into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_utf32_string( libfdatetime_systemtime_t *systemtime, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_systemtime_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_systemtime_copy_to_utf32_string_with_index( systemtime, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the systemtime into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_utf32_string_with_index( libfdatetime_systemtime_t *systemtime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_systemtime_t *internal_systemtime = NULL; static char *function = "libfdatetime_systemtime_copy_to_utf32_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid systemtime.", function ); return( -1 ); } internal_systemtime = (libfdatetime_internal_systemtime_t *) systemtime; if( libfdatetime_systemtime_copy_to_date_time_values( internal_systemtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( ( *utf32_string_index + 57 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->year >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->month >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->day_of_week >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->day_of_month >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->hours >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->minutes >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->seconds >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->milli_seconds >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ')'; utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; } return( 1 ); } libevt-20170120/libfdatetime/libfdatetime_filetime.c0000664000175000017500000007273313040331701024445 0ustar00lordyestalordyesta00000000000000/* * FILETIME functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_filetime.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" /* 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_filetime_copy_to_date_time_values( libfdatetime_internal_filetime_t *internal_filetime, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_filetime_copy_to_date_time_values"; uint64_t filetimestamp = 0; uint32_t days_in_century = 0; uint16_t days_in_year = 0; uint8_t days_in_month = 0; if( internal_filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } /* Combine the lower and upper filetime parts into a single filetime timestamp */ filetimestamp = ( (uint64_t) ( internal_filetime->upper ) << 32 ) + internal_filetime->lower; /* The timestamp is in units of 100 nano seconds correct the value to seconds */ date_time_values->nano_seconds = ( filetimestamp % 10 ) * 100; filetimestamp /= 10; date_time_values->micro_seconds = filetimestamp % 1000; filetimestamp /= 1000; date_time_values->milli_seconds = filetimestamp % 1000; filetimestamp /= 1000; /* There are 60 seconds in a minute correct the value to minutes */ date_time_values->seconds = filetimestamp % 60; filetimestamp /= 60; /* There are 60 minutes in an hour correct the value to hours */ date_time_values->minutes = filetimestamp % 60; filetimestamp /= 60; /* There are 24 hours in a day correct the value to days */ date_time_values->hours = filetimestamp % 24; filetimestamp /= 24; /* Add 1 day to compensate that Jan 1 1601 is represented as 0 */ filetimestamp += 1; /* Determine the number of years starting at '1 Jan 1601 00:00:00' * correct the value to days within the year */ date_time_values->year = 1601; if( filetimestamp >= 36159 ) { date_time_values->year = 1700; filetimestamp -= 36159; } while( filetimestamp > 0 ) { if( ( date_time_values->year % 400 ) == 0 ) { days_in_century = 36525; } else { days_in_century = 36524; } if( filetimestamp <= days_in_century ) { break; } filetimestamp -= days_in_century; date_time_values->year += 100; } while( filetimestamp > 0 ) { /* Check for a leap year * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 ) */ if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_year = 366; } else { days_in_year = 365; } if( filetimestamp <= days_in_year ) { break; } filetimestamp -= days_in_year; date_time_values->year += 1; } /* Determine the month correct the value to days within the month */ date_time_values->month = 1; while( filetimestamp > 0 ) { /* February (2) */ if( date_time_values->month == 2 ) { if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } } /* April (4), June (6), September (9), November (11) */ else if( ( date_time_values->month == 4 ) || ( date_time_values->month == 6 ) || ( date_time_values->month == 9 ) || ( date_time_values->month == 11 ) ) { days_in_month = 30; } /* January (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( date_time_values->month == 1 ) || ( date_time_values->month == 3 ) || ( date_time_values->month == 5 ) || ( date_time_values->month == 7 ) || ( date_time_values->month == 8 ) || ( date_time_values->month == 10 ) || ( date_time_values->month == 12 ) ) { days_in_month = 31; } /* This should never happen, but just in case */ else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported month: %d.", function, date_time_values->month ); return( -1 ); } if( filetimestamp <= days_in_month ) { break; } filetimestamp -= days_in_month; date_time_values->month += 1; } /* Determine the day */ date_time_values->day = (uint8_t) filetimestamp; return( 1 ); } /* Deterimes the size of the string for the filetime * The string size includes the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_get_string_size( libfdatetime_filetime_t *filetime, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; static char *function = "libfdatetime_filetime_get_string_size"; 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 ); } if( libfdatetime_filetime_copy_to_date_time_values( (libfdatetime_internal_filetime_t *) filetime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to date time values.", function ); return( -1 ); } 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 ); } else if( result == 0 ) { /* 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 * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_utf8_string( libfdatetime_filetime_t *filetime, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_filetime_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_filetime_copy_to_utf8_string_with_index( filetime, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the filetime into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_utf8_string_with_index( libfdatetime_filetime_t *filetime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_filetime_t *internal_filetime = NULL; static char *function = "libfdatetime_filetime_copy_to_utf8_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } internal_filetime = (libfdatetime_internal_filetime_t *) filetime; if( libfdatetime_filetime_copy_to_date_time_values( internal_filetime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( ( *utf8_string_index + 24 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 28; do { byte_value = ( internal_filetime->upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 28; do { byte_value = ( internal_filetime->lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ')'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; } return( 1 ); } /* Converts the filetime into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_utf16_string( libfdatetime_filetime_t *filetime, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_filetime_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_filetime_copy_to_utf16_string_with_index( filetime, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the filetime into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_utf16_string_with_index( libfdatetime_filetime_t *filetime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_filetime_t *internal_filetime = NULL; static char *function = "libfdatetime_filetime_copy_to_utf16_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } internal_filetime = (libfdatetime_internal_filetime_t *) filetime; if( libfdatetime_filetime_copy_to_date_time_values( internal_filetime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( ( *utf16_string_index + 24 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 28; do { byte_value = ( internal_filetime->upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 28; do { byte_value = ( internal_filetime->lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ')'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; } return( 1 ); } /* Converts the filetime into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_utf32_string( libfdatetime_filetime_t *filetime, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_filetime_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_filetime_copy_to_utf32_string_with_index( filetime, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the filetime into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_utf32_string_with_index( libfdatetime_filetime_t *filetime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_filetime_t *internal_filetime = NULL; static char *function = "libfdatetime_filetime_copy_to_utf32_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } internal_filetime = (libfdatetime_internal_filetime_t *) filetime; if( libfdatetime_filetime_copy_to_date_time_values( internal_filetime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( ( *utf32_string_index + 24 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 28; do { byte_value = ( internal_filetime->upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 28; do { byte_value = ( internal_filetime->lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ')'; utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; } return( 1 ); } libevt-20170120/libcfile/0000775000175000017500000000000013040343016017100 5ustar00lordyestalordyesta00000000000000libevt-20170120/libcfile/libcfile_file.c0000664000175000017500000032730013040331677022033 0ustar00lordyestalordyesta00000000000000/* * File functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #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" #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 ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ /* 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; if( internal_file->block_data != NULL ) { memory_free( internal_file->block_data ); } memory_free( internal_file ); } return( result ); } #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* 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 ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ /* 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 ) /* 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 ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_open_with_error_code"; size_t filename_length = 0; DWORD file_io_access_flags = 0; DWORD file_io_creation_flags = 0; DWORD file_io_shared_flags = 0; DWORD flags_and_attributes = 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 ); } 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( 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 ); } 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 ) #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* 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( WINAPI ) && ( WINVER <= 0x0500 ) */ /* 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 ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_open_wide_with_error_code"; size_t filename_length = 0; DWORD file_io_access_flags = 0; DWORD file_io_creation_flags = 0; DWORD file_io_shared_flags = 0; DWORD flags_and_attributes = 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 ); } 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( 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; } 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 ) && ( WINVER <= 0x0500 ) /* 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 ); } #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* 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 ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #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( 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->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( (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( size == 0 ) { return( 0 ); } 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 ); } if( internal_file->block_size == 0 ) { read_size = size; } else { read_size_remainder = size % internal_file->block_size; read_size = 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 ) ) { /* Windows devices sometimes don't allow to read the last block * this behavior is seen with e.g. \\.\D: */ if( ( internal_file->is_device_filename != 0 ) && ( ( read_size - read_count ) == internal_file->block_size ) && ( (size64_t) internal_file->current_offset == ( internal_file->size - internal_file->block_size ) ) ) { result = 1; } else { result = 0; } } else { result = 1; } if( result != 0 ) { buffer_offset += (size_t) read_count; internal_file->current_offset += read_count; } /* Non-buffered Windows devices require the buffer to be aligned. * The alignment can be determined by GetFileInformationByHandleEx. * The ReadFile function appears to return ERROR_INVALID_PARAMETER * in case it fails on alignment. */ else if( *error_code == ERROR_INVALID_PARAMETER ) { /* As a fallback read the data using the block data buffer */ while( read_size > 0 ) { 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 ); } if( memory_copy( &( buffer[ buffer_offset ] ), internal_file->block_data, internal_file->block_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 += internal_file->block_size; read_size -= internal_file->block_size; internal_file->current_offset += internal_file->block_size; } } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: invalid read count: %" PRIzd " returned.", function, read_count ); return( -1 ); } } if( read_size_remainder > 0 ) { /* The read was cut short */ if( read_count != (ssize_t) read_size ) { return( (ssize_t) buffer_offset ); } 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->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( (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( size == 0 ) { return( 0 ); } 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 ); } if( internal_file->block_size == 0 ) { read_size = size; } else { read_size_remainder = size % internal_file->block_size; read_size = 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; } if( read_size_remainder > 0 ) { /* The read was cut short */ if( read_count != (ssize_t) read_size ) { return( (ssize_t) buffer_offset ); } 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 ) && ( WINVER <= 0x0500 ) /* 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 ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #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; 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; return( write_count ); } #else #error Missing file write function #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) #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 ); } #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 ) && ( WINVER <= 0x0500 ) /* 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 ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #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 ); } #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* 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 ); } #endif /* 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_file_get_size( libcfile_file_t *file, size64_t *size, libcerror_error_t **error ) { DISK_GEOMETRY disk_geometry; GET_LENGTH_INFORMATION length_information; libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_get_size"; size_t read_count = 0; LARGE_INTEGER large_integer_size = LIBCFILE_LARGE_INTEGER_ZERO; uint32_t error_code = 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 ); } 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( 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_file_io_control_read_with_error_code( 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_file_io_control_read( file, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0, (uint8_t *) &disk_geometry, sizeof( DISK_GEOMETRY ), 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 += 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 ) + 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_file_get_size( libcfile_file_t *file, size64_t *size, libcerror_error_t **error ) { struct stat file_statistics; libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_get_size"; off64_t current_offset = 0; off64_t offset = 0; ssize_t read_count = 0; size_t file_statistics_size = 0; #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( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->descriptor == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing descriptor.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } file_statistics_size = sizeof( struct stat ); if( memory_set( &file_statistics, 0, file_statistics_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file statistics.", function ); return( -1 ); } if( 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_file_io_control_read( file, (uint32_t) BLKGETSIZE64, NULL, 0, (uint8_t *) size, 8, 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_file_io_control_read( file, (uint32_t) DIOCGMEDIASIZE, NULL, 0, (uint8_t *) size, 8, 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_file_io_control_read( file, (uint32_t) DIOCGDINFO, NULL, 0, (uint8_t *) &disk_label, sizeof( struct disklabel ), 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 { *size = disk_label.d_secperunit * disk_label.d_secsize; } #elif defined( DKIOCGETBLOCKCOUNT ) && defined( DKIOCGETBLOCKSIZE ) read_count = libcfile_file_io_control_read( file, (uint32_t) DKIOCGETBLOCKSIZE, NULL, 0, (uint8_t *) &bytes_per_sector, 4, 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_file_io_control_read( file, (uint32_t) DKIOCGETBLOCKCOUNT, NULL, 0, (uint8_t *) &block_count, 4, 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 *size = (size64_t) ( block_count * bytes_per_sector ); } } #endif 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( 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( file, 0, SEEK_END, error ); if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek end of file.", function ); return( -1 ); } *size = (size64_t) offset; offset = libcfile_file_seek_offset( file, current_offset, SEEK_SET, error ); if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset: %" PRIi64 ".", function, current_offset ); return( -1 ); } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: device media size: %" PRIu64 "\n", function, *size ); } #endif } else { *size = (size64_t) file_statistics.st_size; } return( 1 ); } #else #error Missing file get size function #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* 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 ) /* 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"; size_t file_statistics_size = 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 ); } file_statistics_size = sizeof( struct stat ); if( memory_set( &file_statistics, 0, file_statistics_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file statistics.", function ); return( -1 ); } if( 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 /* 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 ) { static char *function = "libcfile_file_io_control_read"; ssize_t read_count = 0; uint32_t error_code = 0; read_count = libcfile_file_io_control_read_with_error_code( 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 ); } #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_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"; #if defined( WINAPI ) DWORD response_count = 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( 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 /* 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_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 != internal_file->block_size ) { if( libcfile_file_get_size( 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 ); } if( internal_file->block_data != NULL ) { memory_free( internal_file->block_data ); internal_file->block_data = NULL; internal_file->block_data_size = 0; } if( block_size > 0 ) { if( ( 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 ); } internal_file->block_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * block_size ); if( internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create file.", 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 ); } libevt-20170120/libcfile/libcfile_libclocale.h0000664000175000017500000000266613040331677023217 0ustar00lordyestalordyesta00000000000000/* * The internal libclocale header * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_LIBCLOCALE_H ) #define _LIBCFILE_LIBCLOCALE_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if defined( HAVE_LOCAL_LIBCLOCALE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT * before including libclocale.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCLOCALE_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _LIBCFILE_LIBCLOCALE_H ) */ libevt-20170120/libcfile/libcfile_support.c0000664000175000017500000006011113040331677022622 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #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" #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 ) && ( 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( 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"; int result = 1; DWORD error_code = 0; DWORD file_attributes = 0; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } #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 ) && ( 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 ) */ #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"; int result = 1; DWORD error_code = 0; DWORD file_attributes = 0; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } #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 ) */ #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 ) */ /* 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( 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 ) #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 ) */ /* 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( 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 ) */ libevt-20170120/libcfile/libcfile_support.h0000664000175000017500000000573413040331677022641 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_SUPPORT_H ) #define _LIBCFILE_SUPPORT_H #include #include #include "libcfile_extern.h" #include "libcfile_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCFILE ) LIBCFILE_EXTERN \ const char *libcfile_get_version( void ); 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 ) */ #if defined( WINAPI ) && ( WINVER <= 0x0500 ) DWORD libcfile_GetFileAttributesA( LPCSTR filename ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ LIBCFILE_EXTERN \ int libcfile_file_exists( const char *filename, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) #if defined( WINAPI ) && ( WINVER <= 0x0500 ) DWORD libcfile_GetFileAttributesW( LPCWSTR filename ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ LIBCFILE_EXTERN \ int libcfile_file_exists_wide( const wchar_t *filename, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcfile_DeleteFileA( LPCSTR filename ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ 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 ) #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcfile_DeleteFileW( LPCWSTR filename ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ 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 ) */ libevt-20170120/libcfile/libcfile_error.c0000664000175000017500000000554013040331677022244 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcfile_error.h" #include "libcfile_libcerror.h" #if !defined( HAVE_LOCAL_LIBCFILE ) /* Free an error and its elements */ void libcfile_error_free( libcfile_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcfile_error_fprint( libcfile_error_t *error, FILE *stream ) { 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 ) */ libevt-20170120/libcfile/Makefile.am0000664000175000017500000000154313012271464021145 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBCFILE AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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 endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcfile ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcfile_la_SOURCES) libevt-20170120/libcfile/libcfile_libcerror.h0000664000175000017500000000264113040331677023102 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_LIBCERROR_H ) #define _LIBCFILE_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBCFILE_LIBCERROR_H ) */ libevt-20170120/libcfile/libcfile_unused.h0000664000175000017500000000254613040331700022411 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_INTERNAL_UNUSED_H ) #define _LIBCFILE_INTERNAL_UNUSED_H #include #if !defined( LIBCFILE_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCFILE_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCFILE_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCFILE_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCFILE_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBCFILE_INTERNAL_UNUSED_H ) */ libevt-20170120/libcfile/libcfile_types.h0000664000175000017500000000273313040331700022250 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_INTERNAL_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 ) */ libevt-20170120/libcfile/libcfile_extern.h0000664000175000017500000000254513040331677022427 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_INTERNAL_EXTERN_H ) #define _LIBCFILE_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCFILE for local use of libcfile */ #if !defined( HAVE_LOCAL_LIBCFILE ) /* If libtool DLL support is enabled set LIBCFILE_DLL_EXPORT * before including libcfile/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCFILE_DLL_EXPORT #endif #include #else #define LIBCFILE_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */ #endif /* !defined( _LIBCFILE_INTERNAL_EXTERN_H ) */ libevt-20170120/libcfile/libcfile_notify.h0000664000175000017500000000307313040331677022427 0ustar00lordyestalordyesta00000000000000/* * Notification functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_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 ) */ libevt-20170120/libcfile/libcfile_definitions.h0000664000175000017500000000550113040331677023430 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBCFILE_INTERNAL_DEFINITIONS_H ) #define LIBCFILE_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCFILE for local use of libcfile */ #if !defined( HAVE_LOCAL_LIBCFILE ) #include /* The definitions in are copied here * for local use of libcfile */ #else #define LIBCFILE_VERSION 20170105 /* The libcfile version string */ #define LIBCFILE_VERSION_STRING "20170105" /* 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 libevt-20170120/libcfile/libcfile_file.h0000664000175000017500000002022313040331677022032 0ustar00lordyestalordyesta00000000000000/* * File functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_INTERNAL_FILE_H ) #define _LIBCFILE_INTERNAL_FILE_H #include #include #include "libcfile_extern.h" #include "libcfile_libcerror.h" #include "libcfile_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcfile_internal_file libcfile_internal_file_t; struct libcfile_internal_file { #if defined( WINAPI ) /* 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; }; #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcfile_CloseHandle( HANDLE file_handle ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ 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 ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) 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 ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ 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 ) #if defined( WINAPI ) && ( WINVER <= 0x0500 ) 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( WINAPI ) && ( WINVER <= 0x0500 ) */ 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 ) && ( WINVER <= 0x0500 ) BOOL libcfile_GetOverlappedResult( HANDLE file_handle, OVERLAPPED *overlapped, DWORD *read_count, BOOL wait_io_complete ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcfile_ReadFile( HANDLE file_handle, VOID *buffer, DWORD read_size, DWORD *read_count, OVERLAPPED *overlapped ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #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 ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcfile_WriteFile( HANDLE file_handle, VOID *buffer, DWORD write_size, DWORD *write_count, OVERLAPPED *overlapped ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ 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 ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcfile_SetFilePointerEx( HANDLE file_handle, LARGE_INTEGER distance_to_move_large_integer, LARGE_INTEGER *new_file_pointer_large_integer, DWORD move_method ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ LIBCFILE_EXTERN \ off64_t libcfile_file_seek_offset( libcfile_file_t *file, off64_t offset, int whence, libcerror_error_t **error ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcfile_SetEndOfFile( HANDLE file_handle ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ LIBCFILE_EXTERN \ int libcfile_file_resize( libcfile_file_t *file, size64_t size, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_file_is_open( libcfile_file_t *file, libcerror_error_t **error ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcfile_GetFileSizeEx( HANDLE file_handle, LARGE_INTEGER *file_size_large_integer ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ LIBCFILE_EXTERN \ int libcfile_file_get_offset( libcfile_file_t *file, off64_t *offset, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_file_get_size( libcfile_file_t *file, size64_t *size, libcerror_error_t **error ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) DWORD libcfile_GetFileType( HANDLE file_handle ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ LIBCFILE_EXTERN \ int libcfile_file_is_device( libcfile_file_t *file, 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 ); 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_INTERNAL_FILE_H ) */ libevt-20170120/libcfile/libcfile_error.h0000664000175000017500000000340513040331677022247 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_INTERNAL_ERROR_H ) #define _LIBCFILE_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBCFILE ) #include #endif #include "libcfile_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCFILE ) LIBCFILE_EXTERN \ void libcfile_error_free( libcfile_error_t **error ); LIBCFILE_EXTERN \ int libcfile_error_fprint( libcfile_error_t *error, FILE *stream ); LIBCFILE_EXTERN \ int libcfile_error_sprint( libcfile_error_t *error, char *string, size_t size ); LIBCFILE_EXTERN \ int libcfile_error_backtrace_fprint( libcfile_error_t *error, FILE *stream ); LIBCFILE_EXTERN \ int libcfile_error_backtrace_sprint( libcfile_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCFILE_INTERNAL_ERROR_H ) */ libevt-20170120/libcfile/libcfile_system_string.c0000664000175000017500000006173213040331677024032 0ustar00lordyestalordyesta00000000000000/* * System string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #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 ) */ libevt-20170120/libcfile/Makefile.in0000664000175000017500000007702513040342657021172 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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 @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 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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBCFILE_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCFILE_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCFILE_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCFILE_TRUE@ @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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcfile/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcfile/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_notify.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_system_string.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcfile ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcfile_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libcfile/libcfile_system_string.h0000664000175000017500000000541413040331700024015 0ustar00lordyestalordyesta00000000000000/* * System string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_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 ) */ libevt-20170120/libcfile/libcfile_libcnotify.h0000664000175000017500000000266313040331677023265 0ustar00lordyestalordyesta00000000000000/* * The internal libcnotify header * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_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 ) */ libevt-20170120/libcfile/libcfile_libuna.h0000664000175000017500000000323513040331677022371 0ustar00lordyestalordyesta00000000000000/* * The libuna header wrapper * * Copyright (C) 2008-2017, Joachim Metz * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_LIBUNA_H ) #define _LIBCFILE_LIBUNA_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) #include #include #include #include #include #include #include #include #include #include #include #include #include #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 ) */ libevt-20170120/libcfile/libcfile_notify.c0000664000175000017500000000530413040331677022421 0ustar00lordyestalordyesta00000000000000/* * Notification functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "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 ) */ libevt-20170120/libfwnt/0000775000175000017500000000000013040343017016775 5ustar00lordyestalordyesta00000000000000libevt-20170120/libfwnt/libfwnt_debug.c0000664000175000017500000002027313040331702021756 0ustar00lordyestalordyesta00000000000000/* * Debug functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfwnt_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 ) */ libevt-20170120/libfwnt/libfwnt_bit_stream.c0000664000175000017500000001233513040331702023021 0ustar00lordyestalordyesta00000000000000/* * Bit stream functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfwnt_bit_stream.h" #include "libfwnt_libcerror.h" #include "libfwnt_libcnotify.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 ); } *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 the number of bytes read, 0 if no data available or -1 on error */ ssize_t libfwnt_bit_stream_read( libfwnt_bit_stream_t *bit_stream, size_t read_size, libcerror_error_t **error ) { uint32_t bits = 0; static char *function = "libfwnt_bit_stream_read"; uint8_t number_of_bits = 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( read_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid read size value exceeds maximum.", function ); return( -1 ); } if( ( read_size != 2 ) && ( read_size != 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: read size value out of bounds.", function ); return( -1 ); } if( bit_stream->byte_stream_offset >= bit_stream->byte_stream_size ) { return( 0 ); } if( ( bit_stream->byte_stream_offset + read_size ) > bit_stream->byte_stream_size ) { read_size = bit_stream->byte_stream_size - bit_stream->byte_stream_offset; } if( read_size == 0 ) { return( 0 ); } number_of_bits = (uint8_t) ( read_size << 3 ); if( ( number_of_bits + bit_stream->number_of_bits ) > 32 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: number of bits value out of bounds.", function ); return( -1 ); } /* TODO optimize the read for the maximum number of available bytes. ? */ /* TODO what about handling intermediate read size values ? */ while( number_of_bits >= 16 ) { bit_stream->bits <<= 16; byte_stream_copy_to_uint16_little_endian( &( bit_stream->byte_stream[ bit_stream->byte_stream_offset ] ), bits ); bit_stream->bits |= bits; bit_stream->byte_stream_offset += 2; bit_stream->number_of_bits += 16; number_of_bits -= 16; } return( (ssize_t) read_size ); } libevt-20170120/libfwnt/libfwnt_lznt1.c0000664000175000017500000003506613040331702021746 0ustar00lordyestalordyesta00000000000000/* * LZNT1 (de)compression functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfwnt_libcerror.h" #include "libfwnt_libcnotify.h" #include "libfwnt_lznt1.h" /* Compresses data using LZNT1 compression * Returns 1 on success or -1 on error */ int libfwnt_lznt1_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_lznt1_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 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 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 ); } if( *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( ( *compressed_data_offset + compression_chunk_size ) > 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 == 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 ); } compression_tuple_threshold = 16; compression_tuple_offset_shift = 12; compression_tuple_size_mask = 0x0fff; while( compression_chunk_size > 0 ) { compression_flag_byte = compressed_data[ *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, *compressed_data_offset, *compressed_data_offset ); libcnotify_printf( "%s: compression flag byte\t\t\t: 0x%02" PRIx8 "\n", function, compression_flag_byte ); libcnotify_printf( "\n" ); } #endif *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 ) { /* Read the compression ( size, offset ) tuple */ byte_stream_copy_to_uint16_little_endian( &( compressed_data[ *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, *compressed_data_offset, *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 *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: 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: compression tuple index value out of bounds.", function ); return( -1 ); } if( uncompressed_data_offset > *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_tuple_index++ ]; compression_tuple_size -= 1; } } else { if( uncompressed_data_offset > *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 ]; *compressed_data_offset += 1; 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 ) { compression_tuple_offset_shift -= 1; compression_tuple_size_mask >>= 1; compression_tuple_threshold <<= 1; } } } *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 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 ); } while( compressed_data_offset < compressed_data_size ) { if( uncompressed_data_offset >= *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\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 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 = *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( ( compressed_data_offset + compression_chunk_size ) > 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 + compression_chunk_size ) > *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 ); } 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 ); } libevt-20170120/libfwnt/libfwnt_libcerror.h0000664000175000017500000000263613040331702022663 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_LIBCERROR_H ) #define _LIBFWNT_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFWNT_LIBCERROR_H ) */ libevt-20170120/libfwnt/libfwnt_unused.h0000664000175000017500000000253613040331702022202 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_UNUSED_H ) #define _LIBFWNT_INTERNAL_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_INTERNAL_UNUSED_H ) */ libevt-20170120/libfwnt/libfwnt_support.c0000664000175000017500000000215313040331702022401 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfwnt_definitions.h" #include "libfwnt_support.h" #if !defined( HAVE_LOCAL_LIBFWNT ) /* Returns the library version as a string */ const char *libfwnt_get_version( void ) { return( (const char *) LIBFWNT_VERSION_STRING ); } #endif libevt-20170120/libfwnt/Makefile.am0000664000175000017500000000225313012271514021034 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBFWNT AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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_libcerror.h \ libfwnt_libcdata.h \ libfwnt_libcnotify.h \ libfwnt_locale_identifier.c libfwnt_locale_identifier.h \ libfwnt_lznt1.c libfwnt_lznt1.h \ libfwnt_lzxpress.c libfwnt_lzxpress.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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfwnt ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfwnt_la_SOURCES) libevt-20170120/libfwnt/libfwnt_lzxpress.h0000664000175000017500000000703713040331702022572 0ustar00lordyestalordyesta00000000000000/* * LZXPRESS (de)compression functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_LZXPRESS_H ) #define _LIBFWNT_LZXPRESS_H #include #include #include "libfwnt_bit_stream.h" #include "libfwnt_extern.h" #include "libfwnt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwnt_lzxpress_huffman_tree_node libfwnt_lzxpress_huffman_tree_node_t; struct libfwnt_lzxpress_huffman_tree_node { /* The symbol */ uint16_t symbol; /* Value to indicate the tree node is a leaf node */ uint8_t is_leaf; /* The sub tree nodes */ libfwnt_lzxpress_huffman_tree_node_t *sub_tree_nodes[ 2 ]; #if defined( HAVE_DEBUG_OUTPUT ) /* The sub tree node indexes */ uint16_t sub_tree_node_indexes[ 2 ]; #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_compare_symbols( libfwnt_lzxpress_huffman_code_symbol_t *first_symbol, libfwnt_lzxpress_huffman_code_symbol_t *second_symbol ); int libfwnt_lzxpress_huffman_tree_add_leaf( libfwnt_lzxpress_huffman_tree_node_t *tree_nodes, int tree_node_index, uint32_t bits, uint8_t number_of_bits ); int libfwnt_lzxpress_huffman_tree_read( libfwnt_lzxpress_huffman_tree_node_t *tree_nodes, const uint8_t *compressed_data, size_t compressed_data_size, size_t compressed_data_offset, libcerror_error_t **error ); int libfwnt_lzxpress_huffman_tree_read_symbol( libfwnt_lzxpress_huffman_tree_node_t *tree_nodes, libfwnt_bit_stream_t *compressed_data_bit_stream, uint16_t *symbol, libcerror_error_t **error ); int libfwnt_lzxpress_huffman_decompress_chunk( const uint8_t *compressed_data, size_t compressed_data_size, size_t *compressed_data_offset, 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 ) */ libevt-20170120/libfwnt/libfwnt_lznt1.h0000664000175000017500000000345713040331702021752 0ustar00lordyestalordyesta00000000000000/* * LZNT1 (de)compression functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_LZNT1_H ) #define _LIBFWNT_LZNT1_H #include #include #include "libfwnt_extern.h" #include "libfwnt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif LIBFWNT_EXTERN \ int libfwnt_lznt1_compress( const uint8_t *uncompressed_data, size_t uncompressed_data_size, uint8_t *compressed_data, size_t *compressed_data_size, libcerror_error_t **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 ); 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 ) */ libevt-20170120/libfwnt/libfwnt_locale_identifier.c0000664000175000017500000004465513040331702024343 0ustar00lordyestalordyesta00000000000000/* * Locale identifier (LCID) functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfwnt_locale_identifier.h" 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 ); } libevt-20170120/libfwnt/libfwnt_libcdata.h0000664000175000017500000000301413040331702022432 0ustar00lordyestalordyesta00000000000000/* * The internal libcdata header * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_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 ) */ libevt-20170120/libfwnt/libfwnt_definitions.h0000664000175000017500000000662013040331702023210 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBFWNT_INTERNAL_DEFINITIONS_H ) #define LIBFWNT_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt */ #if !defined( HAVE_LOCAL_LIBFWNT ) #include /* The definitions in are copied here * for local use of libfwnt */ #else #include #define LIBFWNT_VERSION 20170115 /* The version string */ #define LIBFWNT_VERSION_STRING "20170115" /* 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 ) */ libevt-20170120/libfwnt/libfwnt_types.h0000664000175000017500000000356613040331702022047 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_TYPES_H ) #define _LIBFWNT_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt * The definitions in are copied here * for local use of libfwnt */ #if defined( HAVE_LOCAL_LIBFWNT ) /* The following type definitions hide internal data structures */ #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 ) */ libevt-20170120/libfwnt/libfwnt_access_control_list.c0000664000175000017500000003252713040331702024731 0ustar00lordyestalordyesta00000000000000/* * Windows NT Access Control List (ACL) functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfwnt_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 (ACE) * 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 entries (ACE) * 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 ); } libevt-20170120/libfwnt/libfwnt_locale_identifier.h0000664000175000017500000000313513040331702024334 0ustar00lordyestalordyesta00000000000000/* * Locale identifier (LCID) functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_LOCALE_IDENTIFIER_H ) #define _LIBFWNT_LOCALE_IDENTIFIER_H #include #include #if defined( __cplusplus ) extern "C" { #endif 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 ) */ libevt-20170120/libfwnt/libfwnt_extern.h0000664000175000017500000000253113040331702022177 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_EXTERN_H ) #define _LIBFWNT_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt */ #if !defined( HAVE_LOCAL_LIBFWNT ) /* If libtool DLL support is enabled set LIBFWNT_DLL_EXPORT * before including libfwnt/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFWNT_DLL_EXPORT #endif #include #else #define LIBFWNT_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBFWNT ) */ #endif /* !defined( _LIBFWNT_INTERNAL_EXTERN_H ) */ libevt-20170120/libfwnt/libfwnt_support.h0000664000175000017500000000224313040331702022406 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_SUPPORT_H ) #define _LIBFWNT_SUPPORT_H #include #include #include "libfwnt_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFWNT ) LIBFWNT_EXTERN \ const char *libfwnt_get_version( void ); #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_SUPPORT_H ) */ libevt-20170120/libfwnt/libfwnt_security_descriptor.h0000664000175000017500000000641213040331702025001 0ustar00lordyestalordyesta00000000000000/* * Windows NT Security Descriptor functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_SECURITY_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 discretionary ACL */ libfwnt_access_control_list_t *discretionary_acl; /* The system ACL */ libfwnt_access_control_list_t *system_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 ) */ libevt-20170120/libfwnt/libfwnt_libcnotify.h0000664000175000017500000000254113040331702023035 0ustar00lordyestalordyesta00000000000000/* * The internal libcnotify header * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_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 #endif libevt-20170120/libfwnt/libfwnt_security_identifier.h0000664000175000017500000001222213040331702024741 0ustar00lordyestalordyesta00000000000000/* * Windows NT Security Identifier (SID) functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_SECURITY_IDENTIFIER_H ) #define _LIBFWNT_INTERNAL_SECURITY_IDENTIFIER_H #include #include #include "libfwnt_extern.h" #include "libfwnt_libcerror.h" #include "libfwnt_types.h" #if defined( __cplusplus ) extern "C" { #endif /* The Windows NT Security Identifier (SID) is formatted as following: * S-1-5-21-7623811015-3361044348-030300820-1013 * * S - The string is a SID. * 1 - The revision number (the version of the SID specification). * 5 - The identifier authority value. * 21-7623811015-3361044348-030300820 - domain or local computer identifier * 1013 – a Relative ID (RID). Any group or user that is not created by default will have a Relative ID of 1000 or greater. * * The SID is stored as * 01 - 05 - 00 00 00 00 00 05 - aa aa aa aa - bb bb bb bb - cc cc cc cc - dd dd dd dd - ee ee ee ee * uint8_t - uint8_t - uint48_t - uint32_t - uin32_t - uin32_t - uin32_t - uin32_t * - (big endian) - (little endian) * revision - number - authority - sub authorities * * The second value contains the number of sub authorities in the SID * * 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 ) */ libevt-20170120/libfwnt/libfwnt_access_control_list.h0000664000175000017500000000535513040331702024735 0ustar00lordyestalordyesta00000000000000/* * Windows NT Access Contol List (ACL) functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_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 ) */ libevt-20170120/libfwnt/libfwnt_lzxpress.c0000664000175000017500000007777413040331702022604 0ustar00lordyestalordyesta00000000000000/* * LZXPRESS (de)compression functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfwnt_bit_stream.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 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 > (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( 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 ); } while( compressed_data_offset < compressed_data_size ) { if( uncompressed_data_offset >= *uncompressed_data_size ) { break; } 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 >= *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 - 1 ) ) { 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 - 1 ) ) { 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 "\n", function, uncompressed_data_offset ); libcnotify_printf( "\n" ); } #endif 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 > *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 > *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 ); } /* Copmares two Huffman code symbols * Returns 1 if the first symbol is larger than the second, 0 if equal or -1 if smaller */ int libfwnt_lzxpress_huffman_compare_symbols( libfwnt_lzxpress_huffman_code_symbol_t *first_symbol, libfwnt_lzxpress_huffman_code_symbol_t *second_symbol ) { if( first_symbol == NULL ) { return( -1 ); } if( second_symbol == NULL ) { return( 1 ); } if( first_symbol->code_size < second_symbol->code_size ) { return( -1 ); } else if( first_symbol->code_size > second_symbol->code_size ) { return( 1 ); } else if( first_symbol->symbol < second_symbol->symbol ) { return( -1 ); } else if( first_symbol->symbol > second_symbol->symbol ) { return( 1 ); } return( 0 ); } /* Adds a leaf node to the Huffman tree * Returns 1 on success or -1 on error */ int libfwnt_lzxpress_huffman_tree_add_leaf( libfwnt_lzxpress_huffman_tree_node_t *tree_nodes, int tree_node_index, uint32_t bits, uint8_t number_of_bits ) { libfwnt_lzxpress_huffman_tree_node_t *tree_node = NULL; uint8_t sub_tree_node_index = 0; int next_tree_node_index = 0; tree_node = &( tree_nodes[ 0 ] ); next_tree_node_index = tree_node_index + 1; while( number_of_bits > 1 ) { number_of_bits--; sub_tree_node_index = (uint8_t) ( bits >> number_of_bits ) & 0x00000001UL; if( tree_node->sub_tree_nodes[ sub_tree_node_index ] == NULL ) { tree_node->sub_tree_nodes[ sub_tree_node_index ] = &( tree_nodes[ next_tree_node_index ] ); tree_nodes[ next_tree_node_index ].is_leaf = 0; #if defined( HAVE_DEBUG_OUTPUT ) tree_node->sub_tree_node_indexes[ sub_tree_node_index ] = next_tree_node_index; #endif next_tree_node_index++; } tree_node = tree_node->sub_tree_nodes[ sub_tree_node_index ]; } /* TODO store index instead of pointer ? */ tree_node->sub_tree_nodes[ bits & 0x00000001UL ] = &( tree_nodes[ tree_node_index ] ); #if defined( HAVE_DEBUG_OUTPUT ) tree_node->sub_tree_node_indexes[ bits & 0x00000001UL ] = tree_node_index; #endif return( next_tree_node_index ); } /* Reads the Huffman tree * Returns 1 on success or -1 on error */ int libfwnt_lzxpress_huffman_tree_read( libfwnt_lzxpress_huffman_tree_node_t *tree_nodes, const uint8_t *compressed_data, size_t compressed_data_size, size_t compressed_data_offset, libcerror_error_t **error ) { libfwnt_lzxpress_huffman_code_symbol_t code_symbols[ 512 ]; static char *function = "libfwnt_lzxpress_huffman_tree_read"; size_t byte_index = 0; uint32_t bits = 0; uint16_t symbol_index = 0; uint8_t byte_value = 0; uint8_t number_of_bits = 0; int tree_node_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_offset >= compressed_data_size ) || ( ( compressed_data_size - compressed_data_offset ) < 256 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: compressed data offset value out of bounds.", function ); return( -1 ); } if( memory_set( tree_nodes, 0, sizeof( libfwnt_lzxpress_huffman_tree_node_t ) * 1024 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear tree nodes.", function ); return( -1 ); } /* The initial table contains a 4-bits code size per symbol */ for( byte_index = 0; byte_index < 256; byte_index++ ) { byte_value = compressed_data[ compressed_data_offset++ ]; code_symbols[ symbol_index ].symbol = symbol_index; code_symbols[ symbol_index ].code_size = (uint16_t) ( byte_value & 0x0f ); symbol_index++; byte_value >>= 4; code_symbols[ symbol_index ].symbol = symbol_index; code_symbols[ symbol_index ].code_size = (uint16_t) ( byte_value & 0x0f ); symbol_index++; } /* Sort the symbols */ qsort( code_symbols, 512, sizeof( libfwnt_lzxpress_huffman_code_symbol_t ), (int (*)(const void *, const void *)) &libfwnt_lzxpress_huffman_compare_symbols ); /* Find the first symbol with a code size > 0 */ for( symbol_index = 0; symbol_index < 512; symbol_index++ ) { if( code_symbols[ symbol_index ].code_size > 0 ) { break; } } bits = 0; number_of_bits = 1; tree_nodes[ tree_node_index ].is_leaf = 0; tree_node_index++; while( symbol_index < 512 ) { tree_nodes[ tree_node_index ].symbol = code_symbols[ symbol_index ].symbol; tree_nodes[ tree_node_index ].is_leaf = 1; bits <<= code_symbols[ symbol_index ].code_size - number_of_bits; number_of_bits = (uint8_t) code_symbols[ symbol_index ].code_size; tree_node_index = libfwnt_lzxpress_huffman_tree_add_leaf( tree_nodes, tree_node_index, bits, number_of_bits ); bits++; symbol_index++; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { for( tree_node_index = 0; tree_node_index < 1024; tree_node_index++ ) { libcnotify_printf( "%s: tree node: %04d symbol\t\t: 0x%04" PRIx16 "\n", function, tree_node_index, tree_nodes[ tree_node_index ].symbol ); libcnotify_printf( "%s: tree node: %04d is leaf\t\t: %" PRId8 "\n", function, tree_node_index, tree_nodes[ tree_node_index ].is_leaf ); libcnotify_printf( "%s: tree node: %04d sub node: 0\t\t: %" PRId16 "\n", function, tree_node_index, tree_nodes[ tree_node_index ].sub_tree_node_indexes[ 0 ] ); libcnotify_printf( "%s: tree node: %04d sub node: 1\t\t: %" PRId16 "\n", function, tree_node_index, tree_nodes[ tree_node_index ].sub_tree_node_indexes[ 1 ] ); } libcnotify_printf( "\n" ); for( symbol_index = 0; symbol_index < 512; symbol_index++ ) { libcnotify_printf( "%s: symbol: %03d symbol\t\t\t: 0x%04" PRIx16 "\n", function, symbol_index, code_symbols[ symbol_index ].symbol ); libcnotify_printf( "%s: symbol: %03d code size\t\t: %" PRIu16 "\n", function, symbol_index, code_symbols[ symbol_index ].code_size ); } libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Reads a Huffman tree symbol * Returns 1 on success or -1 on error */ int libfwnt_lzxpress_huffman_tree_read_symbol( libfwnt_lzxpress_huffman_tree_node_t *tree_nodes, libfwnt_bit_stream_t *compressed_data_bit_stream, uint16_t *symbol, libcerror_error_t **error ) { libfwnt_lzxpress_huffman_tree_node_t *tree_node = NULL; static char *function = "libfwnt_lzxpress_huffman_tree_read_symbol"; uint16_t bits = 0; uint8_t sub_tree_node_index = 0; if( compressed_data_bit_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid compressed data 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 ); } tree_node = &( tree_nodes[ 0 ] ); do { /* TODO add a read number of bits function ? */ sub_tree_node_index = (uint8_t) ( ( compressed_data_bit_stream->bits >> 31 ) & 0x00000001UL ); compressed_data_bit_stream->bits <<= 1; compressed_data_bit_stream->number_of_bits -= 1; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: sub tree node index\t\t: 0x%02" PRIx8 "\n", function, sub_tree_node_index ); } #endif if( ( compressed_data_bit_stream->number_of_bits < 16 ) && ( compressed_data_bit_stream->byte_stream_offset <= ( compressed_data_bit_stream->byte_stream_size - 2 ) ) ) { byte_stream_copy_to_uint16_little_endian( &( compressed_data_bit_stream->byte_stream[ compressed_data_bit_stream->byte_stream_offset ] ), bits ); compressed_data_bit_stream->bits |= bits << ( 16 - compressed_data_bit_stream->number_of_bits ); compressed_data_bit_stream->byte_stream_offset += 2; compressed_data_bit_stream->number_of_bits += 16; } tree_node = tree_node->sub_tree_nodes[ sub_tree_node_index ]; if( tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing tree node value.", function ); return( -1 ); } } while( tree_node->is_leaf == 0 ); *symbol = tree_node->symbol; return( 1 ); } /* Decompresses a LZXPRESS Huffman compressed chunk * Return 1 on success or -1 on error */ int libfwnt_lzxpress_huffman_decompress_chunk( const uint8_t *compressed_data, size_t compressed_data_size, size_t *compressed_data_offset, uint8_t *uncompressed_data, size_t uncompressed_data_size, size_t *uncompressed_data_offset, libcerror_error_t **error ) { libfwnt_lzxpress_huffman_tree_node_t tree_nodes[ 1024 ]; libfwnt_bit_stream_t *compressed_data_bit_stream = NULL; static char *function = "libfwnt_lzxpress_huffman_decompress_chunk"; size_t compression_uncompressed_data_offset = 0; size_t next_chunk_uncompressed_data_offset = 0; size_t safe_uncompressed_data_offset = 0; uint32_t compression_offset = 0; uint16_t bits = 0; uint16_t compression_size = 0; uint16_t symbol = 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 ); } if( ( *compressed_data_offset >= compressed_data_size ) || ( ( compressed_data_size - *compressed_data_offset ) < 260 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: compressed data offset 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 > (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 ); } if( *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 ); } if( libfwnt_lzxpress_huffman_tree_read( tree_nodes, compressed_data, compressed_data_size, *compressed_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to read Huffman tree.", function ); goto on_error; } if( libfwnt_bit_stream_initialize( &compressed_data_bit_stream, &( compressed_data[ *compressed_data_offset ] ), compressed_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create compressed data bit stream.", function ); goto on_error; } /* TODO add a bit stream seek function ? */ compressed_data_bit_stream->byte_stream_offset = 256; if( libfwnt_bit_stream_read( compressed_data_bit_stream, 4, error ) != 4 ) { 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; } safe_uncompressed_data_offset = *uncompressed_data_offset; 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( ( compressed_data_bit_stream->byte_stream_offset < compressed_data_bit_stream->byte_stream_size ) || ( compressed_data_bit_stream->number_of_bits > 0 ) ) { if( safe_uncompressed_data_offset >= next_chunk_uncompressed_data_offset ) { break; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compressed data offset\t: %" PRIzd " (0x%08" PRIzx ")\n", function, compressed_data_bit_stream->byte_stream_offset, compressed_data_bit_stream->byte_stream_offset ); } #endif if( libfwnt_lzxpress_huffman_tree_read_symbol( tree_nodes, compressed_data_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: number of bits\t\t: %" PRId8 "\n", function, compressed_data_bit_stream->number_of_bits ); libcnotify_printf( "%s: huffman symbol\t\t: 0x%04" PRIx16 "\n", function, symbol ); } #endif if( ( compressed_data_bit_stream->number_of_bits < 16 ) && ( compressed_data_bit_stream->byte_stream_offset <= ( compressed_data_bit_stream->byte_stream_size - 2 ) ) ) { byte_stream_copy_to_uint16_little_endian( &( compressed_data_bit_stream->byte_stream[ compressed_data_bit_stream->byte_stream_offset ] ), bits ); /* TODO bits read infront of the bit stream ? */ compressed_data_bit_stream->bits |= bits << ( 16 - compressed_data_bit_stream->number_of_bits ); compressed_data_bit_stream->byte_stream_offset += 2; compressed_data_bit_stream->number_of_bits += 16; } if( symbol < 256 ) { uncompressed_data[ safe_uncompressed_data_offset++ ] = (uint8_t) symbol; } /* Check if we have an end-of-block marker (remaining bits are 0) */ if( ( compressed_data_bit_stream->bits == 0 ) && ( safe_uncompressed_data_offset >= uncompressed_data_size ) ) { break; } if( symbol >= 256 ) { symbol -= 256; compression_size = symbol & 0x000f; symbol >>= 4; if( symbol == 0 ) { compression_offset = 0; } else { /* TODO add a read number of bits function ? */ compression_offset = (uint32_t) ( compressed_data_bit_stream->bits >> ( 32 - symbol ) ); } compression_offset = (uint32_t) ( ( 1 << symbol ) | compression_offset ); compressed_data_bit_stream->bits <<= symbol; compressed_data_bit_stream->number_of_bits -= (uint8_t) symbol; /* Ignore any data beyond the uncompressed block size */ if( compression_size == 15 ) { if( compressed_data_bit_stream->byte_stream_offset > ( compressed_data_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 = compressed_data_bit_stream->byte_stream[ compressed_data_bit_stream->byte_stream_offset ] + 15; compressed_data_bit_stream->byte_stream_offset += 1; if( compression_size == 270 ) { if( compressed_data_bit_stream->byte_stream_offset > ( compressed_data_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( &( compressed_data_bit_stream->byte_stream[ compressed_data_bit_stream->byte_stream_offset ] ), compression_size ); compressed_data_bit_stream->byte_stream_offset += 2; } } compression_size += 3; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compression offset\t\t: %" PRIi16 "\n", function, compression_offset ); libcnotify_printf( "%s: compression size\t\t: %" PRIu16 "\n", function, compression_size ); libcnotify_printf( "%s: uncompressed data offset\t: %" PRIzd "\n", function, 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_uncompressed_data_offset = safe_uncompressed_data_offset - compression_offset; while( compression_size > 0 ) { uncompressed_data[ safe_uncompressed_data_offset++ ] = uncompressed_data[ compression_uncompressed_data_offset++ ]; compression_size--; } if( ( compressed_data_bit_stream->number_of_bits < 16 ) && ( compressed_data_bit_stream->byte_stream_offset <= ( compressed_data_bit_stream->byte_stream_size - 2 ) ) ) { byte_stream_copy_to_uint16_little_endian( &( compressed_data_bit_stream->byte_stream[ compressed_data_bit_stream->byte_stream_offset ] ), bits ); /* TODO bits read infront of the bit stream ? */ compressed_data_bit_stream->bits |= bits << ( 16 - compressed_data_bit_stream->number_of_bits ); compressed_data_bit_stream->byte_stream_offset += 2; compressed_data_bit_stream->number_of_bits += 16; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif } *compressed_data_offset += compressed_data_bit_stream->byte_stream_offset; if( libfwnt_bit_stream_free( &compressed_data_bit_stream, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free compressed data bit stream.", function ); goto on_error; } *uncompressed_data_offset = safe_uncompressed_data_offset; return( 1 ); on_error: if( compressed_data_bit_stream != NULL ) { libfwnt_bit_stream_free( &compressed_data_bit_stream, 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 ) { static char *function = "libfwnt_lzxpress_huffman_decompress"; size_t compressed_data_offset = 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 ); } while( compressed_data_offset < compressed_data_size ) { if( uncompressed_data_offset >= *uncompressed_data_size ) { break; } if( libfwnt_lzxpress_huffman_decompress_chunk( compressed_data, compressed_data_size, &compressed_data_offset, uncompressed_data, *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 ); return( -1 ); } } *uncompressed_data_size = uncompressed_data_offset; return( 1 ); } libevt-20170120/libfwnt/libfwnt_access_control_entry.c0000664000175000017500000004616213040331702025117 0ustar00lordyestalordyesta00000000000000/* * Windows NT Access Control Entry (ACE) functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #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 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 ) { 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 > byte_stream_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 } #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 ); } libevt-20170120/libfwnt/libfwnt_security_descriptor.c0000664000175000017500000006462613040331702025007 0ustar00lordyestalordyesta00000000000000/* * Windows NT Security Descriptor functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #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->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; } } 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; } } 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->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( 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( 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 ] ), discretionary_acl_offset ); byte_stream_copy_to_uint32_little_endian( &( byte_stream[ 16 ] ), system_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: discretionary ACL offset\t: 0x%08" PRIx32 "\n", function, discretionary_acl_offset ); libcnotify_printf( "%s: system ACL offset\t\t: 0x%08" PRIx32 "\n", function, system_acl_offset ); libcnotify_printf( "\n" ); } #endif 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( 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; } } 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; } } return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( sid_string != NULL ) { memory_free( sid_string ); } #endif 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->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->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 ); } libevt-20170120/libfwnt/libfwnt_error.h0000664000175000017500000000335613040331702022031 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_ERROR_H ) #define _LIBFWNT_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFWNT ) #include #endif #include "libfwnt_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFWNT ) LIBFWNT_EXTERN \ void libfwnt_error_free( libfwnt_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_error_fprint( libfwnt_error_t *error, FILE *stream ); LIBFWNT_EXTERN \ int libfwnt_error_sprint( libfwnt_error_t *error, char *string, size_t size ); LIBFWNT_EXTERN \ int libfwnt_error_backtrace_fprint( libfwnt_error_t *error, FILE *stream ); LIBFWNT_EXTERN \ int libfwnt_error_backtrace_sprint( libfwnt_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBFWNT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_INTERNAL_ERROR_H ) */ libevt-20170120/libfwnt/Makefile.in0000664000175000017500000010214113040342660021044 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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_libcerror.h libfwnt_libcdata.h \ libfwnt_libcnotify.h libfwnt_locale_identifier.c \ libfwnt_locale_identifier.h libfwnt_lznt1.c libfwnt_lznt1.h \ libfwnt_lzxpress.c libfwnt_lzxpress.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_locale_identifier.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_lznt1.lo libfwnt_lzxpress.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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFWNT_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFWNT_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFWNT_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFWNT_TRUE@ @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_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_lzxpress.c libfwnt_lzxpress.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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfwnt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfwnt/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_access_control_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_bit_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_locale_identifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_lznt1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_lzxpress.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_security_descriptor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_security_identifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_support.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfwnt ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfwnt_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libfwnt/libfwnt_security_identifier.c0000664000175000017500000007301713040331702024745 0ustar00lordyestalordyesta00000000000000/* * Windows NT Security Identifier (SID) functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfwnt_definitions.h" #include "libfwnt_libcerror.h" #include "libfwnt_security_identifier.h" #include "libfwnt_types.h" /* 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 ]; security_identifier_size = 8 + ( internal_security_identifier->number_of_sub_authorities * 4 ); if( byte_stream_size < (size_t) security_identifier_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( internal_security_identifier->number_of_sub_authorities > 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 ); } 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 ); } libevt-20170120/libfwnt/libfwnt_error.c0000664000175000017500000000552213040331702022021 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfwnt_error.h" #include "libfwnt_libcerror.h" #if !defined( HAVE_LOCAL_LIBFWNT ) /* Free an error and its elements */ void libfwnt_error_free( libfwnt_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfwnt_error_fprint( libfwnt_error_t *error, FILE *stream ) { 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 ) */ libevt-20170120/libfwnt/libfwnt_bit_stream.h0000664000175000017500000000347713040331702023035 0ustar00lordyestalordyesta00000000000000/* * Bit stream functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_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 offset */ size_t byte_stream_offset; /* The byte stream size */ size_t byte_stream_size; /* The bits */ uint32_t bits; /* The number of bits */ uint8_t number_of_bits; }; 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 ); ssize_t libfwnt_bit_stream_read( libfwnt_bit_stream_t *bit_stream, size_t read_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_BIT_STREAM_H ) */ libevt-20170120/libfwnt/libfwnt_access_control_entry.h0000664000175000017500000000621313040331702025115 0ustar00lordyestalordyesta00000000000000/* * Windows NT Access Contol Entry (ACE) functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_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 ) */ libevt-20170120/libfwnt/libfwnt_debug.h0000664000175000017500000000267213040331702021766 0ustar00lordyestalordyesta00000000000000/* * Debug functions * * Copyright (C) 2009-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_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 ) */ libevt-20170120/libcthreads/0000775000175000017500000000000013040343016017613 5ustar00lordyestalordyesta00000000000000libevt-20170120/libcthreads/libcthreads_thread_pool.h0000664000175000017500000001007213040331675024640 0ustar00lordyestalordyesta00000000000000/* * Thread pool functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_THREAD_POOL_H ) #define _LIBCTHREADS_INTERNAL_THREAD_POOL_H #include #include #if 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 ) */ libevt-20170120/libcthreads/libcthreads_thread_pool.c0000664000175000017500000012271013040331675024636 0ustar00lordyestalordyesta00000000000000/* * Thread pool functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( 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 ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_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 != 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 ) */ libevt-20170120/libcthreads/libcthreads_repeating_thread.c0000664000175000017500000004100413040331675025637 0ustar00lordyestalordyesta00000000000000/* * Repeating thread functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( 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 ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_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 != 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 ) */ libevt-20170120/libcthreads/libcthreads_error.c0000664000175000017500000000561213040331675023470 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "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 ) */ libevt-20170120/libcthreads/Makefile.am0000664000175000017500000000215713012271476021665 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBCTHREADS AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcthreads ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcthreads_la_SOURCES) libevt-20170120/libcthreads/libcthreads_unused.h0000664000175000017500000000257613040331675023655 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_UNUSED_H ) #define _LIBCTHREADS_INTERNAL_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_INTERNAL_UNUSED_H ) */ libevt-20170120/libcthreads/libcthreads_condition.h0000664000175000017500000000571313040331675024334 0ustar00lordyestalordyesta00000000000000/* * Condition functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_CONDITION_H ) #define _LIBCTHREADS_INTERNAL_CONDITION_H #include #include #if 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 ) */ libevt-20170120/libcthreads/libcthreads_definitions.h0000664000175000017500000000412213040331675024652 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 20170115 /* The libcthreads version string */ #define LIBCTHREADS_VERSION_STRING "20170115" /* 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 ) */ libevt-20170120/libcthreads/libcthreads_thread.h0000664000175000017500000000446613040331675023621 0ustar00lordyestalordyesta00000000000000/* * Thread functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcthreads/libcthreads_repeating_thread.h0000664000175000017500000000547013040331675025653 0ustar00lordyestalordyesta00000000000000/* * Repeating thread functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcthreads/libcthreads_read_write_lock.c0000664000175000017500000003757113040331675025505 0ustar00lordyestalordyesta00000000000000/* * Read/Write lock functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #if defined( 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 > 0x0500 ) && ( 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 > 0x0500 ) 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( HAVE_PTHREAD_H ) pthread_result = pthread_rwlock_init( &( internal_read_write_lock->read_write_lock ), NULL ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_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 > 0x0500 ) && ( 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 > 0x0500 ) && ( 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 > 0x0500 ) && ( 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( HAVE_PTHREAD_H ) pthread_result = pthread_rwlock_destroy( &( internal_read_write_lock->read_write_lock ) ); if( pthread_result != 0 ) { switch( pthread_result ) { 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 ); 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 ); break; } result = -1; } #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 > 0x0500 ) && ( 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 > 0x0500 ) 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( HAVE_PTHREAD_H ) pthread_result = pthread_rwlock_rdlock( &( 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 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 > 0x0500 ) && ( 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 > 0x0500 ) 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( HAVE_PTHREAD_H ) pthread_result = pthread_rwlock_wrlock( &( 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 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 > 0x0500 ) && ( 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 > 0x0500 ) 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( 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 > 0x0500 ) LeaveCriticalSection( &( internal_read_write_lock->write_critical_section ) ); #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 ) */ libevt-20170120/libcthreads/libcthreads_mutex.h0000664000175000017500000000460413040331675023506 0ustar00lordyestalordyesta00000000000000/* * Mutex functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcthreads/libcthreads_support.h0000664000175000017500000000235013040331675024054 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcthreads/libcthreads_thread.c0000664000175000017500000002262113040331675023605 0ustar00lordyestalordyesta00000000000000/* * Thread functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( 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 ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_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 != 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 ) */ libevt-20170120/libcthreads/libcthreads_mutex.c0000664000175000017500000002632613040331675023506 0ustar00lordyestalordyesta00000000000000/* * Mutex functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #if defined( 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 ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_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 ) ); if( pthread_result != 0 ) { switch( pthread_result ) { 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 ); break; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy mutex.", function ); break; } result = -1; } #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 ) ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_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 ) ); if( pthread_result == EBUSY ) { result = 0; } else if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to 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 ) ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to unlock mutex.", function ); return( -1 ); } #endif return( 1 ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ libevt-20170120/libcthreads/libcthreads_types.h0000664000175000017500000000472013040331675023507 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcthreads/libcthreads_lock.h0000664000175000017500000000424213040331675023272 0ustar00lordyestalordyesta00000000000000/* * Lock functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcthreads/libcthreads_extern.h0000664000175000017500000000261113040331675023645 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) /* If libtool DLL support is enabled set LIBCTHREADS_DLL_EXPORT * before including libcthreads/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCTHREADS_DLL_EXPORT #endif #include #else #define LIBCTHREADS_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) */ #endif /* !defined( _LIBCTHREADS_INTERNAL_EXTERN_H ) */ libevt-20170120/libcthreads/libcthreads_error.h0000664000175000017500000000351213040331675023472 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcthreads/libcthreads_queue.c0000664000175000017500000006355713040331675023477 0ustar00lordyestalordyesta00000000000000/* * Queue functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "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 ) */ libevt-20170120/libcthreads/libcthreads_condition.c0000664000175000017500000004245213040331675024330 0ustar00lordyestalordyesta00000000000000/* * Condition functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #if defined( 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 ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_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 ) ); if( pthread_result != 0 ) { switch( pthread_result ) { 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 ); break; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy condition.", function ); break; } result = -1; } #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; DWORD wait_status = 0; #if ( WINVER >= 0x0600 ) BOOL result = 0; #else 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( 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 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 ) */ libevt-20170120/libcthreads/Makefile.in0000664000175000017500000010231013040342657021667 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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$(top_srcdir)/include \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ -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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_lock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_mutex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_queue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_read_write_lock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_repeating_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_thread_attributes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_thread_pool.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @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: libevt-20170120/libcthreads/libcthreads_thread_attributes.c0000664000175000017500000001000213040331675026041 0ustar00lordyestalordyesta00000000000000/* * Thread attributes functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_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 ) */ libevt-20170120/libcthreads/libcthreads_libcerror.h0000664000175000017500000000265213040331675024330 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcthreads/libcthreads_lock.c0000664000175000017500000001601113040331675023262 0ustar00lordyestalordyesta00000000000000/* * Lock functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #if defined( HAVE_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 ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_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 ) ); if( pthread_result != 0 ) { switch( pthread_result ) { 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 ); break; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy mutex.", function ); break; } result = -1; } #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 ) ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_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 ) ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to unlock mutex.", function ); return( -1 ); } #endif return( 1 ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ libevt-20170120/libcthreads/libcthreads_support.c0000664000175000017500000000222413040331675024047 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "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 ) */ libevt-20170120/libcthreads/libcthreads_read_write_lock.h0000664000175000017500000000636013040331675025502 0ustar00lordyestalordyesta00000000000000/* * Read/Write lock functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_READ_WRITE_LOCK_H ) #define _LIBCTHREADS_INTERNAL_READ_WRITE_LOCK_H #include #include #if 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 ) && ( WINVER > 0x0500 ) /* 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( WINAPI ) /* TODO */ #error WINAPI read/write lock for Windows 2000 or earlier NOT implemented yet #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 ) */ libevt-20170120/libcthreads/libcthreads_thread_attributes.h0000664000175000017500000000413413040331675026057 0ustar00lordyestalordyesta00000000000000/* * Thread attributes functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcthreads/libcthreads_queue.h0000664000175000017500000000641713040331675023474 0ustar00lordyestalordyesta00000000000000/* * Queue functions * * Copyright (C) 2012-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/AUTHORS0000664000175000017500000000013213040331672016400 0ustar00lordyestalordyesta00000000000000Acknowledgements: libevt Copyright (C) 2011-2017, Joachim Metz libevt-20170120/libevt.spec.in0000664000175000017500000000753413040336016020110 0ustar00lordyestalordyesta00000000000000Name: libevt Version: @VERSION@ Release: 1 Summary: Library to access the Windows Event Log (EVT) format Group: System Environment/Libraries License: LGPL Source: %{name}-%{version}.tar.gz URL: https://github.com/libyal/libevt/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @libevt_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@ @libevt_spec_build_requires@ @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 libevt is a library to access the Windows Event Log (EVT) format %package devel Summary: Header files and libraries for developing applications for libevt Group: Development/Libraries Requires: libevt = %{version}-%{release} %description devel Header files and libraries for developing applications for libevt. %package tools Summary: Several tools for reading Windows Event Log (EVT) files Group: Applications/System Requires: libevt = %{version}-%{release} @ax_libcdirectory_spec_requires@ @ax_libexe_spec_requires@ @ax_libfwevt_spec_requires@ @ax_libregf_spec_requires@ @ax_libwrc_spec_requires@ @libevt_tools_spec_build_requires@ @ax_libcdirectory_spec_build_requires@ @ax_libexe_spec_build_requires@ @ax_libfwevt_spec_build_requires@ @ax_libregf_spec_build_requires@ @ax_libwrc_spec_build_requires@ %description tools Several tools for reading Windows Event Log (EVT) files %package python Summary: Python 2 bindings for libevt Group: System Environment/Libraries Requires: libevt = %{version}-%{release} python BuildRequires: python-devel %description python Python 2 bindings for libevt %package python3 Summary: Python 3 bindings for libevt Group: System Environment/Libraries Requires: libevt = %{version}-%{release} python3 BuildRequires: python3-devel %description python3 Python 3 bindings for libevt %prep %setup -q %build %configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} --enable-python2 --enable-python3 make %{?_smp_mflags} %install rm -rf %{buildroot} %make_install %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %attr(755,root,root) %{_libdir}/*.so.* %files devel %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README ChangeLog %{_libdir}/*.a %{_libdir}/*.la %{_libdir}/*.so %{_libdir}/pkgconfig/libevt.pc %{_includedir}/* %{_mandir}/man3/* %files tools %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %attr(755,root,root) %{_bindir}/evtexport %attr(755,root,root) %{_bindir}/evtinfo %{_mandir}/man1/* %files python %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %{_libdir}/python2*/site-packages/*.a %{_libdir}/python2*/site-packages/*.la %{_libdir}/python2*/site-packages/*.so %files python3 %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %{_libdir}/python3*/site-packages/*.a %{_libdir}/python3*/site-packages/*.la %{_libdir}/python3*/site-packages/*.so %changelog * @SPEC_DATE@ Joachim Metz @VERSION@-1 - Auto-generated libevt-20170120/config.sub0000755000175000017500000010624613040342656017332 0ustar00lordyestalordyesta00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-01-01' # 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: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libevt-20170120/libcpath/0000775000175000017500000000000013040343016017115 5ustar00lordyestalordyesta00000000000000libevt-20170120/libcpath/libcpath_unused.h0000664000175000017500000000254613040331700022443 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_INTERNAL_UNUSED_H ) #define _LIBCPATH_INTERNAL_UNUSED_H #include #if !defined( LIBCPATH_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCPATH_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCPATH_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCPATH_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCPATH_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBCPATH_INTERNAL_UNUSED_H ) */ libevt-20170120/libcpath/libcpath_support.c0000664000175000017500000000444213040331700022644 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcpath_definitions.h" #include "libcpath_libcerror.h" #include "libcpath_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 ) */ libevt-20170120/libcpath/libcpath_libclocale.h0000664000175000017500000000266613040331700023234 0ustar00lordyestalordyesta00000000000000/* * The internal libclocale header * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_LIBCLOCALE_H ) #define _LIBCPATH_LIBCLOCALE_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if defined( HAVE_LOCAL_LIBCLOCALE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT * before including libclocale.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCLOCALE_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _LIBCPATH_LIBCLOCALE_H ) */ libevt-20170120/libcpath/Makefile.am0000664000175000017500000000144613012271471021162 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBCPATH AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcpath ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcpath_la_SOURCES) libevt-20170120/libcpath/libcpath_error.h0000664000175000017500000000340513040331700022264 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_INTERNAL_ERROR_H ) #define _LIBCPATH_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBCPATH ) #include #endif #include "libcpath_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCPATH ) LIBCPATH_EXTERN \ void libcpath_error_free( libcpath_error_t **error ); LIBCPATH_EXTERN \ int libcpath_error_fprint( libcpath_error_t *error, FILE *stream ); LIBCPATH_EXTERN \ int libcpath_error_sprint( libcpath_error_t *error, char *string, size_t size ); LIBCPATH_EXTERN \ int libcpath_error_backtrace_fprint( libcpath_error_t *error, FILE *stream ); LIBCPATH_EXTERN \ int libcpath_error_backtrace_sprint( libcpath_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCPATH_INTERNAL_ERROR_H ) */ libevt-20170120/libcpath/libcpath_system_string.h0000664000175000017500000000541413040331700024047 0ustar00lordyestalordyesta00000000000000/* * System string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_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 ) */ libevt-20170120/libcpath/libcpath_error.c0000664000175000017500000000554013040331700022261 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcpath_error.h" #include "libcpath_libcerror.h" #if !defined( HAVE_LOCAL_LIBCPATH ) /* Free an error and its elements */ void libcpath_error_free( libcpath_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcpath_error_fprint( libcpath_error_t *error, FILE *stream ) { 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 ) */ libevt-20170120/libcpath/libcpath_libcsplit.h0000664000175000017500000000266413040331700023126 0ustar00lordyestalordyesta00000000000000/* * The internal libcsplit header * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_LIBCSPLIT_H ) #define _LIBCPATH_LIBCSPLIT_H #include /* Define HAVE_LOCAL_LIBCSPLIT for local use of libcsplit */ #if defined( HAVE_LOCAL_LIBCSPLIT ) #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSPLIT_DLL_IMPORT * before including libcsplit.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSPLIT_DLL_IMPORT #endif #include #endif #endif libevt-20170120/libcpath/libcpath_path.h0000664000175000017500000001241713040331700022072 0ustar00lordyestalordyesta00000000000000/* * Path functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_PATH_H ) #define _LIBCPATH_PATH_H #include #include #include "libcpath_extern.h" #include "libcpath_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcpath_CloseHandle( HANDLE file_handle ); #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcpath_SetCurrentDirectoryA( LPCSTR path ); #endif 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 LIBCPATH_EXTERN \ int libcpath_path_get_current_working_directory( char **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_get_full_path( const char *path, size_t path_length, char **full_path, size_t *full_path_size, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_get_sanitized_filename( const char *filename, size_t filename_size, 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_size, 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 LIBCPATH_EXTERN \ int libcpath_path_make_directory( const char *directory_name, libcerror_error_t **error ); /* TODO: deprecated remove */ LIBCPATH_EXTERN \ int libcpath_path_sanitize( char *path, size_t *path_size, libcerror_error_t **error ); /* TODO: deprecated remove */ LIBCPATH_EXTERN \ int libcpath_path_sanitize_filename( char *filename, size_t *filename_size, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcpath_SetCurrentDirectoryW( LPCWSTR path ); #endif 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 LIBCPATH_EXTERN \ int libcpath_path_get_current_working_directory_wide( wchar_t **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_get_full_path_wide( const wchar_t *path, size_t path_length, wchar_t **full_path, size_t *full_path_size, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_get_sanitized_filename_wide( const wchar_t *filename, size_t filename_size, 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_size, 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 LIBCPATH_EXTERN \ int libcpath_path_make_directory_wide( const wchar_t *directory_name, libcerror_error_t **error ); /* TODO: deprecated remove */ LIBCPATH_EXTERN \ int libcpath_path_sanitize_wide( wchar_t *path, size_t *path_size, libcerror_error_t **error ); /* TODO: deprecated remove */ LIBCPATH_EXTERN \ int libcpath_path_sanitize_filename_wide( wchar_t *filename, size_t *filename_size, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCPATH_PATH_H ) */ libevt-20170120/libcpath/Makefile.in0000664000175000017500000007635313040342657021212 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBCPATH_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCPATH_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCPATH_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCPATH_TRUE@ @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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcpath/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcpath/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_path.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_system_string.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcpath ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcpath_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libcpath/libcpath_definitions.h0000664000175000017500000000271013040331700023444 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBCPATH_INTERNAL_DEFINITIONS_H ) #define LIBCPATH_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCPATH for local use of libcpath */ #if !defined( HAVE_LOCAL_LIBCPATH ) #include /* The definitions in are copied here * for local use of libcpath */ #else #define LIBCPATH_VERSION 20170108 /* The libcpath version string */ #define LIBCPATH_VERSION_STRING "20170108" #if defined( WINAPI ) #define LIBCPATH_SEPARATOR '\\' #else #define LIBCPATH_SEPARATOR '/' #endif /* defined( WINAPI ) */ #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */ #endif libevt-20170120/libcpath/libcpath_libcerror.h0000664000175000017500000000264113040331700023117 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_LIBCERROR_H ) #define _LIBCPATH_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBCPATH_LIBCERROR_H ) */ libevt-20170120/libcpath/libcpath_extern.h0000664000175000017500000000254513040331700022444 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_INTERNAL_EXTERN_H ) #define _LIBCPATH_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCPATH for local use of libcpath */ #if !defined( HAVE_LOCAL_LIBCPATH ) /* If libtool DLL support is enabled set LIBCPATH_DLL_EXPORT * before including libcpath/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCPATH_DLL_EXPORT #endif #include #else #define LIBCPATH_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */ #endif /* !defined( _LIBCPATH_INTERNAL_EXTERN_H ) */ libevt-20170120/libcpath/libcpath_path.c0000664000175000017500000047035413040331700022075 0ustar00lordyestalordyesta00000000000000/* * Path functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #if defined( HAVE_ERRNO_H ) #include #endif #if defined( HAVE_SYS_STAT_H ) #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 ) enum LIBCPATH_TYPES { LIBCPATH_TYPE_ABSOLUTE, LIBCPATH_TYPE_DEVICE, LIBCPATH_TYPE_EXTENDED_LENGTH, LIBCPATH_TYPE_RELATIVE, LIBCPATH_TYPE_UNC }; #else enum LIBCPATH_TYPES { LIBCPATH_TYPE_ABSOLUTE, LIBCPATH_TYPE_RELATIVE }; #endif /* defined( WINAPI ) */ #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; if( buffer == NULL ) { return( 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 ); } safe_current_working_directory_size = GetCurrentDirectoryA( 0, NULL ); if( safe_current_working_directory_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current working directory size.", function ); goto on_error; } if( (size_t) safe_current_working_directory_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: current working directory size value out of bounds.", function ); goto on_error; } *current_working_directory_size = (size_t) safe_current_working_directory_size; *current_working_directory = 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 volume name and path type * Returns 1 if succesful or -1 on error */ int libcpath_path_get_volume_name_and_path_type( const char *path, size_t path_length, char **volume_name, size_t *volume_name_length, size_t *directory_name_index, uint8_t *path_type, libcerror_error_t **error ) { static char *function = "libcpath_path_get_volume_name_and_path_type"; size_t path_index = 0; size_t share_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 > (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 ); } if( path_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path type.", function ); return( -1 ); } if( ( path_length == 2 ) && ( path[ 1 ] == '\\' ) ) { *path_type = LIBCPATH_TYPE_ABSOLUTE; } else if( path_length >= 2 ) { /* Check if the path starts with a volume letter */ if( ( path[ 1 ] == ':' ) && ( ( ( path[ 0 ] >= 'A' ) && ( path[ 0 ] <= 'Z' ) ) || ( ( path[ 0 ] >= 'a' ) && ( path[ 0 ] <= 'z' ) ) ) ) { *volume_name = (char *) path; *volume_name_length = 2; *directory_name_index = 2; if( ( path_length >= 3 ) && ( path[ 2 ] == '\\' ) ) { *path_type = LIBCPATH_TYPE_ABSOLUTE; *directory_name_index += 1; } } /* Check for special paths * paths with prefix: \\ */ else if( ( path[ 0 ] == '\\' ) && ( path[ 1 ] == '\\' ) ) { /* Determine if the path is a special path * device path prefix: \\.\ * extended-length path prefix: \\?\ */ if( ( path_length >= 4 ) && ( ( path[ 2 ] == '.' ) || ( path[ 2 ] == '?' ) ) && ( path[ 3 ] == '\\' ) ) { if( path[ 2 ] == '.' ) { *path_type = LIBCPATH_TYPE_DEVICE; } else { *path_type = LIBCPATH_TYPE_EXTENDED_LENGTH; } *directory_name_index = 4; } else { /* Determine the volume in an UNC path * \\server\share */ for( share_name_index = 2; share_name_index <= path_length; share_name_index++ ) { if( path[ share_name_index ] == '\\' ) { break; } } if( share_name_index > path_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid path - missing share name.", function ); return( -1 ); } for( path_index = share_name_index + 1; path_index <= path_length; path_index++ ) { if( path[ path_index ] == '\\' ) { break; } } *path_type = LIBCPATH_TYPE_UNC; *volume_name = (char *) &( path[ 2 ] ); *volume_name_length = path_index - 2; *directory_name_index = path_index; } } /* Check for absolue paths */ else if( path[ 0 ] == (wchar_t) '\\' ) { *path_type = LIBCPATH_TYPE_ABSOLUTE; } } 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( 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 volume name * Returns 1 if succesful or -1 on error */ int libcpath_path_get_volume_name( const char *path, size_t path_size, 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; if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } if( path_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid path size value exceeds maximum.", function ); return( -1 ); } if( 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 ); } /* TODO clean up code */ if( path_size >= 3 ) { if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path.", function ); return( -1 ); } /* Check if the path starts with a volume letter */ if( ( path[ 1 ] == ':' ) && ( ( ( path[ 0 ] >= 'A' ) && ( path[ 0 ] <= 'Z' ) ) || ( ( path[ 0 ] >= 'a' ) && ( path[ 0 ] <= 'z' ) ) ) ) { if( *volume_name == NULL ) { *volume_name = (char *) path; *volume_name_length = 2; } path_index = 2; if( path[ 2 ] == '\\' ) { path_index++; } *directory_name_index = path_index; } /* Check for special paths * paths with prefix: \\ */ else if( ( path[ 0 ] == '\\' ) && ( path[ 1 ] == '\\' ) ) { /* Ignore the following special paths * device path prefix: \\.\ */ if( ( path_size >= 4 ) && ( path[ 2 ] == '.' ) && ( path[ 3 ] == '\\' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported path.", function ); return( -1 ); } else { /* Determine the volume in an UNC path * \\server\share */ for( share_name_index = 2; share_name_index < path_size; share_name_index++ ) { if( path[ share_name_index ] == '\\' ) { break; } } if( share_name_index >= path_size ) { 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 + 1; path_index < path_size; path_index++ ) { if( path[ path_index ] == '\\' ) { break; } } if( *volume_name == NULL ) { *volume_name = (char *) &( path[ 2 ] ); if( path_index == path_size ) { *volume_name_length = path_index - 3; } else { *volume_name_length = path_index - 2; } } *directory_name_index = path_index; } } } 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 share_name_index = 0; size_t volume_name_length = 0; uint8_t path_type = LIBCPATH_TYPE_RELATIVE; int current_directory_number_of_segments = 0; int current_directory_segment_index = 0; int 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_volume_name_and_path_type( path, path_length, &volume_name, &volume_name_length, &path_directory_name_index, &path_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine volume name and path type.", 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 directory */ if( ( path_type != LIBCPATH_TYPE_DEVICE ) && ( path_type != LIBCPATH_TYPE_EXTENDED_LENGTH ) && ( 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 directory by volume.", function ); goto on_error; } /* Determine the volume name using the current directory if necessary */ if( libcpath_path_get_volume_name( current_directory, current_directory_size, &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 retrieve current directory by volume.", 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 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( share_name_index > 0 ) { safe_full_path_size += 4; } /* If the path is relative * add the size of the current directory * a directory separator, if necessary */ if( ( path_type == LIBCPATH_TYPE_RELATIVE ) && ( 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 directory string segments.", function ); goto on_error; } current_directory_segment_index = current_directory_number_of_segments - 1; } if( libcsplit_narrow_split_string_get_number_of_segments( path_split_string, &path_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of path string segments.", function ); goto on_error; } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_narrow_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } /* If the path is .. reverse the current path by one directory */ if( ( path_string_segment_size == 3 ) && ( path_string_segment[ 0 ] == '.' ) && ( path_string_segment[ 1 ] == '.' ) ) { if( ( current_directory_split_string != NULL ) && ( last_used_path_segment_index == -1 ) ) { if( libcsplit_narrow_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } /* Remove the size of the parent directory name and a directory separator * Note that the size includes the end of string character */ 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 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( 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 = "\\\\.\\"; 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( share_name_index > 0 ) { 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 directory elements */ if( ( path_type == LIBCPATH_TYPE_RELATIVE ) && ( current_directory_split_string != NULL ) ) { for( current_directory_segment_index = 0; current_directory_segment_index < current_directory_number_of_segments; current_directory_segment_index++ ) { if( libcsplit_narrow_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment_size != 0 ) { if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( narrow_string_copy( &( ( *full_path )[ full_path_index ] ), current_directory_string_segment, current_directory_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set current directory split value: %d in full path.", function, current_directory_segment_index ); goto on_error; } full_path_index += current_directory_string_segment_size - 1; ( *full_path )[ full_path_index ] = '\\'; full_path_index += 1; } } } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_narrow_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment_size != 0 ) { if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } if( narrow_string_copy( &( ( *full_path )[ full_path_index ] ), path_string_segment, path_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path split value: %d in full path.", function, path_segment_index ); goto on_error; } full_path_index += path_string_segment_size - 1; ( *full_path )[ full_path_index ] = '\\'; full_path_index += 1; } } ( *full_path )[ full_path_index - 1 ] = 0; if( libcsplit_narrow_split_string_free( &path_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free path split string.", function ); goto on_error; } if( current_directory_split_string != NULL ) { if( libcsplit_narrow_split_string_free( ¤t_directory_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free current directory split string.", function ); goto on_error; } } if( current_directory != NULL ) { memory_free( current_directory ); } return( 1 ); on_error: if( *full_path != NULL ) { memory_free( *full_path ); *full_path = NULL; } *full_path_size = 0; if( path_split_string != NULL ) { libcsplit_narrow_split_string_free( &path_split_string, NULL ); } if( current_directory_split_string != NULL ) { libcsplit_narrow_split_string_free( ¤t_directory_split_string, NULL ); } if( current_directory != NULL ) { memory_free( current_directory ); } return( -1 ); } #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 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 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 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 directory.", function ); goto on_error; } safe_full_path_size = current_directory_size - 1; if( ( current_directory_size >= 2 ) && ( current_directory[ current_directory_size - 2 ] != '/' ) ) { 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 directory string segments.", function ); goto on_error; } current_directory_segment_index = current_directory_number_of_segments - 1; } if( libcsplit_narrow_split_string_get_number_of_segments( path_split_string, &path_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of path string segments.", function ); goto on_error; } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_narrow_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } /* If the path is .. reverse the current path by one directory */ if( ( path_string_segment_size == 3 ) && ( path_string_segment[ 0 ] == '.' ) && ( path_string_segment[ 1 ] == '.' ) ) { if( ( current_directory_split_string != NULL ) && ( last_used_path_segment_index == -1 ) ) { if( libcsplit_narrow_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } /* Remove the size of the parent directory name and a directory separator * Note that the size includes the end of string character */ 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 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 directory elements */ if( ( path_type == LIBCPATH_TYPE_RELATIVE ) && ( current_directory_split_string != NULL ) ) { for( current_directory_segment_index = 0; current_directory_segment_index < current_directory_number_of_segments; current_directory_segment_index++ ) { if( libcsplit_narrow_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment_size != 0 ) { if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( narrow_string_copy( &( ( *full_path )[ full_path_index ] ), current_directory_string_segment, current_directory_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set current directory split value: %d in full path.", function, current_directory_segment_index ); goto on_error; } full_path_index += current_directory_string_segment_size - 1; ( *full_path )[ full_path_index ] = '/'; full_path_index += 1; } } } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_narrow_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment_size != 0 ) { if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } if( narrow_string_copy( &( ( *full_path )[ full_path_index ] ), path_string_segment, path_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path split value: %d in full path.", function, path_segment_index ); goto on_error; } full_path_index += path_string_segment_size - 1; ( *full_path )[ full_path_index ] = '/'; full_path_index += 1; } } ( *full_path )[ full_path_index - 1 ] = 0; if( libcsplit_narrow_split_string_free( &path_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free path split string.", function ); goto on_error; } if( current_directory_split_string != NULL ) { if( libcsplit_narrow_split_string_free( ¤t_directory_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free current directory split string.", function ); goto on_error; } } if( current_directory != NULL ) { memory_free( current_directory ); } return( 1 ); on_error: if( *full_path != NULL ) { memory_free( *full_path ); *full_path = NULL; } *full_path_size = 0; if( path_split_string != NULL ) { libcsplit_narrow_split_string_free( &path_split_string, NULL ); } if( current_directory_split_string != NULL ) { libcsplit_narrow_split_string_free( ¤t_directory_split_string, NULL ); } if( current_directory != NULL ) { memory_free( current_directory ); } return( -1 ); } #endif /* defined( WINAPI ) */ /* 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_size, char **sanitized_filename, size_t *sanitized_filename_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_sanitized_filename"; 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 ); } /* TODO implement */ 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_size, char **sanitized_path, size_t *sanitized_path_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_sanitized_path"; 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 ); } /* TODO implement */ 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 /* Sanitizes the path * Returns 1 if successful or -1 on error */ int libcpath_path_sanitize( char *path, size_t *path_size, libcerror_error_t **error ) { static char *function = "libcpath_path_sanitize"; size_t path_index = 0; if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } if( path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path size.", function ); return( -1 ); } if( *path_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid path size value exceeds maximum.", function ); return( -1 ); } #if defined( WINAPI ) || defined( __CYGWIN__ ) if( *path_size > 32767 ) { path[ 32766 ] = 0; *path_size = 32767; } #endif for( path_index = 0; path_index < *path_size; path_index++ ) { if( path[ path_index ] == 0x00 ) { break; } else if( ( path[ path_index ] >= 0x01 ) && ( path[ path_index ] <= 0x1f ) ) { path[ path_index ] = '_'; } #if defined( WINAPI ) else if( path[ path_index ] == '/' ) #else else if( path[ path_index ] == '\\' ) #endif { path[ path_index ] = '_'; } else if( ( path[ path_index ] == '!' ) || ( path[ path_index ] == '$' ) || ( path[ path_index ] == '%' ) || ( path[ path_index ] == '&' ) || ( path[ path_index ] == '*' ) || ( path[ path_index ] == '+' ) || ( path[ path_index ] == ':' ) || ( path[ path_index ] == ';' ) || ( path[ path_index ] == '<' ) || ( path[ path_index ] == '>' ) || ( path[ path_index ] == '?' ) || ( path[ path_index ] == '@' ) || ( path[ path_index ] == '|' ) || ( path[ path_index ] == '~' ) || ( path[ path_index ] == 0x7f ) ) { path[ path_index ] = '_'; } } return( 1 ); } /* Sanitizes the filename * Returns 1 if successful or -1 on error */ int libcpath_path_sanitize_filename( char *filename, size_t *filename_size, libcerror_error_t **error ) { static char *function = "libcpath_path_sanitize_filename"; size_t filename_index = 0; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( filename_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename size.", function ); return( -1 ); } if( *filename_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid filename size value exceeds maximum.", function ); return( -1 ); } #if defined( WINAPI ) || defined( __CYGWIN__ ) if( *filename_size > 256 ) { filename[ 255 ] = 0; *filename_size = 256; } #endif for( filename_index = 0; filename_index < *filename_size; filename_index++ ) { if( filename[ filename_index ] == 0x00 ) { break; } else if( ( filename[ filename_index ] >= 0x01 ) && ( filename[ filename_index ] <= 0x1f ) ) { filename[ filename_index ] = '_'; } else if( ( filename[ filename_index ] == '/' ) || ( filename[ filename_index ] == '\\' ) ) { filename[ filename_index ] = '_'; } else if( ( filename[ filename_index ] == '!' ) || ( filename[ filename_index ] == '$' ) || ( filename[ filename_index ] == '%' ) || ( filename[ filename_index ] == '&' ) || ( filename[ filename_index ] == '*' ) || ( filename[ filename_index ] == '+' ) || ( filename[ filename_index ] == ':' ) || ( filename[ filename_index ] == ';' ) || ( filename[ filename_index ] == '<' ) || ( filename[ filename_index ] == '>' ) || ( filename[ filename_index ] == '?' ) || ( filename[ filename_index ] == '@' ) || ( filename[ filename_index ] == '|' ) || ( filename[ filename_index ] == '~' ) || ( filename[ filename_index ] == 0x7f ) ) { filename[ filename_index ] = '_'; } } return( 1 ); } #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; if( buffer == NULL ) { return( 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 ); } safe_current_working_directory_size = GetCurrentDirectoryW( 0, NULL ); if( safe_current_working_directory_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current working directory size.", function ); goto on_error; } if( (size_t) safe_current_working_directory_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: current working directory size value out of bounds.", function ); goto on_error; } *current_working_directory_size = (size_t) safe_current_working_directory_size; *current_working_directory = 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; } 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 volume name and path type * Returns 1 if succesful or -1 on error */ int libcpath_path_get_volume_name_and_path_type_wide( const wchar_t *path, size_t path_length, wchar_t **volume_name, size_t *volume_name_length, size_t *directory_name_index, uint8_t *path_type, libcerror_error_t **error ) { static char *function = "libcpath_path_get_volume_name_and_path_type_wide"; size_t path_index = 0; size_t share_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 > (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 ); } if( path_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path type.", function ); return( -1 ); } if( ( path_length == 2 ) && ( path[ 1 ] == (wchar_t) '\\' ) ) { *path_type = LIBCPATH_TYPE_ABSOLUTE; } else if( path_length >= 2 ) { /* Check if the path starts with a volume letter */ if( ( path[ 1 ] == (wchar_t) ':' ) && ( ( ( path[ 0 ] >= (wchar_t) 'A' ) && ( path[ 0 ] <= (wchar_t) 'Z' ) ) || ( ( path[ 0 ] >= (wchar_t) 'a' ) && ( path[ 0 ] <= (wchar_t) 'z' ) ) ) ) { *volume_name = (wchar_t *) path; *volume_name_length = 2; *directory_name_index = 2; if( ( path_length >= 3 ) && ( path[ 2 ] == (wchar_t) '\\' ) ) { *path_type = LIBCPATH_TYPE_ABSOLUTE; *directory_name_index += 1; } } /* Check for special paths * paths with prefix: \\ */ else if( ( path[ 0 ] == (wchar_t) '\\' ) && ( path[ 1 ] == (wchar_t) '\\' ) ) { /* Determine if the path is a special path * device path prefix: \\.\ * extended-length path prefix: \\?\ */ if( ( path_length >= 4 ) && ( ( path[ 2 ] == (wchar_t) '.' ) || ( path[ 2 ] == (wchar_t) '?' ) ) && ( path[ 3 ] == (wchar_t) '\\' ) ) { if( path[ 2 ] == (wchar_t) '.' ) { *path_type = LIBCPATH_TYPE_DEVICE; } else { *path_type = LIBCPATH_TYPE_EXTENDED_LENGTH; } *directory_name_index = 4; } else { /* Determine the volume in an UNC path * \\server\share */ for( share_name_index = 2; share_name_index <= path_length; share_name_index++ ) { if( path[ share_name_index ] == (wchar_t) '\\' ) { break; } } if( share_name_index > path_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid path - missing share name.", function ); return( -1 ); } for( path_index = share_name_index + 1; path_index <= path_length; path_index++ ) { if( path[ path_index ] == (wchar_t) '\\' ) { break; } } *path_type = LIBCPATH_TYPE_UNC; *volume_name = (wchar_t *) &( path[ 2 ] ); *volume_name_length = path_index - 2; *directory_name_index = path_index; } } /* Check for absolue paths */ else if( path[ 0 ] == (wchar_t) '\\' ) { *path_type = LIBCPATH_TYPE_ABSOLUTE; } } 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( 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 volume name * Returns 1 if succesful or -1 on error */ int libcpath_path_get_volume_name_wide( const wchar_t *path, size_t path_size, 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; if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } if( path_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid path size value exceeds maximum.", function ); return( -1 ); } if( 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 ); } /* TODO clean up code */ if( path_size >= 3 ) { if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path.", function ); return( -1 ); } /* Check if the path starts with a volume letter */ if( ( path[ 1 ] == (wchar_t) ':' ) && ( ( ( path[ 0 ] >= (wchar_t) 'A' ) && ( path[ 0 ] <= (wchar_t) 'Z' ) ) || ( ( path[ 0 ] >= (wchar_t) 'a' ) && ( path[ 0 ] <= (wchar_t) 'z' ) ) ) ) { if( *volume_name == NULL ) { *volume_name = (wchar_t *) path; *volume_name_length = 2; } path_index = 2; if( path[ 2 ] == (wchar_t) '\\' ) { path_index++; } *directory_name_index = path_index; } /* Check for special paths * paths with prefix: \\ */ else if( ( path[ 0 ] == (wchar_t) '\\' ) && ( path[ 1 ] == (wchar_t) '\\' ) ) { /* Ignore the following special paths * device path prefix: \\.\ */ if( ( path_size >= 4 ) && ( path[ 2 ] == (wchar_t) '.' ) && ( path[ 3 ] == (wchar_t) '\\' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported path.", function ); return( -1 ); } else { /* Determine the volume in an UNC path * \\server\share */ for( share_name_index = 2; share_name_index < path_size; share_name_index++ ) { if( path[ share_name_index ] == (wchar_t) '\\' ) { break; } } if( share_name_index >= path_size ) { 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 + 1; path_index < path_size; path_index++ ) { if( path[ path_index ] == (wchar_t) '\\' ) { break; } } if( *volume_name == NULL ) { *volume_name = (wchar_t *) &( path[ 2 ] ); if( path_index == path_size ) { *volume_name_length = path_index - 3; } else { *volume_name_length = path_index - 2; } } *directory_name_index = path_index; } } } 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 share_name_index = 0; size_t volume_name_length = 0; uint8_t path_type = LIBCPATH_TYPE_RELATIVE; int current_directory_number_of_segments = 0; int current_directory_segment_index = 0; int 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_volume_name_and_path_type_wide( path, path_length, &volume_name, &volume_name_length, &path_directory_name_index, &path_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine volume name and path type.", 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 directory */ if( ( path_type != LIBCPATH_TYPE_DEVICE ) && ( path_type != LIBCPATH_TYPE_EXTENDED_LENGTH ) && ( 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 directory by volume.", function ); goto on_error; } /* Determine the volume name using the current directory if necessary */ if( libcpath_path_get_volume_name_wide( current_directory, current_directory_size, &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 retrieve current directory by volume.", 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 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( share_name_index > 0 ) { safe_full_path_size += 4; } /* If the path is relative * add the size of the current directory * a directory separator, if necessary */ if( ( path_type == LIBCPATH_TYPE_RELATIVE ) && ( 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 directory string segments.", function ); goto on_error; } current_directory_segment_index = current_directory_number_of_segments - 1; } if( libcsplit_wide_split_string_get_number_of_segments( path_split_string, &path_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of path string segments.", function ); goto on_error; } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_wide_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } /* If the path is .. reverse the current path by one directory */ if( ( path_string_segment_size == 3 ) && ( path_string_segment[ 0 ] == (wchar_t) '.' ) && ( path_string_segment[ 1 ] == (wchar_t) '.' ) ) { if( ( current_directory_split_string != NULL ) && ( last_used_path_segment_index == -1 ) ) { if( libcsplit_wide_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } /* Remove the size of the parent directory name and a directory separator * Note that the size includes the end of string character */ 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 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( share_name_index > 0 ) { 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 directory elements */ if( ( path_type == LIBCPATH_TYPE_RELATIVE ) && ( current_directory_split_string != NULL ) ) { for( current_directory_segment_index = 0; current_directory_segment_index < current_directory_number_of_segments; current_directory_segment_index++ ) { if( libcsplit_wide_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment_size != 0 ) { if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( wide_string_copy( &( ( *full_path )[ full_path_index ] ), current_directory_string_segment, current_directory_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set current directory split value: %d in full path.", function, current_directory_segment_index ); goto on_error; } full_path_index += current_directory_string_segment_size - 1; ( *full_path )[ full_path_index ] = (wchar_t) '\\'; full_path_index += 1; } } } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_wide_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment_size != 0 ) { if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } if( wide_string_copy( &( ( *full_path )[ full_path_index ] ), path_string_segment, path_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path split value: %d in full path.", function, path_segment_index ); goto on_error; } full_path_index += path_string_segment_size - 1; ( *full_path )[ full_path_index ] = (wchar_t) '\\'; full_path_index += 1; } } ( *full_path )[ full_path_index - 1 ] = 0; if( libcsplit_wide_split_string_free( &path_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free path split string.", function ); goto on_error; } if( current_directory_split_string != NULL ) { if( libcsplit_wide_split_string_free( ¤t_directory_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free current directory split string.", function ); goto on_error; } } if( current_directory != NULL ) { memory_free( current_directory ); } return( 1 ); on_error: if( *full_path != NULL ) { memory_free( *full_path ); *full_path = NULL; } *full_path_size = 0; if( path_split_string != NULL ) { libcsplit_wide_split_string_free( &path_split_string, NULL ); } if( current_directory_split_string != NULL ) { libcsplit_wide_split_string_free( ¤t_directory_split_string, NULL ); } if( current_directory != NULL ) { memory_free( current_directory ); } return( -1 ); } #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 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 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 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 directory.", function ); goto on_error; } safe_full_path_size = current_directory_size - 1; if( ( current_directory_size >= 2 ) && ( current_directory[ current_directory_size - 2 ] != (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 directory string segments.", function ); goto on_error; } current_directory_segment_index = current_directory_number_of_segments - 1; } if( libcsplit_wide_split_string_get_number_of_segments( path_split_string, &path_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of path string segments.", function ); goto on_error; } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_wide_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } /* If the path is .. reverse the current path by one directory */ if( ( path_string_segment_size == 3 ) && ( path_string_segment[ 0 ] == (wchar_t) '.' ) && ( path_string_segment[ 1 ] == (wchar_t) '.' ) ) { if( ( current_directory_split_string != NULL ) && ( last_used_path_segment_index == -1 ) ) { if( libcsplit_wide_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } /* Remove the size of the parent directory name and a directory separator * Note that the size includes the end of string character */ 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 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 directory elements */ if( ( path_type == LIBCPATH_TYPE_RELATIVE ) && ( current_directory_split_string != NULL ) ) { for( current_directory_segment_index = 0; current_directory_segment_index < current_directory_number_of_segments; current_directory_segment_index++ ) { if( libcsplit_wide_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment_size != 0 ) { if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( wide_string_copy( &( ( *full_path )[ full_path_index ] ), current_directory_string_segment, current_directory_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set current directory split value: %d in full path.", function, current_directory_segment_index ); goto on_error; } full_path_index += current_directory_string_segment_size - 1; ( *full_path )[ full_path_index ] = (wchar_t) '/'; full_path_index += 1; } } } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_wide_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment_size != 0 ) { if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } if( wide_string_copy( &( ( *full_path )[ full_path_index ] ), path_string_segment, path_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path split value: %d in full path.", function, path_segment_index ); goto on_error; } full_path_index += path_string_segment_size - 1; ( *full_path )[ full_path_index ] = (wchar_t) '/'; full_path_index += 1; } } ( *full_path )[ full_path_index - 1 ] = 0; if( libcsplit_wide_split_string_free( &path_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free path split string.", function ); goto on_error; } if( current_directory_split_string != NULL ) { if( libcsplit_wide_split_string_free( ¤t_directory_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free current directory split string.", function ); goto on_error; } } if( current_directory != NULL ) { memory_free( current_directory ); } return( 1 ); on_error: if( *full_path != NULL ) { memory_free( *full_path ); *full_path = NULL; } *full_path_size = 0; if( path_split_string != NULL ) { libcsplit_wide_split_string_free( &path_split_string, NULL ); } if( current_directory_split_string != NULL ) { libcsplit_wide_split_string_free( ¤t_directory_split_string, NULL ); } if( current_directory != NULL ) { memory_free( current_directory ); } return( -1 ); } #endif /* defined( WINAPI ) */ /* 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_size, wchar_t **sanitized_filename, size_t *sanitized_filename_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_sanitized_filename_wide"; 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 ); } /* TODO implement */ 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_size, wchar_t **sanitized_path, size_t *sanitized_path_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_sanitized_path_wide"; 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 ); } /* TODO implement */ 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 /* Sanitizes the path * Returns 1 if successful or -1 on error */ int libcpath_path_sanitize_wide( wchar_t *path, size_t *path_size, libcerror_error_t **error ) { static char *function = "libcpath_path_sanitize_wide"; size_t path_index = 0; if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } if( path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path size.", function ); return( -1 ); } if( *path_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid path size value exceeds maximum.", function ); return( -1 ); } #if defined( WINAPI ) || defined( __CYGWIN__ ) if( *path_size > 32767 ) { path[ 32766 ] = 0; *path_size = 32767; } #endif for( path_index = 0; path_index < *path_size; path_index++ ) { if( path[ path_index ] == 0x00 ) { break; } else if( ( path[ path_index ] >= 0x01 ) && ( path[ path_index ] <= 0x1f ) ) { path[ path_index ] = (wchar_t) '_'; } #if defined( WINAPI ) else if( path[ path_index ] == (wchar_t) '/' ) #else else if( path[ path_index ] == (wchar_t) '\\' ) #endif { path[ path_index ] = (wchar_t) '_'; } else if( ( path[ path_index ] == (wchar_t) '!' ) || ( path[ path_index ] == (wchar_t) '$' ) || ( path[ path_index ] == (wchar_t) '%' ) || ( path[ path_index ] == (wchar_t) '&' ) || ( path[ path_index ] == (wchar_t) '*' ) || ( path[ path_index ] == (wchar_t) '+' ) || ( path[ path_index ] == (wchar_t) ':' ) || ( path[ path_index ] == (wchar_t) ';' ) || ( path[ path_index ] == (wchar_t) '<' ) || ( path[ path_index ] == (wchar_t) '>' ) || ( path[ path_index ] == (wchar_t) '?' ) || ( path[ path_index ] == (wchar_t) '@' ) || ( path[ path_index ] == (wchar_t) '|' ) || ( path[ path_index ] == (wchar_t) '~' ) || ( path[ path_index ] == 0x7f ) ) { path[ path_index ] = (wchar_t) '_'; } } return( 1 ); } /* Sanitizes the filename * Returns 1 if successful or -1 on error */ int libcpath_path_sanitize_filename_wide( wchar_t *filename, size_t *filename_size, libcerror_error_t **error ) { static char *function = "libcpath_path_sanitize_filename_wide"; size_t filename_index = 0; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( filename_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename size.", function ); return( -1 ); } if( *filename_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid filename size value exceeds maximum.", function ); return( -1 ); } #if defined( WINAPI ) || defined( __CYGWIN__ ) if( *filename_size > 256 ) { filename[ 255 ] = 0; *filename_size = 256; } #endif for( filename_index = 0; filename_index < *filename_size; filename_index++ ) { if( filename[ filename_index ] == 0x00 ) { break; } else if( ( filename[ filename_index ] >= 0x01 ) && ( filename[ filename_index ] <= 0x1f ) ) { filename[ filename_index ] = (wchar_t) '_'; } else if( ( filename[ filename_index ] == (wchar_t) '/' ) || ( filename[ filename_index ] == (wchar_t) '\\' ) ) { filename[ filename_index ] = (wchar_t) '_'; } else if( ( filename[ filename_index ] == (wchar_t) '!' ) || ( filename[ filename_index ] == (wchar_t) '$' ) || ( filename[ filename_index ] == (wchar_t) '%' ) || ( filename[ filename_index ] == (wchar_t) '&' ) || ( filename[ filename_index ] == (wchar_t) '*' ) || ( filename[ filename_index ] == (wchar_t) '+' ) || ( filename[ filename_index ] == (wchar_t) ':' ) || ( filename[ filename_index ] == (wchar_t) ';' ) || ( filename[ filename_index ] == (wchar_t) '<' ) || ( filename[ filename_index ] == (wchar_t) '>' ) || ( filename[ filename_index ] == (wchar_t) '?' ) || ( filename[ filename_index ] == (wchar_t) '@' ) || ( filename[ filename_index ] == (wchar_t) '|' ) || ( filename[ filename_index ] == (wchar_t) '~' ) || ( filename[ filename_index ] == 0x7f ) ) { filename[ filename_index ] = (wchar_t) '_'; } } return( 1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libevt-20170120/libcpath/libcpath_system_string.c0000664000175000017500000006173213040331700024047 0ustar00lordyestalordyesta00000000000000/* * System string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #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 ) */ libevt-20170120/libcpath/libcpath_support.h0000664000175000017500000000266713040331700022660 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_SUPPORT_H ) #define _LIBCPATH_SUPPORT_H #include #include #include "libcpath_extern.h" #include "libcpath_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCPATH ) LIBCPATH_EXTERN \ const char *libcpath_get_version( void ); 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 ) */ libevt-20170120/libcpath/libcpath_libuna.h0000664000175000017500000000323513040331700022406 0ustar00lordyestalordyesta00000000000000/* * The libuna header wrapper * * Copyright (C) 2008-2017, Joachim Metz * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_LIBUNA_H ) #define _LIBCPATH_LIBUNA_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) #include #include #include #include #include #include #include #include #include #include #include #include #include #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 ) */ libevt-20170120/manuals/0000775000175000017500000000000013040343017016770 5ustar00lordyestalordyesta00000000000000libevt-20170120/manuals/evtinfo.10000664000175000017500000000334013040331673020531 0ustar00lordyestalordyesta00000000000000.Dd January 31, 2014 .Dt evtinfo .Os libevt .Sh NAME .Nm evtinfo .Nd determines information about a Windows Event Log (EVT) .Sh SYNOPSIS .Nm evtinfo .Op Fl c Ar codepage .Op Fl hvV .Va Ar source .Sh DESCRIPTION .Nm evtinfo is a utility to determine information about a Windows Event Log (EVT) .Pp .Nm evtinfo is part of the .Nm libevt package. .Nm libevt is a library to access the Windows Event Log (EVT) format .Pp .Ar source is the source file. .Pp The options are as follows: .Bl -tag -width Ds .It Fl c Ar codepage specify the codepage of ASCII strings, options: ascii, windows-874, windows-932, windows-936, windows-949, windows-950, windows-1250, windows-1251, windows-1252 (default), windows-1253, windows-1254, windows-1255, windows-1256, windows-1257 or windows-1258 .It Fl h shows this help .It Fl v verbose output to stderr .It Fl V print version .El .Sh ENVIRONMENT None .Sh FILES None .Sh EXAMPLES .Bd -literal # evtinfo AppEvent.Evt evtinfo 20120624 Windows Event Log (EVT) information: Version : 1.1 Number of records : 19 Number of recovered records : 0 Log type : Application Flags: Should be archived .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/libevt/ .Sh AUTHOR These man pages were written by Joachim Metz. .Sh COPYRIGHT Copyright (C) 2011-2017, Joachim Metz . This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .Sh SEE ALSO .Xr evtexport 1 libevt-20170120/manuals/Makefile.am0000664000175000017500000000027012675771063021046 0ustar00lordyestalordyesta00000000000000man_MANS = \ evtexport.1 \ evtinfo.1 \ libevt.3 EXTRA_DIST = \ evtexport.1 \ evtinfo.1 \ libevt.3 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile libevt-20170120/manuals/libevt.30000664000175000017500000001760213040331673020354 0ustar00lordyestalordyesta00000000000000.Dd January 20, 2017 .Dt libevt 3 .Os libevt .Sh NAME .Nm libevt.h .Nd Library to access the Windows Event Log (EVT) format .Sh LIBRARY .Lb libevt .Sh SYNOPSIS .In libevt.h .Pp Support functions .Ft const char * .Fn libevt_get_version "void" .Ft int .Fn libevt_get_access_flags_read "void" .Ft int .Fn libevt_get_codepage "int *codepage, libevt_error_t **error" .Ft int .Fn libevt_set_codepage "int codepage, libevt_error_t **error" .Ft int .Fn libevt_check_file_signature "const char *filename, libevt_error_t **error" .Pp Available when compiled with wide character string support: .Ft int .Fn libevt_check_file_signature_wide "const wchar_t *filename, libevt_error_t **error" .Pp Available when compiled with libbfio support: .Ft int .Fn libevt_check_file_signature_file_io_handle "libbfio_handle_t *file_io_handle, libevt_error_t **error" .Pp Notify functions .Ft void .Fn libevt_notify_set_verbose "int verbose" .Ft int .Fn libevt_notify_set_stream "FILE *stream, libevt_error_t **error" .Ft int .Fn libevt_notify_stream_open "const char *filename, libevt_error_t **error" .Ft int .Fn libevt_notify_stream_close "libevt_error_t **error" .Pp Error functions .Ft void .Fn libevt_error_free "libevt_error_t **error" .Ft int .Fn libevt_error_fprint "libevt_error_t *error, FILE *stream" .Ft int .Fn libevt_error_sprint "libevt_error_t *error, char *string, size_t size" .Ft int .Fn libevt_error_backtrace_fprint "libevt_error_t *error, FILE *stream" .Ft int .Fn libevt_error_backtrace_sprint "libevt_error_t *error, char *string, size_t size" .Pp File functions .Ft int .Fn libevt_file_initialize "libevt_file_t **file, libevt_error_t **error" .Ft int .Fn libevt_file_free "libevt_file_t **file, libevt_error_t **error" .Ft int .Fn libevt_file_signal_abort "libevt_file_t *file, libevt_error_t **error" .Ft int .Fn libevt_file_open "libevt_file_t *file, const char *filename, int access_flags, libevt_error_t **error" .Ft int .Fn libevt_file_close "libevt_file_t *file, libevt_error_t **error" .Ft int .Fn libevt_file_is_corrupted "libevt_file_t *file, libevt_error_t **error" .Ft int .Fn libevt_file_get_ascii_codepage "libevt_file_t *file, int *ascii_codepage, libevt_error_t **error" .Ft int .Fn libevt_file_set_ascii_codepage "libevt_file_t *file, int ascii_codepage, libevt_error_t **error" .Ft int .Fn libevt_file_get_format_version "libevt_file_t *file, uint32_t *major_version, uint32_t *minor_version, libevt_error_t **error" .Ft int .Fn libevt_file_get_flags "libevt_file_t *file, uint32_t *flags, libevt_error_t **error" .Ft int .Fn libevt_file_get_number_of_records "libevt_file_t *file, int *number_of_records, libevt_error_t **error" .Ft int .Fn libevt_file_get_record "libevt_file_t *file, int record_index, libevt_record_t **record, libevt_error_t **error" .Ft int .Fn libevt_file_get_number_of_recovered_records "libevt_file_t *file, int *number_of_records, libevt_error_t **error" .Ft int .Fn libevt_file_get_recovered_record "libevt_file_t *file, int record_index, libevt_record_t **record, libevt_error_t **error" .Pp Available when compiled with wide character string support: .Ft int .Fn libevt_file_open_wide "libevt_file_t *file, const wchar_t *filename, int access_flags, libevt_error_t **error" .Pp Available when compiled with libbfio support: .Ft int .Fn libevt_file_open_file_io_handle "libevt_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libevt_error_t **error" .Pp Record functions .Ft int .Fn libevt_record_free "libevt_record_t **record, libevt_error_t **error" .Ft int .Fn libevt_record_get_offset "libevt_record_t *record, off64_t *offset, libevt_error_t **error" .Ft int .Fn libevt_record_get_identifier "libevt_record_t *record, uint32_t *identifier, libevt_error_t **error" .Ft int .Fn libevt_record_get_creation_time "libevt_record_t *record, uint32_t *posix_time, libevt_error_t **error" .Ft int .Fn libevt_record_get_written_time "libevt_record_t *record, uint32_t *posix_time, libevt_error_t **error" .Ft int .Fn libevt_record_get_event_identifier "libevt_record_t *record, uint32_t *event_identifier, libevt_error_t **error" .Ft int .Fn libevt_record_get_event_type "libevt_record_t *record, uint16_t *event_type, libevt_error_t **error" .Ft int .Fn libevt_record_get_event_category "libevt_record_t *record, uint16_t *event_category, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf8_source_name_size "libevt_record_t *record, size_t *utf8_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf8_source_name "libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf16_source_name_size "libevt_record_t *record, size_t *utf16_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf16_source_name "libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf8_computer_name_size "libevt_record_t *record, size_t *utf8_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf8_computer_name "libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf16_computer_name_size "libevt_record_t *record, size_t *utf16_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf16_computer_name "libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf8_user_security_identifier_size "libevt_record_t *record, size_t *utf8_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf8_user_security_identifier "libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf16_user_security_identifier_size "libevt_record_t *record, size_t *utf16_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf16_user_security_identifier "libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_number_of_strings "libevt_record_t *record, int *number_of_strings, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf8_string_size "libevt_record_t *record, int string_index, size_t *utf8_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf8_string "libevt_record_t *record, int string_index, uint8_t *utf8_string, size_t utf8_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf16_string_size "libevt_record_t *record, int string_index, size_t *utf16_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_utf16_string "libevt_record_t *record, int string_index, uint16_t *utf16_string, size_t utf16_string_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_data_size "libevt_record_t *record, size_t *data_size, libevt_error_t **error" .Ft int .Fn libevt_record_get_data "libevt_record_t *record, uint8_t *data, size_t data_size, libevt_error_t **error" .Sh DESCRIPTION The .Fn libevt_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 "libevt.h". .Sh ENVIRONMENT None .Sh FILES None .Sh NOTES libevt allows to be compiled with wide character support (wchar_t). To compile libevt with wide character support use: .Ar ./configure --enable-wide-character-type=yes or define: .Ar _UNICODE or .Ar UNICODE during compilation. .Ar LIBEVT_WIDE_CHARACTER_TYPE in libevt/features.h can be used to determine if libevt was compiled with wide character support. .Sh BUGS Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libevt/issues .Sh AUTHOR These man pages are generated from "libevt.h". .Sh COPYRIGHT Copyright (C) 2011-2017, Joachim Metz . This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .Sh SEE ALSO the libevt.h include file libevt-20170120/manuals/Makefile.in0000664000175000017500000007144213040342660021050 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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__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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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 = \ evtexport.1 \ evtinfo.1 \ libevt.3 EXTRA_DIST = \ evtexport.1 \ evtinfo.1 \ libevt.3 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu manuals/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu manuals/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) @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) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-man3 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 uninstall-man3 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ 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 tags-am uninstall \ uninstall-am uninstall-man uninstall-man1 uninstall-man3 .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/manuals/evtexport.10000664000175000017500000000531713040331673021125 0ustar00lordyestalordyesta00000000000000.Dd January 31, 2014 .Dt evtexport .Os libevt .Sh NAME .Nm evtexport .Nd exports items stored in a Windows Event Log (EVT) .Sh SYNOPSIS .Nm evtexport .Op Fl c Ar codepage .Op Fl l Ar log_file .Op Fl m Ar mode .Op Fl p Ar message_files_path .Op Fl r Ar registy_files_path .Op Fl s Ar system_file .Op Fl S Ar software_file .Op Fl t Ar event_log_type .Op Fl hvV .Va Ar source .Sh DESCRIPTION .Nm evtexport is a utility to export items stored in a Windows Event Log (EVT) .Pp .Nm evtexport is part of the .Nm libevt package. .Nm libevt is a library to access the Windows Event Log (EVT) format .Pp .Ar source is the source file. .Pp The options are as follows: .Bl -tag -width Ds .It Fl c Ar codepage specify the codepage of ASCII strings, options: ascii, windows-874, windows-932, windows-936, windows-949, windows-950, windows-1250, windows-1251, windows-1252 (default), windows-1253, windows-1254, windows-1255, windows-1256, windows-1257 or windows-1258 .It Fl h shows this help .It Fl l Ar log_file specify the file in which to log information about the exported items .It Fl m Ar mode export mode, option: all, items (default), recovered 'all' exports the (allocated) items and recovered items, 'items' exports the (allocated) items and 'recovered' exports the recovered items .It Fl p Ar message_files_path search PATH for the resource files (default is the current working directory) .It Fl r Ar registy_files_path name of the directory containing the SOFTWARE and SYSTEM (Windows) Registry file .It Fl s Ar system_file filename of the SYSTEM (Windows) Registry file This option overrides the path provided by \-r .It Fl S Ar software_file filename of the SOFTWARE (Windows) Registry file This option overrides the path provided by \-r .It Fl t Ar event_log_type event log type, options: application, security, system if not specified the event log type is determined based on the filename. .It Fl v verbose output to stderr .It Fl V print version .El .Sh ENVIRONMENT None .Sh FILES None .Sh EXAMPLES .Bd -literal # evtexport evtexport -p c/ -r c/Windows/System32/config/ c/Windows/System32/config/AppEvent.Evt evtexport 20120910 .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/libevt/ .Sh AUTHOR These man pages were written by Joachim Metz. .Sh COPYRIGHT Copyright (C) 2011-2017, Joachim Metz . This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .Sh SEE ALSO .Xr evtinfo 1 libevt-20170120/ABOUT-NLS0000644000175000017500000026713311642277124016604 0ustar00lordyestalordyesta000000000000001 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. 1.1 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. Installers may use special options at configuration time for changing the default behaviour. The command: ./configure --disable-nls will _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl' library and will decide to use it. If not, you may have to to use the `--with-libintl-prefix' option to tell `configure' where to look for it. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.2 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. If you happen to have the `LC_ALL' or some other `LC_xxx' environment variables set, you should unset them before setting `LANG', otherwise the setting of `LANG' will not have the desired effect. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.3 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.4 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of June 2010. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca +--------------------------------------------------+ a2ps | [] [] | aegis | | ant-phone | | anubis | | aspell | [] [] | bash | | bfd | | bibshelf | [] | binutils | | bison | | bison-runtime | [] | bluez-pin | [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] [] | cpio | | cppi | | cpplib | [] | cryptsetup | | dfarc | | dialog | [] [] | dico | | diffutils | [] | dink | | doodle | | e2fsprogs | [] | enscript | [] | exif | | fetchmail | [] | findutils | [] | flex | [] | freedink | | gas | | gawk | [] [] | gcal | [] | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] [] | gettext-tools | [] [] | gip | [] | gjay | | gliv | [] | glunarclock | [] [] | gnubiff | | gnucash | [] | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | | gold | | gpe-aerial | | gpe-beam | | gpe-bluetooth | | gpe-calendar | | gpe-clock | [] | gpe-conf | | gpe-contacts | | gpe-edit | | gpe-filemanager | | gpe-go | | gpe-login | | gpe-ownerinfo | [] | gpe-package | | gpe-sketchbook | | gpe-su | [] | gpe-taskmanager | [] | gpe-timesheet | [] | gpe-today | [] | gpe-todo | | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | [] [] | gsasl | | gss | | gst-plugins-bad | [] | gst-plugins-base | [] | gst-plugins-good | [] | gst-plugins-ugly | [] | gstreamer | [] [] [] | gtick | | gtkam | [] | gtkorphan | [] | gtkspell | [] [] [] | gutenprint | | hello | [] | help2man | | hylafax | | idutils | | indent | [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | | iso_639 | [] [] [] [] | iso_639_3 | | jwhois | | kbd | | keytouch | [] | keytouch-editor | | keytouch-keyboa... | [] | klavaro | [] | latrine | | ld | [] | leafpad | [] [] | libc | [] [] | libexif | () | libextractor | | libgnutls | | libgpewidget | | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | [] | libidn | | lifelines | | liferea | [] [] | lilypond | | linkdr | [] | lordsawar | | lprng | | lynx | [] | m4 | | mailfromd | | mailutils | | make | | man-db | | man-db-manpages | | minicom | | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | | psmisc | | pspp | [] | pwdutils | | radius | [] | recode | [] [] | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] [] | sed | [] [] | sharutils | [] [] | shishi | | skencil | | solfege | | solfege-manual | | soundtracker | | sp | | sysstat | | tar | [] | texinfo | | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] [] | wyslij-po | | xchat | [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] | +--------------------------------------------------+ af am an ar as ast az be be@latin bg bn_IN bs ca 6 0 1 2 3 19 1 10 3 28 3 1 38 crh cs da de el en en_GB en_ZA eo es et eu fa +-------------------------------------------------+ a2ps | [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] () | anubis | [] [] | aspell | [] [] [] [] [] | bash | [] [] [] | bfd | [] | bibshelf | [] [] [] | binutils | [] | bison | [] [] | bison-runtime | [] [] [] [] | bluez-pin | [] [] [] [] [] [] | bombono-dvd | [] | buzztard | [] [] [] | cflow | [] [] | clisp | [] [] [] [] | coreutils | [] [] [] [] | cpio | | cppi | | cpplib | [] [] [] | cryptsetup | [] | dfarc | [] [] [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] | dink | [] [] [] | doodle | [] | e2fsprogs | [] [] [] | enscript | [] [] [] | exif | () [] [] | fetchmail | [] [] () [] [] [] | findutils | [] [] [] | flex | [] [] | freedink | [] [] [] | gas | [] | gawk | [] [] [] | gcal | [] | gcc | [] [] | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] [] | gettext-tools | [] [] [] | gip | [] [] [] [] | gjay | [] | gliv | [] [] [] | glunarclock | [] [] | gnubiff | () | gnucash | [] () () () () | gnuedu | [] [] | gnulib | [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] | gpe-aerial | [] [] [] [] | gpe-beam | [] [] [] [] | gpe-bluetooth | [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] | gpe-conf | [] [] [] | gpe-contacts | [] [] [] | gpe-edit | [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] | gpe-package | [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] [] | gphoto2 | [] [] () [] [] [] | gprof | [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] | grub | [] [] | gsasl | [] | gss | | gst-plugins-bad | [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] () [] | gtkam | [] [] () [] [] | gtkorphan | [] [] [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | [] [] [] | hello | [] [] [] [] | help2man | [] | hylafax | [] [] | idutils | [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | [] () [] [] | iso_3166 | [] [] [] [] () [] [] [] () | iso_3166_2 | () | iso_4217 | [] [] [] () [] [] | iso_639 | [] [] [] [] () [] [] | iso_639_3 | [] | jwhois | [] | kbd | [] [] [] [] [] | keytouch | [] [] | keytouch-editor | [] [] | keytouch-keyboa... | [] | klavaro | [] [] [] [] | latrine | [] () | ld | [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] () | libextractor | | libgnutls | [] | libgpewidget | [] [] | libgpg-error | [] [] | libgphoto2 | [] () | libgphoto2_port | [] () [] | libgsasl | | libiconv | [] [] [] [] [] | libidn | [] [] [] | lifelines | [] () | liferea | [] [] [] [] [] | lilypond | [] [] [] | linkdr | [] [] [] | lordsawar | [] | lprng | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] | make | [] [] [] | man-db | | man-db-manpages | | minicom | [] [] [] [] | mkisofs | | myserver | | nano | [] [] [] | opcodes | [] [] | parted | [] [] | pies | | popt | [] [] [] [] [] | psmisc | [] [] [] | pspp | [] | pwdutils | [] | radius | [] | recode | [] [] [] [] [] [] | rosegarden | () () () | rpm | [] [] [] | rush | | sarg | | screem | | scrollkeeper | [] [] [] [] [] | sed | [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | | skencil | [] () [] | solfege | [] [] [] | solfege-manual | [] [] | soundtracker | [] [] [] | sp | [] | sysstat | [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] | tin | [] [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] | vice | () () | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] | wget | [] [] [] | wyslij-po | | xchat | [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] [] | +-------------------------------------------------+ crh cs da de el en en_GB en_ZA eo es et eu fa 5 64 105 117 18 1 8 0 28 89 18 19 0 fi fr ga gl gu he hi hr hu hy id is it ja ka kn +----------------------------------------------------+ a2ps | [] [] [] [] | aegis | [] [] | ant-phone | [] [] | anubis | [] [] [] [] | aspell | [] [] [] [] | bash | [] [] [] [] | bfd | [] [] [] | bibshelf | [] [] [] [] [] | binutils | [] [] [] | bison | [] [] [] [] | bison-runtime | [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | bombono-dvd | [] | buzztard | [] | cflow | [] [] [] | clisp | [] | coreutils | [] [] [] [] [] | cpio | [] [] [] [] | cppi | [] [] | cpplib | [] [] [] | cryptsetup | [] [] [] | dfarc | [] [] [] | dialog | [] [] [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] [] [] [] | dink | [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] [] | flex | [] [] [] | freedink | [] [] [] | gas | [] [] | gawk | [] [] [] [] () [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] | gip | [] [] [] [] [] [] | gjay | [] | gliv | [] () | glunarclock | [] [] [] [] | gnubiff | () [] () | gnucash | () () () () () [] | gnuedu | [] [] | gnulib | [] [] [] [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] [] | gpe-aerial | [] [] [] | gpe-beam | [] [] [] [] | gpe-bluetooth | [] [] [] [] | gpe-calendar | [] [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] [] [] | gpe-contacts | [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] [] | gpe-go | [] [] [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] | gpe-todo | [] [] [] | gphoto2 | [] [] [] [] [] [] | gprof | [] [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] [] | grub | [] [] [] [] | gsasl | [] [] [] [] [] | gss | [] [] [] [] [] | gst-plugins-bad | [] [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] [] [] | gtkam | [] [] [] [] [] | gtkorphan | [] [] [] | gtkspell | [] [] [] [] [] [] [] [] [] | gutenprint | [] [] [] [] | hello | [] [] [] | help2man | [] [] | hylafax | [] | idutils | [] [] [] [] [] [] | indent | [] [] [] [] [] [] [] [] | iso_15924 | [] () [] [] | iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | () [] [] [] | iso_4217 | [] () [] [] [] [] | iso_639 | [] () [] [] [] [] [] [] [] | iso_639_3 | () [] [] | jwhois | [] [] [] [] [] | kbd | [] [] | keytouch | [] [] [] [] [] [] | keytouch-editor | [] [] [] [] [] | keytouch-keyboa... | [] [] [] [] [] | klavaro | [] [] | latrine | [] [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] [] () | libc | [] [] [] [] [] | libexif | [] | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] [] | libidn | [] [] [] [] | lifelines | () | liferea | [] [] [] [] | lilypond | [] [] | linkdr | [] [] [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] [] [] | m4 | [] [] [] [] [] [] | mailfromd | | mailutils | [] [] | make | [] [] [] [] [] [] [] [] [] | man-db | [] [] | man-db-manpages | [] | minicom | [] [] [] [] [] | mkisofs | [] [] [] [] | myserver | | nano | [] [] [] [] [] [] | opcodes | [] [] [] [] | parted | [] [] [] [] | pies | | popt | [] [] [] [] [] [] [] [] [] | psmisc | [] [] [] | pspp | | pwdutils | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | rosegarden | () () () () () | rpm | [] [] | rush | | sarg | [] | screem | [] [] | scrollkeeper | [] [] [] [] | sed | [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] | shishi | [] | skencil | [] | solfege | [] [] [] [] | solfege-manual | [] [] | soundtracker | [] [] | sp | [] () | sysstat | [] [] [] [] [] | tar | [] [] [] [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux-ng | [] [] [] [] [] [] | vice | () () () | vmm | [] | vorbis-tools | [] | wastesedge | () () | wdiff | [] | wget | [] [] [] [] [] [] [] [] | wyslij-po | [] [] [] | xchat | [] [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] | +----------------------------------------------------+ fi fr ga gl gu he hi hr hu hy id is it ja ka kn 105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4 ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne +-----------------------------------------------+ a2ps | [] | aegis | | ant-phone | | anubis | [] [] | aspell | [] | bash | | bfd | | bibshelf | [] [] | binutils | | bison | [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] | cpio | | cppi | | cpplib | | cryptsetup | | dfarc | [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] | dink | | doodle | | e2fsprogs | | enscript | | exif | [] | fetchmail | | findutils | | flex | | freedink | [] | gas | | gawk | | gcal | | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] | gettext-tools | [] | gip | [] [] | gjay | | gliv | | glunarclock | [] | gnubiff | | gnucash | () () () () | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | [] | gold | | gpe-aerial | [] | gpe-beam | [] | gpe-bluetooth | [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] | gpe-contacts | [] [] | gpe-edit | [] | gpe-filemanager | [] [] | gpe-go | [] [] [] | gpe-login | [] | gpe-ownerinfo | [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] | gpe-timesheet | [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | | gsasl | | gss | | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | | gtick | | gtkam | [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | | hello | [] [] [] | help2man | | hylafax | | idutils | | indent | | iso_15924 | [] [] | iso_3166 | [] [] () [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] | iso_639 | [] [] | iso_639_3 | [] | jwhois | [] | kbd | | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | klavaro | [] | latrine | [] | ld | | leafpad | [] [] [] | libc | [] | libexif | | libextractor | | libgnutls | [] | libgpewidget | [] [] | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | | libidn | | lifelines | | liferea | | lilypond | | linkdr | | lordsawar | | lprng | | lynx | | m4 | | mailfromd | | mailutils | | make | [] | man-db | | man-db-manpages | | minicom | [] | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | [] [] [] | psmisc | | pspp | | pwdutils | | radius | | recode | | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] | sed | | sharutils | | shishi | | skencil | | solfege | [] | solfege-manual | | soundtracker | | sp | | sysstat | [] | tar | [] | texinfo | [] | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] | wyslij-po | | xchat | [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +-----------------------------------------------+ ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne 20 5 10 1 13 48 4 2 2 4 24 10 20 3 1 nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr +---------------------------------------------------+ a2ps | [] [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] [] | anubis | [] [] [] | aspell | [] [] [] [] [] | bash | [] [] | bfd | [] | bibshelf | [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | bombono-dvd | [] () | buzztard | [] [] | cflow | [] | clisp | [] [] | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cppi | [] | cpplib | [] | cryptsetup | [] | dfarc | [] | dialog | [] [] [] [] | dico | [] | diffutils | [] [] [] [] [] [] | dink | () | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | exif | [] [] [] () [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] [] | freedink | [] [] | gas | | gawk | [] [] [] [] | gcal | | gcc | [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] | gip | [] [] [] [] [] | gjay | | gliv | [] [] [] [] [] [] | glunarclock | [] [] [] [] [] | gnubiff | [] () | gnucash | [] () () () | gnuedu | [] | gnulib | [] [] [] [] | gnunet | | gnunet-gtk | | gnutls | [] [] | gold | | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-bluetooth | [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] [] | gphoto2 | [] [] [] [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] | gramadoir | [] [] | grep | [] [] [] [] | grub | [] [] [] | gsasl | [] [] [] [] | gss | [] [] [] | gst-plugins-bad | [] [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] [] [] | gutenprint | [] [] | hello | [] [] [] [] | help2man | [] [] | hylafax | [] | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | [] [] [] [] | iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] | iso_3166_2 | [] [] [] | iso_4217 | [] [] [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] [] [] | keytouch-editor | [] [] [] | keytouch-keyboa... | [] [] [] | klavaro | [] [] | latrine | [] [] | ld | | leafpad | [] [] [] [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] () [] | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] | libgphoto2_port | [] [] [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] | libidn | [] [] | lifelines | [] [] | liferea | [] [] [] [] [] () () [] | lilypond | [] | linkdr | [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] | make | [] [] [] [] | man-db | [] [] [] | man-db-manpages | [] [] [] | minicom | [] [] [] [] | mkisofs | [] [] [] | myserver | | nano | [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | pies | [] | popt | [] [] [] [] | psmisc | [] [] [] | pspp | [] [] | pwdutils | [] | radius | [] [] [] | recode | [] [] [] [] [] [] [] [] | rosegarden | () () | rpm | [] [] [] | rush | [] [] | sarg | | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | skencil | [] [] | solfege | [] [] [] [] | solfege-manual | [] [] [] | soundtracker | [] | sp | | sysstat | [] [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] [] | vice | [] | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] | wget | [] [] [] [] [] [] [] | wyslij-po | [] [] [] | xchat | [] [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +---------------------------------------------------+ nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr 135 10 4 7 105 1 29 62 47 91 3 54 46 9 37 sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW +---------------------------------------------------+ a2ps | [] [] [] [] [] | 27 aegis | [] | 9 ant-phone | [] [] [] [] | 9 anubis | [] [] [] [] | 15 aspell | [] [] [] | 20 bash | [] [] [] | 12 bfd | [] | 6 bibshelf | [] [] [] | 16 binutils | [] [] | 8 bison | [] [] | 12 bison-runtime | [] [] [] [] [] [] | 29 bluez-pin | [] [] [] [] [] [] [] [] | 37 bombono-dvd | [] | 4 buzztard | [] | 7 cflow | [] [] [] | 9 clisp | | 10 coreutils | [] [] [] [] | 22 cpio | [] [] [] [] [] [] | 13 cppi | [] [] | 5 cpplib | [] [] [] [] [] [] | 14 cryptsetup | [] [] | 7 dfarc | [] | 9 dialog | [] [] [] [] [] [] [] | 30 dico | [] | 2 diffutils | [] [] [] [] [] [] | 30 dink | | 4 doodle | [] [] | 7 e2fsprogs | [] [] [] | 11 enscript | [] [] [] [] | 17 exif | [] [] [] | 16 fetchmail | [] [] [] | 17 findutils | [] [] [] [] [] | 20 flex | [] [] [] [] | 15 freedink | [] | 10 gas | [] | 4 gawk | [] [] [] [] | 18 gcal | [] [] | 5 gcc | [] [] [] | 7 gettext-examples | [] [] [] [] [] [] [] | 34 gettext-runtime | [] [] [] [] [] [] [] | 29 gettext-tools | [] [] [] [] [] [] | 22 gip | [] [] [] [] | 22 gjay | [] | 3 gliv | [] [] [] | 14 glunarclock | [] [] [] [] [] | 19 gnubiff | [] [] | 4 gnucash | () [] () [] () | 10 gnuedu | [] [] | 7 gnulib | [] [] [] [] | 16 gnunet | [] | 1 gnunet-gtk | [] [] [] | 5 gnutls | [] [] [] | 10 gold | [] | 4 gpe-aerial | [] [] [] | 18 gpe-beam | [] [] [] | 19 gpe-bluetooth | [] [] [] | 13 gpe-calendar | [] [] [] [] | 12 gpe-clock | [] [] [] [] [] | 28 gpe-conf | [] [] [] [] | 20 gpe-contacts | [] [] [] | 17 gpe-edit | [] [] [] | 12 gpe-filemanager | [] [] [] [] | 16 gpe-go | [] [] [] [] [] | 25 gpe-login | [] [] [] | 11 gpe-ownerinfo | [] [] [] [] [] | 25 gpe-package | [] [] [] | 13 gpe-sketchbook | [] [] [] | 20 gpe-su | [] [] [] [] [] | 30 gpe-taskmanager | [] [] [] [] [] | 29 gpe-timesheet | [] [] [] [] [] | 25 gpe-today | [] [] [] [] [] [] | 30 gpe-todo | [] [] [] [] | 17 gphoto2 | [] [] [] [] [] | 24 gprof | [] [] [] | 15 gpsdrive | [] [] [] | 11 gramadoir | [] [] [] | 11 grep | [] [] [] | 10 grub | [] [] [] | 14 gsasl | [] [] [] [] | 14 gss | [] [] [] | 11 gst-plugins-bad | [] [] [] [] | 26 gst-plugins-base | [] [] [] [] [] | 24 gst-plugins-good | [] [] [] [] | 24 gst-plugins-ugly | [] [] [] [] [] | 29 gstreamer | [] [] [] [] | 22 gtick | [] [] [] | 13 gtkam | [] [] [] | 20 gtkorphan | [] [] [] | 14 gtkspell | [] [] [] [] [] [] [] [] [] | 45 gutenprint | [] | 10 hello | [] [] [] [] [] [] | 21 help2man | [] [] | 7 hylafax | [] | 5 idutils | [] [] [] [] | 17 indent | [] [] [] [] [] [] | 30 iso_15924 | () [] () [] [] | 16 iso_3166 | [] [] () [] [] () [] [] [] () | 53 iso_3166_2 | () [] () [] | 9 iso_4217 | [] () [] [] () [] [] | 26 iso_639 | [] [] [] () [] () [] [] [] [] | 38 iso_639_3 | [] () | 8 jwhois | [] [] [] [] [] | 16 kbd | [] [] [] [] [] | 15 keytouch | [] [] [] | 16 keytouch-editor | [] [] [] | 14 keytouch-keyboa... | [] [] [] | 14 klavaro | [] | 11 latrine | [] [] [] | 10 ld | [] [] [] [] | 11 leafpad | [] [] [] [] [] [] | 33 libc | [] [] [] [] [] | 21 libexif | [] () | 7 libextractor | [] | 1 libgnutls | [] [] [] | 9 libgpewidget | [] [] [] | 14 libgpg-error | [] [] [] | 9 libgphoto2 | [] [] | 8 libgphoto2_port | [] [] [] [] | 14 libgsasl | [] [] [] | 13 libiconv | [] [] [] [] | 21 libidn | () [] [] | 11 lifelines | [] | 4 liferea | [] [] [] | 21 lilypond | [] | 7 linkdr | [] [] [] [] [] | 17 lordsawar | | 1 lprng | [] | 3 lynx | [] [] [] [] | 17 m4 | [] [] [] [] | 19 mailfromd | [] [] | 3 mailutils | [] | 5 make | [] [] [] [] | 21 man-db | [] [] [] | 8 man-db-manpages | | 4 minicom | [] [] | 16 mkisofs | [] [] | 9 myserver | | 0 nano | [] [] [] [] | 21 opcodes | [] [] [] | 11 parted | [] [] [] [] [] | 15 pies | [] [] | 3 popt | [] [] [] [] [] [] | 27 psmisc | [] [] | 11 pspp | | 4 pwdutils | [] [] | 6 radius | [] [] | 9 recode | [] [] [] [] | 28 rosegarden | () | 0 rpm | [] [] [] | 11 rush | [] [] | 4 sarg | | 1 screem | [] | 3 scrollkeeper | [] [] [] [] [] | 27 sed | [] [] [] [] [] | 30 sharutils | [] [] [] [] [] | 22 shishi | [] | 3 skencil | [] [] | 7 solfege | [] [] [] [] | 16 solfege-manual | [] | 8 soundtracker | [] [] [] | 9 sp | [] | 3 sysstat | [] [] | 15 tar | [] [] [] [] [] [] | 23 texinfo | [] [] [] [] [] | 17 tin | | 4 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux-ng | [] [] [] [] | 20 vice | () () | 1 vmm | [] | 4 vorbis-tools | [] | 6 wastesedge | | 2 wdiff | [] [] | 7 wget | [] [] [] [] [] | 26 wyslij-po | [] [] | 8 xchat | [] [] [] [] [] [] | 36 xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63 xkeyboard-config | [] [] [] | 22 +---------------------------------------------------+ 85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW 178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If June 2010 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://translationproject.org/extra/matrix.html'. 1.5 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `coordinator@translationproject.org' to make the `.pot' files available to the translation teams. libevt-20170120/msvscpp/0000775000175000017500000000000013040343017017023 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/pyevt/0000775000175000017500000000000013040343017020172 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/pyevt/pyevt.vcproj0000664000175000017500000001563113040337604022601 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libfwevt/0000775000175000017500000000000013040343017020645 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libfwevt/libfwevt.vcproj0000664000175000017500000001746313040337604023734 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libfcache/0000775000175000017500000000000013040343017020723 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libfcache/libfcache.vcproj0000664000175000017500000001216513040337604024062 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libexe/0000775000175000017500000000000013040343017020273 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libexe/libexe.vcproj0000664000175000017500000001736013040337604023004 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/evt_test_record/0000775000175000017500000000000013040343017022216 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/evt_test_record/evt_test_record.vcproj0000664000175000017500000001347013040337604026650 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libfguid/0000775000175000017500000000000013040343017020610 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libfguid/libfguid.vcproj0000664000175000017500000001102713040337604023630 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libclocale/0000775000175000017500000000000013040343017021114 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libclocale/libclocale.vcproj0000664000175000017500000001125213040337604024440 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/Makefile.am0000664000175000017500000000221513040337604021064 0ustar00lordyestalordyesta00000000000000MSVSCPP_FILES = \ evt_test_error/evt_test_error.vcproj \ evt_test_file/evt_test_file.vcproj \ evt_test_io_handle/evt_test_io_handle.vcproj \ evt_test_notify/evt_test_notify.vcproj \ evt_test_record/evt_test_record.vcproj \ evt_test_record_values/evt_test_record_values.vcproj \ evt_test_support/evt_test_support.vcproj \ evtexport/evtexport.vcproj \ evtinfo/evtinfo.vcproj \ libbfio/libbfio.vcproj \ libcdata/libcdata.vcproj \ libcdirectory/libcdirectory.vcproj \ libcerror/libcerror.vcproj \ libcfile/libcfile.vcproj \ libclocale/libclocale.vcproj \ libcnotify/libcnotify.vcproj \ libcpath/libcpath.vcproj \ libcsplit/libcsplit.vcproj \ libcthreads/libcthreads.vcproj \ libevt/libevt.vcproj \ libexe/libexe.vcproj \ libfcache/libfcache.vcproj \ libfdata/libfdata.vcproj \ libfdatetime/libfdatetime.vcproj \ libfguid/libfguid.vcproj \ libfvalue/libfvalue.vcproj \ libfwevt/libfwevt.vcproj \ libfwnt/libfwnt.vcproj \ libregf/libregf.vcproj \ libuna/libuna.vcproj \ libwrc/libwrc.vcproj \ pyevt/pyevt.vcproj \ libevt.sln EXTRA_DIST = \ $(MSVSCPP_FILES) MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile libevt-20170120/msvscpp/libbfio/0000775000175000017500000000000013040343017020431 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libbfio/libbfio.vcproj0000664000175000017500000001513613040337604023277 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libwrc/0000775000175000017500000000000013040343017020305 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libwrc/libwrc.vcproj0000664000175000017500000002715413040337604023032 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/evt_test_record_values/0000775000175000017500000000000013040343017023575 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/evt_test_record_values/evt_test_record_values.vcproj0000664000175000017500000001351513040337604031606 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libfdatetime/0000775000175000017500000000000013040343017021454 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libfdatetime/libfdatetime.vcproj0000664000175000017500000001366513040337604025352 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libcfile/0000775000175000017500000000000013040343017020574 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libcfile/libcfile.vcproj0000664000175000017500000001247113040337604023604 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libfwnt/0000775000175000017500000000000013040343017020470 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libfwnt/libfwnt.vcproj0000664000175000017500000001441113040337604023370 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libcthreads/0000775000175000017500000000000013040343017021307 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libcthreads/libcthreads.vcproj0000664000175000017500000001404113040337604025025 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libcpath/0000775000175000017500000000000013040343017020611 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libcpath/libcpath.vcproj0000664000175000017500000001207713040337604023640 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/evt_test_support/0000775000175000017500000000000013040343017022454 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/evt_test_support/evt_test_support.vcproj0000664000175000017500000001406113040337604027341 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libregf/0000775000175000017500000000000013040343017020435 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libregf/libregf.vcproj0000664000175000017500000002156513040337604023312 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libevt.sln0000664000175000017500000007764013040337604021051 0ustar00lordyestalordyesta00000000000000 Microsoft Visual Studio Solution File, Format Version 10.00 # Visual C++ Express 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyevt", "pyevt\pyevt.vcproj", "{E221DB4C-B254-47CB-993D-DC7FED580DA1}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {66425C2B-EF0C-481D-8170-AAF9663519CA} = {66425C2B-EF0C-481D-8170-AAF9663519CA} {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}") = "libfwevt", "libfwevt\libfwevt.vcproj", "{3D3BDFA2-C743-49DB-AD24-B7E5F238E196}" 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} {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} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} EndProjectSection EndProject 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}") = "libexe", "libexe\libexe.vcproj", "{E08719BD-29D2-4ED9-8987-25DC3814554E}" 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} {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} 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}") = "evt_test_error", "evt_test_error\evt_test_error.vcproj", "{3D7BB8D8-66D7-4A8E-A8F5-C269BA658D25}" ProjectSection(ProjectDependencies) = postProject {66425C2B-EF0C-481D-8170-AAF9663519CA} = {66425C2B-EF0C-481D-8170-AAF9663519CA} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "evt_test_file", "evt_test_file\evt_test_file.vcproj", "{9D76992F-770E-42E5-B692-E03116831E42}" ProjectSection(ProjectDependencies) = postProject {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {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} {66425C2B-EF0C-481D-8170-AAF9663519CA} = {66425C2B-EF0C-481D-8170-AAF9663519CA} {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}") = "evt_test_io_handle", "evt_test_io_handle\evt_test_io_handle.vcproj", "{28F7EB77-F481-4E71-BCA5-F6C2E90345C7}" ProjectSection(ProjectDependencies) = postProject {66425C2B-EF0C-481D-8170-AAF9663519CA} = {66425C2B-EF0C-481D-8170-AAF9663519CA} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "evt_test_notify", "evt_test_notify\evt_test_notify.vcproj", "{2FEF7DB6-0145-41EB-A09F-E63BE3F1C41D}" ProjectSection(ProjectDependencies) = postProject {66425C2B-EF0C-481D-8170-AAF9663519CA} = {66425C2B-EF0C-481D-8170-AAF9663519CA} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "evt_test_record", "evt_test_record\evt_test_record.vcproj", "{1C13A596-E3BA-4588-A136-B78F37815923}" ProjectSection(ProjectDependencies) = postProject {66425C2B-EF0C-481D-8170-AAF9663519CA} = {66425C2B-EF0C-481D-8170-AAF9663519CA} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "evt_test_record_values", "evt_test_record_values\evt_test_record_values.vcproj", "{25C3CB79-BED6-4AF3-8092-3CB6F2B58903}" ProjectSection(ProjectDependencies) = postProject {66425C2B-EF0C-481D-8170-AAF9663519CA} = {66425C2B-EF0C-481D-8170-AAF9663519CA} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "evt_test_support", "evt_test_support\evt_test_support.vcproj", "{8B081D34-DB7A-4AA8-8970-A8E84EC8F815}" 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} {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} {66425C2B-EF0C-481D-8170-AAF9663519CA} = {66425C2B-EF0C-481D-8170-AAF9663519CA} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libclocale", "libclocale\libclocale.vcproj", "{CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbfio", "libbfio\libbfio.vcproj", "{41CFAFBF-A1C8-4704-AFEF-31979E6452B9}" ProjectSection(ProjectDependencies) = postProject {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}") = "libwrc", "libwrc\libwrc.vcproj", "{EAC7955A-6861-48CF-B6BA-B09C5E8642CA}" 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} {3D3BDFA2-C743-49DB-AD24-B7E5F238E196} = {3D3BDFA2-C743-49DB-AD24-B7E5F238E196} {9D37639F-1694-47DF-84BF-336D98E0639F} = {9D37639F-1694-47DF-84BF-336D98E0639F} 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}") = "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}") = "libregf", "libregf\libregf.vcproj", "{947FD65B-9B2F-4103-B797-2DD4162CC332}" 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} {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} {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}") = "libevt", "libevt\libevt.vcproj", "{66425C2B-EF0C-481D-8170-AAF9663519CA}" 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} {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}") = "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}") = "libcdirectory", "libcdirectory\libcdirectory.vcproj", "{34C4E176-F033-44FA-8B74-E2798F8C0EEA}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} 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 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "evtexport", "evtexport\evtexport.vcproj", "{C27BEBA4-D27C-4E67-96D4-B5B8DD355641}" ProjectSection(ProjectDependencies) = postProject {947FD65B-9B2F-4103-B797-2DD4162CC332} = {947FD65B-9B2F-4103-B797-2DD4162CC332} {EAC7955A-6861-48CF-B6BA-B09C5E8642CA} = {EAC7955A-6861-48CF-B6BA-B09C5E8642CA} {E08719BD-29D2-4ED9-8987-25DC3814554E} = {E08719BD-29D2-4ED9-8987-25DC3814554E} {85005D62-6AA7-4D8A-86CB-4061B23D7C6C} = {85005D62-6AA7-4D8A-86CB-4061B23D7C6C} {9D37639F-1694-47DF-84BF-336D98E0639F} = {9D37639F-1694-47DF-84BF-336D98E0639F} {3D3BDFA2-C743-49DB-AD24-B7E5F238E196} = {3D3BDFA2-C743-49DB-AD24-B7E5F238E196} {8C13E498-6369-4792-A0CF-B7134C54561B} = {8C13E498-6369-4792-A0CF-B7134C54561B} {25C60507-39C6-4564-912D-DA2E7482A00F} = {25C60507-39C6-4564-912D-DA2E7482A00F} {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} {34C4E176-F033-44FA-8B74-E2798F8C0EEA} = {34C4E176-F033-44FA-8B74-E2798F8C0EEA} {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} {66425C2B-EF0C-481D-8170-AAF9663519CA} = {66425C2B-EF0C-481D-8170-AAF9663519CA} {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}") = "evtinfo", "evtinfo\evtinfo.vcproj", "{A7545354-5D50-49F6-A3D0-1F97F6228955}" ProjectSection(ProjectDependencies) = postProject {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} {66425C2B-EF0C-481D-8170-AAF9663519CA} = {66425C2B-EF0C-481D-8170-AAF9663519CA} {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} {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 {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 {3D3BDFA2-C743-49DB-AD24-B7E5F238E196}.Release|Win32.ActiveCfg = Release|Win32 {3D3BDFA2-C743-49DB-AD24-B7E5F238E196}.Release|Win32.Build.0 = Release|Win32 {3D3BDFA2-C743-49DB-AD24-B7E5F238E196}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {3D3BDFA2-C743-49DB-AD24-B7E5F238E196}.VSDebug|Win32.Build.0 = VSDebug|Win32 {3D19EAAD-9195-468B-BC5B-D147A89CA4F5}.Release|Win32.ActiveCfg = Release|Win32 {3D19EAAD-9195-468B-BC5B-D147A89CA4F5}.Release|Win32.Build.0 = Release|Win32 {3D19EAAD-9195-468B-BC5B-D147A89CA4F5}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {3D19EAAD-9195-468B-BC5B-D147A89CA4F5}.VSDebug|Win32.Build.0 = VSDebug|Win32 {E08719BD-29D2-4ED9-8987-25DC3814554E}.Release|Win32.ActiveCfg = Release|Win32 {E08719BD-29D2-4ED9-8987-25DC3814554E}.Release|Win32.Build.0 = Release|Win32 {E08719BD-29D2-4ED9-8987-25DC3814554E}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {E08719BD-29D2-4ED9-8987-25DC3814554E}.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 {3D7BB8D8-66D7-4A8E-A8F5-C269BA658D25}.Release|Win32.ActiveCfg = Release|Win32 {3D7BB8D8-66D7-4A8E-A8F5-C269BA658D25}.Release|Win32.Build.0 = Release|Win32 {3D7BB8D8-66D7-4A8E-A8F5-C269BA658D25}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {3D7BB8D8-66D7-4A8E-A8F5-C269BA658D25}.VSDebug|Win32.Build.0 = VSDebug|Win32 {9D76992F-770E-42E5-B692-E03116831E42}.Release|Win32.ActiveCfg = Release|Win32 {9D76992F-770E-42E5-B692-E03116831E42}.Release|Win32.Build.0 = Release|Win32 {9D76992F-770E-42E5-B692-E03116831E42}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {9D76992F-770E-42E5-B692-E03116831E42}.VSDebug|Win32.Build.0 = VSDebug|Win32 {28F7EB77-F481-4E71-BCA5-F6C2E90345C7}.Release|Win32.ActiveCfg = Release|Win32 {28F7EB77-F481-4E71-BCA5-F6C2E90345C7}.Release|Win32.Build.0 = Release|Win32 {28F7EB77-F481-4E71-BCA5-F6C2E90345C7}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {28F7EB77-F481-4E71-BCA5-F6C2E90345C7}.VSDebug|Win32.Build.0 = VSDebug|Win32 {2FEF7DB6-0145-41EB-A09F-E63BE3F1C41D}.Release|Win32.ActiveCfg = Release|Win32 {2FEF7DB6-0145-41EB-A09F-E63BE3F1C41D}.Release|Win32.Build.0 = Release|Win32 {2FEF7DB6-0145-41EB-A09F-E63BE3F1C41D}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {2FEF7DB6-0145-41EB-A09F-E63BE3F1C41D}.VSDebug|Win32.Build.0 = VSDebug|Win32 {1C13A596-E3BA-4588-A136-B78F37815923}.Release|Win32.ActiveCfg = Release|Win32 {1C13A596-E3BA-4588-A136-B78F37815923}.Release|Win32.Build.0 = Release|Win32 {1C13A596-E3BA-4588-A136-B78F37815923}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {1C13A596-E3BA-4588-A136-B78F37815923}.VSDebug|Win32.Build.0 = VSDebug|Win32 {25C3CB79-BED6-4AF3-8092-3CB6F2B58903}.Release|Win32.ActiveCfg = Release|Win32 {25C3CB79-BED6-4AF3-8092-3CB6F2B58903}.Release|Win32.Build.0 = Release|Win32 {25C3CB79-BED6-4AF3-8092-3CB6F2B58903}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {25C3CB79-BED6-4AF3-8092-3CB6F2B58903}.VSDebug|Win32.Build.0 = VSDebug|Win32 {8B081D34-DB7A-4AA8-8970-A8E84EC8F815}.Release|Win32.ActiveCfg = Release|Win32 {8B081D34-DB7A-4AA8-8970-A8E84EC8F815}.Release|Win32.Build.0 = Release|Win32 {8B081D34-DB7A-4AA8-8970-A8E84EC8F815}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {8B081D34-DB7A-4AA8-8970-A8E84EC8F815}.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 {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 {EAC7955A-6861-48CF-B6BA-B09C5E8642CA}.Release|Win32.ActiveCfg = Release|Win32 {EAC7955A-6861-48CF-B6BA-B09C5E8642CA}.Release|Win32.Build.0 = Release|Win32 {EAC7955A-6861-48CF-B6BA-B09C5E8642CA}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {EAC7955A-6861-48CF-B6BA-B09C5E8642CA}.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 {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 {947FD65B-9B2F-4103-B797-2DD4162CC332}.Release|Win32.ActiveCfg = Release|Win32 {947FD65B-9B2F-4103-B797-2DD4162CC332}.Release|Win32.Build.0 = Release|Win32 {947FD65B-9B2F-4103-B797-2DD4162CC332}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {947FD65B-9B2F-4103-B797-2DD4162CC332}.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 {66425C2B-EF0C-481D-8170-AAF9663519CA}.Release|Win32.ActiveCfg = Release|Win32 {66425C2B-EF0C-481D-8170-AAF9663519CA}.Release|Win32.Build.0 = Release|Win32 {66425C2B-EF0C-481D-8170-AAF9663519CA}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {66425C2B-EF0C-481D-8170-AAF9663519CA}.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 {34C4E176-F033-44FA-8B74-E2798F8C0EEA}.Release|Win32.ActiveCfg = Release|Win32 {34C4E176-F033-44FA-8B74-E2798F8C0EEA}.Release|Win32.Build.0 = Release|Win32 {34C4E176-F033-44FA-8B74-E2798F8C0EEA}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {34C4E176-F033-44FA-8B74-E2798F8C0EEA}.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 {C27BEBA4-D27C-4E67-96D4-B5B8DD355641}.Release|Win32.ActiveCfg = Release|Win32 {C27BEBA4-D27C-4E67-96D4-B5B8DD355641}.Release|Win32.Build.0 = Release|Win32 {C27BEBA4-D27C-4E67-96D4-B5B8DD355641}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {C27BEBA4-D27C-4E67-96D4-B5B8DD355641}.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 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal libevt-20170120/msvscpp/evtinfo/0000775000175000017500000000000013040343017020475 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/evtinfo/evtinfo.vcproj0000664000175000017500000001643413040337604023411 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libuna/0000775000175000017500000000000013040343017020275 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libuna/libuna.vcproj0000664000175000017500000002733713040337604023015 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libfvalue/0000775000175000017500000000000013040343017020774 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libfvalue/libfvalue.vcproj0000664000175000017500000001653413040337604024210 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/Makefile.in0000664000175000017500000006201313040342660021075 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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__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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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 = \ evt_test_error/evt_test_error.vcproj \ evt_test_file/evt_test_file.vcproj \ evt_test_io_handle/evt_test_io_handle.vcproj \ evt_test_notify/evt_test_notify.vcproj \ evt_test_record/evt_test_record.vcproj \ evt_test_record_values/evt_test_record_values.vcproj \ evt_test_support/evt_test_support.vcproj \ evtexport/evtexport.vcproj \ evtinfo/evtinfo.vcproj \ libbfio/libbfio.vcproj \ libcdata/libcdata.vcproj \ libcdirectory/libcdirectory.vcproj \ libcerror/libcerror.vcproj \ libcfile/libcfile.vcproj \ libclocale/libclocale.vcproj \ libcnotify/libcnotify.vcproj \ libcpath/libcpath.vcproj \ libcsplit/libcsplit.vcproj \ libcthreads/libcthreads.vcproj \ libevt/libevt.vcproj \ libexe/libexe.vcproj \ libfcache/libfcache.vcproj \ libfdata/libfdata.vcproj \ libfdatetime/libfdatetime.vcproj \ libfguid/libfguid.vcproj \ libfvalue/libfvalue.vcproj \ libfwevt/libfwevt.vcproj \ libfwnt/libfwnt.vcproj \ libregf/libregf.vcproj \ libuna/libuna.vcproj \ libwrc/libwrc.vcproj \ pyevt/pyevt.vcproj \ libevt.sln EXTRA_DIST = \ $(MSVSCPP_FILES) MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ 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 \ tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/msvscpp/libcerror/0000775000175000017500000000000013040343017021006 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libcerror/libcerror.vcproj0000664000175000017500000001061013040337604024221 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libevt/0000775000175000017500000000000013040343017020310 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libevt/libevt.vcproj0000664000175000017500000001765213040337604023042 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/evt_test_file/0000775000175000017500000000000013040343017021657 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/evt_test_file/evt_test_file.vcproj0000664000175000017500000001416613040337604025755 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libcnotify/0000775000175000017500000000000013040343017021165 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libcnotify/libcnotify.vcproj0000664000175000017500000001123413040337604024562 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/evt_test_io_handle/0000775000175000017500000000000013040343017022662 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/evt_test_io_handle/evt_test_io_handle.vcproj0000664000175000017500000001350113040337604027753 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libcdirectory/0000775000175000017500000000000013040343017021661 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libcdirectory/libcdirectory.vcproj0000664000175000017500000001306113040337604025752 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/evt_test_error/0000775000175000017500000000000013040343017022071 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/evt_test_error/evt_test_error.vcproj0000664000175000017500000001310513040337604026371 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/evtexport/0000775000175000017500000000000013040343017021063 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/evtexport/evtexport.vcproj0000664000175000017500000002174013040337604024361 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libfdata/0000775000175000017500000000000013040343017020571 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libfdata/libfdata.vcproj0000664000175000017500000001714213040337604023576 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libcdata/0000775000175000017500000000000013040343017020566 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libcdata/libcdata.vcproj0000664000175000017500000001326613040337604023573 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/evt_test_notify/0000775000175000017500000000000013040343017022250 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/evt_test_notify/evt_test_notify.vcproj0000664000175000017500000001311013040337604026723 0ustar00lordyestalordyesta00000000000000 libevt-20170120/msvscpp/libcsplit/0000775000175000017500000000000013040343017021010 5ustar00lordyestalordyesta00000000000000libevt-20170120/msvscpp/libcsplit/libcsplit.vcproj0000664000175000017500000001215113040337604024227 0ustar00lordyestalordyesta00000000000000 libevt-20170120/libregf/0000775000175000017500000000000013040343017016742 5ustar00lordyestalordyesta00000000000000libevt-20170120/libregf/libregf_libfdata.h0000664000175000017500000000313713012271515022361 0ustar00lordyestalordyesta00000000000000/* * The libfdata header wrapper * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_LIBFDATA_H ) #define _LIBREGF_LIBFDATA_H #include /* Define HAVE_LOCAL_LIBFDATA for local use of libfdata */ #if defined( HAVE_LOCAL_LIBFDATA ) #include #include #include #include #include #include #include #include #include #include #include #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( _LIBREGF_LIBFDATA_H ) */ libevt-20170120/libregf/regf_cell_values.h0000664000175000017500000001140713012271515022421 0ustar00lordyestalordyesta00000000000000/* * The cell values definition of a Windows NT Registry File (REGF) * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _REGF_CELL_VALUES_H ) #define _REGF_CELL_VALUES_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct regf_named_key regf_named_key_t; struct regf_named_key { /* The signature * Consists of 2 bytes * Contains: "nk" */ uint8_t signature[ 2 ]; /* The flags * Consists of 2 bytes */ uint8_t flags[ 2 ]; /* The key last written date and time * Consists of 8 bytes */ uint8_t last_written_time[ 8 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown1[ 4 ]; /* The parent key offset * Consists of 4 bytes */ uint8_t parent_key_offset[ 4 ]; /* The number of sub keys * Consists of 4 bytes */ uint8_t number_of_sub_keys[ 4 ]; /* The number of volatile sub keys * Consists of 4 bytes */ uint8_t number_of_volatile_sub_keys[ 4 ]; /* The sub keys list offset * Consists of 4 bytes */ uint8_t sub_keys_list_offset[ 4 ]; /* The volatile sub keys list offset * Consists of 4 bytes */ uint8_t volatile_sub_keys_list_offset[ 4 ]; /* The number of values * Consists of 4 bytes */ uint8_t number_of_values[ 4 ]; /* The values list offset * Consists of 4 bytes */ uint8_t values_list_offset[ 4 ]; /* The security key offset * Consists of 4 bytes */ uint8_t security_key_offset[ 4 ]; /* The class name offset * Consists of 4 bytes */ uint8_t class_name_offset[ 4 ]; /* The largest sub key name size * Consists of 4 bytes */ uint8_t largest_sub_key_name_size[ 4 ]; /* The largest sub key class name size * Consists of 4 bytes */ uint8_t largest_sub_key_class_name_size[ 4 ]; /* The largest value name size * Consists of 4 bytes */ uint8_t largest_value_name_size[ 4 ]; /* The largest value data size * Consists of 4 bytes */ uint8_t largest_value_data_size[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown6[ 4 ]; /* The key name size * Consists of 2 bytes */ uint8_t key_name_size[ 2 ]; /* The class name size * Consists of 2 bytes */ uint8_t class_name_size[ 2 ]; /* The key name */ }; typedef struct regf_sub_key_list regf_sub_key_list_t; struct regf_sub_key_list { /* The signature * Consists of 2 bytes * Contains: "lf", "lh", "li" or "ri" */ uint8_t signature[ 2 ]; /* The number of elements * Consists of 2 bytes */ uint8_t number_of_elements[ 2 ]; }; typedef struct regf_security_key regf_security_key_t; struct regf_security_key { /* The signature * Consists of 2 bytes * Contains: "sk" */ uint8_t signature[ 2 ]; /* Unknown * Consists of 2 bytes */ uint8_t unknown1[ 2 ]; /* The previous security key offset * Consists of 4 bytes */ uint8_t previous_security_key_offset[ 4 ]; /* The next security key offset * Consists of 4 bytes */ uint8_t next_security_key_offset[ 4 ]; /* The reference count * Consists of 4 bytes */ uint8_t reference_count[ 4 ]; }; typedef struct regf_value_key regf_value_key_t; struct regf_value_key { /* The signature * Consists of 2 bytes * Contains: "vk" */ uint8_t signature[ 2 ]; /* The value name size * Consists of 2 bytes */ uint8_t value_name_size[ 2 ]; /* The data size * Consists of 4 bytes */ uint8_t data_size[ 4 ]; /* The data offset * Consists of 4 bytes */ uint8_t data_offset[ 4 ]; /* The data type * Consists of 4 bytes */ uint8_t data_type[ 4 ]; /* The flags * Consists of 2 bytes */ uint8_t flags[ 2 ]; /* Unknown * Consists of 2 bytes */ uint8_t unknown1[ 2 ]; /* The value name */ }; typedef struct regf_data_block_key regf_data_block_key_t; struct regf_data_block_key { /* The signature * Consists of 2 bytes * Contains: "db" */ uint8_t signature[ 2 ]; /* The number of segments * Consists of 2 bytes */ uint8_t number_of_segments[ 2 ]; /* The data block segment list offset * Consists of 4 bytes */ uint8_t data_block_list_offset[ 4 ]; }; #if defined( __cplusplus ) } #endif #endif /* !defined( _REGF_CELL_VALUES_H ) */ libevt-20170120/libregf/libregf_key_item.h0000664000175000017500000001127713012271515022425 0ustar00lordyestalordyesta00000000000000/* * Key item functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_KEY_ITEM_H ) #define _LIBREGF_KEY_ITEM_H #include #include #include "libregf_hive_bins_list.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libregf_key_item libregf_key_item_t; struct libregf_key_item { /* The flags */ uint16_t flags; /* The name hash */ uint32_t name_hash; /* The name */ uint8_t *name; /* The name size */ uint16_t name_size; /* The class name */ uint8_t *class_name; /* The class name size */ uint16_t class_name_size; /* The security descriptor */ uint8_t *security_descriptor; /* The security descriptor size */ size_t security_descriptor_size; /* The last written time */ uint64_t last_written_time; /* The values list */ libfdata_list_t *values_list; /* The values cache */ libfcache_cache_t *values_cache; /* Various item flags */ uint8_t item_flags; }; int libregf_key_item_initialize( libregf_key_item_t **key_item, libcerror_error_t **error ); int libregf_key_item_free( libregf_key_item_t **key_item, libcerror_error_t **error ); int libregf_key_item_get_number_of_values( libregf_key_item_t *key_item, int *number_of_values, libcerror_error_t **error ); int libregf_key_item_read_named_key( libregf_key_item_t *key_item, libfdata_tree_node_t *key_tree_node, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, off64_t named_key_offset, uint32_t named_key_hash, libcerror_error_t **error ); int libregf_key_item_read_class_name( libregf_key_item_t *key_item, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, uint32_t class_name_offset, uint16_t class_name_size, libcerror_error_t **error ); int libregf_key_item_read_security_key( libregf_key_item_t *key_item, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, uint32_t security_key_offset, libcerror_error_t **error ); int libregf_key_item_read_values_list( libregf_key_item_t *key_item, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, uint32_t values_list_offset, uint32_t number_of_values_list_elements, libcerror_error_t **error ); int libregf_key_item_read_node_data( libregf_hive_bins_list_t *hive_bins_list, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, int node_data_file_index, off64_t node_data_offset, size64_t node_data_size, uint32_t node_data_flags, uint8_t read_flags, libcerror_error_t **error ); int libregf_key_item_read_sub_keys_list( libfdata_tree_node_t *key_tree_node, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, off64_t sub_keys_list_offset, libcerror_error_t **error ); int libregf_key_item_read_sub_nodes( libregf_hive_bins_list_t *hive_bins_list, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, int sub_nodes_data_file_index, off64_t sub_nodes_data_offset, size64_t sub_nodes_data_size, uint32_t sub_nodes_data_flags, uint8_t read_flags, libcerror_error_t **error ); int libregf_key_item_compare_name_with_utf8_string( libregf_key_item_t *key_item, uint32_t name_hash, const uint8_t *utf8_string, size_t utf8_string_length, int ascii_codepage, libcerror_error_t **error ); int libregf_key_item_compare_name_with_utf16_string( libregf_key_item_t *key_item, uint32_t name_hash, const uint16_t *utf16_string, size_t utf16_string_length, int ascii_codepage, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_KEY_ITEM_H ) */ libevt-20170120/libregf/libregf_libcnotify.h0000664000175000017500000000266013012271515022755 0ustar00lordyestalordyesta00000000000000/* * The internal libcnotify header * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_LIBCNOTIFY_H ) #define _LIBREGF_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( _LIBREGF_LIBCNOTIFY_H ) */ libevt-20170120/libregf/libregf_hive_bin_cell.h0000664000175000017500000000315613012271515023376 0ustar00lordyestalordyesta00000000000000/* * Hive bin cell functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_HIVE_BIN_CELL_H ) #define _LIBREGF_HIVE_BIN_CELL_H #include #include #include "libregf_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libregf_hive_bin_cell libregf_hive_bin_cell_t; struct libregf_hive_bin_cell { /* The offset of the cell data */ uint32_t offset; /* The reference to the hive bin cell data */ uint8_t *data; /* The hive bin cell size */ uint32_t size; /* The flags of the cell */ uint8_t flags; }; int libregf_hive_bin_cell_initialize( libregf_hive_bin_cell_t **hive_bin_cell, libcerror_error_t **error ); int libregf_hive_bin_cell_free( libregf_hive_bin_cell_t **hive_bin_cell, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_HIVE_BIN_CELL_H ) */ libevt-20170120/libregf/libregf_data_type.h0000664000175000017500000000272113012271515022563 0ustar00lordyestalordyesta00000000000000/* * Data type functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_DATA_TYPE_H ) #define _LIBREGF_DATA_TYPE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) typedef struct libregf_data_type libregf_data_type_t; struct libregf_data_type { /* The data_type */ uint32_t data_type; /* The identifier */ const char *identifier; /* The description */ const char *description; }; const char *libregf_data_type_get_identifier( uint32_t data_type ); const char *libregf_data_type_get_description( uint32_t data_type ); #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_DATA_TYPE_H ) */ libevt-20170120/libregf/libregf_value.c0000664000175000017500000013660713012271515021733 0ustar00lordyestalordyesta00000000000000/* * Value functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libregf_definitions.h" #include "libregf_io_handle.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #include "libregf_libuna.h" #include "libregf_value.h" #include "libregf_value_item.h" #include "libregf_value_type.h" /* Creates a value * Make sure the value value is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libregf_value_initialize( libregf_value_t **value, libregf_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *values_list_element, libfcache_cache_t *values_cache, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; static char *function = "libregf_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( 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 ); } internal_value = memory_allocate_structure( libregf_internal_value_t ); if( internal_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create internal value.", function ); goto on_error; } if( memory_set( internal_value, 0, sizeof( libregf_internal_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear internal value.", function ); memory_free( internal_value ); return( -1 ); } internal_value->file_io_handle = file_io_handle; internal_value->io_handle = io_handle; internal_value->values_list_element = values_list_element; internal_value->values_cache = values_cache; *value = (libregf_value_t *) internal_value; return( 1 ); on_error: if( internal_value != NULL ) { memory_free( internal_value ); } return( -1 ); } /* Frees a value * Returns 1 if successful or -1 on error */ int libregf_value_free( libregf_value_t **value, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; static char *function = "libregf_value_free"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } if( *value != NULL ) { internal_value = (libregf_internal_value_t *) *value; *value = NULL; /* The io_handle, file_io_handle and values_list_element references are freed elsewhere */ memory_free( internal_value ); } return( 1 ); } /* Determine if the value corrupted * Returns 1 if corrupted, 0 if not or -1 on error */ int libregf_value_is_corrupted( libregf_value_t *value, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; static char *function = "libregf_value_is_corrupted"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libregf_internal_value_t *) value; if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( ( value_item->item_flags & LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED ) != 0 ) { return( 1 ); } return( 0 ); } /* Retrieves the offset of the value * Returns 1 if successful or -1 on error */ int libregf_value_get_offset( libregf_value_t *value, off64_t *offset, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; static char *function = "libregf_value_get_offset"; size64_t size = 0; uint32_t flags = 0; int file_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 = (libregf_internal_value_t *) value; if( internal_value->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key - missing IO handle.", function ); return( -1 ); } if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } if( libfdata_list_element_get_data_range( internal_value->values_list_element, &file_index, offset, &size, &flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data range.", function ); return( -1 ); } /* The offset is relative from the start of the hive bins list * and points to the start of the corresponding hive bin cell */ *offset += internal_value->io_handle->hive_bins_list_offset + 4; return( 1 ); } /* Retrieves the value name size * Returns 1 if successful or -1 on error */ int libregf_value_get_name_size( libregf_value_t *value, size_t *name_size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; static char *function = "libregf_value_get_name_size"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libregf_internal_value_t *) value; if( name_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name size.", function ); return( -1 ); } if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } *name_size = value_item->name_size; return( 1 ); } /* Retrieves the value name * Returns 1 if successful or -1 on error */ int libregf_value_get_name( libregf_value_t *value, uint8_t *name, size_t name_size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; static char *function = "libregf_value_get_name"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libregf_internal_value_t *) value; 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid name size value exceeds maximum.", function ); return( -1 ); } if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( name_size < value_item->name_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid name size value out of bounds.", function ); return( -1 ); } if( memory_copy( name, value_item->name, value_item->name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy name.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 string size of the value name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libregf_value_get_utf8_name_size( libregf_value_t *value, size_t *utf8_name_size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; static char *function = "libregf_value_get_utf8_name_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 = (libregf_internal_value_t *) value; if( internal_value->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing IO handle.", function ); return( -1 ); } if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( value_item->name == NULL ) { if( utf8_name_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 name size.", function ); return( -1 ); } *utf8_name_size = 0; } else { if( ( value_item->flags & LIBREGF_VALUE_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_utf8_string_size_from_byte_stream( value_item->name, (size_t) value_item->name_size, internal_value->io_handle->ascii_codepage, utf8_name_size, error ); } else { result = libuna_utf8_string_size_from_utf16_stream( value_item->name, (size_t) value_item->name_size, LIBUNA_ENDIAN_LITTLE, utf8_name_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 value of the value name * The function uses a codepage if necessary, it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libregf_value_get_utf8_name( libregf_value_t *value, uint8_t *utf8_name, size_t utf8_name_size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; static char *function = "libregf_value_get_utf8_name"; 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 = (libregf_internal_value_t *) value; if( internal_value->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing IO handle.", function ); return( -1 ); } if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( value_item->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value item - missing name.", function ); return( -1 ); } if( ( value_item->flags & LIBREGF_VALUE_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_utf8_string_copy_from_byte_stream( utf8_name, utf8_name_size, value_item->name, (size_t) value_item->name_size, internal_value->io_handle->ascii_codepage, error ); } else { result = libuna_utf8_string_copy_from_utf16_stream( utf8_name, utf8_name_size, value_item->name, (size_t) value_item->name_size, LIBUNA_ENDIAN_LITTLE, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 string size of the value name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libregf_value_get_utf16_name_size( libregf_value_t *value, size_t *utf16_name_size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; static char *function = "libregf_value_get_utf16_name_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 = (libregf_internal_value_t *) value; if( internal_value->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing IO handle.", function ); return( -1 ); } if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( value_item->name == NULL ) { if( utf16_name_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 name size.", function ); return( -1 ); } *utf16_name_size = 0; } else { if( ( value_item->flags & LIBREGF_VALUE_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_utf16_string_size_from_byte_stream( value_item->name, (size_t) value_item->name_size, internal_value->io_handle->ascii_codepage, utf16_name_size, error ); } else { result = libuna_utf16_string_size_from_utf16_stream( value_item->name, (size_t) value_item->name_size, LIBUNA_ENDIAN_LITTLE, utf16_name_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 value of the value name * The function uses a codepage if necessary, it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libregf_value_get_utf16_name( libregf_value_t *value, uint16_t *utf16_name, size_t utf16_name_size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; static char *function = "libregf_value_get_utf16_name"; 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 = (libregf_internal_value_t *) value; if( internal_value->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing IO handle.", function ); return( -1 ); } if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( value_item->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value item - missing name.", function ); return( -1 ); } if( ( value_item->flags & LIBREGF_VALUE_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_utf16_string_copy_from_byte_stream( utf16_name, utf16_name_size, value_item->name, (size_t) value_item->name_size, internal_value->io_handle->ascii_codepage, error ); } else { result = libuna_utf16_string_copy_from_utf16_stream( utf16_name, utf16_name_size, value_item->name, (size_t) value_item->name_size, LIBUNA_ENDIAN_LITTLE, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the value type * Returns 1 if successful or -1 on error */ int libregf_value_get_value_type( libregf_value_t *value, uint32_t *value_type, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; static char *function = "libregf_value_get_value_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 = (libregf_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 ); } if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } *value_type = value_item->type; return( 1 ); } /* Retrieves the value data size * Returns 1 if successful or -1 on error */ int libregf_value_get_value_data_size( libregf_value_t *value, size_t *value_data_size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; static char *function = "libregf_value_get_value_data_size"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libregf_internal_value_t *) value; if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( value_item->data_type == 0 ) { if( value_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data size.", function ); return( -1 ); } *value_data_size = 0; } else { if( libregf_value_item_get_data_size( value_item, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data size.", function ); return( -1 ); } } return( 1 ); } /* Retrieves the value data * Returns 1 if successful or -1 on error */ int libregf_value_get_value_data( libregf_value_t *value, uint8_t *value_data, size_t value_data_size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; uint8_t *data = NULL; static char *function = "libregf_value_get_value_data"; size_t data_size = 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 = (libregf_internal_value_t *) value; 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value data size value exceeds maximum.", function ); return( -1 ); } if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( libregf_value_item_get_data( value_item, internal_value->file_io_handle, &data, &data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( value_data_size < data_size ) { 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( memory_copy( value_data, data, data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy value data.", function ); return( -1 ); } return( 1 ); } /* Retrieves the 32-bit value * Returns 1 if successful or -1 on error */ int libregf_value_get_value_32bit( libregf_value_t *value, uint32_t *value_32bit, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; uint8_t *value_data = NULL; static char *function = "libregf_value_get_value_32bit"; size_t value_data_size = 0; uint8_t byte_order = 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 = (libregf_internal_value_t *) value; if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( ( value_item->type != LIBREGF_VALUE_TYPE_INTEGER_32BIT_BIG_ENDIAN ) && ( value_item->type != LIBREGF_VALUE_TYPE_INTEGER_32BIT_LITTLE_ENDIAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported 32-bit integer value type: 0x%04" PRIx32 ".", function, value_item->type ); return( -1 ); } if( value_item->type == LIBREGF_VALUE_TYPE_INTEGER_32BIT_BIG_ENDIAN ) { byte_order = LIBREGF_ENDIAN_BIG; } else { byte_order = LIBREGF_ENDIAN_LITTLE; } if( libregf_value_item_get_data( value_item, internal_value->file_io_handle, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( value_data_size != 4 ) { if( value_data_size > 4 ) { value_data_size = 4; } value_item->item_flags |= LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED; } if( libregf_value_type_copy_to_32bit( value_data, value_data_size, byte_order, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set 32-bit value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the 64-bit value * Returns 1 if successful or -1 on error */ int libregf_value_get_value_64bit( libregf_value_t *value, uint64_t *value_64bit, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; uint8_t *value_data = NULL; static char *function = "libregf_value_get_value_64bit"; size_t value_data_size = 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 = (libregf_internal_value_t *) value; if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( value_item->type != LIBREGF_VALUE_TYPE_INTEGER_64BIT_LITTLE_ENDIAN ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported 64-bit integer value type: 0x%04" PRIx32 ".", function, value_item->type ); return( -1 ); } if( libregf_value_item_get_data( value_item, internal_value->file_io_handle, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( value_data_size != 8 ) { if( value_data_size > 8 ) { value_data_size = 8; } value_item->item_flags |= LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED; } if( libregf_value_type_copy_to_64bit( value_data, value_data_size, LIBREGF_ENDIAN_LITTLE, value_64bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set 64-bit value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 string size * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libregf_value_get_value_utf8_string_size( libregf_value_t *value, size_t *utf8_string_size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; uint8_t *value_data = NULL; static char *function = "libregf_value_get_value_utf8_string_size"; size_t value_data_size = 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 = (libregf_internal_value_t *) value; if( internal_value->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing IO handle.", function ); return( -1 ); } if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( ( value_item->type != LIBREGF_VALUE_TYPE_STRING ) && ( value_item->type != LIBREGF_VALUE_TYPE_EXPANDABLE_STRING ) && ( value_item->type != LIBREGF_VALUE_TYPE_SYMBOLIC_LINK ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_item->type ); return( -1 ); } if( libregf_value_item_get_data( value_item, internal_value->file_io_handle, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libregf_value_type_get_utf8_string_size( value_data, value_data_size, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-8 string size value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 string value * The function uses a codepage if necessary, it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libregf_value_get_value_utf8_string( libregf_value_t *value, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; uint8_t *value_data = NULL; static char *function = "libregf_value_get_value_utf8_string"; size_t value_data_size = 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 = (libregf_internal_value_t *) value; if( internal_value->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing IO handle.", function ); return( -1 ); } if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( ( value_item->type != LIBREGF_VALUE_TYPE_STRING ) && ( value_item->type != LIBREGF_VALUE_TYPE_EXPANDABLE_STRING ) && ( value_item->type != LIBREGF_VALUE_TYPE_SYMBOLIC_LINK ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_item->type ); return( -1 ); } if( libregf_value_item_get_data( value_item, internal_value->file_io_handle, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libregf_value_type_copy_to_utf8_string( value_data, value_data_size, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-8 string value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 string size at a specific value from the referenced value * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libregf_value_get_value_utf16_string_size( libregf_value_t *value, size_t *utf16_string_size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; uint8_t *value_data = NULL; static char *function = "libregf_value_get_value_utf16_string_size"; size_t value_data_size = 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 = (libregf_internal_value_t *) value; if( internal_value->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing IO handle.", function ); return( -1 ); } if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( ( value_item->type != LIBREGF_VALUE_TYPE_STRING ) && ( value_item->type != LIBREGF_VALUE_TYPE_EXPANDABLE_STRING ) && ( value_item->type != LIBREGF_VALUE_TYPE_SYMBOLIC_LINK ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_item->type ); return( -1 ); } if( libregf_value_item_get_data( value_item, internal_value->file_io_handle, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libregf_value_type_get_utf16_string_size( value_data, value_data_size, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-16 string size value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 string value * The function uses a codepage if necessary, it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libregf_value_get_value_utf16_string( libregf_value_t *value, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; uint8_t *value_data = NULL; static char *function = "libregf_value_get_value_utf16_string"; size_t value_data_size = 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 = (libregf_internal_value_t *) value; if( internal_value->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing IO handle.", function ); return( -1 ); } if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( ( value_item->type != LIBREGF_VALUE_TYPE_STRING ) && ( value_item->type != LIBREGF_VALUE_TYPE_EXPANDABLE_STRING ) && ( value_item->type != LIBREGF_VALUE_TYPE_SYMBOLIC_LINK ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_item->type ); return( -1 ); } if( libregf_value_item_get_data( value_item, internal_value->file_io_handle, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libregf_value_type_copy_to_utf16_string( value_data, value_data_size, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-16 string value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the binary data size * Returns 1 if successful or -1 on error */ int libregf_value_get_value_binary_data_size( libregf_value_t *value, size_t *size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; static char *function = "libregf_value_get_value_binary_data_size"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libregf_internal_value_t *) value; if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( value_item->type != LIBREGF_VALUE_TYPE_BINARY_DATA ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported binary data value type: 0x%04" PRIx32 ".", function, value_item->type ); return( -1 ); } if( libregf_value_item_get_data_size( value_item, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the binary data value * Returns 1 if successful or -1 on error */ int libregf_value_get_value_binary_data( libregf_value_t *value, uint8_t *binary_data, size_t size, libcerror_error_t **error ) { libregf_internal_value_t *internal_value = NULL; libregf_value_item_t *value_item = NULL; uint8_t *value_data = NULL; static char *function = "libregf_value_get_value_binary_data"; size_t value_data_size = 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 = (libregf_internal_value_t *) value; if( libfdata_list_element_get_element_value( internal_value->values_list_element, (intptr_t *) internal_value->file_io_handle, internal_value->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item.", function ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item.", function ); return( -1 ); } if( value_item->type != LIBREGF_VALUE_TYPE_BINARY_DATA ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported binary data value type: 0x%04" PRIx32 ".", function, value_item->type ); return( -1 ); } /* TODO optimize to read directly from block or stream */ if( libregf_value_item_get_data( value_item, internal_value->file_io_handle, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libregf_value_type_copy_to_binary_data( value_data, value_data_size, binary_data, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set binary data.", function ); return( -1 ); } return( 1 ); } libevt-20170120/libregf/libregf_hive_bin.h0000664000175000017500000000473713012271515022405 0ustar00lordyestalordyesta00000000000000/* * Hive Bin functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_HIVE_BIN_H ) #define _LIBREGF_HIVE_BIN_H #include #include #include "libregf_hive_bin_cell.h" #include "libregf_libbfio.h" #include "libregf_libcdata.h" #include "libregf_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libregf_hive_bin libregf_hive_bin_t; struct libregf_hive_bin { /* The offset of the hive bin */ uint32_t offset; /* The size of the hive bin */ uint32_t size; /* The hive bin (cells) data */ uint8_t *data; /* The hive bin (cells) data size */ size_t data_size; /* The hive bin cells array */ libcdata_array_t *cells_array; }; int libregf_hive_bin_initialize( libregf_hive_bin_t **hive_bin, libcerror_error_t **error ); int libregf_hive_bin_free( libregf_hive_bin_t **hive_bin, libcerror_error_t **error ); int libregf_hive_bin_read_header( libregf_hive_bin_t *hive_bin, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libregf_hive_bin_read_cells( libregf_hive_bin_t *hive_bin, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libregf_hive_bin_get_number_of_cells( libregf_hive_bin_t *hive_bin, uint16_t *number_of_cells, libcerror_error_t **error ); int libregf_hive_bin_get_cell( libregf_hive_bin_t *hive_bin, uint16_t cell_index, libregf_hive_bin_cell_t **hive_bin_cell, libcerror_error_t **error ); int libregf_hive_bin_get_cell_at_offset( libregf_hive_bin_t *hive_bin, uint32_t cell_offset, libregf_hive_bin_cell_t **hive_bin_cell, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_HIVE_BIN_H ) */ libevt-20170120/libregf/libregf_value_type.h0000664000175000017500000000473613012271515022776 0ustar00lordyestalordyesta00000000000000/* * Values type functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_VALUE_TYPE_H ) #define _LIBREGF_VALUE_TYPE_H #include #include #include "libregf_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libregf_value_type_copy_to_32bit( uint8_t *value_data, size_t value_data_size, uint8_t byte_order, uint32_t *value_32bit, libcerror_error_t **error ); int libregf_value_type_copy_to_64bit( uint8_t *value_data, size_t value_data_size, uint8_t byte_order, uint64_t *value_64bit, libcerror_error_t **error ); int libregf_value_type_get_utf8_string_size( uint8_t *value_data, size_t value_data_size, size_t *utf8_string_size, libcerror_error_t **error ); int libregf_value_type_copy_to_utf8_string( uint8_t *value_data, size_t value_data_size, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); int libregf_value_type_get_utf16_string_size( uint8_t *value_data, size_t value_data_size, size_t *utf16_string_size, libcerror_error_t **error ); int libregf_value_type_copy_to_utf16_string( uint8_t *value_data, size_t value_data_size, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); int libregf_value_type_get_binary_data_size( uint8_t *value_data, size_t value_data_size, size_t *binary_data_size, libcerror_error_t **error ); int libregf_value_type_copy_to_binary_data( uint8_t *value_data, size_t value_data_size, uint8_t *binary_data, size_t binary_data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_VALUE_TYPE_H ) */ libevt-20170120/libregf/libregf_value.h0000664000175000017500000001146113012271515021726 0ustar00lordyestalordyesta00000000000000/* * Value functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_INTERNAL_VALUE_H ) #define _LIBREGF_INTERNAL_VALUE_H #include #include #include "libregf_extern.h" #include "libregf_io_handle.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #include "libregf_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libregf_internal_value libregf_internal_value_t; struct libregf_internal_value { /* The IO handle */ libregf_io_handle_t *io_handle; /* The file IO handle */ libbfio_handle_t *file_io_handle; /* The values list element */ libfdata_list_element_t *values_list_element; /* The values cache */ libfcache_cache_t *values_cache; }; int libregf_value_initialize( libregf_value_t **value, libregf_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *values_list_element, libfcache_cache_t *values_cache, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_free( libregf_value_t **value, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_is_corrupted( libregf_value_t *value, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_offset( libregf_value_t *value, off64_t *offset, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_name_size( libregf_value_t *value, size_t *name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_name( libregf_value_t *value, uint8_t *name, size_t name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_utf8_name_size( libregf_value_t *value, size_t *utf8_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_utf8_name( libregf_value_t *value, uint8_t *utf8_name, size_t utf8_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_utf16_name_size( libregf_value_t *value, size_t *utf16_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_utf16_name( libregf_value_t *value, uint16_t *utf16_name, size_t utf16_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_value_type( libregf_value_t *value, uint32_t *value_type, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_value_data_size( libregf_value_t *value, size_t *value_data_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_value_data( libregf_value_t *value, uint8_t *value_data, size_t value_data_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_value_32bit( libregf_value_t *value, uint32_t *value_32bit, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_value_64bit( libregf_value_t *value, uint64_t *value_64bit, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_value_utf8_string_size( libregf_value_t *value, size_t *utf8_string_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_value_utf8_string( libregf_value_t *value, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_value_utf16_string_size( libregf_value_t *value, size_t *utf16_string_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_value_utf16_string( libregf_value_t *value, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_value_binary_data_size( libregf_value_t *value, size_t *size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_value_get_value_binary_data( libregf_value_t *value, uint8_t *binary_data, size_t size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_INTERNAL_VALUE_H ) */ libevt-20170120/libregf/Makefile.am0000664000175000017500000000350413012271515021002 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBREGF AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @LIBFCACHE_CPPFLAGS@ \ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ noinst_LTLIBRARIES = libregf.la libregf_la_SOURCES = \ libregf_checksum.c libregf_checksum.h \ libregf_codepage.h \ libregf_data_type.c libregf_data_type.h \ libregf_debug.c libregf_debug.h \ libregf_definitions.h \ libregf_error.c libregf_error.h \ libregf_extern.h \ libregf_file.c libregf_file.h \ libregf_hive_bin.c libregf_hive_bin.h \ libregf_hive_bin_cell.c libregf_hive_bin_cell.h \ libregf_hive_bins_list.c libregf_hive_bins_list.h \ libregf_io_handle.c libregf_io_handle.h \ libregf_key.c libregf_key.h \ libregf_key_item.c libregf_key_item.h \ libregf_key_tree.c libregf_key_tree.h \ libregf_libbfio.h \ libregf_libcdata.h \ libregf_libcerror.h \ libregf_libclocale.h \ libregf_libcnotify.h \ libregf_libfcache.h \ libregf_libfdata.h \ libregf_libfdatetime.h \ libregf_libfwnt.h \ libregf_libuna.h \ libregf_named_key.c libregf_named_key.h \ libregf_notify.c libregf_notify.h \ libregf_support.c libregf_support.h \ libregf_types.h \ libregf_unused.h \ libregf_value.c libregf_value.h \ libregf_value_item.c libregf_value_item.h \ libregf_value_type.c libregf_value_type.h \ regf_cell_values.h \ regf_file_header.h \ regf_hive_bin.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libregf ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libregf_la_SOURCES) libevt-20170120/libregf/libregf_key.c0000664000175000017500000022427713012271515021410 0ustar00lordyestalordyesta00000000000000/* * Key functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_WCTYPE_H ) #include #endif #include "libregf_definitions.h" #include "libregf_io_handle.h" #include "libregf_key.h" #include "libregf_key_item.h" #include "libregf_key_tree.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #include "libregf_libuna.h" #include "libregf_value.h" #include "libregf_value_item.h" #include "libregf_value_type.h" /* Creates a key * Make sure the value key is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libregf_key_initialize( libregf_key_t **key, libregf_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *key_tree_node, libfcache_cache_t *key_cache, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; static char *function = "libregf_key_initialize"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } if( *key != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid key value already set.", function ); return( -1 ); } if( key_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key tree node.", function ); return( -1 ); } internal_key = memory_allocate_structure( libregf_internal_key_t ); if( internal_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create internal key.", function ); goto on_error; } if( memory_set( internal_key, 0, sizeof( libregf_internal_key_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear internal key.", function ); memory_free( internal_key ); return( -1 ); } internal_key->file_io_handle = file_io_handle; internal_key->io_handle = io_handle; internal_key->key_tree_node = key_tree_node; internal_key->key_cache = key_cache; *key = (libregf_key_t *) internal_key; return( 1 ); on_error: if( internal_key != NULL ) { memory_free( internal_key ); } return( -1 ); } /* Frees a key * Returns 1 if successful or -1 on error */ int libregf_key_free( libregf_key_t **key, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; static char *function = "libregf_key_free"; int result = 1; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } if( *key != NULL ) { internal_key = (libregf_internal_key_t *) *key; *key = NULL; /* The io_handle, file_io_handle, key_tree_node and key_cache references are freed elsewhere */ memory_free( internal_key ); } return( result ); } /* Determine if the key corrupted * Returns 1 if corrupted, 0 if not or -1 on error */ int libregf_key_is_corrupted( libregf_key_t *key, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_is_corrupted"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( ( key_item->item_flags & LIBREGF_KEY_ITEM_FLAG_IS_CORRUPTED ) != 0 ) { return( 1 ); } return( 0 ); } /* Retrieves the offset of the key * Returns 1 if successful or -1 on error */ int libregf_key_get_offset( libregf_key_t *key, off64_t *offset, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; static char *function = "libregf_key_get_offset"; size64_t size = 0; uint32_t flags = 0; int file_index = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( internal_key->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key - missing IO handle.", function ); return( -1 ); } if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } if( libfdata_tree_node_get_data_range( internal_key->key_tree_node, &file_index, offset, &size, &flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key data range.", function ); return( -1 ); } /* The offset is relative from the start of the hive bins list * and points to the start of the corresponding hive bin cell */ *offset += internal_key->io_handle->hive_bins_list_offset + 4; return( 1 ); } /* Retrieves the key name size * Returns 1 if successful or -1 on error */ int libregf_key_get_name_size( libregf_key_t *key, size_t *name_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_name_size"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( name_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name size.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } *name_size = key_item->name_size; return( 1 ); } /* Retrieves the key name data and size * Returns 1 if successful or -1 on error */ int libregf_key_get_name( libregf_key_t *key, uint8_t *name, size_t name_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_name"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid name size value exceeds maximum.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( name_size < key_item->name_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid name size value out of bounds.", function ); return( -1 ); } if( memory_copy( name, key_item->name, key_item->name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy name.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 string size of the key name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libregf_key_get_utf8_name_size( libregf_key_t *key, size_t *utf8_name_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_utf8_name_size"; int result = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( internal_key->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key - missing IO handle.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( key_item->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key item - missing name.", function ); return( -1 ); } if( ( key_item->flags & LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_utf8_string_size_from_byte_stream( key_item->name, (size_t) key_item->name_size, internal_key->io_handle->ascii_codepage, utf8_name_size, error ); } else { result = libuna_utf8_string_size_from_utf16_stream( key_item->name, (size_t) key_item->name_size, LIBUNA_ENDIAN_LITTLE, utf8_name_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 value of the key name * The function uses a codepage if necessary, it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libregf_key_get_utf8_name( libregf_key_t *key, uint8_t *utf8_name, size_t utf8_name_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_utf8_name"; int result = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( internal_key->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key - missing IO handle.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( key_item->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key item - missing name.", function ); return( -1 ); } if( ( key_item->flags & LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_utf8_string_copy_from_byte_stream( utf8_name, utf8_name_size, key_item->name, (size_t) key_item->name_size, internal_key->io_handle->ascii_codepage, error ); } else { result = libuna_utf8_string_copy_from_utf16_stream( utf8_name, utf8_name_size, key_item->name, (size_t) key_item->name_size, LIBUNA_ENDIAN_LITTLE, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 string size of the key name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libregf_key_get_utf16_name_size( libregf_key_t *key, size_t *utf16_name_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_utf16_name_size"; int result = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( internal_key->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key - missing IO handle.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( key_item->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key item - missing name.", function ); return( -1 ); } if( ( key_item->flags & LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_utf16_string_size_from_byte_stream( key_item->name, (size_t) key_item->name_size, internal_key->io_handle->ascii_codepage, utf16_name_size, error ); } else { result = libuna_utf16_string_size_from_utf16_stream( key_item->name, (size_t) key_item->name_size, LIBUNA_ENDIAN_LITTLE, utf16_name_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 value of the key name * The function uses a codepage if necessary, it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libregf_key_get_utf16_name( libregf_key_t *key, uint16_t *utf16_name, size_t utf16_name_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_value_get_utf16_name"; int result = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( internal_key->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key - missing IO handle.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( key_item->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key item - missing name.", function ); return( -1 ); } if( ( key_item->flags & LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_utf16_string_copy_from_byte_stream( utf16_name, utf16_name_size, key_item->name, (size_t) key_item->name_size, internal_key->io_handle->ascii_codepage, error ); } else { result = libuna_utf16_string_copy_from_utf16_stream( utf16_name, utf16_name_size, key_item->name, (size_t) key_item->name_size, LIBUNA_ENDIAN_LITTLE, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the class name size * Returns 1 if successful, 0 if no such value or -1 on error */ int libregf_key_get_class_name_size( libregf_key_t *key, size_t *class_name_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_class_name_size"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( class_name_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid class name size.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( key_item->class_name == NULL ) { return( 0 ); } *class_name_size = key_item->class_name_size; return( 1 ); } /* Retrieves the class name * Returns 1 if successful, 0 if no such value or -1 on error */ int libregf_key_get_class_name( libregf_key_t *key, uint8_t *class_name, size_t class_name_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_class_name"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( class_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid class name.", function ); return( -1 ); } if( class_name_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid class name size value exceeds maximum.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( key_item->class_name == NULL ) { return( 0 ); } if( class_name_size < key_item->class_name_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid class name size value out of bounds.", function ); return( -1 ); } if( memory_copy( class_name, key_item->class_name, key_item->class_name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy class name.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 string size of the class name * The returned size includes the end of string character * Returns 1 if successful, 0 if no such value or -1 on error */ int libregf_key_get_utf8_class_name_size( libregf_key_t *key, size_t *utf8_class_name_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_utf8_class_name_size"; int result = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( key_item->class_name != NULL ) { result = libuna_utf8_string_size_from_utf16_stream( key_item->name, (size_t) key_item->name_size, LIBUNA_ENDIAN_LITTLE, utf8_class_name_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( result ); } /* Retrieves the UTF-8 string value of the class name * The function uses a codepage if necessary, it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful, 0 if no such value or -1 on error */ int libregf_key_get_utf8_class_name( libregf_key_t *key, uint8_t *utf8_class_name, size_t utf8_class_name_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_utf8_class_name"; int result = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( key_item->class_name != NULL ) { result = libuna_utf8_string_copy_from_utf16_stream( utf8_class_name, utf8_class_name_size, key_item->name, (size_t) key_item->name_size, LIBUNA_ENDIAN_LITTLE, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-8 string.", function ); return( -1 ); } } return( result ); } /* Retrieves the UTF-16 string size of the class name * The returned size includes the end of string character * Returns 1 if successful, 0 if no such value or -1 on error */ int libregf_key_get_utf16_class_name_size( libregf_key_t *key, size_t *utf16_class_name_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_utf16_class_name_size"; int result = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( key_item->class_name != NULL ) { result = libuna_utf16_string_size_from_utf16_stream( key_item->name, (size_t) key_item->name_size, LIBUNA_ENDIAN_LITTLE, utf16_class_name_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( result ); } /* Retrieves the UTF-16 string value of the class name * The function uses a codepage if necessary, it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful, 0 if no such value or -1 on error */ int libregf_key_get_utf16_class_name( libregf_key_t *key, uint16_t *utf16_class_name, size_t utf16_class_name_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_value_get_utf16_class_name"; int result = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( key_item->class_name != NULL ) { result = libuna_utf16_string_copy_from_utf16_stream( utf16_class_name, utf16_class_name_size, key_item->name, (size_t) key_item->name_size, LIBUNA_ENDIAN_LITTLE, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-16 string.", function ); return( -1 ); } } return( result ); } /* Retrieves the last written date and time * The returned time is a 64-bit version of a filetime value * Returns 1 if successful or -1 on error */ int libregf_key_get_last_written_time( libregf_key_t *key, uint64_t *last_written_time, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_last_written_time"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( last_written_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid last written time.", function ); return( -1 ); } *last_written_time = key_item->last_written_time; return( 1 ); } /* Retrieves the security descriptor size * Returns 1 if successful, 0 if no such value or -1 on error */ int libregf_key_get_security_descriptor_size( libregf_key_t *key, size_t *security_descriptor_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_security_descriptor_size"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( security_descriptor_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security descriptor size.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( ( key_item->security_descriptor == NULL ) || ( key_item->security_descriptor_size == 0 ) ) { return( 0 ); } *security_descriptor_size = key_item->security_descriptor_size; return( 1 ); } /* Retrieves the security descriptor * Returns 1 if successful, 0 if no such value or -1 on error */ int libregf_key_get_security_descriptor( libregf_key_t *key, uint8_t *security_descriptor, size_t security_descriptor_size, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_security_descriptor"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; 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_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid security descriptor size value exceeds maximum.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( ( key_item->security_descriptor == NULL ) || ( key_item->security_descriptor_size == 0 ) ) { return( 0 ); } if( security_descriptor_size < key_item->security_descriptor_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid security descriptor size value out of bounds.", function ); return( -1 ); } if( memory_copy( security_descriptor, key_item->security_descriptor, key_item->security_descriptor_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy security descriptor.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of values of the referenced key * All sets in a key contain the same number of values * Returns 1 if successful or -1 on error */ int libregf_key_get_number_of_values( libregf_key_t *key, int *number_of_values, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_number_of_values"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( libregf_key_item_get_number_of_values( key_item, number_of_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of values.", function ); return( -1 ); } return( 1 ); } /* Retrieves the value * Returns 1 if successful or -1 on error */ int libregf_key_get_value( libregf_key_t *key, int value_index, libregf_value_t **value, libcerror_error_t **error ) { libfdata_list_element_t *values_list_element = NULL; libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_get_value"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; 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: value already set.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( libfdata_list_get_list_element_by_index( key_item->values_list, value_index, &values_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d.", function, value_index ); return( -1 ); } if( libregf_value_initialize( value, internal_key->io_handle, internal_key->file_io_handle, values_list_element, key_item->values_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the value for the specific UTF-8 encoded name * To retrieve the default value specify value name as NULL * and its length as 0 * Returns 1 if successful, 0 if no such value or -1 on error */ int libregf_key_get_value_by_utf8_name( libregf_key_t *key, const uint8_t *utf8_string, size_t utf8_string_length, libregf_value_t **value, libcerror_error_t **error ) { libfdata_list_element_t *values_list_element = NULL; libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; libregf_value_item_t *value_item = NULL; static char *function = "libregf_key_get_value_by_utf8_name"; libuna_unicode_character_t unicode_character = 0; size_t utf8_string_index = 0; uint32_t name_hash = 0; int number_of_values = 0; int result = 0; int value_index = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( internal_key->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key - missing IO handle.", function ); return( -1 ); } if( ( utf8_string == NULL ) && ( utf8_string_length != 0 ) ) { 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_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string length value exceeds maximum.", 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 != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: value already set.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( libregf_key_item_get_number_of_values( key_item, &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( number_of_values == 0 ) { return( 0 ); } while( utf8_string_index < utf8_string_length ) { if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_length, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to Unicode character.", function ); return( -1 ); } name_hash *= 37; name_hash += (uint32_t) towupper( (wint_t) unicode_character ); } for( value_index = 0; value_index < number_of_values; value_index++ ) { if( libfdata_list_get_list_element_by_index( key_item->values_list, value_index, &values_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item: %d.", function, value_index ); return( -1 ); } if( libfdata_list_element_get_element_value( values_list_element, (intptr_t *) internal_key->file_io_handle, key_item->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item: %d values.", function, value_index ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item: %d values.", function, value_index ); return( -1 ); } if( value_item->name == NULL ) { if( ( utf8_string == NULL ) && ( utf8_string_length == 0 ) ) { result = 1; } } else if( utf8_string == NULL ) { continue; } else { result = libregf_value_item_compare_name_with_utf8_string( value_item, name_hash, utf8_string, utf8_string_length, internal_key->io_handle->ascii_codepage, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare value name with UTF-8 string.", function ); return( -1 ); } } if( result != 0 ) { break; } } if( value_index >= number_of_values ) { return( 0 ); } if( libregf_value_initialize( value, internal_key->io_handle, internal_key->file_io_handle, values_list_element, key_item->values_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the value for the specific UTF-16 encoded name * To retrieve the default value specify string as NULL * and its length as 0 * Returns 1 if successful, 0 if no such value or -1 on error */ int libregf_key_get_value_by_utf16_name( libregf_key_t *key, const uint16_t *utf16_string, size_t utf16_string_length, libregf_value_t **value, libcerror_error_t **error ) { libfdata_list_element_t *values_list_element = NULL; libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; libregf_value_item_t *value_item = NULL; static char *function = "libregf_key_get_value_by_utf16_name"; libuna_unicode_character_t unicode_character = 0; size_t utf16_string_index = 0; uint32_t name_hash = 0; int number_of_values = 0; int result = 0; int value_index = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( internal_key->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key - missing IO handle.", function ); return( -1 ); } if( ( utf16_string == NULL ) && ( utf16_string_length != 0 ) ) { 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_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string length value exceeds maximum.", 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 != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: value already set.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } if( libregf_key_item_get_number_of_values( key_item, &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( number_of_values == 0 ) { return( 0 ); } while( utf16_string_index < utf16_string_length ) { if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_length, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to Unicode character.", function ); return( -1 ); } name_hash *= 37; name_hash += (uint32_t) towupper( (wint_t) unicode_character ); } for( value_index = 0; value_index < number_of_values; value_index++ ) { if( libfdata_list_get_list_element_by_index( key_item->values_list, value_index, &values_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item: %d.", function, value_index ); return( -1 ); } if( libfdata_list_element_get_element_value( values_list_element, (intptr_t *) internal_key->file_io_handle, key_item->values_cache, (intptr_t **) &value_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value item: %d values.", function, value_index ); return( -1 ); } if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value item: %d values.", function, value_index ); return( -1 ); } if( value_item->name == NULL ) { if( ( utf16_string == NULL ) && ( utf16_string_length == 0 ) ) { result = 1; } } else if( utf16_string == NULL ) { continue; } else { result = libregf_value_item_compare_name_with_utf16_string( value_item, name_hash, utf16_string, utf16_string_length, internal_key->io_handle->ascii_codepage, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare value name with UTF-16 string.", function ); return( -1 ); } } if( result != 0 ) { break; } } if( value_index >= number_of_values ) { return( 0 ); } if( libregf_value_initialize( value, internal_key->io_handle, internal_key->file_io_handle, values_list_element, key_item->values_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of sub keys * Returns 1 if successful or -1 on error */ int libregf_key_get_number_of_sub_keys( libregf_key_t *key, int *number_of_sub_keys, libcerror_error_t **error ) { libregf_internal_key_t *internal_key = NULL; static char *function = "libregf_key_get_number_of_sub_keys"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( libfdata_tree_node_get_number_of_sub_nodes( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, number_of_sub_keys, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub keys.", function ); return( -1 ); } return( 1 ); } /* Retrieves the sub key for the specific index * Returns 1 if successful or -1 on error */ int libregf_key_get_sub_key( libregf_key_t *key, int sub_key_index, libregf_key_t **sub_key, libcerror_error_t **error ) { libfdata_tree_node_t *key_tree_sub_node = NULL; libregf_internal_key_t *internal_key = NULL; static char *function = "libregf_key_get_sub_key"; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( sub_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub key.", function ); return( -1 ); } if( *sub_key != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub key already set.", function ); return( -1 ); } if( libfdata_tree_node_get_sub_node_by_index( internal_key->key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, sub_key_index, &key_tree_sub_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d.", function, sub_key_index ); return( -1 ); } if( key_tree_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key tree sub node.", function ); return( -1 ); } if( libregf_key_initialize( sub_key, internal_key->io_handle, internal_key->file_io_handle, key_tree_sub_node, internal_key->key_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize sub key.", function ); return( -1 ); } return( 1 ); } /* Retrieves the sub key for the specific UTF-8 encoded name * Returns 1 if successful, 0 if no such sub key or -1 on error */ int libregf_key_get_sub_key_by_utf8_name( libregf_key_t *key, const uint8_t *utf8_string, size_t utf8_string_length, libregf_key_t **sub_key, libcerror_error_t **error ) { libfdata_tree_node_t *key_tree_sub_node = NULL; libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *sub_key_item = NULL; static char *function = "libregf_key_get_sub_key_by_utf8_name"; libuna_unicode_character_t unicode_character = 0; size_t utf8_string_index = 0; uint32_t name_hash = 0; int result = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( internal_key->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key - missing IO handle.", 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string length value exceeds maximum.", function ); return( -1 ); } if( sub_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub key.", function ); return( -1 ); } if( *sub_key != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub key already set.", function ); return( -1 ); } while( utf8_string_index < utf8_string_length ) { if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_length, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to Unicode character.", function ); return( -1 ); } name_hash *= 37; name_hash += (uint32_t) towupper( (wint_t) unicode_character ); } result = libregf_key_tree_get_sub_key_values_by_utf8_name( internal_key->key_tree_node, internal_key->file_io_handle, internal_key->key_cache, name_hash, utf8_string, utf8_string_length, internal_key->io_handle->ascii_codepage, &key_tree_sub_node, &sub_key_item, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key values by UTF-8 name.", function ); return( -1 ); } else if( result != 0 ) { if( libregf_key_initialize( sub_key, internal_key->io_handle, internal_key->file_io_handle, key_tree_sub_node, internal_key->key_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize sub key.", function ); return( -1 ); } } return( result ); } /* Retrieves the sub key for the specific UTF-8 encoded path * The path separator is the \ character * Returns 1 if successful, 0 if no such key or -1 on error */ int libregf_key_get_sub_key_by_utf8_path( libregf_key_t *key, const uint8_t *utf8_string, size_t utf8_string_length, libregf_key_t **sub_key, libcerror_error_t **error ) { libfdata_tree_node_t *key_tree_node = NULL; libfdata_tree_node_t *key_tree_sub_node = NULL; libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; libregf_key_item_t *sub_key_item = NULL; uint8_t *utf8_string_segment = NULL; static char *function = "libregf_key_get_sub_key_by_utf8_path"; libuna_unicode_character_t unicode_character = 0; size_t utf8_string_index = 0; size_t utf8_string_segment_length = 0; uint32_t name_hash = 0; int result = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( internal_key->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key - missing IO handle.", 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string length value exceeds maximum.", function ); return( -1 ); } if( sub_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub key.", function ); return( -1 ); } if( *sub_key != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub key already set.", function ); return( -1 ); } if( utf8_string_length > 0 ) { /* Ignore a leading separator */ if( utf8_string[ utf8_string_index ] == (uint8_t) LIBREGF_SEPARATOR ) { utf8_string_index++; } } key_tree_node = internal_key->key_tree_node; if( libfdata_tree_node_get_node_value( key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } /* If the string is empty return the current key */ if( utf8_string_length == utf8_string_index ) { result = 1; } else while( utf8_string_index < utf8_string_length ) { utf8_string_segment = (uint8_t *) &( utf8_string[ utf8_string_index ] ); utf8_string_segment_length = utf8_string_index; name_hash = 0; while( utf8_string_index < utf8_string_length ) { if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_length, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to Unicode character.", function ); return( -1 ); } if( ( unicode_character == (libuna_unicode_character_t) LIBREGF_SEPARATOR ) || ( unicode_character == 0 ) ) { utf8_string_segment_length += 1; break; } name_hash *= 37; name_hash += (uint32_t) towupper( (wint_t) unicode_character ); } utf8_string_segment_length = utf8_string_index - utf8_string_segment_length; if( utf8_string_segment_length == 0 ) { result = 0; } else { result = libregf_key_tree_get_sub_key_values_by_utf8_name( key_tree_node, internal_key->file_io_handle, internal_key->key_cache, name_hash, utf8_string_segment, utf8_string_segment_length, internal_key->io_handle->ascii_codepage, &key_tree_sub_node, &sub_key_item, error ); } if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key values by name.", function ); return( -1 ); } else if( result == 0 ) { break; } key_tree_node = key_tree_sub_node; } if( result != 0 ) { if( libregf_key_initialize( sub_key, internal_key->io_handle, internal_key->file_io_handle, key_tree_node, internal_key->key_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create key.", function ); return( -1 ); } } return( result ); } /* Retrieves the sub key for the specific UTF-16 encoded name * Returns 1 if successful, 0 if no such sub key or -1 on error */ int libregf_key_get_sub_key_by_utf16_name( libregf_key_t *key, const uint16_t *utf16_string, size_t utf16_string_length, libregf_key_t **sub_key, libcerror_error_t **error ) { libfdata_tree_node_t *key_tree_sub_node = NULL; libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *sub_key_item = NULL; static char *function = "libregf_key_get_value_by_utf16_name"; libuna_unicode_character_t unicode_character = 0; size_t utf16_string_index = 0; uint32_t name_hash = 0; int result = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( internal_key->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key - missing IO handle.", 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string length value exceeds maximum.", function ); return( -1 ); } if( sub_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub key.", function ); return( -1 ); } if( *sub_key != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub key already set.", function ); return( -1 ); } while( utf16_string_index < utf16_string_length ) { if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_length, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to Unicode character.", function ); return( -1 ); } name_hash *= 37; name_hash += (uint32_t) towupper( (wint_t) unicode_character ); } result = libregf_key_tree_get_sub_key_values_by_utf16_name( internal_key->key_tree_node, internal_key->file_io_handle, internal_key->key_cache, name_hash, utf16_string, utf16_string_length, internal_key->io_handle->ascii_codepage, &key_tree_sub_node, &sub_key_item, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key values by UTF-16 name.", function ); return( -1 ); } else if( result != 0 ) { if( libregf_key_initialize( sub_key, internal_key->io_handle, internal_key->file_io_handle, key_tree_sub_node, internal_key->key_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize sub key.", function ); return( -1 ); } } return( result ); } /* Retrieves the sub key for the specific UTF-16 encoded path * The path separator is the \ character * Returns 1 if successful, 0 if no such key or -1 on error */ int libregf_key_get_sub_key_by_utf16_path( libregf_key_t *key, const uint16_t *utf16_string, size_t utf16_string_length, libregf_key_t **sub_key, libcerror_error_t **error ) { libfdata_tree_node_t *key_tree_node = NULL; libfdata_tree_node_t *key_tree_sub_node = NULL; libregf_internal_key_t *internal_key = NULL; libregf_key_item_t *key_item = NULL; libregf_key_item_t *sub_key_item = NULL; uint16_t *utf16_string_segment = NULL; static char *function = "libregf_key_get_sub_key_by_utf16_path"; libuna_unicode_character_t unicode_character = 0; size_t utf16_string_index = 0; size_t utf16_string_segment_length = 0; uint32_t name_hash = 0; int result = 0; if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } internal_key = (libregf_internal_key_t *) key; if( internal_key->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key - missing IO handle.", 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string length value exceeds maximum.", function ); return( -1 ); } if( sub_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub key.", function ); return( -1 ); } if( *sub_key != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub key already set.", function ); return( -1 ); } if( utf16_string_length > 0 ) { /* Ignore a leading separator */ if( utf16_string[ utf16_string_index ] == (uint16_t) LIBREGF_SEPARATOR ) { utf16_string_index++; } } key_tree_node = internal_key->key_tree_node; if( libfdata_tree_node_get_node_value( key_tree_node, (intptr_t *) internal_key->file_io_handle, internal_key->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing key item.", function ); return( -1 ); } /* If the string is empty return the current key */ if( utf16_string_length == utf16_string_index ) { result = 1; } else while( utf16_string_index < utf16_string_length ) { utf16_string_segment = (uint16_t *) &( utf16_string[ utf16_string_index ] ); utf16_string_segment_length = utf16_string_index; name_hash = 0; while( utf16_string_index < utf16_string_length ) { if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_length, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to Unicode character.", function ); return( -1 ); } if( ( unicode_character == (libuna_unicode_character_t) LIBREGF_SEPARATOR ) || ( unicode_character == 0 ) ) { utf16_string_segment_length += 1; break; } name_hash *= 37; name_hash += (uint32_t) towupper( (wint_t) unicode_character ); } utf16_string_segment_length = utf16_string_index - utf16_string_segment_length; if( utf16_string_segment_length == 0 ) { result = 0; } else { result = libregf_key_tree_get_sub_key_values_by_utf16_name( key_tree_node, internal_key->file_io_handle, internal_key->key_cache, name_hash, utf16_string_segment, utf16_string_segment_length, internal_key->io_handle->ascii_codepage, &key_tree_sub_node, &sub_key_item, error ); } if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key values by name.", function ); return( -1 ); } else if( result == 0 ) { break; } key_tree_node = key_tree_sub_node; } if( result != 0 ) { if( libregf_key_initialize( sub_key, internal_key->io_handle, internal_key->file_io_handle, key_tree_node, internal_key->key_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create key.", function ); return( -1 ); } } return( result ); } libevt-20170120/libregf/libregf_debug.h0000664000175000017500000000413313012271515021676 0ustar00lordyestalordyesta00000000000000/* * Debug functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_DEBUG_H ) #define _LIBREGF_DEBUG_H #include #include #include "libregf_libbfio.h" #include "libregf_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) void libregf_debug_print_named_key_flags( uint16_t named_key_flags ); void libregf_debug_print_value_key_flags( uint16_t value_key_flags ); int libregf_debug_print_filetime_value( const char *function_name, const char *value_name, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, uint32_t string_format_flags, libcerror_error_t **error ); int libregf_debug_print_string_value( const char *function_name, const char *value_name, const uint8_t *byte_stream, size_t byte_stream_size, int ascii_codepage, libcerror_error_t **error ); int libregf_debug_print_utf16_string_value( const char *function_name, const char *value_name, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); int libregf_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( _LIBREGF_DEBUG_H ) */ libevt-20170120/libregf/libregf_key_item.c0000664000175000017500000017114713012271515022423 0ustar00lordyestalordyesta00000000000000/* * Key item functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_WCTYPE_H ) #include #endif #include "libregf_debug.h" #include "libregf_definitions.h" #include "libregf_hive_bin.h" #include "libregf_hive_bins_list.h" #include "libregf_io_handle.h" #include "libregf_key_item.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libcnotify.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #include "libregf_libfdatetime.h" #include "libregf_libfwnt.h" #include "libregf_libuna.h" #include "libregf_unused.h" #include "libregf_value_item.h" #include "regf_cell_values.h" /* Creates key item * Make sure the key_item is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libregf_key_item_initialize( libregf_key_item_t **key_item, libcerror_error_t **error ) { static char *function = "libregf_key_item_initialize"; if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key item.", function ); return( -1 ); } if( *key_item != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid key item value already set.", function ); return( -1 ); } *key_item = memory_allocate_structure( libregf_key_item_t ); if( *key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create key item.", function ); goto on_error; } if( memory_set( *key_item, 0, sizeof( libregf_key_item_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear key item.", function ); goto on_error; } return( 1 ); on_error: if( *key_item != NULL ) { memory_free( *key_item ); *key_item = NULL; } return( -1 ); } /* Frees key item * Returns 1 if successful or -1 on error */ int libregf_key_item_free( libregf_key_item_t **key_item, libcerror_error_t **error ) { static char *function = "libregf_key_item_free"; int result = 1; if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key item.", function ); return( -1 ); } if( *key_item != NULL ) { if( ( *key_item )->name != NULL ) { memory_free( ( *key_item )->name ); } if( ( *key_item )->class_name != NULL ) { memory_free( ( *key_item )->class_name ); } if( ( *key_item )->security_descriptor != NULL ) { memory_free( ( *key_item )->security_descriptor ); } if( ( *key_item )->values_list != NULL ) { if( libfdata_list_free( &( ( *key_item )->values_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the values data list.", function ); result = -1; } } if( ( *key_item )->values_cache != NULL ) { if( libfcache_cache_free( &( ( *key_item )->values_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free values cache.", function ); result = -1; } } memory_free( *key_item ); key_item = NULL; } return( result ); } /* Retrieves the number of key item * Returns 1 if successful or -1 on error */ int libregf_key_item_get_number_of_values( libregf_key_item_t *key_item, int *number_of_values, libcerror_error_t **error ) { static char *function = "libregf_key_item_get_number_of_values"; if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key item.", function ); return( -1 ); } if( libfdata_list_get_number_of_elements( key_item->values_list, number_of_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from values data list.", function ); return( -1 ); } return( 1 ); } /* Reads a named key * Returns the number of bytes read if successful or -1 on error */ int libregf_key_item_read_named_key( libregf_key_item_t *key_item, libfdata_tree_node_t *key_tree_node, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, off64_t named_key_offset, uint32_t named_key_hash LIBREGF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libregf_hive_bin_cell_t *hive_bin_cell = NULL; libregf_hive_bin_t *hive_bin = NULL; uint8_t *hive_bin_cell_data = NULL; static char *function = "libregf_key_item_read_named_key"; libuna_unicode_character_t unicode_character = 0; size_t hive_bin_cell_size = 0; size_t name_index = 0; off64_t hive_bin_data_offset = 0; uint32_t class_name_offset = 0; uint32_t number_of_sub_keys = 0; uint32_t number_of_values_list_elements = 0; uint32_t security_key_offset = 0; uint32_t sub_keys_list_offset = 0; uint32_t values_list_offset = 0; uint16_t class_name_size = 0; int hive_bin_index = 0; int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; #endif LIBREGF_UNREFERENCED_PARAMETER( named_key_hash ) if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } if( hive_bins_list->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid hive bins list - missing IO handle.", function ); return( -1 ); } if( ( named_key_offset == 0 ) || ( named_key_offset >= (off64_t) 0xffffffffUL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid named key offset.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading named key at offset: %" PRIi32 " (0x%08" PRIx32 ")\n", function, named_key_offset, named_key_offset ); } #endif if( libfdata_list_get_element_value_at_offset( hive_bins_list->data_list, (intptr_t *) file_io_handle, hive_bins_list->data_cache, named_key_offset, &hive_bin_index, &hive_bin_data_offset, (intptr_t **) &hive_bin, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, named_key_offset, named_key_offset ); goto on_error; } if( libregf_hive_bin_get_cell_at_offset( hive_bin, (uint32_t) named_key_offset, &hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin cell at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, named_key_offset, named_key_offset ); goto on_error; } hive_bin_cell_data = hive_bin_cell->data; hive_bin_cell_size = hive_bin_cell->size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: hive bin cell data:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, 0 ); } #endif if( hive_bin_cell_size < sizeof( regf_named_key_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid hive bin cell size too small.", function ); goto on_error; } /* Check if the cell signature matches that of a named key: "nk" */ if( ( hive_bin_cell_data[ 0 ] != (uint8_t) 'n' ) || ( hive_bin_cell_data[ 1 ] != (uint8_t) 'k' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported named key signature.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->flags, key_item->flags ); byte_stream_copy_to_uint64_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->last_written_time, key_item->last_written_time ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->number_of_sub_keys, number_of_sub_keys ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->sub_keys_list_offset, sub_keys_list_offset ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->number_of_values, number_of_values_list_elements ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->values_list_offset, values_list_offset ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->security_key_offset, security_key_offset ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->class_name_offset, class_name_offset ); byte_stream_copy_to_uint16_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->key_name_size, key_item->name_size ); byte_stream_copy_to_uint16_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->class_name_size, class_name_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c\n", function, ( (regf_named_key_t *) hive_bin_cell_data )->signature[ 0 ], ( (regf_named_key_t *) hive_bin_cell_data )->signature[ 1 ] ); libcnotify_printf( "%s: flags\t\t\t\t\t: 0x%04" PRIx16 "\n", function, key_item->flags ); libregf_debug_print_named_key_flags( key_item->flags ); if( libregf_debug_print_filetime_value( function, "last written time\t\t\t", ( (regf_named_key_t *) hive_bin_cell_data )->last_written_time, 8, LIBFDATETIME_ENDIAN_LITTLE, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print filetime value.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->unknown1, value_32bit ); libcnotify_printf( "%s: unknown1\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->parent_key_offset, value_32bit ); libcnotify_printf( "%s: parent key offset\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: number of sub keys\t\t\t: %" PRIu32 "\n", function, number_of_sub_keys ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->number_of_volatile_sub_keys, value_32bit ); libcnotify_printf( "%s: number of volatile sub keys\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "%s: sub keys list offset\t\t\t: 0x%08" PRIx32 "\n", function, sub_keys_list_offset ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->volatile_sub_keys_list_offset, value_32bit ); libcnotify_printf( "%s: volatile sub keys list offset\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: number of values\t\t\t: %" PRIu32 "\n", function, number_of_values_list_elements ); libcnotify_printf( "%s: values list offset\t\t\t: 0x%08" PRIx32 "\n", function, values_list_offset ); libcnotify_printf( "%s: security key offset\t\t\t: 0x%08" PRIx32 "\n", function, security_key_offset ); libcnotify_printf( "%s: class name offset\t\t\t: 0x%08" PRIx32 "\n", function, class_name_offset ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->largest_sub_key_name_size, value_32bit ); libcnotify_printf( "%s: largest sub key name size\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->largest_sub_key_class_name_size, value_32bit ); libcnotify_printf( "%s: largest sub key class name size\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->largest_value_name_size, value_32bit ); libcnotify_printf( "%s: largest value name size\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->largest_value_data_size, value_32bit ); libcnotify_printf( "%s: largest value data size\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) hive_bin_cell_data )->unknown6, value_32bit ); libcnotify_printf( "%s: unknown6\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); libcnotify_printf( "%s: key name size\t\t\t\t: %" PRIu16 "\n", function, key_item->name_size ); libcnotify_printf( "%s: class name size\t\t\t: %" PRIu16 "\n", function, class_name_size ); } #endif hive_bin_cell_data += sizeof( regf_named_key_t ); #if defined( HAVE_DEBUG_OUTPUT ) hive_bin_cell_size -= sizeof( regf_named_key_t ); #endif if( key_item->name_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid key name size.", function ); goto on_error; } key_item->name = (uint8_t *) memory_allocate( sizeof( uint8_t ) * (size_t) key_item->name_size ); if( key_item->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create key name.", function ); goto on_error; } if( memory_copy( key_item->name, hive_bin_cell_data, (size_t) key_item->name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy key name.", function ); goto on_error; } key_item->name_hash = 0; while( name_index < (size_t) key_item->name_size ) { if( ( key_item->flags & LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_unicode_character_copy_from_byte_stream( &unicode_character, key_item->name, (size_t) key_item->name_size, &name_index, hive_bins_list->io_handle->ascii_codepage, error ); } else { result = libuna_unicode_character_copy_from_utf16_stream( &unicode_character, key_item->name, (size_t) key_item->name_size, &name_index, LIBUNA_ENDIAN_LITTLE, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy key name to Unicode character.", function ); goto on_error; } key_item->name_hash *= 37; key_item->name_hash += (uint32_t) towupper( (wint_t) unicode_character ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( key_item->flags & LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { if( libregf_debug_print_string_value( function, "key name\t\t\t\t", key_item->name, (size_t) key_item->name_size, hive_bins_list->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print string value.", function ); goto on_error; } } else { if( libregf_debug_print_utf16_string_value( function, "key name\t\t\t\t", key_item->name, (size_t) key_item->name_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print UTF-16 string value.", function ); goto on_error; } } libcnotify_printf( "%s: key name hash\t\t\t\t: 0x%08" PRIx32 "\n", function, key_item->name_hash ); } hive_bin_cell_data += key_item->name_size; hive_bin_cell_size -= key_item->name_size; #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( named_key_hash != 0 ) && ( named_key_hash != key_item->name_hash ) ) { libcnotify_printf( "%s: mismatch in name hash ( 0x%08" PRIx32 " != 0x%08" PRIx32 " ).\n", function, named_key_hash, key_item->name_hash ); } if( hive_bin_cell_size > 0 ) { libcnotify_printf( "%s: padding:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, 0 ); } else { libcnotify_printf( "\n" ); } } #endif if( class_name_offset != 0xffffffffUL ) { if( libregf_key_item_read_class_name( key_item, file_io_handle, hive_bins_list, class_name_offset, class_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read class name at offset: %" PRIu32 " (0x%08" PRIx32 ").", function, class_name_offset, class_name_offset ); goto on_error; } } if( security_key_offset != 0xffffffffUL ) { if( libregf_key_item_read_security_key( key_item, file_io_handle, hive_bins_list, security_key_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read security key aat offset: %" PRIu32 " (0x%08" PRIx32 ").", function, security_key_offset, security_key_offset ); goto on_error; } } if( number_of_sub_keys > 0 ) { result = libfdata_tree_node_sub_nodes_data_range_is_set( key_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub nodes data range is set.", function ); goto on_error; } else if( result == 0 ) { result = libregf_hive_bins_list_get_index_at_offset( hive_bins_list, (off64_t) sub_keys_list_offset, &hive_bin_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub keys list offset is valid.", function ); goto on_error; } else if( result == 0 ) { key_item->flags |= LIBREGF_KEY_ITEM_FLAG_IS_CORRUPTED; } else if( libfdata_tree_node_set_sub_nodes_data_range( key_tree_node, 0, (off64_t) sub_keys_list_offset, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub keys list as sub nodes range.", function ); goto on_error; } } } /* TODO clone function */ if( libfdata_list_initialize( &( key_item->values_list ), (intptr_t *) hive_bins_list, NULL, NULL, (int (*)(intptr_t *, intptr_t *, libfdata_list_element_t *, libfcache_cache_t *, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libregf_value_item_read_element_data, 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 values data list.", function ); goto on_error; } if( libfcache_cache_initialize( &( key_item->values_cache ), LIBREGF_MAXIMUM_CACHE_ENTRIES_VALUES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create values cache.", function ); goto on_error; } result = libregf_hive_bins_list_get_index_at_offset( hive_bins_list, (off64_t) values_list_offset, &hive_bin_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if values list offset is valid.", function ); goto on_error; } else if( result == 0 ) { key_item->flags |= LIBREGF_KEY_ITEM_FLAG_IS_CORRUPTED; } else { if( libregf_key_item_read_values_list( key_item, file_io_handle, hive_bins_list, values_list_offset, number_of_values_list_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read values list at offset: %" PRIu32 " (0x%08" PRIx32 ").", function, values_list_offset, values_list_offset ); goto on_error; } } /* The values and sub keys are read on demand */ return( 1 ); on_error: if( key_item->values_cache != NULL ) { libfcache_cache_free( &( key_item->values_cache ), NULL ); } if( key_item->values_list != NULL ) { libfdata_list_free( &( key_item->values_list ), NULL ); } if( key_item->name != NULL ) { memory_free( key_item->name ); key_item->name = NULL; } key_item->name_size = 0; return( -1 ); } /* Reads a class name * Returns 1 if successful or -1 on error */ int libregf_key_item_read_class_name( libregf_key_item_t *key_item, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, uint32_t class_name_offset, uint16_t class_name_size, libcerror_error_t **error ) { libregf_hive_bin_t *hive_bin = NULL; libregf_hive_bin_cell_t *hive_bin_cell = NULL; uint8_t *hive_bin_cell_data = NULL; static char *function = "libregf_key_item_read_class_name"; off64_t hive_bin_data_offset = 0; size_t hive_bin_cell_size = 0; int hive_bin_index = 0; if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key item.", function ); return( -1 ); } if( key_item->class_name != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid key item - class name value already set.", function ); return( -1 ); } if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } if( ( class_name_offset == 0 ) && ( class_name_size == 0 ) ) { return( 1 ); } if( ( class_name_offset == 0 ) || ( class_name_offset == 0xffffffffUL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid class name offset.", function ); return( -1 ); } if( libfdata_list_get_element_value_at_offset( hive_bins_list->data_list, (intptr_t *) file_io_handle, hive_bins_list->data_cache, (off64_t) class_name_offset, &hive_bin_index, &hive_bin_data_offset, (intptr_t **) &hive_bin, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin at offset: %" PRIu32 " (0x%08" PRIx32 ").", function, class_name_offset, class_name_offset ); goto on_error; } if( libregf_hive_bin_get_cell_at_offset( hive_bin, class_name_offset, &hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin cell at offset: %" PRIu32 " (0x%08" PRIx32 ").", function, class_name_offset, class_name_offset ); goto on_error; } hive_bin_cell_data = hive_bin_cell->data; hive_bin_cell_size = hive_bin_cell->size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, 0 ); } #endif if( class_name_size > hive_bin_cell_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid class name size value exceeds hive bin cell size.", function ); goto on_error; } if( class_name_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid value class name size.", function ); goto on_error; } key_item->class_name_size = class_name_size; key_item->class_name = (uint8_t *) memory_allocate( sizeof( uint8_t ) * (size_t) key_item->class_name_size ); if( key_item->class_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create key class name.", function ); goto on_error; } if( memory_copy( key_item->class_name, hive_bin_cell_data, (size_t) key_item->class_name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy hive bin cell data to class name.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libregf_debug_print_utf16_string_value( function, "class name\t\t\t", key_item->class_name, (size_t) key_item->class_name_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print UTF-16 string value.", function ); goto on_error; } } hive_bin_cell_data += key_item->class_name_size; hive_bin_cell_size -= key_item->class_name_size; #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( hive_bin_cell_size > 0 ) { libcnotify_printf( "%s: padding:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, 0 ); } else { libcnotify_printf( "\n" ); } } #endif return( 1 ); on_error: if( key_item->class_name != NULL ) { memory_free( key_item->class_name ); key_item->class_name = NULL; } key_item->class_name_size = 0; return( -1 ); } /* Reads a security key * Returns 1 if successful or -1 on error */ int libregf_key_item_read_security_key( libregf_key_item_t *key_item, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, uint32_t security_key_offset, libcerror_error_t **error ) { libregf_hive_bin_cell_t *hive_bin_cell = NULL; libregf_hive_bin_t *hive_bin = NULL; uint8_t *hive_bin_cell_data = NULL; static char *function = "libregf_key_item_read_security_key"; size_t hive_bin_cell_size = 0; off64_t hive_bin_data_offset = 0; int hive_bin_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) libfwnt_security_descriptor_t *security_descriptor = NULL; uint32_t value_32bit = 0; uint16_t value_16bit = 0; #endif if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key item.", function ); return( -1 ); } if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } if( ( security_key_offset == 0 ) || ( security_key_offset == 0xffffffffUL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid security key offset.", function ); return( -1 ); } if( key_item->security_descriptor != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid key item - security descriptor value already set.", function ); return( -1 ); } if( libfdata_list_get_element_value_at_offset( hive_bins_list->data_list, (intptr_t *) file_io_handle, hive_bins_list->data_cache, (off64_t) security_key_offset, &hive_bin_index, &hive_bin_data_offset, (intptr_t **) &hive_bin, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin at offset: %" PRIu32 " (0x%08" PRIx32 ").", function, security_key_offset, security_key_offset ); goto on_error; } if( libregf_hive_bin_get_cell_at_offset( hive_bin, security_key_offset, &hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin cell at offset: %" PRIu32 " (0x%08" PRIx32 ").", function, security_key_offset, security_key_offset ); goto on_error; } hive_bin_cell_data = hive_bin_cell->data; hive_bin_cell_size = hive_bin_cell->size; if( hive_bin_cell_size < sizeof( regf_security_key_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid hive bin cell size too small.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: header data:\n", function ); libcnotify_print_data( hive_bin_cell_data, sizeof( regf_security_key_t ), 0 ); } #endif /* Check if the cell signature matches that of a security key: "sk" */ if( ( hive_bin_cell_data[ 0 ] != (uint8_t) 's' ) || ( hive_bin_cell_data[ 1 ] != (uint8_t) 'k' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported security key signature.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c\n", function, ( (regf_security_key_t *) hive_bin_cell_data )->signature[ 0 ], ( (regf_security_key_t *) hive_bin_cell_data )->signature[ 1 ] ); byte_stream_copy_to_uint16_little_endian( ( (regf_security_key_t *) hive_bin_cell_data )->unknown1, value_16bit ); libcnotify_printf( "%s: unknown1\t\t\t\t: 0x%04" PRIx16 " (%" PRIu16 ")\n", function, value_16bit, value_16bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_security_key_t *) hive_bin_cell_data )->previous_security_key_offset, value_32bit ); libcnotify_printf( "%s: previous security key offset\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_security_key_t *) hive_bin_cell_data )->next_security_key_offset, value_32bit ); libcnotify_printf( "%s: next security key offset\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_security_key_t *) hive_bin_cell_data )->reference_count, value_32bit ); libcnotify_printf( "%s: reference count\t\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "\n" ); } #endif hive_bin_cell_data += sizeof( regf_security_key_t ); hive_bin_cell_size -= sizeof( regf_security_key_t ); if( hive_bin_cell_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid hive bin cell size too small to contain security descriptor.", function ); goto on_error; } /* TODO print unknown 4 bytes */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: security descriptor data:\n", function ); libcnotify_print_data( &( hive_bin_cell_data[ 4 ] ), hive_bin_cell_size - 4, 0 ); } #endif key_item->security_descriptor_size = hive_bin_cell_size - 4; if( key_item->security_descriptor_size > 0 ) { key_item->security_descriptor = (uint8_t *) memory_allocate( sizeof( uint8_t ) * key_item->security_descriptor_size ); if( key_item->security_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create key security descriptor.", function ); goto on_error; } if( memory_copy( key_item->security_descriptor, &( hive_bin_cell_data[ 4 ] ), key_item->security_descriptor_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy hive bin cell data to security descriptor.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfwnt_security_descriptor_initialize( &security_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create security descriptor.", function ); goto on_error; } if( libfwnt_security_descriptor_copy_from_byte_stream( security_descriptor, key_item->security_descriptor, key_item->security_descriptor_size, LIBFWNT_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy security descriptor from byte stream.", function ); goto on_error; } if( libfwnt_security_descriptor_free( &security_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free security descriptor.", function ); goto on_error; } libcnotify_printf( "\n" ); } #endif } /* TODO padding/trailing data ? */ return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( security_descriptor != NULL ) { libfwnt_security_descriptor_free( &security_descriptor, NULL ); } #endif if( key_item->security_descriptor != NULL ) { memory_free( key_item->security_descriptor ); key_item->security_descriptor = NULL; } key_item->security_descriptor_size = 0; return( -1 ); } /* Reads a values list * Returns 1 if successful or -1 on error */ int libregf_key_item_read_values_list( libregf_key_item_t *key_item, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, uint32_t values_list_offset, uint32_t number_of_values_list_elements, libcerror_error_t **error ) { libregf_hive_bin_t *hive_bin = NULL; libregf_hive_bin_cell_t *hive_bin_cell = NULL; uint8_t *hive_bin_cell_data = NULL; static char *function = "libregf_key_item_read_values_list"; off64_t hive_bin_data_offset = 0; size_t hive_bin_cell_size = 0; uint32_t values_list_element_iterator = 0; uint32_t values_list_element_offset = 0; int element_index = 0; int hive_bin_index = 0; int result = 0; if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key item.", function ); return( -1 ); } if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } if( number_of_values_list_elements == 0 ) { return( 1 ); } if( ( values_list_offset == 0 ) || ( values_list_offset == 0xffffffffUL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid values list offset.", function ); return( -1 ); } if( libfdata_list_get_element_value_at_offset( hive_bins_list->data_list, (intptr_t *) file_io_handle, hive_bins_list->data_cache, (off64_t) values_list_offset, &hive_bin_index, &hive_bin_data_offset, (intptr_t **) &hive_bin, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin at offset: %" PRIu32 " (0x%08" PRIx32 ").", function, values_list_offset , values_list_offset ); return( -1 ); } if( libregf_hive_bin_get_cell_at_offset( hive_bin, values_list_offset, &hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin cell at offset: %" PRIu32 " (0x%08" PRIx32 ").", function, values_list_offset, values_list_offset ); return( -1 ); } hive_bin_cell_data = hive_bin_cell->data; hive_bin_cell_size = hive_bin_cell->size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, 0 ); } #endif if( hive_bin_cell_size < ( number_of_values_list_elements * 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid cell size value too small to contain number of values.", function ); return( -1 ); } for( values_list_element_iterator = 0; values_list_element_iterator < number_of_values_list_elements; values_list_element_iterator++ ) { byte_stream_copy_to_uint32_little_endian( hive_bin_cell_data, values_list_element_offset ); hive_bin_cell_data += 4; hive_bin_cell_size -= 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element: %03" PRIu32 " offset\t\t\t: 0x%08" PRIx32 "\n", function, values_list_element_iterator, values_list_element_offset ); } #endif result = libregf_hive_bins_list_get_index_at_offset( hive_bins_list, (off64_t) values_list_element_offset, &hive_bin_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if values list element offset is valid.", function ); return( -1 ); } else if( result == 0 ) { key_item->flags |= LIBREGF_KEY_ITEM_FLAG_IS_CORRUPTED; } else if( libfdata_list_append_element( key_item->values_list, &element_index, 0, (off64_t) values_list_element_offset, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to set value list element: %" PRIu32 " in list.", function, values_list_element_iterator ); return( -1 ); } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( hive_bin_cell_size > 0 ) { libcnotify_printf( "%s: padding:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, 0 ); } else { libcnotify_printf( "\n" ); } } #endif return( 1 ); } /* Reads a key * Returns 1 if successful or -1 on error */ int libregf_key_item_read_node_data( libregf_hive_bins_list_t *hive_bins_list, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, int node_data_file_index LIBREGF_ATTRIBUTE_UNUSED, off64_t node_data_offset, size64_t node_data_size, uint32_t node_data_flags LIBREGF_ATTRIBUTE_UNUSED, uint8_t read_flags LIBREGF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libregf_key_item_t *key_item = NULL; static char *function = "libregf_key_item_read_node_data"; LIBREGF_UNREFERENCED_PARAMETER( node_data_file_index ) LIBREGF_UNREFERENCED_PARAMETER( node_data_flags ) LIBREGF_UNREFERENCED_PARAMETER( read_flags ) if( libregf_key_item_initialize( &key_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create key item.", function ); goto on_error; } /* The size contains the hash of the name */ if( node_data_size > (size64_t) UINT32_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid node data size value exceeds maximum.", function ); goto on_error; } if( libregf_key_item_read_named_key( key_item, node, file_io_handle, hive_bins_list, node_data_offset, (uint32_t) node_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read named key at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, node_data_offset, node_data_offset ); goto on_error; } if( libfdata_tree_node_set_node_value( node, cache, (intptr_t *) key_item, (int (*)(intptr_t **, libcerror_error_t **)) &libregf_key_item_free, LIBFDATA_TREE_NODE_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set key item as node value.", function ); goto on_error; } return( 1 ); on_error: if( key_item != NULL ) { libregf_key_item_free( &key_item, NULL ); } return( -1 ); } /* Reads a sub keys list * Returns 1 if successful, 0 if not or -1 on error */ int libregf_key_item_read_sub_keys_list( libfdata_tree_node_t *key_tree_node, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, off64_t sub_keys_list_offset, libcerror_error_t **error ) { libregf_hive_bin_t *hive_bin = NULL; libregf_hive_bin_cell_t *hive_bin_cell = NULL; uint8_t *hive_bin_cell_data = NULL; uint8_t *sub_keys_list_data = NULL; static char *function = "libregf_key_item_read_sub_keys_list"; off64_t hive_bin_data_offset = 0; size_t hive_bin_cell_size = 0; uint32_t element_hash = 0; uint32_t sub_keys_list_element_offset = 0; uint16_t number_of_sub_keys_list_elements = 0; uint16_t sub_keys_list_element_iterator = 0; uint8_t sub_keys_list_element_size = 0; uint8_t at_leaf_level = 0; int corruption_detected = 0; int hive_bin_index = 0; int result = 0; int sub_node_index = 0; if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } if( ( sub_keys_list_offset == 0 ) || ( sub_keys_list_offset == (off64_t) 0xffffffffUL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid sub keys list offset.", function ); return( -1 ); } if( libfdata_list_get_element_value_at_offset( hive_bins_list->data_list, (intptr_t *) file_io_handle, hive_bins_list->data_cache, sub_keys_list_offset, &hive_bin_index, &hive_bin_data_offset, (intptr_t **) &hive_bin, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, sub_keys_list_offset, sub_keys_list_offset ); goto on_error; } if( libregf_hive_bin_get_cell_at_offset( hive_bin, (uint32_t) sub_keys_list_offset, &hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin cell at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, sub_keys_list_offset, sub_keys_list_offset ); goto on_error; } #if SIZEOF_SIZE_T <= 4 if( hive_bin_cell->size > (uint32_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid hive bin cell - size value exceeds maximum.", function ); return( -1 ); } #endif /* Make a local copy of the data in case the hive bin cell gets cached out * while reading the sub keys */ hive_bin_cell_data = memory_allocate( sizeof( uint8_t ) * hive_bin_cell->size ); if( hive_bin_cell_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create hive bin cell data.", function ); goto on_error; } hive_bin_cell_size = hive_bin_cell->size; if( memory_copy( hive_bin_cell_data, hive_bin_cell->data, hive_bin_cell->size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy hive bin cell data.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, 0 ); } #endif if( hive_bin_cell_size < sizeof( regf_sub_key_list_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid hive bin cell size too small.", function ); goto on_error; } /* Check if the cell signature matches that of a sub keys list: "lf", "lh", "li" or "ri" */ if( ( hive_bin_cell_data[ 0 ] == (uint8_t) 'r' ) && ( hive_bin_cell_data[ 1 ] == (uint8_t) 'i' ) ) { sub_keys_list_element_size = 4; at_leaf_level = 0; } else if( ( hive_bin_cell_data[ 0 ] == (uint8_t) 'l' ) && ( hive_bin_cell_data[ 1 ] == (uint8_t) 'i' ) ) { sub_keys_list_element_size = 4; at_leaf_level = 1; } else if( ( hive_bin_cell_data[ 0 ] == (uint8_t) 'l' ) && ( ( hive_bin_cell_data[ 1 ] == (uint8_t) 'f' ) || ( hive_bin_cell_data[ 1 ] == (uint8_t) 'h' ) ) ) { sub_keys_list_element_size = 8; at_leaf_level = 1; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported sub keys list signature.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( ( (regf_sub_key_list_t *) hive_bin_cell_data )->number_of_elements, number_of_sub_keys_list_elements ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c\n", function, ( (regf_sub_key_list_t *) hive_bin_cell_data )->signature[ 0 ], ( (regf_sub_key_list_t *) hive_bin_cell_data )->signature[ 1 ] ); libcnotify_printf( "%s: number of elements\t\t\t: %" PRIu16 "\n", function, number_of_sub_keys_list_elements ); } #endif sub_keys_list_data = &( hive_bin_cell_data[ sizeof( regf_sub_key_list_t ) ] ); hive_bin_cell_size -= sizeof( regf_sub_key_list_t ); if( hive_bin_cell_size < (size_t) ( number_of_sub_keys_list_elements * sub_keys_list_element_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid cell size value too small to contain number of elements.", function ); goto on_error; } for( sub_keys_list_element_iterator = 0; sub_keys_list_element_iterator < number_of_sub_keys_list_elements; sub_keys_list_element_iterator++ ) { byte_stream_copy_to_uint32_little_endian( sub_keys_list_data, sub_keys_list_element_offset ); sub_keys_list_data += 4; hive_bin_cell_size -= 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element: %03" PRIu16 " offset\t\t: 0x%08" PRIx32 "\n", function, sub_keys_list_element_iterator, sub_keys_list_element_offset ); } #endif if( sub_keys_list_element_size == 8 ) { byte_stream_copy_to_uint32_little_endian( sub_keys_list_data, element_hash ); sub_keys_list_data += 4; hive_bin_cell_size -= 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element: %03" PRIu16 " hash\t\t\t: 0x%08" PRIx32 "\n", function, sub_keys_list_element_iterator, element_hash ); } #endif } else { element_hash = 0; } result = libregf_hive_bins_list_get_index_at_offset( hive_bins_list, (off64_t) sub_keys_list_element_offset, &hive_bin_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub keys list element offset is valid.", function ); goto on_error; } else if( result != 0 ) { if( at_leaf_level != 0 ) { if( libfdata_tree_node_append_sub_node( key_tree_node, &sub_node_index, 0, (off64_t) sub_keys_list_element_offset, (size64_t) element_hash, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append sub node.", function ); goto on_error; } } else { result = libregf_key_item_read_sub_keys_list( key_tree_node, file_io_handle, hive_bins_list, (off64_t) sub_keys_list_element_offset, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub keys list at offset: %" PRIu32 " (0x%08" PRIx32 ").", function, sub_keys_list_element_offset, sub_keys_list_element_offset ); goto on_error; } } } if( result == 0 ) { corruption_detected = 1; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( hive_bin_cell_size > 0 ) { libcnotify_printf( "%s: padding:\n", function ); libcnotify_print_data( sub_keys_list_data, hive_bin_cell_size, 0 ); } else { libcnotify_printf( "\n" ); } } #endif memory_free( hive_bin_cell_data ); if( corruption_detected != 0 ) { return( 0 ); } return( 1 ); on_error: if( hive_bin_cell_data != NULL ) { memory_free( hive_bin_cell_data ); } return( -1 ); } /* Reads the sub keys * Returns 1 if successful or -1 on error */ int libregf_key_item_read_sub_nodes( libregf_hive_bins_list_t *hive_bins_list, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache LIBREGF_ATTRIBUTE_UNUSED, int sub_nodes_data_file_index LIBREGF_ATTRIBUTE_UNUSED, off64_t sub_nodes_data_offset, size64_t sub_nodes_data_size LIBREGF_ATTRIBUTE_UNUSED, uint32_t sub_nodes_data_flags LIBREGF_ATTRIBUTE_UNUSED, uint8_t read_flags LIBREGF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { static char *function = "libregf_key_item_read_sub_nodes"; int result = 0; LIBREGF_UNREFERENCED_PARAMETER( cache ) LIBREGF_UNREFERENCED_PARAMETER( sub_nodes_data_file_index ) LIBREGF_UNREFERENCED_PARAMETER( sub_nodes_data_size ) LIBREGF_UNREFERENCED_PARAMETER( sub_nodes_data_flags ) LIBREGF_UNREFERENCED_PARAMETER( read_flags ) result = libregf_key_item_read_sub_keys_list( node, file_io_handle, hive_bins_list, sub_nodes_data_offset, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub keys list at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, sub_nodes_data_offset, sub_nodes_data_offset ); return( -1 ); } else if( result == 0 ) { /* TODO signal corruption */ } return( 1 ); } /* Compares the key name with UTF-8 string * Returns 1 if the names match, 0 if not or -1 on error */ int libregf_key_item_compare_name_with_utf8_string( libregf_key_item_t *key_item, uint32_t name_hash, const uint8_t *utf8_string, size_t utf8_string_length, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libregf_key_item_compare_name_with_utf8_string"; libuna_unicode_character_t name_character = 0; libuna_unicode_character_t string_character = 0; size_t name_index = 0; size_t utf8_string_index = 0; int result = 0; if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key item.", function ); return( -1 ); } if( key_item->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key item - missing name.", 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string length value exceeds maximum.", function ); return( -1 ); } /* Do a full compare if there no name hash was provided or the name hash matches */ if( ( name_hash == 0 ) || ( key_item->name_hash == 0 ) || ( key_item->name_hash == name_hash ) ) { while( name_index < (size_t) key_item->name_size ) { if( utf8_string_index >= utf8_string_length ) { break; } if( ( key_item->flags & LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_unicode_character_copy_from_byte_stream( &name_character, key_item->name, (size_t) key_item->name_size, &name_index, ascii_codepage, error ); } else { result = libuna_unicode_character_copy_from_utf16_stream( &name_character, key_item->name, (size_t) key_item->name_size, &name_index, LIBUNA_ENDIAN_LITTLE, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy key name to Unicode character.", function ); return( -1 ); } if( libuna_unicode_character_copy_from_utf8( &string_character, utf8_string, utf8_string_length, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to Unicode character.", function ); return( -1 ); } if( towupper( (wint_t) name_character ) != towupper( (wint_t) string_character ) ) { break; } } if( ( name_index == (size_t) key_item->name_size ) && ( utf8_string_index == utf8_string_length ) ) { return( 1 ); } } return( 0 ); } /* Compares the key name with UTF-16 string * Returns 1 if the names match, 0 if not or -1 on error */ int libregf_key_item_compare_name_with_utf16_string( libregf_key_item_t *key_item, uint32_t name_hash, const uint16_t *utf16_string, size_t utf16_string_length, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libregf_key_item_compare_name_with_utf16_string"; libuna_unicode_character_t name_character = 0; libuna_unicode_character_t string_character = 0; size_t name_index = 0; size_t utf16_string_index = 0; int result = 0; if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key item.", function ); return( -1 ); } if( key_item->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid key item - missing name.", 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string length value exceeds maximum.", function ); return( -1 ); } /* Do a full compare if there no name hash was provided or the name hash matches */ if( ( name_hash == 0 ) || ( key_item->name_hash == 0 ) || ( key_item->name_hash == name_hash ) ) { while( name_index < (size_t) key_item->name_size ) { if( utf16_string_index >= utf16_string_length ) { break; } if( ( key_item->flags & LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_unicode_character_copy_from_byte_stream( &name_character, key_item->name, (size_t) key_item->name_size, &name_index, ascii_codepage, error ); } else { result = libuna_unicode_character_copy_from_utf16_stream( &name_character, key_item->name, (size_t) key_item->name_size, &name_index, LIBUNA_ENDIAN_LITTLE, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy key name to Unicode character.", function ); return( -1 ); } if( libuna_unicode_character_copy_from_utf16( &string_character, utf16_string, utf16_string_length, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to Unicode character.", function ); return( -1 ); } if( towupper( (wint_t) name_character ) != towupper( (wint_t) string_character ) ) { break; } } if( ( name_index == (size_t) key_item->name_size ) && ( utf16_string_index == utf16_string_length ) ) { return( 1 ); } } return( 0 ); } libevt-20170120/libregf/libregf_support.c0000664000175000017500000002247313012271515022326 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "libregf_definitions.h" #include "libregf_io_handle.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libclocale.h" #include "libregf_support.h" #if !defined( HAVE_LOCAL_LIBREGF ) /* Returns the library version */ const char *libregf_get_version( void ) { return( (const char *) LIBREGF_VERSION_STRING ); } /* Returns the access flags for reading */ int libregf_get_access_flags_read( void ) { return( (uint8_t) LIBREGF_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 libregf_get_codepage( int *codepage, libcerror_error_t **error ) { static char *function = "libregf_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 libregf_set_codepage( int codepage, libcerror_error_t **error ) { static char *function = "libregf_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_LIBREGF ) */ /* Determines if a file contains a REGF file signature * Returns 1 if true, 0 if not or -1 on error */ int libregf_check_file_signature( const char *filename, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libregf_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 = libregf_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 a REGF file signature * Returns 1 if true, 0 if not or -1 on error */ int libregf_check_file_signature_wide( const wchar_t *filename, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libregf_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 ); 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_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 = libregf_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 a REGF file signature using a Basic File IO (bfio) handle * Returns 1 if true, 0 if not or -1 on error */ int libregf_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { uint8_t signature[ 4 ]; static char *function = "libregf_check_file_signature_file_io_handle"; ssize_t read_count = 0; int file_io_handle_is_open = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } file_io_handle_is_open = libbfio_handle_is_open( file_io_handle, error ); if( file_io_handle_is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); goto on_error; } else if( file_io_handle_is_open == 0 ) { if( libbfio_handle_open( file_io_handle, LIBBFIO_OPEN_READ, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); goto on_error; } } if( libbfio_handle_seek_offset( file_io_handle, 0, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek file header offset: 0.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, signature, 4, error ); if( read_count != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read signature.", function ); goto on_error; } if( file_io_handle_is_open == 0 ) { if( libbfio_handle_close( file_io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close file.", function ); goto on_error; } } if( memory_compare( regf_file_signature, signature, 4 ) == 0 ) { return( 1 ); } return( 0 ); on_error: if( file_io_handle_is_open == 0 ) { libbfio_handle_close( file_io_handle, NULL ); } return( -1 ); } libevt-20170120/libregf/libregf_libfwnt.h0000664000175000017500000000311313012271515022252 0ustar00lordyestalordyesta00000000000000/* * The libfwnt header wrapper * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_LIBFWNT_H ) #define _LIBREGF_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 #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( _LIBREGF_LIBFWNT_H ) */ libevt-20170120/libregf/libregf_checksum.h0000664000175000017500000000235013012271515022411 0ustar00lordyestalordyesta00000000000000/* * Checksum functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_CRC_H ) #define _LIBREGF_CRC_H #include #include #include "libregf_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libregf_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( _LIBREGF_CRC_H ) */ libevt-20170120/libregf/libregf_error.h0000664000175000017500000000335613012271515021747 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_INTERNAL_ERROR_H ) #define _LIBREGF_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBREGF ) #include #endif #include "libregf_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBREGF ) LIBREGF_EXTERN \ void libregf_error_free( libregf_error_t **error ); LIBREGF_EXTERN \ int libregf_error_fprint( libregf_error_t *error, FILE *stream ); LIBREGF_EXTERN \ int libregf_error_sprint( libregf_error_t *error, char *string, size_t size ); LIBREGF_EXTERN \ int libregf_error_backtrace_fprint( libregf_error_t *error, FILE *stream ); LIBREGF_EXTERN \ int libregf_error_backtrace_sprint( libregf_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBREGF ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_INTERNAL_ERROR_H ) */ libevt-20170120/libregf/libregf_unused.h0000664000175000017500000000253613012271515022120 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_INTERNAL_UNUSED_H ) #define _LIBREGF_INTERNAL_UNUSED_H #include #if !defined( LIBREGF_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBREGF_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBREGF_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBREGF_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBREGF_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBREGF_INTERNAL_UNUSED_H ) */ libevt-20170120/libregf/libregf_key_tree.h0000664000175000017500000000374013012271515022422 0ustar00lordyestalordyesta00000000000000/* * Key tree functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_KEY_TREE_H ) #define _LIBREGF_KEY_TREE_H #include #include #include "libregf_key_item.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif int libregf_key_tree_get_sub_key_values_by_utf8_name( libfdata_tree_node_t *key_tree_node, libbfio_handle_t *file_io_handle, libfcache_cache_t *key_cache, uint32_t name_hash, const uint8_t *utf8_string, size_t utf8_string_length, int ascii_codepage, libfdata_tree_node_t **key_tree_sub_node, libregf_key_item_t **sub_key_item, libcerror_error_t **error ); int libregf_key_tree_get_sub_key_values_by_utf16_name( libfdata_tree_node_t *key_tree_node, libbfio_handle_t *file_io_handle, libfcache_cache_t *key_cache, uint32_t name_hash, const uint16_t *utf16_string, size_t utf16_string_length, int ascii_codepage, libfdata_tree_node_t **key_tree_sub_node, libregf_key_item_t **sub_key_item, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_KEY_TREE_H ) */ libevt-20170120/libregf/libregf_libuna.h0000664000175000017500000000323213012271515022061 0ustar00lordyestalordyesta00000000000000/* * The libuna header wrapper * * Copyright (C) 2009-2016, Joachim Metz * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_LIBUNA_H ) #define _LIBREGF_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( _LIBREGF_LIBUNA_H ) */ libevt-20170120/libregf/libregf_codepage.h0000664000175000017500000000507013012271515022360 0ustar00lordyestalordyesta00000000000000/* * Codepage functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_INTERNAL_CODEPAGE_H ) #define _LIBREGF_INTERNAL_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBREGF ) #include /* Define HAVE_LOCAL_LIBREGF for local use of libregf * The definitions in are copied here * for local use of libregf */ #else /* The codepage definitions */ enum LIBREGF_CODEPAGES { LIBREGF_CODEPAGE_ASCII = 20127, LIBREGF_CODEPAGE_ISO_8859_1 = 28591, LIBREGF_CODEPAGE_ISO_8859_2 = 28592, LIBREGF_CODEPAGE_ISO_8859_3 = 28593, LIBREGF_CODEPAGE_ISO_8859_4 = 28594, LIBREGF_CODEPAGE_ISO_8859_5 = 28595, LIBREGF_CODEPAGE_ISO_8859_6 = 28596, LIBREGF_CODEPAGE_ISO_8859_7 = 28597, LIBREGF_CODEPAGE_ISO_8859_8 = 28598, LIBREGF_CODEPAGE_ISO_8859_9 = 28599, LIBREGF_CODEPAGE_ISO_8859_10 = 28600, LIBREGF_CODEPAGE_ISO_8859_11 = 28601, LIBREGF_CODEPAGE_ISO_8859_13 = 28603, LIBREGF_CODEPAGE_ISO_8859_14 = 28604, LIBREGF_CODEPAGE_ISO_8859_15 = 28605, LIBREGF_CODEPAGE_ISO_8859_16 = 28606, LIBREGF_CODEPAGE_KOI8_R = 20866, LIBREGF_CODEPAGE_KOI8_U = 21866, LIBREGF_CODEPAGE_WINDOWS_874 = 874, LIBREGF_CODEPAGE_WINDOWS_932 = 932, LIBREGF_CODEPAGE_WINDOWS_936 = 936, LIBREGF_CODEPAGE_WINDOWS_949 = 949, LIBREGF_CODEPAGE_WINDOWS_950 = 950, LIBREGF_CODEPAGE_WINDOWS_1250 = 1250, LIBREGF_CODEPAGE_WINDOWS_1251 = 1251, LIBREGF_CODEPAGE_WINDOWS_1252 = 1252, LIBREGF_CODEPAGE_WINDOWS_1253 = 1253, LIBREGF_CODEPAGE_WINDOWS_1254 = 1254, LIBREGF_CODEPAGE_WINDOWS_1255 = 1255, LIBREGF_CODEPAGE_WINDOWS_1256 = 1256, LIBREGF_CODEPAGE_WINDOWS_1257 = 1257, LIBREGF_CODEPAGE_WINDOWS_1258 = 1258 }; #endif /* !defined( HAVE_LOCAL_LIBREGF ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_INTERNAL_CODEPAGE_H ) */ libevt-20170120/libregf/regf_hive_bin.h0000664000175000017500000000346613012271515021714 0ustar00lordyestalordyesta00000000000000/* * The hive bin definition of a Windows NT Registry File (REGF) * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _REGF_HIVE_BIN_H ) #define _REGF_HIVE_BIN_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct regf_hive_bin_header regf_hive_bin_header_t; struct regf_hive_bin_header { /* The signature * Consists of 4 bytes * Contains: "hbin" */ uint8_t signature[ 4 ]; /* The offset of the hive bin relative from the start * of the hive bin data * Consists of 4 bytes * Contains the number of bytes */ uint8_t hive_bin_offset[ 4 ]; /* The size of the hive bin * Consists of 4 bytes * Contains the number of bytes */ uint8_t size[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown1[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown2[ 4 ]; /* Unknown date and time * Consists of 8 bytes */ uint8_t unknown_time[ 8 ]; /* Unknown spare * Consists of 4 bytes */ uint8_t unknown_spare[ 4 ]; }; #if defined( __cplusplus ) } #endif #endif /* !defined( _REGF_HIVE_BIN_H ) */ libevt-20170120/libregf/libregf_definitions.h0000664000175000017500000000774213012271515023134 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_INTERNAL_DEFINITIONS_H ) #define _LIBREGF_INTERNAL_DEFINITIONS_H #include #include #define LIBREGF_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBREGF_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* Define HAVE_LOCAL_LIBREGF for local use of libregf */ #if !defined( HAVE_LOCAL_LIBREGF ) #include /* The definitions in are copied here * for local use of libregf */ #else #define LIBREGF_VERSION 20161108 /* The libregf version string */ #define LIBREGF_VERSION_STRING "20161108" /* The libregf file access * bit 1 set to 1 for read access * bit 2 set to 1 for write access * bit 3-8 not used */ enum LIBREGF_ACCESS_FLAGS { LIBREGF_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBREGF_ACCESS_FLAG_WRITE = 0x02 }; /* The libregf file access macros */ #define LIBREGF_OPEN_READ ( LIBREGF_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBREGF_OPEN_WRITE ( LIBREGF_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBREGF_OPEN_READ_WRITE ( LIBREGF_ACCESS_FLAG_READ | LIBREGF_ACCESS_FLAG_WRITE ) /* The key path segment separator */ #define LIBREGF_SEPARATOR '\\' /* The file types */ enum LIBREGF_FILE_TYPES { LIBREGF_FILE_TYPE_REGISTRY = 0x00000000UL, LIBREGF_FILE_TYPE_TRANSACTION_LOG = 0x00000001UL }; /* The value types */ enum LIBREGF_VALUE_TYPES { LIBREGF_VALUE_TYPE_UNDEFINED = 0, LIBREGF_VALUE_TYPE_STRING = 1, LIBREGF_VALUE_TYPE_EXPANDABLE_STRING = 2, LIBREGF_VALUE_TYPE_BINARY_DATA = 3, LIBREGF_VALUE_TYPE_INTEGER_32BIT_LITTLE_ENDIAN = 4, LIBREGF_VALUE_TYPE_INTEGER_32BIT_BIG_ENDIAN = 5, LIBREGF_VALUE_TYPE_SYMBOLIC_LINK = 6, LIBREGF_VALUE_TYPE_MULTI_VALUE_STRING = 7, LIBREGF_VALUE_TYPE_RESOURCE_LIST = 8, LIBREGF_VALUE_TYPE_FULL_RESOURCE_DESCRIPTOR = 9, LIBREGF_VALUE_TYPE_RESOURCE_REQUIREMENTS_LIST = 10, LIBREGF_VALUE_TYPE_INTEGER_64BIT_LITTLE_ENDIAN = 11 }; #endif /* The IO handle flags */ enum LIBREGF_IO_HANDLE_FLAGS { /* The file is corrupted */ LIBREGF_IO_HANDLE_FLAG_IS_CORRUPTED = 0x01 }; /* The hive bins flags */ enum LIBREGF_HIVE_BINS_FLAGS { /* The hive bins are corrupted */ LIBREGF_HIVE_BINS_FLAG_IS_CORRUPTED = 0x01 }; /* The key item flags */ enum LIBREGF_KEY_ITEM_FLAGS { /* The key item is corrupted */ LIBREGF_KEY_ITEM_FLAG_IS_CORRUPTED = 0x01 }; /* The value item data types */ enum LIBREGF_VALUE_ITEM_DATA_TYPES { LIBREGF_VALUE_ITEM_DATA_TYPE_BUFFER = 1, LIBREGF_VALUE_ITEM_DATA_TYPE_BLOCK = 2 }; /* The value item flags */ enum LIBREGF_VALUE_ITEM_FLAGS { /* The value item is corrupted */ LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED = 0x01 }; /* The hive bin cell flags */ enum LIBREGF_HIVE_BIN_CELL_FLAGS { LIBREGF_HIVE_BIN_CELL_FLAG_UNALLOCATED = 0x01 }; /* The named key flags */ enum LIBREGF_NAMED_KEY_FLAGS { LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII = 0x0020, }; /* The value key flags */ enum LIBREGF_VALUE_KEY_FLAGS { LIBREGF_VALUE_KEY_FLAG_NAME_IS_ASCII = 0x0001, }; #define LIBREGF_MAXIMUM_CACHE_ENTRIES_HIVE_BINS 64 * 1024 #define LIBREGF_MAXIMUM_CACHE_ENTRIES_KEYS 256 * 1024 #define LIBREGF_MAXIMUM_CACHE_ENTRIES_VALUES 128 #endif libevt-20170120/libregf/libregf_named_key.h0000664000175000017500000000364213012271515022550 0ustar00lordyestalordyesta00000000000000/* * Named key functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_NAMED_KEY_ENTRY_H ) #define _LIBREGF_NAMED_KEY_ENTRY_H #include #include #include "libregf_libcdata.h" #include "libregf_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libregf_named_key libregf_named_key_t; struct libregf_named_key { /* The name hash */ uint32_t name_hash; /* The name */ uint8_t *name; /* The name size */ uint16_t name_size; /* The class name */ uint8_t *class_name; /* The class name size */ uint16_t class_name_size; /* The last written time */ uint64_t last_written_time; /* The flags */ uint16_t flags; }; int libregf_named_key_initialize( libregf_named_key_t **named_key, libcerror_error_t **error ); int libregf_named_key_free( libregf_named_key_t **named_key, libcerror_error_t **error ); int libregf_named_key_read( libregf_named_key_t *named_key, const uint8_t *data, size_t data_size, uint32_t named_key_hash, int ascii_codepage, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_NAMED_KEY_ENTRY_H ) */ libevt-20170120/libregf/regf_file_header.h0000664000175000017500000000451113012271515022350 0ustar00lordyestalordyesta00000000000000/* * The file header definition of a Windows NT Registry File (REGF) * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _REGF_FILE_HEADER_H ) #define _REGF_FILE_HEADER_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct regf_file_header regf_file_header_t; struct regf_file_header { /* The signature * Consists of 4 bytes * Contains: "regf" */ uint8_t signature[ 4 ]; /* The primary sequence number * Consists of 4 bytes */ uint8_t primary_sequence_number[ 4 ]; /* The secondary sequence number * Consists of 4 bytes */ uint8_t secondary_sequence_number[ 4 ]; /* The last modification date and time * Consists of 8 bytes * Contains a filetime */ uint8_t modification_time[ 8 ]; /* The major version * Consists of 4 bytes */ uint8_t major_version[ 4 ]; /* The minor version * Consists of 4 bytes */ uint8_t minor_version[ 4 ]; /* The file type * Consists of 4 bytes */ uint8_t file_type[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown3[ 4 ]; /* The root key offset * Consists of 4 bytes */ uint8_t root_key_offset[ 4 ]; /* The hive bins size * Consists of 4 bytes */ uint8_t hive_bins_size[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown4[ 4 ]; /* Unknown * Consists of 64 bytes */ uint8_t unknown5[ 64 ]; /* Unknown * Consists of 396 bytes */ uint8_t unknown6[ 396 ]; /* The XOR-32 checksum of the previous 508 bytes * Consists of 4 bytes */ uint8_t checksum[ 4 ]; }; #if defined( __cplusplus ) } #endif #endif /* !defined( _REGF_FILE_HEADER_H ) */ libevt-20170120/libregf/libregf_io_handle.c0000664000175000017500000003162713012271515022535 0ustar00lordyestalordyesta00000000000000/* * Input/Output (IO) handle * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libregf_checksum.h" #include "libregf_codepage.h" #include "libregf_data_type.h" #include "libregf_debug.h" #include "libregf_definitions.h" #include "libregf_hive_bin.h" #include "libregf_io_handle.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libcnotify.h" #include "libregf_libfdatetime.h" #include "libregf_unused.h" #include "regf_file_header.h" const char *regf_file_signature = "regf"; /* 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 libregf_io_handle_initialize( libregf_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libregf_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( libregf_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( libregf_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 = LIBREGF_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 libregf_io_handle_free( libregf_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libregf_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 an IO handle * Returns 1 if successful or -1 on error */ int libregf_io_handle_clear( libregf_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libregf_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( libregf_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 = LIBREGF_CODEPAGE_WINDOWS_1252; return( 1 ); } /* Reads the file header * Returns 1 if successful or -1 on error */ int libregf_io_handle_read_file_header( libregf_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t *root_key_offset, uint32_t *hive_bins_size, libcerror_error_t **error ) { regf_file_header_t file_header; static char *function = "libregf_io_handle_read_file_header"; ssize_t read_count = 0; uint32_t calculated_xor32_checksum = 0; uint32_t stored_xor32_checksum = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; #endif if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( root_key_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid root key offset.", function ); return( -1 ); } if( hive_bins_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins size.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading file header at offset: 0 (0x00000000)\n", function ); } #endif if( libbfio_handle_seek_offset( file_io_handle, 0, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek file header offset: 0.", function ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, (uint8_t *) &file_header, sizeof( regf_file_header_t ), error ); if( read_count != (ssize_t) sizeof( regf_file_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read file header data.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: file header:\n", function ); libcnotify_print_data( (uint8_t *) &file_header, sizeof( regf_file_header_t ), LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif if( memory_compare( file_header.signature, regf_file_signature, 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid file signature.", function ); return( -1 ); } if( libregf_checksum_calculate_little_endian_xor32( &calculated_xor32_checksum, (uint8_t *) &file_header, 508, 0, 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 ); } byte_stream_copy_to_uint32_little_endian( file_header.checksum, stored_xor32_checksum ); if( 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 ); } byte_stream_copy_to_uint32_little_endian( file_header.major_version, io_handle->major_version ); byte_stream_copy_to_uint32_little_endian( file_header.minor_version, io_handle->minor_version ); byte_stream_copy_to_uint32_little_endian( file_header.file_type, io_handle->file_type ); byte_stream_copy_to_uint32_little_endian( file_header.root_key_offset, *root_key_offset ); byte_stream_copy_to_uint32_little_endian( file_header.hive_bins_size, *hive_bins_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c%c%c\n", function, file_header.signature[ 0 ], file_header.signature[ 1 ], file_header.signature[ 2 ], file_header.signature[ 3 ] ); byte_stream_copy_to_uint32_little_endian( file_header.primary_sequence_number, value_32bit ); libcnotify_printf( "%s: primary sequence number\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( file_header.secondary_sequence_number, value_32bit ); libcnotify_printf( "%s: secondary sequence number\t\t: %" PRIu32 "\n", function, value_32bit ); if( libregf_debug_print_filetime_value( function, "modification time\t\t\t", file_header.modification_time, 8, LIBFDATETIME_ENDIAN_LITTLE, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print filetime value.", function ); return( -1 ); } libcnotify_printf( "%s: major version\t\t\t: %" PRIu32 "\n", function, io_handle->major_version ); libcnotify_printf( "%s: minor version\t\t\t: %" PRIu32 "\n", function, io_handle->minor_version ); libcnotify_printf( "%s: file type\t\t\t\t: %" PRIu32 "\n", function, io_handle->file_type ); byte_stream_copy_to_uint32_little_endian( file_header.unknown3, value_32bit ); libcnotify_printf( "%s: unknown3\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); libcnotify_printf( "%s: root key offset\t\t\t: 0x%08" PRIx32 "\n", function, *root_key_offset ); libcnotify_printf( "%s: hive bins size\t\t\t: %" PRIu32 " bytes\n", function, *hive_bins_size ); byte_stream_copy_to_uint32_little_endian( file_header.unknown4, value_32bit ); libcnotify_printf( "%s: unknown4\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); libcnotify_printf( "%s: unknown5:\n", function ); libcnotify_print_data( file_header.unknown5, 64, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); libcnotify_printf( "%s: unknown6:\n", function ); libcnotify_print_data( file_header.unknown6, 396, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); libcnotify_printf( "%s: checksum\t\t\t\t: 0x%08" PRIx32 "\n", function, stored_xor32_checksum ); libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Reads the segment data into the buffer * Callback function for the value item data stream * Returns the number of bytes read or -1 on error */ ssize_t libregf_io_handle_read_segment_data( intptr_t *data_handle LIBREGF_ATTRIBUTE_UNUSED, libbfio_handle_t *file_io_handle, int segment_index LIBREGF_ATTRIBUTE_UNUSED, int segment_file_index LIBREGF_ATTRIBUTE_UNUSED, uint8_t *segment_data, size_t segment_data_size, uint32_t segment_flags LIBREGF_ATTRIBUTE_UNUSED, uint8_t read_flags LIBREGF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { static char *function = "libregf_io_handle_read_segment_data"; ssize_t read_count = 0; LIBREGF_UNREFERENCED_PARAMETER( data_handle ) LIBREGF_UNREFERENCED_PARAMETER( segment_index ) LIBREGF_UNREFERENCED_PARAMETER( segment_file_index ) LIBREGF_UNREFERENCED_PARAMETER( segment_flags ) LIBREGF_UNREFERENCED_PARAMETER( read_flags ) read_count = libbfio_handle_read_buffer( file_io_handle, segment_data, segment_data_size, error ); if( read_count != (ssize_t) segment_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read segment data.", function ); return( -1 ); } return( read_count ); } /* Seeks a certain segment offset * Callback function for the value item data stream * Returns the offset or -1 on error */ off64_t libregf_io_handle_seek_segment_offset( intptr_t *data_handle LIBREGF_ATTRIBUTE_UNUSED, libbfio_handle_t *file_io_handle, int segment_index LIBREGF_ATTRIBUTE_UNUSED, int segment_file_index LIBREGF_ATTRIBUTE_UNUSED, off64_t segment_offset, libcerror_error_t **error ) { static char *function = "libregf_io_handle_seek_segment_offset"; LIBREGF_UNREFERENCED_PARAMETER( data_handle ) LIBREGF_UNREFERENCED_PARAMETER( segment_index ) LIBREGF_UNREFERENCED_PARAMETER( segment_file_index ) segment_offset = libbfio_handle_seek_offset( file_io_handle, segment_offset, SEEK_SET, error ); if( segment_offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to seek segment offset.", function ); return( -1 ); } return( segment_offset ); } libevt-20170120/libregf/libregf_key_tree.c0000664000175000017500000001571213012271515022417 0ustar00lordyestalordyesta00000000000000/* * Key tree functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libregf_definitions.h" #include "libregf_key_item.h" #include "libregf_key_tree.h" #include "libregf_libcerror.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" /* Retrieves the sub key values (key tree node and key item) for the specific UTF-8 formatted name * Returns 1 if successful, 0 if no such sub key item or -1 on error */ int libregf_key_tree_get_sub_key_values_by_utf8_name( libfdata_tree_node_t *key_tree_node, libbfio_handle_t *file_io_handle, libfcache_cache_t *key_cache, uint32_t name_hash, const uint8_t *utf8_string, size_t utf8_string_length, int ascii_codepage, libfdata_tree_node_t **key_tree_sub_node, libregf_key_item_t **sub_key_item, libcerror_error_t **error ) { static char *function = "libregf_key_tree_get_sub_key_values_by_utf8_name"; int number_of_sub_keys = 0; int result = 0; int sub_key_index = 0; if( key_tree_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key tree sub node.", function ); return( -1 ); } if( sub_key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub key item.", function ); return( -1 ); } if( libfdata_tree_node_get_number_of_sub_nodes( key_tree_node, (intptr_t *) file_io_handle, key_cache, &number_of_sub_keys, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub keys.", function ); return( -1 ); } for( sub_key_index = 0; sub_key_index < number_of_sub_keys; sub_key_index++ ) { if( libfdata_tree_node_get_sub_node_by_index( key_tree_node, (intptr_t *) file_io_handle, key_cache, sub_key_index, key_tree_sub_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key tree sub node: %d.", function, sub_key_index ); return( -1 ); } if( libfdata_tree_node_get_node_value( *key_tree_sub_node, (intptr_t *) file_io_handle, key_cache, (intptr_t **) sub_key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key item.", function ); return( -1 ); } result = libregf_key_item_compare_name_with_utf8_string( *sub_key_item, name_hash, utf8_string, utf8_string_length, ascii_codepage, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare sub key name with UTF-8 string.", function ); return( -1 ); } else if( result != 0 ) { break; } } if( sub_key_index >= number_of_sub_keys ) { return( 0 ); } return( 1 ); } /* Retrieves the sub key values (key tree node and key item) for the specific UTF-16 formatted name * Returns 1 if successful, 0 if no such sub key item or -1 on error */ int libregf_key_tree_get_sub_key_values_by_utf16_name( libfdata_tree_node_t *key_tree_node, libbfio_handle_t *file_io_handle, libfcache_cache_t *key_cache, uint32_t name_hash, const uint16_t *utf16_string, size_t utf16_string_length, int ascii_codepage, libfdata_tree_node_t **key_tree_sub_node, libregf_key_item_t **sub_key_item, libcerror_error_t **error ) { static char *function = "libregf_key_tree_get_sub_key_values_by_utf16_name"; int number_of_sub_keys = 0; int result = 0; int sub_key_index = 0; if( key_tree_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key tree sub node.", function ); return( -1 ); } if( sub_key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub key item.", function ); return( -1 ); } if( libfdata_tree_node_get_number_of_sub_nodes( key_tree_node, (intptr_t *) file_io_handle, key_cache, &number_of_sub_keys, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub keys.", function ); return( -1 ); } for( sub_key_index = 0; sub_key_index < number_of_sub_keys; sub_key_index++ ) { if( libfdata_tree_node_get_sub_node_by_index( key_tree_node, (intptr_t *) file_io_handle, key_cache, sub_key_index, key_tree_sub_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key tree sub node: %d.", function, sub_key_index ); return( -1 ); } if( libfdata_tree_node_get_node_value( *key_tree_sub_node, (intptr_t *) file_io_handle, key_cache, (intptr_t **) sub_key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key item.", function ); return( -1 ); } result = libregf_key_item_compare_name_with_utf16_string( *sub_key_item, name_hash, utf16_string, utf16_string_length, ascii_codepage, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare sub key name with UTF-16 string.", function ); return( -1 ); } else if( result != 0 ) { break; } } if( sub_key_index >= number_of_sub_keys ) { return( 0 ); } return( 1 ); } libevt-20170120/libregf/libregf_error.c0000664000175000017500000000552213012271515021737 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libregf_error.h" #include "libregf_libcerror.h" #if !defined( HAVE_LOCAL_LIBREGF ) /* Free an error and its elements */ void libregf_error_free( libregf_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 libregf_error_fprint( libregf_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 libregf_error_sprint( libregf_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 libregf_error_backtrace_fprint( libregf_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 libregf_error_backtrace_sprint( libregf_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_LIBREGF ) */ libevt-20170120/libregf/libregf_extern.h0000664000175000017500000000245613012271515022123 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_INTERNAL_EXTERN_H ) #define _LIBREGF_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBREGF for local use of libregf */ #if !defined( HAVE_LOCAL_LIBREGF ) /* If libtool DLL support is enabled set LIBREGF_DLL_EXPORT * before including libregf/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBREGF_DLL_EXPORT #endif #include #else #define LIBREGF_EXTERN extern #endif #endif /* !defined( _LIBREGF_INTERNAL_EXTERN_H ) */ libevt-20170120/libregf/libregf_value_type.c0000664000175000017500000002736313012271515022772 0ustar00lordyestalordyesta00000000000000/* * Values type functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libregf_definitions.h" #include "libregf_libcerror.h" #include "libregf_libcnotify.h" #include "libregf_libuna.h" #include "libregf_value_type.h" /* Converts the value data into a 32-bit value * Returns 1 if successful or -1 on error */ int libregf_value_type_copy_to_32bit( uint8_t *value_data, size_t value_data_size, uint8_t byte_order, uint32_t *value_32bit, libcerror_error_t **error ) { static char *function = "libregf_value_type_copy_to_32bit"; if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( value_32bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value 32-bit.", function ); return( -1 ); } /* The value data size of a 32-bit value is 4 */ if( value_data_size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value data size value out of bounds.", function ); return( -1 ); } if( ( byte_order != LIBREGF_ENDIAN_BIG ) && ( byte_order != LIBREGF_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order: 0x%02" PRIx8 ".", function, byte_order ); return( -1 ); } if( byte_order == LIBREGF_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 ); } return( 1 ); } /* Converts the value data into a 64-bit value * Returns 1 if successful or -1 on error */ int libregf_value_type_copy_to_64bit( uint8_t *value_data, size_t value_data_size, uint8_t byte_order, uint64_t *value_64bit, libcerror_error_t **error ) { static char *function = "libregf_value_type_copy_to_64bit"; if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( value_64bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value 64-bit.", function ); return( -1 ); } /* The value data size of a 64-bit value is 8 */ if( value_data_size != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value data size value out of bounds.", function ); return( -1 ); } if( ( byte_order != LIBREGF_ENDIAN_BIG ) && ( byte_order != LIBREGF_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order: 0x%02" PRIx8 ".", function, byte_order ); return( -1 ); } if( byte_order == LIBREGF_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 ); } return( 1 ); } /* Determines the UTF-8 string size from the value data * Returns 1 if successful or -1 on error */ int libregf_value_type_get_utf8_string_size( uint8_t *value_data, size_t value_data_size, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libregf_value_type_get_utf8_string_size"; if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } /* Internally an empty string is represented by a NULL reference */ if( value_data == NULL ) { *utf8_string_size = 0; } else { if( libuna_utf8_string_size_from_utf16_stream( value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 string size.", function ); return( -1 ); } } return( 1 ); } /* Converts the value data into a UTF-8 string * Returns 1 if successful or -1 on error */ int libregf_value_type_copy_to_utf8_string( uint8_t *value_data, size_t value_data_size, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libregf_value_type_copy_to_utf8_string"; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid UTF-8 string 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: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } /* Internally an empty string is represented by a NULL reference */ if( value_data == NULL ) { utf8_string[ 0 ] = 0; } else { if( libuna_utf8_string_copy_from_utf16_stream( utf8_string, utf8_string_size, value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-8 string.", function ); return( -1 ); } } return( 1 ); } /* Determines the UTF-16 string size from the value data * Returns 1 if successful or -1 on error */ int libregf_value_type_get_utf16_string_size( uint8_t *value_data, size_t value_data_size, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libregf_value_type_get_utf16_string_size"; if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } /* Internally an empty string is represented by a NULL reference */ if( value_data == NULL ) { *utf16_string_size = 0; } else { if( libuna_utf16_string_size_from_utf16_stream( value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 string size.", function ); return( -1 ); } } return( 1 ); } /* Converts the value data into a UTF-16 string * Returns 1 if successful or -1 on error */ int libregf_value_type_copy_to_utf16_string( uint8_t *value_data, size_t value_data_size, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libregf_value_type_copy_to_utf16_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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid UTF-16 string size.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } /* Internally an empty string is represented by a NULL reference */ if( value_data == NULL ) { utf16_string[ 0 ] = 0; } else { if( libuna_utf16_string_copy_from_utf16_stream( utf16_string, utf16_string_size, value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-16 string.", function ); return( -1 ); } } return( 1 ); } /* Determines the binary data size from the value data * Returns 1 if successful or -1 on error */ int libregf_value_type_get_binary_data_size( uint8_t *value_data, size_t value_data_size, size_t *binary_data_size, libcerror_error_t **error ) { static char *function = "libregf_value_type_get_binary_data_size"; if( binary_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary data size.", function ); return( -1 ); } /* Internally an empty binary data is represented by a NULL reference */ if( value_data == NULL ) { *binary_data_size = 0; } else { *binary_data_size = value_data_size; } return( 1 ); } /* Converts the value data into binary data * Returns 1 if successful or -1 on error */ int libregf_value_type_copy_to_binary_data( uint8_t *value_data, size_t value_data_size, uint8_t *binary_data, size_t binary_data_size, libcerror_error_t **error ) { static char *function = "libregf_value_type_copy_to_binary_data"; if( binary_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary data.", function ); return( -1 ); } if( binary_data_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid binary data size.", function ); return( -1 ); } if( binary_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid binary data size value exceeds maximum.", function ); return( -1 ); } /* Internally empty binary data is represented by a NULL reference */ if( value_data != NULL ) { if( binary_data_size < value_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: binary data is too small.", function ); return( -1 ); } if( memory_copy( binary_data, value_data, value_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set binary data.", function ); return( -1 ); } } return( 1 ); } libevt-20170120/libregf/libregf_hive_bin_cell.c0000664000175000017500000000606313012271515023371 0ustar00lordyestalordyesta00000000000000/* * Hive bin cell functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libregf_hive_bin_cell.h" #include "libregf_libcerror.h" /* Creates a hive bin cell * Make sure the value hive_bin_cell is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libregf_hive_bin_cell_initialize( libregf_hive_bin_cell_t **hive_bin_cell, libcerror_error_t **error ) { static char *function = "libregf_hive_bin_cell_initialize"; if( hive_bin_cell == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bin cell.", function ); return( -1 ); } if( *hive_bin_cell != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid hive bin cell value already set.", function ); return( -1 ); } *hive_bin_cell = memory_allocate_structure( libregf_hive_bin_cell_t ); if( *hive_bin_cell == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create hive bin cell.", function ); goto on_error; } if( memory_set( *hive_bin_cell, 0, sizeof( libregf_hive_bin_cell_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear hive bin cell.", function ); goto on_error; } return( 1 ); on_error: if( *hive_bin_cell != NULL ) { memory_free( *hive_bin_cell ); *hive_bin_cell = NULL; } return( -1 ); } /* Frees a hive bin cell * Returns 1 if successful or -1 on error */ int libregf_hive_bin_cell_free( libregf_hive_bin_cell_t **hive_bin_cell, libcerror_error_t **error ) { static char *function = "libregf_hive_bin_cell_free"; if( hive_bin_cell == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bin cell.", function ); return( -1 ); } if( *hive_bin_cell != NULL ) { /* The hive bin cell data is referenced * and maintained by the hive bin */ memory_free( *hive_bin_cell ); *hive_bin_cell = NULL; } return( 1 ); } libevt-20170120/libregf/libregf_debug.c0000664000175000017500000002524513012271515021700 0ustar00lordyestalordyesta00000000000000/* * Debug functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include "libregf_debug.h" #include "libregf_definitions.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libcnotify.h" #include "libregf_libfdatetime.h" #include "libregf_libuna.h" #if defined( HAVE_DEBUG_OUTPUT ) /* Prints the named key flags * Returns 1 if successful or -1 on error */ void libregf_debug_print_named_key_flags( uint16_t named_key_flags ) { if( ( named_key_flags & 0x0001 ) != 0 ) { libcnotify_printf( "\tIs volatile\n" ); } if( ( named_key_flags & 0x0002 ) != 0 ) { libcnotify_printf( "\tIs mount point\n" ); } if( ( named_key_flags & 0x0004 ) != 0 ) { libcnotify_printf( "\tIs root key\n" ); } if( ( named_key_flags & 0x0008 ) != 0 ) { libcnotify_printf( "\tCannot be deleted\n" ); } if( ( named_key_flags & 0x0010 ) != 0 ) { libcnotify_printf( "\tIs symbolic link key\n" ); } if( ( named_key_flags & LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { libcnotify_printf( "\tKey name is an ASCII string\n" ); } if( ( named_key_flags & 0x0040 ) != 0 ) { libcnotify_printf( "\tIs predefined handle\n" ); } libcnotify_printf( "\n" ); } /* Prints the value key flags * Returns 1 if successful or -1 on error */ void libregf_debug_print_value_key_flags( uint16_t value_key_flags ) { if( ( value_key_flags & LIBREGF_VALUE_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { libcnotify_printf( "\tValue name is an ASCII string (VALUE_COMP_NAME)\n" ); } libcnotify_printf( "\n" ); } /* Prints a FILETIME value * Returns 1 if successful or -1 on error */ int libregf_debug_print_filetime_value( const char *function_name, const char *value_name, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, uint32_t string_format_flags, libcerror_error_t **error ) { char date_time_string[ 32 ]; libfdatetime_filetime_t *filetime = NULL; static char *function = "libregf_debug_print_filetime_value"; 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, byte_stream, byte_stream_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( libfdatetime_filetime_copy_to_utf8_string( filetime, (uint8_t *) date_time_string, 32, string_format_flags, error ) != 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; } libcnotify_printf( "%s: %s: %s UTC\n", function_name, value_name, date_time_string ); 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; } return( 1 ); on_error: if( filetime != NULL ) { libfdatetime_filetime_free( &filetime, NULL ); } return( -1 ); } /* Prints a string value * Returns 1 if successful or -1 on error */ int libregf_debug_print_string_value( const char *function_name, const char *value_name, const uint8_t *byte_stream, size_t byte_stream_size, int ascii_codepage, libcerror_error_t **error ) { system_character_t *string = NULL; static char *function = "libregf_debug_print_string_value"; size_t string_size = 0; int result = 0; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_byte_stream( byte_stream, byte_stream_size, ascii_codepage, &string_size, error ); #else result = libuna_utf8_string_size_from_byte_stream( byte_stream, byte_stream_size, ascii_codepage, &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 string.", function ); goto on_error; } if( ( string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string size value exceeds maximum.", function ); goto on_error; } string = system_string_allocate( string_size ); 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 defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) string, string_size, byte_stream, byte_stream_size, ascii_codepage, error ); #else result = libuna_utf8_string_copy_from_byte_stream( (libuna_utf8_character_t *) string, string_size, byte_stream, byte_stream_size, ascii_codepage, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); goto on_error; } libcnotify_printf( "%s: %s: %s\n", function_name, value_name, string ); memory_free( string ); return( 1 ); on_error: if( string != NULL ) { memory_free( string ); } return( -1 ); } /* Prints an UTF-16 string value * Returns 1 if successful or -1 on error */ int libregf_debug_print_utf16_string_value( const char *function_name, const char *value_name, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ) { system_character_t *string = NULL; static char *function = "libregf_debug_print_utf16_string_value"; size_t string_size = 0; int result = 0; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( byte_stream, byte_stream_size, byte_order, &string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( byte_stream, byte_stream_size, byte_order, &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 string.", function ); goto on_error; } if( ( string_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * string_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string size value exceeds maximum.", function ); goto on_error; } string = system_string_allocate( string_size ); 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 defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) string, string_size, byte_stream, byte_stream_size, byte_order, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) string, string_size, byte_stream, byte_stream_size, byte_order, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); goto on_error; } libcnotify_printf( "%s: %s: %s\n", function_name, value_name, string ); memory_free( string ); return( 1 ); on_error: if( string != NULL ) { memory_free( string ); } return( -1 ); } /* Prints the read offsets * Returns 1 if successful or -1 on error */ int libregf_debug_print_read_offsets( libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libregf_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 + 1 ) ); return( -1 ); } libcnotify_printf( "%08" PRIi64 " ( 0x%08" PRIx64 " ) - %08" PRIi64 " ( 0x%08" PRIx64 " ) size: %" PRIu64 "\n", offset, offset, offset + (off64_t) size, offset + (off64_t) size, size ); } libcnotify_printf( "\n" ); return( 1 ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ libevt-20170120/libregf/libregf_named_key.c0000664000175000017500000004434013012271515022543 0ustar00lordyestalordyesta00000000000000/* * Named key functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include #if defined( HAVE_WCTYPE_H ) #include #endif #include "libregf_debug.h" #include "libregf_definitions.h" #include "libregf_libcerror.h" #include "libregf_libcnotify.h" #include "libregf_libfdatetime.h" #include "libregf_libuna.h" #include "libregf_named_key.h" #include "libregf_unused.h" #include "regf_cell_values.h" /* Creates a named key * Make sure the value named_key is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libregf_named_key_initialize( libregf_named_key_t **named_key, libcerror_error_t **error ) { static char *function = "libregf_named_key_initialize"; if( named_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid named key.", function ); return( -1 ); } if( *named_key != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid named key value already set.", function ); return( -1 ); } *named_key = memory_allocate_structure( libregf_named_key_t ); if( *named_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create named key.", function ); goto on_error; } if( memory_set( *named_key, 0, sizeof( libregf_named_key_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear named key.", function ); goto on_error; } return( 1 ); on_error: if( *named_key != NULL ) { memory_free( *named_key ); *named_key = NULL; } return( -1 ); } /* Frees a named key * Returns 1 if successful or -1 on error */ int libregf_named_key_free( libregf_named_key_t **named_key, libcerror_error_t **error ) { static char *function = "libregf_named_key_free"; if( named_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid named key.", function ); return( -1 ); } if( *named_key != NULL ) { if( ( *named_key )->name != NULL ) { memory_free( ( *named_key )->name ); } memory_free( *named_key ); *named_key = NULL; } return( 1 ); } /* Reads a named key * Returns 1 if successful or -1 on error */ int libregf_named_key_read( libregf_named_key_t *named_key, const uint8_t *data, size_t data_size, uint32_t named_key_hash LIBREGF_ATTRIBUTE_UNUSED, int ascii_codepage LIBREGF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { static char *function = "libregf_named_key_read"; libuna_unicode_character_t unicode_character = 0; size_t data_offset = 0; size_t name_index = 0; uint32_t class_name_offset = 0; uint32_t number_of_sub_keys = 0; uint32_t number_of_values_list_elements = 0; uint32_t security_key_offset = 0; uint32_t sub_keys_list_offset = 0; uint32_t values_list_offset = 0; uint16_t class_name_size = 0; int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t filetime_string[ 32 ]; system_character_t *value_string = NULL; libfdatetime_filetime_t *filetime = NULL; size_t value_string_size = 0; uint32_t value_32bit = 0; #endif LIBREGF_UNREFERENCED_PARAMETER( named_key_hash ) LIBREGF_UNREFERENCED_PARAMETER( ascii_codepage ) if( named_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid named 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 < sizeof( regf_named_key_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_ARGUMENTS, LIBCERROR_ARGUMENT_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: named key data:\n", function ); libcnotify_print_data( data, data_size, 0 ); } #endif /* Check if the cell signature matches that of a named key: "nk" */ if( ( data[ 0 ] != (uint8_t) 'n' ) || ( data[ 1 ] != (uint8_t) 'k' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported named key signature.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( ( (regf_named_key_t *) data )->flags, named_key->flags ); byte_stream_copy_to_uint64_little_endian( ( (regf_named_key_t *) data )->last_written_time, named_key->last_written_time ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->number_of_sub_keys, number_of_sub_keys ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->sub_keys_list_offset, sub_keys_list_offset ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->number_of_values, number_of_values_list_elements ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->values_list_offset, values_list_offset ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->security_key_offset, security_key_offset ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->class_name_offset, class_name_offset ); byte_stream_copy_to_uint16_little_endian( ( (regf_named_key_t *) data )->key_name_size, named_key->name_size ); byte_stream_copy_to_uint16_little_endian( ( (regf_named_key_t *) data )->class_name_size, class_name_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c\n", function, ( (regf_named_key_t *) data )->signature[ 0 ], ( (regf_named_key_t *) data )->signature[ 1 ] ); libcnotify_printf( "%s: flags\t\t\t\t\t: 0x%04" PRIx16 "\n", function, named_key->flags ); libregf_debug_print_named_key_flags( named_key->flags ); 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, named_key->last_written_time, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_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_SET_FAILED, "%s: unable to copy filetime to string.", function ); goto on_error; } libcnotify_printf( "%s: last written time\t\t\t: %" PRIs_SYSTEM " UTC\n", function, filetime_string ); 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; } byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->unknown1, value_32bit ); libcnotify_printf( "%s: unknown1\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->parent_key_offset, value_32bit ); libcnotify_printf( "%s: parent key offset\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: number of sub keys\t\t\t: %" PRIu32 "\n", function, number_of_sub_keys ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->number_of_volatile_sub_keys, value_32bit ); libcnotify_printf( "%s: number of volatile sub keys\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "%s: sub keys list offset\t\t\t: 0x%08" PRIx32 "\n", function, sub_keys_list_offset ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->volatile_sub_keys_list_offset, value_32bit ); libcnotify_printf( "%s: volatile sub keys list offset\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: number of values\t\t\t: %" PRIu32 "\n", function, number_of_values_list_elements ); libcnotify_printf( "%s: values list offset\t\t\t: 0x%08" PRIx32 "\n", function, values_list_offset ); libcnotify_printf( "%s: security key offset\t\t\t: 0x%08" PRIx32 "\n", function, security_key_offset ); libcnotify_printf( "%s: class name offset\t\t\t: 0x%08" PRIx32 "\n", function, class_name_offset ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->largest_sub_key_name_size, value_32bit ); libcnotify_printf( "%s: largest sub key name size\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->largest_sub_key_class_name_size, value_32bit ); libcnotify_printf( "%s: largest sub key class name size\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->largest_value_name_size, value_32bit ); libcnotify_printf( "%s: largest value name size\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->largest_value_data_size, value_32bit ); libcnotify_printf( "%s: largest value data size\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (regf_named_key_t *) data )->unknown6, value_32bit ); libcnotify_printf( "%s: unknown6\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); libcnotify_printf( "%s: key name size\t\t\t\t: %" PRIu16 "\n", function, named_key->name_size ); libcnotify_printf( "%s: class name size\t\t\t: %" PRIu16 "\n", function, class_name_size ); } #endif data_offset = sizeof( regf_named_key_t ); if( named_key->name_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid key name size.", function ); goto on_error; } named_key->name = (uint8_t *) memory_allocate( sizeof( uint8_t ) * (size_t) named_key->name_size ); if( named_key->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create key name.", function ); goto on_error; } if( memory_copy( named_key->name, &( data[ data_offset ] ), (size_t) named_key->name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy key name.", function ); goto on_error; } named_key->name_hash = 0; while( name_index < (size_t) named_key->name_size ) { if( ( named_key->flags & LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_unicode_character_copy_from_byte_stream( &unicode_character, named_key->name, (size_t) named_key->name_size, &name_index, ascii_codepage, error ); } else { result = libuna_unicode_character_copy_from_utf16_stream( &unicode_character, named_key->name, (size_t) named_key->name_size, &name_index, LIBUNA_ENDIAN_LITTLE, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy key name to Unicode character.", function ); goto on_error; } named_key->name_hash *= 37; named_key->name_hash += (uint32_t) towupper( (wint_t) unicode_character ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( named_key->flags & LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_byte_stream( named_key->name, (size_t) named_key->name_size, ascii_codepage, &value_string_size, error ); #else result = libuna_utf8_string_size_from_byte_stream( named_key->name, (size_t) named_key->name_size, ascii_codepage, &value_string_size, error ); #endif } else { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( named_key->name, (size_t) named_key->name_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( named_key->name, (size_t) named_key->name_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 retrieve key name 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 key name string.", function ); goto on_error; } if( ( named_key->flags & LIBREGF_NAMED_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) value_string, value_string_size, named_key->name, (size_t) named_key->name_size, ascii_codepage, error ); #else result = libuna_utf8_string_copy_from_byte_stream( (libuna_utf8_character_t *) value_string, value_string_size, named_key->name, (size_t) named_key->name_size, ascii_codepage, error ); #endif } else { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, named_key->name, (size_t) named_key->name_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, named_key->name, (size_t) named_key->name_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 key name string.", function ); goto on_error; } libcnotify_printf( "%s: key name\t\t\t\t: %" PRIs_SYSTEM "\n", function, value_string ); libcnotify_printf( "%s: key name hash\t\t\t\t: 0x%08" PRIx32 "\n", function, named_key->name_hash ); memory_free( value_string ); value_string = NULL; } #endif data_offset += named_key->name_size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( named_key_hash != 0 ) && ( named_key_hash != named_key->name_hash ) ) { libcnotify_printf( "%s: mismatch in name hash ( 0x%08" PRIx32 " != 0x%08" PRIx32 " ).\n", function, named_key_hash, named_key->name_hash ); } if( data_offset < data_size ) { libcnotify_printf( "%s: padding:\n", function ); libcnotify_print_data( &( data[ data_offset ] ), data_size - data_offset, 0 ); } else { libcnotify_printf( "\n" ); } } #endif return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( filetime != NULL ) { libfdatetime_filetime_free( &filetime, NULL ); } if( value_string != NULL ) { memory_free( value_string ); } #endif if( named_key->name != NULL ) { memory_free( named_key->name ); named_key->name = NULL; } named_key->name_size = 0; return( -1 ); } libevt-20170120/libregf/libregf_support.h0000664000175000017500000000373213012271515022330 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_SUPPORT_H ) #define _LIBREGF_SUPPORT_H #include #include #include "libregf_extern.h" #include "libregf_libcerror.h" #include "libregf_libbfio.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBREGF ) LIBREGF_EXTERN \ const char *libregf_get_version( void ); LIBREGF_EXTERN \ int libregf_get_access_flags_read( void ); LIBREGF_EXTERN \ int libregf_get_codepage( int *codepage, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_set_codepage( int codepage, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBREGF ) */ LIBREGF_EXTERN \ int libregf_check_file_signature( const char *filename, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBREGF_EXTERN \ int libregf_check_file_signature_wide( const wchar_t *filename, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ LIBREGF_EXTERN \ int libregf_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_SUPPORT_H ) */ libevt-20170120/libregf/libregf_value_item.c0000664000175000017500000014152413012271515022743 0ustar00lordyestalordyesta00000000000000/* * Value item functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_WCTYPE_H ) #include #endif #include "libregf_data_type.h" #include "libregf_debug.h" #include "libregf_definitions.h" #include "libregf_hive_bin.h" #include "libregf_hive_bin_cell.h" #include "libregf_hive_bins_list.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libcnotify.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #include "libregf_libuna.h" #include "libregf_unused.h" #include "libregf_value_item.h" #include "regf_cell_values.h" /* Creates value item * Make sure the value value_item is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libregf_value_item_initialize( libregf_value_item_t **value_item, libcerror_error_t **error ) { static char *function = "libregf_value_item_initialize"; if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value item.", function ); return( -1 ); } if( *value_item != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid value item value already set.", function ); return( -1 ); } *value_item = memory_allocate_structure( libregf_value_item_t ); if( *value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value item.", function ); goto on_error; } if( memory_set( *value_item, 0, sizeof( libregf_value_item_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear value item.", function ); goto on_error; } return( 1 ); on_error: if( *value_item != NULL ) { memory_free( *value_item ); *value_item = NULL; } return( -1 ); } /* Frees value item * Returns 1 if successful or -1 on error */ int libregf_value_item_free( libregf_value_item_t **value_item, libcerror_error_t **error ) { static char *function = "libregf_value_item_free"; int result = 1; if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value item.", function ); return( -1 ); } if( *value_item != NULL ) { if( ( *value_item )->name != NULL ) { memory_free( ( *value_item )->name ); } if( ( *value_item )->data_buffer != NULL ) { memory_free( ( *value_item )->data_buffer ); } if( ( *value_item )->data_stream != NULL ) { if( libfdata_stream_free( &( ( *value_item )->data_stream ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data stream.", function ); result = -1; } } memory_free( *value_item ); *value_item = NULL; } return( result ); } /* Retrieves the data size * Returns 1 if successful or -1 on error */ int libregf_value_item_get_data_size( libregf_value_item_t *value_item, size_t *data_size, libcerror_error_t **error ) { static char *function = "libregf_value_item_get_data_size"; size64_t stream_data_size = 0; if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value item.", function ); return( -1 ); } if( ( value_item->data_type != LIBREGF_VALUE_ITEM_DATA_TYPE_BUFFER ) && ( value_item->data_type != LIBREGF_VALUE_ITEM_DATA_TYPE_BLOCK ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value item data type: 0x%02" PRIx8 ".", function, value_item->data_type ); 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( ( value_item->data_type == LIBREGF_VALUE_ITEM_DATA_TYPE_BLOCK ) && ( value_item->data_buffer == NULL ) ) { if( libfdata_stream_get_size( value_item->data_stream, &stream_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size from data stream.", function ); return( -1 ); } if( stream_data_size > (size64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid stream data size value out of bounds.", function ); return( -1 ); } *data_size = (size_t) stream_data_size; } else { *data_size = value_item->data_buffer_size; } return( 1 ); } /* Retrieves the data * Returns 1 if successful or -1 on error */ int libregf_value_item_get_data( libregf_value_item_t *value_item, libbfio_handle_t *file_io_handle, uint8_t **data, size_t *data_size, libcerror_error_t **error ) { static char *function = "libregf_value_item_get_data"; size64_t stream_data_size = 0; ssize_t read_count = 0; if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value item.", function ); return( -1 ); } if( ( value_item->data_type != LIBREGF_VALUE_ITEM_DATA_TYPE_BUFFER ) && ( value_item->data_type != LIBREGF_VALUE_ITEM_DATA_TYPE_BLOCK ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value item data type: 0x%02" PRIx8 ".", function, value_item->data_type ); 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( ( value_item->data_type == LIBREGF_VALUE_ITEM_DATA_TYPE_BLOCK ) && ( value_item->data_buffer == NULL ) ) { if( libfdata_stream_get_size( value_item->data_stream, &stream_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size from data stream.", function ); goto on_error; } if( stream_data_size > (size64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid stream data size value out of bounds.", function ); goto on_error; } /* Cache the whole stream this should not happen very often "normal" files */ value_item->data_buffer = (uint8_t *) memory_allocate( sizeof( uint8_t ) * (size_t) stream_data_size ); if( value_item->data_buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data buffer.", function ); goto on_error; } value_item->data_buffer_size = (size_t) stream_data_size; if( libfdata_stream_seek_offset( value_item->data_stream, 0, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek start of data stream.", function ); goto on_error; } read_count = libfdata_stream_read_buffer( value_item->data_stream, (intptr_t *) file_io_handle, value_item->data_buffer, value_item->data_buffer_size, 0, error ); if( read_count != (ssize_t) value_item->data_buffer_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data from data stream.", function ); goto on_error; } } *data = value_item->data_buffer; *data_size = value_item->data_buffer_size; return( 1 ); on_error: if( value_item->data_buffer != NULL ) { memory_free( value_item->data_buffer ); value_item->data_buffer = NULL; } value_item->data_buffer_size = 0; return( -1 ); } /* Reads a value key * Returns 1 if successful or -1 on error */ int libregf_value_item_read_value_key( libregf_value_item_t *value_item, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, uint32_t value_key_offset, libcerror_error_t **error ) { libregf_hive_bin_t *hive_bin = NULL; libregf_hive_bin_cell_t *hive_bin_cell = NULL; uint8_t *data_offset_data = NULL; uint8_t *hive_bin_cell_data = NULL; static char *function = "libregf_value_item_read_value_key"; libuna_unicode_character_t unicode_character = 0; off64_t hive_bin_data_offset = 0; size_t hive_bin_cell_size = 0; size_t name_index = 0; uint32_t data_offset = 0; uint32_t data_size = 0; int hive_bin_index = 0; int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint16_t value_16bit = 0; #endif if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value item.", function ); return( -1 ); } if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } if( ( value_key_offset == 0 ) || ( value_key_offset == 0xffffffffUL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid value key offset.", function ); return( -1 ); } if( libfdata_list_get_element_value_at_offset( hive_bins_list->data_list, (intptr_t *) file_io_handle, hive_bins_list->data_cache, (off64_t) value_key_offset, &hive_bin_index, &hive_bin_data_offset, (intptr_t **) &hive_bin, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin at offset: %" PRIu32 ".", function, value_key_offset ); goto on_error; } if( libregf_hive_bin_get_cell_at_offset( hive_bin, value_key_offset, &hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin cell at offset: %" PRIu32 ".", function, value_key_offset ); goto on_error; } hive_bin_cell_data = hive_bin_cell->data; hive_bin_cell_size = hive_bin_cell->size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif if( hive_bin_cell_size < sizeof( regf_value_key_t ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: invalid hive bin cell size value too small.", function ); } #endif value_item->item_flags |= LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED; return( 1 ); } /* Check if the cell signature matches that of a value key: "vk" */ if( ( hive_bin_cell_data[ 0 ] != (uint8_t) 'v' ) || ( hive_bin_cell_data[ 1 ] != (uint8_t) 'k' ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unsupported value key signature.", function ); } #endif value_item->item_flags |= LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED; return( 1 ); } byte_stream_copy_to_uint16_little_endian( ( (regf_value_key_t *) hive_bin_cell_data )->value_name_size, value_item->name_size ); byte_stream_copy_to_uint32_little_endian( ( (regf_value_key_t *) hive_bin_cell_data )->data_size, data_size ); byte_stream_copy_to_uint32_little_endian( ( (regf_value_key_t *) hive_bin_cell_data )->data_offset, data_offset ); byte_stream_copy_to_uint32_little_endian( ( (regf_value_key_t *) hive_bin_cell_data )->data_type, value_item->type ); byte_stream_copy_to_uint16_little_endian( ( (regf_value_key_t *) hive_bin_cell_data )->flags, value_item->flags ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c\n", function, ( (regf_value_key_t *) hive_bin_cell_data )->signature[ 0 ], ( (regf_value_key_t *) hive_bin_cell_data )->signature[ 1 ] ); libcnotify_printf( "%s: value name size\t\t\t: %" PRIu16 "\n", function, value_item->name_size ); libcnotify_printf( "%s: data size\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, data_size, data_size & 0x5fffffffUL ); libcnotify_printf( "%s: data offset\t\t\t\t: 0x%08" PRIx32 "\n", function, data_offset ); libcnotify_printf( "%s: data type\t\t\t\t: 0x%08" PRIx32 " (%s) %s\n", function, value_item->type, libregf_data_type_get_identifier( value_item->type ), libregf_data_type_get_description( value_item->type ) ); libcnotify_printf( "%s: flags\t\t\t\t: 0x%04" PRIx16 "\n", function, value_item->flags ); libregf_debug_print_value_key_flags( value_item->flags ); byte_stream_copy_to_uint16_little_endian( ( (regf_value_key_t *) hive_bin_cell_data )->unknown1, value_16bit ); libcnotify_printf( "%s: unknown1\t\t\t\t: 0x%04" PRIx16 " (%" PRIu16 ")\n", function, value_16bit, value_16bit ); } #endif data_offset_data = ( (regf_value_key_t *) hive_bin_cell_data )->data_offset; hive_bin_cell_data += sizeof( regf_value_key_t ); hive_bin_cell_size -= sizeof( regf_value_key_t ); value_item->name_hash = 0; if( value_item->name_size > 0 ) { if( value_item->name_size > hive_bin_cell_size ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: invalid value name size value out of bounds.", function ); } #endif value_item->item_flags |= LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED; return( 1 ); } value_item->name = (uint8_t *) memory_allocate( sizeof( uint8_t ) * (size_t) value_item->name_size ); if( value_item->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value name.", function ); goto on_error; } if( memory_copy( value_item->name, hive_bin_cell_data, (size_t) value_item->name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy value name.", function ); goto on_error; } while( name_index < (size_t) value_item->name_size ) { if( ( value_item->flags & LIBREGF_VALUE_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_unicode_character_copy_from_byte_stream( &unicode_character, value_item->name, (size_t) value_item->name_size, &name_index, hive_bins_list->io_handle->ascii_codepage, error ); } else { result = libuna_unicode_character_copy_from_utf16_stream( &unicode_character, value_item->name, (size_t) value_item->name_size, &name_index, LIBUNA_ENDIAN_LITTLE, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value name to Unicode character.", function ); goto on_error; } value_item->name_hash *= 37; value_item->name_hash += (uint32_t) towupper( (wint_t) unicode_character ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( value_item->flags & LIBREGF_VALUE_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { if( libregf_debug_print_string_value( function, "value name\t\t\t\t", value_item->name, (size_t) value_item->name_size, hive_bins_list->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print string value.", function ); goto on_error; } } else { if( libregf_debug_print_utf16_string_value( function, "value name\t\t\t\t", value_item->name, (size_t) value_item->name_size, LIBUNA_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print UTF-16 string value.", function ); goto on_error; } } libcnotify_printf( "%s: value name hash\t\t\t: 0x%08" PRIx32 "\n", function, value_item->name_hash ); } hive_bin_cell_data += value_item->name_size; hive_bin_cell_size -= value_item->name_size; #endif } #if defined( HAVE_DEBUG_OUTPUT ) else if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value name\t\t\t\t: (default)\n", function ); libcnotify_printf( "%s: value name hash\t\t\t: 0x%08" PRIx32 "\n", function, value_item->name_hash ); } if( libcnotify_verbose != 0 ) { if( hive_bin_cell_size > 0 ) { libcnotify_printf( "%s: padding:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } else { libcnotify_printf( "\n" ); } } #endif /* Check if the value data is stored in the cell value */ if( ( data_size & 0x80000000UL ) != 0 ) { data_size &= 0x7fffffffUL; value_item->data_type = LIBREGF_VALUE_ITEM_DATA_TYPE_BUFFER; if( data_size > 4 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: invalid data size value out of bounds.", function ); } #endif value_item->item_flags |= LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED; return( 1 ); } else if( data_size > 0 ) { if( ( value_item->type == LIBREGF_VALUE_TYPE_STRING ) || ( value_item->type == LIBREGF_VALUE_TYPE_EXPANDABLE_STRING ) ) { if( ( data_size == 1 ) || ( data_size == 3 ) ) { data_size += 1; data_offset_data[ 4 - data_size ] = 0; } } value_item->data_buffer = (uint8_t *) memory_allocate( sizeof( uint8_t ) * data_size ); if( value_item->data_buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data buffer.", function ); goto on_error; } value_item->data_buffer_size = (size_t) data_size; if( memory_copy( value_item->data_buffer, &( data_offset_data[ 4 - data_size ] ), data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy data buffer.", function ); goto on_error; } } } else { result = libregf_hive_bins_list_get_index_at_offset( hive_bins_list, (off64_t) data_offset, &hive_bin_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if data offset is valid.", function ); goto on_error; } else if( result == 0 ) { value_item->item_flags |= LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED; } else if( libregf_value_item_read_value_data( value_item, file_io_handle, hive_bins_list, data_offset, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read value data at offset: %" PRIu32 ".", function, data_offset ); goto on_error; } } return( 1 ); on_error: if( value_item->data_buffer != NULL ) { memory_free( value_item->data_buffer ); value_item->data_buffer = NULL; } value_item->data_buffer_size = 0; if( value_item->name != NULL ) { memory_free( value_item->name ); value_item->name = NULL; } value_item->name_size = 0; return( -1 ); } /* Reads value data * Returns 1 if successful or -1 on error */ int libregf_value_item_read_value_data( libregf_value_item_t *value_item, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, uint32_t value_data_offset, uint32_t value_data_size, libcerror_error_t **error ) { libregf_hive_bin_t *hive_bin = NULL; libregf_hive_bin_cell_t *hive_bin_cell = NULL; uint8_t *hive_bin_cell_data = NULL; static char *function = "libregf_value_item_read_value_data"; off64_t hive_bin_data_offset = 0; size_t hive_bin_cell_size = 0; size_t utf16_string_size = 0; uint32_t calculated_value_data_size = 0; uint32_t data_block_list_offset = 0; uint16_t number_of_segments = 0; int hive_bin_index = 0; int result = 0; if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value item.", function ); return( -1 ); } if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } if( ( value_data_offset == 0 ) || ( value_data_offset == 0xffffffffUL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid value data offset.", function ); return( -1 ); } if( libfdata_list_get_element_value_at_offset( hive_bins_list->data_list, (intptr_t *) file_io_handle, hive_bins_list->data_cache, (off64_t) value_data_offset, &hive_bin_index, &hive_bin_data_offset, (intptr_t **) &hive_bin, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin at offset: %" PRIu32 ".", function, value_data_offset ); goto on_error; } if( libregf_hive_bin_get_cell_at_offset( hive_bin, value_data_offset, &hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin cell at offset: %" PRIu32 ".", function, value_data_offset ); goto on_error; } hive_bin_cell_data = hive_bin_cell->data; hive_bin_cell_size = hive_bin_cell->size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif /* As of version 1.5 large value data is stored in a data block */ if( ( value_data_size > 16344 ) && ( hive_bins_list->io_handle->major_version >= 1 ) && ( hive_bins_list->io_handle->minor_version >= 5 ) ) { /* Check if the cell signature matches that of a data block key: "db" */ if( ( hive_bin_cell_data[ 0 ] != (uint8_t) 'd' ) || ( hive_bin_cell_data[ 1 ] != (uint8_t) 'b' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported data block key signature.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( ( (regf_data_block_key_t *) hive_bin_cell_data )->number_of_segments, number_of_segments ); byte_stream_copy_to_uint32_little_endian( ( (regf_data_block_key_t *) hive_bin_cell_data )->data_block_list_offset, data_block_list_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t\t: %c%c\n", function, ( (regf_data_block_key_t *) hive_bin_cell_data )->signature[ 0 ], ( (regf_data_block_key_t *) hive_bin_cell_data )->signature[ 1 ] ); libcnotify_printf( "%s: number of segments\t\t\t\t: %" PRIu16 "\n", function, number_of_segments ); libcnotify_printf( "%s: data block list offset\t\t\t: 0x%08" PRIx32 "\n", function, data_block_list_offset ); } hive_bin_cell_data += sizeof( regf_data_block_key_t ); hive_bin_cell_size -= sizeof( regf_data_block_key_t ); #endif /* TODO: Check if stored number of segments matches the calculated */ result = libregf_hive_bins_list_get_index_at_offset( hive_bins_list, (off64_t) data_block_list_offset, &hive_bin_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if data block list offset is valid.", function ); goto on_error; } else if( result == 0 ) { value_item->item_flags |= LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED; } else if( libregf_value_item_read_data_block_list( value_item, file_io_handle, hive_bins_list, data_block_list_offset, number_of_segments, value_data_size, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data block list at offset: %" PRIu32 ".", function, data_block_list_offset ); goto on_error; } } else { if( value_data_size > hive_bin_cell_size ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data size: %" PRIu32 " exceeds hive bin cell size: %" PRIzd ".\n", function, value_data_size, hive_bin_cell_size ); } #endif value_item->item_flags |= LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED; if( hive_bin_cell_size > (size_t) UINT32_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid hive bin cell size value out of bounds.", function ); goto on_error; } value_data_size = (uint32_t) hive_bin_cell_size; } if( ( value_item->type == LIBREGF_VALUE_TYPE_STRING ) || ( value_item->type == LIBREGF_VALUE_TYPE_EXPANDABLE_STRING ) ) { calculated_value_data_size = 0; while( ( calculated_value_data_size + 2 ) <= (uint32_t) hive_bin_cell_size ) { if( ( hive_bin_cell_data[ calculated_value_data_size ] == 0 ) && ( hive_bin_cell_data[ calculated_value_data_size + 1 ] == 0 ) ) { calculated_value_data_size += 2; break; } calculated_value_data_size += 2; } if( calculated_value_data_size != value_data_size ) { /* Check if the calculated string is sane */ result = libuna_utf16_string_size_from_utf16_stream( hive_bin_cell_data, calculated_value_data_size, LIBUNA_ENDIAN_LITTLE, &utf16_string_size, NULL ); if( result != 1 ) { calculated_value_data_size = value_data_size; } } if( calculated_value_data_size != value_data_size ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in value data size (calculated: %" PRIu32 ", stored: %" PRIu32 ").\n", function, calculated_value_data_size, value_data_size ); } #endif value_data_size = calculated_value_data_size; } } /* TODO what about a maximum of 1 MiB ? */ value_item->data_type = LIBREGF_VALUE_ITEM_DATA_TYPE_BUFFER; if( value_data_size > 0 ) { value_item->data_buffer = (uint8_t *) memory_allocate( sizeof( uint8_t ) * (size_t) value_data_size ); if( value_item->data_buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data buffer.", function ); goto on_error; } value_item->data_buffer_size = (size_t) value_data_size; if( memory_copy( value_item->data_buffer, hive_bin_cell_data, value_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy data buffer.", function ); goto on_error; } } #if defined( HAVE_DEBUG_OUTPUT ) hive_bin_cell_data += value_data_size; hive_bin_cell_size -= value_data_size; #endif } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( hive_bin_cell_size > 0 ) { libcnotify_printf( "%s: padding:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } } #endif return( 1 ); on_error: if( value_item->data_buffer != NULL ) { memory_free( value_item->data_buffer ); value_item->data_buffer = NULL; } return( -1 ); } /* Reads a data block (segments) list cell value * Returns 1 if successful, 0 if not or -1 on error */ int libregf_value_item_read_data_block_list( libregf_value_item_t *value_item, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, uint32_t data_block_list_offset, uint16_t number_of_segments, uint32_t value_data_size, libcerror_error_t **error ) { libregf_hive_bin_t *hive_bin = NULL; libregf_hive_bin_cell_t *hive_bin_cell = NULL; uint8_t *hive_bin_cell_data = NULL; static char *function = "libregf_value_item_read_data_block_list"; off64_t hive_bin_data_offset = 0; size_t hive_bin_cell_size = 0; uint32_t calculated_value_data_size = 0; uint32_t element_offset = 0; uint32_t segment_offset = 0; uint32_t segment_size = 0; uint16_t element_iterator = 0; int hive_bin_index = 0; if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value item.", function ); return( -1 ); } if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } if( hive_bins_list->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid hive bins list - missing IO handle.", function ); return( -1 ); } if( ( data_block_list_offset == 0 ) || ( data_block_list_offset == 0xffffffffUL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid data block list offset.", function ); return( -1 ); } if( libfdata_list_get_element_value_at_offset( hive_bins_list->data_list, (intptr_t *) file_io_handle, hive_bins_list->data_cache, (off64_t) data_block_list_offset, &hive_bin_index, &hive_bin_data_offset, (intptr_t **) &hive_bin, 0, error ) != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to retrieve hive bin at offset: %" PRIu32 ".", function, data_block_list_offset ); } #endif value_item->item_flags |= LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED; return( 0 ); } if( libregf_hive_bin_get_cell_at_offset( hive_bin, data_block_list_offset, &hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin cell at offset: %" PRIu32 ".", function, data_block_list_offset ); goto on_error; } hive_bin_cell_data = hive_bin_cell->data; hive_bin_cell_size = hive_bin_cell->size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif if( hive_bin_cell_size < (size_t) ( number_of_segments * 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid cell size value too small to contain number of values.", function ); goto on_error; } value_item->data_type = LIBREGF_VALUE_ITEM_DATA_TYPE_BLOCK; if( libfdata_stream_initialize( &( value_item->data_stream ), NULL, NULL, NULL, NULL, (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libregf_io_handle_read_segment_data, NULL, (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libregf_io_handle_seek_segment_offset, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value data stream.", function ); goto on_error; } if( number_of_segments > 0 ) { if( libfdata_stream_resize( value_item->data_stream, (int) number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize value data stream.", function ); goto on_error; } for( element_iterator = 0; element_iterator < number_of_segments; element_iterator++ ) { byte_stream_copy_to_uint32_little_endian( &( hive_bin_cell_data[ element_iterator * 4 ] ), element_offset ); hive_bin_cell_size -= 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element: %03" PRIu16 " offset\t\t\t: 0x%08" PRIx32 "\n", function, element_iterator, element_offset ); } #endif /* Determine the size of the segment by retrieving the corresponding hive bin cell */ if( libfdata_list_get_element_value_at_offset( hive_bins_list->data_list, (intptr_t *) file_io_handle, hive_bins_list->data_cache, (off64_t) element_offset, &hive_bin_index, &hive_bin_data_offset, (intptr_t **) &hive_bin, 0, error ) != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to retrieve hive bin at offset: %" PRIu32 ".", function, element_offset ); } #endif value_item->item_flags |= LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED; /* TODO return partial stream or 0-byte the missing data ? */ libfdata_stream_free( &( value_item->data_stream ), NULL ); return( 0 ); } if( libregf_hive_bin_get_cell_at_offset( hive_bin, element_offset, &hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin cell at offset: %" PRIu32 ".", function, element_offset ); goto on_error; } segment_offset = (uint32_t) ( hive_bins_list->io_handle->hive_bins_list_offset + 4 + element_offset ); segment_size = hive_bin_cell->size - 4; if( ( calculated_value_data_size + segment_size ) > value_data_size ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in value data size (calculated: %" PRIu32 ", stored: %" PRIu32 ").\n", function, calculated_value_data_size + segment_size, value_data_size ); } #endif segment_size = value_data_size - calculated_value_data_size; } /* Point the stream directly to the data */ if( libfdata_stream_set_segment_by_index( value_item->data_stream, (int) element_iterator, 0, (off64_t) segment_offset, (size64_t) segment_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to set value data stream segment: %" PRIu16 ".", function, element_iterator ); goto on_error; } calculated_value_data_size += segment_size; /* Make sure hive_bin_cell_data points to a valid data */ if( libfdata_list_get_element_value_at_offset( hive_bins_list->data_list, (intptr_t *) file_io_handle, hive_bins_list->data_cache, (off64_t) data_block_list_offset, &hive_bin_index, &hive_bin_data_offset, (intptr_t **) &hive_bin, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin at offset: %" PRIu32 ".", function, data_block_list_offset ); goto on_error; } if( libregf_hive_bin_get_cell_at_offset( hive_bin, data_block_list_offset, &hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin cell at offset: %" PRIu32 ".", function, data_block_list_offset ); goto on_error; } hive_bin_cell_data = hive_bin_cell->data; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( hive_bin_cell_size > 0 ) { libcnotify_printf( "%s: padding:\n", function ); libcnotify_print_data( hive_bin_cell_data, hive_bin_cell_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } else { libcnotify_printf( "\n" ); } } #endif return( 1 ); on_error: if( value_item->data_stream != NULL ) { libfdata_stream_free( &( value_item->data_stream ), NULL ); } return( -1 ); } /* Reads a value * Returns 1 if successful or -1 on error */ int libregf_value_item_read_element_data( libregf_hive_bins_list_t *hive_bins_list, libbfio_handle_t *file_io_handle, libfdata_list_element_t *list_element, libfcache_cache_t *cache, int data_range_file_index LIBREGF_ATTRIBUTE_UNUSED, off64_t data_range_offset, size64_t data_range_size LIBREGF_ATTRIBUTE_UNUSED, uint32_t data_range_flags LIBREGF_ATTRIBUTE_UNUSED, uint8_t read_flags LIBREGF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libregf_value_item_t *value_item = NULL; static char *function = "libregf_value_item_read_element_data"; LIBREGF_UNREFERENCED_PARAMETER( data_range_file_index ) LIBREGF_UNREFERENCED_PARAMETER( data_range_size ) LIBREGF_UNREFERENCED_PARAMETER( data_range_flags ) LIBREGF_UNREFERENCED_PARAMETER( read_flags ) if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } if( hive_bins_list->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid hive bins list - missing IO handle.", function ); return( -1 ); } if( data_range_offset > (off64_t) UINT32_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data range offset value out of bounds.", function ); goto on_error; } if( libregf_value_item_initialize( &value_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value item.", function ); goto on_error; } if( libregf_value_item_read_value_key( value_item, file_io_handle, hive_bins_list, (uint32_t) data_range_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read value key at offset: %" PRIi64 ".", function, data_range_offset ); goto on_error; } if( ( value_item->item_flags & LIBREGF_VALUE_ITEM_FLAG_IS_CORRUPTED ) != 0 ) { hive_bins_list->io_handle->flags |= LIBREGF_IO_HANDLE_FLAG_IS_CORRUPTED; } if( libfdata_list_element_set_element_value( list_element, (intptr_t *) file_io_handle, cache, (intptr_t *) value_item, (int (*)(intptr_t **, libcerror_error_t **)) &libregf_value_item_free, LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value item as element value.", function ); goto on_error; } return( 1 ); on_error: if( value_item != NULL ) { libregf_value_item_free( &value_item, NULL ); } return( -1 ); } /* Compares the value name with UTF-8 string * Returns 1 if the names match, 0 if not or -1 on error */ int libregf_value_item_compare_name_with_utf8_string( libregf_value_item_t *value_item, uint32_t name_hash, const uint8_t *utf8_string, size_t utf8_string_length, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libregf_value_item_compare_name_with_utf8_string"; libuna_unicode_character_t name_character = 0; libuna_unicode_character_t string_character = 0; size_t name_index = 0; size_t utf8_string_index = 0; int result = 0; if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value item.", function ); return( -1 ); } if( value_item->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value item - missing name.", 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string length value exceeds maximum.", function ); return( -1 ); } /* Do a full compare if there no name hash was provided or the name hash matches */ if( ( name_hash == 0 ) || ( value_item->name_hash == 0 ) || ( value_item->name_hash == name_hash ) ) { while( name_index < (size_t) value_item->name_size ) { if( utf8_string_index >= utf8_string_length ) { break; } if( ( value_item->flags & LIBREGF_VALUE_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_unicode_character_copy_from_byte_stream( &name_character, value_item->name, (size_t) value_item->name_size, &name_index, ascii_codepage, error ); } else { result = libuna_unicode_character_copy_from_utf16_stream( &name_character, value_item->name, (size_t) value_item->name_size, &name_index, LIBUNA_ENDIAN_LITTLE, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value name to Unicode character.", function ); return( -1 ); } if( libuna_unicode_character_copy_from_utf8( &string_character, utf8_string, utf8_string_length, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to Unicode character.", function ); return( -1 ); } if( towupper( (wint_t) name_character ) != towupper( (wint_t) string_character ) ) { break; } } if( ( name_index == (size_t) value_item->name_size ) && ( utf8_string_index == utf8_string_length ) ) { return( 1 ); } } return( 0 ); } /* Compares the value name with UTF-16 string * Returns 1 if the names match, 0 if not or -1 on error */ int libregf_value_item_compare_name_with_utf16_string( libregf_value_item_t *value_item, uint32_t name_hash, const uint16_t *utf16_string, size_t utf16_string_length, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libregf_value_item_compare_name_with_utf16_string"; libuna_unicode_character_t name_character = 0; libuna_unicode_character_t string_character = 0; size_t name_index = 0; size_t utf16_string_index = 0; int result = 0; if( value_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value item.", function ); return( -1 ); } if( value_item->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value item - missing name.", 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string length value exceeds maximum.", function ); return( -1 ); } /* Do a full compare if there no name hash was provided or the name hash matches */ if( ( name_hash == 0 ) || ( value_item->name_hash == 0 ) || ( value_item->name_hash == name_hash ) ) { while( name_index < (size_t) value_item->name_size ) { if( utf16_string_index >= utf16_string_length ) { break; } if( ( value_item->flags & LIBREGF_VALUE_KEY_FLAG_NAME_IS_ASCII ) != 0 ) { result = libuna_unicode_character_copy_from_byte_stream( &name_character, value_item->name, (size_t) value_item->name_size, &name_index, ascii_codepage, error ); } else { result = libuna_unicode_character_copy_from_utf16_stream( &name_character, value_item->name, (size_t) value_item->name_size, &name_index, LIBUNA_ENDIAN_LITTLE, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value name to Unicode character.", function ); return( -1 ); } if( libuna_unicode_character_copy_from_utf16( &string_character, utf16_string, utf16_string_length, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to Unicode character.", function ); return( -1 ); } if( towupper( (wint_t) name_character ) != towupper( (wint_t) string_character ) ) { break; } } if( ( name_index == (size_t) value_item->name_size ) && ( utf16_string_index == utf16_string_length ) ) { return( 1 ); } } return( 0 ); } libevt-20170120/libregf/libregf_libbfio.h0000664000175000017500000000324613012271515022222 0ustar00lordyestalordyesta00000000000000/* * The libbfio header wrapper * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_LIBBFIO_H ) #define _LIBREGF_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( _LIBREGF_LIBBFIO_H ) */ libevt-20170120/libregf/libregf_notify.c0000664000175000017500000000527013012271515022116 0ustar00lordyestalordyesta00000000000000/* * Notification functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "libregf_libcerror.h" #include "libregf_libcnotify.h" #include "libregf_notify.h" #if !defined( HAVE_LOCAL_LIBREGF ) /* Sets the verbose notification */ void libregf_notify_set_verbose( int verbose ) { libcnotify_verbose_set( verbose ); } /* Sets the notification stream * Returns 1 if successful or -1 on error */ int libregf_notify_set_stream( FILE *stream, libcerror_error_t **error ) { static char *function = "libregf_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 libregf_notify_stream_open( const char *filename, libcerror_error_t **error ) { static char *function = "libregf_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 libregf_notify_stream_close( libcerror_error_t **error ) { static char *function = "libregf_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_LIBREGF ) */ libevt-20170120/libregf/libregf_libfdatetime.h0000664000175000017500000000327513012271515023247 0ustar00lordyestalordyesta00000000000000/* * The libfdatetime header wrapper * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_LIBFDATETIME_H ) #define _LIBREGF_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( _LIBREGF_LIBFDATETIME_H ) */ libevt-20170120/libregf/Makefile.in0000664000175000017500000010702413040342660021016 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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 = libregf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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) libregf_la_LIBADD = am__libregf_la_SOURCES_DIST = libregf_checksum.c libregf_checksum.h \ libregf_codepage.h libregf_data_type.c libregf_data_type.h \ libregf_debug.c libregf_debug.h libregf_definitions.h \ libregf_error.c libregf_error.h libregf_extern.h \ libregf_file.c libregf_file.h libregf_hive_bin.c \ libregf_hive_bin.h libregf_hive_bin_cell.c \ libregf_hive_bin_cell.h libregf_hive_bins_list.c \ libregf_hive_bins_list.h libregf_io_handle.c \ libregf_io_handle.h libregf_key.c libregf_key.h \ libregf_key_item.c libregf_key_item.h libregf_key_tree.c \ libregf_key_tree.h libregf_libbfio.h libregf_libcdata.h \ libregf_libcerror.h libregf_libclocale.h libregf_libcnotify.h \ libregf_libfcache.h libregf_libfdata.h libregf_libfdatetime.h \ libregf_libfwnt.h libregf_libuna.h libregf_named_key.c \ libregf_named_key.h libregf_notify.c libregf_notify.h \ libregf_support.c libregf_support.h libregf_types.h \ libregf_unused.h libregf_value.c libregf_value.h \ libregf_value_item.c libregf_value_item.h libregf_value_type.c \ libregf_value_type.h regf_cell_values.h regf_file_header.h \ regf_hive_bin.h @HAVE_LOCAL_LIBREGF_TRUE@am_libregf_la_OBJECTS = libregf_checksum.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_data_type.lo libregf_debug.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_error.lo libregf_file.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_hive_bin.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_hive_bin_cell.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_hive_bins_list.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_io_handle.lo libregf_key.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_key_item.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_key_tree.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_named_key.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_notify.lo libregf_support.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_value.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_value_item.lo \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_value_type.lo libregf_la_OBJECTS = $(am_libregf_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_LIBREGF_TRUE@am_libregf_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__depfiles_maybe = depfiles 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 = $(libregf_la_SOURCES) DIST_SOURCES = $(am__libregf_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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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_LIBREGF_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBREGF_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBREGF_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBCTHREADS_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBCSPLIT_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBCFILE_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBCPATH_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBBFIO_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBFCACHE_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBFDATA_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBFDATETIME_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @LIBFWNT_CPPFLAGS@ \ @HAVE_LOCAL_LIBREGF_TRUE@ @PTHREAD_CPPFLAGS@ @HAVE_LOCAL_LIBREGF_TRUE@noinst_LTLIBRARIES = libregf.la @HAVE_LOCAL_LIBREGF_TRUE@libregf_la_SOURCES = \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_checksum.c libregf_checksum.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_codepage.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_data_type.c libregf_data_type.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_debug.c libregf_debug.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_definitions.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_error.c libregf_error.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_extern.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_file.c libregf_file.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_hive_bin.c libregf_hive_bin.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_hive_bin_cell.c libregf_hive_bin_cell.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_hive_bins_list.c libregf_hive_bins_list.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_io_handle.c libregf_io_handle.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_key.c libregf_key.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_key_item.c libregf_key_item.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_key_tree.c libregf_key_tree.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_libbfio.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_libcdata.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_libcerror.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_libclocale.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_libcnotify.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_libfcache.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_libfdata.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_libfdatetime.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_libfwnt.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_libuna.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_named_key.c libregf_named_key.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_notify.c libregf_notify.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_support.c libregf_support.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_types.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_unused.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_value.c libregf_value.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_value_item.c libregf_value_item.h \ @HAVE_LOCAL_LIBREGF_TRUE@ libregf_value_type.c libregf_value_type.h \ @HAVE_LOCAL_LIBREGF_TRUE@ regf_cell_values.h \ @HAVE_LOCAL_LIBREGF_TRUE@ regf_file_header.h \ @HAVE_LOCAL_LIBREGF_TRUE@ regf_hive_bin.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libregf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libregf/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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}; \ } libregf.la: $(libregf_la_OBJECTS) $(libregf_la_DEPENDENCIES) $(EXTRA_libregf_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libregf_la_rpath) $(libregf_la_OBJECTS) $(libregf_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_checksum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_data_type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_hive_bin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_hive_bin_cell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_hive_bins_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_io_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_key.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_key_item.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_key_tree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_named_key.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_notify.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_value_item.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregf_value_type.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libregf ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libregf_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: libevt-20170120/libregf/libregf_hive_bin.c0000664000175000017500000004260413012271515022373 0ustar00lordyestalordyesta00000000000000/* * Hive Bin functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libregf_debug.h" #include "libregf_definitions.h" #include "libregf_hive_bin.h" #include "libregf_hive_bin_cell.h" #include "libregf_libbfio.h" #include "libregf_libcdata.h" #include "libregf_libcerror.h" #include "libregf_libcnotify.h" #include "libregf_libfdatetime.h" #include "regf_hive_bin.h" const char *regf_hive_bin_signature = "hbin"; /* Creates a hive bin * Make sure the value hive_bin is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libregf_hive_bin_initialize( libregf_hive_bin_t **hive_bin, libcerror_error_t **error ) { static char *function = "libregf_hive_bin_initialize"; if( hive_bin == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bin.", function ); return( -1 ); } if( *hive_bin != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid hive bin value already set.", function ); return( -1 ); } *hive_bin = memory_allocate_structure( libregf_hive_bin_t ); if( *hive_bin == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create hive bin.", function ); goto on_error; } if( memory_set( *hive_bin, 0, sizeof( libregf_hive_bin_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear hive bin.", function ); goto on_error; } return( 1 ); on_error: if( *hive_bin != NULL ) { memory_free( *hive_bin ); *hive_bin = NULL; } return( -1 ); } /* Frees a hive bin * Returns 1 if successful or -1 on error */ int libregf_hive_bin_free( libregf_hive_bin_t **hive_bin, libcerror_error_t **error ) { static char *function = "libregf_hive_bin_free"; int result = 1; if( hive_bin == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bin.", function ); return( -1 ); } if( *hive_bin != NULL ) { if( ( *hive_bin )->cells_array != NULL ) { if( libcdata_array_free( &( ( *hive_bin )->cells_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libregf_hive_bin_cell_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the hive bin cells array.", function ); result = -1; } } if( ( *hive_bin )->data != NULL ) { memory_free( ( *hive_bin )->data ); } memory_free( *hive_bin ); *hive_bin = NULL; } return( result ); } /* Reads a hive bin header * Returns 1 if successful, 0 if no hive bin signature was found or -1 on error */ int libregf_hive_bin_read_header( libregf_hive_bin_t *hive_bin, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { regf_hive_bin_header_t hive_bin_header; static char *function = "libregf_hive_bin_read_header"; ssize_t read_count = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; #endif if( hive_bin == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bin.", function ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, (uint8_t *) &hive_bin_header, sizeof( regf_hive_bin_header_t ), error ); if( read_count != (ssize_t) sizeof( regf_hive_bin_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read hive bin header data.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: hive bin header:\n", function ); libcnotify_print_data( (uint8_t *) &hive_bin_header, sizeof( regf_hive_bin_header_t ), LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif if( memory_compare( hive_bin_header.signature, regf_hive_bin_signature, 4 ) != 0 ) { return( 0 ); } byte_stream_copy_to_uint32_little_endian( hive_bin_header.hive_bin_offset, hive_bin->offset ); byte_stream_copy_to_uint32_little_endian( hive_bin_header.size, hive_bin->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t\t: %c%c%c%c\n", function, hive_bin_header.signature[ 0 ], hive_bin_header.signature[ 1 ], hive_bin_header.signature[ 2 ], hive_bin_header.signature[ 3 ] ); libcnotify_printf( "%s: hive bin offset\t\t\t\t: %" PRIu32 " (0x%08" PRIx32 ")\n", function, hive_bin->offset, hive_bin->offset ); libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu32 " bytes\n", function, hive_bin->size ); byte_stream_copy_to_uint32_little_endian( hive_bin_header.unknown1, value_32bit ); libcnotify_printf( "%s: unknown1\t\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); byte_stream_copy_to_uint32_little_endian( hive_bin_header.unknown2, value_32bit ); libcnotify_printf( "%s: unknown2\t\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); if( libregf_debug_print_filetime_value( function, "unknown time\t\t\t\t", hive_bin_header.unknown_time, 8, LIBFDATETIME_ENDIAN_LITTLE, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print filetime value.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( hive_bin_header.unknown_spare, value_32bit ); libcnotify_printf( "%s: unknown spare\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Reads a hive bin and determines its cells * Returns 1 if successful or -1 on error */ int libregf_hive_bin_read_cells( libregf_hive_bin_t *hive_bin, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libregf_hive_bin_cell_t *hive_bin_cell = NULL; uint8_t *hive_bin_cells_data = NULL; static char *function = "libregf_hive_bin_read_cells"; ssize_t read_count = 0; size_t hive_bin_cells_data_size = 0; uint32_t hive_bin_cell_size = 0; uint32_t hive_bin_cells_offset = 0; int hive_bin_cell_index = 0; if( hive_bin == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bin.", function ); return( -1 ); } if( hive_bin->data != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid hive bin - data already set.", function ); return( -1 ); } #if SIZEOF_SIZE_T <= 4 if( hive_bin->size > (size_t) SSIZE_MAX ) #else if( hive_bin->size > (uint32_t) SSIZE_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid hive bin - size value exceeds maximum.", function ); return( -1 ); } if( hive_bin->cells_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid hive bin - cells array already set.", function ); return( -1 ); } hive_bin->data_size = (size_t) hive_bin->size - sizeof( regf_hive_bin_header_t ); hive_bin->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * hive_bin->data_size ); if( hive_bin->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create hive cells data.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, hive_bin->data, hive_bin->data_size, error ); if( read_count != (ssize_t) hive_bin->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read hive bin cells data.", function ); goto on_error; } if( libcdata_array_initialize( &( hive_bin->cells_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create hive bin cells array.", function ); goto on_error; } hive_bin_cells_data = hive_bin->data; hive_bin_cells_data_size = hive_bin->data_size; hive_bin_cells_offset = hive_bin->offset + sizeof( regf_hive_bin_header_t ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: hive bin cells:\n", function ); libcnotify_print_data( hive_bin_cells_data, hive_bin_cells_data_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif while( hive_bin_cells_data_size > 0 ) { if( libregf_hive_bin_cell_initialize( &hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create hive bin cell.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: hive bin cell: %03d offset\t\t\t: 0x%08" PRIx32 "\n", function, hive_bin_cell_index, hive_bin_cells_offset ); } #endif hive_bin_cell->offset = (uint32_t) hive_bin_cells_offset; byte_stream_copy_to_uint32_little_endian( hive_bin_cells_data, hive_bin_cell_size ); hive_bin_cells_data += 4; hive_bin_cells_offset += 4; hive_bin_cells_data_size -= 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: hive bin cell: %03d size\t\t\t: 0x%08" PRIx32 " (%" PRIi32 ")\n", function, hive_bin_cell_index, hive_bin_cell_size, (int32_t) hive_bin_cell_size ); } #endif if( (int32_t) hive_bin_cell_size < 0 ) { hive_bin_cell_size = (uint32_t) ( -1 * (int32_t) hive_bin_cell_size ); } else { hive_bin_cell->flags |= LIBREGF_HIVE_BIN_CELL_FLAG_UNALLOCATED; } if( ( hive_bin_cell_size % 8 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid cell size value should be multitude of 8.", function ); goto on_error; } /* Remove the size of the cell size value */ hive_bin_cell_size -= 4; if( hive_bin_cell_size > hive_bin_cells_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid cell size value exceeds hive bin size.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: hive bin cell: %03d data:\n", function, hive_bin_cell_index ); libcnotify_print_data( hive_bin_cells_data, hive_bin_cell_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif hive_bin_cell->data = hive_bin_cells_data; hive_bin_cell->size = hive_bin_cell_size; if( libcdata_array_append_entry( hive_bin->cells_array, &hive_bin_cell_index, (intptr_t *) hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append hive bin cell: %d.", function, hive_bin_cell_index ); goto on_error; } hive_bin_cell = NULL; hive_bin_cells_data += hive_bin_cell_size; hive_bin_cells_offset += hive_bin_cell_size; hive_bin_cells_data_size -= hive_bin_cell_size; hive_bin_cell_index++; } return( 1 ); on_error: if( hive_bin_cell != NULL ) { libregf_hive_bin_cell_free( &hive_bin_cell, NULL ); } if( hive_bin->data != NULL ) { memory_free( hive_bin->data ); hive_bin->data = NULL; } hive_bin->data_size = 0; return( -1 ); } /* Retrieves the number of hive bin cells * Returns 1 if successful or -1 on error */ int libregf_hive_bin_get_number_of_cells( libregf_hive_bin_t *hive_bin, uint16_t *number_of_cells, libcerror_error_t **error ) { static char *function = "libregf_hive_bin_get_number_of_cells"; int number_of_entries = 0; if( hive_bin == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bin.", function ); return( -1 ); } if( number_of_cells == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of cells.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( hive_bin->cells_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.", function ); return( -1 ); } if( number_of_entries > (int) UINT16_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid number of entries value exceeds maximum.", function ); return( -1 ); } *number_of_cells = (uint16_t) number_of_entries; return( 1 ); } /* Retrieves the hive bin cell at the index * Returns 1 if successful or -1 on error */ int libregf_hive_bin_get_cell( libregf_hive_bin_t *hive_bin, uint16_t cell_index, libregf_hive_bin_cell_t **hive_bin_cell, libcerror_error_t **error ) { static char *function = "libregf_hive_bin_get_cell"; if( hive_bin == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bin.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( hive_bin->cells_array, (int) cell_index, (intptr_t **) hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin cell: %" PRIu16 ".", function, cell_index ); return( -1 ); } return( 1 ); } /* Retrieves the hive bin cell at the offset * Returns 1 if successful, 0 if not available or -1 on error */ int libregf_hive_bin_get_cell_at_offset( libregf_hive_bin_t *hive_bin, uint32_t cell_offset, libregf_hive_bin_cell_t **hive_bin_cell, libcerror_error_t **error ) { static char *function = "libregf_hive_bin_get_cell_at_offset"; int entry_index = 0; int number_of_entries = 0; if( hive_bin == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bin.", function ); return( -1 ); } if( hive_bin->cells_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid hive bin - missing cells array.", function ); return( -1 ); } if( hive_bin_cell == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bin cell.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( hive_bin->cells_array, &number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the number of hive bin cells.", function ); return( -1 ); } for( entry_index = 0; entry_index < number_of_entries; entry_index++ ) { if( libcdata_array_get_entry_by_index( hive_bin->cells_array, entry_index, (intptr_t **) hive_bin_cell, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve hive bin cell: %d.", function, entry_index ); return( -1 ); } if( ( *hive_bin_cell )->offset == cell_offset ) { return( 1 ); } } *hive_bin_cell = NULL; return( 0 ); } libevt-20170120/libregf/libregf_file.c0000664000175000017500000012252713012271515021532 0ustar00lordyestalordyesta00000000000000/* * File functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #if defined( HAVE_WCTYPE_H ) #include #endif #include "libregf_codepage.h" #include "libregf_debug.h" #include "libregf_definitions.h" #include "libregf_file.h" #include "libregf_hive_bin.h" #include "libregf_hive_bins_list.h" #include "libregf_io_handle.h" #include "libregf_key.h" #include "libregf_key_item.h" #include "libregf_key_tree.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libcnotify.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #include "libregf_libuna.h" /* Creates a file * Make sure the value file is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libregf_file_initialize( libregf_file_t **file, libcerror_error_t **error ) { libregf_internal_file_t *internal_file = NULL; static char *function = "libregf_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( libregf_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( libregf_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( libregf_io_handle_initialize( &( internal_file->io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create IO handle.", function ); goto on_error; } *file = (libregf_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 libregf_file_free( libregf_file_t **file, libcerror_error_t **error ) { libregf_internal_file_t *internal_file = NULL; static char *function = "libregf_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 = (libregf_internal_file_t *) *file; if( internal_file->file_io_handle != NULL ) { if( libregf_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( libregf_io_handle_free( &( internal_file->io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free IO handle.", function ); result = -1; } memory_free( internal_file ); } return( result ); } /* Signals the libregf file to abort its current activity * Returns 1 if successful or -1 on error */ int libregf_file_signal_abort( libregf_file_t *file, libcerror_error_t **error ) { static char *function = "libregf_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 ); } ( (libregf_internal_file_t *) file )->abort = 1; return( 1 ); } /* Opens a file * Returns 1 if successful or -1 on error */ int libregf_file_open( libregf_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; libregf_internal_file_t *internal_file = NULL; static char *function = "libregf_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 ); } 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 & LIBREGF_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBREGF_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 & LIBREGF_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 = (libregf_internal_file_t *) file; 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( libregf_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 libregf_file_open_wide( libregf_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; libregf_internal_file_t *internal_file = NULL; static char *function = "libregf_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 ); } 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 & LIBREGF_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBREGF_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 & LIBREGF_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 = (libregf_internal_file_t *) file; 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( libregf_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 libregf_file_open_file_io_handle( libregf_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ) { libregf_internal_file_t *internal_file = NULL; static char *function = "libregf_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 & LIBREGF_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBREGF_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 & LIBREGF_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 = (libregf_internal_file_t *) file; if( ( access_flags & LIBREGF_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( libregf_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; } internal_file->file_io_handle = NULL; return( -1 ); } /* Closes a file * Returns 0 if successful or -1 on error */ int libregf_file_close( libregf_file_t *file, libcerror_error_t **error ) { libregf_internal_file_t *internal_file = NULL; static char *function = "libregf_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 = (libregf_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 defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( internal_file->file_io_handle_created_in_library != 0 ) { if( libregf_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 ); } } } #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( libregf_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( internal_file->hive_bins_list != NULL ) { if( libregf_hive_bins_list_free( &( internal_file->hive_bins_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free hive bins list.", function ); result = -1; } } if( internal_file->key_tree != NULL ) { if( libfdata_tree_free( &( internal_file->key_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free key tree.", function ); result = -1; } } if( internal_file->key_cache != NULL ) { if( libfcache_cache_free( &( internal_file->key_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free key cache.", function ); result = -1; } } return( result ); } /* Opens a file for reading * Returns 1 if successful or -1 on error */ int libregf_file_open_read( libregf_internal_file_t *internal_file, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libregf_file_open_read"; size64_t file_size = 0; uint32_t hive_bins_size = 0; uint32_t root_key_offset = 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->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->hive_bins_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - hive bins list already set.", function ); return( -1 ); } if( internal_file->key_tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - key tree already set.", function ); return( -1 ); } 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( libregf_io_handle_read_file_header( internal_file->io_handle, file_io_handle, &root_key_offset, &hive_bins_size, 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; } if( ( internal_file->io_handle->file_type == LIBREGF_FILE_TYPE_REGISTRY ) && ( file_size > 4096 ) ) { /* TODO print data between header and hive bins list offset ? */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading hive bins:\n" ); } #endif internal_file->io_handle->hive_bins_list_offset = 4096; if( libregf_hive_bins_list_initialize( &( internal_file->hive_bins_list ), internal_file->io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create hive bins list.", function ); goto on_error; } result = libregf_hive_bins_list_read( internal_file->hive_bins_list, file_io_handle, internal_file->io_handle->hive_bins_list_offset, hive_bins_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read hive bins.", function ); goto on_error; } else if( result != 0 ) { /* TODO free & clone function */ if( libfdata_tree_initialize( &( internal_file->key_tree ), (intptr_t *) internal_file->hive_bins_list, NULL, NULL, (int (*)(intptr_t *, intptr_t *, libfdata_tree_node_t *, libfcache_cache_t *, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libregf_key_item_read_node_data, (int (*)(intptr_t *, intptr_t *, libfdata_tree_node_t *, libfcache_cache_t *, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libregf_key_item_read_sub_nodes, 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 key tree.", function ); goto on_error; } if( libfcache_cache_initialize( &( internal_file->key_cache ), LIBREGF_MAXIMUM_CACHE_ENTRIES_KEYS, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create key cache.", function ); goto on_error; } if( libfdata_tree_set_root_node( internal_file->key_tree, 0, (off64_t) root_key_offset, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set key tree root node.", function ); goto on_error; } } } return( 1 ); on_error: if( internal_file->key_cache != NULL ) { libfcache_cache_free( &( internal_file->key_cache ), NULL ); } if( internal_file->key_tree != NULL ) { libfdata_tree_free( &( internal_file->key_tree ), NULL ); } if( internal_file->hive_bins_list != NULL ) { libregf_hive_bins_list_free( &( internal_file->hive_bins_list ), NULL ); } return( -1 ); } /* Determine if the file corrupted * Returns 1 if corrupted, 0 if not or -1 on error */ int libregf_file_is_corrupted( libregf_file_t *file, libcerror_error_t **error ) { libregf_internal_file_t *internal_file = NULL; static char *function = "libregf_file_is_corrupted"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libregf_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( ( internal_file->io_handle->flags & LIBREGF_IO_HANDLE_FLAG_IS_CORRUPTED ) != 0 ) { return( 1 ); } return( 0 ); } /* Retrieves the file ASCII codepage * Returns 1 if successful or -1 on error */ int libregf_file_get_ascii_codepage( libregf_file_t *file, int *ascii_codepage, libcerror_error_t **error ) { libregf_internal_file_t *internal_file = NULL; static char *function = "libregf_file_get_ascii_codepage"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libregf_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( ascii_codepage == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid ASCII codepage.", function ); return( -1 ); } *ascii_codepage = internal_file->io_handle->ascii_codepage; return( 1 ); } /* Sets the file ASCII codepage * Returns 1 if successful or -1 on error */ int libregf_file_set_ascii_codepage( libregf_file_t *file, int ascii_codepage, libcerror_error_t **error ) { libregf_internal_file_t *internal_file = NULL; static char *function = "libregf_file_set_ascii_codepage"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libregf_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( ( ascii_codepage != LIBREGF_CODEPAGE_ASCII ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_874 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_932 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_936 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_949 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_950 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_1250 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_1251 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_1252 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_1253 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_1254 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_1255 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_1256 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_1257 ) && ( ascii_codepage != LIBREGF_CODEPAGE_WINDOWS_1258 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported ASCII codepage.", function ); return( -1 ); } internal_file->io_handle->ascii_codepage = ascii_codepage; return( 1 ); } /* Retrieves the format version * Returns 1 if successful or -1 on error */ int libregf_file_get_format_version( libregf_file_t *file, uint32_t *major_version, uint32_t *minor_version, libcerror_error_t **error ) { libregf_internal_file_t *internal_file = NULL; static char *function = "libregf_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 = (libregf_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( major_version == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid major version.", function ); return( -1 ); } if( minor_version == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid minor version.", function ); return( -1 ); } *major_version = internal_file->io_handle->major_version; *minor_version = internal_file->io_handle->minor_version; return( 1 ); } /* Retrieves the type * Returns 1 if successful or -1 on error */ int libregf_file_get_type( libregf_file_t *file, uint32_t *file_type, libcerror_error_t **error ) { libregf_internal_file_t *internal_file = NULL; static char *function = "libregf_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 = (libregf_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( file_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file type.", function ); return( -1 ); } *file_type = internal_file->io_handle->file_type; return( 1 ); } /* Retrieves the root key * Returns 1 if successful, 0 if no such key or -1 on error */ int libregf_file_get_root_key( libregf_file_t *file, libregf_key_t **key, libcerror_error_t **error ) { libfdata_tree_node_t *key_tree_root_node = NULL; libregf_internal_file_t *internal_file = NULL; static char *function = "libregf_file_get_root_key"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libregf_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( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } if( *key != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: key already set.", function ); return( -1 ); } if( ( internal_file->io_handle->file_type != LIBREGF_FILE_TYPE_REGISTRY ) || ( internal_file->key_tree == NULL ) ) { return( 0 ); } if( libfdata_tree_get_root_node( internal_file->key_tree, &key_tree_root_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key tree root node.", function ); return( -1 ); } if( libregf_key_initialize( key, internal_file->io_handle, internal_file->file_io_handle, key_tree_root_node, internal_file->key_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create root key.", function ); return( -1 ); } return( 1 ); } /* Retrieves the key for the specific UTF-8 encoded path * The path separator is the \ character * Returns 1 if successful, 0 if no such key or -1 on error */ int libregf_file_get_key_by_utf8_path( libregf_file_t *file, const uint8_t *utf8_string, size_t utf8_string_length, libregf_key_t **key, libcerror_error_t **error ) { libfdata_tree_node_t *key_tree_node = NULL; libfdata_tree_node_t *key_tree_sub_node = NULL; libregf_internal_file_t *internal_file = NULL; libregf_key_item_t *key_item = NULL; libregf_key_item_t *sub_key_item = NULL; uint8_t *utf8_string_segment = NULL; static char *function = "libregf_file_get_key_by_utf8_path"; libuna_unicode_character_t unicode_character = 0; size_t utf8_string_index = 0; size_t utf8_string_segment_length = 0; uint32_t name_hash = 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 = (libregf_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( 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_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string length value exceeds maximum.", 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( *key != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: key already set.", function ); return( -1 ); } if( utf8_string_length > 0 ) { /* Ignore a leading separator */ if( utf8_string[ utf8_string_index ] == (uint8_t) LIBREGF_SEPARATOR ) { utf8_string_index++; } } if( libfdata_tree_get_root_node( internal_file->key_tree, &key_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key tree root node.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( key_tree_node, (intptr_t *) internal_file->file_io_handle, internal_file->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing root key item.", function ); return( -1 ); } if( utf8_string_length == utf8_string_index ) { result = 1; } else while( utf8_string_index < utf8_string_length ) { utf8_string_segment = (uint8_t *) &( utf8_string[ utf8_string_index ] ); utf8_string_segment_length = utf8_string_index; name_hash = 0; while( utf8_string_index < utf8_string_length ) { if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_length, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to Unicode character.", function ); return( -1 ); } if( ( unicode_character == (libuna_unicode_character_t) LIBREGF_SEPARATOR ) || ( unicode_character == 0 ) ) { utf8_string_segment_length += 1; break; } name_hash *= 37; name_hash += (uint32_t) towupper( (wint_t) unicode_character ); } utf8_string_segment_length = utf8_string_index - utf8_string_segment_length; if( utf8_string_segment_length == 0 ) { result = 0; } else { result = libregf_key_tree_get_sub_key_values_by_utf8_name( key_tree_node, internal_file->file_io_handle, internal_file->key_cache, name_hash, utf8_string_segment, utf8_string_segment_length, internal_file->io_handle->ascii_codepage, &key_tree_sub_node, &sub_key_item, error ); } if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key values by name.", function ); return( -1 ); } else if( result == 0 ) { break; } key_tree_node = key_tree_sub_node; } if( result != 0 ) { if( libregf_key_initialize( key, internal_file->io_handle, internal_file->file_io_handle, key_tree_node, internal_file->key_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create key.", function ); return( -1 ); } } return( result ); } /* Retrieves the key for the specific UTF-16 encoded path * The path separator is the \ character * Returns 1 if successful, 0 if no such key or -1 on error */ int libregf_file_get_key_by_utf16_path( libregf_file_t *file, const uint16_t *utf16_string, size_t utf16_string_length, libregf_key_t **key, libcerror_error_t **error ) { libfdata_tree_node_t *key_tree_node = NULL; libfdata_tree_node_t *key_tree_sub_node = NULL; libregf_internal_file_t *internal_file = NULL; libregf_key_item_t *key_item = NULL; libregf_key_item_t *sub_key_item = NULL; uint16_t *utf16_string_segment = NULL; static char *function = "libregf_file_get_key_by_utf16_path"; libuna_unicode_character_t unicode_character = 0; size_t utf16_string_index = 0; size_t utf16_string_segment_length = 0; uint32_t name_hash = 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 = (libregf_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( 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_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string length value exceeds maximum.", 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( *key != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: key already set.", function ); return( -1 ); } if( utf16_string_length > 0 ) { /* Ignore a leading separator */ if( utf16_string[ utf16_string_index ] == (uint16_t) LIBREGF_SEPARATOR ) { utf16_string_index++; } } if( libfdata_tree_get_root_node( internal_file->key_tree, &key_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key tree root node.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( key_tree_node, (intptr_t *) internal_file->file_io_handle, internal_file->key_cache, (intptr_t **) &key_item, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root key item.", function ); return( -1 ); } if( key_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing root key item.", function ); return( -1 ); } if( utf16_string_length == utf16_string_index ) { result = 1; } else while( utf16_string_index < utf16_string_length ) { utf16_string_segment = (uint16_t *) &( utf16_string[ utf16_string_index ] ); utf16_string_segment_length = utf16_string_index; name_hash = 0; while( utf16_string_index < utf16_string_length ) { if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_length, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to Unicode character.", function ); return( -1 ); } if( ( unicode_character == (libuna_unicode_character_t) LIBREGF_SEPARATOR ) || ( unicode_character == 0 ) ) { utf16_string_segment_length += 1; break; } name_hash *= 37; name_hash += (uint32_t) towupper( (wint_t) unicode_character ); } utf16_string_segment_length = utf16_string_index - utf16_string_segment_length; if( utf16_string_segment_length == 0 ) { result = 0; } else { result = libregf_key_tree_get_sub_key_values_by_utf16_name( key_tree_node, internal_file->file_io_handle, internal_file->key_cache, name_hash, utf16_string_segment, utf16_string_segment_length, internal_file->io_handle->ascii_codepage, &key_tree_sub_node, &sub_key_item, error ); } if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key values by name.", function ); return( -1 ); } else if( result == 0 ) { break; } key_tree_node = key_tree_sub_node; } if( result != 0 ) { if( libregf_key_initialize( key, internal_file->io_handle, internal_file->file_io_handle, key_tree_node, internal_file->key_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create key.", function ); return( -1 ); } } return( result ); } libevt-20170120/libregf/libregf_libfcache.h0000664000175000017500000000264113012271515022512 0ustar00lordyestalordyesta00000000000000/* * The internal libfcache header * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_LIBFCACHE_H ) #define _LIBREGF_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( _LIBREGF_LIBFCACHE_H ) */ libevt-20170120/libregf/libregf_libcdata.h0000664000175000017500000000301413012271515022350 0ustar00lordyestalordyesta00000000000000/* * The internal libcdata header * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_LIBCDATA_H ) #define _LIBREGF_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( _LIBREGF_LIBCDATA_H ) */ libevt-20170120/libregf/libregf_value_item.h0000664000175000017500000000765313012271515022754 0ustar00lordyestalordyesta00000000000000/* * Value item functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_VALUE_ITEM_H ) #define _LIBREGF_VALUE_ITEM_H #include #include #include "libregf_hive_bins_list.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libregf_value_item libregf_value_item_t; struct libregf_value_item { /* The flags */ uint16_t flags; /* The name hash */ uint32_t name_hash; /* The name */ uint8_t *name; /* The name size */ uint16_t name_size; /* The value type */ uint32_t type; /* The value data type */ uint8_t data_type; /* The value data buffer */ uint8_t *data_buffer; /* The value data buffer size */ size_t data_buffer_size; /* The large value data stream */ libfdata_stream_t *data_stream; /* Various item flags */ uint8_t item_flags; }; int libregf_value_item_initialize( libregf_value_item_t **value_item, libcerror_error_t **error ); int libregf_value_item_free( libregf_value_item_t **value_item, libcerror_error_t **error ); int libregf_value_item_get_data_size( libregf_value_item_t *value_item, size_t *data_size, libcerror_error_t **error ); int libregf_value_item_get_data( libregf_value_item_t *value_item, libbfio_handle_t *file_io_handle, uint8_t **data, size_t *data_size, libcerror_error_t **error ); int libregf_value_item_read_value_key( libregf_value_item_t *value_item, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, uint32_t value_key_offset, libcerror_error_t **error ); int libregf_value_item_read_value_data( libregf_value_item_t *value_item, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, uint32_t value_data_offset, uint32_t value_data_size, libcerror_error_t **error ); int libregf_value_item_read_data_block_list( libregf_value_item_t *value_item, libbfio_handle_t *file_io_handle, libregf_hive_bins_list_t *hive_bins_list, uint32_t data_block_list_offset, uint16_t number_of_segments, uint32_t value_data_size, libcerror_error_t **error ); int libregf_value_item_read_element_data( libregf_hive_bins_list_t *hive_bins_list, libbfio_handle_t *file_io_handle, libfdata_list_element_t *element, libfcache_cache_t *cache, int data_range_file_index, off64_t data_range_offset, size64_t data_range_size, uint32_t data_range_flags, uint8_t read_flags, libcerror_error_t **error ); int libregf_value_item_compare_name_with_utf8_string( libregf_value_item_t *value_item, uint32_t name_hash, const uint8_t *utf8_string, size_t utf8_string_length, int ascii_codepage, libcerror_error_t **error ); int libregf_value_item_compare_name_with_utf16_string( libregf_value_item_t *value_item, uint32_t name_hash, const uint16_t *utf16_string, size_t utf16_string_length, int ascii_codepage, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_VALUE_ITEM_H ) */ libevt-20170120/libregf/libregf_io_handle.h0000664000175000017500000000531313012271515022533 0ustar00lordyestalordyesta00000000000000/* * Input/Output (IO) handle * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_IO_HANDLE_H ) #define _LIBREGF_IO_HANDLE_H #include #include #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif extern const char *regf_file_signature; typedef struct libregf_io_handle libregf_io_handle_t; struct libregf_io_handle { /* The major version */ uint32_t major_version; /* The minor version */ uint32_t minor_version; /* The file type */ uint32_t file_type; /* The hive bins list offset */ off64_t hive_bins_list_offset; /* Various flags */ uint8_t flags; /* The codepage of the extended ASCII strings */ int ascii_codepage; }; int libregf_io_handle_initialize( libregf_io_handle_t **io_handle, libcerror_error_t **error ); int libregf_io_handle_free( libregf_io_handle_t **io_handle, libcerror_error_t **error ); int libregf_io_handle_clear( libregf_io_handle_t *io_handle, libcerror_error_t **error ); int libregf_io_handle_read_file_header( libregf_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t *root_key_offset, uint32_t *hive_bins_size, libcerror_error_t **error ); ssize_t libregf_io_handle_read_segment_data( intptr_t *data_handle, libbfio_handle_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 ); off64_t libregf_io_handle_seek_segment_offset( intptr_t *data_handle, libbfio_handle_t *file_io_handle, int segment_index, int segment_file_index, off64_t segment_offset, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_IO_HANDLE_H ) */ libevt-20170120/libregf/libregf_libclocale.h0000664000175000017500000000266313012271515022707 0ustar00lordyestalordyesta00000000000000/* * The internal libclocale header * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_LIBCLOCALE_H ) #define _LIBREGF_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( _LIBREGF_LIBCLOCALE_H ) */ libevt-20170120/libregf/libregf_libcerror.h0000664000175000017500000000263613012271515022601 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_LIBCERROR_H ) #define _LIBREGF_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( _LIBREGF_LIBCERROR_H ) */ libevt-20170120/libregf/libregf_types.h0000664000175000017500000000315713012271515021761 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_INTERNAL_TYPES_H ) #define _LIBREGF_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBREGF for local use of libregf * The definitions in are copied here * for local use of libregf */ #if defined( HAVE_LOCAL_LIBREGF ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libregf_file {} libregf_file_t; typedef struct libregf_key {} libregf_key_t; typedef struct libregf_value {} libregf_value_t; #else typedef intptr_t libregf_file_t; typedef intptr_t libregf_key_t; typedef intptr_t libregf_value_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBREGF ) */ #endif /* !defined( _LIBREGF_INTERNAL_TYPES_H ) */ libevt-20170120/libregf/libregf_key.h0000664000175000017500000001445513012271515021410 0ustar00lordyestalordyesta00000000000000/* * Item functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_INTERNAL_KEY_H ) #define _LIBREGF_INTERNAL_KEY_H #include #include #include "libregf_extern.h" #include "libregf_io_handle.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #include "libregf_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libregf_internal_key libregf_internal_key_t; struct libregf_internal_key { /* The IO handle */ libregf_io_handle_t *io_handle; /* The file IO handle */ libbfio_handle_t *file_io_handle; /* The key tree node */ libfdata_tree_node_t *key_tree_node; /* The key cache */ libfcache_cache_t *key_cache; }; int libregf_key_initialize( libregf_key_t **key, libregf_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *key_tree_node, libfcache_cache_t *key_cache, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_free( libregf_key_t **key, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_is_corrupted( libregf_key_t *key, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_offset( libregf_key_t *key, off64_t *offset, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_name_size( libregf_key_t *key, size_t *name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_name( libregf_key_t *key, uint8_t *name, size_t name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_utf8_name_size( libregf_key_t *key, size_t *utf8_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_utf8_name( libregf_key_t *key, uint8_t *utf8_name, size_t utf8_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_utf16_name_size( libregf_key_t *key, size_t *utf16_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_utf16_name( libregf_key_t *key, uint16_t *utf16_name, size_t utf16_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_class_name_size( libregf_key_t *key, size_t *class_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_class_name( libregf_key_t *key, uint8_t *class_name, size_t class_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_utf8_class_name_size( libregf_key_t *key, size_t *utf8_class_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_utf8_class_name( libregf_key_t *key, uint8_t *utf8_class_name, size_t utf8_class_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_utf16_class_name_size( libregf_key_t *key, size_t *utf16_class_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_utf16_class_name( libregf_key_t *key, uint16_t *utf16_class_name, size_t utf16_class_name_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_last_written_time( libregf_key_t *key, uint64_t *last_written_time, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_security_descriptor_size( libregf_key_t *key, size_t *security_descriptor_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_security_descriptor( libregf_key_t *key, uint8_t *security_descriptor, size_t security_descriptor_size, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_number_of_values( libregf_key_t *key, int *number_of_values, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_value( libregf_key_t *key, int value_index, libregf_value_t **value, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_value_by_utf8_name( libregf_key_t *key, const uint8_t *utf8_string, size_t utf8_string_length, libregf_value_t **value, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_value_by_utf16_name( libregf_key_t *key, const uint16_t *utf16_string, size_t utf16_string_length, libregf_value_t **value, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_number_of_sub_keys( libregf_key_t *key, int *number_of_sub_keys, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_sub_key( libregf_key_t *key, int sub_key_index, libregf_key_t **sub_key, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_sub_key_by_utf8_name( libregf_key_t *key, const uint8_t *utf8_string, size_t utf8_string_length, libregf_key_t **sub_key, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_sub_key_by_utf8_path( libregf_key_t *key, const uint8_t *utf8_string, size_t utf8_string_length, libregf_key_t **sub_key, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_sub_key_by_utf16_name( libregf_key_t *key, const uint16_t *utf16_string, size_t utf16_string_length, libregf_key_t **sub_key, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_key_get_sub_key_by_utf16_path( libregf_key_t *key, const uint16_t *utf16_string, size_t utf16_string_length, libregf_key_t **sub_key, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_INTERNAL_KEY_H ) */ libevt-20170120/libregf/libregf_checksum.c0000664000175000017500000001570213012271515022411 0ustar00lordyestalordyesta00000000000000/* * Checksum functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libregf_checksum.h" #include "libregf_libcerror.h" /* The largest primary (or scalar) available * supported by a single load and store instruction */ typedef unsigned long int libregf_aligned_t; /* 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 libregf_checksum_calculate_little_endian_xor32( uint32_t *checksum_value, const uint8_t *buffer, size_t size, uint32_t initial_value, libcerror_error_t **error ) { libregf_aligned_t *aligned_buffer_iterator = NULL; uint8_t *buffer_iterator = NULL; static char *function = "libregf_checksum_calculate_little_endian_xor32"; libregf_aligned_t value_aligned = 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 ); } *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( libregf_aligned_t ) % 4 ) == 0 ) && ( size > ( 2 * sizeof( libregf_aligned_t ) ) ) ) { /* Align the buffer iterator */ alignment_size = (uint8_t) ( (intptr_t) buffer_iterator % sizeof( libregf_aligned_t ) ); byte_size = alignment_size; 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; *checksum_value ^= value_32bit; } aligned_buffer_iterator = (libregf_aligned_t *) buffer_iterator; size -= alignment_size; if( *buffer_iterator != (uint8_t) ( *aligned_buffer_iterator & 0xff ) ) { byte_order = _BYTE_STREAM_ENDIAN_BIG; } else { byte_order = _BYTE_STREAM_ENDIAN_LITTLE; } /* Determine the aligned XOR value */ while( size > sizeof( libregf_aligned_t ) ) { value_aligned ^= *aligned_buffer_iterator; aligned_buffer_iterator++; size -= sizeof( libregf_aligned_t ); } /* Align the aligned XOR value with the 32-bit XOR value */ if( alignment_size > 0 ) { if( alignment_size >= sizeof( libregf_aligned_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid alignment size value out of bounds.", function ); return( -1 ); } byte_count = ( alignment_size % 4 ) * 8; alignment_count = ( sizeof( libregf_aligned_t ) - alignment_size ) * 8; if( byte_order == _BYTE_STREAM_ENDIAN_BIG ) { /* Shift twice to set unused bytes to 0 */ value_32bit = (uint32_t) ( ( value_aligned >> alignment_count ) << byte_count ); /* Strip-off the used part of the aligned value */ value_aligned <<= byte_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; } *checksum_value ^= value_32bit; } /* Update the 32-bit XOR value with the aligned XOR value */ byte_size = (uint8_t) sizeof( libregf_aligned_t ); while( byte_size != 0 ) { byte_count = ( ( byte_size / 4 ) - 1 ) * 32; if( byte_order == _BYTE_STREAM_ENDIAN_BIG ) { value_32bit = (uint32_t) ( value_aligned >> byte_count ); /* Change big-endian into little-endian */ value_32bit = ( ( value_32bit & 0x00ff ) << 24 ) | ( ( value_32bit & 0xff00 ) << 8 ) | ( ( value_32bit >> 8 ) & 0xff00 ) | ( ( value_32bit >> 24 ) & 0x00ff ); value_aligned <<= byte_count; } else if( byte_order == _BYTE_STREAM_ENDIAN_LITTLE ) { value_32bit = (uint32_t) value_aligned; value_aligned >>= byte_count; } byte_size -= 4; *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; *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; *checksum_value ^= value_32bit; } return( 1 ); } libevt-20170120/libregf/libregf_notify.h0000664000175000017500000000305413012271515022121 0ustar00lordyestalordyesta00000000000000/* * Notification functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_NOTIFY_H ) #define _LIBREGF_NOTIFY_H #include #include #include #include "libregf_extern.h" #include "libregf_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBREGF ) LIBREGF_EXTERN \ void libregf_notify_set_verbose( int verbose ); LIBREGF_EXTERN \ int libregf_notify_set_stream( FILE *stream, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_notify_stream_open( const char *filename, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_notify_stream_close( libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBREGF ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_NOTIFY_H ) */ libevt-20170120/libregf/libregf_hive_bins_list.h0000664000175000017500000000500213012271515023605 0ustar00lordyestalordyesta00000000000000/* * Hive bins list functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_HIVE_BINS_LIST_H ) #define _LIBREGF_HIVE_BINS_LIST_H #include #include #include "libregf_io_handle.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libregf_hive_bins_list libregf_hive_bins_list_t; struct libregf_hive_bins_list { /* The IO handle */ libregf_io_handle_t *io_handle; /* The data list */ libfdata_list_t *data_list; /* The data cache */ libfcache_cache_t *data_cache; /* Various flags */ uint8_t flags; }; int libregf_hive_bins_list_initialize( libregf_hive_bins_list_t **hive_bins_list, libregf_io_handle_t *io_handle, libcerror_error_t **error ); int libregf_hive_bins_list_free( libregf_hive_bins_list_t **hive_bins_list, libcerror_error_t **error ); int libregf_hive_bins_list_get_index_at_offset( libregf_hive_bins_list_t *hive_bins_list, off64_t offset, int *hive_bin_index, libcerror_error_t **error ); int libregf_hive_bins_list_read( libregf_hive_bins_list_t *hive_bins_list, libbfio_handle_t *file_io_handle, off64_t file_offset, uint32_t hive_bins_size, libcerror_error_t **error ); int libregf_hive_bins_list_read_element_data( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *element, libfcache_cache_t *cache, int data_range_file_index, off64_t data_range_offset, size64_t data_range_size, uint32_t data_range_flags, uint8_t read_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_HIVE_BINS_LIST_H ) */ libevt-20170120/libregf/libregf_data_type.c0000664000175000017500000000505413012271515022560 0ustar00lordyestalordyesta00000000000000/* * Data type functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libregf_data_type.h" #if defined( HAVE_DEBUG_OUTPUT ) libregf_data_type_t libregf_data_types[ ] = { { 0x00000000, "REG_NONE", "Undefined" }, { 0x00000001, "REG_SZ", "String" }, { 0x00000002, "REG_EXPAND_SZ", "String with expandable variables" }, { 0x00000003, "REG_BINARY", "Binary data" }, { 0x00000004, "REG_DWORD_LITTLE_ENDIAN", "Integer 32-bit signed little-endian" }, { 0x00000005, "REG_DWORD_BIG_ENDIAN", "Integer 32-bit signed big-endian" }, { 0x00000006, "REG_LINK", "Link" }, { 0x00000007, "REG_MULTI_SZ", "Array of strings" }, { 0x00000008, "REG_RESOURCE_LIST", "Resource list" }, { 0x00000009, "REG_FULL_RESOURCE_DESCRIPTOR", "Full resource descriptor" }, { 0x0000000a, "REG_RESOURCE_REQUIREMENTS_LIST", "Resource requirements list" }, { 0x0000000b, "REG_QWORD_LITTLE_ENDIAN", "Integer 64-bit signed little-endian" }, { (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* Retrieves a string containing the data_type identifier */ const char *libregf_data_type_get_identifier( uint32_t data_type ) { int iterator = 0; while( ( libregf_data_types[ iterator ] ).data_type != (uint32_t) -1 ) { if( ( libregf_data_types[ iterator ] ).data_type == data_type ) { break; } iterator++; } return( ( libregf_data_types[ iterator ] ).identifier ); } /* Retrieves a string containing the data_type description */ const char *libregf_data_type_get_description( uint32_t data_type ) { int iterator = 0; while( ( libregf_data_types[ iterator ] ).data_type != (uint32_t) -1 ) { if( ( libregf_data_types[ iterator ] ).data_type == data_type ) { break; } iterator++; } return( ( libregf_data_types[ iterator ] ).description ); } #endif libevt-20170120/libregf/libregf_hive_bins_list.c0000664000175000017500000003362713012271515023616 0ustar00lordyestalordyesta00000000000000/* * Hive bins list functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libregf_definitions.h" #include "libregf_hive_bin.h" #include "libregf_hive_bins_list.h" #include "libregf_io_handle.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libcnotify.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #include "libregf_unused.h" /* Creates a hive bins list * Make sure the value hive_bins_list is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libregf_hive_bins_list_initialize( libregf_hive_bins_list_t **hive_bins_list, libregf_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libregf_hive_bins_list_initialize"; if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } if( *hive_bins_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid hive bins list 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 ); } *hive_bins_list = memory_allocate_structure( libregf_hive_bins_list_t ); if( *hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create hive bins list.", function ); goto on_error; } if( memory_set( *hive_bins_list, 0, sizeof( libregf_hive_bins_list_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file.", function ); memory_free( *hive_bins_list ); *hive_bins_list = NULL; return( -1 ); } if( libfdata_list_initialize( &( ( *hive_bins_list )->data_list ), NULL, NULL, NULL, (int (*)(intptr_t *, intptr_t *, libfdata_list_element_t *, libfcache_cache_t *, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libregf_hive_bins_list_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 list.", function ); goto on_error; } if( libfcache_cache_initialize( &( ( *hive_bins_list )->data_cache ), LIBREGF_MAXIMUM_CACHE_ENTRIES_HIVE_BINS, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data cache.", function ); goto on_error; } ( *hive_bins_list )->io_handle = io_handle; return( 1 ); on_error: if( *hive_bins_list != NULL ) { if( ( *hive_bins_list )->data_list != NULL ) { libfdata_list_free( &( ( *hive_bins_list )->data_list ), NULL ); } memory_free( *hive_bins_list ); *hive_bins_list = NULL; } return( -1 ); } /* Frees a hive bins list * Returns 1 if successful or -1 on error */ int libregf_hive_bins_list_free( libregf_hive_bins_list_t **hive_bins_list, libcerror_error_t **error ) { static char *function = "libregf_hive_bins_list_free"; int result = 1; if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } if( *hive_bins_list != NULL ) { /* The io_handle reference is freed elsewhere */ if( ( *hive_bins_list )->data_list != NULL ) { if( libfdata_list_free( &( ( *hive_bins_list )->data_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data list.", function ); result = -1; } } if( ( *hive_bins_list )->data_cache != NULL ) { if( libfcache_cache_free( &( ( *hive_bins_list )->data_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data cache.", function ); result = -1; } } memory_free( *hive_bins_list ); *hive_bins_list = NULL; } return( result ); } /* Retrieves the hive bin index for a specific offset * Returns 1 if successful, 0 if not or -1 on error */ int libregf_hive_bins_list_get_index_at_offset( libregf_hive_bins_list_t *hive_bins_list, off64_t offset, int *hive_bin_index, libcerror_error_t **error ) { static char *function = "libregf_hive_bins_list_get_index_at_offset"; off64_t element_data_offset = 0; int result = 0; if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } result = libfdata_list_get_element_index_at_offset( hive_bins_list->data_list, offset, hive_bin_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 data list element index at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); return( -1 ); } return( result ); } /* Reads the hive bins * Returns 1 if successful, 0 if no hive bin signature was found or -1 on error */ int libregf_hive_bins_list_read( libregf_hive_bins_list_t *hive_bins_list, libbfio_handle_t *file_io_handle, off64_t file_offset, uint32_t hive_bins_size, libcerror_error_t **error ) { libregf_hive_bin_t *hive_bin = NULL; static char *function = "libregf_hive_bins_list_read"; int hive_bin_index = 0; int result = 0; if( hive_bins_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid hive bins list.", function ); return( -1 ); } if( hive_bins_list->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid hive bins list - missing IO handle.", function ); return( -1 ); } if( libregf_hive_bin_initialize( &hive_bin, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create hive bin.", function ); goto on_error; } while( hive_bins_size > 0 ) { if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek file header offset: %" PRIi64 ".", function, file_offset ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading hive bin: %d at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, hive_bin_index, file_offset, file_offset ); } #endif result = libregf_hive_bin_read_header( hive_bin, file_io_handle, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read hive bin header at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, file_offset, file_offset ); goto on_error; } else if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: missing hive bin at offset: %" PRIi64 " (0x%08" PRIx64 ").\n", function, file_offset, file_offset ); } #endif hive_bins_list->flags |= LIBREGF_HIVE_BINS_FLAG_IS_CORRUPTED; break; } if( hive_bin->offset != ( file_offset - 4096 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: mismatch in hive bin offset (stored: %" PRIu32 " != calculated: %" PRIi64 ").", function, hive_bin->offset, file_offset - 4096 ); goto on_error; } if( libfdata_list_append_element( hive_bins_list->data_list, &hive_bin_index, 0, file_offset, (size64_t) hive_bin->size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append hive bin: %d to data list.", function, hive_bin_index ); goto on_error; } file_offset += hive_bin->size; hive_bins_size -= hive_bin->size; hive_bin_index++; } if( libregf_hive_bin_free( &hive_bin, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free hive bin.", function ); return( -1 ); } hive_bin = NULL; if( result == 0 ) { if( hive_bin_index == 0 ) { return( 0 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: missing hive bin at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, file_offset, file_offset ); } #endif hive_bins_list->flags |= LIBREGF_HIVE_BINS_FLAG_IS_CORRUPTED; } if( ( hive_bins_list->flags & LIBREGF_HIVE_BINS_FLAG_IS_CORRUPTED ) != 0 ) { hive_bins_list->io_handle->flags |= LIBREGF_IO_HANDLE_FLAG_IS_CORRUPTED; } return( 1 ); on_error: if( hive_bin != NULL ) { libregf_hive_bin_free( &hive_bin, NULL ); } return( -1 ); } /* Reads a hive bin * Returns 1 if successful or -1 on error */ int libregf_hive_bins_list_read_element_data( intptr_t *data_handle LIBREGF_ATTRIBUTE_UNUSED, libbfio_handle_t *file_io_handle, libfdata_list_element_t *element, libfcache_cache_t *cache, int data_range_file_index LIBREGF_ATTRIBUTE_UNUSED, off64_t data_range_offset, size64_t data_range_size, uint32_t data_range_flags LIBREGF_ATTRIBUTE_UNUSED, uint8_t read_flags LIBREGF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libregf_hive_bin_t *hive_bin = NULL; static char *function = "libregf_hive_bins_list_read_element_data"; int result = 0; LIBREGF_UNREFERENCED_PARAMETER( data_handle ) LIBREGF_UNREFERENCED_PARAMETER( data_range_file_index ) LIBREGF_UNREFERENCED_PARAMETER( data_range_flags ) LIBREGF_UNREFERENCED_PARAMETER( read_flags ) if( libregf_hive_bin_initialize( &hive_bin, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create hive bin.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading hive bin at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, data_range_offset, data_range_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, data_range_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek file header offset: %" PRIi64 ".", function, data_range_offset ); goto on_error; } result = libregf_hive_bin_read_header( hive_bin, file_io_handle, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read hive bin header at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, data_range_offset, data_range_offset ); goto on_error; } if( (size64_t) hive_bin->size != data_range_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: mismatch in hive bin size (stored: %" PRIu32 " != calculated: %" PRIu64 ").", function, hive_bin->size, data_range_size ); goto on_error; } if( libregf_hive_bin_read_cells( hive_bin, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read hive bin cells.", function ); goto on_error; } if( libfdata_list_element_set_element_value( element, (intptr_t *) file_io_handle, cache, (intptr_t *) hive_bin, (int (*)(intptr_t **, libcerror_error_t **)) &libregf_hive_bin_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 hive bin as element value.", function ); goto on_error; } return( 1 ); on_error: if( hive_bin != NULL ) { libregf_hive_bin_free( &hive_bin, NULL ); } return( -1 ); } libevt-20170120/libregf/libregf_file.h0000664000175000017500000001050513012271515021527 0ustar00lordyestalordyesta00000000000000/* * File functions * * Copyright (C) 2009-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBREGF_INTERNAL_FILE_H ) #define _LIBREGF_INTERNAL_FILE_H #include #include #include "libregf_extern.h" #include "libregf_hive_bins_list.h" #include "libregf_io_handle.h" #include "libregf_libbfio.h" #include "libregf_libcerror.h" #include "libregf_libfcache.h" #include "libregf_libfdata.h" #include "libregf_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libregf_internal_file libregf_internal_file_t; struct libregf_internal_file { /* The file IO handle */ libbfio_handle_t *file_io_handle; /* The IO handle */ libregf_io_handle_t *io_handle; /* The hive bins list */ libregf_hive_bins_list_t *hive_bins_list; /* The key tree */ libfdata_tree_t *key_tree; /* The key cache */ libfcache_cache_t *key_cache; /* 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; /* Value to indicate if abort was signalled */ int abort; }; LIBREGF_EXTERN \ int libregf_file_initialize( libregf_file_t **file, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_file_free( libregf_file_t **file, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_file_signal_abort( libregf_file_t *file, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_file_open( libregf_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBREGF_EXTERN \ int libregf_file_open_wide( libregf_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ LIBREGF_EXTERN \ int libregf_file_open_file_io_handle( libregf_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_file_close( libregf_file_t *file, libcerror_error_t **error ); int libregf_file_open_read( libregf_internal_file_t *internal_file, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_file_is_corrupted( libregf_file_t *file, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_file_get_ascii_codepage( libregf_file_t *file, int *ascii_codepage, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_file_set_ascii_codepage( libregf_file_t *file, int ascii_codepage, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_file_get_format_version( libregf_file_t *file, uint32_t *major_version, uint32_t *minor_version, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_file_get_type( libregf_file_t *file, uint32_t *file_type, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_file_get_root_key( libregf_file_t *file, libregf_key_t **key, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_file_get_key_by_utf8_path( libregf_file_t *file, const uint8_t *utf8_string, size_t utf8_string_length, libregf_key_t **key, libcerror_error_t **error ); LIBREGF_EXTERN \ int libregf_file_get_key_by_utf16_path( libregf_file_t *file, const uint16_t *utf16_string, size_t utf16_string_length, libregf_key_t **key, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBREGF_INTERNAL_FILE_H ) */ libevt-20170120/setup.py0000775000175000017500000002342212706057451017064 0ustar00lordyestalordyesta00000000000000#!/usr/bin/env python # # Script to build and install Python-bindings. # Version: 20160316 from __future__ import print_function import glob import platform import os import shlex import shutil import subprocess import sys from distutils import sysconfig from distutils.ccompiler import new_compiler from distutils.command.build_ext import build_ext from distutils.command.bdist import bdist from distutils.command.sdist import sdist from distutils.core import Extension, setup class custom_bdist_rpm(bdist): """Custom handler for the bdist_rpm command.""" def run(self): print("'setup.py bdist_rpm' command not supported use 'rpmbuild' instead.") 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) if not process: raise RuntimeError("Running: {0:s} failed.".format(command)) output, error = process.communicate() if process.returncode != 0: error = "\n".join(error.split(b"\n")[-5:]) if sys.version_info[0] >= 3: error = error.decode("ascii", errors="replace") raise RuntimeError( "Running: {0:s} failed with error:\n{1:s}.".format( command, error)) return output def build_extensions(self): # TODO: move build customization here? build_ext.build_extensions(self) def run(self): compiler = new_compiler(compiler=self.compiler) if compiler.compiler_type == "msvc": self.define = [ ("UNICODE", ""), ] else: # We need to run "configure" to make sure config.h is generated # properly. We invoke "configure" with "sh" here to make sure # that it works on mingw32 with the standard python.org binaries. command = "sh configure --help" output = self._RunCommand(command) # We want to build as much as possible self contained Python binding. configure_arguments = [] for line in output.split(b"\n"): line = line.strip() line, _, _ = line.rpartition(b"[=DIR]") if line.startswith(b"--with-lib") and not line.endswith(b"-prefix"): if sys.version_info[0] >= 3: line = line.decode("ascii") configure_arguments.append("{0:s}=no".format(line)) elif line == b"--with-openssl": configure_arguments.append("--with-openssl=no") elif line == b"--with-zlib": configure_arguments.append("--with-zlib=no") command = "sh configure {0:s}".format(" ".join(configure_arguments)) output = self._RunCommand(command) print_line = False for line in output.split(b"\n"): line = line.rstrip() if line == b"configure:": print_line = True if print_line: if sys.version_info[0] >= 3: line = line.decode("ascii") print(line) self.define = [ ("HAVE_CONFIG_H", ""), ("LOCALEDIR", "\"/usr/share/locale\""), ] build_ext.run(self) class custom_sdist(sdist): """Custom handler for the sdist command.""" def run(self): if self.formats != ["gztar"]: 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("dist"): os.mkdir("dist") 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("dist", sdist_package_file) os.rename(source_package_file, 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): """Class to define the project information.""" def __init__(self): """Initializes a project information object.""" 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:]) @property def package_name(self): """The package name.""" return "{0:s}-python".format(self.library_name) @property def package_description(self): """The package description.""" return "Python bindings module for {0:s}".format(self.library_name) @property def project_url(self): """The project URL.""" return "https://github.com/libyal/{0:s}/".format(self.library_name) def _ReadConfigureAc(self): """Reads configure.ac to initialize the project information.""" file_object = open("configure.ac", "rb") if not file_object: raise IOError("Unable to open: configure.ac") 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] if sys.version_info[0] >= 3: library_version = library_version.decode("ascii") self.library_version = library_version break elif found_ac_init: library_name = line[1:-2] if sys.version_info[0] >= 3: library_name = library_name.decode("ascii") self.library_name = library_name found_library_name = True elif line.startswith(b"AC_INIT"): found_ac_init = True file_object.close() 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") file_object = open("Makefile.am", "rb") if not file_object: raise IOError("Unable to open: Makefile.am") found_subdirs = False for line in file_object.readlines(): line = line.strip() if found_subdirs: library_name, _, _ = line.partition(b" ") if sys.version_info[0] >= 3: library_name = library_name.decode("ascii") 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(b"SUBDIRS"): found_subdirs = True file_object.close() if not self.include_directories or not self.library_names: raise RuntimeError( "Unable to find include directories and library names in: " "Makefile.am") def GetPythonLibraryDirectoryPath(): """Retrieves the Python library directory path.""" path = sysconfig.get_python_lib(True) _, _, path = path.rpartition(sysconfig.PREFIX) if path.startswith(os.sep): path = path[1:] return path project_information = ProjectInformation() MODULE_VERSION = project_information.library_version if "bdist_msi" in sys.argv: # bdist_msi does not support the library version so we add ".1" # as a work around. MODULE_VERSION = "{0:s}.1".format(MODULE_VERSION) PYTHON_LIBRARY_DIRECTORY = GetPythonLibraryDirectoryPath() 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: 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) # Add the LICENSE file to the distribution. copying_file = os.path.join("COPYING") license_file = "LICENSE.{0:s}".format(project_information.module_name) shutil.copyfile(copying_file, license_file) LIBRARY_DATA_FILES = [license_file] # TODO: find a way to detect missing python.h # e.g. on Ubuntu python-dev is not installed by python-pip # TODO: what about description and platform in egg file setup( name=project_information.package_name, url=project_information.project_url, version=MODULE_VERSION, description=project_information.package_description, long_description=project_information.package_description, author="Joachim Metz", author_email="joachim.metz@gmail.com", license="GNU Lesser General Public License v3 or later (LGPLv3+)", cmdclass={ "build_ext": custom_build_ext, "bdist_rpm": custom_bdist_rpm, "sdist": custom_sdist, }, ext_modules=[ Extension( project_information.module_name, define_macros=DEFINE_MACROS, include_dirs=project_information.include_directories, libraries=[], library_dirs=[], sources=SOURCES, ), ], data_files=[(PYTHON_LIBRARY_DIRECTORY, LIBRARY_DATA_FILES)], ) os.remove(license_file) libevt-20170120/config.guess0000755000175000017500000012367213040342656017671 0ustar00lordyestalordyesta00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-01-01' # 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: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; 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". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[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 [ -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 echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libevt-20170120/NEWS0000644000175000017500000000000011642277124016026 0ustar00lordyestalordyesta00000000000000libevt-20170120/test-driver0000755000175000017500000001104013040342660017523 0ustar00lordyestalordyesta00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2013-07-13.22; # UTC # Copyright (C) 2011-2014 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 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 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libevt-20170120/libevt.spec0000664000175000017500000000501013040342671017472 0ustar00lordyestalordyesta00000000000000Name: libevt Version: 20170120 Release: 1 Summary: Library to access the Windows Event Log (EVT) format Group: System Environment/Libraries License: LGPL Source: %{name}-%{version}.tar.gz URL: https://github.com/libyal/libevt/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description libevt is a library to access the Windows Event Log (EVT) format %package devel Summary: Header files and libraries for developing applications for libevt Group: Development/Libraries Requires: libevt = %{version}-%{release} %description devel Header files and libraries for developing applications for libevt. %package tools Summary: Several tools for reading Windows Event Log (EVT) files Group: Applications/System Requires: libevt = %{version}-%{release} %description tools Several tools for reading Windows Event Log (EVT) files %package python Summary: Python 2 bindings for libevt Group: System Environment/Libraries Requires: libevt = %{version}-%{release} python BuildRequires: python-devel %description python Python 2 bindings for libevt %package python3 Summary: Python 3 bindings for libevt Group: System Environment/Libraries Requires: libevt = %{version}-%{release} python3 BuildRequires: python3-devel %description python3 Python 3 bindings for libevt %prep %setup -q %build %configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} --enable-python2 --enable-python3 make %{?_smp_mflags} %install rm -rf %{buildroot} %make_install %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %attr(755,root,root) %{_libdir}/*.so.* %files devel %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README ChangeLog %{_libdir}/*.a %{_libdir}/*.la %{_libdir}/*.so %{_libdir}/pkgconfig/libevt.pc %{_includedir}/* %{_mandir}/man3/* %files tools %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %attr(755,root,root) %{_bindir}/evtexport %attr(755,root,root) %{_bindir}/evtinfo %{_mandir}/man1/* %files python %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %{_libdir}/python2*/site-packages/*.a %{_libdir}/python2*/site-packages/*.la %{_libdir}/python2*/site-packages/*.so %files python3 %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %{_libdir}/python3*/site-packages/*.a %{_libdir}/python3*/site-packages/*.la %{_libdir}/python3*/site-packages/*.so %changelog * Fri Jan 20 2017 Joachim Metz 20170120-1 - Auto-generated libevt-20170120/configure0000774000175000017500000677376613040342655017305 0ustar00lordyestalordyesta00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for libevt 20170120. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # 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'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_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="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 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 \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : 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'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: joachim.metz@gmail.com about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_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_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # 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 } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -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='libevt' PACKAGE_TARNAME='libevt' PACKAGE_VERSION='20170120' PACKAGE_STRING='libevt 20170120' PACKAGE_BUGREPORT='joachim.metz@gmail.com' PACKAGE_URL='' ac_unique_file="include/libevt.h.in" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" gt_needs= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS PWD SPEC_DATE DPKG_DATE libevt_tools_spec_build_requires libevt_spec_build_requires libevt_spec_requires HAVE_PYTHON_TESTS_FALSE HAVE_PYTHON_TESTS_TRUE HAVE_PYTHON3_FALSE HAVE_PYTHON3_TRUE PYTHON3_PACKAGE_DIR PYTHON3_LIBRARY_DIR pyexecdir3 pythondir3 PYTHON3_EXEC_PREFIX PYTHON3_PREFIX PYTHON3_LDFLAGS PYTHON3_CPPFLAGS PYTHON3_CONFIG PYTHON3_PLATFORM PYTHON3_VERSION PYTHON3 HAVE_PYTHON2_FALSE HAVE_PYTHON2_TRUE PYTHON2_PACKAGE_DIR PYTHON2_LIBRARY_DIR pyexecdir2 pythondir2 PYTHON2_EXEC_PREFIX PYTHON2_PREFIX PYTHON2_LDFLAGS PYTHON2_CPPFLAGS PYTHON2_CONFIG PYTHON2_PLATFORM PYTHON2_VERSION PYTHON2 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_VERSION PYTHON LIBEVT_DLL_IMPORT STATIC_LDFLAGS ax_libcdirectory_spec_build_requires ax_libcdirectory_spec_requires ax_libcdirectory_pc_libs_private LIBCDIRECTORY_LIBADD LIBCDIRECTORY_CPPFLAGS HAVE_LOCAL_LIBCDIRECTORY_FALSE HAVE_LOCAL_LIBCDIRECTORY_TRUE HAVE_LOCAL_LIBCDIRECTORY HAVE_LIBCDIRECTORY libcdirectory_LIBS libcdirectory_CFLAGS ax_libwrc_spec_build_requires ax_libwrc_spec_requires ax_libwrc_pc_libs_private LIBWRC_LIBADD LIBWRC_CPPFLAGS HAVE_LOCAL_LIBWRC_FALSE HAVE_LOCAL_LIBWRC_TRUE HAVE_LOCAL_LIBWRC HAVE_LIBWRC libwrc_LIBS libwrc_CFLAGS ax_libregf_spec_build_requires ax_libregf_spec_requires ax_libregf_pc_libs_private LIBREGF_LIBADD LIBREGF_CPPFLAGS HAVE_LOCAL_LIBREGF_FALSE HAVE_LOCAL_LIBREGF_TRUE HAVE_LOCAL_LIBREGF HAVE_LIBREGF libregf_LIBS libregf_CFLAGS ax_libexe_spec_build_requires ax_libexe_spec_requires ax_libexe_pc_libs_private LIBEXE_LIBADD LIBEXE_CPPFLAGS HAVE_LOCAL_LIBEXE_FALSE HAVE_LOCAL_LIBEXE_TRUE HAVE_LOCAL_LIBEXE HAVE_LIBEXE libexe_LIBS libexe_CFLAGS ax_libfwevt_spec_build_requires ax_libfwevt_spec_requires ax_libfwevt_pc_libs_private LIBFWEVT_LIBADD LIBFWEVT_CPPFLAGS HAVE_LOCAL_LIBFWEVT_FALSE HAVE_LOCAL_LIBFWEVT_TRUE HAVE_LOCAL_LIBFWEVT HAVE_LIBFWEVT libfwevt_LIBS libfwevt_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 HAVE_DLLMAIN 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_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 POSUB LTLIBINTL LIBINTL INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 MSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS PKGCONFIG LIBTOOL_DEPS LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED LIBTOOL EGREP GREP CPP OBJDUMP DLLTOOL AS am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_largefile enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_nls enable_rpath with_libiconv_prefix with_libintl_prefix enable_winapi enable_wide_character_type with_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_libfdatetime with_libfguid with_libfvalue with_libfwnt enable_verbose_output enable_debug_output with_libfcache with_libfdata with_libfwevt with_libexe with_libregf with_libwrc with_libcdirectory enable_static_executables with_pyprefix enable_python with_pythondir enable_python2 with_pythondir2 enable_python3 with_pythondir3 ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP LT_SYS_LIBRARY_PATH 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 libfdatetime_CFLAGS libfdatetime_LIBS libfguid_CFLAGS libfguid_LIBS libfvalue_CFLAGS libfvalue_LIBS libfwnt_CFLAGS libfwnt_LIBS libfcache_CFLAGS libfcache_LIBS libfdata_CFLAGS libfdata_LIBS libfwevt_CFLAGS libfwevt_LIBS libexe_CFLAGS libexe_LIBS libregf_CFLAGS libregf_LIBS libwrc_CFLAGS libwrc_LIBS libcdirectory_CFLAGS libcdirectory_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures libevt 20170120 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/libevt] --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 libevt 20170120:";; 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") --disable-largefile omit support for large files --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths --enable-winapi enable WINAPI support for cross-compilation [default=auto-detect] --enable-wide-character-type enable wide character type support [default=no] --enable-multi-threading-support enable multi-threading support [default=yes] --enable-verbose-output enable verbose output [default=no] --enable-debug-output enable debug output [default=no] --enable-static-executables build static executables (binaries) [default=no] --enable-python build Python bindings [default=no] --enable-python2 build Python 2 bindings [default=no] --enable-python3 build Python 3 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-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-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-libfwevt[=DIR] search for libfwevt in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libexe[=DIR] search for libexe in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libregf[=DIR] search for libregf in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libwrc[=DIR] search for libwrc in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libcdirectory[=DIR] search for libcdirectory 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-pythondir2[=no] use to specify the Python 2 directory (pythondir2) [default=no] --with-pythondir3[=no] use to specify the Python 3 directory (pythondir3) [default=no] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor LT_SYS_LIBRARY_PATH User-defined run-time library search path. 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 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 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 libfwevt_CFLAGS C compiler flags for libfwevt, overriding pkg-config libfwevt_LIBS linker flags for libfwevt, overriding pkg-config libexe_CFLAGS C compiler flags for libexe, overriding pkg-config libexe_LIBS linker flags for libexe, overriding pkg-config libregf_CFLAGS C compiler flags for libregf, overriding pkg-config libregf_LIBS linker flags for libregf, overriding pkg-config libwrc_CFLAGS C compiler flags for libwrc, overriding pkg-config libwrc_LIBS linker flags for libwrc, overriding pkg-config libcdirectory_CFLAGS C compiler flags for libcdirectory, overriding pkg-config libcdirectory_LIBS linker flags for libcdirectory, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF libevt configure 20170120 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------- ## ## Report this to joachim.metz@gmail.com ## ## ------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return 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 () { 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_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return 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 () { 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_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by libevt $as_me 20170120, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi gt_needs="$gt_needs " # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if 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+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "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=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do 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 (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; 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} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$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='libevt' VERSION='20170120' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # 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` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 $as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } if test $am_uid -le $am_max_uid; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } _am_tools=none fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 $as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } if test $am_gid -le $am_max_gid; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } _am_tools=none fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 $as_echo_n "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 ${am_cv_prog_tar_ustar+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_ustar=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 $as_echo "$am_cv_prog_tar_ustar" >&6; } # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$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= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$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= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 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 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 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 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" 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 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" 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 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test 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}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # 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='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. 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*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be 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=/usr/bin/file 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 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=$? $as_echo "$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.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test 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++, # 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$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+set}" = set; 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file 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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test 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 } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; 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 pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; 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 if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test 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, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test 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\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) 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 ;; 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 == "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 ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -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 ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test 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++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-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 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*) 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) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test 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 ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test 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*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # 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*) # 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 ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; 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_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test 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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKGCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKGCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKGCONFIG=$ac_cv_path_PKGCONFIG if test -n "$PKGCONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 $as_echo "$PKGCONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.18 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$localedir" || localedir='${datadir}/locale' test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _LP64 sixtyfour bits #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sixtyfour bits" >/dev/null 2>&1; then : gl_cv_solaris_64bit=yes else gl_cv_solaris_64bit=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi 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 dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; 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" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFPreferencesCopyAppValue=yes else gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFLocaleCopyCurrent(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFLocaleCopyCurrent=yes else gt_cv_func_CFLocaleCopyCurrent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } if eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" else eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } /* 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 const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes else am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi 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 dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; 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" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } if eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" else eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 $as_echo_n "checking whether to use NLS... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 $as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 $as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 $as_echo_n "checking how to link with libintl... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 $as_echo "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #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}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this 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; } { /* AIX 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 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } if ${ac_cv_c_volatile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { volatile int x; int * volatile y = (int *) 0; return !x && !y; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_volatile=yes else ac_cv_c_volatile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 $as_echo "$ac_cv_c_volatile" >&6; } if test $ac_cv_c_volatile = no; then $as_echo "#define volatile /**/" >>confdefs.h fi # Check whether --enable-winapi was given. if test "${enable_winapi+set}" = set; then : enableval=$enable_winapi; ac_cv_enable_winapi=$enableval else ac_cv_enable_winapi=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable WINAPI support for cross-compilation" >&5 $as_echo_n "checking whether to enable enable WINAPI support for cross-compilation... " >&6; } if ${ac_cv_enable_winapi+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_winapi=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_winapi" >&5 $as_echo "$ac_cv_enable_winapi" >&6; } if test "x$ac_cv_enable_winapi" = xauto-detect; then : ac_common_check_winapi_target_string="$target" if test "x$ac_common_check_winapi_target_string" = x; then : ac_common_check_winapi_target_string="$host" fi case $ac_common_check_winapi_target_string in #( *mingw*) : { $as_echo "$as_me:${as_lineno-$LINENO}: detected MinGW enabling WINAPI support for cross-compilation" >&5 $as_echo "$as_me: detected MinGW enabling WINAPI support for cross-compilation" >&6;} ac_cv_enable_winapi=yes ;; #( *) : ac_cv_enable_winapi=no ;; #( *) : ;; esac fi # Check whether --enable-wide-character-type was given. if test "${enable_wide_character_type+set}" = set; then : enableval=$enable_wide_character_type; ac_cv_enable_wide_character_type=$enableval else ac_cv_enable_wide_character_type=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable wide character type support" >&5 $as_echo_n "checking whether to enable enable wide character type support... " >&6; } if ${ac_cv_enable_wide_character_type+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_wide_character_type=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_wide_character_type" >&5 $as_echo "$ac_cv_enable_wide_character_type" >&6; } if test "x$ac_cv_enable_winapi" = xyes; then : ac_cv_enable_wide_character_type=yes fi if test "x$ac_cv_enable_wide_character_type" = xyes; then : $as_echo "#define HAVE_WIDE_CHARACTER_TYPE 1" >>confdefs.h HAVE_WIDE_CHARACTER_TYPE=1 else HAVE_WIDE_CHARACTER_TYPE=0 fi for ac_header in sys/types.h inttypes.h stdint.h wchar.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_header_sys_types_h" = xyes; then : HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi if test "x$ac_cv_header_inttypes_h" = xyes; then : HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi if test "x$ac_cv_header_stdint_h" = xyes; then : HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi if test "x$ac_cv_header_wchar_h" = xyes; then : HAVE_WCHAR_H=1 else 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 cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_c_check_type "$LINENO" "size32_t" "ac_cv_type_size32_t" "$ac_includes_default" if test "x$ac_cv_type_size32_t" = xyes; then : HAVE_SIZE32_T=1 else HAVE_SIZE32_T=0 fi ac_fn_c_check_type "$LINENO" "ssize32_t" "ac_cv_type_ssize32_t" "$ac_includes_default" if test "x$ac_cv_type_ssize32_t" = xyes; then : HAVE_SSIZE32_T=1 else HAVE_SSIZE32_T=0 fi ac_fn_c_check_type "$LINENO" "size64_t" "ac_cv_type_size64_t" "$ac_includes_default" if test "x$ac_cv_type_size64_t" = xyes; then : HAVE_SIZE64_T=1 else HAVE_SIZE64_T=0 fi ac_fn_c_check_type "$LINENO" "ssize64_t" "ac_cv_type_ssize64_t" "$ac_includes_default" if test "x$ac_cv_type_ssize64_t" = xyes; then : HAVE_SSIZE64_T=1 else HAVE_SSIZE64_T=0 fi ac_fn_c_check_type "$LINENO" "off64_t" "ac_cv_type_off64_t" "$ac_includes_default" if test "x$ac_cv_type_off64_t" = xyes; then : HAVE_OFF64_T=1 else HAVE_OFF64_T=0 fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : fi ac_fn_c_check_type "$LINENO" "u64" "ac_cv_type_u64" "$ac_includes_default" if test "x$ac_cv_type_u64" = xyes; then : fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 $as_echo_n "checking size of off_t... " >&6; } if ${ac_cv_sizeof_off_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : else if test "$ac_cv_type_off_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (off_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_off_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 $as_echo "$ac_cv_sizeof_off_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_OFF_T $ac_cv_sizeof_off_t _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : else if test "$ac_cv_type_size_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 $as_echo "$ac_cv_sizeof_size_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF if test "x$ac_cv_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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 $as_echo_n "checking size of wchar_t... " >&6; } if ${ac_cv_sizeof_wchar_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"; then : else if test "$ac_cv_type_wchar_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (wchar_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_wchar_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 $as_echo "$ac_cv_sizeof_wchar_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t _ACEOF fi if test "x$ac_cv_enable_winapi" = xyes; then : for ac_header in windows.h do : ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" if test "x$ac_cv_header_windows_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINDOWS_H 1 _ACEOF fi done if test "x$ac_cv_header_windows_h" = xno; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing header: windows.h header is required to compile with winapi support See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_enable_winapi" = xno; then : for ac_header in libintl.h do : ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINTL_H 1 _ACEOF fi done fi for ac_header in limits.h do : ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" if test "x$ac_cv_header_limits_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIMITS_H 1 _ACEOF fi done for ac_header in stdlib.h string.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in wchar.h wctype.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in fclose feof fgets fopen fread fseeko fseeko64 fwrite vfprintf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fclose" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fclose See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_feof" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: feof See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fgets" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fgets See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fopen" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fopen See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fread" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fread See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fseeko" != xyes && test "x$ac_cv_func_fseeko64" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fseeko and fseeko64 See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fwrite" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fwrite See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_vfprintf" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: vfprintf See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_enable_wide_character_type" != xno; then : for ac_func in fgetws do : ac_fn_c_check_func "$LINENO" "fgetws" "ac_cv_func_fgetws" if test "x$ac_cv_func_fgetws" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FGETWS 1 _ACEOF fi done if test "x$ac_cv_func_fgetws" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fgetws See \`config.log' for more details" "$LINENO" 5; } fi fi for ac_func in free malloc memcmp memcpy memset realloc do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_free" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: free See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_malloc" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: malloc See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memcmp" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: memcmp See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memcpy" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: memcpy See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memset" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: memset See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_realloc" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: realloc See \`config.log' for more details" "$LINENO" 5; } fi for ac_func in memchr memrchr snprintf sscanf strcasecmp strchr strlen strncasecmp strncmp strncpy strnicmp strrchr strstr vsnprintf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_memchr" != xyes && test "x$ac_cv_func_strchr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: memchr and strchr See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memcmp" != xyes && test "x$ac_cv_func_strncmp" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: memcmp and strncmp See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memcpy" != xyes && test "x$ac_cv_func_strncpy" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: memcpy and strncpy See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memrchr" = xyes; then : ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" if test "x$ac_cv_have_decl_memrchr" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_MEMRCHR $ac_have_decl _ACEOF if test "x$ac_cv_decl_memrchr" != xyes; then : ac_cv_func_memrchr=no fi fi if test "x$ac_cv_func_memrchr" != xyes && test "x$ac_cv_func_strrchr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: strrchr and memrchr See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_snprintf" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: snprintf See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_sscanf" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: sscanf See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_strlen" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: strlen See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_strcasecmp" != xyes && test "x$ac_cv_func_strncasecmp" != xyes && test "x$ac_cv_func_strnicmp" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: strncasecmp, strcasecmp and strnicmp See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_strstr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: strstr See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_vsnprintf" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: vsnprintf See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_enable_wide_character_type" != xno; then : for ac_func in swprintf towlower wcscasecmp wcschr wcslen wcsncasecmp wcsncmp wcsncpy wcsnicmp wcsrchr wcsstr wmemchr wmemcmp wmemcpy wmemrchr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_swprintf" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: swprintf See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wmemchr" != xyes && test "x$ac_cv_func_wcschr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wmemchr and wcschr See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wmemcmp" != xyes && test "x$ac_cv_func_wcsncmp" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wmemcmp and wcsncmp See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wmemcpy" != xyes && test "x$ac_cv_func_wcsncpy" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wmemcpy and wcsncpy See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wmemrchr" != xyes && test "x$ac_cv_func_wcsrchr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wmemrchr and wcsrchr See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wcslen" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: wcslen See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wcsncasecmp" != xyes && test "x$ac_cv_func_wcscasecmp" != xyes && test "x$ac_cv_func_wcsnicmp" != xyes && test "x$ac_cv_func_towlower" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wcsncasecmp, wcscasecmp, wcsnicmp and towlower See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wcsstr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: wcsstr See \`config.log' for more details" "$LINENO" 5; } fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%jd\"" >&5 $as_echo_n "checking whether printf supports the conversion specifier \"%jd\"... " >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { printf( "%jd" ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_cv_have_printf_jd=no else ac_cv_cv_have_printf_jd=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "x$ac_cv_cv_have_printf_jd" = xyes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { printf( "%jd", (off_t) 10 ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_cv_have_printf_jd=yes else ac_cv_cv_have_printf_jd=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "x$ac_cv_cv_have_printf_jd" = xyes; then : if test "$cross_compiling" = yes; then : ac_cv_cv_have_printf_jd=undetermined else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { char string[ 3 ]; if( snprintf( string, 3, "%jd", (off_t) 10 ) < 0 ) return( 1 ); if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_cv_have_printf_jd=yes else ac_cv_cv_have_printf_jd=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$SAVE_CFLAGS" if test "x$ac_cv_cv_have_printf_jd" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_PRINTF_JD 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_have_printf_jd" >&5 $as_echo "$ac_cv_cv_have_printf_jd" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%zd\"" >&5 $as_echo_n "checking whether printf supports the conversion specifier \"%zd\"... " >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { printf( "%zd" ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_cv_have_printf_zd=no else ac_cv_cv_have_printf_zd=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "x$ac_cv_cv_have_printf_zd" = xyes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { printf( "%zd", (size_t) 10 ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_cv_have_printf_zd=yes else ac_cv_cv_have_printf_zd=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "x$ac_cv_cv_have_printf_zd" = xyes; then : if test "$cross_compiling" = yes; then : ac_cv_cv_have_printf_zd=undetermined else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { char string[ 3 ]; if( snprintf( string, 3, "%zd", (size_t) 10 ) < 0 ) return( 1 ); if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_cv_have_printf_zd=yes else ac_cv_cv_have_printf_zd=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$SAVE_CFLAGS" if test "x$ac_cv_cv_have_printf_zd" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_PRINTF_ZD 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_have_printf_zd" >&5 $as_echo "$ac_cv_cv_have_printf_zd" >&6; } fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Check whether --with-libcerror was given. if test "${with_libcerror+set}" = set; then : withval=$with_libcerror; ac_cv_with_libcerror=$withval else ac_cv_with_libcerror=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcerror=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcerror" >&5 $as_echo "$ac_cv_with_libcerror" >&6; } if test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xno && test "x$ac_cv_with_libcerror" != xauto-detect; then : if test -d "$ac_cv_with_libcerror"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcerror}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcerror}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcerror" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcerror" >&2;} fi fi if test "x$ac_cv_with_libcerror" = xno; then : ac_cv_libcerror=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror" >&5 $as_echo_n "checking for libcerror... " >&6; } if test -n "$libcerror_CFLAGS"; then pkg_cv_libcerror_CFLAGS="$libcerror_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcerror >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcerror >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcerror_CFLAGS=`$PKG_CONFIG --cflags "libcerror >= 20120425" 2>/dev/null` 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcerror >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcerror >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcerror_LIBS=`$PKG_CONFIG --libs "libcerror >= 20120425" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcerror_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --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=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcerror=no else libcerror_CFLAGS=$pkg_cv_libcerror_CFLAGS libcerror_LIBS=$pkg_cv_libcerror_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcerror=yes fi fi if test "x$ac_cv_libcerror" = xyes; then : ac_cv_libcerror_CPPFLAGS="$pkg_cv_libcerror_CFLAGS" ac_cv_libcerror_LIBADD="$pkg_cv_libcerror_LIBS" else for ac_header in libcerror.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcerror.h" "ac_cv_header_libcerror_h" "$ac_includes_default" if test "x$ac_cv_header_libcerror_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCERROR_H 1 _ACEOF fi done if test "x$ac_cv_header_libcerror_h" = xno; then : ac_cv_libcerror=no else ac_cv_libcerror=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_get_version in -lcerror" >&5 $as_echo_n "checking for libcerror_get_version in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_get_version (); int main () { return libcerror_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_get_version=yes else ac_cv_lib_cerror_libcerror_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_get_version" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_get_version" >&6; } if test "x$ac_cv_lib_cerror_libcerror_get_version" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_free in -lcerror" >&5 $as_echo_n "checking for libcerror_error_free in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_free (); int main () { return libcerror_error_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_free=yes else ac_cv_lib_cerror_libcerror_error_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_free" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_free" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_free" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_set in -lcerror" >&5 $as_echo_n "checking for libcerror_error_set in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_set (); int main () { return libcerror_error_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_set=yes else ac_cv_lib_cerror_libcerror_error_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_set" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_set" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_set" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_matches in -lcerror" >&5 $as_echo_n "checking for libcerror_error_matches in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_matches+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_matches (); int main () { return libcerror_error_matches (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_matches=yes else ac_cv_lib_cerror_libcerror_error_matches=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_matches" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_matches" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_matches" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_fprint in -lcerror" >&5 $as_echo_n "checking for libcerror_error_fprint in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_fprint+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_fprint (); int main () { return libcerror_error_fprint (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_fprint=yes else ac_cv_lib_cerror_libcerror_error_fprint=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_fprint" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_fprint" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_fprint" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_sprint in -lcerror" >&5 $as_echo_n "checking for libcerror_error_sprint in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_sprint+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_sprint (); int main () { return libcerror_error_sprint (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_sprint=yes else ac_cv_lib_cerror_libcerror_error_sprint=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_sprint" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_sprint" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_sprint" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_backtrace_fprint in -lcerror" >&5 $as_echo_n "checking for libcerror_error_backtrace_fprint in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_backtrace_fprint+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_backtrace_fprint (); int main () { return libcerror_error_backtrace_fprint (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_backtrace_fprint=yes else ac_cv_lib_cerror_libcerror_error_backtrace_fprint=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_backtrace_fprint" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_backtrace_fprint" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_backtrace_fprint" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_backtrace_sprint in -lcerror" >&5 $as_echo_n "checking for libcerror_error_backtrace_sprint in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_backtrace_sprint+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_backtrace_sprint (); int main () { return libcerror_error_backtrace_sprint (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_backtrace_sprint=yes else ac_cv_lib_cerror_libcerror_error_backtrace_sprint=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_backtrace_sprint" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_backtrace_sprint" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_backtrace_sprint" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_system_set_error in -lcerror" >&5 $as_echo_n "checking for libcerror_system_set_error in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_system_set_error+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_system_set_error (); int main () { return libcerror_system_set_error (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_system_set_error=yes else ac_cv_lib_cerror_libcerror_system_set_error=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_system_set_error" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_system_set_error" >&6; } if test "x$ac_cv_lib_cerror_libcerror_system_set_error" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi ac_cv_libcerror_LIBADD="-lcerror" fi fi fi if test "x$ac_cv_libcerror" = xyes; then : $as_echo "#define HAVE_LIBCERROR 1" >>confdefs.h fi if test "x$ac_cv_libcerror" = xyes; then : HAVE_LIBCERROR=1 else HAVE_LIBCERROR=0 fi if test "x$ac_cv_libcerror" != xyes; then : for ac_header in stdarg.h varargs.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing headers: stdarg.h and varargs.h See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_enable_wide_character_type" != xno; then : for ac_func in wcstombs do : ac_fn_c_check_func "$LINENO" "wcstombs" "ac_cv_func_wcstombs" if test "x$ac_cv_func_wcstombs" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WCSTOMBS 1 _ACEOF fi done if test "x$ac_cv_func_wcstombs" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: wcstombs See \`config.log' for more details" "$LINENO" 5; } fi fi ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" if test "x$ac_cv_have_decl_strerror_r" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR_R $ac_have_decl _ACEOF for ac_func in strerror_r do : ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" if test "x$ac_cv_func_strerror_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRERROR_R 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 $as_echo_n "checking whether strerror_r returns char *... " >&6; } if ${ac_cv_func_strerror_r_char_p+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_func_strerror_r_char_p=no if test $ac_cv_have_decl_strerror_r = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { char buf[100]; char x = *strerror_r (0, buf, sizeof buf); char *p = strerror_r (0, buf, sizeof buf); return !p || x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_strerror_r_char_p=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else # strerror_r is not declared. Choose between # systems that have relatively inaccessible declarations for the # function. BeOS and DEC UNIX 4.0 fall in this category, but the # former has a strerror_r that returns char*, while the latter # has a strerror_r that returns `int'. # This test should segfault on the DEC system. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default extern char *strerror_r (); int main () { char buf[100]; char x = *strerror_r (0, buf, sizeof buf); return ! isalpha (x); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_strerror_r_char_p=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; } if test $ac_cv_func_strerror_r_char_p = yes; then $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h fi if test "x$ac_cv_have_decl_strerror_r" != xyes; then : for ac_func in strerror do : ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRERROR 1 _ACEOF fi done if test "x$ac_cv_func_strerror" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: strerror_r and strerror See \`config.log' for more details" "$LINENO" 5; } fi fi ac_cv_libcerror_CPPFLAGS="-I../libcerror"; ac_cv_libcerror_LIBADD="../libcerror/libcerror.la"; ac_cv_libcerror=local $as_echo "#define HAVE_LOCAL_LIBCERROR 1" >>confdefs.h HAVE_LOCAL_LIBCERROR=1 fi if test "x$ac_cv_libcerror" = xlocal; then HAVE_LOCAL_LIBCERROR_TRUE= HAVE_LOCAL_LIBCERROR_FALSE='#' else HAVE_LOCAL_LIBCERROR_TRUE='#' HAVE_LOCAL_LIBCERROR_FALSE= fi if test "x$ac_cv_libcerror_CPPFLAGS" != "x"; then : LIBCERROR_CPPFLAGS=$ac_cv_libcerror_CPPFLAGS fi if test "x$ac_cv_libcerror_LIBADD" != "x"; then : LIBCERROR_LIBADD=$ac_cv_libcerror_LIBADD fi if test "x$ac_cv_libcerror" = xyes; then : ax_libcerror_pc_libs_private=-lcerror fi if test "x$ac_cv_libcerror" = xyes; then : ax_libcerror_spec_requires=libcerror ax_libcerror_spec_build_requires=libcerror-devel fi # Check whether --enable-multi-threading-support was given. if test "${enable_multi_threading_support+set}" = set; then : enableval=$enable_multi_threading_support; ac_cv_enable_multi_threading_support=$enableval else ac_cv_enable_multi_threading_support=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable multi-threading support" >&5 $as_echo_n "checking whether to enable enable multi-threading support... " >&6; } if ${ac_cv_enable_multi_threading_support+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_multi_threading_support=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_multi_threading_support" >&5 $as_echo "$ac_cv_enable_multi_threading_support" >&6; } # Check whether --with-libcthreads was given. if test "${with_libcthreads+set}" = set; then : withval=$with_libcthreads; ac_cv_with_libcthreads=$withval else ac_cv_with_libcthreads=auto-detect fi { $as_echo "$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 $as_echo_n "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 ${ac_cv_with_libcthreads+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcthreads=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcthreads" >&5 $as_echo "$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 if test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xno && test "x$ac_cv_with_libcthreads" != xauto-detect; 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_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcthreads" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcthreads" >&2;} fi fi if test "x$ac_cv_with_libcthreads" = xno; then : ac_cv_libcthreads=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads" >&5 $as_echo_n "checking for libcthreads... " >&6; } if test -n "$libcthreads_CFLAGS"; then pkg_cv_libcthreads_CFLAGS="$libcthreads_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcthreads >= 20160404\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcthreads >= 20160404") 2>&5 ac_status=$? $as_echo "$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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcthreads >= 20160404\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcthreads >= 20160404") 2>&5 ac_status=$? $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then 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=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcthreads=no else libcthreads_CFLAGS=$pkg_cv_libcthreads_CFLAGS libcthreads_LIBS=$pkg_cv_libcthreads_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "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" else for ac_header in libcthreads.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcthreads.h" "ac_cv_header_libcthreads_h" "$ac_includes_default" if test "x$ac_cv_header_libcthreads_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCTHREADS_H 1 _ACEOF fi done if test "x$ac_cv_header_libcthreads_h" = xno; then : ac_cv_libcthreads=no else ac_cv_libcthreads=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_get_version in -lcthreads" >&5 $as_echo_n "checking for libcthreads_get_version in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_get_version+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_get_version (); int main () { return libcthreads_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_get_version=yes else ac_cv_lib_cthreads_libcthreads_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_get_version" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_create in -lcthreads" >&5 $as_echo_n "checking for libcthreads_thread_create in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_thread_create+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_thread_create (); int main () { return libcthreads_thread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_thread_create=yes else ac_cv_lib_cthreads_libcthreads_thread_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_create" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_join in -lcthreads" >&5 $as_echo_n "checking for libcthreads_thread_join in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_thread_join+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_thread_join (); int main () { return libcthreads_thread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_thread_join=yes else ac_cv_lib_cthreads_libcthreads_thread_join=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_join" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_attributes_initialize in -lcthreads" >&5 $as_echo_n "checking for libcthreads_thread_attributes_initialize in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_thread_attributes_initialize (); int main () { 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 ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_attributes_free in -lcthreads" >&5 $as_echo_n "checking for libcthreads_thread_attributes_free in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_thread_attributes_free+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_thread_attributes_free (); int main () { 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 ac_cv_lib_cthreads_libcthreads_thread_attributes_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_attributes_free" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_initialize in -lcthreads" >&5 $as_echo_n "checking for libcthreads_condition_initialize in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_condition_initialize+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_condition_initialize (); int main () { return libcthreads_condition_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_condition_initialize=yes else ac_cv_lib_cthreads_libcthreads_condition_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_initialize" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_free in -lcthreads" >&5 $as_echo_n "checking for libcthreads_condition_free in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_condition_free+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_condition_free (); int main () { return libcthreads_condition_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_condition_free=yes else ac_cv_lib_cthreads_libcthreads_condition_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_free" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_broadcast in -lcthreads" >&5 $as_echo_n "checking for libcthreads_condition_broadcast in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_condition_broadcast+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_condition_broadcast (); int main () { return libcthreads_condition_broadcast (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_condition_broadcast=yes else ac_cv_lib_cthreads_libcthreads_condition_broadcast=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_broadcast" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_signal in -lcthreads" >&5 $as_echo_n "checking for libcthreads_condition_signal in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_condition_signal+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_condition_signal (); int main () { return libcthreads_condition_signal (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_condition_signal=yes else ac_cv_lib_cthreads_libcthreads_condition_signal=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_signal" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_wait in -lcthreads" >&5 $as_echo_n "checking for libcthreads_condition_wait in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_condition_wait+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_condition_wait (); int main () { return libcthreads_condition_wait (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_condition_wait=yes else ac_cv_lib_cthreads_libcthreads_condition_wait=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_wait" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_initialize in -lcthreads" >&5 $as_echo_n "checking for libcthreads_lock_initialize in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_lock_initialize+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_lock_initialize (); int main () { return libcthreads_lock_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_lock_initialize=yes else ac_cv_lib_cthreads_libcthreads_lock_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_initialize" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_free in -lcthreads" >&5 $as_echo_n "checking for libcthreads_lock_free in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_lock_free+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_lock_free (); int main () { return libcthreads_lock_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_lock_free=yes else ac_cv_lib_cthreads_libcthreads_lock_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_free" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_grab in -lcthreads" >&5 $as_echo_n "checking for libcthreads_lock_grab in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_lock_grab+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_lock_grab (); int main () { return libcthreads_lock_grab (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_lock_grab=yes else ac_cv_lib_cthreads_libcthreads_lock_grab=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_grab" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_release in -lcthreads" >&5 $as_echo_n "checking for libcthreads_lock_release in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_lock_release+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_lock_release (); int main () { return libcthreads_lock_release (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_lock_release=yes else ac_cv_lib_cthreads_libcthreads_lock_release=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_release" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_initialize in -lcthreads" >&5 $as_echo_n "checking for libcthreads_mutex_initialize in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_mutex_initialize+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_mutex_initialize (); int main () { return libcthreads_mutex_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_mutex_initialize=yes else ac_cv_lib_cthreads_libcthreads_mutex_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_initialize" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_free in -lcthreads" >&5 $as_echo_n "checking for libcthreads_mutex_free in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_mutex_free+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_mutex_free (); int main () { return libcthreads_mutex_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_mutex_free=yes else ac_cv_lib_cthreads_libcthreads_mutex_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_free" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_grab in -lcthreads" >&5 $as_echo_n "checking for libcthreads_mutex_grab in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_mutex_grab+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_mutex_grab (); int main () { return libcthreads_mutex_grab (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_mutex_grab=yes else ac_cv_lib_cthreads_libcthreads_mutex_grab=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_grab" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_try_grab in -lcthreads" >&5 $as_echo_n "checking for libcthreads_mutex_try_grab in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_mutex_try_grab+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_mutex_try_grab (); int main () { 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 ac_cv_lib_cthreads_libcthreads_mutex_try_grab=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_try_grab" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_release in -lcthreads" >&5 $as_echo_n "checking for libcthreads_mutex_release in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_mutex_release+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_mutex_release (); int main () { return libcthreads_mutex_release (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_mutex_release=yes else ac_cv_lib_cthreads_libcthreads_mutex_release=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_release" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_initialize in -lcthreads" >&5 $as_echo_n "checking for libcthreads_read_write_lock_initialize in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_read_write_lock_initialize (); int main () { 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 ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_free in -lcthreads" >&5 $as_echo_n "checking for libcthreads_read_write_lock_free in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_read_write_lock_free+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_read_write_lock_free (); int main () { 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 ac_cv_lib_cthreads_libcthreads_read_write_lock_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_free" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_grab_for_read in -lcthreads" >&5 $as_echo_n "checking for libcthreads_read_write_lock_grab_for_read in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_read_write_lock_grab_for_read (); int main () { 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 ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_grab_for_write in -lcthreads" >&5 $as_echo_n "checking for libcthreads_read_write_lock_grab_for_write in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_read_write_lock_grab_for_write (); int main () { 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 ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_release_for_read in -lcthreads" >&5 $as_echo_n "checking for libcthreads_read_write_lock_release_for_read in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_read_write_lock_release_for_read (); int main () { 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 ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_release_for_write in -lcthreads" >&5 $as_echo_n "checking for libcthreads_read_write_lock_release_for_write in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_read_write_lock_release_for_write (); int main () { 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 ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_initialize in -lcthreads" >&5 $as_echo_n "checking for libcthreads_queue_initialize in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_queue_initialize+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_queue_initialize (); int main () { return libcthreads_queue_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_queue_initialize=yes else ac_cv_lib_cthreads_libcthreads_queue_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_initialize" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_free in -lcthreads" >&5 $as_echo_n "checking for libcthreads_queue_free in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_queue_free+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_queue_free (); int main () { return libcthreads_queue_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_queue_free=yes else ac_cv_lib_cthreads_libcthreads_queue_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_free" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_type_pop in -lcthreads" >&5 $as_echo_n "checking for libcthreads_queue_type_pop in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_queue_type_pop+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_queue_type_pop (); int main () { 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 ac_cv_lib_cthreads_libcthreads_queue_type_pop=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_type_pop" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_pop in -lcthreads" >&5 $as_echo_n "checking for libcthreads_queue_pop in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_queue_pop+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_queue_pop (); int main () { return libcthreads_queue_pop (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_queue_pop=yes else ac_cv_lib_cthreads_libcthreads_queue_pop=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_pop" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_try_push in -lcthreads" >&5 $as_echo_n "checking for libcthreads_queue_try_push in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_queue_try_push+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_queue_try_push (); int main () { 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 ac_cv_lib_cthreads_libcthreads_queue_try_push=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_try_push" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_push in -lcthreads" >&5 $as_echo_n "checking for libcthreads_queue_push in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_queue_push+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_queue_push (); int main () { return libcthreads_queue_push (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cthreads_libcthreads_queue_push=yes else ac_cv_lib_cthreads_libcthreads_queue_push=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_push" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_push_sorted in -lcthreads" >&5 $as_echo_n "checking for libcthreads_queue_push_sorted in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_queue_push_sorted+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_queue_push_sorted (); int main () { 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 ac_cv_lib_cthreads_libcthreads_queue_push_sorted=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_push_sorted" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_create in -lcthreads" >&5 $as_echo_n "checking for libcthreads_thread_pool_create in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_thread_pool_create+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_thread_pool_create (); int main () { 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 ac_cv_lib_cthreads_libcthreads_thread_pool_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_create" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_push in -lcthreads" >&5 $as_echo_n "checking for libcthreads_thread_pool_push in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_thread_pool_push+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_thread_pool_push (); int main () { 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 ac_cv_lib_cthreads_libcthreads_thread_pool_push=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_push" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_push_sorted in -lcthreads" >&5 $as_echo_n "checking for libcthreads_thread_pool_push_sorted in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_thread_pool_push_sorted (); int main () { 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 ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted" >&5 $as_echo "$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 ac_cv_libcthreads=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_join in -lcthreads" >&5 $as_echo_n "checking for libcthreads_thread_pool_join in -lcthreads... " >&6; } if ${ac_cv_lib_cthreads_libcthreads_thread_pool_join+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcthreads_thread_pool_join (); int main () { 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 ac_cv_lib_cthreads_libcthreads_thread_pool_join=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_join" >&5 $as_echo "$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 ac_cv_libcthreads=no fi ac_cv_libcthreads_LIBADD="-lcthreads" fi fi fi if test "x$ac_cv_libcthreads" = xyes; then : $as_echo "#define HAVE_LIBCTHREADS 1" >>confdefs.h fi if test "x$ac_cv_libcthreads" = xyes; then : ac_cv_libcthreads_multi_threading=libcthreads else ac_cv_libcthreads_multi_threading=no fi if test "x$ac_cv_libcthreads" = xyes; then : HAVE_LIBCTHREADS=1 else 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+set}" = set; then : withval=$with_pthread; ac_cv_with_pthread=$withval else ac_cv_with_pthread=auto-detect fi { $as_echo "$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 $as_echo_n "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 ${ac_cv_with_pthread+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_pthread=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pthread" >&5 $as_echo "$ac_cv_with_pthread" >&6; } if test "x$ac_cv_with_pthread" != x && test "x$ac_cv_with_pthread" != xno && test "x$ac_cv_with_pthread" != xauto-detect; 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_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_pthread" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_pthread" >&2;} fi fi if test "x$ac_cv_with_pthread" = xno; then : ac_cv_pthread=no else for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF fi done if test "x$ac_cv_header_pthread_h" = xno; then : ac_cv_pthread=no else ac_cv_pthread=pthread { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else ac_cv_lib_pthread_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : ac_pthread_dummy=yes else ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_exit in -lpthread" >&5 $as_echo_n "checking for pthread_exit in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_exit+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_exit (); int main () { return pthread_exit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_exit=yes else ac_cv_lib_pthread_pthread_exit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_exit" >&5 $as_echo "$ac_cv_lib_pthread_pthread_exit" >&6; } if test "x$ac_cv_lib_pthread_pthread_exit" = xyes; then : ac_pthread_dummy=yes else ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in -lpthread" >&5 $as_echo_n "checking for pthread_join in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_join+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_join (); int main () { return pthread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_join=yes else ac_cv_lib_pthread_pthread_join=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_join" >&5 $as_echo "$ac_cv_lib_pthread_pthread_join" >&6; } if test "x$ac_cv_lib_pthread_pthread_join" = xyes; then : ac_pthread_dummy=yes else ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_init in -lpthread" >&5 $as_echo_n "checking for pthread_cond_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_cond_init+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_cond_init (); int main () { return pthread_cond_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_cond_init=yes else ac_cv_lib_pthread_pthread_cond_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_init" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_destroy in -lpthread" >&5 $as_echo_n "checking for pthread_cond_destroy in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_cond_destroy+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_cond_destroy (); int main () { return pthread_cond_destroy (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_cond_destroy=yes else ac_cv_lib_pthread_pthread_cond_destroy=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_destroy" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_broadcast in -lpthread" >&5 $as_echo_n "checking for pthread_cond_broadcast in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_cond_broadcast+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_cond_broadcast (); int main () { return pthread_cond_broadcast (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_cond_broadcast=yes else ac_cv_lib_pthread_pthread_cond_broadcast=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_broadcast" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_signal in -lpthread" >&5 $as_echo_n "checking for pthread_cond_signal in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_cond_signal+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_cond_signal (); int main () { return pthread_cond_signal (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_cond_signal=yes else ac_cv_lib_pthread_pthread_cond_signal=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_signal" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_wait in -lpthread" >&5 $as_echo_n "checking for pthread_cond_wait in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_cond_wait+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_cond_wait (); int main () { return pthread_cond_wait (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_cond_wait=yes else ac_cv_lib_pthread_pthread_cond_wait=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_wait" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_destroy in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_destroy in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_destroy+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_destroy (); int main () { return pthread_mutex_destroy (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_destroy=yes else ac_cv_lib_pthread_pthread_mutex_destroy=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_destroy" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_lock in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_lock+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_lock (); int main () { return pthread_mutex_lock (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_lock=yes else ac_cv_lib_pthread_pthread_mutex_lock=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_trylock in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_trylock in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_trylock+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_trylock (); int main () { return pthread_mutex_trylock (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_trylock=yes else ac_cv_lib_pthread_pthread_mutex_trylock=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_trylock" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_unlock in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_unlock in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_unlock+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_unlock (); int main () { return pthread_mutex_unlock (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_unlock=yes else ac_cv_lib_pthread_pthread_mutex_unlock=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_unlock" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_init in -lpthread" >&5 $as_echo_n "checking for pthread_rwlock_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_rwlock_init+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_rwlock_init (); int main () { return pthread_rwlock_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_rwlock_init=yes else ac_cv_lib_pthread_pthread_rwlock_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_init" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy in -lpthread" >&5 $as_echo_n "checking for pthread_rwlock_destroy in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_rwlock_destroy+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_rwlock_destroy (); int main () { return pthread_rwlock_destroy (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_rwlock_destroy=yes else ac_cv_lib_pthread_pthread_rwlock_destroy=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_destroy" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_rdlock in -lpthread" >&5 $as_echo_n "checking for pthread_rwlock_rdlock in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_rwlock_rdlock+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_rwlock_rdlock (); int main () { return pthread_rwlock_rdlock (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_rwlock_rdlock=yes else ac_cv_lib_pthread_pthread_rwlock_rdlock=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_rdlock" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_wrlock in -lpthread" >&5 $as_echo_n "checking for pthread_rwlock_wrlock in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_rwlock_wrlock+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_rwlock_wrlock (); int main () { return pthread_rwlock_wrlock (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_rwlock_wrlock=yes else ac_cv_lib_pthread_pthread_rwlock_wrlock=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_wrlock" >&5 $as_echo "$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 ac_cv_pthread=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_unlock in -lpthread" >&5 $as_echo_n "checking for pthread_rwlock_unlock in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_rwlock_unlock+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char pthread_rwlock_unlock (); int main () { return pthread_rwlock_unlock (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_rwlock_unlock=yes else ac_cv_lib_pthread_pthread_rwlock_unlock=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_unlock" >&5 $as_echo "$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 ac_cv_pthread=no fi ac_cv_pthread_LIBADD="-lpthread"; fi fi if test "x$ac_cv_pthread" = xpthread; then : $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h fi if test "x$ac_cv_pthread" != xno; then : HAVE_PTHREAD=1 else 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 ac_cv_libcthreads_multi_threading="winapi" fi if test "x$ac_cv_libcthreads_multi_threading" != xno; then : ac_cv_libcthreads_CPPFLAGS="-I../libcthreads"; ac_cv_libcthreads_LIBADD="../libcthreads/libcthreads.la"; ac_cv_libcthreads=local else ac_cv_libcthreads=no fi $as_echo "#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 : $as_echo "#define HAVE_MULTI_THREAD_SUPPORT 1" >>confdefs.h HAVE_MULTI_THREAD_SUPPORT=1 else 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+set}" = set; then : withval=$with_libcdata; ac_cv_with_libcdata=$withval else ac_cv_with_libcdata=auto-detect fi { $as_echo "$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 $as_echo_n "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 ${ac_cv_with_libcdata+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcdata=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcdata" >&5 $as_echo "$ac_cv_with_libcdata" >&6; } if test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xno && test "x$ac_cv_with_libcdata" != xauto-detect; 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_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcdata" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcdata" >&2;} fi fi if test "x$ac_cv_with_libcdata" = xno; then : ac_cv_libcdata=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata" >&5 $as_echo_n "checking for libcdata... " >&6; } if test -n "$libcdata_CFLAGS"; then pkg_cv_libcdata_CFLAGS="$libcdata_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcdata >= 20160108\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcdata >= 20160108") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcdata_CFLAGS=`$PKG_CONFIG --cflags "libcdata >= 20160108" 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcdata >= 20160108\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcdata >= 20160108") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcdata_LIBS=`$PKG_CONFIG --libs "libcdata >= 20160108" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcdata_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcdata >= 20160108" 2>&1` else libcdata_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcdata >= 20160108" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcdata_PKG_ERRORS" >&5 ac_cv_libcdata=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcdata=no else libcdata_CFLAGS=$pkg_cv_libcdata_CFLAGS libcdata_LIBS=$pkg_cv_libcdata_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "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" else for ac_header in libcdata.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcdata.h" "ac_cv_header_libcdata_h" "$ac_includes_default" if test "x$ac_cv_header_libcdata_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCDATA_H 1 _ACEOF fi done if test "x$ac_cv_header_libcdata_h" = xno; then : ac_cv_libcdata=no else ac_cv_libcdata=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_get_version in -lcdata" >&5 $as_echo_n "checking for libcdata_get_version in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_get_version+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_get_version (); int main () { return libcdata_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdata_libcdata_get_version=yes else ac_cv_lib_cdata_libcdata_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_get_version" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_initialize in -lcdata" >&5 $as_echo_n "checking for libcdata_array_initialize in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_initialize+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_initialize (); int main () { return libcdata_array_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdata_libcdata_array_initialize=yes else ac_cv_lib_cdata_libcdata_array_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_initialize" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_free in -lcdata" >&5 $as_echo_n "checking for libcdata_array_free in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_free+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_free (); int main () { return libcdata_array_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdata_libcdata_array_free=yes else ac_cv_lib_cdata_libcdata_array_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_free" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_empty in -lcdata" >&5 $as_echo_n "checking for libcdata_array_empty in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_empty+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_empty (); int main () { return libcdata_array_empty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdata_libcdata_array_empty=yes else ac_cv_lib_cdata_libcdata_array_empty=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_empty" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_clone in -lcdata" >&5 $as_echo_n "checking for libcdata_array_clone in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_clone+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_clone (); int main () { return libcdata_array_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdata_libcdata_array_clone=yes else ac_cv_lib_cdata_libcdata_array_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_clone" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_resize in -lcdata" >&5 $as_echo_n "checking for libcdata_array_resize in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_resize+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_resize (); int main () { return libcdata_array_resize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdata_libcdata_array_resize=yes else ac_cv_lib_cdata_libcdata_array_resize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_resize" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_reverse in -lcdata" >&5 $as_echo_n "checking for libcdata_array_reverse in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_reverse+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_reverse (); int main () { return libcdata_array_reverse (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdata_libcdata_array_reverse=yes else ac_cv_lib_cdata_libcdata_array_reverse=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_reverse" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_get_number_of_entries in -lcdata" >&5 $as_echo_n "checking for libcdata_array_get_number_of_entries in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_get_number_of_entries+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_get_number_of_entries (); int main () { 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 ac_cv_lib_cdata_libcdata_array_get_number_of_entries=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_get_number_of_entries" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_get_entry_by_index in -lcdata" >&5 $as_echo_n "checking for libcdata_array_get_entry_by_index in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_get_entry_by_index+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_get_entry_by_index (); int main () { 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 ac_cv_lib_cdata_libcdata_array_get_entry_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_get_entry_by_index" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_get_entry_by_value in -lcdata" >&5 $as_echo_n "checking for libcdata_array_get_entry_by_value in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_get_entry_by_value+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_get_entry_by_value (); int main () { 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 ac_cv_lib_cdata_libcdata_array_get_entry_by_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_get_entry_by_value" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_set_entry_by_index in -lcdata" >&5 $as_echo_n "checking for libcdata_array_set_entry_by_index in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_set_entry_by_index+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_set_entry_by_index (); int main () { 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 ac_cv_lib_cdata_libcdata_array_set_entry_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_set_entry_by_index" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_prepend_entry in -lcdata" >&5 $as_echo_n "checking for libcdata_array_prepend_entry in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_prepend_entry+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_prepend_entry (); int main () { 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 ac_cv_lib_cdata_libcdata_array_prepend_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_prepend_entry" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_append_entry in -lcdata" >&5 $as_echo_n "checking for libcdata_array_append_entry in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_append_entry+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_append_entry (); int main () { 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 ac_cv_lib_cdata_libcdata_array_append_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_append_entry" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_insert_entry in -lcdata" >&5 $as_echo_n "checking for libcdata_array_insert_entry in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_insert_entry+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_insert_entry (); int main () { 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 ac_cv_lib_cdata_libcdata_array_insert_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_insert_entry" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_remove_entry in -lcdata" >&5 $as_echo_n "checking for libcdata_array_remove_entry in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_array_remove_entry+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_array_remove_entry (); int main () { 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 ac_cv_lib_cdata_libcdata_array_remove_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_remove_entry" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_initialize in -lcdata" >&5 $as_echo_n "checking for libcdata_list_initialize in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_initialize+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_initialize (); int main () { return libcdata_list_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdata_libcdata_list_initialize=yes else ac_cv_lib_cdata_libcdata_list_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_initialize" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_free in -lcdata" >&5 $as_echo_n "checking for libcdata_list_free in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_free+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_free (); int main () { return libcdata_list_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdata_libcdata_list_free=yes else ac_cv_lib_cdata_libcdata_list_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_free" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_empty in -lcdata" >&5 $as_echo_n "checking for libcdata_list_empty in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_empty+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_empty (); int main () { return libcdata_list_empty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdata_libcdata_list_empty=yes else ac_cv_lib_cdata_libcdata_list_empty=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_empty" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_clone in -lcdata" >&5 $as_echo_n "checking for libcdata_list_clone in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_clone+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_clone (); int main () { return libcdata_list_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdata_libcdata_list_clone=yes else ac_cv_lib_cdata_libcdata_list_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_clone" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_number_of_elements in -lcdata" >&5 $as_echo_n "checking for libcdata_list_get_number_of_elements in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_get_number_of_elements+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_get_number_of_elements (); int main () { 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 ac_cv_lib_cdata_libcdata_list_get_number_of_elements=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_number_of_elements" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_first_element in -lcdata" >&5 $as_echo_n "checking for libcdata_list_get_first_element in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_get_first_element+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_get_first_element (); int main () { 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 ac_cv_lib_cdata_libcdata_list_get_first_element=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_first_element" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_last_element in -lcdata" >&5 $as_echo_n "checking for libcdata_list_get_last_element in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_get_last_element+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_get_last_element (); int main () { 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 ac_cv_lib_cdata_libcdata_list_get_last_element=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_last_element" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_element_by_index in -lcdata" >&5 $as_echo_n "checking for libcdata_list_get_element_by_index in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_get_element_by_index+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_get_element_by_index (); int main () { 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 ac_cv_lib_cdata_libcdata_list_get_element_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_element_by_index" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_value_by_index in -lcdata" >&5 $as_echo_n "checking for libcdata_list_get_value_by_index in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_get_value_by_index+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_get_value_by_index (); int main () { 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 ac_cv_lib_cdata_libcdata_list_get_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_value_by_index" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_prepend_element in -lcdata" >&5 $as_echo_n "checking for libcdata_list_prepend_element in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_prepend_element+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_prepend_element (); int main () { 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 ac_cv_lib_cdata_libcdata_list_prepend_element=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_prepend_element" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_prepend_value in -lcdata" >&5 $as_echo_n "checking for libcdata_list_prepend_value in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_prepend_value+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_prepend_value (); int main () { 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 ac_cv_lib_cdata_libcdata_list_prepend_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_prepend_value" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_append_element in -lcdata" >&5 $as_echo_n "checking for libcdata_list_append_element in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_append_element+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_append_element (); int main () { 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 ac_cv_lib_cdata_libcdata_list_append_element=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_append_element" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_append_value in -lcdata" >&5 $as_echo_n "checking for libcdata_list_append_value in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_append_value+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_append_value (); int main () { 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 ac_cv_lib_cdata_libcdata_list_append_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_append_value" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_insert_element in -lcdata" >&5 $as_echo_n "checking for libcdata_list_insert_element in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_insert_element+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_insert_element (); int main () { 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 ac_cv_lib_cdata_libcdata_list_insert_element=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_insert_element" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_insert_value in -lcdata" >&5 $as_echo_n "checking for libcdata_list_insert_value in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_insert_value+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_insert_value (); int main () { 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 ac_cv_lib_cdata_libcdata_list_insert_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_insert_value" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_remove_element in -lcdata" >&5 $as_echo_n "checking for libcdata_list_remove_element in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_remove_element+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_remove_element (); int main () { 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 ac_cv_lib_cdata_libcdata_list_remove_element=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_remove_element" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_initialize in -lcdata" >&5 $as_echo_n "checking for libcdata_list_element_initialize in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_element_initialize+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_element_initialize (); int main () { 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 ac_cv_lib_cdata_libcdata_list_element_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_initialize" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_free in -lcdata" >&5 $as_echo_n "checking for libcdata_list_element_free in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_element_free+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_element_free (); int main () { 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 ac_cv_lib_cdata_libcdata_list_element_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_free" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_value in -lcdata" >&5 $as_echo_n "checking for libcdata_list_element_get_value in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_element_get_value+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_element_get_value (); int main () { 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 ac_cv_lib_cdata_libcdata_list_element_get_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_value" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_value in -lcdata" >&5 $as_echo_n "checking for libcdata_list_element_set_value in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_element_set_value+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_element_set_value (); int main () { 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 ac_cv_lib_cdata_libcdata_list_element_set_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_value" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_previous_element in -lcdata" >&5 $as_echo_n "checking for libcdata_list_element_get_previous_element in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_element_get_previous_element+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_element_get_previous_element (); int main () { 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 ac_cv_lib_cdata_libcdata_list_element_get_previous_element=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_previous_element" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_previous_element in -lcdata" >&5 $as_echo_n "checking for libcdata_list_element_set_previous_element in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_element_set_previous_element+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_element_set_previous_element (); int main () { 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 ac_cv_lib_cdata_libcdata_list_element_set_previous_element=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_previous_element" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_next_element in -lcdata" >&5 $as_echo_n "checking for libcdata_list_element_get_next_element in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_element_get_next_element+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_element_get_next_element (); int main () { 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 ac_cv_lib_cdata_libcdata_list_element_get_next_element=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_next_element" >&5 $as_echo "$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_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_next_element in -lcdata" >&5 $as_echo_n "checking for libcdata_list_element_set_next_element in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_element_set_next_element+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_element_set_next_element (); int main () { 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 ac_cv_lib_cdata_libcdata_list_element_set_next_element=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_next_element" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_elements in -lcdata" >&5 $as_echo_n "checking for libcdata_list_element_get_elements in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_element_get_elements+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_element_get_elements (); int main () { 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 ac_cv_lib_cdata_libcdata_list_element_get_elements=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_elements" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_elements in -lcdata" >&5 $as_echo_n "checking for libcdata_list_element_set_elements in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_list_element_set_elements+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_list_element_set_elements (); int main () { 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 ac_cv_lib_cdata_libcdata_list_element_set_elements=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_elements" >&5 $as_echo "$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 ac_cv_libcdata=no fi ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_initialize in -lcdata" >&5 $as_echo_n "checking for libcdata_range_list_initialize in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_range_list_initialize+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_range_list_initialize (); int main () { 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 ac_cv_lib_cdata_libcdata_range_list_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_initialize" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_free in -lcdata" >&5 $as_echo_n "checking for libcdata_range_list_free in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_range_list_free+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_range_list_free (); int main () { 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 ac_cv_lib_cdata_libcdata_range_list_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_free" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_empty in -lcdata" >&5 $as_echo_n "checking for libcdata_range_list_empty in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_range_list_empty+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_range_list_empty (); int main () { 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 ac_cv_lib_cdata_libcdata_range_list_empty=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_empty" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_clone in -lcdata" >&5 $as_echo_n "checking for libcdata_range_list_clone in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_range_list_clone+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_range_list_clone (); int main () { 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 ac_cv_lib_cdata_libcdata_range_list_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_clone" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_number_of_elements in -lcdata" >&5 $as_echo_n "checking for libcdata_range_list_get_number_of_elements in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_range_list_get_number_of_elements (); int main () { 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 ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_insert_range in -lcdata" >&5 $as_echo_n "checking for libcdata_range_list_insert_range in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_range_list_insert_range+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_range_list_insert_range (); int main () { 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 ac_cv_lib_cdata_libcdata_range_list_insert_range=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_insert_range" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_insert_range_list in -lcdata" >&5 $as_echo_n "checking for libcdata_range_list_insert_range_list in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_range_list_insert_range_list+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_range_list_insert_range_list (); int main () { 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 ac_cv_lib_cdata_libcdata_range_list_insert_range_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_insert_range_list" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_remove_range in -lcdata" >&5 $as_echo_n "checking for libcdata_range_list_remove_range in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_range_list_remove_range+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_range_list_remove_range (); int main () { 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 ac_cv_lib_cdata_libcdata_range_list_remove_range=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_remove_range" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_range_by_index in -lcdata" >&5 $as_echo_n "checking for libcdata_range_list_get_range_by_index in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_range_list_get_range_by_index+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_range_list_get_range_by_index (); int main () { 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 ac_cv_lib_cdata_libcdata_range_list_get_range_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_range_by_index" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_range_at_offset in -lcdata" >&5 $as_echo_n "checking for libcdata_range_list_get_range_at_offset in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_range_list_get_range_at_offset (); int main () { 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 ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_range_is_present in -lcdata" >&5 $as_echo_n "checking for libcdata_range_list_range_is_present in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_range_list_range_is_present+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_range_list_range_is_present (); int main () { 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 ac_cv_lib_cdata_libcdata_range_list_range_is_present=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_range_is_present" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_spanning_range in -lcdata" >&5 $as_echo_n "checking for libcdata_range_list_get_spanning_range in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_range_list_get_spanning_range+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_range_list_get_spanning_range (); int main () { 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 ac_cv_lib_cdata_libcdata_range_list_get_spanning_range=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_spanning_range" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_initialize in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_initialize in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_initialize+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_initialize (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_initialize" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_free in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_free in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_free+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_free (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_free" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_empty in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_empty in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_empty+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_empty (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_empty=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_empty" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_clone in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_clone in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_clone+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_clone (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_clone" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_value in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_get_value in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_get_value+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_get_value (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_get_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_value" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_value in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_set_value in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_set_value+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_set_value (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_set_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_value" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_parent_node in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_get_parent_node in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_get_parent_node+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_get_parent_node (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_get_parent_node=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_parent_node" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_parent_node in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_set_parent_node in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_set_parent_node+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_set_parent_node (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_set_parent_node=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_parent_node" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_previous_node in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_get_previous_node in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_get_previous_node+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_get_previous_node (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_get_previous_node=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_previous_node" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_previous_node in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_set_previous_node in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_set_previous_node+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_set_previous_node (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_set_previous_node=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_previous_node" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_next_node in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_get_next_node in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_get_next_node+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_get_next_node (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_get_next_node=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_next_node" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_next_node in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_set_next_node in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_set_next_node+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_set_next_node (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_set_next_node=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_next_node" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_nodes in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_get_nodes in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_get_nodes+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_get_nodes (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_get_nodes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_nodes" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_nodes in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_set_nodes in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_set_nodes+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_set_nodes (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_set_nodes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_nodes" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_append_node in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_append_node in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_append_node+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_append_node (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_append_node=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_append_node" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_append_value in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_append_value in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_append_value+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_append_value (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_append_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_append_value" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_insert_node in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_insert_node in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_insert_node+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_insert_node (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_insert_node=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_insert_node" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_insert_value in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_insert_value in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_insert_value+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_insert_value (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_insert_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_insert_value" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_replace_node in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_replace_node in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_replace_node+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_replace_node (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_replace_node=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_replace_node" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_remove_node in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_remove_node in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_remove_node+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_remove_node (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_remove_node=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_remove_node" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_number_of_sub_nodes in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_get_number_of_sub_nodes in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_get_number_of_sub_nodes (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_sub_node_by_index in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_get_sub_node_by_index in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_get_sub_node_by_index (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index" >&5 $as_echo "$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 ac_cv_libcdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_leaf_node_list in -lcdata" >&5 $as_echo_n "checking for libcdata_tree_node_get_leaf_node_list in -lcdata... " >&6; } if ${ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char libcdata_tree_node_get_leaf_node_list (); int main () { 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 ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list" >&5 $as_echo "$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 ac_cv_libcdata=no fi ac_cv_libcdata_LIBADD="-lcdata" fi fi fi if test "x$ac_cv_libcdata" = xyes; then : $as_echo "#define HAVE_LIBCDATA 1" >>confdefs.h fi if test "x$ac_cv_libcdata" = xyes; then : HAVE_LIBCDATA=1 else HAVE_LIBCDATA=0 fi if test "x$ac_cv_libcdata" != xyes; then : ac_cv_libcdata_CPPFLAGS="-I../libcdata"; ac_cv_libcdata_LIBADD="../libcdata/libcdata.la"; ac_cv_libcdata=local $as_echo "#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+set}" = set; then : withval=$with_libclocale; ac_cv_with_libclocale=$withval else ac_cv_with_libclocale=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libclocale in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libclocale in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libclocale+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libclocale=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libclocale" >&5 $as_echo "$ac_cv_with_libclocale" >&6; } if test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xno && test "x$ac_cv_with_libclocale" != xauto-detect; then : if test -d "$ac_cv_with_libclocale"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libclocale}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libclocale}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libclocale" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libclocale" >&2;} fi fi if test "x$ac_cv_with_libclocale" = xno; then : ac_cv_libclocale=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale" >&5 $as_echo_n "checking for libclocale... " >&6; } if test -n "$libclocale_CFLAGS"; then pkg_cv_libclocale_CFLAGS="$libclocale_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libclocale >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libclocale >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libclocale_CFLAGS=`$PKG_CONFIG --cflags "libclocale >= 20120425" 2>/dev/null` 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libclocale >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libclocale >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libclocale_LIBS=`$PKG_CONFIG --libs "libclocale >= 20120425" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libclocale_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --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=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libclocale=no else libclocale_CFLAGS=$pkg_cv_libclocale_CFLAGS libclocale_LIBS=$pkg_cv_libclocale_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libclocale=yes fi fi if test "x$ac_cv_libclocale" = xyes; then : ac_cv_libclocale_CPPFLAGS="$pkg_cv_libclocale_CFLAGS" ac_cv_libclocale_LIBADD="$pkg_cv_libclocale_LIBS" else for ac_header in libclocale.h do : ac_fn_c_check_header_mongrel "$LINENO" "libclocale.h" "ac_cv_header_libclocale_h" "$ac_includes_default" if test "x$ac_cv_header_libclocale_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCLOCALE_H 1 _ACEOF fi done if test "x$ac_cv_header_libclocale_h" = xno; then : ac_cv_libclocale=no else ac_cv_libclocale=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_get_version in -lclocale" >&5 $as_echo_n "checking for libclocale_get_version in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_get_version (); int main () { return libclocale_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_get_version=yes else ac_cv_lib_clocale_libclocale_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_get_version" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_get_version" >&6; } if test "x$ac_cv_lib_clocale_libclocale_get_version" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage in -lclocale" >&5 $as_echo_n "checking for libclocale_codepage in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_codepage+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_codepage (); int main () { return libclocale_codepage (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_codepage=yes else ac_cv_lib_clocale_libclocale_codepage=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_codepage" >&6; } if test "x$ac_cv_lib_clocale_libclocale_codepage" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_get in -lclocale" >&5 $as_echo_n "checking for libclocale_codepage_get in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_codepage_get+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_codepage_get (); int main () { return libclocale_codepage_get (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_codepage_get=yes else ac_cv_lib_clocale_libclocale_codepage_get=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_get" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_codepage_get" >&6; } if test "x$ac_cv_lib_clocale_libclocale_codepage_get" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_set in -lclocale" >&5 $as_echo_n "checking for libclocale_codepage_set in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_codepage_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_codepage_set (); int main () { return libclocale_codepage_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_codepage_set=yes else ac_cv_lib_clocale_libclocale_codepage_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_set" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_codepage_set" >&6; } if test "x$ac_cv_lib_clocale_libclocale_codepage_set" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_copy_from_string in -lclocale" >&5 $as_echo_n "checking for libclocale_codepage_copy_from_string in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_codepage_copy_from_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_codepage_copy_from_string (); int main () { return libclocale_codepage_copy_from_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_codepage_copy_from_string=yes else ac_cv_lib_clocale_libclocale_codepage_copy_from_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_copy_from_string" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_codepage_copy_from_string" >&6; } if test "x$ac_cv_lib_clocale_libclocale_codepage_copy_from_string" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_copy_from_string_wide in -lclocale" >&5 $as_echo_n "checking for libclocale_codepage_copy_from_string_wide in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_codepage_copy_from_string_wide (); int main () { return libclocale_codepage_copy_from_string_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide=yes else ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" >&6; } if test "x$ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_locale_get_codepage in -lclocale" >&5 $as_echo_n "checking for libclocale_locale_get_codepage in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_locale_get_codepage+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_locale_get_codepage (); int main () { return libclocale_locale_get_codepage (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_locale_get_codepage=yes else ac_cv_lib_clocale_libclocale_locale_get_codepage=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_locale_get_codepage" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_locale_get_codepage" >&6; } if test "x$ac_cv_lib_clocale_libclocale_locale_get_codepage" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_locale_get_decimal_point in -lclocale" >&5 $as_echo_n "checking for libclocale_locale_get_decimal_point in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_locale_get_decimal_point+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_locale_get_decimal_point (); int main () { return libclocale_locale_get_decimal_point (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_locale_get_decimal_point=yes else ac_cv_lib_clocale_libclocale_locale_get_decimal_point=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_locale_get_decimal_point" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_locale_get_decimal_point" >&6; } if test "x$ac_cv_lib_clocale_libclocale_locale_get_decimal_point" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_initialize in -lclocale" >&5 $as_echo_n "checking for libclocale_initialize in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_initialize (); int main () { return libclocale_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_initialize=yes else ac_cv_lib_clocale_libclocale_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_initialize" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_initialize" >&6; } if test "x$ac_cv_lib_clocale_libclocale_initialize" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi ac_cv_libclocale_LIBADD="-lclocale" fi fi fi if test "x$ac_cv_libclocale" = xyes; then : $as_echo "#define HAVE_LIBCLOCALE 1" >>confdefs.h fi if test "x$ac_cv_libclocale" = xyes; then : HAVE_LIBCLOCALE=1 else HAVE_LIBCLOCALE=0 fi if test "x$ac_cv_libclocale" != xyes; then : for ac_header in langinfo.h locale.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getenv do : ac_fn_c_check_func "$LINENO" "getenv" "ac_cv_func_getenv" if test "x$ac_cv_func_getenv" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETENV 1 _ACEOF fi done if test "x$ac_cv_func_getenv" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: getenv See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_enable_winapi" = xno; then : for ac_func in localeconv do : ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv" if test "x$ac_cv_func_localeconv" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALECONV 1 _ACEOF fi done if test "x$ac_cv_func_localeconv" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: localeconv See \`config.log' for more details" "$LINENO" 5; } fi fi for ac_func in setlocale do : ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" if test "x$ac_cv_func_setlocale" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SETLOCALE 1 _ACEOF fi done if test "x$ac_cv_func_setlocale" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: setlocale See \`config.log' for more details" "$LINENO" 5; } fi for ac_func in nl_langinfo do : ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" if test "x$ac_cv_func_nl_langinfo" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NL_LANGINFO 1 _ACEOF fi done if test "x$ac_cv_func_nl_langinfo" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo CODESET support" >&5 $as_echo_n "checking for nl_langinfo CODESET support... " >&6; } if ${ac_cv_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char* charset = nl_langinfo( CODESET ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_cv_langinfo_codeset=yes else ac_cv_cv_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_langinfo_codeset" >&5 $as_echo "$ac_cv_cv_langinfo_codeset" >&6; } else ac_cv_cv_langinfo_codeset=no fi if test "x$ac_cv_cv_langinfo_codeset" = xyes; then : $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi ac_cv_libclocale_CPPFLAGS="-I../libclocale"; ac_cv_libclocale_LIBADD="../libclocale/libclocale.la"; ac_cv_libclocale=local $as_echo "#define HAVE_LOCAL_LIBCLOCALE 1" >>confdefs.h HAVE_LOCAL_LIBCLOCALE=1 fi if test "x$ac_cv_libclocale" = xlocal; then HAVE_LOCAL_LIBCLOCALE_TRUE= HAVE_LOCAL_LIBCLOCALE_FALSE='#' else HAVE_LOCAL_LIBCLOCALE_TRUE='#' HAVE_LOCAL_LIBCLOCALE_FALSE= fi if test "x$ac_cv_libclocale_CPPFLAGS" != "x"; then : LIBCLOCALE_CPPFLAGS=$ac_cv_libclocale_CPPFLAGS fi if test "x$ac_cv_libclocale_LIBADD" != "x"; then : LIBCLOCALE_LIBADD=$ac_cv_libclocale_LIBADD fi if test "x$ac_cv_libclocale" = xyes; then : ax_libclocale_pc_libs_private=-lclocale fi if test "x$ac_cv_libclocale" = xyes; then : ax_libclocale_spec_requires=libclocale ax_libclocale_spec_build_requires=libclocale-devel fi # Check whether --with-libcnotify was given. if test "${with_libcnotify+set}" = set; then : withval=$with_libcnotify; ac_cv_with_libcnotify=$withval else ac_cv_with_libcnotify=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcnotify in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcnotify in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcnotify+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcnotify=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcnotify" >&5 $as_echo "$ac_cv_with_libcnotify" >&6; } if test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xno && test "x$ac_cv_with_libcnotify" != xauto-detect; then : if test -d "$ac_cv_with_libcnotify"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcnotify}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcnotify}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcnotify" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcnotify" >&2;} fi fi if test "x$ac_cv_with_libcnotify" = xno; then : ac_cv_libcnotify=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify" >&5 $as_echo_n "checking for libcnotify... " >&6; } if test -n "$libcnotify_CFLAGS"; then pkg_cv_libcnotify_CFLAGS="$libcnotify_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcnotify >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcnotify >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcnotify_CFLAGS=`$PKG_CONFIG --cflags "libcnotify >= 20120425" 2>/dev/null` 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcnotify >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcnotify >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcnotify_LIBS=`$PKG_CONFIG --libs "libcnotify >= 20120425" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcnotify_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --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=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcnotify=no else libcnotify_CFLAGS=$pkg_cv_libcnotify_CFLAGS libcnotify_LIBS=$pkg_cv_libcnotify_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcnotify=yes fi fi if test "x$ac_cv_libcnotify" = xyes; then : ac_cv_libcnotify_CPPFLAGS="$pkg_cv_libcnotify_CFLAGS" ac_cv_libcnotify_LIBADD="$pkg_cv_libcnotify_LIBS" else for ac_header in libcnotify.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcnotify.h" "ac_cv_header_libcnotify_h" "$ac_includes_default" if test "x$ac_cv_header_libcnotify_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCNOTIFY_H 1 _ACEOF fi done if test "x$ac_cv_header_libcnotify_h" = xno; then : ac_cv_libcnotify=no else ac_cv_libcnotify=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_get_version in -lcnotify" >&5 $as_echo_n "checking for libcnotify_get_version in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_get_version (); int main () { return libcnotify_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_get_version=yes else ac_cv_lib_cnotify_libcnotify_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_get_version" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_get_version" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_get_version" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_printf in -lcnotify" >&5 $as_echo_n "checking for libcnotify_printf in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_printf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_printf (); int main () { return libcnotify_printf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_printf=yes else ac_cv_lib_cnotify_libcnotify_printf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_printf" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_printf" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_printf" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_print_data in -lcnotify" >&5 $as_echo_n "checking for libcnotify_print_data in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_print_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_print_data (); int main () { return libcnotify_print_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_print_data=yes else ac_cv_lib_cnotify_libcnotify_print_data=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_print_data" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_print_data" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_print_data" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_print_error_backtrace in -lcnotify" >&5 $as_echo_n "checking for libcnotify_print_error_backtrace in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_print_error_backtrace+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_print_error_backtrace (); int main () { return libcnotify_print_error_backtrace (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_print_error_backtrace=yes else ac_cv_lib_cnotify_libcnotify_print_error_backtrace=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_print_error_backtrace" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_print_error_backtrace" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_print_error_backtrace" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_set in -lcnotify" >&5 $as_echo_n "checking for libcnotify_stream_set in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_stream_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_stream_set (); int main () { return libcnotify_stream_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_stream_set=yes else ac_cv_lib_cnotify_libcnotify_stream_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_set" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_stream_set" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_stream_set" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_open in -lcnotify" >&5 $as_echo_n "checking for libcnotify_stream_open in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_stream_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_stream_open (); int main () { return libcnotify_stream_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_stream_open=yes else ac_cv_lib_cnotify_libcnotify_stream_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_open" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_stream_open" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_stream_open" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_close in -lcnotify" >&5 $as_echo_n "checking for libcnotify_stream_close in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_stream_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_stream_close (); int main () { return libcnotify_stream_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_stream_close=yes else ac_cv_lib_cnotify_libcnotify_stream_close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_close" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_stream_close" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_stream_close" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_verbose_set in -lcnotify" >&5 $as_echo_n "checking for libcnotify_verbose_set in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_verbose_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_verbose_set (); int main () { return libcnotify_verbose_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_verbose_set=yes else ac_cv_lib_cnotify_libcnotify_verbose_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_verbose_set" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_verbose_set" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_verbose_set" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi ac_cv_libcnotify_LIBADD="-lcnotify" fi fi fi if test "x$ac_cv_libcnotify" = xyes; then : $as_echo "#define HAVE_LIBCNOTIFY 1" >>confdefs.h fi if test "x$ac_cv_libcnotify" = xyes; then : HAVE_LIBCNOTIFY=1 else HAVE_LIBCNOTIFY=0 fi if test "x$ac_cv_libcnotify" != xyes; then : for ac_header in stdarg.h varargs.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing headers: stdarg.h and varargs.h See \`config.log' for more details" "$LINENO" 5; } fi for ac_header in errno.h do : ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" if test "x$ac_cv_header_errno_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ERRNO_H 1 _ACEOF fi done ac_cv_libcnotify_CPPFLAGS="-I../libcnotify"; ac_cv_libcnotify_LIBADD="../libcnotify/libcnotify.la"; ac_cv_libcnotify=local $as_echo "#define HAVE_LOCAL_LIBCNOTIFY 1" >>confdefs.h HAVE_LOCAL_LIBCNOTIFY=1 fi if test "x$ac_cv_libcnotify" = xlocal; then HAVE_LOCAL_LIBCNOTIFY_TRUE= HAVE_LOCAL_LIBCNOTIFY_FALSE='#' else HAVE_LOCAL_LIBCNOTIFY_TRUE='#' HAVE_LOCAL_LIBCNOTIFY_FALSE= fi if test "x$ac_cv_libcnotify_CPPFLAGS" != "x"; then : LIBCNOTIFY_CPPFLAGS=$ac_cv_libcnotify_CPPFLAGS fi if test "x$ac_cv_libcnotify_LIBADD" != "x"; then : LIBCNOTIFY_LIBADD=$ac_cv_libcnotify_LIBADD fi if test "x$ac_cv_libcnotify" = xyes; then : ax_libcnotify_pc_libs_private=-lcnotify fi if test "x$ac_cv_libcnotify" = xyes; then : ax_libcnotify_spec_requires=libcnotify ax_libcnotify_spec_build_requires=libcnotify-devel fi # Check whether --with-libcsplit was given. if test "${with_libcsplit+set}" = set; then : withval=$with_libcsplit; ac_cv_with_libcsplit=$withval else ac_cv_with_libcsplit=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcsplit in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcsplit in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcsplit+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcsplit=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcsplit" >&5 $as_echo "$ac_cv_with_libcsplit" >&6; } if test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xno && test "x$ac_cv_with_libcsplit" != xauto-detect; then : if test -d "$ac_cv_with_libcsplit"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcsplit}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcsplit}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcsplit" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcsplit" >&2;} fi fi if test "x$ac_cv_with_libcsplit" = xno; then : ac_cv_libcsplit=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit" >&5 $as_echo_n "checking for libcsplit... " >&6; } if test -n "$libcsplit_CFLAGS"; then pkg_cv_libcsplit_CFLAGS="$libcsplit_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsplit >= 20120701\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcsplit >= 20120701") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcsplit_CFLAGS=`$PKG_CONFIG --cflags "libcsplit >= 20120701" 2>/dev/null` 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsplit >= 20120701\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcsplit >= 20120701") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcsplit_LIBS=`$PKG_CONFIG --libs "libcsplit >= 20120701" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcsplit_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --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=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcsplit=no else libcsplit_CFLAGS=$pkg_cv_libcsplit_CFLAGS libcsplit_LIBS=$pkg_cv_libcsplit_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcsplit=yes fi fi if test "x$ac_cv_libcsplit" = xyes; then : ac_cv_libcsplit_CPPFLAGS="$pkg_cv_libcsplit_CFLAGS" ac_cv_libcsplit_LIBADD="$pkg_cv_libcsplit_LIBS" else for ac_header in libcsplit.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcsplit.h" "ac_cv_header_libcsplit_h" "$ac_includes_default" if test "x$ac_cv_header_libcsplit_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCSPLIT_H 1 _ACEOF fi done if test "x$ac_cv_header_libcsplit_h" = xno; then : ac_cv_libcsplit=no else ac_cv_libcsplit=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_get_version in -lcsplit" >&5 $as_echo_n "checking for libcsplit_get_version in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_get_version (); int main () { return libcsplit_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_get_version=yes else ac_cv_lib_csplit_libcsplit_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_get_version" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_get_version" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_get_version" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_string_split in -lcsplit" >&5 $as_echo_n "checking for libcsplit_narrow_string_split in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_narrow_string_split+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_narrow_string_split (); int main () { return libcsplit_narrow_string_split (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_narrow_string_split=yes else ac_cv_lib_csplit_libcsplit_narrow_string_split=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_string_split" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_narrow_string_split" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_narrow_string_split" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_free in -lcsplit" >&5 $as_echo_n "checking for libcsplit_narrow_split_string_free in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_narrow_split_string_free (); int main () { return libcsplit_narrow_split_string_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_narrow_split_string_free=yes else ac_cv_lib_csplit_libcsplit_narrow_split_string_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_free" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_free" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_free" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_string in -lcsplit" >&5 $as_echo_n "checking for libcsplit_narrow_split_string_get_string in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_narrow_split_string_get_string (); int main () { return libcsplit_narrow_split_string_get_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string=yes else ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_number_of_segments in -lcsplit" >&5 $as_echo_n "checking for libcsplit_narrow_split_string_get_number_of_segments in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_narrow_split_string_get_number_of_segments (); int main () { return libcsplit_narrow_split_string_get_number_of_segments (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments=yes else ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_segment_by_index in -lcsplit" >&5 $as_echo_n "checking for libcsplit_narrow_split_string_get_segment_by_index in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_narrow_split_string_get_segment_by_index (); int main () { return libcsplit_narrow_split_string_get_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index=yes else ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_set_segment_by_index in -lcsplit" >&5 $as_echo_n "checking for libcsplit_narrow_split_string_set_segment_by_index in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_narrow_split_string_set_segment_by_index (); int main () { return libcsplit_narrow_split_string_set_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index=yes else ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_string_split in -lcsplit" >&5 $as_echo_n "checking for libcsplit_wide_string_split in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_wide_string_split+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_wide_string_split (); int main () { return libcsplit_wide_string_split (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_wide_string_split=yes else ac_cv_lib_csplit_libcsplit_wide_string_split=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_string_split" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_wide_string_split" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_wide_string_split" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_free in -lcsplit" >&5 $as_echo_n "checking for libcsplit_wide_split_string_free in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_wide_split_string_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_wide_split_string_free (); int main () { return libcsplit_wide_split_string_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_wide_split_string_free=yes else ac_cv_lib_csplit_libcsplit_wide_split_string_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_free" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_free" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_free" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_string in -lcsplit" >&5 $as_echo_n "checking for libcsplit_wide_split_string_get_string in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_wide_split_string_get_string (); int main () { return libcsplit_wide_split_string_get_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_wide_split_string_get_string=yes else ac_cv_lib_csplit_libcsplit_wide_split_string_get_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_number_of_segments in -lcsplit" >&5 $as_echo_n "checking for libcsplit_wide_split_string_get_number_of_segments in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_wide_split_string_get_number_of_segments (); int main () { return libcsplit_wide_split_string_get_number_of_segments (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments=yes else ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_segment_by_index in -lcsplit" >&5 $as_echo_n "checking for libcsplit_wide_split_string_get_segment_by_index in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_wide_split_string_get_segment_by_index (); int main () { return libcsplit_wide_split_string_get_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index=yes else ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_set_segment_by_index in -lcsplit" >&5 $as_echo_n "checking for libcsplit_wide_split_string_set_segment_by_index in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_wide_split_string_set_segment_by_index (); int main () { return libcsplit_wide_split_string_set_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index=yes else ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi fi ac_cv_libcsplit_LIBADD="-lcsplit" fi fi fi if test "x$ac_cv_libcsplit" = xyes; then : $as_echo "#define HAVE_LIBCSPLIT 1" >>confdefs.h fi if test "x$ac_cv_libcsplit" = xyes; then : HAVE_LIBCSPLIT=1 else HAVE_LIBCSPLIT=0 fi if test "x$ac_cv_libcsplit" != xyes; then : $as_echo "#define HAVE_LOCAL_LIBCSPLIT 1" >>confdefs.h HAVE_LOCAL_LIBCSPLIT=1 ac_cv_libcsplit_CPPFLAGS="-I../libcsplit"; ac_cv_libcsplit_LIBADD="../libcsplit/libcsplit.la"; ac_cv_libcsplit=local fi if test "x$ac_cv_libcsplit" = xlocal; then HAVE_LOCAL_LIBCSPLIT_TRUE= HAVE_LOCAL_LIBCSPLIT_FALSE='#' else HAVE_LOCAL_LIBCSPLIT_TRUE='#' HAVE_LOCAL_LIBCSPLIT_FALSE= fi if test "x$ac_cv_libcsplit_CPPFLAGS" != "x"; then : LIBCSPLIT_CPPFLAGS=$ac_cv_libcsplit_CPPFLAGS fi if test "x$ac_cv_libcsplit_LIBADD" != "x"; then : LIBCSPLIT_LIBADD=$ac_cv_libcsplit_LIBADD fi if test "x$ac_cv_libcsplit" = xyes; then : ax_libcsplit_pc_libs_private=-lcsplit fi if test "x$ac_cv_libcsplit" = xyes; then : ax_libcsplit_spec_requires=libcsplit ax_libcsplit_spec_build_requires=libcsplit-devel fi # Check whether --with-libuna was given. if test "${with_libuna+set}" = set; then : withval=$with_libuna; ac_cv_with_libuna=$withval else ac_cv_with_libuna=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libuna in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libuna in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libuna+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libuna=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libuna" >&5 $as_echo "$ac_cv_with_libuna" >&6; } if test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xno && test "x$ac_cv_with_libuna" != xauto-detect; then : if test -d "$ac_cv_with_libuna"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libuna}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libuna}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libuna" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libuna" >&2;} fi fi if test "x$ac_cv_with_libuna" = xno; then : ac_cv_libuna=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna" >&5 $as_echo_n "checking for libuna... " >&6; } if test -n "$libuna_CFLAGS"; then pkg_cv_libuna_CFLAGS="$libuna_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libuna >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libuna >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libuna_CFLAGS=`$PKG_CONFIG --cflags "libuna >= 20120425" 2>/dev/null` 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libuna >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libuna >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libuna_LIBS=`$PKG_CONFIG --libs "libuna >= 20120425" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libuna_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libuna >= 20120425" 2>&1` else libuna_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libuna >= 20120425" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libuna_PKG_ERRORS" >&5 ac_cv_libuna=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libuna=no else libuna_CFLAGS=$pkg_cv_libuna_CFLAGS libuna_LIBS=$pkg_cv_libuna_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libuna=yes fi fi if test "x$ac_cv_libuna" = xyes; then : ac_cv_libuna_CPPFLAGS="$pkg_cv_libuna_CFLAGS" ac_cv_libuna_LIBADD="$pkg_cv_libuna_LIBS" else for ac_header in libuna.h do : ac_fn_c_check_header_mongrel "$LINENO" "libuna.h" "ac_cv_header_libuna_h" "$ac_includes_default" if test "x$ac_cv_header_libuna_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBUNA_H 1 _ACEOF fi done if test "x$ac_cv_header_libuna_h" = xno; then : ac_cv_libuna=no else ac_cv_libuna=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_get_version in -luna" >&5 $as_echo_n "checking for libuna_get_version in -luna... " >&6; } if ${ac_cv_lib_una_libuna_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_get_version (); int main () { return libuna_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_get_version=yes else ac_cv_lib_una_libuna_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_get_version" >&5 $as_echo "$ac_cv_lib_una_libuna_get_version" >&6; } if test "x$ac_cv_lib_una_libuna_get_version" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_size_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base16_stream_size_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base16_stream_size_to_byte_stream (); int main () { return libuna_base16_stream_size_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream=yes else ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_copy_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base16_stream_copy_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base16_stream_copy_to_byte_stream (); int main () { return libuna_base16_stream_copy_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream=yes else ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_size_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base16_stream_size_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base16_stream_size_from_byte_stream (); int main () { return libuna_base16_stream_size_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream=yes else ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base16_stream_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base16_stream_copy_from_byte_stream (); int main () { return libuna_base16_stream_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_with_index_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base16_stream_with_index_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base16_stream_with_index_copy_from_byte_stream (); int main () { return libuna_base16_stream_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_from_base32_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_quintuplet_copy_from_base32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_quintuplet_copy_from_base32_stream (); int main () { return libuna_base32_quintuplet_copy_from_base32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream=yes else ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_to_base32_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_quintuplet_copy_to_base32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_quintuplet_copy_to_base32_stream (); int main () { return libuna_base32_quintuplet_copy_to_base32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream=yes else ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_quintuplet_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_quintuplet_copy_from_byte_stream (); int main () { return libuna_base32_quintuplet_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_quintuplet_copy_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_quintuplet_copy_to_byte_stream (); int main () { return libuna_base32_quintuplet_copy_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream=yes else ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_size_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_stream_size_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_stream_size_to_byte_stream (); int main () { return libuna_base32_stream_size_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream=yes else ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_copy_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_stream_copy_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_stream_copy_to_byte_stream (); int main () { return libuna_base32_stream_copy_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream=yes else ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_size_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_stream_size_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_stream_size_from_byte_stream (); int main () { return libuna_base32_stream_size_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream=yes else ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_stream_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_stream_copy_from_byte_stream (); int main () { return libuna_base32_stream_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_with_index_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_stream_with_index_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_stream_with_index_copy_from_byte_stream (); int main () { return libuna_base32_stream_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_from_base64_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_triplet_copy_from_base64_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_triplet_copy_from_base64_stream (); int main () { return libuna_base64_triplet_copy_from_base64_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream=yes else ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_to_base64_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_triplet_copy_to_base64_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_triplet_copy_to_base64_stream (); int main () { return libuna_base64_triplet_copy_to_base64_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream=yes else ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_triplet_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_triplet_copy_from_byte_stream (); int main () { return libuna_base64_triplet_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_triplet_copy_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_triplet_copy_to_byte_stream (); int main () { return libuna_base64_triplet_copy_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream=yes else ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_size_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_stream_size_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_stream_size_to_byte_stream (); int main () { return libuna_base64_stream_size_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream=yes else ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_copy_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_stream_copy_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_stream_copy_to_byte_stream (); int main () { return libuna_base64_stream_copy_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream=yes else ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_size_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_stream_size_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_stream_size_from_byte_stream (); int main () { return libuna_base64_stream_size_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream=yes else ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_stream_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_stream_copy_from_byte_stream (); int main () { return libuna_base64_stream_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_with_index_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_stream_with_index_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_stream_with_index_copy_from_byte_stream (); int main () { return libuna_base64_stream_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_byte_stream_size_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_byte_stream_size_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_byte_stream_size_from_utf8 (); int main () { return libuna_byte_stream_size_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_byte_stream_size_from_utf8=yes else ac_cv_lib_una_libuna_byte_stream_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_byte_stream_size_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_byte_stream_size_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_byte_stream_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_byte_stream_copy_from_utf8 (); int main () { return libuna_byte_stream_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_byte_stream_copy_from_utf8=yes else ac_cv_lib_una_libuna_byte_stream_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_byte_stream_size_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_byte_stream_size_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_byte_stream_size_from_utf16 (); int main () { return libuna_byte_stream_size_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_byte_stream_size_from_utf16=yes else ac_cv_lib_una_libuna_byte_stream_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_byte_stream_size_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_byte_stream_size_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_byte_stream_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_byte_stream_copy_from_utf16 (); int main () { return libuna_byte_stream_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_byte_stream_copy_from_utf16=yes else ac_cv_lib_una_libuna_byte_stream_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_byte_stream_size_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_byte_stream_size_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_byte_stream_size_from_utf32 (); int main () { return libuna_byte_stream_size_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_byte_stream_size_from_utf32=yes else ac_cv_lib_una_libuna_byte_stream_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_byte_stream_size_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_byte_stream_size_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_byte_stream_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_byte_stream_copy_from_utf32 (); int main () { return libuna_byte_stream_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_byte_stream_copy_from_utf32=yes else ac_cv_lib_una_libuna_byte_stream_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf8_stream_size_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_stream_size_from_utf8 (); int main () { return libuna_utf8_stream_size_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_stream_size_from_utf8=yes else ac_cv_lib_una_libuna_utf8_stream_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf8_stream_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_stream_copy_from_utf8 (); int main () { return libuna_utf8_stream_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8=yes else ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf8_stream_size_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_stream_size_from_utf16 (); int main () { return libuna_utf8_stream_size_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_stream_size_from_utf16=yes else ac_cv_lib_una_libuna_utf8_stream_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf8_stream_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_stream_copy_from_utf16 (); int main () { return libuna_utf8_stream_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf8_stream_size_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_stream_size_from_utf32 (); int main () { return libuna_utf8_stream_size_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_stream_size_from_utf32=yes else ac_cv_lib_una_libuna_utf8_stream_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf8_stream_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_stream_copy_from_utf32 (); int main () { return libuna_utf8_stream_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf16_stream_size_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_stream_size_from_utf8 (); int main () { return libuna_utf16_stream_size_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_stream_size_from_utf8=yes else ac_cv_lib_una_libuna_utf16_stream_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf16_stream_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_stream_copy_from_utf8 (); int main () { return libuna_utf16_stream_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8=yes else ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf16_stream_size_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_stream_size_from_utf16 (); int main () { return libuna_utf16_stream_size_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_stream_size_from_utf16=yes else ac_cv_lib_una_libuna_utf16_stream_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf16_stream_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_stream_copy_from_utf16 (); int main () { return libuna_utf16_stream_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf16_stream_size_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_stream_size_from_utf32 (); int main () { return libuna_utf16_stream_size_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_stream_size_from_utf32=yes else ac_cv_lib_una_libuna_utf16_stream_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf16_stream_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_stream_copy_from_utf32 (); int main () { return libuna_utf16_stream_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf32_stream_size_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_stream_size_from_utf8 (); int main () { return libuna_utf32_stream_size_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_stream_size_from_utf8=yes else ac_cv_lib_una_libuna_utf32_stream_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf32_stream_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_stream_copy_from_utf8 (); int main () { return libuna_utf32_stream_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8=yes else ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf32_stream_size_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_stream_size_from_utf16 (); int main () { return libuna_utf32_stream_size_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_stream_size_from_utf16=yes else ac_cv_lib_una_libuna_utf32_stream_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf32_stream_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_stream_copy_from_utf16 (); int main () { return libuna_utf32_stream_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf32_stream_size_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_stream_size_from_utf32 (); int main () { return libuna_utf32_stream_size_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_stream_size_from_utf32=yes else ac_cv_lib_una_libuna_utf32_stream_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf32_stream_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_stream_copy_from_utf32 (); int main () { return libuna_utf32_stream_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_byte_stream (); int main () { return libuna_utf8_string_size_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream=yes else ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_byte_stream (); int main () { return libuna_utf8_string_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_byte_stream (); int main () { return libuna_utf8_string_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_utf7_stream (); int main () { return libuna_utf8_string_size_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_utf7_stream (); int main () { return libuna_utf8_string_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_utf7_stream (); int main () { return libuna_utf8_string_with_index_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_utf8_stream (); int main () { return libuna_utf8_string_size_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_utf8_stream (); int main () { return libuna_utf8_string_copy_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_utf8_stream (); int main () { return libuna_utf8_string_with_index_copy_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_utf16_stream (); int main () { return libuna_utf8_string_size_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_utf16_stream (); int main () { return libuna_utf8_string_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_utf16_stream (); int main () { return libuna_utf8_string_with_index_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_utf32_stream (); int main () { return libuna_utf8_string_size_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_utf32_stream (); int main () { return libuna_utf8_string_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_utf32_stream (); int main () { return libuna_utf8_string_with_index_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_utf16 (); int main () { return libuna_utf8_string_size_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_utf16=yes else ac_cv_lib_una_libuna_utf8_string_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_utf16 (); int main () { return libuna_utf8_string_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_utf16 (); int main () { return libuna_utf8_string_with_index_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_utf32 (); int main () { return libuna_utf8_string_size_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_utf32=yes else ac_cv_lib_una_libuna_utf8_string_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_utf32 (); int main () { return libuna_utf8_string_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_utf32 (); int main () { return libuna_utf8_string_with_index_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_byte_stream (); int main () { return libuna_utf16_string_size_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream=yes else ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_byte_stream (); int main () { return libuna_utf16_string_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_byte_stream (); int main () { return libuna_utf16_string_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_utf7_stream (); int main () { return libuna_utf16_string_size_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_utf7_stream (); int main () { return libuna_utf16_string_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_utf7_stream (); int main () { return libuna_utf16_string_with_index_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_utf8_stream (); int main () { return libuna_utf16_string_size_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_utf8_stream (); int main () { return libuna_utf16_string_copy_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_utf8_stream (); int main () { return libuna_utf16_string_with_index_copy_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_utf16_stream (); int main () { return libuna_utf16_string_size_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_utf16_stream (); int main () { return libuna_utf16_string_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_utf16_stream (); int main () { return libuna_utf16_string_with_index_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_utf32_stream (); int main () { return libuna_utf16_string_size_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_utf32_stream (); int main () { return libuna_utf16_string_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_utf32_stream (); int main () { return libuna_utf16_string_with_index_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_utf8 (); int main () { return libuna_utf16_string_size_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_utf8=yes else ac_cv_lib_una_libuna_utf16_string_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_utf8 (); int main () { return libuna_utf16_string_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf8=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_utf8 (); int main () { return libuna_utf16_string_with_index_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_utf32 (); int main () { return libuna_utf16_string_size_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_utf32=yes else ac_cv_lib_una_libuna_utf16_string_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_utf32 (); int main () { return libuna_utf16_string_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_utf32 (); int main () { return libuna_utf16_string_with_index_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_byte_stream (); int main () { return libuna_utf32_string_size_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream=yes else ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_byte_stream (); int main () { return libuna_utf32_string_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_with_index_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_with_index_copy_from_byte_stream (); int main () { return libuna_utf32_string_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_utf7_stream (); int main () { return libuna_utf32_string_size_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_utf7_stream (); int main () { return libuna_utf32_string_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_with_index_copy_from_utf7_stream (); int main () { return libuna_utf32_string_with_index_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_utf8_stream (); int main () { return libuna_utf32_string_size_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_utf8_stream (); int main () { return libuna_utf32_string_copy_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_with_index_copy_from_utf8_stream (); int main () { return libuna_utf32_string_with_index_copy_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_utf16_stream (); int main () { return libuna_utf32_string_size_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_utf16_stream (); int main () { return libuna_utf32_string_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_with_index_copy_from_utf16_stream (); int main () { return libuna_utf32_string_with_index_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_utf32_stream (); int main () { return libuna_utf32_string_size_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_utf32_stream (); int main () { return libuna_utf32_string_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_with_index_copy_from_utf32_stream (); int main () { return libuna_utf32_string_with_index_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_utf8 (); int main () { return libuna_utf32_string_size_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_utf8=yes else ac_cv_lib_una_libuna_utf32_string_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_utf8 (); int main () { return libuna_utf32_string_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf8=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ac_cv_libuna_dummy=yes in -llibuna_utf32_string_with_index_copy_from_utf8" >&5 $as_echo_n "checking for ac_cv_libuna_dummy=yes in -llibuna_utf32_string_with_index_copy_from_utf8... " >&6; } if ${ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llibuna_utf32_string_with_index_copy_from_utf8 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ac_cv_libuna_dummy=yes (); int main () { return ac_cv_libuna_dummy=yes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes=yes else 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$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_utf16 (); int main () { return libuna_utf32_string_size_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_utf16=yes else ac_cv_lib_una_libuna_utf32_string_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_utf16 (); int main () { return libuna_utf32_string_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_with_index_copy_from_utf16 (); int main () { return libuna_utf32_string_with_index_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi ac_cv_libuna_LIBADD="-luna" fi fi fi if test "x$ac_cv_libuna" = xyes; then : $as_echo "#define HAVE_LIBUNA 1" >>confdefs.h fi if test "x$ac_cv_libuna" = xyes; then : HAVE_LIBUNA=1 else HAVE_LIBUNA=0 fi if test "x$ac_cv_libuna" != xyes; then : ac_cv_libuna_CPPFLAGS="-I../libuna"; ac_cv_libuna_LIBADD="../libuna/libuna.la"; ac_cv_libuna=local $as_echo "#define HAVE_LOCAL_LIBUNA 1" >>confdefs.h HAVE_LOCAL_LIBUNA=1 fi if test "x$ac_cv_libuna" = xlocal; then HAVE_LOCAL_LIBUNA_TRUE= HAVE_LOCAL_LIBUNA_FALSE='#' else HAVE_LOCAL_LIBUNA_TRUE='#' HAVE_LOCAL_LIBUNA_FALSE= fi if test "x$ac_cv_libuna_CPPFLAGS" != "x"; then : LIBUNA_CPPFLAGS=$ac_cv_libuna_CPPFLAGS fi if test "x$ac_cv_libuna_LIBADD" != "x"; then : LIBUNA_LIBADD=$ac_cv_libuna_LIBADD fi if test "x$ac_cv_libuna" = xyes; then : ax_libuna_pc_libs_private=-luna fi if test "x$ac_cv_libuna" = xyes; then : ax_libuna_spec_requires=libuna ax_libuna_spec_build_requires=libuna-devel fi # Check whether --with-libcfile was given. if test "${with_libcfile+set}" = set; then : withval=$with_libcfile; ac_cv_with_libcfile=$withval else ac_cv_with_libcfile=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcfile in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcfile in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcfile+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcfile=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcfile" >&5 $as_echo "$ac_cv_with_libcfile" >&6; } if test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xno && test "x$ac_cv_with_libcfile" != xauto-detect; then : if test -d "$ac_cv_with_libcfile"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcfile}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcfile}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcfile" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcfile" >&2;} fi fi if test "x$ac_cv_with_libcfile" = xno; then : ac_cv_libcfile=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile" >&5 $as_echo_n "checking for libcfile... " >&6; } if test -n "$libcfile_CFLAGS"; then pkg_cv_libcfile_CFLAGS="$libcfile_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcfile >= 20160409\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcfile >= 20160409") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcfile_CFLAGS=`$PKG_CONFIG --cflags "libcfile >= 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcfile >= 20160409\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcfile >= 20160409") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcfile_LIBS=`$PKG_CONFIG --libs "libcfile >= 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcfile_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --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=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcfile=no else libcfile_CFLAGS=$pkg_cv_libcfile_CFLAGS libcfile_LIBS=$pkg_cv_libcfile_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcfile=yes fi fi if test "x$ac_cv_libcfile" = xyes; then : ac_cv_libcfile_CPPFLAGS="$pkg_cv_libcfile_CFLAGS" ac_cv_libcfile_LIBADD="$pkg_cv_libcfile_LIBS" else for ac_header in libcfile.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcfile.h" "ac_cv_header_libcfile_h" "$ac_includes_default" if test "x$ac_cv_header_libcfile_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCFILE_H 1 _ACEOF fi done if test "x$ac_cv_header_libcfile_h" = xno; then : ac_cv_libcfile=no else ac_cv_libcfile=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_get_version in -lcfile" >&5 $as_echo_n "checking for libcfile_get_version in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_get_version (); int main () { return libcfile_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_get_version=yes else ac_cv_lib_cfile_libcfile_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_get_version" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_get_version" >&6; } if test "x$ac_cv_lib_cfile_libcfile_get_version" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_initialize in -lcfile" >&5 $as_echo_n "checking for libcfile_file_initialize in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_initialize (); int main () { return libcfile_file_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_initialize=yes else ac_cv_lib_cfile_libcfile_file_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_initialize" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_initialize" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_initialize" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_free in -lcfile" >&5 $as_echo_n "checking for libcfile_file_free in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_free (); int main () { return libcfile_file_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_free=yes else ac_cv_lib_cfile_libcfile_file_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_free" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_free" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_free" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open in -lcfile" >&5 $as_echo_n "checking for libcfile_file_open in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_open (); int main () { return libcfile_file_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_open=yes else ac_cv_lib_cfile_libcfile_file_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_open" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_open" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_with_error_code in -lcfile" >&5 $as_echo_n "checking for libcfile_file_open_with_error_code in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_open_with_error_code+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_open_with_error_code (); int main () { 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 ac_cv_lib_cfile_libcfile_file_open_with_error_code=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_with_error_code" >&5 $as_echo "$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 ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_close in -lcfile" >&5 $as_echo_n "checking for libcfile_file_close in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_close (); int main () { return libcfile_file_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_close=yes else ac_cv_lib_cfile_libcfile_file_close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_close" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_close" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_close" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_read_buffer in -lcfile" >&5 $as_echo_n "checking for libcfile_file_read_buffer in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_read_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_read_buffer (); int main () { return libcfile_file_read_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_read_buffer=yes else ac_cv_lib_cfile_libcfile_file_read_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_read_buffer" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_read_buffer" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_read_buffer" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_read_buffer_with_error_code in -lcfile" >&5 $as_echo_n "checking for libcfile_file_read_buffer_with_error_code in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_read_buffer_with_error_code (); int main () { 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 ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code" >&5 $as_echo "$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 ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_write_buffer in -lcfile" >&5 $as_echo_n "checking for libcfile_file_write_buffer in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_write_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_write_buffer (); int main () { return libcfile_file_write_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_write_buffer=yes else ac_cv_lib_cfile_libcfile_file_write_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_write_buffer" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_write_buffer" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_write_buffer" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_write_buffer_with_error_code in -lcfile" >&5 $as_echo_n "checking for libcfile_file_write_buffer_with_error_code in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_write_buffer_with_error_code (); int main () { 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 ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code" >&5 $as_echo "$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 ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_seek_offset in -lcfile" >&5 $as_echo_n "checking for libcfile_file_seek_offset in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_seek_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_seek_offset (); int main () { return libcfile_file_seek_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_seek_offset=yes else ac_cv_lib_cfile_libcfile_file_seek_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_seek_offset" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_seek_offset" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_seek_offset" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_resize in -lcfile" >&5 $as_echo_n "checking for libcfile_file_resize in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_resize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_resize (); int main () { return libcfile_file_resize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_resize=yes else ac_cv_lib_cfile_libcfile_file_resize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_resize" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_resize" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_resize" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_is_open in -lcfile" >&5 $as_echo_n "checking for libcfile_file_is_open in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_is_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_is_open (); int main () { return libcfile_file_is_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_is_open=yes else ac_cv_lib_cfile_libcfile_file_is_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_is_open" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_is_open" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_is_open" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_get_offset in -lcfile" >&5 $as_echo_n "checking for libcfile_file_get_offset in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_get_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_get_offset (); int main () { return libcfile_file_get_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_get_offset=yes else ac_cv_lib_cfile_libcfile_file_get_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_get_offset" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_get_offset" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_get_offset" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_get_size in -lcfile" >&5 $as_echo_n "checking for libcfile_file_get_size in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_get_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_get_size (); int main () { return libcfile_file_get_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_get_size=yes else ac_cv_lib_cfile_libcfile_file_get_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_get_size" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_get_size" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_get_size" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_is_device in -lcfile" >&5 $as_echo_n "checking for libcfile_file_is_device in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_is_device+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_is_device (); int main () { 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 ac_cv_lib_cfile_libcfile_file_is_device=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_is_device" >&5 $as_echo "$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 ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_io_control_read in -lcfile" >&5 $as_echo_n "checking for libcfile_file_io_control_read in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_io_control_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_io_control_read (); int main () { 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 ac_cv_lib_cfile_libcfile_file_io_control_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_io_control_read" >&5 $as_echo "$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 ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_io_control_read_with_error_code in -lcfile" >&5 $as_echo_n "checking for libcfile_file_io_control_read_with_error_code in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_io_control_read_with_error_code (); int main () { 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 ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code" >&5 $as_echo "$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 ac_cv_libcfile=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_wide in -lcfile" >&5 $as_echo_n "checking for libcfile_file_open_wide in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_open_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_open_wide (); int main () { return libcfile_file_open_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_open_wide=yes else ac_cv_lib_cfile_libcfile_file_open_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_wide" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_open_wide" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_open_wide" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_wide_with_error_code in -lcfile" >&5 $as_echo_n "checking for libcfile_file_open_wide_with_error_code in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_open_wide_with_error_code (); int main () { 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 ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code" >&5 $as_echo "$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 ac_cv_libcfile=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_exists in -lcfile" >&5 $as_echo_n "checking for libcfile_file_exists in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_exists+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_exists (); int main () { return libcfile_file_exists (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_exists=yes else ac_cv_lib_cfile_libcfile_file_exists=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_exists" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_exists" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_exists" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_remove in -lcfile" >&5 $as_echo_n "checking for libcfile_file_remove in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_remove+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_remove (); int main () { return libcfile_file_remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_remove=yes else ac_cv_lib_cfile_libcfile_file_remove=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_remove" >&5 $as_echo "$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 ac_cv_libcfile=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_exists_wide in -lcfile" >&5 $as_echo_n "checking for libcfile_file_exists_wide in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_exists_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_exists_wide (); int main () { return libcfile_file_exists_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_exists_wide=yes else ac_cv_lib_cfile_libcfile_file_exists_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_exists_wide" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_exists_wide" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_exists_wide" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_remove_wide in -lcfile" >&5 $as_echo_n "checking for libcfile_file_remove_wide in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_remove_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_remove_wide (); int main () { 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 ac_cv_lib_cfile_libcfile_file_remove_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_remove_wide" >&5 $as_echo "$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 ac_cv_libcfile=no fi fi ac_cv_libcfile_LIBADD="-lcfile" fi fi fi if test "x$ac_cv_libcfile" = xyes; then : $as_echo "#define HAVE_LIBCFILE 1" >>confdefs.h fi if test "x$ac_cv_libcfile" = xyes; then : HAVE_LIBCFILE=1 else HAVE_LIBCFILE=0 fi if test "x$ac_cv_libcfile" != xyes; then : for ac_header in errno.h stdio.h sys/stat.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in cygwin/fs.h fcntl.h linux/fs.h sys/disk.h sys/disklabel.h sys/ioctl.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in close fstat ftruncate ioctl lseek open read write do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_close" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: close See \`config.log' for more details" "$LINENO" 5; } fi for ac_func in posix_fadvise do : ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise" if test "x$ac_cv_func_posix_fadvise" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_POSIX_FADVISE 1 _ACEOF fi done if test "x$ac_cv_func_posix_fadvise" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_fadvise can be linked" >&5 $as_echo_n "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 () { #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 ac_cv_func_posix_fadvise=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$SAVE_CFLAGS" if test "x$ac_cv_func_posix_fadvise" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_POSIX_FADVISE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "x$ac_cv_func_fstat" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fstat See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_ftruncate" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: ftruncate See \`config.log' for more details" "$LINENO" 5; } fi if test x"$ac_cv_enable_winapi" = xno; then : if test "x$ac_cv_func_ioctl" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: ioctl See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_func_lseek" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: lseek See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_open" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: open See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_read" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: read See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_write" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: write See \`config.log' for more details" "$LINENO" 5; } fi for ac_func in stat unlink do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_stat" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: stat See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_unlink" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: unlink See \`config.log' for more details" "$LINENO" 5; } fi ac_cv_libcfile_CPPFLAGS="-I../libcfile"; ac_cv_libcfile_LIBADD="../libcfile/libcfile.la"; ac_cv_libcfile=local $as_echo "#define HAVE_LOCAL_LIBCFILE 1" >>confdefs.h HAVE_LOCAL_LIBCFILE=1 fi if test "x$ac_cv_libcfile" = xlocal; then HAVE_LOCAL_LIBCFILE_TRUE= HAVE_LOCAL_LIBCFILE_FALSE='#' else HAVE_LOCAL_LIBCFILE_TRUE='#' HAVE_LOCAL_LIBCFILE_FALSE= fi if test "x$ac_cv_libcfile_CPPFLAGS" != "x"; then : LIBCFILE_CPPFLAGS=$ac_cv_libcfile_CPPFLAGS fi if test "x$ac_cv_libcfile_LIBADD" != "x"; then : LIBCFILE_LIBADD=$ac_cv_libcfile_LIBADD fi if test "x$ac_cv_libcfile" = xyes; then : ax_libcfile_pc_libs_private=-lcfile fi if test "x$ac_cv_libcfile" = xyes; then : ax_libcfile_spec_requires=libcfile ax_libcfile_spec_build_requires=libcfile-devel fi # Check whether --with-libcpath was given. if test "${with_libcpath+set}" = set; then : withval=$with_libcpath; ac_cv_with_libcpath=$withval else ac_cv_with_libcpath=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcpath in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcpath in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcpath+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcpath=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcpath" >&5 $as_echo "$ac_cv_with_libcpath" >&6; } if test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xno && test "x$ac_cv_with_libcpath" != xauto-detect; then : if test -d "$ac_cv_with_libcpath"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcpath}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcpath}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcpath" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcpath" >&2;} fi fi if test "x$ac_cv_with_libcpath" = xno; then : ac_cv_libcpath=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath" >&5 $as_echo_n "checking for libcpath... " >&6; } if test -n "$libcpath_CFLAGS"; then pkg_cv_libcpath_CFLAGS="$libcpath_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpath >= 20120701\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcpath >= 20120701") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcpath_CFLAGS=`$PKG_CONFIG --cflags "libcpath >= 20120701" 2>/dev/null` 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpath >= 20120701\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcpath >= 20120701") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcpath_LIBS=`$PKG_CONFIG --libs "libcpath >= 20120701" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcpath_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcpath >= 20120701" 2>&1` else libcpath_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcpath >= 20120701" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcpath_PKG_ERRORS" >&5 ac_cv_libcpath=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcpath=no else libcpath_CFLAGS=$pkg_cv_libcpath_CFLAGS libcpath_LIBS=$pkg_cv_libcpath_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcpath=yes fi fi if test "x$ac_cv_libcpath" = xyes; then : ac_cv_libcpath_CPPFLAGS="$pkg_cv_libcpath_CFLAGS" ac_cv_libcpath_LIBADD="$pkg_cv_libcpath_LIBS" else for ac_header in libcpath.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcpath.h" "ac_cv_header_libcpath_h" "$ac_includes_default" if test "x$ac_cv_header_libcpath_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCPATH_H 1 _ACEOF fi done if test "x$ac_cv_header_libcpath_h" = xno; then : ac_cv_libcpath=no else ac_cv_libcpath=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_get_version in -lcpath" >&5 $as_echo_n "checking for libcpath_get_version in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_get_version (); int main () { return libcpath_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_get_version=yes else ac_cv_lib_cpath_libcpath_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_get_version" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_get_version" >&6; } if test "x$ac_cv_lib_cpath_libcpath_get_version" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_change_directory in -lcpath" >&5 $as_echo_n "checking for libcpath_path_change_directory in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_change_directory+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_change_directory (); int main () { return libcpath_path_change_directory (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_change_directory=yes else ac_cv_lib_cpath_libcpath_path_change_directory=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_change_directory" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_change_directory" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_change_directory" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_current_working_directory in -lcpath" >&5 $as_echo_n "checking for libcpath_path_get_current_working_directory in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_get_current_working_directory+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_get_current_working_directory (); int main () { return libcpath_path_get_current_working_directory (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_get_current_working_directory=yes else ac_cv_lib_cpath_libcpath_path_get_current_working_directory=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_current_working_directory" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_get_current_working_directory" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_get_current_working_directory" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_full_path in -lcpath" >&5 $as_echo_n "checking for libcpath_path_get_full_path in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_get_full_path+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_get_full_path (); int main () { return libcpath_path_get_full_path (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_get_full_path=yes else ac_cv_lib_cpath_libcpath_path_get_full_path=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_full_path" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_get_full_path" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_get_full_path" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_join in -lcpath" >&5 $as_echo_n "checking for libcpath_path_join in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_join+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_join (); int main () { return libcpath_path_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_join=yes else ac_cv_lib_cpath_libcpath_path_join=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_join" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_join" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_join" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_make_directory in -lcpath" >&5 $as_echo_n "checking for libcpath_path_make_directory in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_make_directory+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_make_directory (); int main () { return libcpath_path_make_directory (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_make_directory=yes else ac_cv_lib_cpath_libcpath_path_make_directory=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_make_directory" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_make_directory" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_make_directory" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_sanitize in -lcpath" >&5 $as_echo_n "checking for libcpath_path_sanitize in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_sanitize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_sanitize (); int main () { return libcpath_path_sanitize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_sanitize=yes else ac_cv_lib_cpath_libcpath_path_sanitize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_sanitize" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_sanitize" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_sanitize" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_sanitize_filename in -lcpath" >&5 $as_echo_n "checking for libcpath_path_sanitize_filename in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_sanitize_filename+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_sanitize_filename (); int main () { return libcpath_path_sanitize_filename (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_sanitize_filename=yes else ac_cv_lib_cpath_libcpath_path_sanitize_filename=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_sanitize_filename" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_sanitize_filename" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_sanitize_filename" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_change_directory_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_change_directory_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_change_directory_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_change_directory_wide (); int main () { return libcpath_path_change_directory_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_change_directory_wide=yes else ac_cv_lib_cpath_libcpath_path_change_directory_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_change_directory_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_change_directory_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_change_directory_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_current_working_directory_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_get_current_working_directory_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_get_current_working_directory_wide (); int main () { return libcpath_path_get_current_working_directory_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide=yes else ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_full_path_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_get_full_path_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_get_full_path_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_get_full_path_wide (); int main () { return libcpath_path_get_full_path_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_get_full_path_wide=yes else ac_cv_lib_cpath_libcpath_path_get_full_path_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_full_path_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_get_full_path_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_get_full_path_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_join_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_join_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_join_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_join_wide (); int main () { return libcpath_path_join_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_join_wide=yes else ac_cv_lib_cpath_libcpath_path_join_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_join_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_join_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_join_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_make_directory_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_make_directory_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_make_directory_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_make_directory_wide (); int main () { return libcpath_path_make_directory_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_make_directory_wide=yes else ac_cv_lib_cpath_libcpath_path_make_directory_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_make_directory_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_make_directory_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_make_directory_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_sanitize_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_sanitize_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_sanitize_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_sanitize_wide (); int main () { return libcpath_path_sanitize_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_sanitize_wide=yes else ac_cv_lib_cpath_libcpath_path_sanitize_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_sanitize_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_sanitize_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_sanitize_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_sanitize_filename_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_sanitize_filename_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_sanitize_filename_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_sanitize_filename_wide (); int main () { return libcpath_path_sanitize_filename_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_sanitize_filename_wide=yes else ac_cv_lib_cpath_libcpath_path_sanitize_filename_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_sanitize_filename_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_sanitize_filename_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_sanitize_filename_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi fi ac_cv_libcpath_LIBADD="-lcpath" fi fi fi if test "x$ac_cv_libcpath" = xyes; then : $as_echo "#define HAVE_LIBCPATH 1" >>confdefs.h fi if test "x$ac_cv_libcpath" = xyes; then : HAVE_LIBCPATH=1 else HAVE_LIBCPATH=0 fi if test "x$ac_cv_libcpath" != xyes; then : for ac_header in errno.h sys/stat.h sys/syslimits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in chdir getcwd do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_chdir" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: chdir See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_getcwd" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: getcwd See \`config.log' for more details" "$LINENO" 5; } fi for ac_func in mkdir do : ac_fn_c_check_func "$LINENO" "mkdir" "ac_cv_func_mkdir" if test "x$ac_cv_func_mkdir" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MKDIR 1 _ACEOF fi done if test "x$ac_cv_func_mkdir" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use mkdir" >&5 $as_echo_n "checking how to use mkdir... " >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { mkdir( "", 0 ) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: with additional mode argument" >&5 $as_echo "with additional mode argument" >&6; } ac_cv_cv_mkdir_mode=yes else ac_cv_cv_mkdir_mode=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "x$ac_cv_cv_mkdir_mode" = xno; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { mkdir( "" ) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: with single argument" >&5 $as_echo "with single argument" >&6; } ac_cv_cv_mkdir=yes else ac_cv_cv_mkdir=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$SAVE_CFLAGS" if test "x$ac_cv_cv_mkdir_mode" = xno && test "x$ac_cv_cv_mkdir" = xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown" >&5 $as_echo "$as_me: WARNING: unknown" >&2;} ac_cv_func_mkdir=no fi if test "x$ac_cv_func_mkdir" = xyes; then : $as_echo "#define HAVE_MKDIR 1" >>confdefs.h fi if test "x$ac_cv_cv_mkdir_mode" = xyes; then : $as_echo "#define HAVE_MKDIR_MODE 1" >>confdefs.h fi fi if test "x$ac_cv_func_mkdir" = xno; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: mkdir See \`config.log' for more details" "$LINENO" 5; } fi ac_cv_libcpath_CPPFLAGS="-I../libcpath"; ac_cv_libcpath_LIBADD="../libcpath/libcpath.la"; ac_cv_libcpath=local $as_echo "#define HAVE_LOCAL_LIBCPATH 1" >>confdefs.h HAVE_LOCAL_LIBCPATH=1 fi if test "x$ac_cv_libcpath" = xlocal; then HAVE_LOCAL_LIBCPATH_TRUE= HAVE_LOCAL_LIBCPATH_FALSE='#' else HAVE_LOCAL_LIBCPATH_TRUE='#' HAVE_LOCAL_LIBCPATH_FALSE= fi if test "x$ac_cv_libcpath_CPPFLAGS" != "x"; then : LIBCPATH_CPPFLAGS=$ac_cv_libcpath_CPPFLAGS fi if test "x$ac_cv_libcpath_LIBADD" != "x"; then : LIBCPATH_LIBADD=$ac_cv_libcpath_LIBADD fi if test "x$ac_cv_libcpath" = xyes; then : ax_libcpath_pc_libs_private=-lcpath fi if test "x$ac_cv_libcpath" = xyes; then : ax_libcpath_spec_requires=libcpath ax_libcpath_spec_build_requires=libcpath-devel fi # Check whether --with-libbfio was given. if test "${with_libbfio+set}" = set; then : withval=$with_libbfio; ac_cv_with_libbfio=$withval else ac_cv_with_libbfio=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libbfio+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libbfio=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libbfio" >&5 $as_echo "$ac_cv_with_libbfio" >&6; } if test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xno && test "x$ac_cv_with_libbfio" != xauto-detect; then : if test -d "$ac_cv_with_libbfio"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libbfio}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libbfio}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libbfio" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libbfio" >&2;} fi fi if test "x$ac_cv_with_libbfio" = xno; then : ac_cv_libbfio=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio" >&5 $as_echo_n "checking for libbfio... " >&6; } if test -n "$libbfio_CFLAGS"; then pkg_cv_libbfio_CFLAGS="$libbfio_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbfio >= 20160108\""; } >&5 ($PKG_CONFIG --exists --print-errors "libbfio >= 20160108") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libbfio_CFLAGS=`$PKG_CONFIG --cflags "libbfio >= 20160108" 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbfio >= 20160108\""; } >&5 ($PKG_CONFIG --exists --print-errors "libbfio >= 20160108") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libbfio_LIBS=`$PKG_CONFIG --libs "libbfio >= 20160108" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libbfio_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libbfio >= 20160108" 2>&1` else libbfio_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libbfio >= 20160108" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libbfio_PKG_ERRORS" >&5 ac_cv_libbfio=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libbfio=no else libbfio_CFLAGS=$pkg_cv_libbfio_CFLAGS libbfio_LIBS=$pkg_cv_libbfio_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libbfio=yes fi fi if test "x$ac_cv_libbfio" = xyes; then : ac_cv_libbfio_CPPFLAGS="$pkg_cv_libbfio_CFLAGS" ac_cv_libbfio_LIBADD="$pkg_cv_libbfio_LIBS" else for ac_header in libbfio.h do : ac_fn_c_check_header_mongrel "$LINENO" "libbfio.h" "ac_cv_header_libbfio_h" "$ac_includes_default" if test "x$ac_cv_header_libbfio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBBFIO_H 1 _ACEOF fi done if test "x$ac_cv_header_libbfio_h" = xno; then : ac_cv_libbfio=no else ac_cv_libbfio=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_get_version in -lbfio" >&5 $as_echo_n "checking for libbfio_get_version in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_get_version (); int main () { return libbfio_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_get_version=yes else ac_cv_lib_bfio_libbfio_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_get_version" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_get_version" >&6; } if test "x$ac_cv_lib_bfio_libbfio_get_version" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_free in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_free in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_free (); int main () { return libbfio_handle_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_free=yes else ac_cv_lib_bfio_libbfio_handle_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_free" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_free" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_free" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_open in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_open in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_open (); int main () { return libbfio_handle_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_open=yes else ac_cv_lib_bfio_libbfio_handle_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_open" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_open" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_open" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_close in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_close in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_close (); int main () { return libbfio_handle_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_close=yes else ac_cv_lib_bfio_libbfio_handle_close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_close" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_close" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_close" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_exists in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_exists in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_exists+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_exists (); int main () { return libbfio_handle_exists (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_exists=yes else ac_cv_lib_bfio_libbfio_handle_exists=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_exists" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_exists" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_exists" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_read_buffer in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_read_buffer in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_read_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_read_buffer (); int main () { return libbfio_handle_read_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_read_buffer=yes else ac_cv_lib_bfio_libbfio_handle_read_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_read_buffer" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_read_buffer" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_read_buffer" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_write_buffer in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_write_buffer in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_write_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_write_buffer (); int main () { return libbfio_handle_write_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_write_buffer=yes else ac_cv_lib_bfio_libbfio_handle_write_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_write_buffer" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_write_buffer" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_write_buffer" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_seek_offset in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_seek_offset in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_seek_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_seek_offset (); int main () { return libbfio_handle_seek_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_seek_offset=yes else ac_cv_lib_bfio_libbfio_handle_seek_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_seek_offset" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_seek_offset" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_seek_offset" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_is_open in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_is_open in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_is_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_is_open (); int main () { return libbfio_handle_is_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_is_open=yes else ac_cv_lib_bfio_libbfio_handle_is_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_is_open" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_is_open" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_is_open" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_offset in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_get_offset in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_get_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_get_offset (); int main () { return libbfio_handle_get_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_get_offset=yes else ac_cv_lib_bfio_libbfio_handle_get_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_offset" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_get_offset" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_get_offset" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_size in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_get_size in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_get_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_get_size (); int main () { return libbfio_handle_get_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_get_size=yes else ac_cv_lib_bfio_libbfio_handle_get_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_size" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_get_size" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_get_size" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_set_track_offsets_read in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_set_track_offsets_read in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_set_track_offsets_read (); int main () { return libbfio_handle_set_track_offsets_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read=yes else ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_number_of_offsets_read in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_get_number_of_offsets_read in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_get_number_of_offsets_read (); int main () { return libbfio_handle_get_number_of_offsets_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read=yes else ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_offset_read in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_get_offset_read in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_get_offset_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_get_offset_read (); int main () { return libbfio_handle_get_offset_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_get_offset_read=yes else ac_cv_lib_bfio_libbfio_handle_get_offset_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_offset_read" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_get_offset_read" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_get_offset_read" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_initialize in -lbfio" >&5 $as_echo_n "checking for libbfio_file_initialize in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_initialize (); int main () { return libbfio_file_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_initialize=yes else ac_cv_lib_bfio_libbfio_file_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_initialize" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_initialize" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_initialize" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_size in -lbfio" >&5 $as_echo_n "checking for libbfio_file_get_name_size in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_get_name_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_get_name_size (); int main () { return libbfio_file_get_name_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_get_name_size=yes else ac_cv_lib_bfio_libbfio_file_get_name_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_size" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_get_name_size" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_get_name_size" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name in -lbfio" >&5 $as_echo_n "checking for libbfio_file_get_name in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_get_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_get_name (); int main () { return libbfio_file_get_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_get_name=yes else ac_cv_lib_bfio_libbfio_file_get_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_get_name" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_get_name" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_set_name in -lbfio" >&5 $as_echo_n "checking for libbfio_file_set_name in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_set_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_set_name (); int main () { return libbfio_file_set_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_set_name=yes else ac_cv_lib_bfio_libbfio_file_set_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_set_name" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_set_name" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_set_name" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_size_wide in -lbfio" >&5 $as_echo_n "checking for libbfio_file_get_name_size_wide in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_get_name_size_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_get_name_size_wide (); int main () { return libbfio_file_get_name_size_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_get_name_size_wide=yes else ac_cv_lib_bfio_libbfio_file_get_name_size_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_size_wide" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_get_name_size_wide" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_get_name_size_wide" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_wide in -lbfio" >&5 $as_echo_n "checking for libbfio_file_get_name_wide in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_get_name_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_get_name_wide (); int main () { return libbfio_file_get_name_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_get_name_wide=yes else ac_cv_lib_bfio_libbfio_file_get_name_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_wide" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_get_name_wide" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_get_name_wide" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_set_name_wide in -lbfio" >&5 $as_echo_n "checking for libbfio_file_set_name_wide in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_set_name_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_set_name_wide (); int main () { return libbfio_file_set_name_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_set_name_wide=yes else ac_cv_lib_bfio_libbfio_file_set_name_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_set_name_wide" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_set_name_wide" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_set_name_wide" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_initialize in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_initialize in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_initialize (); int main () { return libbfio_pool_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_initialize=yes else ac_cv_lib_bfio_libbfio_pool_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_initialize" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_initialize" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_initialize" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_free in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_free in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_free (); int main () { return libbfio_pool_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_free=yes else ac_cv_lib_bfio_libbfio_pool_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_free" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_free" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_free" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_clone in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_clone in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_clone+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_clone (); int main () { return libbfio_pool_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_clone=yes else ac_cv_lib_bfio_libbfio_pool_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_clone" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_clone" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_clone" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_number_of_handles in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_get_number_of_handles in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_get_number_of_handles+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_get_number_of_handles (); int main () { return libbfio_pool_get_number_of_handles (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_get_number_of_handles=yes else ac_cv_lib_bfio_libbfio_pool_get_number_of_handles=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_handle in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_get_handle in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_get_handle+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_get_handle (); int main () { return libbfio_pool_get_handle (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_get_handle=yes else ac_cv_lib_bfio_libbfio_pool_get_handle=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_handle" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_get_handle" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_get_handle" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_set_handle in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_set_handle in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_set_handle+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_set_handle (); int main () { return libbfio_pool_set_handle (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_set_handle=yes else ac_cv_lib_bfio_libbfio_pool_set_handle=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_set_handle" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_set_handle" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_set_handle" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_append_handle in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_append_handle in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_append_handle+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_append_handle (); int main () { return libbfio_pool_append_handle (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_append_handle=yes else ac_cv_lib_bfio_libbfio_pool_append_handle=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_append_handle" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_append_handle" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_append_handle" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_remove_handle in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_remove_handle in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_remove_handle+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_remove_handle (); int main () { 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 ac_cv_lib_bfio_libbfio_pool_remove_handle=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_remove_handle" >&5 $as_echo "$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 ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_maximum_number_of_open_handles in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_get_maximum_number_of_open_handles in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_get_maximum_number_of_open_handles (); int main () { 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 ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles" >&5 $as_echo "$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 ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_set_maximum_number_of_open_handles in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_set_maximum_number_of_open_handles in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_set_maximum_number_of_open_handles (); int main () { return libbfio_pool_set_maximum_number_of_open_handles (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles=yes else ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_open in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_open in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_open (); int main () { return libbfio_pool_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_open=yes else ac_cv_lib_bfio_libbfio_pool_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_open" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_open" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_open" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_reopen in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_reopen in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_reopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_reopen (); int main () { return libbfio_pool_reopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_reopen=yes else ac_cv_lib_bfio_libbfio_pool_reopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_reopen" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_reopen" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_reopen" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_close in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_close in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_close (); int main () { return libbfio_pool_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_close=yes else ac_cv_lib_bfio_libbfio_pool_close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_close" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_close" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_close" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_close_all in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_close_all in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_close_all+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_close_all (); int main () { return libbfio_pool_close_all (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_close_all=yes else ac_cv_lib_bfio_libbfio_pool_close_all=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_close_all" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_close_all" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_close_all" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_read_buffer in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_read_buffer in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_read_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_read_buffer (); int main () { return libbfio_pool_read_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_read_buffer=yes else ac_cv_lib_bfio_libbfio_pool_read_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_read_buffer" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_read_buffer" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_read_buffer" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_write_buffer in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_write_buffer in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_write_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_write_buffer (); int main () { return libbfio_pool_write_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_write_buffer=yes else ac_cv_lib_bfio_libbfio_pool_write_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_write_buffer" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_write_buffer" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_write_buffer" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_seek_offset in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_seek_offset in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_seek_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_seek_offset (); int main () { return libbfio_pool_seek_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_seek_offset=yes else ac_cv_lib_bfio_libbfio_pool_seek_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_seek_offset" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_seek_offset" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_seek_offset" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_offset in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_get_offset in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_get_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_get_offset (); int main () { return libbfio_pool_get_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_get_offset=yes else ac_cv_lib_bfio_libbfio_pool_get_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_offset" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_get_offset" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_get_offset" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_size in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_get_size in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_get_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_get_size (); int main () { return libbfio_pool_get_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_get_size=yes else ac_cv_lib_bfio_libbfio_pool_get_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_size" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_get_size" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_get_size" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi ac_cv_libbfio_LIBADD="-lbfio" fi fi fi if test "x$ac_cv_libbfio" = xyes; then : $as_echo "#define HAVE_LIBBFIO 1" >>confdefs.h fi if test "x$ac_cv_libbfio" = xyes; then : HAVE_LIBBFIO=1 else HAVE_LIBBFIO=0 fi if test "x$ac_cv_libbfio" != xyes; then : $as_echo "#define HAVE_LOCAL_LIBBFIO 1" >>confdefs.h HAVE_LOCAL_LIBBFIO=1 ac_cv_libbfio_CPPFLAGS="-I../libbfio"; ac_cv_libbfio_LIBADD="../libbfio/libbfio.la"; ac_cv_libbfio=local fi if test "x$ac_cv_libbfio" = xlocal; then HAVE_LOCAL_LIBBFIO_TRUE= HAVE_LOCAL_LIBBFIO_FALSE='#' else HAVE_LOCAL_LIBBFIO_TRUE='#' HAVE_LOCAL_LIBBFIO_FALSE= fi if test "x$ac_cv_libbfio_CPPFLAGS" != "x"; then : LIBBFIO_CPPFLAGS=$ac_cv_libbfio_CPPFLAGS fi if test "x$ac_cv_libbfio_LIBADD" != "x"; then : LIBBFIO_LIBADD=$ac_cv_libbfio_LIBADD fi if test "x$ac_cv_libbfio" = xyes; then : ax_libbfio_pc_libs_private=-lbfio fi if test "x$ac_cv_libbfio" = xyes; then : ax_libbfio_spec_requires=libbfio ax_libbfio_spec_build_requires=libbfio-devel fi # Check whether --with-libfdatetime was given. if test "${with_libfdatetime+set}" = set; then : withval=$with_libfdatetime; ac_cv_with_libfdatetime=$withval else ac_cv_with_libfdatetime=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfdatetime in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfdatetime in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfdatetime+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfdatetime=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfdatetime" >&5 $as_echo "$ac_cv_with_libfdatetime" >&6; } if test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xno && test "x$ac_cv_with_libfdatetime" != xauto-detect; then : if test -d "$ac_cv_with_libfdatetime"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfdatetime}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfdatetime}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfdatetime" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfdatetime" >&2;} fi fi if test "x$ac_cv_with_libfdatetime" = xno; then : ac_cv_libfdatetime=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime" >&5 $as_echo_n "checking for libfdatetime... " >&6; } if test -n "$libfdatetime_CFLAGS"; then pkg_cv_libfdatetime_CFLAGS="$libfdatetime_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdatetime >= 20160220\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdatetime >= 20160220") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdatetime_CFLAGS=`$PKG_CONFIG --cflags "libfdatetime >= 20160220" 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdatetime >= 20160220\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdatetime >= 20160220") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdatetime_LIBS=`$PKG_CONFIG --libs "libfdatetime >= 20160220" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfdatetime_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfdatetime >= 20160220" 2>&1` else libfdatetime_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfdatetime >= 20160220" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfdatetime_PKG_ERRORS" >&5 ac_cv_libfdatetime=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfdatetime=no else libfdatetime_CFLAGS=$pkg_cv_libfdatetime_CFLAGS libfdatetime_LIBS=$pkg_cv_libfdatetime_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfdatetime=yes fi fi if test "x$ac_cv_libfdatetime" = xyes; then : ac_cv_libfdatetime_CPPFLAGS="$pkg_cv_libfdatetime_CFLAGS" ac_cv_libfdatetime_LIBADD="$pkg_cv_libfdatetime_LIBS" else for ac_header in libfdatetime.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfdatetime.h" "ac_cv_header_libfdatetime_h" "$ac_includes_default" if test "x$ac_cv_header_libfdatetime_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFDATETIME_H 1 _ACEOF fi done if test "x$ac_cv_header_libfdatetime_h" = xno; then : ac_cv_libfdatetime=no else ac_cv_libfdatetime=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_get_version in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_get_version in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_get_version (); int main () { return libfdatetime_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_get_version=yes else ac_cv_lib_fdatetime_libfdatetime_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_get_version" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_get_version" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_get_version" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_initialize (); int main () { return libfdatetime_fat_date_time_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_free (); int main () { return libfdatetime_fat_date_time_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_from_byte_stream (); int main () { return libfdatetime_fat_date_time_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_from_32bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_from_32bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_from_32bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_32bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_32bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_32bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_utf8_string (); int main () { return libfdatetime_fat_date_time_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_utf8_string_with_index (); int main () { return libfdatetime_fat_date_time_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_utf16_string (); int main () { return libfdatetime_fat_date_time_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_utf16_string_with_index (); int main () { return libfdatetime_fat_date_time_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_utf32_string (); int main () { return libfdatetime_fat_date_time_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_utf32_string_with_index (); int main () { return libfdatetime_fat_date_time_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_initialize (); int main () { return libfdatetime_filetime_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_initialize=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_free (); int main () { return libfdatetime_filetime_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_free=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_free" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_free" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_from_byte_stream (); int main () { return libfdatetime_filetime_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_from_64bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_from_64bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_from_64bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_64bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_64bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_64bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_utf8_string (); int main () { return libfdatetime_filetime_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_utf8_string_with_index (); int main () { return libfdatetime_filetime_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_utf16_string (); int main () { return libfdatetime_filetime_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_utf16_string_with_index (); int main () { return libfdatetime_filetime_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_utf32_string (); int main () { return libfdatetime_filetime_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_utf32_string_with_index (); int main () { return libfdatetime_filetime_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_add in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_add in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_add+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_add (); int main () { return libfdatetime_filetime_add (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_add=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_add=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_add" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_add" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_add" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_initialize (); int main () { return libfdatetime_floatingtime_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_free (); int main () { return libfdatetime_floatingtime_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_free=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_from_byte_stream (); int main () { return libfdatetime_floatingtime_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_from_64bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_from_64bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_from_64bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_64bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_64bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_64bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_utf8_string (); int main () { return libfdatetime_floatingtime_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_utf8_string_with_index (); int main () { return libfdatetime_floatingtime_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_utf16_string (); int main () { return libfdatetime_floatingtime_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_utf16_string_with_index (); int main () { return libfdatetime_floatingtime_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_utf32_string (); int main () { return libfdatetime_floatingtime_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_utf32_string_with_index (); int main () { return libfdatetime_floatingtime_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_hfs_time_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_hfs_time_initialize (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_hfs_time_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_hfs_time_free (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_hfs_time_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_free" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_hfs_time_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_hfs_time_copy_from_byte_stream (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_from_32bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_hfs_time_copy_from_32bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_hfs_time_copy_from_32bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_32bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_hfs_time_copy_to_32bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_hfs_time_copy_to_32bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_hfs_time_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_hfs_time_copy_to_utf8_string (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_hfs_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_hfs_time_copy_to_utf8_string_with_index (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_hfs_time_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_hfs_time_copy_to_utf16_string (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_hfs_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_hfs_time_copy_to_utf16_string_with_index (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_hfs_time_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_hfs_time_copy_to_utf32_string (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_hfs_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_hfs_time_copy_to_utf32_string_with_index (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_initialize (); int main () { return libfdatetime_nsf_timedate_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_free (); int main () { return libfdatetime_nsf_timedate_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_from_byte_stream (); int main () { return libfdatetime_nsf_timedate_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_from_64bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_from_64bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_from_64bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_64bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_64bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_64bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_utf8_string (); int main () { return libfdatetime_nsf_timedate_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_utf8_string_with_index (); int main () { return libfdatetime_nsf_timedate_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_utf16_string (); int main () { return libfdatetime_nsf_timedate_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_utf16_string_with_index (); int main () { return libfdatetime_nsf_timedate_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_utf32_string (); int main () { return libfdatetime_nsf_timedate_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_utf32_string_with_index (); int main () { return libfdatetime_nsf_timedate_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_initialize (); int main () { return libfdatetime_posix_time_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_free (); int main () { return libfdatetime_posix_time_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_free=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_free" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_free" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_from_byte_stream (); int main () { return libfdatetime_posix_time_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_32bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_from_32bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_from_32bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_32bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_32bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_32bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_64bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_from_64bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_from_64bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_64bit in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_64bit in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_64bit (); int main () { 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 ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit" >&5 $as_echo "$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 ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_utf8_string (); int main () { return libfdatetime_posix_time_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_utf8_string_with_index (); int main () { return libfdatetime_posix_time_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_utf16_string (); int main () { return libfdatetime_posix_time_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_utf16_string_with_index (); int main () { return libfdatetime_posix_time_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_utf32_string (); int main () { return libfdatetime_posix_time_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_utf32_string_with_index (); int main () { return libfdatetime_posix_time_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_initialize (); int main () { return libfdatetime_systemetime_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_free (); int main () { return libfdatetime_systemetime_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_free=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_free" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_free" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_from_byte_stream (); int main () { return libfdatetime_systemetime_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_to_utf8_string (); int main () { return libfdatetime_systemetime_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_to_utf8_string_with_index (); int main () { return libfdatetime_systemetime_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_to_utf16_string (); int main () { return libfdatetime_systemetime_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_to_utf16_string_with_index (); int main () { return libfdatetime_systemetime_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_to_utf32_string (); int main () { return libfdatetime_systemetime_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_to_utf32_string_with_index (); int main () { return libfdatetime_systemetime_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi ac_cv_libfdatetime_LIBADD="-lfdatetime" fi fi fi if test "x$ac_cv_libfdatetime" = xyes; then : $as_echo "#define HAVE_LIBFDATETIME 1" >>confdefs.h fi if test "x$ac_cv_libfdatetime" = xyes; then : HAVE_LIBFDATETIME=1 else HAVE_LIBFDATETIME=0 fi if test "x$ac_cv_libfdatetime" != xyes; then : ac_cv_libfdatetime_CPPFLAGS="-I../libfdatetime"; ac_cv_libfdatetime_LIBADD="../libfdatetime/libfdatetime.la"; ac_cv_libfdatetime=local $as_echo "#define HAVE_LOCAL_LIBFDATETIME 1" >>confdefs.h HAVE_LOCAL_LIBFDATETIME=1 fi if test "x$ac_cv_libfdatetime" = xlocal; then HAVE_LOCAL_LIBFDATETIME_TRUE= HAVE_LOCAL_LIBFDATETIME_FALSE='#' else HAVE_LOCAL_LIBFDATETIME_TRUE='#' HAVE_LOCAL_LIBFDATETIME_FALSE= fi if test "x$ac_cv_libfdatetime_CPPFLAGS" != "x"; then : LIBFDATETIME_CPPFLAGS=$ac_cv_libfdatetime_CPPFLAGS fi if test "x$ac_cv_libfdatetime_LIBADD" != "x"; then : LIBFDATETIME_LIBADD=$ac_cv_libfdatetime_LIBADD fi if test "x$ac_cv_libfdatetime" = xyes; then : ax_libfdatetime_pc_libs_private=-lfdatetime fi if test "x$ac_cv_libfdatetime" = xyes; then : ax_libfdatetime_spec_requires=libfdatetime ax_libfdatetime_spec_build_requires=libfdatetime-devel fi # Check whether --with-libfguid was given. if test "${with_libfguid+set}" = set; then : withval=$with_libfguid; ac_cv_with_libfguid=$withval else ac_cv_with_libfguid=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfguid+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfguid=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfguid" >&5 $as_echo "$ac_cv_with_libfguid" >&6; } if test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xno && test "x$ac_cv_with_libfguid" != xauto-detect; then : if test -d "$ac_cv_with_libfguid"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfguid}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfguid}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfguid" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfguid" >&2;} fi fi if test "x$ac_cv_with_libfguid" = xno; then : ac_cv_libfguid=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid" >&5 $as_echo_n "checking for libfguid... " >&6; } if test -n "$libfguid_CFLAGS"; then pkg_cv_libfguid_CFLAGS="$libfguid_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfguid >= 20120426\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfguid >= 20120426") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfguid_CFLAGS=`$PKG_CONFIG --cflags "libfguid >= 20120426" 2>/dev/null` 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfguid >= 20120426\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfguid >= 20120426") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfguid_LIBS=`$PKG_CONFIG --libs "libfguid >= 20120426" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfguid_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --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=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfguid=no else libfguid_CFLAGS=$pkg_cv_libfguid_CFLAGS libfguid_LIBS=$pkg_cv_libfguid_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfguid=yes fi fi if test "x$ac_cv_libfguid" = xyes; then : ac_cv_libfguid_CPPFLAGS="$pkg_cv_libfguid_CFLAGS" ac_cv_libfguid_LIBADD="$pkg_cv_libfguid_LIBS" else for ac_header in libfguid.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfguid.h" "ac_cv_header_libfguid_h" "$ac_includes_default" if test "x$ac_cv_header_libfguid_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFGUID_H 1 _ACEOF fi done if test "x$ac_cv_header_libfguid_h" = xno; then : ac_cv_libfguid=no else ac_cv_libfguid=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_get_version in -lfguid" >&5 $as_echo_n "checking for libfguid_get_version in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_get_version (); int main () { return libfguid_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_get_version=yes else ac_cv_lib_fguid_libfguid_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_get_version" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_get_version" >&6; } if test "x$ac_cv_lib_fguid_libfguid_get_version" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_initialize in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_initialize in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_initialize (); int main () { return libfguid_identifier_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_initialize=yes else ac_cv_lib_fguid_libfguid_identifier_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_initialize" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_initialize" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_initialize" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_free in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_free in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_free (); int main () { return libfguid_identifier_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_free=yes else ac_cv_lib_fguid_libfguid_identifier_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_free" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_free" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_free" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_from_byte_stream in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_from_byte_stream in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_from_byte_stream (); int main () { return libfguid_identifier_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream=yes else ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_get_string_size in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_get_string_size in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_get_string_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_get_string_size (); int main () { return libfguid_identifier_get_string_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_get_string_size=yes else ac_cv_lib_fguid_libfguid_identifier_get_string_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_get_string_size" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_get_string_size" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_get_string_size" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf8_string in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_to_utf8_string in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_to_utf8_string (); int main () { return libfguid_identifier_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string=yes else ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf8_string_with_index in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_to_utf8_string_with_index in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_to_utf8_string_with_index (); int main () { return libfguid_identifier_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index=yes else ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf16_string in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_to_utf16_string in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_to_utf16_string (); int main () { return libfguid_identifier_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string=yes else ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf16_string_with_index in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_to_utf16_string_with_index in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_to_utf16_string_with_index (); int main () { return libfguid_identifier_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index=yes else ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf32_string in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_to_utf32_string in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_to_utf32_string (); int main () { return libfguid_identifier_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string=yes else ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf32_string_with_index in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_to_utf32_string_with_index in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_to_utf32_string_with_index (); int main () { return libfguid_identifier_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index=yes else ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi ac_cv_libfguid_LIBADD="-lfguid" fi fi fi if test "x$ac_cv_libfguid" = xyes; then : $as_echo "#define HAVE_LIBFGUID 1" >>confdefs.h fi if test "x$ac_cv_libfguid" = xyes; then : HAVE_LIBFGUID=1 else HAVE_LIBFGUID=0 fi if test "x$ac_cv_libfguid" != xyes; then : ac_cv_libfguid_CPPFLAGS="-I../libfguid"; ac_cv_libfguid_LIBADD="../libfguid/libfguid.la"; ac_cv_libfguid=local $as_echo "#define HAVE_LOCAL_LIBFGUID 1" >>confdefs.h HAVE_LOCAL_LIBFGUID=1 fi if test "x$ac_cv_libfguid" = xlocal; then HAVE_LOCAL_LIBFGUID_TRUE= HAVE_LOCAL_LIBFGUID_FALSE='#' else HAVE_LOCAL_LIBFGUID_TRUE='#' HAVE_LOCAL_LIBFGUID_FALSE= fi if test "x$ac_cv_libfguid_CPPFLAGS" != "x"; then : LIBFGUID_CPPFLAGS=$ac_cv_libfguid_CPPFLAGS fi if test "x$ac_cv_libfguid_LIBADD" != "x"; then : LIBFGUID_LIBADD=$ac_cv_libfguid_LIBADD fi if test "x$ac_cv_libfguid" = xyes; then : ax_libfguid_pc_libs_private=-lfguid fi if test "x$ac_cv_libfguid" = xyes; then : ax_libfguid_spec_requires=libfguid ax_libfguid_spec_build_requires=libfguid-devel fi # Check whether --with-libfvalue was given. if test "${with_libfvalue+set}" = set; then : withval=$with_libfvalue; ac_cv_with_libfvalue=$withval else ac_cv_with_libfvalue=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfvalue in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfvalue in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfvalue+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfvalue=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfvalue" >&5 $as_echo "$ac_cv_with_libfvalue" >&6; } if test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xno && test "x$ac_cv_with_libfvalue" != xauto-detect; then : if test -d "$ac_cv_with_libfvalue"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfvalue}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfvalue}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfvalue" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfvalue" >&2;} fi fi if test "x$ac_cv_with_libfvalue" = xno; then : ac_cv_libfvalue=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue" >&5 $as_echo_n "checking for libfvalue... " >&6; } if test -n "$libfvalue_CFLAGS"; then pkg_cv_libfvalue_CFLAGS="$libfvalue_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfvalue >= 20160131\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfvalue >= 20160131") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfvalue_CFLAGS=`$PKG_CONFIG --cflags "libfvalue >= 20160131" 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfvalue >= 20160131\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfvalue >= 20160131") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfvalue_LIBS=`$PKG_CONFIG --libs "libfvalue >= 20160131" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfvalue_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfvalue >= 20160131" 2>&1` else libfvalue_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfvalue >= 20160131" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfvalue_PKG_ERRORS" >&5 ac_cv_libfvalue=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfvalue=no else libfvalue_CFLAGS=$pkg_cv_libfvalue_CFLAGS libfvalue_LIBS=$pkg_cv_libfvalue_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfvalue=yes fi fi if test "x$ac_cv_libfvalue" = xyes; then : ac_cv_libfvalue_CPPFLAGS="$pkg_cv_libfvalue_CFLAGS" ac_cv_libfvalue_LIBADD="$pkg_cv_libfvalue_LIBS" else for ac_header in libfvalue.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfvalue.h" "ac_cv_header_libfvalue_h" "$ac_includes_default" if test "x$ac_cv_header_libfvalue_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFVALUE_H 1 _ACEOF fi done if test "x$ac_cv_header_libfvalue_h" = xno; then : ac_cv_libfvalue=no else ac_cv_libfvalue=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_get_version in -lfvalue" >&5 $as_echo_n "checking for libfvalue_get_version in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_get_version (); int main () { return libfvalue_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_get_version=yes else ac_cv_lib_fvalue_libfvalue_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_get_version" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_get_version" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_get_version" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_initialize in -lfvalue" >&5 $as_echo_n "checking for libfvalue_data_handle_initialize in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_data_handle_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_data_handle_initialize (); int main () { 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 ac_cv_lib_fvalue_libfvalue_data_handle_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_initialize" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_free in -lfvalue" >&5 $as_echo_n "checking for libfvalue_data_handle_free in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_data_handle_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_data_handle_free (); int main () { 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 ac_cv_lib_fvalue_libfvalue_data_handle_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_free" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_clone in -lfvalue" >&5 $as_echo_n "checking for libfvalue_data_handle_clone in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_data_handle_clone+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_data_handle_clone (); int main () { 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 ac_cv_lib_fvalue_libfvalue_data_handle_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_clone" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_clear in -lfvalue" >&5 $as_echo_n "checking for libfvalue_data_handle_clear in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_data_handle_clear+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_data_handle_clear (); int main () { 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 ac_cv_lib_fvalue_libfvalue_data_handle_clear=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_clear" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_get_data in -lfvalue" >&5 $as_echo_n "checking for libfvalue_data_handle_get_data in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_data_handle_get_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_data_handle_get_data (); int main () { 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 ac_cv_lib_fvalue_libfvalue_data_handle_get_data=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_get_data" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_set_data in -lfvalue" >&5 $as_echo_n "checking for libfvalue_data_handle_set_data in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_data_handle_set_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_data_handle_set_data (); int main () { 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 ac_cv_lib_fvalue_libfvalue_data_handle_set_data=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_set_data" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_get_data_flags in -lfvalue" >&5 $as_echo_n "checking for libfvalue_data_handle_get_data_flags in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_data_handle_get_data_flags+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_data_handle_get_data_flags (); int main () { 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 ac_cv_lib_fvalue_libfvalue_data_handle_get_data_flags=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_get_data_flags" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_set_data_flags in -lfvalue" >&5 $as_echo_n "checking for libfvalue_data_handle_set_data_flags in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_data_handle_set_data_flags+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_data_handle_set_data_flags (); int main () { 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 ac_cv_lib_fvalue_libfvalue_data_handle_set_data_flags=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_set_data_flags" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_get_number_of_value_entries in -lfvalue" >&5 $as_echo_n "checking for libfvalue_data_handle_get_number_of_value_entries in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_data_handle_get_number_of_value_entries+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_data_handle_get_number_of_value_entries (); int main () { 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 ac_cv_lib_fvalue_libfvalue_data_handle_get_number_of_value_entries=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_get_number_of_value_entries" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_get_value_entry in -lfvalue" >&5 $as_echo_n "checking for libfvalue_data_handle_get_value_entry in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_data_handle_get_value_entry+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_data_handle_get_value_entry (); int main () { 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 ac_cv_lib_fvalue_libfvalue_data_handle_get_value_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_get_value_entry" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_set_value_entry in -lfvalue" >&5 $as_echo_n "checking for libfvalue_data_handle_set_value_entry in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_data_handle_set_value_entry+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_data_handle_set_value_entry (); int main () { 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 ac_cv_lib_fvalue_libfvalue_data_handle_set_value_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_set_value_entry" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_append_value_entry in -lfvalue" >&5 $as_echo_n "checking for libfvalue_data_handle_append_value_entry in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_data_handle_append_value_entry+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_data_handle_append_value_entry (); int main () { 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 ac_cv_lib_fvalue_libfvalue_data_handle_append_value_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_append_value_entry" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_string_size_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_string_size_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_string_size_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_string_size_from_integer (); int main () { return libfvalue_string_size_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_string_size_from_integer=yes else ac_cv_lib_fvalue_libfvalue_string_size_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_string_size_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_string_size_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_string_size_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_copy_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf8_string_copy_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf8_string_copy_from_integer (); int main () { return libfvalue_utf8_string_copy_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer=yes else ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_with_index_copy_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf8_string_with_index_copy_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf8_string_with_index_copy_from_integer (); int main () { return libfvalue_utf8_string_with_index_copy_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer=yes else ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_copy_to_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf8_string_copy_to_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf8_string_copy_to_integer (); int main () { return libfvalue_utf8_string_copy_to_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer=yes else ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_with_index_copy_to_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf8_string_with_index_copy_to_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf8_string_with_index_copy_to_integer (); int main () { return libfvalue_utf8_string_with_index_copy_to_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer=yes else ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_copy_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf16_string_copy_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf16_string_copy_from_integer (); int main () { return libfvalue_utf16_string_copy_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer=yes else ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_with_index_copy_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf16_string_with_index_copy_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf16_string_with_index_copy_from_integer (); int main () { return libfvalue_utf16_string_with_index_copy_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer=yes else ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_copy_to_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf16_string_copy_to_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf16_string_copy_to_integer (); int main () { return libfvalue_utf16_string_copy_to_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer=yes else ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_with_index_copy_to_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf16_string_with_index_copy_to_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf16_string_with_index_copy_to_integer (); int main () { return libfvalue_utf16_string_with_index_copy_to_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer=yes else ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf32_string_copy_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf32_string_copy_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf32_string_copy_from_integer (); int main () { return libfvalue_utf32_string_copy_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer=yes else ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf32_string_with_index_copy_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf32_string_with_index_copy_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf32_string_with_index_copy_from_integer (); int main () { return libfvalue_utf32_string_with_index_copy_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer=yes else ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf32_string_copy_to_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf32_string_copy_to_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf32_string_copy_to_integer (); int main () { return libfvalue_utf32_string_copy_to_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer=yes else ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf32_string_with_index_copy_to_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf32_string_with_index_copy_to_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf32_string_with_index_copy_to_integer (); int main () { return libfvalue_utf32_string_with_index_copy_to_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer=yes else ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_split in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf8_string_split in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf8_string_split+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf8_string_split (); int main () { return libfvalue_utf8_string_split (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf8_string_split=yes else ac_cv_lib_fvalue_libfvalue_utf8_string_split=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_split" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf8_string_split" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf8_string_split" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_split in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf16_string_split in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf16_string_split+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf16_string_split (); int main () { return libfvalue_utf16_string_split (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf16_string_split=yes else ac_cv_lib_fvalue_libfvalue_utf16_string_split=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_split" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf16_string_split" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf16_string_split" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf8_string_free in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf8_string_free in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf8_string_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf8_string_free (); int main () { return libfvalue_split_utf8_string_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf8_string_free=yes else ac_cv_lib_fvalue_libfvalue_split_utf8_string_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf8_string_free" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf8_string_free" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf8_string_free" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf8_string_get_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf8_string_get_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf8_string_get_string (); int main () { return libfvalue_split_utf8_string_get_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string=yes else ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf8_string_get_number_of_segments in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf8_string_get_number_of_segments in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf8_string_get_number_of_segments (); int main () { return libfvalue_split_utf8_string_get_number_of_segments (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments=yes else ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf8_string_get_segment_by_index in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf8_string_get_segment_by_index in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf8_string_get_segment_by_index (); int main () { return libfvalue_split_utf8_string_get_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index=yes else ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf16_string_free in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf16_string_free in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf16_string_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf16_string_free (); int main () { return libfvalue_split_utf16_string_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf16_string_free=yes else ac_cv_lib_fvalue_libfvalue_split_utf16_string_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf16_string_free" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf16_string_free" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf16_string_free" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf16_string_get_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf16_string_get_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf16_string_get_string (); int main () { return libfvalue_split_utf16_string_get_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string=yes else ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf16_string_get_number_of_segments in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf16_string_get_number_of_segments in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf16_string_get_number_of_segments (); int main () { return libfvalue_split_utf16_string_get_number_of_segments (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments=yes else ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf16_string_get_segment_by_index in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf16_string_get_segment_by_index in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf16_string_get_segment_by_index (); int main () { return libfvalue_split_utf16_string_get_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index=yes else ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_initialize in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_initialize in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_initialize (); int main () { return libfvalue_table_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_initialize=yes else ac_cv_lib_fvalue_libfvalue_table_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_initialize" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_initialize" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_initialize" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_free in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_free in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_free (); int main () { return libfvalue_table_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_free=yes else ac_cv_lib_fvalue_libfvalue_table_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_free" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_free" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_free" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_resize in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_resize in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_resize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_resize (); int main () { return libfvalue_table_resize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_resize=yes else ac_cv_lib_fvalue_libfvalue_table_resize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_resize" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_clone in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_clone in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_clone+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_clone (); int main () { return libfvalue_table_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_clone=yes else ac_cv_lib_fvalue_libfvalue_table_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_clone" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_clone" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_clone" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_get_number_of_values in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_get_number_of_values in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_get_number_of_values+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_get_number_of_values (); int main () { return libfvalue_table_get_number_of_values (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_get_number_of_values=yes else ac_cv_lib_fvalue_libfvalue_table_get_number_of_values=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_get_number_of_values" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_get_number_of_values" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_get_number_of_values" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_get_index_by_identifier in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_get_index_by_identifier in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_get_index_by_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_get_index_by_identifier (); int main () { 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 ac_cv_lib_fvalue_libfvalue_table_get_index_by_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_get_index_by_identifier" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_get_value_by_index in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_get_value_by_index in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_get_value_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_get_value_by_index (); int main () { return libfvalue_table_get_value_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_get_value_by_index=yes else ac_cv_lib_fvalue_libfvalue_table_get_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_get_value_by_index" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_get_value_by_index" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_get_value_by_index" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_get_value_by_identifier in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_get_value_by_identifier in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_get_value_by_identifier (); int main () { return libfvalue_table_get_value_by_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier=yes else ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_set_value_by_index in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_set_value_by_index in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_set_value_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_set_value_by_index (); int main () { return libfvalue_table_set_value_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_set_value_by_index=yes else ac_cv_lib_fvalue_libfvalue_table_set_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_set_value_by_index" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_set_value_by_index" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_set_value_by_index" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_set_value in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_set_value in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_set_value+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_set_value (); int main () { return libfvalue_table_set_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_set_value=yes else ac_cv_lib_fvalue_libfvalue_table_set_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_set_value" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_set_value" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_set_value" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_copy_from_utf8_xml_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_copy_from_utf8_xml_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_copy_from_utf8_xml_string (); int main () { return libfvalue_table_copy_from_utf8_xml_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string=yes else ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_initialize in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_initialize in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_initialize (); int main () { return libfvalue_value_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_initialize=yes else ac_cv_lib_fvalue_libfvalue_value_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_initialize" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_initialize" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_initialize" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_free in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_free in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_free (); int main () { return libfvalue_value_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_free=yes else ac_cv_lib_fvalue_libfvalue_value_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_free" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_free" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_free" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_clone in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_clone in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_clone+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_clone (); int main () { return libfvalue_value_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_clone=yes else ac_cv_lib_fvalue_libfvalue_value_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_clone" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_clone" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_clone" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_clear in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_clear in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_clear+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_clear (); int main () { return libfvalue_value_clear (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_clear=yes else ac_cv_lib_fvalue_libfvalue_value_clear=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_clear" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_type in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_type in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_type+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_type (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_get_type=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_type" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_identifier in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_identifier in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_identifier (); int main () { return libfvalue_value_get_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_get_identifier=yes else ac_cv_lib_fvalue_libfvalue_value_get_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_identifier" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_get_identifier" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_identifier" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_set_identifier in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_set_identifier in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_set_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_set_identifier (); int main () { return libfvalue_value_set_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_set_identifier=yes else ac_cv_lib_fvalue_libfvalue_value_set_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_set_identifier" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_set_identifier" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_set_identifier" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_data_handle in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_data_handle in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_data_handle+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_data_handle (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_get_data_handle=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_data_handle" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_has_data in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_has_data in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_has_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_has_data (); int main () { return libfvalue_value_has_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_has_data=yes else ac_cv_lib_fvalue_libfvalue_value_has_data=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_has_data" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_has_data" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_has_data" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_data_size in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_data_size in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_data_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_data_size (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_get_data_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_data_size" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_data in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_data in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_data (); int main () { return libfvalue_value_get_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_get_data=yes else ac_cv_lib_fvalue_libfvalue_value_get_data=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_data" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_get_data" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_data" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_set_data in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_set_data in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_set_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_set_data (); int main () { return libfvalue_value_set_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_set_data=yes else ac_cv_lib_fvalue_libfvalue_value_set_data=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_set_data" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_set_data" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_set_data" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_data in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_data in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_data (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_data=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_data" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_format_flags in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_format_flags in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_format_flags+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_format_flags (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_get_format_flags=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_format_flags" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_set_format_flags in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_set_format_flags in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_set_format_flags+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_set_format_flags (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_set_format_flags=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_set_format_flags" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_number_of_value_entries in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_number_of_value_entries in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_number_of_value_entries (); int main () { return libfvalue_value_get_number_of_value_entries (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries=yes else ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_value_entry in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_value_entry in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_value_entry+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_value_entry (); int main () { return libfvalue_value_get_value_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_get_value_entry=yes else ac_cv_lib_fvalue_libfvalue_value_get_value_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_value_entry" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_get_value_entry" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_value_entry" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_set_value_entry in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_set_value_entry in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_set_value_entry+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_set_value_entry (); int main () { return libfvalue_value_set_value_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_set_value_entry=yes else ac_cv_lib_fvalue_libfvalue_value_set_value_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_set_value_entry" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_set_value_entry" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_set_value_entry" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_append_value_entry in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_append_value_entry in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_append_value_entry+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_append_value_entry (); int main () { return libfvalue_value_append_value_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_append_value_entry=yes else ac_cv_lib_fvalue_libfvalue_value_append_value_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_append_value_entry" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_append_value_entry" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_append_value_entry" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_boolean in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_boolean in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_boolean+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_boolean (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_from_boolean=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_boolean" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_boolean in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_boolean in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_boolean+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_boolean (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_to_boolean=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_boolean" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_8bit in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_8bit in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_8bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_8bit (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_from_8bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_8bit" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_8bit in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_8bit in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_8bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_8bit (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_to_8bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_8bit" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_16bit in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_16bit in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_16bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_16bit (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_from_16bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_16bit" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_16bit in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_16bit in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_16bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_16bit (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_to_16bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_16bit" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_32bit in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_32bit in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_32bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_32bit (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_from_32bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_32bit" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_32bit in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_32bit in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_32bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_32bit (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_to_32bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_32bit" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_64bit in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_64bit in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_64bit (); int main () { return libfvalue_value_copy_from_64bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit=yes else ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_64bit in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_64bit in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_64bit (); int main () { return libfvalue_value_copy_to_64bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit=yes else ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_float in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_float in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_float+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_float (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_from_float=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_float" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_float in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_float in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_float+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_float (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_to_float=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_float" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_double in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_double in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_double+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_double (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_from_double=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_double" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_double in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_double in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_double+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_double (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_to_double=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_double" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_utf8_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_utf8_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_utf8_string (); int main () { return libfvalue_value_copy_from_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string=yes else ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_utf8_string_size in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_utf8_string_size in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_utf8_string_size (); int main () { return libfvalue_value_get_utf8_string_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size=yes else ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf8_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_utf8_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_utf8_string (); int main () { return libfvalue_value_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string=yes else ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf8_string_with_index in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_utf8_string_with_index in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_utf8_string_with_index (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string_with_index" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_utf16_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_utf16_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_utf16_string (); int main () { return libfvalue_value_copy_from_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string=yes else ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_utf16_string_size in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_utf16_string_size in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_utf16_string_size (); int main () { return libfvalue_value_get_utf16_string_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size=yes else ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf16_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_utf16_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_utf16_string (); int main () { return libfvalue_value_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string=yes else ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf16_string_with_index in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_utf16_string_with_index in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_utf16_string_with_index (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string_with_index" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_utf32_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_utf32_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_utf32_string (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_from_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_utf32_string" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_utf32_string_size in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_utf32_string_size in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_utf32_string_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_utf32_string_size (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_get_utf32_string_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_utf32_string_size" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf32_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_utf32_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_utf32_string (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf32_string_with_index in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_utf32_string_with_index in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_utf32_string_with_index (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string_with_index" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_read_from_file_stream in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_read_from_file_stream in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_read_from_file_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_read_from_file_stream (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_read_from_file_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_read_from_file_stream" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_write_to_file_stream in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_write_to_file_stream in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_write_to_file_stream (); int main () { return libfvalue_value_write_to_file_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream=yes else ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_initialize in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_type_initialize in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_type_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_type_initialize (); int main () { return libfvalue_value_type_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_type_initialize=yes else ac_cv_lib_fvalue_libfvalue_value_type_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_initialize" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_type_initialize" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_type_initialize" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_initialize_with_data_handle in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_type_initialize_with_data_handle in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_type_initialize_with_data_handle+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_type_initialize_with_data_handle (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_type_initialize_with_data_handle=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_initialize_with_data_handle" >&5 $as_echo "$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 ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_set_data_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_type_set_data_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_type_set_data_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_type_set_data_string (); int main () { return libfvalue_value_type_set_data_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_type_set_data_string=yes else ac_cv_lib_fvalue_libfvalue_value_type_set_data_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_set_data_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_type_set_data_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_type_set_data_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_append_data_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_type_append_data_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_type_append_data_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_type_append_data_string (); int main () { return libfvalue_value_type_append_data_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_type_append_data_string=yes else ac_cv_lib_fvalue_libfvalue_value_type_append_data_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_append_data_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_type_append_data_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_type_append_data_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_set_data_strings_array in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_type_set_data_strings_array in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_type_set_data_strings_array+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_type_set_data_strings_array (); int main () { 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 ac_cv_lib_fvalue_libfvalue_value_type_set_data_strings_array=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_set_data_strings_array" >&5 $as_echo "$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 ac_cv_libfvalue=no fi ac_cv_libfvalue_LIBADD="-lfvalue" fi fi fi if test "x$ac_cv_libfvalue" = xyes; then : $as_echo "#define HAVE_LIBFVALUE 1" >>confdefs.h fi if test "x$ac_cv_libfvalue" = xyes; then : HAVE_LIBFVALUE=1 else HAVE_LIBFVALUE=0 fi if test "x$ac_cv_libfvalue" != xyes; then : ac_cv_libfvalue_CPPFLAGS="-I../libfvalue"; ac_cv_libfvalue_LIBADD="../libfvalue/libfvalue.la"; ac_cv_libfvalue=local $as_echo "#define HAVE_LOCAL_LIBFVALUE 1" >>confdefs.h HAVE_LOCAL_LIBFVALUE=1 fi if test "x$ac_cv_libfvalue" = xlocal; then HAVE_LOCAL_LIBFVALUE_TRUE= HAVE_LOCAL_LIBFVALUE_FALSE='#' else HAVE_LOCAL_LIBFVALUE_TRUE='#' HAVE_LOCAL_LIBFVALUE_FALSE= fi if test "x$ac_cv_libfvalue_CPPFLAGS" != "x"; then : LIBFVALUE_CPPFLAGS=$ac_cv_libfvalue_CPPFLAGS fi if test "x$ac_cv_libfvalue_LIBADD" != "x"; then : LIBFVALUE_LIBADD=$ac_cv_libfvalue_LIBADD fi if test "x$ac_cv_libfvalue" = xyes; then : ax_libfvalue_pc_libs_private=-lfvalue fi if test "x$ac_cv_libfvalue" = xyes; then : ax_libfvalue_spec_requires=libfvalue ax_libfvalue_spec_build_requires=libfvalue-devel fi # Check whether --with-libfwnt was given. if test "${with_libfwnt+set}" = set; then : withval=$with_libfwnt; ac_cv_with_libfwnt=$withval else ac_cv_with_libfwnt=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfwnt in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfwnt in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfwnt+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfwnt=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfwnt" >&5 $as_echo "$ac_cv_with_libfwnt" >&6; } if test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xno && test "x$ac_cv_with_libfwnt" != xauto-detect; then : if test -d "$ac_cv_with_libfwnt"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfwnt}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfwnt}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfwnt" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfwnt" >&2;} fi fi if test "x$ac_cv_with_libfwnt" = xno; then : ac_cv_libfwnt=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt" >&5 $as_echo_n "checking for libfwnt... " >&6; } if test -n "$libfwnt_CFLAGS"; then pkg_cv_libfwnt_CFLAGS="$libfwnt_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfwnt >= 20161103\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfwnt >= 20161103") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfwnt_CFLAGS=`$PKG_CONFIG --cflags "libfwnt >= 20161103" 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfwnt >= 20161103\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfwnt >= 20161103") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfwnt_LIBS=`$PKG_CONFIG --libs "libfwnt >= 20161103" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfwnt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfwnt >= 20161103" 2>&1` else libfwnt_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfwnt >= 20161103" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfwnt_PKG_ERRORS" >&5 ac_cv_libfwnt=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfwnt=no else libfwnt_CFLAGS=$pkg_cv_libfwnt_CFLAGS libfwnt_LIBS=$pkg_cv_libfwnt_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfwnt=yes fi fi if test "x$ac_cv_libfwnt" = xyes; then : ac_cv_libfwnt_CPPFLAGS="$pkg_cv_libfwnt_CFLAGS" ac_cv_libfwnt_LIBADD="$pkg_cv_libfwnt_LIBS" else for ac_header in libfwnt.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfwnt.h" "ac_cv_header_libfwnt_h" "$ac_includes_default" if test "x$ac_cv_header_libfwnt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFWNT_H 1 _ACEOF fi done if test "x$ac_cv_header_libfwnt_h" = xno; then : ac_cv_libfwnt=no else ac_cv_libfwnt=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_get_version in -lfwnt" >&5 $as_echo_n "checking for libfwnt_get_version in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_get_version (); int main () { return libfwnt_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwnt_libfwnt_get_version=yes else ac_cv_lib_fwnt_libfwnt_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_get_version" >&5 $as_echo "$ac_cv_lib_fwnt_libfwnt_get_version" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_get_version" = xyes; then : ac_cv_libfwnt_dummy=yes else ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_initialize in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_descriptor_initialize in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_descriptor_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_descriptor_initialize (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_descriptor_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_initialize" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_free in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_descriptor_free in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_descriptor_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_descriptor_free (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_descriptor_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_free" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_copy_from_byte_stream in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_descriptor_copy_from_byte_stream in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_descriptor_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_descriptor_copy_from_byte_stream (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_descriptor_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_copy_from_byte_stream" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_get_owner in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_descriptor_get_owner in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_descriptor_get_owner+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_descriptor_get_owner (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_descriptor_get_owner=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_get_owner" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_get_group in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_descriptor_get_group in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_descriptor_get_group+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_descriptor_get_group (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_descriptor_get_group=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_get_group" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_get_discretionary_acl in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_descriptor_get_discretionary_acl in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_descriptor_get_discretionary_acl+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_descriptor_get_discretionary_acl (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_descriptor_get_discretionary_acl=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_get_discretionary_acl" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_get_system_acl in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_descriptor_get_system_acl in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_descriptor_get_system_acl+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_descriptor_get_system_acl (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_descriptor_get_system_acl=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_get_system_acl" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_initialize in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_identifier_initialize in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_identifier_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_identifier_initialize (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_identifier_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_initialize" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_free in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_identifier_free in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_identifier_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_identifier_free (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_identifier_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_free" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_from_byte_stream in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_identifier_copy_from_byte_stream in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_identifier_copy_from_byte_stream (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_identifier_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_from_byte_stream" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_get_string_size in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_identifier_get_string_size in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_identifier_get_string_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_identifier_get_string_size (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_identifier_get_string_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_get_string_size" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_to_utf8_string in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_identifier_copy_to_utf8_string in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_identifier_copy_to_utf8_string (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_to_utf8_string_with_index in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_identifier_copy_to_utf8_string_with_index in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_identifier_copy_to_utf8_string_with_index (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string_with_index" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_to_utf16_string in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_identifier_copy_to_utf16_string in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_identifier_copy_to_utf16_string (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_to_utf16_string_with_index in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_identifier_copy_to_utf16_string_with_index in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_identifier_copy_to_utf16_string_with_index (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string_with_index" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_to_utf32_string in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_identifier_copy_to_utf32_string in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_identifier_copy_to_utf32_string (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_to_utf32_string_with_index in -lfwnt" >&5 $as_echo_n "checking for libfwnt_security_identifier_copy_to_utf32_string_with_index in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_security_identifier_copy_to_utf32_string_with_index (); int main () { 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 ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string_with_index" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_list_free in -lfwnt" >&5 $as_echo_n "checking for libfwnt_access_control_list_free in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_access_control_list_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_access_control_list_free (); int main () { 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 ac_cv_lib_fwnt_libfwnt_access_control_list_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_list_free" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_list_get_number_of_entries in -lfwnt" >&5 $as_echo_n "checking for libfwnt_access_control_list_get_number_of_entries in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_access_control_list_get_number_of_entries+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_access_control_list_get_number_of_entries (); int main () { 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 ac_cv_lib_fwnt_libfwnt_access_control_list_get_number_of_entries=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_list_get_number_of_entries" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_list_get_entry_by_index in -lfwnt" >&5 $as_echo_n "checking for libfwnt_access_control_list_get_entry_by_index in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_access_control_list_get_entry_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_access_control_list_get_entry_by_index (); int main () { 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 ac_cv_lib_fwnt_libfwnt_access_control_list_get_entry_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_list_get_entry_by_index" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_entry_free in -lfwnt" >&5 $as_echo_n "checking for libfwnt_access_control_entry_free in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_access_control_entry_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_access_control_entry_free (); int main () { 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 ac_cv_lib_fwnt_libfwnt_access_control_entry_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_entry_free" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_entry_get_type in -lfwnt" >&5 $as_echo_n "checking for libfwnt_access_control_entry_get_type in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_access_control_entry_get_type+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_access_control_entry_get_type (); int main () { 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 ac_cv_lib_fwnt_libfwnt_access_control_entry_get_type=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_entry_get_type" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_entry_get_flags in -lfwnt" >&5 $as_echo_n "checking for libfwnt_access_control_entry_get_flags in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_access_control_entry_get_flags+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_access_control_entry_get_flags (); int main () { 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 ac_cv_lib_fwnt_libfwnt_access_control_entry_get_flags=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_entry_get_flags" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_entry_get_access_mask in -lfwnt" >&5 $as_echo_n "checking for libfwnt_access_control_entry_get_access_mask in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_access_control_entry_get_access_mask+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_access_control_entry_get_access_mask (); int main () { 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 ac_cv_lib_fwnt_libfwnt_access_control_entry_get_access_mask=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_entry_get_access_mask" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_entry_get_security_identifier in -lfwnt" >&5 $as_echo_n "checking for libfwnt_access_control_entry_get_security_identifier in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_access_control_entry_get_security_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_access_control_entry_get_security_identifier (); int main () { 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 ac_cv_lib_fwnt_libfwnt_access_control_entry_get_security_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_entry_get_security_identifier" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_lznt1_decompress in -lfwnt" >&5 $as_echo_n "checking for libfwnt_lznt1_decompress in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_lznt1_decompress+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_lznt1_decompress (); int main () { return libfwnt_lznt1_decompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwnt_libfwnt_lznt1_decompress=yes else ac_cv_lib_fwnt_libfwnt_lznt1_decompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_lznt1_decompress" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_lzxpress_decompress in -lfwnt" >&5 $as_echo_n "checking for libfwnt_lzxpress_decompress in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_lzxpress_decompress+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_lzxpress_decompress (); int main () { return libfwnt_lzxpress_decompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwnt_libfwnt_lzxpress_decompress=yes else ac_cv_lib_fwnt_libfwnt_lzxpress_decompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_lzxpress_decompress" >&5 $as_echo "$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 ac_cv_libfwnt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_lzxpress_huffman_decompress in -lfwnt" >&5 $as_echo_n "checking for libfwnt_lzxpress_huffman_decompress in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_decompress+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_lzxpress_huffman_decompress (); int main () { 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 ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_decompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_decompress" >&5 $as_echo "$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 ac_cv_libfwnt=no fi ac_cv_libfwnt_LIBADD="-lfwnt" fi fi fi if test "x$ac_cv_libfwnt" = xyes; then : $as_echo "#define HAVE_LIBFWNT 1" >>confdefs.h fi if test "x$ac_cv_libfwnt" = xyes; then : HAVE_LIBFWNT=1 else HAVE_LIBFWNT=0 fi if test "x$ac_cv_libfwnt" != xyes; then : ac_cv_libfwnt_CPPFLAGS="-I../libfwnt"; ac_cv_libfwnt_LIBADD="../libfwnt/libfwnt.la"; ac_cv_libfwnt=local $as_echo "#define HAVE_LOCAL_LIBFWNT 1" >>confdefs.h HAVE_LOCAL_LIBFWNT=1 fi if test "x$ac_cv_libfwnt" = xlocal; then HAVE_LOCAL_LIBFWNT_TRUE= HAVE_LOCAL_LIBFWNT_FALSE='#' else HAVE_LOCAL_LIBFWNT_TRUE='#' HAVE_LOCAL_LIBFWNT_FALSE= fi if test "x$ac_cv_libfwnt_CPPFLAGS" != "x"; then : LIBFWNT_CPPFLAGS=$ac_cv_libfwnt_CPPFLAGS fi if test "x$ac_cv_libfwnt_LIBADD" != "x"; then : LIBFWNT_LIBADD=$ac_cv_libfwnt_LIBADD fi if test "x$ac_cv_libfwnt" = xyes; then : ax_libfwnt_pc_libs_private=-lfwnt fi if test "x$ac_cv_libfwnt" = xyes; then : ax_libfwnt_spec_requires=libfwnt ax_libfwnt_spec_build_requires=libfwnt-devel fi for ac_func in bindtextdomain do : ac_fn_c_check_func "$LINENO" "bindtextdomain" "ac_cv_func_bindtextdomain" if test "x$ac_cv_func_bindtextdomain" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BINDTEXTDOMAIN 1 _ACEOF fi done # Check whether --enable-verbose-output was given. if test "${enable_verbose_output+set}" = set; then : enableval=$enable_verbose_output; ac_cv_enable_verbose_output=$enableval else ac_cv_enable_verbose_output=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable verbose output" >&5 $as_echo_n "checking whether to enable enable verbose output... " >&6; } if ${ac_cv_enable_verbose_output+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_verbose_output=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_verbose_output" >&5 $as_echo "$ac_cv_enable_verbose_output" >&6; } if test "x$ac_cv_enable_verbose_output" != xno ; then : $as_echo "#define HAVE_VERBOSE_OUTPUT 1" >>confdefs.h ac_cv_enable_verbose_output=yes fi # Check whether --enable-debug-output was given. if test "${enable_debug_output+set}" = set; then : enableval=$enable_debug_output; ac_cv_enable_debug_output=$enableval else ac_cv_enable_debug_output=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable debug output" >&5 $as_echo_n "checking whether to enable enable debug output... " >&6; } if ${ac_cv_enable_debug_output+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_debug_output=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_debug_output" >&5 $as_echo "$ac_cv_enable_debug_output" >&6; } if test "x$ac_cv_enable_debug_output" != xno ; then : $as_echo "#define HAVE_DEBUG_OUTPUT 1" >>confdefs.h ac_cv_enable_debug_output=yes fi if test "x$enable_shared" = xyes; then : case $host in #( *cygwin* | *mingw*) : $as_echo "#define HAVE_DLLMAIN 1" >>confdefs.h HAVE_DLLMAIN=1 ;; #( *) : ;; esac fi # Check whether --with-libfcache was given. if test "${with_libfcache+set}" = set; then : withval=$with_libfcache; ac_cv_with_libfcache=$withval else ac_cv_with_libfcache=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfcache in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfcache in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfcache+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfcache=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfcache" >&5 $as_echo "$ac_cv_with_libfcache" >&6; } if test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xno && test "x$ac_cv_with_libfcache" != xauto-detect; then : if test -d "$ac_cv_with_libfcache"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfcache}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfcache}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfcache" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfcache" >&2;} fi fi if test "x$ac_cv_with_libfcache" = xno; then : ac_cv_libfcache=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache" >&5 $as_echo_n "checking for libfcache... " >&6; } if test -n "$libfcache_CFLAGS"; then pkg_cv_libfcache_CFLAGS="$libfcache_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfcache >= 20140912\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfcache >= 20140912") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfcache_CFLAGS=`$PKG_CONFIG --cflags "libfcache >= 20140912" 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfcache >= 20140912\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfcache >= 20140912") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfcache_LIBS=`$PKG_CONFIG --libs "libfcache >= 20140912" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfcache_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfcache >= 20140912" 2>&1` else libfcache_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfcache >= 20140912" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfcache_PKG_ERRORS" >&5 ac_cv_libfcache=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfcache=no else libfcache_CFLAGS=$pkg_cv_libfcache_CFLAGS libfcache_LIBS=$pkg_cv_libfcache_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfcache=yes fi fi if test "x$ac_cv_libfcache" = xyes; then : ac_cv_libfcache_CPPFLAGS="$pkg_cv_libfcache_CFLAGS" ac_cv_libfcache_LIBADD="$pkg_cv_libfcache_LIBS" else for ac_header in libfcache.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfcache.h" "ac_cv_header_libfcache_h" "$ac_includes_default" if test "x$ac_cv_header_libfcache_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFCACHE_H 1 _ACEOF fi done if test "x$ac_cv_header_libfcache_h" = xno; then : ac_cv_libfcache=no else ac_cv_libfcache=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_get_version in -lfcache" >&5 $as_echo_n "checking for libfcache_get_version in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_get_version (); int main () { return libfcache_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fcache_libfcache_get_version=yes else ac_cv_lib_fcache_libfcache_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_get_version" >&5 $as_echo "$ac_cv_lib_fcache_libfcache_get_version" >&6; } if test "x$ac_cv_lib_fcache_libfcache_get_version" = xyes; then : ac_cv_libfcache_dummy=yes else ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_initialize in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_initialize in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_initialize (); int main () { return libfcache_cache_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fcache_libfcache_cache_initialize=yes else ac_cv_lib_fcache_libfcache_cache_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_initialize" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_free in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_free in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_free (); int main () { return libfcache_cache_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fcache_libfcache_cache_free=yes else ac_cv_lib_fcache_libfcache_cache_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_free" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_clone in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_clone in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_clone+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_clone (); int main () { return libfcache_cache_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fcache_libfcache_cache_clone=yes else ac_cv_lib_fcache_libfcache_cache_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_clone" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_clear in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_clear in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_clear+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_clear (); int main () { return libfcache_cache_clear (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fcache_libfcache_cache_clear=yes else ac_cv_lib_fcache_libfcache_cache_clear=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_clear" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_number_of_entries in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_get_number_of_entries in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_get_number_of_entries+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_get_number_of_entries (); int main () { 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 ac_cv_lib_fcache_libfcache_cache_get_number_of_entries=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_number_of_entries" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_number_of_cache_values in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_get_number_of_cache_values in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_get_number_of_cache_values (); int main () { 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 ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_value_by_index in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_get_value_by_index in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_get_value_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_get_value_by_index (); int main () { 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 ac_cv_lib_fcache_libfcache_cache_get_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_value_by_index" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_set_value_by_index in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_set_value_by_index in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_set_value_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_set_value_by_index (); int main () { 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 ac_cv_lib_fcache_libfcache_cache_set_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_set_value_by_index" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_clear in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_value_clear in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_value_clear+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_value_clear (); int main () { 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 ac_cv_lib_fcache_libfcache_cache_value_clear=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_clear" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_get_identifier in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_value_get_identifier in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_value_get_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_value_get_identifier (); int main () { 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 ac_cv_lib_fcache_libfcache_cache_value_get_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_get_identifier" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_set_identifier in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_value_set_identifier in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_value_set_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_value_set_identifier (); int main () { 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 ac_cv_lib_fcache_libfcache_cache_value_set_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_set_identifier" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_get_value in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_value_get_value in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_value_get_value+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_value_get_value (); int main () { 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 ac_cv_lib_fcache_libfcache_cache_value_get_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_get_value" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_set_value in -lfcache" >&5 $as_echo_n "checking for libfcache_cache_value_set_value in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_cache_value_set_value+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_cache_value_set_value (); int main () { 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 ac_cv_lib_fcache_libfcache_cache_value_set_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_set_value" >&5 $as_echo "$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 ac_cv_libfcache=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_date_time_get_timestamp in -lfcache" >&5 $as_echo_n "checking for libfcache_date_time_get_timestamp in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_date_time_get_timestamp+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_date_time_get_timestamp (); int main () { 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 ac_cv_lib_fcache_libfcache_date_time_get_timestamp=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_date_time_get_timestamp" >&5 $as_echo "$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 ac_cv_libfcache=no fi ac_cv_libfcache_LIBADD="-lfcache" fi fi fi if test "x$ac_cv_libfcache" = xyes; then : $as_echo "#define HAVE_LIBFCACHE 1" >>confdefs.h fi if test "x$ac_cv_libfcache" = xyes; then : HAVE_LIBFCACHE=1 else HAVE_LIBFCACHE=0 fi if test "x$ac_cv_libfcache" != xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi for ac_func in time do : ac_fn_c_check_func "$LINENO" "time" "ac_cv_func_time" if test "x$ac_cv_func_time" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TIME 1 _ACEOF else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: time See \`config.log' for more details" "$LINENO" 5; } fi done ac_cv_libfcache_CPPFLAGS="-I../libfcache"; ac_cv_libfcache_LIBADD="../libfcache/libfcache.la"; ac_cv_libfcache=local $as_echo "#define HAVE_LOCAL_LIBFCACHE 1" >>confdefs.h HAVE_LOCAL_LIBFCACHE=1 fi if test "x$ac_cv_libfcache" = xlocal; then HAVE_LOCAL_LIBFCACHE_TRUE= HAVE_LOCAL_LIBFCACHE_FALSE='#' else HAVE_LOCAL_LIBFCACHE_TRUE='#' HAVE_LOCAL_LIBFCACHE_FALSE= fi if test "x$ac_cv_libfcache_CPPFLAGS" != "x"; then : LIBFCACHE_CPPFLAGS=$ac_cv_libfcache_CPPFLAGS fi if test "x$ac_cv_libfcache_LIBADD" != "x"; then : LIBFCACHE_LIBADD=$ac_cv_libfcache_LIBADD fi if test "x$ac_cv_libfcache" = xyes; then : ax_libfcache_pc_libs_private=-lfcache fi if test "x$ac_cv_libfcache" = xyes; then : ax_libfcache_spec_requires=libfcache ax_libfcache_spec_build_requires=libfcache-devel fi # Check whether --with-libfdata was given. if test "${with_libfdata+set}" = set; then : withval=$with_libfdata; ac_cv_with_libfdata=$withval else ac_cv_with_libfdata=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfdata in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfdata in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfdata+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfdata=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfdata" >&5 $as_echo "$ac_cv_with_libfdata" >&6; } if test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xno && test "x$ac_cv_with_libfdata" != xauto-detect; then : if test -d "$ac_cv_with_libfdata"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfdata}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfdata}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfdata" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfdata" >&2;} fi fi if test "x$ac_cv_with_libfdata" = xno; then : ac_cv_libfdata=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata" >&5 $as_echo_n "checking for libfdata... " >&6; } if test -n "$libfdata_CFLAGS"; then pkg_cv_libfdata_CFLAGS="$libfdata_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdata >= 20160325\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdata >= 20160325") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdata_CFLAGS=`$PKG_CONFIG --cflags "libfdata >= 20160325" 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdata >= 20160325\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdata >= 20160325") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdata_LIBS=`$PKG_CONFIG --libs "libfdata >= 20160325" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfdata_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfdata >= 20160325" 2>&1` else libfdata_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfdata >= 20160325" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfdata_PKG_ERRORS" >&5 ac_cv_libfdata=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfdata=no else libfdata_CFLAGS=$pkg_cv_libfdata_CFLAGS libfdata_LIBS=$pkg_cv_libfdata_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfdata=yes fi fi if test "x$ac_cv_libfdata" = xyes; then : ac_cv_libfdata_CPPFLAGS="$pkg_cv_libfdata_CFLAGS" ac_cv_libfdata_LIBADD="$pkg_cv_libfdata_LIBS" else for ac_header in libfdata.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfdata.h" "ac_cv_header_libfdata_h" "$ac_includes_default" if test "x$ac_cv_header_libfdata_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFDATA_H 1 _ACEOF fi done if test "x$ac_cv_header_libfdata_h" = xno; then : ac_cv_libfdata=no else ac_cv_libfdata=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_get_version in -lfdata" >&5 $as_echo_n "checking for libfdata_get_version in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_get_version (); int main () { return libfdata_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_get_version=yes else ac_cv_lib_fdata_libfdata_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_get_version" >&5 $as_echo "$ac_cv_lib_fdata_libfdata_get_version" >&6; } if test "x$ac_cv_lib_fdata_libfdata_get_version" = xyes; then : ac_cv_libfdata_dummy=yes else ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_initialize in -lfdata" >&5 $as_echo_n "checking for libfdata_list_initialize in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_initialize (); int main () { return libfdata_list_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_list_initialize=yes else ac_cv_lib_fdata_libfdata_list_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_initialize" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_free in -lfdata" >&5 $as_echo_n "checking for libfdata_list_free in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_free (); int main () { return libfdata_list_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_list_free=yes else ac_cv_lib_fdata_libfdata_list_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_free" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_clone in -lfdata" >&5 $as_echo_n "checking for libfdata_list_clone in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_clone+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_clone (); int main () { return libfdata_list_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_list_clone=yes else ac_cv_lib_fdata_libfdata_list_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_clone" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_empty in -lfdata" >&5 $as_echo_n "checking for libfdata_list_empty in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_empty+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_empty (); int main () { return libfdata_list_empty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_list_empty=yes else ac_cv_lib_fdata_libfdata_list_empty=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_empty" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_resize in -lfdata" >&5 $as_echo_n "checking for libfdata_list_resize in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_resize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_resize (); int main () { return libfdata_list_resize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_list_resize=yes else ac_cv_lib_fdata_libfdata_list_resize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_resize" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_reverse in -lfdata" >&5 $as_echo_n "checking for libfdata_list_reverse in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_reverse+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_reverse (); int main () { return libfdata_list_reverse (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_list_reverse=yes else ac_cv_lib_fdata_libfdata_list_reverse=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_reverse" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_number_of_elements in -lfdata" >&5 $as_echo_n "checking for libfdata_list_get_number_of_elements in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_get_number_of_elements+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_get_number_of_elements (); int main () { 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 ac_cv_lib_fdata_libfdata_list_get_number_of_elements=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_number_of_elements" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_list_element_by_index in -lfdata" >&5 $as_echo_n "checking for libfdata_list_get_list_element_by_index in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_get_list_element_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_get_list_element_by_index (); int main () { 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 ac_cv_lib_fdata_libfdata_list_get_list_element_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_list_element_by_index" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_by_index in -lfdata" >&5 $as_echo_n "checking for libfdata_list_get_element_by_index in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_get_element_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_get_element_by_index (); int main () { 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 ac_cv_lib_fdata_libfdata_list_get_element_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_by_index" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_by_index in -lfdata" >&5 $as_echo_n "checking for libfdata_list_set_element_by_index in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_set_element_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_set_element_by_index (); int main () { 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 ac_cv_lib_fdata_libfdata_list_set_element_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_by_index" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_prepend_element in -lfdata" >&5 $as_echo_n "checking for libfdata_list_prepend_element in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_prepend_element+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_prepend_element (); int main () { 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 ac_cv_lib_fdata_libfdata_list_prepend_element=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_prepend_element" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_append_element in -lfdata" >&5 $as_echo_n "checking for libfdata_list_append_element in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_append_element+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_append_element (); int main () { 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 ac_cv_lib_fdata_libfdata_list_append_element=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_append_element" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_append_list in -lfdata" >&5 $as_echo_n "checking for libfdata_list_append_list in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_append_list+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_append_list (); int main () { 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 ac_cv_lib_fdata_libfdata_list_append_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_append_list" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_is_element_set in -lfdata" >&5 $as_echo_n "checking for libfdata_list_is_element_set in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_is_element_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_is_element_set (); int main () { 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 ac_cv_lib_fdata_libfdata_list_is_element_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_is_element_set" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_mapped_offset in -lfdata" >&5 $as_echo_n "checking for libfdata_list_get_mapped_offset in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_get_mapped_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_get_mapped_offset (); int main () { 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 ac_cv_lib_fdata_libfdata_list_get_mapped_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_mapped_offset" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_mapped_offset in -lfdata" >&5 $as_echo_n "checking for libfdata_list_set_mapped_offset in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_set_mapped_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_set_mapped_offset (); int main () { 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 ac_cv_lib_fdata_libfdata_list_set_mapped_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_mapped_offset" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_mapped_size_by_index in -lfdata" >&5 $as_echo_n "checking for libfdata_list_get_mapped_size_by_index in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_get_mapped_size_by_index (); int main () { 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 ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_mapped_size_by_index in -lfdata" >&5 $as_echo_n "checking for libfdata_list_set_mapped_size_by_index in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_set_mapped_size_by_index (); int main () { 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 ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_by_index_with_mapped_size in -lfdata" >&5 $as_echo_n "checking for libfdata_list_get_element_by_index_with_mapped_size in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_get_element_by_index_with_mapped_size (); int main () { 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 ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_by_index_with_mapped_size in -lfdata" >&5 $as_echo_n "checking for libfdata_list_set_element_by_index_with_mapped_size in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_set_element_by_index_with_mapped_size (); int main () { 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 ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_append_element_with_mapped_size in -lfdata" >&5 $as_echo_n "checking for libfdata_list_append_element_with_mapped_size in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_append_element_with_mapped_size (); int main () { 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 ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_index_at_offset in -lfdata" >&5 $as_echo_n "checking for libfdata_list_get_element_index_at_offset in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_get_element_index_at_offset (); int main () { 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 ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_list_element_at_offset in -lfdata" >&5 $as_echo_n "checking for libfdata_list_get_list_element_at_offset in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_get_list_element_at_offset (); int main () { 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 ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_at_offset in -lfdata" >&5 $as_echo_n "checking for libfdata_list_get_element_at_offset in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_get_element_at_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_get_element_at_offset (); int main () { 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 ac_cv_lib_fdata_libfdata_list_get_element_at_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_at_offset" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_cache_element_value in -lfdata" >&5 $as_echo_n "checking for libfdata_list_cache_element_value in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_cache_element_value+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_cache_element_value (); int main () { 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 ac_cv_lib_fdata_libfdata_list_cache_element_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_cache_element_value" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_value_by_index in -lfdata" >&5 $as_echo_n "checking for libfdata_list_get_element_value_by_index in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_get_element_value_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_get_element_value_by_index (); int main () { 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 ac_cv_lib_fdata_libfdata_list_get_element_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_value_by_index" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_value_at_offset in -lfdata" >&5 $as_echo_n "checking for libfdata_list_get_element_value_at_offset in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_get_element_value_at_offset (); int main () { 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 ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_value_by_index in -lfdata" >&5 $as_echo_n "checking for libfdata_list_set_element_value_by_index in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_set_element_value_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_set_element_value_by_index (); int main () { 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 ac_cv_lib_fdata_libfdata_list_set_element_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_value_by_index" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_value_at_offset in -lfdata" >&5 $as_echo_n "checking for libfdata_list_set_element_value_at_offset in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_set_element_value_at_offset (); int main () { 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 ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_size in -lfdata" >&5 $as_echo_n "checking for libfdata_list_get_size in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_get_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_get_size (); int main () { 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 ac_cv_lib_fdata_libfdata_list_get_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_size" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_mapped_size in -lfdata" >&5 $as_echo_n "checking for libfdata_list_element_get_mapped_size in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_element_get_mapped_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_element_get_mapped_size (); int main () { 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 ac_cv_lib_fdata_libfdata_list_element_get_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_mapped_size in -lfdata" >&5 $as_echo_n "checking for libfdata_list_element_set_mapped_size in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_element_set_mapped_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_element_set_mapped_size (); int main () { 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 ac_cv_lib_fdata_libfdata_list_element_set_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_element_value in -lfdata" >&5 $as_echo_n "checking for libfdata_list_element_get_element_value in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_element_get_element_value+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_element_get_element_value (); int main () { 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 ac_cv_lib_fdata_libfdata_list_element_get_element_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_element_value in -lfdata" >&5 $as_echo_n "checking for libfdata_list_element_set_element_value in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_element_set_element_value+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_element_set_element_value (); int main () { 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 ac_cv_lib_fdata_libfdata_list_element_set_element_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_mapped_size in -lfdata" >&5 $as_echo_n "checking for libfdata_list_element_get_mapped_size in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_element_get_mapped_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_element_get_mapped_size (); int main () { 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 ac_cv_lib_fdata_libfdata_list_element_get_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_mapped_size in -lfdata" >&5 $as_echo_n "checking for libfdata_list_element_set_mapped_size in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_element_set_mapped_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_element_set_mapped_size (); int main () { 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 ac_cv_lib_fdata_libfdata_list_element_set_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_element_value in -lfdata" >&5 $as_echo_n "checking for libfdata_list_element_get_element_value in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_element_get_element_value+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_element_get_element_value (); int main () { 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 ac_cv_lib_fdata_libfdata_list_element_get_element_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_element_value in -lfdata" >&5 $as_echo_n "checking for libfdata_list_element_set_element_value in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_list_element_set_element_value+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_list_element_set_element_value (); int main () { 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 ac_cv_lib_fdata_libfdata_list_element_set_element_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_initialize in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_initialize in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_initialize (); int main () { return libfdata_stream_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_stream_initialize=yes else ac_cv_lib_fdata_libfdata_stream_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_initialize" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_free in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_free in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_free (); int main () { return libfdata_stream_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_stream_free=yes else ac_cv_lib_fdata_libfdata_stream_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_free" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_clone in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_clone in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_clone+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_clone (); int main () { return libfdata_stream_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_stream_clone=yes else ac_cv_lib_fdata_libfdata_stream_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_clone" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_empty in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_empty in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_empty+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_empty (); int main () { return libfdata_stream_empty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_stream_empty=yes else ac_cv_lib_fdata_libfdata_stream_empty=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_empty" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_resize in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_resize in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_resize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_resize (); int main () { return libfdata_stream_resize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_stream_resize=yes else ac_cv_lib_fdata_libfdata_stream_resize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_resize" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_reverse in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_reverse in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_reverse+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_reverse (); int main () { return libfdata_stream_reverse (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_stream_reverse=yes else ac_cv_lib_fdata_libfdata_stream_reverse=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_reverse" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_number_of_segments in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_get_number_of_segments in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_get_number_of_segments+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_get_number_of_segments (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_number_of_segments" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_by_index in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_get_segment_by_index in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_get_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_get_segment_by_index (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_by_index" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_set_segment_by_index in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_set_segment_by_index in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_set_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_set_segment_by_index (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_set_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_set_segment_by_index" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_prepend_segment in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_prepend_segment in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_prepend_segment+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_prepend_segment (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_prepend_segment=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_prepend_segment" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_append_segment in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_append_segment in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_append_segment+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_append_segment (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_append_segment=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_append_segment" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_set_mapped_size in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_set_mapped_size in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_set_mapped_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_set_mapped_size (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_set_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_set_mapped_size" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_mapped_range in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_get_segment_mapped_range in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_get_segment_mapped_range (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_index_at_offset in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_get_segment_index_at_offset in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_get_segment_index_at_offset (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_at_offset in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_get_segment_at_offset in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_get_segment_at_offset (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_read_buffer in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_read_buffer in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_read_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_read_buffer (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_read_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_read_buffer" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_read_buffer_at_offset in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_read_buffer_at_offset in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_read_buffer_at_offset (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_write_buffer in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_write_buffer in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_write_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_write_buffer (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_write_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_write_buffer" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_seek_offset in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_seek_offset in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_seek_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_seek_offset (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_seek_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_seek_offset" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_offset in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_get_offset in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_get_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_get_offset (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_get_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_offset" >&5 $as_echo "$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 ac_cv_libfdata=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_size in -lfdata" >&5 $as_echo_n "checking for libfdata_stream_get_size in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_stream_get_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_stream_get_size (); int main () { 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 ac_cv_lib_fdata_libfdata_stream_get_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_size" >&5 $as_echo "$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 ac_cv_libfdata=no fi ac_cv_libfdata_LIBADD="-lfdata" fi fi fi if test "x$ac_cv_libfdata" = xyes; then : $as_echo "#define HAVE_LIBFDATA 1" >>confdefs.h fi if test "x$ac_cv_libfdata" = xyes; then : HAVE_LIBFDATA=1 else HAVE_LIBFDATA=0 fi if test "x$ac_cv_libfdata" != xyes; then : ac_cv_libfdata_CPPFLAGS="-I../libfdata"; ac_cv_libfdata_LIBADD="../libfdata/libfdata.la"; ac_cv_libfdata=local $as_echo "#define HAVE_LOCAL_LIBFDATA 1" >>confdefs.h HAVE_LOCAL_LIBFDATA=1 fi if test "x$ac_cv_libfdata" = xlocal; then HAVE_LOCAL_LIBFDATA_TRUE= HAVE_LOCAL_LIBFDATA_FALSE='#' else HAVE_LOCAL_LIBFDATA_TRUE='#' HAVE_LOCAL_LIBFDATA_FALSE= fi if test "x$ac_cv_libfdata_CPPFLAGS" != "x"; then : LIBFDATA_CPPFLAGS=$ac_cv_libfdata_CPPFLAGS fi if test "x$ac_cv_libfdata_LIBADD" != "x"; then : LIBFDATA_LIBADD=$ac_cv_libfdata_LIBADD fi if test "x$ac_cv_libfdata" = xyes; then : ax_libfdata_pc_libs_private=-lfdata fi if test "x$ac_cv_libfdata" = xyes; then : ax_libfdata_spec_requires=libfdata ax_libfdata_spec_build_requires=libfdata-devel fi # Check whether --with-libfwevt was given. if test "${with_libfwevt+set}" = set; then : withval=$with_libfwevt; ac_cv_with_libfwevt=$withval else ac_cv_with_libfwevt=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfwevt in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfwevt in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfwevt+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfwevt=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfwevt" >&5 $as_echo "$ac_cv_with_libfwevt" >&6; } if test "x$ac_cv_with_libfwevt" != x && test "x$ac_cv_with_libfwevt" != xno && test "x$ac_cv_with_libfwevt" != xauto-detect; then : if test -d "$ac_cv_with_libfwevt"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfwevt}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfwevt}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfwevt" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfwevt" >&2;} fi fi if test "x$ac_cv_with_libfwevt" = xno; then : ac_cv_libfwevt=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt" >&5 $as_echo_n "checking for libfwevt... " >&6; } if test -n "$libfwevt_CFLAGS"; then pkg_cv_libfwevt_CFLAGS="$libfwevt_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfwevt >= 20160103\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfwevt >= 20160103") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfwevt_CFLAGS=`$PKG_CONFIG --cflags "libfwevt >= 20160103" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libfwevt_LIBS"; then pkg_cv_libfwevt_LIBS="$libfwevt_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfwevt >= 20160103\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfwevt >= 20160103") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfwevt_LIBS=`$PKG_CONFIG --libs "libfwevt >= 20160103" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfwevt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfwevt >= 20160103" 2>&1` else libfwevt_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfwevt >= 20160103" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfwevt_PKG_ERRORS" >&5 ac_cv_libfwevt=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfwevt=no else libfwevt_CFLAGS=$pkg_cv_libfwevt_CFLAGS libfwevt_LIBS=$pkg_cv_libfwevt_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfwevt=yes fi fi if test "x$ac_cv_libfwevt" = xyes; then : ac_cv_libfwevt_CPPFLAGS="$pkg_cv_libfwevt_CFLAGS" ac_cv_libfwevt_LIBADD="$pkg_cv_libfwevt_LIBS" else for ac_header in libfwevt.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfwevt.h" "ac_cv_header_libfwevt_h" "$ac_includes_default" if test "x$ac_cv_header_libfwevt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFWEVT_H 1 _ACEOF fi done if test "x$ac_cv_header_libfwevt_h" = xno; then : ac_cv_libfwevt=no else ac_cv_libfwevt=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_get_version in -lfwevt" >&5 $as_echo_n "checking for libfwevt_get_version in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_get_version (); int main () { return libfwevt_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_get_version=yes else ac_cv_lib_fwevt_libfwevt_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_get_version" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_get_version" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_get_version" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_channel_initialize in -lfwevt" >&5 $as_echo_n "checking for libfwevt_channel_initialize in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_channel_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_channel_initialize (); int main () { return libfwevt_channel_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_channel_initialize=yes else ac_cv_lib_fwevt_libfwevt_channel_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_channel_initialize" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_channel_initialize" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_channel_initialize" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_channel_free in -lfwevt" >&5 $as_echo_n "checking for libfwevt_channel_free in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_channel_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_channel_free (); int main () { return libfwevt_channel_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_channel_free=yes else ac_cv_lib_fwevt_libfwevt_channel_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_channel_free" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_channel_free" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_channel_free" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_channel_read in -lfwevt" >&5 $as_echo_n "checking for libfwevt_channel_read in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_channel_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_channel_read (); int main () { return libfwevt_channel_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_channel_read=yes else ac_cv_lib_fwevt_libfwevt_channel_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_channel_read" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_channel_read" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_channel_read" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_event_initialize in -lfwevt" >&5 $as_echo_n "checking for libfwevt_event_initialize in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_event_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_event_initialize (); int main () { return libfwevt_event_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_event_initialize=yes else ac_cv_lib_fwevt_libfwevt_event_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_event_initialize" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_event_initialize" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_event_initialize" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_event_free in -lfwevt" >&5 $as_echo_n "checking for libfwevt_event_free in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_event_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_event_free (); int main () { return libfwevt_event_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_event_free=yes else ac_cv_lib_fwevt_libfwevt_event_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_event_free" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_event_free" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_event_free" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_event_read in -lfwevt" >&5 $as_echo_n "checking for libfwevt_event_read in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_event_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_event_read (); int main () { return libfwevt_event_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_event_read=yes else ac_cv_lib_fwevt_libfwevt_event_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_event_read" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_event_read" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_event_read" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_event_get_identifier in -lfwevt" >&5 $as_echo_n "checking for libfwevt_event_get_identifier in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_event_get_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_event_get_identifier (); int main () { return libfwevt_event_get_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_event_get_identifier=yes else ac_cv_lib_fwevt_libfwevt_event_get_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_event_get_identifier" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_event_get_identifier" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_event_get_identifier" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_event_get_message_identifier in -lfwevt" >&5 $as_echo_n "checking for libfwevt_event_get_message_identifier in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_event_get_message_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_event_get_message_identifier (); int main () { return libfwevt_event_get_message_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_event_get_message_identifier=yes else ac_cv_lib_fwevt_libfwevt_event_get_message_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_event_get_message_identifier" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_event_get_message_identifier" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_event_get_message_identifier" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_event_get_template_offset in -lfwevt" >&5 $as_echo_n "checking for libfwevt_event_get_template_offset in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_event_get_template_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_event_get_template_offset (); int main () { return libfwevt_event_get_template_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_event_get_template_offset=yes else ac_cv_lib_fwevt_libfwevt_event_get_template_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_event_get_template_offset" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_event_get_template_offset" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_event_get_template_offset" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_keyword_initialize in -lfwevt" >&5 $as_echo_n "checking for libfwevt_keyword_initialize in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_keyword_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_keyword_initialize (); int main () { return libfwevt_keyword_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_keyword_initialize=yes else ac_cv_lib_fwevt_libfwevt_keyword_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_keyword_initialize" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_keyword_initialize" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_keyword_initialize" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_keyword_free in -lfwevt" >&5 $as_echo_n "checking for libfwevt_keyword_free in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_keyword_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_keyword_free (); int main () { return libfwevt_keyword_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_keyword_free=yes else ac_cv_lib_fwevt_libfwevt_keyword_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_keyword_free" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_keyword_free" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_keyword_free" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_keyword_read in -lfwevt" >&5 $as_echo_n "checking for libfwevt_keyword_read in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_keyword_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_keyword_read (); int main () { return libfwevt_keyword_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_keyword_read=yes else ac_cv_lib_fwevt_libfwevt_keyword_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_keyword_read" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_keyword_read" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_keyword_read" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_level_initialize in -lfwevt" >&5 $as_echo_n "checking for libfwevt_level_initialize in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_level_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_level_initialize (); int main () { return libfwevt_level_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_level_initialize=yes else ac_cv_lib_fwevt_libfwevt_level_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_level_initialize" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_level_initialize" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_level_initialize" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_level_free in -lfwevt" >&5 $as_echo_n "checking for libfwevt_level_free in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_level_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_level_free (); int main () { return libfwevt_level_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_level_free=yes else ac_cv_lib_fwevt_libfwevt_level_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_level_free" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_level_free" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_level_free" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_level_read in -lfwevt" >&5 $as_echo_n "checking for libfwevt_level_read in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_level_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_level_read (); int main () { return libfwevt_level_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_level_read=yes else ac_cv_lib_fwevt_libfwevt_level_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_level_read" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_level_read" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_level_read" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_manifest_initialize in -lfwevt" >&5 $as_echo_n "checking for libfwevt_manifest_initialize in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_manifest_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_manifest_initialize (); int main () { return libfwevt_manifest_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_manifest_initialize=yes else ac_cv_lib_fwevt_libfwevt_manifest_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_manifest_initialize" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_manifest_initialize" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_manifest_initialize" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_manifest_free in -lfwevt" >&5 $as_echo_n "checking for libfwevt_manifest_free in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_manifest_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_manifest_free (); int main () { return libfwevt_manifest_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_manifest_free=yes else ac_cv_lib_fwevt_libfwevt_manifest_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_manifest_free" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_manifest_free" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_manifest_free" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_manifest_read in -lfwevt" >&5 $as_echo_n "checking for libfwevt_manifest_read in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_manifest_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_manifest_read (); int main () { return libfwevt_manifest_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_manifest_read=yes else ac_cv_lib_fwevt_libfwevt_manifest_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_manifest_read" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_manifest_read" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_manifest_read" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_manifest_get_number_of_providers in -lfwevt" >&5 $as_echo_n "checking for libfwevt_manifest_get_number_of_providers in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_manifest_get_number_of_providers+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_manifest_get_number_of_providers (); int main () { return libfwevt_manifest_get_number_of_providers (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_manifest_get_number_of_providers=yes else ac_cv_lib_fwevt_libfwevt_manifest_get_number_of_providers=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_manifest_get_number_of_providers" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_manifest_get_number_of_providers" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_manifest_get_number_of_providers" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_manifest_get_provider in -lfwevt" >&5 $as_echo_n "checking for libfwevt_manifest_get_provider in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_manifest_get_provider+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_manifest_get_provider (); int main () { return libfwevt_manifest_get_provider (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_manifest_get_provider=yes else ac_cv_lib_fwevt_libfwevt_manifest_get_provider=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_manifest_get_provider" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_manifest_get_provider" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_manifest_get_provider" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_manifest_get_provider_by_identifier in -lfwevt" >&5 $as_echo_n "checking for libfwevt_manifest_get_provider_by_identifier in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_manifest_get_provider_by_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_manifest_get_provider_by_identifier (); int main () { return libfwevt_manifest_get_provider_by_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_manifest_get_provider_by_identifier=yes else ac_cv_lib_fwevt_libfwevt_manifest_get_provider_by_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_manifest_get_provider_by_identifier" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_manifest_get_provider_by_identifier" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_manifest_get_provider_by_identifier" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_map_initialize in -lfwevt" >&5 $as_echo_n "checking for libfwevt_map_initialize in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_map_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_map_initialize (); int main () { return libfwevt_map_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_map_initialize=yes else ac_cv_lib_fwevt_libfwevt_map_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_map_initialize" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_map_initialize" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_map_initialize" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_map_free in -lfwevt" >&5 $as_echo_n "checking for libfwevt_map_free in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_map_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_map_free (); int main () { return libfwevt_map_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_map_free=yes else ac_cv_lib_fwevt_libfwevt_map_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_map_free" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_map_free" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_map_free" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_map_read in -lfwevt" >&5 $as_echo_n "checking for libfwevt_map_read in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_map_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_map_read (); int main () { return libfwevt_map_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_map_read=yes else ac_cv_lib_fwevt_libfwevt_map_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_map_read" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_map_read" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_map_read" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_opcode_initialize in -lfwevt" >&5 $as_echo_n "checking for libfwevt_opcode_initialize in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_opcode_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_opcode_initialize (); int main () { return libfwevt_opcode_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_opcode_initialize=yes else ac_cv_lib_fwevt_libfwevt_opcode_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_opcode_initialize" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_opcode_initialize" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_opcode_initialize" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_opcode_free in -lfwevt" >&5 $as_echo_n "checking for libfwevt_opcode_free in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_opcode_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_opcode_free (); int main () { return libfwevt_opcode_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_opcode_free=yes else ac_cv_lib_fwevt_libfwevt_opcode_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_opcode_free" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_opcode_free" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_opcode_free" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_opcode_read in -lfwevt" >&5 $as_echo_n "checking for libfwevt_opcode_read in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_opcode_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_opcode_read (); int main () { return libfwevt_opcode_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_opcode_read=yes else ac_cv_lib_fwevt_libfwevt_opcode_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_opcode_read" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_opcode_read" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_opcode_read" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_initialize in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_initialize in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_initialize (); int main () { return libfwevt_provider_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_initialize=yes else ac_cv_lib_fwevt_libfwevt_provider_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_initialize" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_initialize" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_initialize" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_free in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_free in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_free (); int main () { return libfwevt_provider_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_free=yes else ac_cv_lib_fwevt_libfwevt_provider_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_free" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_free" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_free" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_read in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_read in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_read (); int main () { return libfwevt_provider_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_read=yes else ac_cv_lib_fwevt_libfwevt_provider_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_read" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_read" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_read" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_read_channels in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_read_channels in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_read_channels+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_read_channels (); int main () { return libfwevt_provider_read_channels (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_read_channels=yes else ac_cv_lib_fwevt_libfwevt_provider_read_channels=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_read_channels" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_read_channels" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_read_channels" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_read_events in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_read_events in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_read_events+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_read_events (); int main () { return libfwevt_provider_read_events (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_read_events=yes else ac_cv_lib_fwevt_libfwevt_provider_read_events=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_read_events" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_read_events" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_read_events" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_read_keywords in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_read_keywords in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_read_keywords+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_read_keywords (); int main () { return libfwevt_provider_read_keywords (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_read_keywords=yes else ac_cv_lib_fwevt_libfwevt_provider_read_keywords=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_read_keywords" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_read_keywords" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_read_keywords" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_read_levels in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_read_levels in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_read_levels+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_read_levels (); int main () { return libfwevt_provider_read_levels (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_read_levels=yes else ac_cv_lib_fwevt_libfwevt_provider_read_levels=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_read_levels" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_read_levels" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_read_levels" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_read_maps in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_read_maps in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_read_maps+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_read_maps (); int main () { return libfwevt_provider_read_maps (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_read_maps=yes else ac_cv_lib_fwevt_libfwevt_provider_read_maps=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_read_maps" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_read_maps" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_read_maps" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_read_opcodes in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_read_opcodes in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_read_opcodes+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_read_opcodes (); int main () { return libfwevt_provider_read_opcodes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_read_opcodes=yes else ac_cv_lib_fwevt_libfwevt_provider_read_opcodes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_read_opcodes" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_read_opcodes" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_read_opcodes" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_read_tasks in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_read_tasks in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_read_tasks+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_read_tasks (); int main () { return libfwevt_provider_read_tasks (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_read_tasks=yes else ac_cv_lib_fwevt_libfwevt_provider_read_tasks=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_read_tasks" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_read_tasks" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_read_tasks" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_read_templates in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_read_templates in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_read_templates+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_read_templates (); int main () { return libfwevt_provider_read_templates (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_read_templates=yes else ac_cv_lib_fwevt_libfwevt_provider_read_templates=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_read_templates" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_read_templates" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_read_templates" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_compare_identifier in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_compare_identifier in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_compare_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_compare_identifier (); int main () { return libfwevt_provider_compare_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_compare_identifier=yes else ac_cv_lib_fwevt_libfwevt_provider_compare_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_compare_identifier" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_compare_identifier" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_compare_identifier" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_number_of_channels in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_number_of_channels in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_number_of_channels+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_number_of_channels (); int main () { return libfwevt_provider_get_number_of_channels (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_number_of_channels=yes else ac_cv_lib_fwevt_libfwevt_provider_get_number_of_channels=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_number_of_channels" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_channels" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_channels" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_channel in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_channel in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_channel+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_channel (); int main () { return libfwevt_provider_get_channel (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_channel=yes else ac_cv_lib_fwevt_libfwevt_provider_get_channel=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_channel" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_channel" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_channel" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_number_of_events in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_number_of_events in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_number_of_events+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_number_of_events (); int main () { return libfwevt_provider_get_number_of_events (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_number_of_events=yes else ac_cv_lib_fwevt_libfwevt_provider_get_number_of_events=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_number_of_events" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_events" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_events" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_event in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_event in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_event+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_event (); int main () { return libfwevt_provider_get_event (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_event=yes else ac_cv_lib_fwevt_libfwevt_provider_get_event=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_event" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_event" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_event" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_event_by_identifier in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_event_by_identifier in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_event_by_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_event_by_identifier (); int main () { return libfwevt_provider_get_event_by_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_event_by_identifier=yes else ac_cv_lib_fwevt_libfwevt_provider_get_event_by_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_event_by_identifier" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_event_by_identifier" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_event_by_identifier" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_number_of_keywords in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_number_of_keywords in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_number_of_keywords+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_number_of_keywords (); int main () { return libfwevt_provider_get_number_of_keywords (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_number_of_keywords=yes else ac_cv_lib_fwevt_libfwevt_provider_get_number_of_keywords=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_number_of_keywords" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_keywords" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_keywords" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_keyword in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_keyword in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_keyword+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_keyword (); int main () { return libfwevt_provider_get_keyword (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_keyword=yes else ac_cv_lib_fwevt_libfwevt_provider_get_keyword=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_keyword" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_keyword" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_keyword" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_number_of_levels in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_number_of_levels in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_number_of_levels+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_number_of_levels (); int main () { return libfwevt_provider_get_number_of_levels (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_number_of_levels=yes else ac_cv_lib_fwevt_libfwevt_provider_get_number_of_levels=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_number_of_levels" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_levels" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_levels" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_level in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_level in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_level+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_level (); int main () { return libfwevt_provider_get_level (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_level=yes else ac_cv_lib_fwevt_libfwevt_provider_get_level=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_level" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_level" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_level" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_number_of_maps in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_number_of_maps in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_number_of_maps+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_number_of_maps (); int main () { return libfwevt_provider_get_number_of_maps (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_number_of_maps=yes else ac_cv_lib_fwevt_libfwevt_provider_get_number_of_maps=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_number_of_maps" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_maps" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_maps" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_map in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_map in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_map+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_map (); int main () { return libfwevt_provider_get_map (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_map=yes else ac_cv_lib_fwevt_libfwevt_provider_get_map=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_map" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_map" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_map" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_number_of_opcodes in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_number_of_opcodes in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_number_of_opcodes+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_number_of_opcodes (); int main () { return libfwevt_provider_get_number_of_opcodes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_number_of_opcodes=yes else ac_cv_lib_fwevt_libfwevt_provider_get_number_of_opcodes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_number_of_opcodes" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_opcodes" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_opcodes" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_opcode in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_opcode in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_opcode+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_opcode (); int main () { return libfwevt_provider_get_opcode (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_opcode=yes else ac_cv_lib_fwevt_libfwevt_provider_get_opcode=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_opcode" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_opcode" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_opcode" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_number_of_tasks in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_number_of_tasks in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_number_of_tasks+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_number_of_tasks (); int main () { return libfwevt_provider_get_number_of_tasks (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_number_of_tasks=yes else ac_cv_lib_fwevt_libfwevt_provider_get_number_of_tasks=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_number_of_tasks" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_tasks" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_tasks" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_task in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_task in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_task+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_task (); int main () { return libfwevt_provider_get_task (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_task=yes else ac_cv_lib_fwevt_libfwevt_provider_get_task=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_task" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_task" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_task" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_number_of_templates in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_number_of_templates in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_number_of_templates+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_number_of_templates (); int main () { return libfwevt_provider_get_number_of_templates (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_number_of_templates=yes else ac_cv_lib_fwevt_libfwevt_provider_get_number_of_templates=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_number_of_templates" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_templates" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_number_of_templates" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_template in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_template in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_template+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_template (); int main () { return libfwevt_provider_get_template (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_template=yes else ac_cv_lib_fwevt_libfwevt_provider_get_template=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_template" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_template" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_template" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_provider_get_template_by_offset in -lfwevt" >&5 $as_echo_n "checking for libfwevt_provider_get_template_by_offset in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_provider_get_template_by_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_provider_get_template_by_offset (); int main () { return libfwevt_provider_get_template_by_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_provider_get_template_by_offset=yes else ac_cv_lib_fwevt_libfwevt_provider_get_template_by_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_provider_get_template_by_offset" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_provider_get_template_by_offset" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_provider_get_template_by_offset" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_task_initialize in -lfwevt" >&5 $as_echo_n "checking for libfwevt_task_initialize in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_task_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_task_initialize (); int main () { return libfwevt_task_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_task_initialize=yes else ac_cv_lib_fwevt_libfwevt_task_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_task_initialize" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_task_initialize" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_task_initialize" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_task_free in -lfwevt" >&5 $as_echo_n "checking for libfwevt_task_free in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_task_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_task_free (); int main () { return libfwevt_task_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_task_free=yes else ac_cv_lib_fwevt_libfwevt_task_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_task_free" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_task_free" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_task_free" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_task_read in -lfwevt" >&5 $as_echo_n "checking for libfwevt_task_read in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_task_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_task_read (); int main () { return libfwevt_task_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_task_read=yes else ac_cv_lib_fwevt_libfwevt_task_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_task_read" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_task_read" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_task_read" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_template_initialize in -lfwevt" >&5 $as_echo_n "checking for libfwevt_template_initialize in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_template_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_template_initialize (); int main () { return libfwevt_template_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_template_initialize=yes else ac_cv_lib_fwevt_libfwevt_template_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_template_initialize" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_template_initialize" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_template_initialize" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_template_free in -lfwevt" >&5 $as_echo_n "checking for libfwevt_template_free in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_template_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_template_free (); int main () { return libfwevt_template_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_template_free=yes else ac_cv_lib_fwevt_libfwevt_template_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_template_free" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_template_free" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_template_free" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_template_read in -lfwevt" >&5 $as_echo_n "checking for libfwevt_template_read in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_template_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_template_read (); int main () { return libfwevt_template_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_template_read=yes else ac_cv_lib_fwevt_libfwevt_template_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_template_read" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_template_read" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_template_read" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_template_read_xml_document in -lfwevt" >&5 $as_echo_n "checking for libfwevt_template_read_xml_document in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_template_read_xml_document+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_template_read_xml_document (); int main () { return libfwevt_template_read_xml_document (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_template_read_xml_document=yes else ac_cv_lib_fwevt_libfwevt_template_read_xml_document=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_template_read_xml_document" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_template_read_xml_document" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_template_read_xml_document" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_template_set_ascii_codepage in -lfwevt" >&5 $as_echo_n "checking for libfwevt_template_set_ascii_codepage in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_template_set_ascii_codepage+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_template_set_ascii_codepage (); int main () { return libfwevt_template_set_ascii_codepage (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_template_set_ascii_codepage=yes else ac_cv_lib_fwevt_libfwevt_template_set_ascii_codepage=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_template_set_ascii_codepage" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_template_set_ascii_codepage" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_template_set_ascii_codepage" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_template_get_data in -lfwevt" >&5 $as_echo_n "checking for libfwevt_template_get_data in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_template_get_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_template_get_data (); int main () { return libfwevt_template_get_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_template_get_data=yes else ac_cv_lib_fwevt_libfwevt_template_get_data=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_template_get_data" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_template_get_data" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_template_get_data" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_template_set_data ac_cv_libfwevt_dummy=yes in -lfwevt" >&5 $as_echo_n "checking for libfwevt_template_set_data ac_cv_libfwevt_dummy=yes in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_template_set_data______ac_cv_libfwevt_dummy_yes+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_template_set_data ac_cv_libfwevt_dummy=yes (); int main () { return libfwevt_template_set_data ac_cv_libfwevt_dummy=yes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_template_set_data______ac_cv_libfwevt_dummy_yes=yes else ac_cv_lib_fwevt_libfwevt_template_set_data______ac_cv_libfwevt_dummy_yes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_template_set_data______ac_cv_libfwevt_dummy_yes" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_template_set_data______ac_cv_libfwevt_dummy_yes" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_template_set_data______ac_cv_libfwevt_dummy_yes" = xyes; then : ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_template_get_offset ac_cv_libfwevt_dummy=yes in -lfwevt" >&5 $as_echo_n "checking for libfwevt_template_get_offset ac_cv_libfwevt_dummy=yes in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_template_get_offset______ac_cv_libfwevt_dummy_yes+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_template_get_offset ac_cv_libfwevt_dummy=yes (); int main () { return libfwevt_template_get_offset ac_cv_libfwevt_dummy=yes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_template_get_offset______ac_cv_libfwevt_dummy_yes=yes else ac_cv_lib_fwevt_libfwevt_template_get_offset______ac_cv_libfwevt_dummy_yes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_template_get_offset______ac_cv_libfwevt_dummy_yes" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_template_get_offset______ac_cv_libfwevt_dummy_yes" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_template_get_offset______ac_cv_libfwevt_dummy_yes" = xyes; then : ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_template_set_offset ac_cv_libfwevt_dummy=yes in -lfwevt" >&5 $as_echo_n "checking for libfwevt_template_set_offset ac_cv_libfwevt_dummy=yes in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_template_set_offset______ac_cv_libfwevt_dummy_yes+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_template_set_offset ac_cv_libfwevt_dummy=yes (); int main () { return libfwevt_template_set_offset ac_cv_libfwevt_dummy=yes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_template_set_offset______ac_cv_libfwevt_dummy_yes=yes else ac_cv_lib_fwevt_libfwevt_template_set_offset______ac_cv_libfwevt_dummy_yes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_template_set_offset______ac_cv_libfwevt_dummy_yes" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_template_set_offset______ac_cv_libfwevt_dummy_yes" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_template_set_offset______ac_cv_libfwevt_dummy_yes" = xyes; then : ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_template_get_size ac_cv_libfwevt_dummy=yes in -lfwevt" >&5 $as_echo_n "checking for libfwevt_template_get_size ac_cv_libfwevt_dummy=yes in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_template_get_size______ac_cv_libfwevt_dummy_yes+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_template_get_size ac_cv_libfwevt_dummy=yes (); int main () { return libfwevt_template_get_size ac_cv_libfwevt_dummy=yes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_template_get_size______ac_cv_libfwevt_dummy_yes=yes else ac_cv_lib_fwevt_libfwevt_template_get_size______ac_cv_libfwevt_dummy_yes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_template_get_size______ac_cv_libfwevt_dummy_yes" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_template_get_size______ac_cv_libfwevt_dummy_yes" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_template_get_size______ac_cv_libfwevt_dummy_yes" = xyes; then : ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_document_initialize in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_document_initialize in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_document_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_document_initialize (); int main () { return libfwevt_xml_document_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_document_initialize=yes else ac_cv_lib_fwevt_libfwevt_xml_document_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_document_initialize" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_document_initialize" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_document_initialize" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_document_free in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_document_free in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_document_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_document_free (); int main () { return libfwevt_xml_document_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_document_free=yes else ac_cv_lib_fwevt_libfwevt_xml_document_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_document_free" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_document_free" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_document_free" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_document_clone in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_document_clone in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_document_clone+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_document_clone (); int main () { return libfwevt_xml_document_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_document_clone=yes else ac_cv_lib_fwevt_libfwevt_xml_document_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_document_clone" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_document_clone" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_document_clone" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_document_get_root_xml_tag in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_document_get_root_xml_tag in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_document_get_root_xml_tag+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_document_get_root_xml_tag (); int main () { return libfwevt_xml_document_get_root_xml_tag (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_document_get_root_xml_tag=yes else ac_cv_lib_fwevt_libfwevt_xml_document_get_root_xml_tag=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_document_get_root_xml_tag" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_document_get_root_xml_tag" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_document_get_root_xml_tag" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_document_read in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_document_read in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_document_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_document_read (); int main () { return libfwevt_xml_document_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_document_read=yes else ac_cv_lib_fwevt_libfwevt_xml_document_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_document_read" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_document_read" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_document_read" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_document_get_utf8_xml_string_size in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_document_get_utf8_xml_string_size in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_document_get_utf8_xml_string_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_document_get_utf8_xml_string_size (); int main () { return libfwevt_xml_document_get_utf8_xml_string_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_document_get_utf8_xml_string_size=yes else ac_cv_lib_fwevt_libfwevt_xml_document_get_utf8_xml_string_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_document_get_utf8_xml_string_size" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_document_get_utf8_xml_string_size" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_document_get_utf8_xml_string_size" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_document_get_utf8_xml_string in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_document_get_utf8_xml_string in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_document_get_utf8_xml_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_document_get_utf8_xml_string (); int main () { return libfwevt_xml_document_get_utf8_xml_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_document_get_utf8_xml_string=yes else ac_cv_lib_fwevt_libfwevt_xml_document_get_utf8_xml_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_document_get_utf8_xml_string" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_document_get_utf8_xml_string" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_document_get_utf8_xml_string" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_document_get_utf16_xml_string_size in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_document_get_utf16_xml_string_size in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_document_get_utf16_xml_string_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_document_get_utf16_xml_string_size (); int main () { return libfwevt_xml_document_get_utf16_xml_string_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_document_get_utf16_xml_string_size=yes else ac_cv_lib_fwevt_libfwevt_xml_document_get_utf16_xml_string_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_document_get_utf16_xml_string_size" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_document_get_utf16_xml_string_size" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_document_get_utf16_xml_string_size" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_document_get_utf16_xml_string in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_document_get_utf16_xml_string in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_document_get_utf16_xml_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_document_get_utf16_xml_string (); int main () { return libfwevt_xml_document_get_utf16_xml_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_document_get_utf16_xml_string=yes else ac_cv_lib_fwevt_libfwevt_xml_document_get_utf16_xml_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_document_get_utf16_xml_string" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_document_get_utf16_xml_string" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_document_get_utf16_xml_string" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi if test "x$ac_cv_enable_debug_output" != xno ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_document_debug_print in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_document_debug_print in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_document_debug_print+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_document_debug_print (); int main () { return libfwevt_xml_document_debug_print (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_document_debug_print=yes else ac_cv_lib_fwevt_libfwevt_xml_document_debug_print=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_document_debug_print" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_document_debug_print" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_document_debug_print" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_utf8_name_size in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_utf8_name_size in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_name_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_utf8_name_size (); int main () { return libfwevt_xml_tag_get_utf8_name_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_name_size=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_name_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_name_size" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_name_size" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_name_size" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_utf8_name in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_utf8_name in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_utf8_name (); int main () { return libfwevt_xml_tag_get_utf8_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_name=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_name" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_name" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_name" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_utf16_name_size in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_utf16_name_size in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_name_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_utf16_name_size (); int main () { return libfwevt_xml_tag_get_utf16_name_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_name_size=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_name_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_name_size" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_name_size" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_name_size" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_utf16_name in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_utf16_name in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_utf16_name (); int main () { return libfwevt_xml_tag_get_utf16_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_name=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_name" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_name" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_name" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_utf8_value_size in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_utf8_value_size in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_value_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_utf8_value_size (); int main () { return libfwevt_xml_tag_get_utf8_value_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_value_size=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_value_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_value_size" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_value_size" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_value_size" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_utf8_value in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_utf8_value in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_value+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_utf8_value (); int main () { return libfwevt_xml_tag_get_utf8_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_value=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_value" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_value" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf8_value" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_utf16_value_size in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_utf16_value_size in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_value_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_utf16_value_size (); int main () { return libfwevt_xml_tag_get_utf16_value_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_value_size=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_value_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_value_size" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_value_size" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_value_size" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_utf16_value in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_utf16_value in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_value+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_utf16_value (); int main () { return libfwevt_xml_tag_get_utf16_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_value=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_value" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_value" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_utf16_value" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_number_of_attributes in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_number_of_attributes in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_number_of_attributes+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_number_of_attributes (); int main () { return libfwevt_xml_tag_get_number_of_attributes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_number_of_attributes=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_number_of_attributes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_number_of_attributes" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_number_of_attributes" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_number_of_attributes" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_attribute_by_index in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_attribute_by_index in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_attribute_by_index (); int main () { return libfwevt_xml_tag_get_attribute_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_index=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_index" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_index" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_index" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_attribute_by_utf8_name in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_attribute_by_utf8_name in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_utf8_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_attribute_by_utf8_name (); int main () { return libfwevt_xml_tag_get_attribute_by_utf8_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_utf8_name=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_utf8_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_utf8_name" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_utf8_name" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_utf8_name" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_attribute_by_utf16_name in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_attribute_by_utf16_name in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_utf16_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_attribute_by_utf16_name (); int main () { return libfwevt_xml_tag_get_attribute_by_utf16_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_utf16_name=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_utf16_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_utf16_name" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_utf16_name" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_attribute_by_utf16_name" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_number_of_elements in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_number_of_elements in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_number_of_elements+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_number_of_elements (); int main () { return libfwevt_xml_tag_get_number_of_elements (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_number_of_elements=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_number_of_elements=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_number_of_elements" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_number_of_elements" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_number_of_elements" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_element_by_index in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_element_by_index in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_element_by_index (); int main () { return libfwevt_xml_tag_get_element_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_index=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_index" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_index" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_index" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_element_by_utf8_name in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_element_by_utf8_name in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_utf8_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_element_by_utf8_name (); int main () { return libfwevt_xml_tag_get_element_by_utf8_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_utf8_name=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_utf8_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_utf8_name" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_utf8_name" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_utf8_name" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_element_by_utf16_name in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_element_by_utf16_name in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_utf16_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_element_by_utf16_name (); int main () { return libfwevt_xml_tag_get_element_by_utf16_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_utf16_name=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_utf16_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_utf16_name" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_utf16_name" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_element_by_utf16_name" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwevt_xml_tag_get_flags in -lfwevt" >&5 $as_echo_n "checking for libfwevt_xml_tag_get_flags in -lfwevt... " >&6; } if ${ac_cv_lib_fwevt_libfwevt_xml_tag_get_flags+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwevt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwevt_xml_tag_get_flags (); int main () { return libfwevt_xml_tag_get_flags (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwevt_libfwevt_xml_tag_get_flags=yes else ac_cv_lib_fwevt_libfwevt_xml_tag_get_flags=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwevt_libfwevt_xml_tag_get_flags" >&5 $as_echo "$ac_cv_lib_fwevt_libfwevt_xml_tag_get_flags" >&6; } if test "x$ac_cv_lib_fwevt_libfwevt_xml_tag_get_flags" = xyes; then : ac_cv_libfwevt_dummy=yes else ac_cv_libfwevt=no fi ac_cv_libfwevt_LIBADD="-lfwevt" fi fi fi if test "x$ac_cv_libfwevt" = xyes; then : $as_echo "#define HAVE_LIBFWEVT 1" >>confdefs.h fi if test "x$ac_cv_libfwevt" = xyes; then : HAVE_LIBFWEVT=1 else HAVE_LIBFWEVT=0 fi if test "x$ac_cv_libfwevt" != xyes; then : ac_cv_libfwevt_CPPFLAGS="-I../libfwevt"; ac_cv_libfwevt_LIBADD="../libfwevt/libfwevt.la"; ac_cv_libfwevt=local $as_echo "#define HAVE_LOCAL_LIBFWEVT 1" >>confdefs.h HAVE_LOCAL_LIBFWEVT=1 fi if test "x$ac_cv_libfwevt" = xlocal; then HAVE_LOCAL_LIBFWEVT_TRUE= HAVE_LOCAL_LIBFWEVT_FALSE='#' else HAVE_LOCAL_LIBFWEVT_TRUE='#' HAVE_LOCAL_LIBFWEVT_FALSE= fi if test "x$ac_cv_libfwevt_CPPFLAGS" != "x"; then : LIBFWEVT_CPPFLAGS=$ac_cv_libfwevt_CPPFLAGS fi if test "x$ac_cv_libfwevt_LIBADD" != "x"; then : LIBFWEVT_LIBADD=$ac_cv_libfwevt_LIBADD fi if test "x$ac_cv_libfwevt" = xyes; then : ax_libfwevt_pc_libs_private=-lfwevt fi if test "x$ac_cv_libfwevt" = xyes; then : ax_libfwevt_spec_requires=libfwevt ax_libfwevt_spec_build_requires=libfwevt-devel fi # Check whether --with-libexe was given. if test "${with_libexe+set}" = set; then : withval=$with_libexe; ac_cv_with_libexe=$withval else ac_cv_with_libexe=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libexe in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libexe in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libexe+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libexe=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libexe" >&5 $as_echo "$ac_cv_with_libexe" >&6; } if test "x$ac_cv_with_libexe" != x && test "x$ac_cv_with_libexe" != xno && test "x$ac_cv_with_libexe" != xauto-detect; then : if test -d "$ac_cv_with_libexe"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libexe}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libexe}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libexe" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libexe" >&2;} fi fi if test "x$ac_cv_with_libexe" = xno; then : ac_cv_libexe=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexe" >&5 $as_echo_n "checking for libexe... " >&6; } if test -n "$libexe_CFLAGS"; then pkg_cv_libexe_CFLAGS="$libexe_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libexe >= 20120405\""; } >&5 ($PKG_CONFIG --exists --print-errors "libexe >= 20120405") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libexe_CFLAGS=`$PKG_CONFIG --cflags "libexe >= 20120405" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libexe_LIBS"; then pkg_cv_libexe_LIBS="$libexe_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libexe >= 20120405\""; } >&5 ($PKG_CONFIG --exists --print-errors "libexe >= 20120405") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libexe_LIBS=`$PKG_CONFIG --libs "libexe >= 20120405" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libexe_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libexe >= 20120405" 2>&1` else libexe_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libexe >= 20120405" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libexe_PKG_ERRORS" >&5 ac_cv_libexe=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libexe=no else libexe_CFLAGS=$pkg_cv_libexe_CFLAGS libexe_LIBS=$pkg_cv_libexe_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libexe=yes fi fi if test "x$ac_cv_libexe" = xyes; then : ac_cv_libexe_CPPFLAGS="$pkg_cv_libexe_CFLAGS" ac_cv_libexe_LIBADD="$pkg_cv_libexe_LIBS" else for ac_header in libexe.h do : ac_fn_c_check_header_mongrel "$LINENO" "libexe.h" "ac_cv_header_libexe_h" "$ac_includes_default" if test "x$ac_cv_header_libexe_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBEXE_H 1 _ACEOF fi done if test "x$ac_cv_header_libexe_h" = xno; then : ac_cv_libexe=no else ac_cv_libexe=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexe_get_version in -lexe" >&5 $as_echo_n "checking for libexe_get_version in -lexe... " >&6; } if ${ac_cv_lib_exe_libexe_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexe $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libexe_get_version (); int main () { return libexe_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_exe_libexe_get_version=yes else ac_cv_lib_exe_libexe_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_exe_libexe_get_version" >&5 $as_echo "$ac_cv_lib_exe_libexe_get_version" >&6; } if test "x$ac_cv_lib_exe_libexe_get_version" = xyes; then : ac_cv_libexe_dummy=yes else ac_cv_libexe=no fi ac_cv_libexe_LIBADD="-lexe" fi fi fi if test "x$ac_cv_libexe" = xyes; then : $as_echo "#define HAVE_LIBEXE 1" >>confdefs.h fi if test "x$ac_cv_libexe" = xyes; then : HAVE_LIBEXE=1 else HAVE_LIBEXE=0 fi if test "x$ac_cv_libexe" != xyes; then : ac_cv_libexe_CPPFLAGS="-I../libexe"; ac_cv_libexe_LIBADD="../libexe/libexe.la"; ac_cv_libexe=local $as_echo "#define HAVE_LOCAL_LIBEXE 1" >>confdefs.h HAVE_LOCAL_LIBEXE=1 fi if test "x$ac_cv_libexe" = xlocal; then HAVE_LOCAL_LIBEXE_TRUE= HAVE_LOCAL_LIBEXE_FALSE='#' else HAVE_LOCAL_LIBEXE_TRUE='#' HAVE_LOCAL_LIBEXE_FALSE= fi if test "x$ac_cv_libexe_CPPFLAGS" != "x"; then : LIBEXE_CPPFLAGS=$ac_cv_libexe_CPPFLAGS fi if test "x$ac_cv_libexe_LIBADD" != "x"; then : LIBEXE_LIBADD=$ac_cv_libexe_LIBADD fi if test "x$ac_cv_libexe" = xyes; then : ax_libexe_pc_libs_private=-lexe fi if test "x$ac_cv_libexe" = xyes; then : ax_libexe_spec_requires=libexe ax_libexe_spec_build_requires=libexe-devel fi # Check whether --with-libregf was given. if test "${with_libregf+set}" = set; then : withval=$with_libregf; ac_cv_with_libregf=$withval else ac_cv_with_libregf=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libregf in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libregf in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libregf+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libregf=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libregf" >&5 $as_echo "$ac_cv_with_libregf" >&6; } if test "x$ac_cv_with_libregf" != x && test "x$ac_cv_with_libregf" != xno && test "x$ac_cv_with_libregf" != xauto-detect; then : if test -d "$ac_cv_with_libregf"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libregf}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libregf}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libregf" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libregf" >&2;} fi fi if test "x$ac_cv_with_libregf" = xno; then : ac_cv_libregf=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libregf" >&5 $as_echo_n "checking for libregf... " >&6; } if test -n "$libregf_CFLAGS"; then pkg_cv_libregf_CFLAGS="$libregf_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libregf >= 20120405\""; } >&5 ($PKG_CONFIG --exists --print-errors "libregf >= 20120405") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libregf_CFLAGS=`$PKG_CONFIG --cflags "libregf >= 20120405" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libregf_LIBS"; then pkg_cv_libregf_LIBS="$libregf_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libregf >= 20120405\""; } >&5 ($PKG_CONFIG --exists --print-errors "libregf >= 20120405") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libregf_LIBS=`$PKG_CONFIG --libs "libregf >= 20120405" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libregf_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libregf >= 20120405" 2>&1` else libregf_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libregf >= 20120405" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libregf_PKG_ERRORS" >&5 ac_cv_libregf=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libregf=no else libregf_CFLAGS=$pkg_cv_libregf_CFLAGS libregf_LIBS=$pkg_cv_libregf_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libregf=yes fi fi if test "x$ac_cv_libregf" = xyes; then : ac_cv_libregf_CPPFLAGS="$pkg_cv_libregf_CFLAGS" ac_cv_libregf_LIBADD="$pkg_cv_libregf_LIBS" else for ac_header in libregf.h do : ac_fn_c_check_header_mongrel "$LINENO" "libregf.h" "ac_cv_header_libregf_h" "$ac_includes_default" if test "x$ac_cv_header_libregf_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBREGF_H 1 _ACEOF fi done if test "x$ac_cv_header_libregf_h" = xno; then : ac_cv_libregf=no else ac_cv_libregf=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libregf_get_version in -lregf" >&5 $as_echo_n "checking for libregf_get_version in -lregf... " >&6; } if ${ac_cv_lib_regf_libregf_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lregf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libregf_get_version (); int main () { return libregf_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_regf_libregf_get_version=yes else ac_cv_lib_regf_libregf_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_regf_libregf_get_version" >&5 $as_echo "$ac_cv_lib_regf_libregf_get_version" >&6; } if test "x$ac_cv_lib_regf_libregf_get_version" = xyes; then : ac_cv_libregf_dummy=yes else ac_cv_libregf=no fi ac_cv_libregf_LIBADD="-lregf" fi fi fi if test "x$ac_cv_libregf" = xyes; then : $as_echo "#define HAVE_LIBREGF 1" >>confdefs.h fi if test "x$ac_cv_libregf" = xyes; then : HAVE_LIBREGF=1 else HAVE_LIBREGF=0 fi if test "x$ac_cv_libregf" != xyes; then : for ac_header in wctype.h do : ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default" if test "x$ac_cv_header_wctype_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WCTYPE_H 1 _ACEOF fi done for ac_func in towupper do : ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper" if test "x$ac_cv_func_towupper" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TOWUPPER 1 _ACEOF fi done if test "x$ac_cv_func_towupper" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: towupper See \`config.log' for more details" "$LINENO" 5; } fi ac_cv_libregf_CPPFLAGS="-I../libregf"; ac_cv_libregf_LIBADD="../libregf/libregf.la"; ac_cv_libregf=local $as_echo "#define HAVE_LOCAL_LIBREGF 1" >>confdefs.h HAVE_LOCAL_LIBREGF=1 fi if test "x$ac_cv_libregf" = xlocal; then HAVE_LOCAL_LIBREGF_TRUE= HAVE_LOCAL_LIBREGF_FALSE='#' else HAVE_LOCAL_LIBREGF_TRUE='#' HAVE_LOCAL_LIBREGF_FALSE= fi if test "x$ac_cv_libregf_CPPFLAGS" != "x"; then : LIBREGF_CPPFLAGS=$ac_cv_libregf_CPPFLAGS fi if test "x$ac_cv_libregf_LIBADD" != "x"; then : LIBREGF_LIBADD=$ac_cv_libregf_LIBADD fi if test "x$ac_cv_libregf" = xyes; then : ax_libregf_pc_libs_private=-lregf fi if test "x$ac_cv_libregf" = xyes; then : ax_libregf_spec_requires=libregf ax_libregf_spec_build_requires=libregf-devel fi # Check whether --with-libwrc was given. if test "${with_libwrc+set}" = set; then : withval=$with_libwrc; ac_cv_with_libwrc=$withval else ac_cv_with_libwrc=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libwrc in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libwrc in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libwrc+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libwrc=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libwrc" >&5 $as_echo "$ac_cv_with_libwrc" >&6; } if test "x$ac_cv_with_libwrc" != x && test "x$ac_cv_with_libwrc" != xno && test "x$ac_cv_with_libwrc" != xauto-detect; then : if test -d "$ac_cv_with_libwrc"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libwrc}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libwrc}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libwrc" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libwrc" >&2;} fi fi if test "x$ac_cv_with_libwrc" = xno; then : ac_cv_libwrc=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libwrc" >&5 $as_echo_n "checking for libwrc... " >&6; } if test -n "$libwrc_CFLAGS"; then pkg_cv_libwrc_CFLAGS="$libwrc_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwrc >= 20120405\""; } >&5 ($PKG_CONFIG --exists --print-errors "libwrc >= 20120405") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libwrc_CFLAGS=`$PKG_CONFIG --cflags "libwrc >= 20120405" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libwrc_LIBS"; then pkg_cv_libwrc_LIBS="$libwrc_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwrc >= 20120405\""; } >&5 ($PKG_CONFIG --exists --print-errors "libwrc >= 20120405") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libwrc_LIBS=`$PKG_CONFIG --libs "libwrc >= 20120405" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libwrc_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libwrc >= 20120405" 2>&1` else libwrc_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libwrc >= 20120405" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libwrc_PKG_ERRORS" >&5 ac_cv_libwrc=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libwrc=no else libwrc_CFLAGS=$pkg_cv_libwrc_CFLAGS libwrc_LIBS=$pkg_cv_libwrc_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libwrc=yes fi fi if test "x$ac_cv_libwrc" = xyes; then : ac_cv_libwrc_CPPFLAGS="$pkg_cv_libwrc_CFLAGS" ac_cv_libwrc_LIBADD="$pkg_cv_libwrc_LIBS" else for ac_header in libwrc.h do : ac_fn_c_check_header_mongrel "$LINENO" "libwrc.h" "ac_cv_header_libwrc_h" "$ac_includes_default" if test "x$ac_cv_header_libwrc_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBWRC_H 1 _ACEOF fi done if test "x$ac_cv_header_libwrc_h" = xno; then : ac_cv_libwrc=no else ac_cv_libwrc=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libwrc_get_version in -lwrc" >&5 $as_echo_n "checking for libwrc_get_version in -lwrc... " >&6; } if ${ac_cv_lib_wrc_libwrc_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lwrc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libwrc_get_version (); int main () { return libwrc_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_wrc_libwrc_get_version=yes else ac_cv_lib_wrc_libwrc_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wrc_libwrc_get_version" >&5 $as_echo "$ac_cv_lib_wrc_libwrc_get_version" >&6; } if test "x$ac_cv_lib_wrc_libwrc_get_version" = xyes; then : ac_cv_libwrc_dummy=yes else ac_cv_libwrc=no fi ac_cv_libwrc_LIBADD="-lwrc" fi fi fi if test "x$ac_cv_libwrc" = xyes; then : $as_echo "#define HAVE_LIBWRC 1" >>confdefs.h fi if test "x$ac_cv_libwrc" = xyes; then : HAVE_LIBWRC=1 else HAVE_LIBWRC=0 fi if test "x$ac_cv_libwrc" != xyes; then : ac_cv_libwrc_CPPFLAGS="-I../libwrc"; ac_cv_libwrc_LIBADD="../libwrc/libwrc.la"; ac_cv_libwrc=local $as_echo "#define HAVE_LOCAL_LIBWRC 1" >>confdefs.h HAVE_LOCAL_LIBWRC=1 fi if test "x$ac_cv_libwrc" = xlocal; then HAVE_LOCAL_LIBWRC_TRUE= HAVE_LOCAL_LIBWRC_FALSE='#' else HAVE_LOCAL_LIBWRC_TRUE='#' HAVE_LOCAL_LIBWRC_FALSE= fi if test "x$ac_cv_libwrc_CPPFLAGS" != "x"; then : LIBWRC_CPPFLAGS=$ac_cv_libwrc_CPPFLAGS fi if test "x$ac_cv_libwrc_LIBADD" != "x"; then : LIBWRC_LIBADD=$ac_cv_libwrc_LIBADD fi if test "x$ac_cv_libwrc" = xyes; then : ax_libwrc_pc_libs_private=-lwrc fi if test "x$ac_cv_libwrc" = xyes; then : ax_libwrc_spec_requires=libwrc ax_libwrc_spec_build_requires=libwrc-devel fi # Check whether --with-libcdirectory was given. if test "${with_libcdirectory+set}" = set; then : withval=$with_libcdirectory; ac_cv_with_libcdirectory=$withval else ac_cv_with_libcdirectory=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcdirectory in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcdirectory in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcdirectory+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcdirectory=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcdirectory" >&5 $as_echo "$ac_cv_with_libcdirectory" >&6; } if test "x$ac_cv_with_libcdirectory" != x && test "x$ac_cv_with_libcdirectory" != xno && test "x$ac_cv_with_libcdirectory" != xauto-detect; then : if test -d "$ac_cv_with_libcdirectory"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcdirectory}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcdirectory}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcdirectory" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcdirectory" >&2;} fi fi if test "x$ac_cv_with_libcdirectory" = xno; then : ac_cv_libcdirectory=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory" >&5 $as_echo_n "checking for libcdirectory... " >&6; } if test -n "$libcdirectory_CFLAGS"; then pkg_cv_libcdirectory_CFLAGS="$libcdirectory_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcdirectory >= 20120423\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcdirectory >= 20120423") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcdirectory_CFLAGS=`$PKG_CONFIG --cflags "libcdirectory >= 20120423" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libcdirectory_LIBS"; then pkg_cv_libcdirectory_LIBS="$libcdirectory_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcdirectory >= 20120423\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcdirectory >= 20120423") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcdirectory_LIBS=`$PKG_CONFIG --libs "libcdirectory >= 20120423" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcdirectory_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcdirectory >= 20120423" 2>&1` else libcdirectory_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcdirectory >= 20120423" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcdirectory_PKG_ERRORS" >&5 ac_cv_libcdirectory=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcdirectory=no else libcdirectory_CFLAGS=$pkg_cv_libcdirectory_CFLAGS libcdirectory_LIBS=$pkg_cv_libcdirectory_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcdirectory=yes fi fi if test "x$ac_cv_libcdirectory" = xyes; then : ac_cv_libcdirectory_CPPFLAGS="$pkg_cv_libcdirectory_CFLAGS" ac_cv_libcdirectory_LIBADD="$pkg_cv_libcdirectory_LIBS" else for ac_header in libcdirectory.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcdirectory.h" "ac_cv_header_libcdirectory_h" "$ac_includes_default" if test "x$ac_cv_header_libcdirectory_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCDIRECTORY_H 1 _ACEOF fi done if test "x$ac_cv_header_libcdirectory_h" = xno; then : ac_cv_libcdirectory=no else ac_cv_libcdirectory=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_get_version in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_get_version in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_get_version (); int main () { return libcdirectory_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_get_version=yes else ac_cv_lib_cdirectory_libcdirectory_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_get_version" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_get_version" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_get_version" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_initialize in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_initialize in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_initialize (); int main () { return libcdirectory_directory_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_initialize=yes else ac_cv_lib_cdirectory_libcdirectory_directory_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_initialize" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_initialize" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_initialize" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_free in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_free in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_free (); int main () { return libcdirectory_directory_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_free=yes else ac_cv_lib_cdirectory_libcdirectory_directory_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_free" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_free" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_free" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_open in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_open in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_open (); int main () { return libcdirectory_directory_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_open=yes else ac_cv_lib_cdirectory_libcdirectory_directory_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_open" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_open" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_open" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_close in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_close in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_close (); int main () { return libcdirectory_directory_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_close=yes else ac_cv_lib_cdirectory_libcdirectory_directory_close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_close" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_close" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_close" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_read_entry in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_read_entry in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_read_entry+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_read_entry (); int main () { return libcdirectory_directory_read_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_read_entry=yes else ac_cv_lib_cdirectory_libcdirectory_directory_read_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_read_entry" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_read_entry" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_read_entry" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_has_entry in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_has_entry in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_has_entry+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_has_entry (); int main () { return libcdirectory_directory_has_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_has_entry=yes else ac_cv_lib_cdirectory_libcdirectory_directory_has_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_has_entry" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_has_entry" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_has_entry" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_open_wide in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_open_wide in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_open_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_open_wide (); int main () { return libcdirectory_directory_open_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_open_wide=yes else ac_cv_lib_cdirectory_libcdirectory_directory_open_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_open_wide" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_open_wide" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_open_wide" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_has_entry_wide in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_has_entry_wide in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_has_entry_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_has_entry_wide (); int main () { return libcdirectory_directory_has_entry_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_has_entry_wide=yes else ac_cv_lib_cdirectory_libcdirectory_directory_has_entry_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_has_entry_wide" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_has_entry_wide" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_has_entry_wide" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_entry_initialize in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_entry_initialize in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_entry_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_entry_initialize (); int main () { return libcdirectory_directory_entry_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_entry_initialize=yes else ac_cv_lib_cdirectory_libcdirectory_directory_entry_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_entry_initialize" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_entry_initialize" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_entry_initialize" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_entry_free in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_entry_free in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_entry_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_entry_free (); int main () { return libcdirectory_directory_entry_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_entry_free=yes else ac_cv_lib_cdirectory_libcdirectory_directory_entry_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_entry_free" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_entry_free" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_entry_free" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_entry_get_type in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_entry_get_type in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_type+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_entry_get_type (); int main () { return libcdirectory_directory_entry_get_type (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_type=yes else ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_type=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_type" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_type" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_type" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_entry_get_name in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_entry_get_name in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_entry_get_name (); int main () { return libcdirectory_directory_entry_get_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_name=yes else ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_name" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_name" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_name" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcdirectory_directory_entry_get_name_wide in -lcdirectory" >&5 $as_echo_n "checking for libcdirectory_directory_entry_get_name_wide in -lcdirectory... " >&6; } if ${ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_name_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdirectory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcdirectory_directory_entry_get_name_wide (); int main () { return libcdirectory_directory_entry_get_name_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_name_wide=yes else ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_name_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_name_wide" >&5 $as_echo "$ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_name_wide" >&6; } if test "x$ac_cv_lib_cdirectory_libcdirectory_directory_entry_get_name_wide" = xyes; then : ac_cv_libcdirectory_dummy=yes else ac_cv_libcdirectory=no fi fi ac_cv_libcdirectory_LIBADD="-lcdirectory" fi fi fi if test "x$ac_cv_libcdirectory" = xyes; then : $as_echo "#define HAVE_LIBCDIRECTORY 1" >>confdefs.h fi if test "x$ac_cv_libcdirectory" = xyes; then : HAVE_LIBCDIRECTORY=1 else HAVE_LIBCDIRECTORY=0 fi if test "x$ac_cv_libcdirectory" != xyes; then : if test "x$ac_cv_enable_winapi" = xno; then : for ac_header in dirent.h errno.h sys/stat.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in closedir opendir readdir_r do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_closedir" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: closedir See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_opendir" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: opendir See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_readdir_r" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: readdir_r See \`config.log' for more details" "$LINENO" 5; } fi fi ac_cv_libcdirectory_CPPFLAGS="-I../libcdirectory"; ac_cv_libcdirectory_LIBADD="../libcdirectory/libcdirectory.la"; ac_cv_libcdirectory=local $as_echo "#define HAVE_LOCAL_LIBCDIRECTORY 1" >>confdefs.h HAVE_LOCAL_LIBCDIRECTORY=1 fi if test "x$ac_cv_libcdirectory" = xlocal; then HAVE_LOCAL_LIBCDIRECTORY_TRUE= HAVE_LOCAL_LIBCDIRECTORY_FALSE='#' else HAVE_LOCAL_LIBCDIRECTORY_TRUE='#' HAVE_LOCAL_LIBCDIRECTORY_FALSE= fi if test "x$ac_cv_libcdirectory_CPPFLAGS" != "x"; then : LIBCDIRECTORY_CPPFLAGS=$ac_cv_libcdirectory_CPPFLAGS fi if test "x$ac_cv_libcdirectory_LIBADD" != "x"; then : LIBCDIRECTORY_LIBADD=$ac_cv_libcdirectory_LIBADD fi if test "x$ac_cv_libcdirectory" = xyes; then : ax_libcdirectory_pc_libs_private=-lstring fi if test "x$ac_cv_libcdirectory" = xyes; then : ax_libcdirectory_spec_requires=libcdirectory ax_libcdirectory_spec_build_requires=libcdirectory-devel fi for ac_header in signal.h sys/signal.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in close getopt setvbuf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_close" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: close See \`config.log' for more details" "$LINENO" 5; } fi # Check whether --enable-static-executables was given. if test "${enable_static_executables+set}" = set; then : enableval=$enable_static_executables; ac_cv_enable_static_executables=$enableval else ac_cv_enable_static_executables=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build static executables (binaries)" >&5 $as_echo_n "checking whether to enable build static executables (binaries)... " >&6; } if ${ac_cv_enable_static_executables+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_static_executables=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_static_executables" >&5 $as_echo "$ac_cv_enable_static_executables" >&6; } if test "x$ac_cv_enable_static_executables" != xno; then : STATIC_LDFLAGS="-all-static"; ac_cv_enable_static_executables=yes fi if test "x$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno; then : case $host in #( *cygwin* | *mingw*) : LIBEVT_DLL_IMPORT="-DLIBEVT_DLL_IMPORT" ;; #( *) : ;; esac fi # Check whether --with-pyprefix was given. if test "${with_pyprefix+set}" = set; then : withval=$with_pyprefix; ac_cv_with_pyprefix=$withval else ac_cv_with_pyprefix=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use \`python-config --prefix' to determine the prefix of pythondir instead of --prefix" >&5 $as_echo_n "checking whether to use use \`python-config --prefix' to determine the prefix of pythondir instead of --prefix... " >&6; } if ${ac_cv_with_pyprefix+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_pyprefix=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pyprefix" >&5 $as_echo "$ac_cv_with_pyprefix" >&6; } # Check whether --enable-python was given. if test "${enable_python+set}" = set; then : enableval=$enable_python; ac_cv_enable_python=$enableval else ac_cv_enable_python=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python bindings" >&5 $as_echo_n "checking whether to enable build Python bindings... " >&6; } if ${ac_cv_enable_python+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_python=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_python" >&5 $as_echo "$ac_cv_enable_python" >&6; } # Check whether --with-pythondir was given. if test "${with_pythondir+set}" = set; then : withval=$with_pythondir; ac_cv_with_pythondir=$withval else ac_cv_with_pythondir=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python directory (pythondir)" >&5 $as_echo_n "checking whether to use use to specify the Python directory (pythondir)... " >&6; } if ${ac_cv_with_pythondir+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_pythondir=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pythondir" >&5 $as_echo "$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 ax_python_progs="python python2 python2.7 python2.6 python2.5 python3 python3.4 python3.3 python3.2 python3.1 python3.0" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PYTHON=$ac_cv_prog_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON" && break done if test "x${PYTHON}" != x; then : ax_prog_python_version=`${PYTHON} -c "import sys; sys.stdout.write(sys.version[:3])" 2>/dev/null`; PYTHON_VERSION=$ax_prog_python_version ax_prog_python_platform=`${PYTHON} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; PYTHON_PLATFORM=$ax_prog_python_platform else as_fn_error $? "Unable to find python" "$LINENO" 5 fi PYTHON=$PYTHON if test "x${PYTHON}" != x; then : for ac_prog in python${PYTHON_VERSION}-config python-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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PYTHON_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PYTHON_CONFIG=$ac_cv_prog_PYTHON_CONFIG if test -n "$PYTHON_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5 $as_echo "$PYTHON_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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`; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 $as_echo_n "checking for Python includes... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_INCLUDES" >&5 $as_echo "$PYTHON_INCLUDES" >&6; } PYTHON_LDFLAGS=`${PYTHON_CONFIG} --ldflags 2>/dev/null`; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python libraries" >&5 $as_echo_n "checking for Python libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5 $as_echo "$PYTHON_LDFLAGS" >&6; } BACKUP_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PYTHON_INCLUDES}" for ac_header in Python.h do : ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" if test "x$ac_cv_header_Python_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PYTHON_H 1 _ACEOF ac_cv_header_python_h=yes else 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 ac_cv_enable_python=$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 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 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 ax_python_pythondir=`${PYTHON} -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib() " 2>/dev/null` fi else 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 distutils.sysconfig; print 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 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 : $as_echo "#define HAVE_PYTHON 1" >>confdefs.h fi if test "x${ac_cv_enable_python}" != xno; then HAVE_PYTHON_TRUE= HAVE_PYTHON_FALSE='#' else HAVE_PYTHON_TRUE='#' HAVE_PYTHON_FALSE= fi # Check whether --enable-python2 was given. if test "${enable_python2+set}" = set; then : enableval=$enable_python2; ac_cv_enable_python2=$enableval else ac_cv_enable_python2=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python 2 bindings" >&5 $as_echo_n "checking whether to enable build Python 2 bindings... " >&6; } if ${ac_cv_enable_python2+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_python2=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_python2" >&5 $as_echo "$ac_cv_enable_python2" >&6; } # Check whether --with-pythondir2 was given. if test "${with_pythondir2+set}" = set; then : withval=$with_pythondir2; ac_cv_with_pythondir2=$withval else ac_cv_with_pythondir2=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python 2 directory (pythondir2)" >&5 $as_echo_n "checking whether to use use to specify the Python 2 directory (pythondir2)... " >&6; } if ${ac_cv_with_pythondir2+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_pythondir2=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pythondir2" >&5 $as_echo "$ac_cv_with_pythondir2" >&6; } if test "x${ac_cv_enable_python2}" != xno; then : ax_python2_progs="python2 python2.7 python2.6 python2.5" for ac_prog in $ax_python2_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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PYTHON2+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PYTHON2"; then ac_cv_prog_PYTHON2="$PYTHON2" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON2="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PYTHON2=$ac_cv_prog_PYTHON2 if test -n "$PYTHON2"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON2" >&5 $as_echo "$PYTHON2" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON2" && break done if test "x${PYTHON2}" != x; then : ax_prog_python2_version=`${PYTHON2} -c "import sys; sys.stdout.write(sys.version[:3])" 2>/dev/null`; PYTHON2_VERSION=$ax_prog_python2_version ax_prog_python2_platform=`${PYTHON2} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; PYTHON2_PLATFORM=$ax_prog_python2_platform else as_fn_error $? "Unable to find python2" "$LINENO" 5 fi PYTHON2=$PYTHON2 if test "x${PYTHON2}" != x; then : for ac_prog in python2-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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PYTHON2_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PYTHON2_CONFIG"; then ac_cv_prog_PYTHON2_CONFIG="$PYTHON2_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 test -z "$as_dir" && as_dir=. 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_PYTHON2_CONFIG="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PYTHON2_CONFIG=$ac_cv_prog_PYTHON2_CONFIG if test -n "$PYTHON2_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON2_CONFIG" >&5 $as_echo "$PYTHON2_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON2_CONFIG" && break done fi if test "x${PYTHON2_CONFIG}" = x; then : as_fn_error $? "Unable to find python2-config" "$LINENO" 5 fi PYTHON2_CONFIG=$PYTHON2_CONFIG if test "x${PYTHON2_CONFIG}" != x; then : PYTHON2_INCLUDES=`${PYTHON2_CONFIG} --includes 2>/dev/null`; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python verison 2 includes" >&5 $as_echo_n "checking for Python verison 2 includes... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON2_INCLUDES" >&5 $as_echo "$PYTHON2_INCLUDES" >&6; } PYTHON2_LDFLAGS=`${PYTHON2_CONFIG} --ldflags 2>/dev/null`; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python 2 libraries" >&5 $as_echo_n "checking for Python 2 libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON2_LDFLAGS" >&5 $as_echo "$PYTHON2_LDFLAGS" >&6; } BACKUP_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PYTHON2_INCLUDES}" for ac_header in Python.h do : ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" if test "x$ac_cv_header_Python_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PYTHON_H 1 _ACEOF ac_cv_header_python2_h=yes else ac_cv_header_python2_h=no fi done CPPFLAGS="${BACKUP_CPPFLAGS}" fi if test "x${ac_cv_header_python2_h}" != xyes; then : ac_cv_enable_python2=no else ac_cv_enable_python2=$PYTHON2_VERSION PYTHON2_CPPFLAGS=$PYTHON2_INCLUDES PYTHON2_LDFLAGS=$PYTHON2_LDFLAGS if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : ax_python2_prefix="\${prefix}" else ax_python2_prefix=`${PYTHON2_CONFIG} --prefix 2>/dev/null` fi PYTHON2_PREFIX=$ax_python2_prefix if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : ax_python2_exec_prefix="\${exec_prefix}" else ax_python2_exec_prefix=`${PYTHON2_CONFIG} --exec-prefix 2>/dev/null` fi PYTHON2_EXEC_PREFIX=$ax_python2_exec_prefix ax_python2_pythondir_suffix=`${PYTHON2} -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_pythondir2}" = x || test "x${ac_cv_with_pythondir2}" = xno; then : if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : ax_python2_pythondir="${ax_python_prefix}/${ax_python2_pythondir_suffix}" else ax_python2_pythondir=`${PYTHON2} -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib() " 2>/dev/null` fi else ax_python2_pythondir=$ac_cv_with_pythondir2 fi pythondir2=$ax_python2_pythondir ax_python2_pyexecdir_suffix=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; ax_python2_library_dir=`${PYTHON2} -c "import distutils.sysconfig; print 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_python2_pyexecdir="${ax_python2_exec_prefix}/${ax_python2_pyexecdir_suffix}" else ax_python2_pyexecdir=$ax_python2_library_dir fi pyexecdir2=$ax_python2_pyexecdir PYTHON2_LIBRARY_DIR=$ax_python2_pyexecdir_suffix PYTHON2_PACKAGE_DIR=$ax_python2_library_dir fi fi if test "x${ac_cv_enable_python2}" != xno; then : $as_echo "#define HAVE_PYTHON2 1" >>confdefs.h fi if test "x${ac_cv_enable_python2}" != xno; then HAVE_PYTHON2_TRUE= HAVE_PYTHON2_FALSE='#' else HAVE_PYTHON2_TRUE='#' HAVE_PYTHON2_FALSE= fi # Check whether --enable-python3 was given. if test "${enable_python3+set}" = set; then : enableval=$enable_python3; ac_cv_enable_python3=$enableval else ac_cv_enable_python3=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python 3 bindings" >&5 $as_echo_n "checking whether to enable build Python 3 bindings... " >&6; } if ${ac_cv_enable_python3+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_python3=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_python3" >&5 $as_echo "$ac_cv_enable_python3" >&6; } # Check whether --with-pythondir3 was given. if test "${with_pythondir3+set}" = set; then : withval=$with_pythondir3; ac_cv_with_pythondir3=$withval else ac_cv_with_pythondir3=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python 3 directory (pythondir3)" >&5 $as_echo_n "checking whether to use use to specify the Python 3 directory (pythondir3)... " >&6; } if ${ac_cv_with_pythondir3+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_pythondir3=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pythondir3" >&5 $as_echo "$ac_cv_with_pythondir3" >&6; } if test "x${ac_cv_enable_python3}" != xno; then : ax_python3_progs="python3 python3.4 python3.3 python3.2 python3.1 python3.0" for ac_prog in $ax_python3_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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PYTHON3+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PYTHON3"; then ac_cv_prog_PYTHON3="$PYTHON3" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON3="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PYTHON3=$ac_cv_prog_PYTHON3 if test -n "$PYTHON3"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5 $as_echo "$PYTHON3" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON3" && break done if test "x${PYTHON3}" != x; then : ax_prog_python3_version=`${PYTHON3} -c "import sys; sys.stdout.write(sys.version[:3])" 2>/dev/null`; PYTHON3_VERSION=$ax_prog_python3_version ax_prog_python3_platform=`${PYTHON3} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; PYTHON3_PLATFORM=$ax_prog_python3_platform else as_fn_error $? "Unable to find python3" "$LINENO" 5 fi PYTHON3=$PYTHON3 if test "x${PYTHON3}" != x; then : for ac_prog in python3-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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PYTHON3_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PYTHON3_CONFIG"; then ac_cv_prog_PYTHON3_CONFIG="$PYTHON3_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 test -z "$as_dir" && as_dir=. 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_PYTHON3_CONFIG="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PYTHON3_CONFIG=$ac_cv_prog_PYTHON3_CONFIG if test -n "$PYTHON3_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3_CONFIG" >&5 $as_echo "$PYTHON3_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON3_CONFIG" && break done fi if test "x${PYTHON3_CONFIG}" = x; then : as_fn_error $? "Unable to find python3-config" "$LINENO" 5 fi PYTHON3_CONFIG=$PYTHON3_CONFIG if test "x${PYTHON3_CONFIG}" != x; then : PYTHON3_INCLUDES=`${PYTHON3_CONFIG} --includes 2>/dev/null`; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python verison 3 includes" >&5 $as_echo_n "checking for Python verison 3 includes... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3_INCLUDES" >&5 $as_echo "$PYTHON3_INCLUDES" >&6; } PYTHON3_LDFLAGS=`${PYTHON3_CONFIG} --ldflags 2>/dev/null`; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python 3 libraries" >&5 $as_echo_n "checking for Python 3 libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3_LDFLAGS" >&5 $as_echo "$PYTHON3_LDFLAGS" >&6; } BACKUP_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PYTHON3_INCLUDES}" for ac_header in Python.h do : ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" if test "x$ac_cv_header_Python_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PYTHON_H 1 _ACEOF ac_cv_header_python3_h=yes else ac_cv_header_python3_h=no fi done CPPFLAGS="${BACKUP_CPPFLAGS}" fi if test "x${ac_cv_header_python3_h}" != xyes; then : ac_cv_enable_python3=no else ac_cv_enable_python3=$PYTHON3_VERSION PYTHON3_CPPFLAGS=$PYTHON3_INCLUDES PYTHON3_LDFLAGS=$PYTHON3_LDFLAGS if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : ax_python3_prefix="\${prefix}" else ax_python3_prefix=`${PYTHON3_CONFIG} --prefix 2>/dev/null` fi PYTHON3_PREFIX=$ax_python3_prefix if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : ax_python3_exec_prefix="\${exec_prefix}" else ax_python3_exec_prefix=`${PYTHON3_CONFIG} --exec-prefix 2>/dev/null` fi PYTHON3_EXEC_PREFIX=$ax_python3_exec_prefix ax_python3_pythondir_suffix=`${PYTHON3} -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_pythondir3}" = x || test "x${ac_cv_with_pythondir3}" = xno; then : if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno; then : ax_python3_pythondir="${ax_python_prefix}/${ax_python3_pythondir_suffix}" else ax_python3_pythondir=`${PYTHON3} -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib() " 2>/dev/null` fi else ax_python3_pythondir=$ac_cv_with_pythondir3 fi pythondir3=$ax_python3_pythondir ax_python3_pyexecdir_suffix=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; ax_python3_library_dir=`${PYTHON3} -c "import distutils.sysconfig; print 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_python3_pyexecdir="${ax_python3_exec_prefix}/${ax_python3_pyexecdir_suffix}" else ax_python3_pyexecdir=$ax_python3_library_dir fi pyexecdir3=$ax_python3_pyexecdir PYTHON3_LIBRARY_DIR=$ax_python3_pyexecdir_suffix PYTHON3_PACKAGE_DIR=$ax_python3_library_dir fi fi if test "x${ac_cv_enable_python3}" != xno; then : $as_echo "#define HAVE_PYTHON3 1" >>confdefs.h fi if test "x${ac_cv_enable_python3}" != xno; then HAVE_PYTHON3_TRUE= HAVE_PYTHON3_FALSE='#' else HAVE_PYTHON3_TRUE='#' HAVE_PYTHON3_FALSE= fi if test "x${ac_cv_enable_python}" != xno || test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno; then HAVE_PYTHON_TESTS_TRUE= HAVE_PYTHON_TESTS_FALSE='#' else HAVE_PYTHON_TESTS_TRUE='#' HAVE_PYTHON_TESTS_FALSE= fi for ac_header in stdarg.h varargs.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing headers: stdarg.h and varargs.h See \`config.log' for more details" "$LINENO" 5; } fi for ac_header in dlfcn.h do : ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done for ac_func in fmemopen getopt do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5 $as_echo_n "checking for dlsym in -ldl... " >&6; } if ${ac_cv_lib_dl_dlsym+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlsym (); int main () { return dlsym (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlsym=yes else ac_cv_lib_dl_dlsym=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5 $as_echo "$ac_cv_lib_dl_dlsym" >&6; } if test "x$ac_cv_lib_dl_dlsym" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" fi if test "x$lt_cv_prog_gnu_ld" = xyes && test "x$ac_cv_lib_dl_dlsym" = xyes; then : $as_echo "#define HAVE_GNU_DL_DLSYM 1" >>confdefs.h fi 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 : libevt_spec_requires=Requires: libevt_spec_build_requires=BuildRequires: fi if test "x$ac_cv_libexe" = xyes || test "x$ac_cv_libregf" = xyes || test "x$ac_cv_libwrc" = xyes || test "x$ac_cv_libcdirectory" = xyes; then : libevt_tools_spec_build_requires=BuildRequires: fi DPKG_DATE=`date -R 2> /dev/null` SPEC_DATE=`date +"%a %b %e %Y" 2> /dev/null` PWD=`pwd` 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 libevt/Makefile" ac_config_files="$ac_config_files libfwevt/Makefile" ac_config_files="$ac_config_files libexe/Makefile" ac_config_files="$ac_config_files libregf/Makefile" ac_config_files="$ac_config_files libwrc/Makefile" ac_config_files="$ac_config_files libcdirectory/Makefile" ac_config_files="$ac_config_files evttools/Makefile" ac_config_files="$ac_config_files pyevt/Makefile" ac_config_files="$ac_config_files pyevt-python2/Makefile" ac_config_files="$ac_config_files pyevt-python3/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 msvscpp/Makefile" ac_config_files="$ac_config_files include/libevt.h" ac_config_files="$ac_config_files include/libevt/definitions.h" ac_config_files="$ac_config_files include/libevt/features.h" ac_config_files="$ac_config_files include/libevt/types.h" ac_config_files="$ac_config_files libevt/libevt_definitions.h" ac_config_files="$ac_config_files common/types.h" ac_config_files="$ac_config_files dpkg/changelog" ac_config_files="$ac_config_files dpkg/copyright" ac_config_files="$ac_config_files libevt/libevt.rc" ac_config_files="$ac_config_files libevt.pc" ac_config_files="$ac_config_files libevt.spec" ac_config_headers="$ac_config_headers common/config.h" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "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 "${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_LIBFDATETIME_TRUE}" && test -z "${HAVE_LOCAL_LIBFDATETIME_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBFDATETIME\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBFGUID_TRUE}" && test -z "${HAVE_LOCAL_LIBFGUID_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBFGUID\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBFVALUE_TRUE}" && test -z "${HAVE_LOCAL_LIBFVALUE_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBFVALUE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBFWNT_TRUE}" && test -z "${HAVE_LOCAL_LIBFWNT_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBFWNT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_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_LIBFWEVT_TRUE}" && test -z "${HAVE_LOCAL_LIBFWEVT_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBFWEVT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBEXE_TRUE}" && test -z "${HAVE_LOCAL_LIBEXE_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBEXE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBREGF_TRUE}" && test -z "${HAVE_LOCAL_LIBREGF_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBREGF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBWRC_TRUE}" && test -z "${HAVE_LOCAL_LIBWRC_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBWRC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBCDIRECTORY_TRUE}" && test -z "${HAVE_LOCAL_LIBCDIRECTORY_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBCDIRECTORY\" 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_PYTHON2_TRUE}" && test -z "${HAVE_PYTHON2_FALSE}"; then as_fn_error $? "conditional \"HAVE_PYTHON2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PYTHON3_TRUE}" && test -z "${HAVE_PYTHON3_FALSE}"; then as_fn_error $? "conditional \"HAVE_PYTHON3\" 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 : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -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=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # 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 libevt $as_me 20170120, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ libevt config.status 20170120 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' 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"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_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"`' 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 \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_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; 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; 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. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;; "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" ;; "libevt/Makefile") CONFIG_FILES="$CONFIG_FILES libevt/Makefile" ;; "libfwevt/Makefile") CONFIG_FILES="$CONFIG_FILES libfwevt/Makefile" ;; "libexe/Makefile") CONFIG_FILES="$CONFIG_FILES libexe/Makefile" ;; "libregf/Makefile") CONFIG_FILES="$CONFIG_FILES libregf/Makefile" ;; "libwrc/Makefile") CONFIG_FILES="$CONFIG_FILES libwrc/Makefile" ;; "libcdirectory/Makefile") CONFIG_FILES="$CONFIG_FILES libcdirectory/Makefile" ;; "evttools/Makefile") CONFIG_FILES="$CONFIG_FILES evttools/Makefile" ;; "pyevt/Makefile") CONFIG_FILES="$CONFIG_FILES pyevt/Makefile" ;; "pyevt-python2/Makefile") CONFIG_FILES="$CONFIG_FILES pyevt-python2/Makefile" ;; "pyevt-python3/Makefile") CONFIG_FILES="$CONFIG_FILES pyevt-python3/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" ;; "msvscpp/Makefile") CONFIG_FILES="$CONFIG_FILES msvscpp/Makefile" ;; "include/libevt.h") CONFIG_FILES="$CONFIG_FILES include/libevt.h" ;; "include/libevt/definitions.h") CONFIG_FILES="$CONFIG_FILES include/libevt/definitions.h" ;; "include/libevt/features.h") CONFIG_FILES="$CONFIG_FILES include/libevt/features.h" ;; "include/libevt/types.h") CONFIG_FILES="$CONFIG_FILES include/libevt/types.h" ;; "libevt/libevt_definitions.h") CONFIG_FILES="$CONFIG_FILES libevt/libevt_definitions.h" ;; "common/types.h") CONFIG_FILES="$CONFIG_FILES common/types.h" ;; "dpkg/changelog") CONFIG_FILES="$CONFIG_FILES dpkg/changelog" ;; "dpkg/copyright") CONFIG_FILES="$CONFIG_FILES dpkg/copyright" ;; "libevt/libevt.rc") CONFIG_FILES="$CONFIG_FILES libevt/libevt.rc" ;; "libevt.pc") CONFIG_FILES="$CONFIG_FILES libevt.pc" ;; "libevt.spec") CONFIG_FILES="$CONFIG_FILES libevt.spec" ;; "common/config.h") CONFIG_HEADERS="$CONFIG_HEADERS common/config.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # 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. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options 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='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # 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 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm 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 # ### 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" ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: Building: 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 libfwevt support: $ac_cv_libfwevt libexe support: $ac_cv_libexe libregf support: $ac_cv_libregf libwrc support: $ac_cv_libwrc libcdirectory support: $ac_cv_libcdirectory Features: Multi-threading support: $ac_cv_libcthreads_multi_threading Wide character type support: $ac_cv_enable_wide_character_type evttools are build as static executables: $ac_cv_enable_static_executables Python (pyevt) support: $ac_cv_enable_python Python version 2 (pyevt) support: $ac_cv_enable_python2 Python version 3 (pyevt) support: $ac_cv_enable_python3 Verbose output: $ac_cv_enable_verbose_output Debug output: $ac_cv_enable_debug_output " >&5 $as_echo "$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 libfwevt support: $ac_cv_libfwevt libexe support: $ac_cv_libexe libregf support: $ac_cv_libregf libwrc support: $ac_cv_libwrc libcdirectory support: $ac_cv_libcdirectory Features: Multi-threading support: $ac_cv_libcthreads_multi_threading Wide character type support: $ac_cv_enable_wide_character_type evttools are build as static executables: $ac_cv_enable_static_executables Python (pyevt) support: $ac_cv_enable_python Python version 2 (pyevt) support: $ac_cv_enable_python2 Python version 3 (pyevt) support: $ac_cv_enable_python3 Verbose output: $ac_cv_enable_verbose_output Debug output: $ac_cv_enable_debug_output " >&6;}; libevt-20170120/libuna/0000775000175000017500000000000013040343016016601 5ustar00lordyestalordyesta00000000000000libevt-20170120/libuna/libuna_url_stream.c0000664000175000017500000003625613040331677022502 0ustar00lordyestalordyesta00000000000000/* * Percent or URL encoded stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_url_stream.h" /* Determines the size of a url stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_url_stream_size_from_byte_stream( uint8_t *byte_stream, size_t byte_stream_size, size_t *url_stream_size, libcerror_error_t **error ) { static char *function = "libuna_url_stream_size_from_byte_stream"; size_t byte_stream_index = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( url_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid url stream size.", function ); return( -1 ); } /* TODO what about end of string character */ *url_stream_size = 0; /* Check if the byte stream contains * reserved or non-allowed characters that need to be decoded */ while( byte_stream_index < byte_stream_size ) { /* A-Z is not a continous range on 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 ); } libevt-20170120/libuna/libuna_support.c0000664000175000017500000000216613040331677022032 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_support.h" #if !defined( HAVE_LOCAL_LIBUNA ) /* Returns the library version as a string */ const char *libuna_get_version( void ) { return( (const char *) LIBUNA_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_5.c0000664000175000017500000000526413040331677023662 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-5 codepage (Cyrillic) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_5.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-5 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_5_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f }; /* Unicode to ASCII character lookup table for ISO 8859-5 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_5_unicode_to_byte_stream_base_0x0400[ 96 ] = { 0x1a, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0x1a, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x1a, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a, 0xfe, 0xff }; libevt-20170120/libuna/libuna_codepage_iso_8859_2.c0000664000175000017500000000703413040331677023654 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-2 codepage (Central European) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_2.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-2 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_2_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7, 0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b, 0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7, 0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c, 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e, 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df, 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f, 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9 }; /* Unicode to ASCII character lookup table for ISO 8859-2 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x00a0[ 128 ] = { 0xa0, 0x1a, 0x1a, 0x1a, 0xa4, 0x1a, 0x1a, 0xa7, 0xa8, 0x1a, 0x1a, 0x1a, 0x1a, 0xad, 0x1a, 0x1a, 0xb0, 0x1a, 0x1a, 0x1a, 0xb4, 0x1a, 0x1a, 0x1a, 0xb8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc1, 0xc2, 0x1a, 0xc4, 0x1a, 0x1a, 0xc7, 0x1a, 0xc9, 0x1a, 0xcb, 0x1a, 0xcd, 0xce, 0x1a, 0x1a, 0x1a, 0x1a, 0xd3, 0xd4, 0x1a, 0xd6, 0xd7, 0x1a, 0x1a, 0xda, 0x1a, 0xdc, 0xdd, 0x1a, 0xdf, 0x1a, 0xe1, 0xe2, 0x1a, 0xe4, 0x1a, 0x1a, 0xe7, 0x1a, 0xe9, 0x1a, 0xeb, 0x1a, 0xed, 0xee, 0x1a, 0x1a, 0x1a, 0x1a, 0xf3, 0xf4, 0x1a, 0xf6, 0xf7, 0x1a, 0x1a, 0xfa, 0x1a, 0xfc, 0xfd, 0x1a, 0x1a, 0x1a, 0x1a, 0xc3, 0xe3, 0xa1, 0xb1, 0xc6, 0xe6, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0xcf, 0xef, 0xd0, 0xf0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xca, 0xea, 0xcc, 0xec, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x0138[ 72 ] = { 0x1a, 0xc5, 0xe5, 0x1a, 0x1a, 0xa5, 0xb5, 0x1a, 0x1a, 0xa3, 0xb3, 0xd1, 0xf1, 0x1a, 0x1a, 0xd2, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd5, 0xf5, 0x1a, 0x1a, 0xc0, 0xe0, 0x1a, 0x1a, 0xd8, 0xf8, 0xa6, 0xb6, 0x1a, 0x1a, 0xaa, 0xba, 0xa9, 0xb9, 0xde, 0xfe, 0xab, 0xbb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd9, 0xf9, 0xdb, 0xfb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xac, 0xbc, 0xaf, 0xbf, 0xae, 0xbe, 0x1a }; const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x02d8[ 8 ] = { 0xa2, 0xff, 0x1a, 0xb2, 0x1a, 0xbd, 0x1a, 0x1a }; libevt-20170120/libuna/libuna_codepage_windows_1253.c0000664000175000017500000000656013040331677024313 0ustar00lordyestalordyesta00000000000000/* * Windows 1253 codepage (Greek) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1253.h" /* Extended ASCII to Unicode character lookup table for Windows 1253 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1253_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0xfffd, 0x2030, 0xfffd, 0x2039, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0xfffd, 0x2122, 0xfffd, 0x203a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x00a0, 0x0385, 0x0386, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0xfffd, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x2015, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x00b5, 0x00b6, 0x00b7, 0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f, 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0xfffd, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0xfffd }; /* Unicode to ASCII character lookup table for Windows 1253 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xa0, 0x1a, 0x1a, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0x1a, 0xb0, 0xb1, 0xb2, 0xb3, 0x1a, 0xb5, 0xb6, 0xb7, 0x1a, 0x1a, 0x1a, 0xbb, 0x1a, 0xbd, 0x1a, 0x1a, }; const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x0380[ 80 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xb4, 0xa1, 0xa2, 0x1a, 0xb8, 0xb9, 0xba, 0x1a, 0xbc, 0x1a, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0x1a, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x1a, }; const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0xaf, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libevt-20170120/libuna/libuna_codepage_koi8_u.h0000664000175000017500000000251013040331677023341 0ustar00lordyestalordyesta00000000000000/* * KOI8-U codepage (Ukrainian Cyrillic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_KOI8_U_H ) #define _LIBUNA_CODEPAGE_KOI8_U_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_koi8_u_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x0410[ 64 ]; extern const uint8_t libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x2550[ 32 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_KOI8_U_H ) */ libevt-20170120/libuna/libuna_codepage_windows_1252.c0000664000175000017500000000342013040331677024302 0ustar00lordyestalordyesta00000000000000/* * Windows 1252 codepage (Western European/Latin 1) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1252.h" /* Extended ASCII to Unicode character lookup table for Windows 1252 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1252_byte_stream_to_unicode_base_0x80[ 32 ] = { 0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0xfffd, 0x017d, 0xfffd, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0xfffd, 0x017e, 0x0178 }; /* Unicode to ASCII character lookup table for Windows 1252 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1252_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libevt-20170120/libuna/libuna_utf32_stream.c0000664000175000017500000004502213040331677022632 0ustar00lordyestalordyesta00000000000000/* * UTF-32 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf32_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"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream size.", function ); return( -1 ); } /* Add the byte order mark */ *utf32_stream_size = 1; while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } /* Convert the number of characters into bytes */ *utf32_stream_size *= 4; return( 1 ); } /* Copies an UTF-32 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf32_stream_copy_from_utf8( uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_stream_copy_from_utf8"; size_t utf8_string_index = 0; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf32_stream_copy_byte_order_mark( utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-32 byte order mark.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 stream bytes */ if( libuna_unicode_character_copy_to_utf32_stream( unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32 stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-32 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf32_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf32_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_stream_size_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream size.", function ); return( -1 ); } /* Add the byte order mark */ *utf32_stream_size = 1; while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } /* Convert the number of characters into bytes */ *utf32_stream_size *= 4; return( 1 ); } /* Copies an UTF-32 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf32_stream_copy_from_utf16( uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_stream_copy_from_utf16"; size_t utf16_string_index = 0; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf32_stream_copy_byte_order_mark( utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-32 byte order mark.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 stream bytes */ if( libuna_unicode_character_copy_to_utf32_stream( unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32 stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-32 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf32_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_stream_size_from_utf32"; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream size.", function ); return( -1 ); } /* Add the byte order mark * Assumes the UTF-32 string is santized */ *utf32_stream_size = 1 + utf32_string_size; /* Convert the number of characters into bytes */ *utf32_stream_size *= 4; return( 1 ); } /* Copies an UTF-32 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf32_stream_copy_from_utf32( uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_stream_copy_from_utf32"; size_t utf32_string_index = 0; size_t utf32_stream_index = 0; libuna_utf32_character_t utf32_character = 0; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf32_stream_copy_byte_order_mark( utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-32 byte order mark.", function ); return( -1 ); } /* Assumes the UTF-32 string is santized */ while( utf32_string_index < utf32_string_size ) { if( ( utf32_stream_index + 4 ) > utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 stream too small.", function ); return( -1 ); } utf32_character = utf32_string[ utf32_string_index++ ]; if( byte_order == LIBUNA_ENDIAN_BIG ) { utf32_stream[ utf32_stream_index + 2 ] = (uint8_t) ( utf32_character & 0xff ); utf32_character >>= 8; utf32_stream[ utf32_stream_index + 3 ] = (uint8_t) ( utf32_character & 0xff ); utf32_character >>= 8; utf32_stream[ utf32_stream_index + 1 ] = (uint8_t) ( utf32_character & 0xff ); utf32_character >>= 8; utf32_stream[ utf32_stream_index ] = (uint8_t) ( utf32_character & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf32_stream[ utf32_stream_index ] = (uint8_t) ( utf32_character & 0xff ); utf32_character >>= 8; utf32_stream[ utf32_stream_index + 1 ] = (uint8_t) ( utf32_character & 0xff ); utf32_character >>= 8; utf32_stream[ utf32_stream_index + 2 ] = (uint8_t) ( utf32_character & 0xff ); utf32_character >>= 8; utf32_stream[ utf32_stream_index + 3 ] = (uint8_t) ( utf32_character & 0xff ); } utf32_stream_index += 4; } return( 1 ); } libevt-20170120/libuna/libuna_codepage_windows_1257.h0000664000175000017500000000254713040331677024325 0ustar00lordyestalordyesta00000000000000/* * Windows 1257 codepage (Baltic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1257_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1257_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1257_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x00a0[ 224 ]; extern const uint8_t libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1257_H ) */ libevt-20170120/libuna/libuna_utf32_string.c0000664000175000017500000021413713040331677022652 0ustar00lordyestalordyesta00000000000000/* * UTF-32 string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf32_string.h" /* Determines the size of an UTF-32 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, int codepage, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_byte_stream"; size_t byte_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; /* Check if the byte stream is terminated with a zero byte */ if( byte_stream[ byte_stream_size - 1 ] != 0 ) { *utf32_string_size += 1; } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } /* Determine how many UTF-32 character byte double words are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-32 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_byte_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_byte_stream"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_byte_stream( utf32_string, utf32_string_size, &utf32_string_index, byte_stream, byte_stream_size, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_byte_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_byte_stream"; size_t byte_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } /* Check if the byte stream is terminated with zero bytes */ if( byte_stream[ byte_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character byte double words */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; } return( 1 ); } /* Compares an UTF-32 string with a byte stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf32_string_compare_with_byte_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_compare_with_byte_stream"; size_t byte_stream_index = 0; size_t utf32_string_index = 0; libuna_unicode_character_t utf32_unicode_character = 0; libuna_unicode_character_t byte_stream_unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_string[ utf32_string_size - 1 ] == 0 ) { utf32_string_size -= 1; } /* Check if the byte stream is terminated with zero bytes */ if( byte_stream[ byte_stream_size - 1 ] == 0 ) { byte_stream_size -= 1; } while( ( utf32_string_index < utf32_string_size ) && ( byte_stream_index < byte_stream_size ) ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &byte_stream_unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } if( utf32_unicode_character != byte_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf32_string_index != utf32_string_size ) || ( byte_stream_index != byte_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-32 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_utf7_stream( const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf7_stream"; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; /* Check if the UTF-7 stream is terminated with a zero byte */ if( utf7_stream[ utf7_stream_size - 1 ] != 0 ) { *utf32_string_size += 1; } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-32 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_utf7_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_utf7_stream"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_utf7_stream( utf32_string, utf32_string_size, &utf32_string_index, utf7_stream, utf7_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to UTF-7 stream to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_utf7_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf7_stream"; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; uint8_t zero_byte = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } /* Check if the UTF-7 stream is terminated with zero bytes */ if( utf7_stream[ utf7_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character bytes */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; } return( 1 ); } /* Compares an UTF-32 string with an UTF-7 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf32_string_compare_with_utf7_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_compare_with_utf7_stream"; size_t utf32_string_index = 0; size_t utf7_stream_index = 0; libuna_unicode_character_t utf32_unicode_character = 0; libuna_unicode_character_t utf7_stream_unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } if( utf32_string[ utf32_string_size - 1 ] == 0 ) { utf32_string_size -= 1; } /* Check if the UTF-7 stream is terminated with zero bytes */ if( utf7_stream[ utf7_stream_size - 1 ] == 0 ) { utf7_stream_size -= 1; } while( ( utf32_string_index < utf32_string_size ) && ( utf7_stream_index < utf7_stream_size ) ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the UTF-7 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &utf7_stream_unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } if( utf32_unicode_character != utf7_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf32_string_index != utf32_string_size ) || ( utf7_stream_index != utf7_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-32 string from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-32 string from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_utf8( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_utf8"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_utf8( utf32_string, utf32_string_size, &utf32_string_index, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_utf8( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character bytes */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-32 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_utf8_stream( const uint8_t *utf8_stream, size_t utf8_stream_size, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf8_stream"; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } /* Check if the UTF-8 stream is terminated with a zero byte */ if( utf8_stream[ utf8_stream_size - 1 ] != 0 ) { *utf32_string_size += 1; } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-32 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_utf8_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_utf8_stream"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_utf8_stream( utf32_string, utf32_string_size, &utf32_string_index, utf8_stream, utf8_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to UTF-8 stream to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_utf8_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf8_stream"; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } /* Check if the UTF-8 stream is terminated with zero bytes */ if( utf8_stream[ utf8_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character bytes */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; } return( 1 ); } /* Compares an UTF-32 string with an UTF-8 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf32_string_compare_with_utf8_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_compare_with_utf8_stream"; size_t utf32_string_index = 0; size_t utf8_stream_index = 0; libuna_unicode_character_t utf32_unicode_character = 0; libuna_unicode_character_t utf8_stream_unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } if( utf32_string[ utf32_string_size - 1 ] == 0 ) { utf32_string_size -= 1; } /* Check if the UTF-8 stream is terminated with zero bytes */ if( utf8_stream[ utf8_stream_size - 1 ] == 0 ) { utf8_stream_size -= 1; } while( ( utf32_string_index < utf32_string_size ) && ( utf8_stream_index < utf8_stream_size ) ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_stream_unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } if( utf32_unicode_character != utf8_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf32_string_index != utf32_string_size ) || ( utf8_stream_index != utf8_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-32 string from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-32 string from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_utf16( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_utf16"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_utf16( utf32_string, utf32_string_size, &utf32_string_index, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_utf16( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character bytes */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-32 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_utf16_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf16_stream"; size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; int read_byte_order = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0x0ff ) && ( utf16_stream[ 1 ] == 0x0fe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0x0fe ) && ( utf16_stream[ 1 ] == 0x0ff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] != 0 ) || ( utf16_stream[ utf16_stream_size - 1 ] != 0 ) ) { *utf32_string_size += 1; } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } if( utf16_stream_index != utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_utf16_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_utf16_stream"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_utf16_stream( utf32_string, utf32_string_size, &utf32_string_index, utf16_stream, utf16_stream_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_utf16_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf16_stream"; size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; int read_byte_order = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0x0ff ) && ( utf16_stream[ 1 ] == 0x0fe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0x0fe ) && ( utf16_stream[ 1 ] == 0x0ff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] != 0 ) || ( utf16_stream[ utf16_stream_size - 1 ] != 0 ) ) { zero_byte = 1; } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character bytes */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } if( utf16_stream_index != utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } if( zero_byte != 0 ) { if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; } return( 1 ); } /* Compares an UTF-32 string with an UTF-16 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf32_string_compare_with_utf16_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_compare_with_utf16_stream"; size_t utf16_stream_index = 0; size_t utf32_string_index = 0; libuna_unicode_character_t utf32_unicode_character = 0; libuna_unicode_character_t utf16_stream_unicode_character = 0; int read_byte_order = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0xfe ) && ( utf16_stream[ 1 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0xff ) && ( utf16_stream[ 1 ] == 0xfe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf32_string[ utf32_string_size - 1 ] == 0 ) { utf32_string_size -= 1; } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] == 0 ) && ( utf16_stream[ utf16_stream_size - 1 ] == 0 ) ) { utf16_stream_size -= 2; } while( ( utf32_string_index < utf32_string_size ) && ( utf16_stream_index < utf16_stream_size ) ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &utf16_stream_unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } if( utf32_unicode_character != utf16_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf32_string_index != utf32_string_size ) || ( utf16_stream_index != utf16_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-32 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_utf32_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf32_stream"; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; int read_byte_order = 0; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 3 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 2 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 1 ] != 0 ) ) { *utf32_string_size += 1; } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } if( utf32_stream_index != utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_utf32_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_utf32_stream"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_utf32_stream( utf32_string, utf32_string_size, &utf32_string_index, utf32_stream, utf32_stream_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_utf32_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf32_stream"; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; int read_byte_order = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 3 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 2 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 1 ] != 0 ) ) { zero_byte = 1; } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character bytes */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } if( utf32_stream_index != utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } if( zero_byte != 0 ) { if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; } return( 1 ); } /* Compares an UTF-32 string with an UTF-32 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf32_string_compare_with_utf32_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_compare_with_utf32_stream"; size_t utf32_stream_index = 0; size_t utf32_string_index = 0; libuna_unicode_character_t utf32_unicode_character = 0; libuna_unicode_character_t utf32_stream_unicode_character = 0; int read_byte_order = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf32_string[ utf32_string_size - 1 ] == 0 ) { utf32_string_size -= 1; } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 3 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 2 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 1 ] == 0 ) ) { utf32_stream_size -= 1; } while( ( utf32_string_index < utf32_string_size ) && ( utf32_stream_index < utf32_stream_size ) ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &utf32_stream_unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } if( utf32_unicode_character != utf32_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf32_string_index != utf32_string_size ) || ( utf32_stream_index != utf32_stream_size ) ) { return( 0 ); } return( 1 ); } libevt-20170120/libuna/libuna_codepage_windows_874.c0000664000175000017500000000610613040331677024237 0ustar00lordyestalordyesta00000000000000/* * Windows 874 codepage (Thai) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_874.h" /* Extended ASCII to Unicode character lookup table for Windows 874 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_874_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2026, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, 0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, 0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, 0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, 0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, 0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f, 0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, 0x0e38, 0x0e39, 0x0e3a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x0e3f, 0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f, 0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, 0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; /* Unicode to ASCII character lookup table for Windows 874 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_874_unicode_to_byte_stream_base_0x0e00[ 96 ] = { 0x1a, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0x1a, 0x1a, 0x1a, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_874_unicode_to_byte_stream_base_0x2018[ 8 ] = { 0x91, 0x92, 0x1a, 0x1a, 0x93, 0x94, 0x1a, 0x1a }; libevt-20170120/libuna/libuna_codepage_windows_1251.h0000664000175000017500000000270413040331677024312 0ustar00lordyestalordyesta00000000000000/* * Windows 1251 codepage (Cyrillic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1251_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1251_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1251_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x00a0[ 32 ]; extern const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x0400[ 96 ]; extern const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1251_H ) */ libevt-20170120/libuna/libuna_libcerror.h0000664000175000017500000000263313040331677022305 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_LIBCERROR_H ) #define _LIBUNA_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBUNA_LIBCERROR_H ) */ libevt-20170120/libuna/libuna_codepage_windows_949.c0000664000175000017500000166253413040331677024260 0ustar00lordyestalordyesta00000000000000/* * Windows 949 codepage (Korean) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_949.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for Windows 949 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8140[ 192 ] = { 0xfffd, 0xac02, 0xac03, 0xac05, 0xac06, 0xac0b, 0xac0c, 0xac0d, 0xac0e, 0xac0f, 0xac18, 0xac1e, 0xac1f, 0xac21, 0xac22, 0xac23, 0xac25, 0xac26, 0xac27, 0xac28, 0xac29, 0xac2a, 0xac2b, 0xac2e, 0xac32, 0xac33, 0xac34, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xac35, 0xac36, 0xac37, 0xac3a, 0xac3b, 0xac3d, 0xac3e, 0xac3f, 0xac41, 0xac42, 0xac43, 0xac44, 0xac45, 0xac46, 0xac47, 0xac48, 0xac49, 0xac4a, 0xac4c, 0xac4e, 0xac4f, 0xac50, 0xac51, 0xac52, 0xac53, 0xac55, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xac56, 0xac57, 0xac59, 0xac5a, 0xac5b, 0xac5d, 0xac5e, 0xac5f, 0xac60, 0xac61, 0xac62, 0xac63, 0xac64, 0xac65, 0xac66, 0xac67, 0xac68, 0xac69, 0xac6a, 0xac6b, 0xac6c, 0xac6d, 0xac6e, 0xac6f, 0xac72, 0xac73, 0xac75, 0xac76, 0xac79, 0xac7b, 0xac7c, 0xac7d, 0xac7e, 0xac7f, 0xac82, 0xac87, 0xac88, 0xac8d, 0xac8e, 0xac8f, 0xac91, 0xac92, 0xac93, 0xac95, 0xac96, 0xac97, 0xac98, 0xac99, 0xac9a, 0xac9b, 0xac9e, 0xaca2, 0xaca3, 0xaca4, 0xaca5, 0xaca6, 0xaca7, 0xacab, 0xacad, 0xacae, 0xacb1, 0xacb2, 0xacb3, 0xacb4, 0xacb5, 0xacb6, 0xacb7, 0xacba, 0xacbe, 0xacbf, 0xacc0, 0xacc2, 0xacc3, 0xacc5, 0xacc6, 0xacc7, 0xacc9, 0xacca, 0xaccb, 0xaccd, 0xacce, 0xaccf, 0xacd0, 0xacd1, 0xacd2, 0xacd3, 0xacd4, 0xacd6, 0xacd8, 0xacd9, 0xacda, 0xacdb, 0xacdc, 0xacdd, 0xacde, 0xacdf, 0xace2, 0xace3, 0xace5, 0xace6, 0xace9, 0xaceb, 0xaced, 0xacee, 0xacf2, 0xacf4, 0xacf7, 0xacf8, 0xacf9, 0xacfa, 0xacfb, 0xacfe, 0xacff, 0xad01, 0xad02, 0xad03, 0xad05, 0xad07, 0xad08, 0xad09, 0xad0a, 0xad0b, 0xad0e, 0xad10, 0xad12, 0xad13, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8240[ 192 ] = { 0xfffd, 0xad14, 0xad15, 0xad16, 0xad17, 0xad19, 0xad1a, 0xad1b, 0xad1d, 0xad1e, 0xad1f, 0xad21, 0xad22, 0xad23, 0xad24, 0xad25, 0xad26, 0xad27, 0xad28, 0xad2a, 0xad2b, 0xad2e, 0xad2f, 0xad30, 0xad31, 0xad32, 0xad33, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xad36, 0xad37, 0xad39, 0xad3a, 0xad3b, 0xad3d, 0xad3e, 0xad3f, 0xad40, 0xad41, 0xad42, 0xad43, 0xad46, 0xad48, 0xad4a, 0xad4b, 0xad4c, 0xad4d, 0xad4e, 0xad4f, 0xad51, 0xad52, 0xad53, 0xad55, 0xad56, 0xad57, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xad59, 0xad5a, 0xad5b, 0xad5c, 0xad5d, 0xad5e, 0xad5f, 0xad60, 0xad62, 0xad64, 0xad65, 0xad66, 0xad67, 0xad68, 0xad69, 0xad6a, 0xad6b, 0xad6e, 0xad6f, 0xad71, 0xad72, 0xad77, 0xad78, 0xad79, 0xad7a, 0xad7e, 0xad80, 0xad83, 0xad84, 0xad85, 0xad86, 0xad87, 0xad8a, 0xad8b, 0xad8d, 0xad8e, 0xad8f, 0xad91, 0xad92, 0xad93, 0xad94, 0xad95, 0xad96, 0xad97, 0xad98, 0xad99, 0xad9a, 0xad9b, 0xad9e, 0xad9f, 0xada0, 0xada1, 0xada2, 0xada3, 0xada5, 0xada6, 0xada7, 0xada8, 0xada9, 0xadaa, 0xadab, 0xadac, 0xadad, 0xadae, 0xadaf, 0xadb0, 0xadb1, 0xadb2, 0xadb3, 0xadb4, 0xadb5, 0xadb6, 0xadb8, 0xadb9, 0xadba, 0xadbb, 0xadbc, 0xadbd, 0xadbe, 0xadbf, 0xadc2, 0xadc3, 0xadc5, 0xadc6, 0xadc7, 0xadc9, 0xadca, 0xadcb, 0xadcc, 0xadcd, 0xadce, 0xadcf, 0xadd2, 0xadd4, 0xadd5, 0xadd6, 0xadd7, 0xadd8, 0xadd9, 0xadda, 0xaddb, 0xaddd, 0xadde, 0xaddf, 0xade1, 0xade2, 0xade3, 0xade5, 0xade6, 0xade7, 0xade8, 0xade9, 0xadea, 0xadeb, 0xadec, 0xaded, 0xadee, 0xadef, 0xadf0, 0xadf1, 0xadf2, 0xadf3, 0xadf4, 0xadf5, 0xadf6, 0xadf7, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8340[ 192 ] = { 0xfffd, 0xadfa, 0xadfb, 0xadfd, 0xadfe, 0xae02, 0xae03, 0xae04, 0xae05, 0xae06, 0xae07, 0xae0a, 0xae0c, 0xae0e, 0xae0f, 0xae10, 0xae11, 0xae12, 0xae13, 0xae15, 0xae16, 0xae17, 0xae18, 0xae19, 0xae1a, 0xae1b, 0xae1c, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xae1d, 0xae1e, 0xae1f, 0xae20, 0xae21, 0xae22, 0xae23, 0xae24, 0xae25, 0xae26, 0xae27, 0xae28, 0xae29, 0xae2a, 0xae2b, 0xae2c, 0xae2d, 0xae2e, 0xae2f, 0xae32, 0xae33, 0xae35, 0xae36, 0xae39, 0xae3b, 0xae3c, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xae3d, 0xae3e, 0xae3f, 0xae42, 0xae44, 0xae47, 0xae48, 0xae49, 0xae4b, 0xae4f, 0xae51, 0xae52, 0xae53, 0xae55, 0xae57, 0xae58, 0xae59, 0xae5a, 0xae5b, 0xae5e, 0xae62, 0xae63, 0xae64, 0xae66, 0xae67, 0xae6a, 0xae6b, 0xae6d, 0xae6e, 0xae6f, 0xae71, 0xae72, 0xae73, 0xae74, 0xae75, 0xae76, 0xae77, 0xae7a, 0xae7e, 0xae7f, 0xae80, 0xae81, 0xae82, 0xae83, 0xae86, 0xae87, 0xae88, 0xae89, 0xae8a, 0xae8b, 0xae8d, 0xae8e, 0xae8f, 0xae90, 0xae91, 0xae92, 0xae93, 0xae94, 0xae95, 0xae96, 0xae97, 0xae98, 0xae99, 0xae9a, 0xae9b, 0xae9c, 0xae9d, 0xae9e, 0xae9f, 0xaea0, 0xaea1, 0xaea2, 0xaea3, 0xaea4, 0xaea5, 0xaea6, 0xaea7, 0xaea8, 0xaea9, 0xaeaa, 0xaeab, 0xaeac, 0xaead, 0xaeae, 0xaeaf, 0xaeb0, 0xaeb1, 0xaeb2, 0xaeb3, 0xaeb4, 0xaeb5, 0xaeb6, 0xaeb7, 0xaeb8, 0xaeb9, 0xaeba, 0xaebb, 0xaebf, 0xaec1, 0xaec2, 0xaec3, 0xaec5, 0xaec6, 0xaec7, 0xaec8, 0xaec9, 0xaeca, 0xaecb, 0xaece, 0xaed2, 0xaed3, 0xaed4, 0xaed5, 0xaed6, 0xaed7, 0xaeda, 0xaedb, 0xaedd, 0xaede, 0xaedf, 0xaee0, 0xaee1, 0xaee2, 0xaee3, 0xaee4, 0xaee5, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8440[ 192 ] = { 0xfffd, 0xaee6, 0xaee7, 0xaee9, 0xaeea, 0xaeec, 0xaeee, 0xaeef, 0xaef0, 0xaef1, 0xaef2, 0xaef3, 0xaef5, 0xaef6, 0xaef7, 0xaef9, 0xaefa, 0xaefb, 0xaefd, 0xaefe, 0xaeff, 0xaf00, 0xaf01, 0xaf02, 0xaf03, 0xaf04, 0xaf05, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xaf06, 0xaf09, 0xaf0a, 0xaf0b, 0xaf0c, 0xaf0e, 0xaf0f, 0xaf11, 0xaf12, 0xaf13, 0xaf14, 0xaf15, 0xaf16, 0xaf17, 0xaf18, 0xaf19, 0xaf1a, 0xaf1b, 0xaf1c, 0xaf1d, 0xaf1e, 0xaf1f, 0xaf20, 0xaf21, 0xaf22, 0xaf23, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xaf24, 0xaf25, 0xaf26, 0xaf27, 0xaf28, 0xaf29, 0xaf2a, 0xaf2b, 0xaf2e, 0xaf2f, 0xaf31, 0xaf33, 0xaf35, 0xaf36, 0xaf37, 0xaf38, 0xaf39, 0xaf3a, 0xaf3b, 0xaf3e, 0xaf40, 0xaf44, 0xaf45, 0xaf46, 0xaf47, 0xaf4a, 0xaf4b, 0xaf4c, 0xaf4d, 0xaf4e, 0xaf4f, 0xaf51, 0xaf52, 0xaf53, 0xaf54, 0xaf55, 0xaf56, 0xaf57, 0xaf58, 0xaf59, 0xaf5a, 0xaf5b, 0xaf5e, 0xaf5f, 0xaf60, 0xaf61, 0xaf62, 0xaf63, 0xaf66, 0xaf67, 0xaf68, 0xaf69, 0xaf6a, 0xaf6b, 0xaf6c, 0xaf6d, 0xaf6e, 0xaf6f, 0xaf70, 0xaf71, 0xaf72, 0xaf73, 0xaf74, 0xaf75, 0xaf76, 0xaf77, 0xaf78, 0xaf7a, 0xaf7b, 0xaf7c, 0xaf7d, 0xaf7e, 0xaf7f, 0xaf81, 0xaf82, 0xaf83, 0xaf85, 0xaf86, 0xaf87, 0xaf89, 0xaf8a, 0xaf8b, 0xaf8c, 0xaf8d, 0xaf8e, 0xaf8f, 0xaf92, 0xaf93, 0xaf94, 0xaf96, 0xaf97, 0xaf98, 0xaf99, 0xaf9a, 0xaf9b, 0xaf9d, 0xaf9e, 0xaf9f, 0xafa0, 0xafa1, 0xafa2, 0xafa3, 0xafa4, 0xafa5, 0xafa6, 0xafa7, 0xafa8, 0xafa9, 0xafaa, 0xafab, 0xafac, 0xafad, 0xafae, 0xafaf, 0xafb0, 0xafb1, 0xafb2, 0xafb3, 0xafb4, 0xafb5, 0xafb6, 0xafb7, 0xafba, 0xafbb, 0xafbd, 0xafbe, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8540[ 192 ] = { 0xfffd, 0xafbf, 0xafc1, 0xafc2, 0xafc3, 0xafc4, 0xafc5, 0xafc6, 0xafca, 0xafcc, 0xafcf, 0xafd0, 0xafd1, 0xafd2, 0xafd3, 0xafd5, 0xafd6, 0xafd7, 0xafd8, 0xafd9, 0xafda, 0xafdb, 0xafdd, 0xafde, 0xafdf, 0xafe0, 0xafe1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xafe2, 0xafe3, 0xafe4, 0xafe5, 0xafe6, 0xafe7, 0xafea, 0xafeb, 0xafec, 0xafed, 0xafee, 0xafef, 0xaff2, 0xaff3, 0xaff5, 0xaff6, 0xaff7, 0xaff9, 0xaffa, 0xaffb, 0xaffc, 0xaffd, 0xaffe, 0xafff, 0xb002, 0xb003, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb005, 0xb006, 0xb007, 0xb008, 0xb009, 0xb00a, 0xb00b, 0xb00d, 0xb00e, 0xb00f, 0xb011, 0xb012, 0xb013, 0xb015, 0xb016, 0xb017, 0xb018, 0xb019, 0xb01a, 0xb01b, 0xb01e, 0xb01f, 0xb020, 0xb021, 0xb022, 0xb023, 0xb024, 0xb025, 0xb026, 0xb027, 0xb029, 0xb02a, 0xb02b, 0xb02c, 0xb02d, 0xb02e, 0xb02f, 0xb030, 0xb031, 0xb032, 0xb033, 0xb034, 0xb035, 0xb036, 0xb037, 0xb038, 0xb039, 0xb03a, 0xb03b, 0xb03c, 0xb03d, 0xb03e, 0xb03f, 0xb040, 0xb041, 0xb042, 0xb043, 0xb046, 0xb047, 0xb049, 0xb04b, 0xb04d, 0xb04f, 0xb050, 0xb051, 0xb052, 0xb056, 0xb058, 0xb05a, 0xb05b, 0xb05c, 0xb05e, 0xb05f, 0xb060, 0xb061, 0xb062, 0xb063, 0xb064, 0xb065, 0xb066, 0xb067, 0xb068, 0xb069, 0xb06a, 0xb06b, 0xb06c, 0xb06d, 0xb06e, 0xb06f, 0xb070, 0xb071, 0xb072, 0xb073, 0xb074, 0xb075, 0xb076, 0xb077, 0xb078, 0xb079, 0xb07a, 0xb07b, 0xb07e, 0xb07f, 0xb081, 0xb082, 0xb083, 0xb085, 0xb086, 0xb087, 0xb088, 0xb089, 0xb08a, 0xb08b, 0xb08e, 0xb090, 0xb092, 0xb093, 0xb094, 0xb095, 0xb096, 0xb097, 0xb09b, 0xb09d, 0xb09e, 0xb0a3, 0xb0a4, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8640[ 192 ] = { 0xfffd, 0xb0a5, 0xb0a6, 0xb0a7, 0xb0aa, 0xb0b0, 0xb0b2, 0xb0b6, 0xb0b7, 0xb0b9, 0xb0ba, 0xb0bb, 0xb0bd, 0xb0be, 0xb0bf, 0xb0c0, 0xb0c1, 0xb0c2, 0xb0c3, 0xb0c6, 0xb0ca, 0xb0cb, 0xb0cc, 0xb0cd, 0xb0ce, 0xb0cf, 0xb0d2, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb0d3, 0xb0d5, 0xb0d6, 0xb0d7, 0xb0d9, 0xb0da, 0xb0db, 0xb0dc, 0xb0dd, 0xb0de, 0xb0df, 0xb0e1, 0xb0e2, 0xb0e3, 0xb0e4, 0xb0e6, 0xb0e7, 0xb0e8, 0xb0e9, 0xb0ea, 0xb0eb, 0xb0ec, 0xb0ed, 0xb0ee, 0xb0ef, 0xb0f0, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb0f1, 0xb0f2, 0xb0f3, 0xb0f4, 0xb0f5, 0xb0f6, 0xb0f7, 0xb0f8, 0xb0f9, 0xb0fa, 0xb0fb, 0xb0fc, 0xb0fd, 0xb0fe, 0xb0ff, 0xb100, 0xb101, 0xb102, 0xb103, 0xb104, 0xb105, 0xb106, 0xb107, 0xb10a, 0xb10d, 0xb10e, 0xb10f, 0xb111, 0xb114, 0xb115, 0xb116, 0xb117, 0xb11a, 0xb11e, 0xb11f, 0xb120, 0xb121, 0xb122, 0xb126, 0xb127, 0xb129, 0xb12a, 0xb12b, 0xb12d, 0xb12e, 0xb12f, 0xb130, 0xb131, 0xb132, 0xb133, 0xb136, 0xb13a, 0xb13b, 0xb13c, 0xb13d, 0xb13e, 0xb13f, 0xb142, 0xb143, 0xb145, 0xb146, 0xb147, 0xb149, 0xb14a, 0xb14b, 0xb14c, 0xb14d, 0xb14e, 0xb14f, 0xb152, 0xb153, 0xb156, 0xb157, 0xb159, 0xb15a, 0xb15b, 0xb15d, 0xb15e, 0xb15f, 0xb161, 0xb162, 0xb163, 0xb164, 0xb165, 0xb166, 0xb167, 0xb168, 0xb169, 0xb16a, 0xb16b, 0xb16c, 0xb16d, 0xb16e, 0xb16f, 0xb170, 0xb171, 0xb172, 0xb173, 0xb174, 0xb175, 0xb176, 0xb177, 0xb17a, 0xb17b, 0xb17d, 0xb17e, 0xb17f, 0xb181, 0xb183, 0xb184, 0xb185, 0xb186, 0xb187, 0xb18a, 0xb18c, 0xb18e, 0xb18f, 0xb190, 0xb191, 0xb195, 0xb196, 0xb197, 0xb199, 0xb19a, 0xb19b, 0xb19d, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8740[ 192 ] = { 0xfffd, 0xb19e, 0xb19f, 0xb1a0, 0xb1a1, 0xb1a2, 0xb1a3, 0xb1a4, 0xb1a5, 0xb1a6, 0xb1a7, 0xb1a9, 0xb1aa, 0xb1ab, 0xb1ac, 0xb1ad, 0xb1ae, 0xb1af, 0xb1b0, 0xb1b1, 0xb1b2, 0xb1b3, 0xb1b4, 0xb1b5, 0xb1b6, 0xb1b7, 0xb1b8, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb1b9, 0xb1ba, 0xb1bb, 0xb1bc, 0xb1bd, 0xb1be, 0xb1bf, 0xb1c0, 0xb1c1, 0xb1c2, 0xb1c3, 0xb1c4, 0xb1c5, 0xb1c6, 0xb1c7, 0xb1c8, 0xb1c9, 0xb1ca, 0xb1cb, 0xb1cd, 0xb1ce, 0xb1cf, 0xb1d1, 0xb1d2, 0xb1d3, 0xb1d5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb1d6, 0xb1d7, 0xb1d8, 0xb1d9, 0xb1da, 0xb1db, 0xb1de, 0xb1e0, 0xb1e1, 0xb1e2, 0xb1e3, 0xb1e4, 0xb1e5, 0xb1e6, 0xb1e7, 0xb1ea, 0xb1eb, 0xb1ed, 0xb1ee, 0xb1ef, 0xb1f1, 0xb1f2, 0xb1f3, 0xb1f4, 0xb1f5, 0xb1f6, 0xb1f7, 0xb1f8, 0xb1fa, 0xb1fc, 0xb1fe, 0xb1ff, 0xb200, 0xb201, 0xb202, 0xb203, 0xb206, 0xb207, 0xb209, 0xb20a, 0xb20d, 0xb20e, 0xb20f, 0xb210, 0xb211, 0xb212, 0xb213, 0xb216, 0xb218, 0xb21a, 0xb21b, 0xb21c, 0xb21d, 0xb21e, 0xb21f, 0xb221, 0xb222, 0xb223, 0xb224, 0xb225, 0xb226, 0xb227, 0xb228, 0xb229, 0xb22a, 0xb22b, 0xb22c, 0xb22d, 0xb22e, 0xb22f, 0xb230, 0xb231, 0xb232, 0xb233, 0xb235, 0xb236, 0xb237, 0xb238, 0xb239, 0xb23a, 0xb23b, 0xb23d, 0xb23e, 0xb23f, 0xb240, 0xb241, 0xb242, 0xb243, 0xb244, 0xb245, 0xb246, 0xb247, 0xb248, 0xb249, 0xb24a, 0xb24b, 0xb24c, 0xb24d, 0xb24e, 0xb24f, 0xb250, 0xb251, 0xb252, 0xb253, 0xb254, 0xb255, 0xb256, 0xb257, 0xb259, 0xb25a, 0xb25b, 0xb25d, 0xb25e, 0xb25f, 0xb261, 0xb262, 0xb263, 0xb264, 0xb265, 0xb266, 0xb267, 0xb26a, 0xb26b, 0xb26c, 0xb26d, 0xb26e, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8840[ 192 ] = { 0xfffd, 0xb26f, 0xb270, 0xb271, 0xb272, 0xb273, 0xb276, 0xb277, 0xb278, 0xb279, 0xb27a, 0xb27b, 0xb27d, 0xb27e, 0xb27f, 0xb280, 0xb281, 0xb282, 0xb283, 0xb286, 0xb287, 0xb288, 0xb28a, 0xb28b, 0xb28c, 0xb28d, 0xb28e, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb28f, 0xb292, 0xb293, 0xb295, 0xb296, 0xb297, 0xb29b, 0xb29c, 0xb29d, 0xb29e, 0xb29f, 0xb2a2, 0xb2a4, 0xb2a7, 0xb2a8, 0xb2a9, 0xb2ab, 0xb2ad, 0xb2ae, 0xb2af, 0xb2b1, 0xb2b2, 0xb2b3, 0xb2b5, 0xb2b6, 0xb2b7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb2b8, 0xb2b9, 0xb2ba, 0xb2bb, 0xb2bc, 0xb2bd, 0xb2be, 0xb2bf, 0xb2c0, 0xb2c1, 0xb2c2, 0xb2c3, 0xb2c4, 0xb2c5, 0xb2c6, 0xb2c7, 0xb2ca, 0xb2cb, 0xb2cd, 0xb2ce, 0xb2cf, 0xb2d1, 0xb2d3, 0xb2d4, 0xb2d5, 0xb2d6, 0xb2d7, 0xb2da, 0xb2dc, 0xb2de, 0xb2df, 0xb2e0, 0xb2e1, 0xb2e3, 0xb2e7, 0xb2e9, 0xb2ea, 0xb2f0, 0xb2f1, 0xb2f2, 0xb2f6, 0xb2fc, 0xb2fd, 0xb2fe, 0xb302, 0xb303, 0xb305, 0xb306, 0xb307, 0xb309, 0xb30a, 0xb30b, 0xb30c, 0xb30d, 0xb30e, 0xb30f, 0xb312, 0xb316, 0xb317, 0xb318, 0xb319, 0xb31a, 0xb31b, 0xb31d, 0xb31e, 0xb31f, 0xb320, 0xb321, 0xb322, 0xb323, 0xb324, 0xb325, 0xb326, 0xb327, 0xb328, 0xb329, 0xb32a, 0xb32b, 0xb32c, 0xb32d, 0xb32e, 0xb32f, 0xb330, 0xb331, 0xb332, 0xb333, 0xb334, 0xb335, 0xb336, 0xb337, 0xb338, 0xb339, 0xb33a, 0xb33b, 0xb33c, 0xb33d, 0xb33e, 0xb33f, 0xb340, 0xb341, 0xb342, 0xb343, 0xb344, 0xb345, 0xb346, 0xb347, 0xb348, 0xb349, 0xb34a, 0xb34b, 0xb34c, 0xb34d, 0xb34e, 0xb34f, 0xb350, 0xb351, 0xb352, 0xb353, 0xb357, 0xb359, 0xb35a, 0xb35d, 0xb360, 0xb361, 0xb362, 0xb363, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8940[ 192 ] = { 0xfffd, 0xb366, 0xb368, 0xb36a, 0xb36c, 0xb36d, 0xb36f, 0xb372, 0xb373, 0xb375, 0xb376, 0xb377, 0xb379, 0xb37a, 0xb37b, 0xb37c, 0xb37d, 0xb37e, 0xb37f, 0xb382, 0xb386, 0xb387, 0xb388, 0xb389, 0xb38a, 0xb38b, 0xb38d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb38e, 0xb38f, 0xb391, 0xb392, 0xb393, 0xb395, 0xb396, 0xb397, 0xb398, 0xb399, 0xb39a, 0xb39b, 0xb39c, 0xb39d, 0xb39e, 0xb39f, 0xb3a2, 0xb3a3, 0xb3a4, 0xb3a5, 0xb3a6, 0xb3a7, 0xb3a9, 0xb3aa, 0xb3ab, 0xb3ad, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb3ae, 0xb3af, 0xb3b0, 0xb3b1, 0xb3b2, 0xb3b3, 0xb3b4, 0xb3b5, 0xb3b6, 0xb3b7, 0xb3b8, 0xb3b9, 0xb3ba, 0xb3bb, 0xb3bc, 0xb3bd, 0xb3be, 0xb3bf, 0xb3c0, 0xb3c1, 0xb3c2, 0xb3c3, 0xb3c6, 0xb3c7, 0xb3c9, 0xb3ca, 0xb3cd, 0xb3cf, 0xb3d1, 0xb3d2, 0xb3d3, 0xb3d6, 0xb3d8, 0xb3da, 0xb3dc, 0xb3de, 0xb3df, 0xb3e1, 0xb3e2, 0xb3e3, 0xb3e5, 0xb3e6, 0xb3e7, 0xb3e9, 0xb3ea, 0xb3eb, 0xb3ec, 0xb3ed, 0xb3ee, 0xb3ef, 0xb3f0, 0xb3f1, 0xb3f2, 0xb3f3, 0xb3f4, 0xb3f5, 0xb3f6, 0xb3f7, 0xb3f8, 0xb3f9, 0xb3fa, 0xb3fb, 0xb3fd, 0xb3fe, 0xb3ff, 0xb400, 0xb401, 0xb402, 0xb403, 0xb404, 0xb405, 0xb406, 0xb407, 0xb408, 0xb409, 0xb40a, 0xb40b, 0xb40c, 0xb40d, 0xb40e, 0xb40f, 0xb411, 0xb412, 0xb413, 0xb414, 0xb415, 0xb416, 0xb417, 0xb419, 0xb41a, 0xb41b, 0xb41d, 0xb41e, 0xb41f, 0xb421, 0xb422, 0xb423, 0xb424, 0xb425, 0xb426, 0xb427, 0xb42a, 0xb42c, 0xb42d, 0xb42e, 0xb42f, 0xb430, 0xb431, 0xb432, 0xb433, 0xb435, 0xb436, 0xb437, 0xb438, 0xb439, 0xb43a, 0xb43b, 0xb43c, 0xb43d, 0xb43e, 0xb43f, 0xb440, 0xb441, 0xb442, 0xb443, 0xb444, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8a40[ 192 ] = { 0xfffd, 0xb445, 0xb446, 0xb447, 0xb448, 0xb449, 0xb44a, 0xb44b, 0xb44c, 0xb44d, 0xb44e, 0xb44f, 0xb452, 0xb453, 0xb455, 0xb456, 0xb457, 0xb459, 0xb45a, 0xb45b, 0xb45c, 0xb45d, 0xb45e, 0xb45f, 0xb462, 0xb464, 0xb466, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb467, 0xb468, 0xb469, 0xb46a, 0xb46b, 0xb46d, 0xb46e, 0xb46f, 0xb470, 0xb471, 0xb472, 0xb473, 0xb474, 0xb475, 0xb476, 0xb477, 0xb478, 0xb479, 0xb47a, 0xb47b, 0xb47c, 0xb47d, 0xb47e, 0xb47f, 0xb481, 0xb482, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb483, 0xb484, 0xb485, 0xb486, 0xb487, 0xb489, 0xb48a, 0xb48b, 0xb48c, 0xb48d, 0xb48e, 0xb48f, 0xb490, 0xb491, 0xb492, 0xb493, 0xb494, 0xb495, 0xb496, 0xb497, 0xb498, 0xb499, 0xb49a, 0xb49b, 0xb49c, 0xb49e, 0xb49f, 0xb4a0, 0xb4a1, 0xb4a2, 0xb4a3, 0xb4a5, 0xb4a6, 0xb4a7, 0xb4a9, 0xb4aa, 0xb4ab, 0xb4ad, 0xb4ae, 0xb4af, 0xb4b0, 0xb4b1, 0xb4b2, 0xb4b3, 0xb4b4, 0xb4b6, 0xb4b8, 0xb4ba, 0xb4bb, 0xb4bc, 0xb4bd, 0xb4be, 0xb4bf, 0xb4c1, 0xb4c2, 0xb4c3, 0xb4c5, 0xb4c6, 0xb4c7, 0xb4c9, 0xb4ca, 0xb4cb, 0xb4cc, 0xb4cd, 0xb4ce, 0xb4cf, 0xb4d1, 0xb4d2, 0xb4d3, 0xb4d4, 0xb4d6, 0xb4d7, 0xb4d8, 0xb4d9, 0xb4da, 0xb4db, 0xb4de, 0xb4df, 0xb4e1, 0xb4e2, 0xb4e5, 0xb4e7, 0xb4e8, 0xb4e9, 0xb4ea, 0xb4eb, 0xb4ee, 0xb4f0, 0xb4f2, 0xb4f3, 0xb4f4, 0xb4f5, 0xb4f6, 0xb4f7, 0xb4f9, 0xb4fa, 0xb4fb, 0xb4fc, 0xb4fd, 0xb4fe, 0xb4ff, 0xb500, 0xb501, 0xb502, 0xb503, 0xb504, 0xb505, 0xb506, 0xb507, 0xb508, 0xb509, 0xb50a, 0xb50b, 0xb50c, 0xb50d, 0xb50e, 0xb50f, 0xb510, 0xb511, 0xb512, 0xb513, 0xb516, 0xb517, 0xb519, 0xb51a, 0xb51d, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8b40[ 192 ] = { 0xfffd, 0xb51e, 0xb51f, 0xb520, 0xb521, 0xb522, 0xb523, 0xb526, 0xb52b, 0xb52c, 0xb52d, 0xb52e, 0xb52f, 0xb532, 0xb533, 0xb535, 0xb536, 0xb537, 0xb539, 0xb53a, 0xb53b, 0xb53c, 0xb53d, 0xb53e, 0xb53f, 0xb542, 0xb546, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb547, 0xb548, 0xb549, 0xb54a, 0xb54e, 0xb54f, 0xb551, 0xb552, 0xb553, 0xb555, 0xb556, 0xb557, 0xb558, 0xb559, 0xb55a, 0xb55b, 0xb55e, 0xb562, 0xb563, 0xb564, 0xb565, 0xb566, 0xb567, 0xb568, 0xb569, 0xb56a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb56b, 0xb56c, 0xb56d, 0xb56e, 0xb56f, 0xb570, 0xb571, 0xb572, 0xb573, 0xb574, 0xb575, 0xb576, 0xb577, 0xb578, 0xb579, 0xb57a, 0xb57b, 0xb57c, 0xb57d, 0xb57e, 0xb57f, 0xb580, 0xb581, 0xb582, 0xb583, 0xb584, 0xb585, 0xb586, 0xb587, 0xb588, 0xb589, 0xb58a, 0xb58b, 0xb58c, 0xb58d, 0xb58e, 0xb58f, 0xb590, 0xb591, 0xb592, 0xb593, 0xb594, 0xb595, 0xb596, 0xb597, 0xb598, 0xb599, 0xb59a, 0xb59b, 0xb59c, 0xb59d, 0xb59e, 0xb59f, 0xb5a2, 0xb5a3, 0xb5a5, 0xb5a6, 0xb5a7, 0xb5a9, 0xb5ac, 0xb5ad, 0xb5ae, 0xb5af, 0xb5b2, 0xb5b6, 0xb5b7, 0xb5b8, 0xb5b9, 0xb5ba, 0xb5be, 0xb5bf, 0xb5c1, 0xb5c2, 0xb5c3, 0xb5c5, 0xb5c6, 0xb5c7, 0xb5c8, 0xb5c9, 0xb5ca, 0xb5cb, 0xb5ce, 0xb5d2, 0xb5d3, 0xb5d4, 0xb5d5, 0xb5d6, 0xb5d7, 0xb5d9, 0xb5da, 0xb5db, 0xb5dc, 0xb5dd, 0xb5de, 0xb5df, 0xb5e0, 0xb5e1, 0xb5e2, 0xb5e3, 0xb5e4, 0xb5e5, 0xb5e6, 0xb5e7, 0xb5e8, 0xb5e9, 0xb5ea, 0xb5eb, 0xb5ed, 0xb5ee, 0xb5ef, 0xb5f0, 0xb5f1, 0xb5f2, 0xb5f3, 0xb5f4, 0xb5f5, 0xb5f6, 0xb5f7, 0xb5f8, 0xb5f9, 0xb5fa, 0xb5fb, 0xb5fc, 0xb5fd, 0xb5fe, 0xb5ff, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8c40[ 192 ] = { 0xfffd, 0xb600, 0xb601, 0xb602, 0xb603, 0xb604, 0xb605, 0xb606, 0xb607, 0xb608, 0xb609, 0xb60a, 0xb60b, 0xb60c, 0xb60d, 0xb60e, 0xb60f, 0xb612, 0xb613, 0xb615, 0xb616, 0xb617, 0xb619, 0xb61a, 0xb61b, 0xb61c, 0xb61d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb61e, 0xb61f, 0xb620, 0xb621, 0xb622, 0xb623, 0xb624, 0xb626, 0xb627, 0xb628, 0xb629, 0xb62a, 0xb62b, 0xb62d, 0xb62e, 0xb62f, 0xb630, 0xb631, 0xb632, 0xb633, 0xb635, 0xb636, 0xb637, 0xb638, 0xb639, 0xb63a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb63b, 0xb63c, 0xb63d, 0xb63e, 0xb63f, 0xb640, 0xb641, 0xb642, 0xb643, 0xb644, 0xb645, 0xb646, 0xb647, 0xb649, 0xb64a, 0xb64b, 0xb64c, 0xb64d, 0xb64e, 0xb64f, 0xb650, 0xb651, 0xb652, 0xb653, 0xb654, 0xb655, 0xb656, 0xb657, 0xb658, 0xb659, 0xb65a, 0xb65b, 0xb65c, 0xb65d, 0xb65e, 0xb65f, 0xb660, 0xb661, 0xb662, 0xb663, 0xb665, 0xb666, 0xb667, 0xb669, 0xb66a, 0xb66b, 0xb66c, 0xb66d, 0xb66e, 0xb66f, 0xb670, 0xb671, 0xb672, 0xb673, 0xb674, 0xb675, 0xb676, 0xb677, 0xb678, 0xb679, 0xb67a, 0xb67b, 0xb67c, 0xb67d, 0xb67e, 0xb67f, 0xb680, 0xb681, 0xb682, 0xb683, 0xb684, 0xb685, 0xb686, 0xb687, 0xb688, 0xb689, 0xb68a, 0xb68b, 0xb68c, 0xb68d, 0xb68e, 0xb68f, 0xb690, 0xb691, 0xb692, 0xb693, 0xb694, 0xb695, 0xb696, 0xb697, 0xb698, 0xb699, 0xb69a, 0xb69b, 0xb69e, 0xb69f, 0xb6a1, 0xb6a2, 0xb6a3, 0xb6a5, 0xb6a6, 0xb6a7, 0xb6a8, 0xb6a9, 0xb6aa, 0xb6ad, 0xb6ae, 0xb6af, 0xb6b0, 0xb6b2, 0xb6b3, 0xb6b4, 0xb6b5, 0xb6b6, 0xb6b7, 0xb6b8, 0xb6b9, 0xb6ba, 0xb6bb, 0xb6bc, 0xb6bd, 0xb6be, 0xb6bf, 0xb6c0, 0xb6c1, 0xb6c2, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8d40[ 192 ] = { 0xfffd, 0xb6c3, 0xb6c4, 0xb6c5, 0xb6c6, 0xb6c7, 0xb6c8, 0xb6c9, 0xb6ca, 0xb6cb, 0xb6cc, 0xb6cd, 0xb6ce, 0xb6cf, 0xb6d0, 0xb6d1, 0xb6d2, 0xb6d3, 0xb6d5, 0xb6d6, 0xb6d7, 0xb6d8, 0xb6d9, 0xb6da, 0xb6db, 0xb6dc, 0xb6dd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb6de, 0xb6df, 0xb6e0, 0xb6e1, 0xb6e2, 0xb6e3, 0xb6e4, 0xb6e5, 0xb6e6, 0xb6e7, 0xb6e8, 0xb6e9, 0xb6ea, 0xb6eb, 0xb6ec, 0xb6ed, 0xb6ee, 0xb6ef, 0xb6f1, 0xb6f2, 0xb6f3, 0xb6f5, 0xb6f6, 0xb6f7, 0xb6f9, 0xb6fa, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb6fb, 0xb6fc, 0xb6fd, 0xb6fe, 0xb6ff, 0xb702, 0xb703, 0xb704, 0xb706, 0xb707, 0xb708, 0xb709, 0xb70a, 0xb70b, 0xb70c, 0xb70d, 0xb70e, 0xb70f, 0xb710, 0xb711, 0xb712, 0xb713, 0xb714, 0xb715, 0xb716, 0xb717, 0xb718, 0xb719, 0xb71a, 0xb71b, 0xb71c, 0xb71d, 0xb71e, 0xb71f, 0xb720, 0xb721, 0xb722, 0xb723, 0xb724, 0xb725, 0xb726, 0xb727, 0xb72a, 0xb72b, 0xb72d, 0xb72e, 0xb731, 0xb732, 0xb733, 0xb734, 0xb735, 0xb736, 0xb737, 0xb73a, 0xb73c, 0xb73d, 0xb73e, 0xb73f, 0xb740, 0xb741, 0xb742, 0xb743, 0xb745, 0xb746, 0xb747, 0xb749, 0xb74a, 0xb74b, 0xb74d, 0xb74e, 0xb74f, 0xb750, 0xb751, 0xb752, 0xb753, 0xb756, 0xb757, 0xb758, 0xb759, 0xb75a, 0xb75b, 0xb75c, 0xb75d, 0xb75e, 0xb75f, 0xb761, 0xb762, 0xb763, 0xb765, 0xb766, 0xb767, 0xb769, 0xb76a, 0xb76b, 0xb76c, 0xb76d, 0xb76e, 0xb76f, 0xb772, 0xb774, 0xb776, 0xb777, 0xb778, 0xb779, 0xb77a, 0xb77b, 0xb77e, 0xb77f, 0xb781, 0xb782, 0xb783, 0xb785, 0xb786, 0xb787, 0xb788, 0xb789, 0xb78a, 0xb78b, 0xb78e, 0xb793, 0xb794, 0xb795, 0xb79a, 0xb79b, 0xb79d, 0xb79e, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8e40[ 192 ] = { 0xfffd, 0xb79f, 0xb7a1, 0xb7a2, 0xb7a3, 0xb7a4, 0xb7a5, 0xb7a6, 0xb7a7, 0xb7aa, 0xb7ae, 0xb7af, 0xb7b0, 0xb7b1, 0xb7b2, 0xb7b3, 0xb7b6, 0xb7b7, 0xb7b9, 0xb7ba, 0xb7bb, 0xb7bc, 0xb7bd, 0xb7be, 0xb7bf, 0xb7c0, 0xb7c1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb7c2, 0xb7c3, 0xb7c4, 0xb7c5, 0xb7c6, 0xb7c8, 0xb7ca, 0xb7cb, 0xb7cc, 0xb7cd, 0xb7ce, 0xb7cf, 0xb7d0, 0xb7d1, 0xb7d2, 0xb7d3, 0xb7d4, 0xb7d5, 0xb7d6, 0xb7d7, 0xb7d8, 0xb7d9, 0xb7da, 0xb7db, 0xb7dc, 0xb7dd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb7de, 0xb7df, 0xb7e0, 0xb7e1, 0xb7e2, 0xb7e3, 0xb7e4, 0xb7e5, 0xb7e6, 0xb7e7, 0xb7e8, 0xb7e9, 0xb7ea, 0xb7eb, 0xb7ee, 0xb7ef, 0xb7f1, 0xb7f2, 0xb7f3, 0xb7f5, 0xb7f6, 0xb7f7, 0xb7f8, 0xb7f9, 0xb7fa, 0xb7fb, 0xb7fe, 0xb802, 0xb803, 0xb804, 0xb805, 0xb806, 0xb80a, 0xb80b, 0xb80d, 0xb80e, 0xb80f, 0xb811, 0xb812, 0xb813, 0xb814, 0xb815, 0xb816, 0xb817, 0xb81a, 0xb81c, 0xb81e, 0xb81f, 0xb820, 0xb821, 0xb822, 0xb823, 0xb826, 0xb827, 0xb829, 0xb82a, 0xb82b, 0xb82d, 0xb82e, 0xb82f, 0xb830, 0xb831, 0xb832, 0xb833, 0xb836, 0xb83a, 0xb83b, 0xb83c, 0xb83d, 0xb83e, 0xb83f, 0xb841, 0xb842, 0xb843, 0xb845, 0xb846, 0xb847, 0xb848, 0xb849, 0xb84a, 0xb84b, 0xb84c, 0xb84d, 0xb84e, 0xb84f, 0xb850, 0xb852, 0xb854, 0xb855, 0xb856, 0xb857, 0xb858, 0xb859, 0xb85a, 0xb85b, 0xb85e, 0xb85f, 0xb861, 0xb862, 0xb863, 0xb865, 0xb866, 0xb867, 0xb868, 0xb869, 0xb86a, 0xb86b, 0xb86e, 0xb870, 0xb872, 0xb873, 0xb874, 0xb875, 0xb876, 0xb877, 0xb879, 0xb87a, 0xb87b, 0xb87d, 0xb87e, 0xb87f, 0xb880, 0xb881, 0xb882, 0xb883, 0xb884, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8f40[ 192 ] = { 0xfffd, 0xb885, 0xb886, 0xb887, 0xb888, 0xb889, 0xb88a, 0xb88b, 0xb88c, 0xb88e, 0xb88f, 0xb890, 0xb891, 0xb892, 0xb893, 0xb894, 0xb895, 0xb896, 0xb897, 0xb898, 0xb899, 0xb89a, 0xb89b, 0xb89c, 0xb89d, 0xb89e, 0xb89f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb8a0, 0xb8a1, 0xb8a2, 0xb8a3, 0xb8a4, 0xb8a5, 0xb8a6, 0xb8a7, 0xb8a9, 0xb8aa, 0xb8ab, 0xb8ac, 0xb8ad, 0xb8ae, 0xb8af, 0xb8b1, 0xb8b2, 0xb8b3, 0xb8b5, 0xb8b6, 0xb8b7, 0xb8b9, 0xb8ba, 0xb8bb, 0xb8bc, 0xb8bd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb8be, 0xb8bf, 0xb8c2, 0xb8c4, 0xb8c6, 0xb8c7, 0xb8c8, 0xb8c9, 0xb8ca, 0xb8cb, 0xb8cd, 0xb8ce, 0xb8cf, 0xb8d1, 0xb8d2, 0xb8d3, 0xb8d5, 0xb8d6, 0xb8d7, 0xb8d8, 0xb8d9, 0xb8da, 0xb8db, 0xb8dc, 0xb8de, 0xb8e0, 0xb8e2, 0xb8e3, 0xb8e4, 0xb8e5, 0xb8e6, 0xb8e7, 0xb8ea, 0xb8eb, 0xb8ed, 0xb8ee, 0xb8ef, 0xb8f1, 0xb8f2, 0xb8f3, 0xb8f4, 0xb8f5, 0xb8f6, 0xb8f7, 0xb8fa, 0xb8fc, 0xb8fe, 0xb8ff, 0xb900, 0xb901, 0xb902, 0xb903, 0xb905, 0xb906, 0xb907, 0xb908, 0xb909, 0xb90a, 0xb90b, 0xb90c, 0xb90d, 0xb90e, 0xb90f, 0xb910, 0xb911, 0xb912, 0xb913, 0xb914, 0xb915, 0xb916, 0xb917, 0xb919, 0xb91a, 0xb91b, 0xb91c, 0xb91d, 0xb91e, 0xb91f, 0xb921, 0xb922, 0xb923, 0xb924, 0xb925, 0xb926, 0xb927, 0xb928, 0xb929, 0xb92a, 0xb92b, 0xb92c, 0xb92d, 0xb92e, 0xb92f, 0xb930, 0xb931, 0xb932, 0xb933, 0xb934, 0xb935, 0xb936, 0xb937, 0xb938, 0xb939, 0xb93a, 0xb93b, 0xb93e, 0xb93f, 0xb941, 0xb942, 0xb943, 0xb945, 0xb946, 0xb947, 0xb948, 0xb949, 0xb94a, 0xb94b, 0xb94d, 0xb94e, 0xb950, 0xb952, 0xb953, 0xb954, 0xb955, 0xb956, 0xb957, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9040[ 192 ] = { 0xfffd, 0xb95a, 0xb95b, 0xb95d, 0xb95e, 0xb95f, 0xb961, 0xb962, 0xb963, 0xb964, 0xb965, 0xb966, 0xb967, 0xb96a, 0xb96c, 0xb96e, 0xb96f, 0xb970, 0xb971, 0xb972, 0xb973, 0xb976, 0xb977, 0xb979, 0xb97a, 0xb97b, 0xb97d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb97e, 0xb97f, 0xb980, 0xb981, 0xb982, 0xb983, 0xb986, 0xb988, 0xb98b, 0xb98c, 0xb98f, 0xb990, 0xb991, 0xb992, 0xb993, 0xb994, 0xb995, 0xb996, 0xb997, 0xb998, 0xb999, 0xb99a, 0xb99b, 0xb99c, 0xb99d, 0xb99e, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb99f, 0xb9a0, 0xb9a1, 0xb9a2, 0xb9a3, 0xb9a4, 0xb9a5, 0xb9a6, 0xb9a7, 0xb9a8, 0xb9a9, 0xb9aa, 0xb9ab, 0xb9ae, 0xb9af, 0xb9b1, 0xb9b2, 0xb9b3, 0xb9b5, 0xb9b6, 0xb9b7, 0xb9b8, 0xb9b9, 0xb9ba, 0xb9bb, 0xb9be, 0xb9c0, 0xb9c2, 0xb9c3, 0xb9c4, 0xb9c5, 0xb9c6, 0xb9c7, 0xb9ca, 0xb9cb, 0xb9cd, 0xb9d3, 0xb9d4, 0xb9d5, 0xb9d6, 0xb9d7, 0xb9da, 0xb9dc, 0xb9df, 0xb9e0, 0xb9e2, 0xb9e6, 0xb9e7, 0xb9e9, 0xb9ea, 0xb9eb, 0xb9ed, 0xb9ee, 0xb9ef, 0xb9f0, 0xb9f1, 0xb9f2, 0xb9f3, 0xb9f6, 0xb9fb, 0xb9fc, 0xb9fd, 0xb9fe, 0xb9ff, 0xba02, 0xba03, 0xba04, 0xba05, 0xba06, 0xba07, 0xba09, 0xba0a, 0xba0b, 0xba0c, 0xba0d, 0xba0e, 0xba0f, 0xba10, 0xba11, 0xba12, 0xba13, 0xba14, 0xba16, 0xba17, 0xba18, 0xba19, 0xba1a, 0xba1b, 0xba1c, 0xba1d, 0xba1e, 0xba1f, 0xba20, 0xba21, 0xba22, 0xba23, 0xba24, 0xba25, 0xba26, 0xba27, 0xba28, 0xba29, 0xba2a, 0xba2b, 0xba2c, 0xba2d, 0xba2e, 0xba2f, 0xba30, 0xba31, 0xba32, 0xba33, 0xba34, 0xba35, 0xba36, 0xba37, 0xba3a, 0xba3b, 0xba3d, 0xba3e, 0xba3f, 0xba41, 0xba43, 0xba44, 0xba45, 0xba46, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9140[ 192 ] = { 0xfffd, 0xba47, 0xba4a, 0xba4c, 0xba4f, 0xba50, 0xba51, 0xba52, 0xba56, 0xba57, 0xba59, 0xba5a, 0xba5b, 0xba5d, 0xba5e, 0xba5f, 0xba60, 0xba61, 0xba62, 0xba63, 0xba66, 0xba6a, 0xba6b, 0xba6c, 0xba6d, 0xba6e, 0xba6f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xba72, 0xba73, 0xba75, 0xba76, 0xba77, 0xba79, 0xba7a, 0xba7b, 0xba7c, 0xba7d, 0xba7e, 0xba7f, 0xba80, 0xba81, 0xba82, 0xba86, 0xba88, 0xba89, 0xba8a, 0xba8b, 0xba8d, 0xba8e, 0xba8f, 0xba90, 0xba91, 0xba92, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xba93, 0xba94, 0xba95, 0xba96, 0xba97, 0xba98, 0xba99, 0xba9a, 0xba9b, 0xba9c, 0xba9d, 0xba9e, 0xba9f, 0xbaa0, 0xbaa1, 0xbaa2, 0xbaa3, 0xbaa4, 0xbaa5, 0xbaa6, 0xbaa7, 0xbaaa, 0xbaad, 0xbaae, 0xbaaf, 0xbab1, 0xbab3, 0xbab4, 0xbab5, 0xbab6, 0xbab7, 0xbaba, 0xbabc, 0xbabe, 0xbabf, 0xbac0, 0xbac1, 0xbac2, 0xbac3, 0xbac5, 0xbac6, 0xbac7, 0xbac9, 0xbaca, 0xbacb, 0xbacc, 0xbacd, 0xbace, 0xbacf, 0xbad0, 0xbad1, 0xbad2, 0xbad3, 0xbad4, 0xbad5, 0xbad6, 0xbad7, 0xbada, 0xbadb, 0xbadc, 0xbadd, 0xbade, 0xbadf, 0xbae0, 0xbae1, 0xbae2, 0xbae3, 0xbae4, 0xbae5, 0xbae6, 0xbae7, 0xbae8, 0xbae9, 0xbaea, 0xbaeb, 0xbaec, 0xbaed, 0xbaee, 0xbaef, 0xbaf0, 0xbaf1, 0xbaf2, 0xbaf3, 0xbaf4, 0xbaf5, 0xbaf6, 0xbaf7, 0xbaf8, 0xbaf9, 0xbafa, 0xbafb, 0xbafd, 0xbafe, 0xbaff, 0xbb01, 0xbb02, 0xbb03, 0xbb05, 0xbb06, 0xbb07, 0xbb08, 0xbb09, 0xbb0a, 0xbb0b, 0xbb0c, 0xbb0e, 0xbb10, 0xbb12, 0xbb13, 0xbb14, 0xbb15, 0xbb16, 0xbb17, 0xbb19, 0xbb1a, 0xbb1b, 0xbb1d, 0xbb1e, 0xbb1f, 0xbb21, 0xbb22, 0xbb23, 0xbb24, 0xbb25, 0xbb26, 0xbb27, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9240[ 192 ] = { 0xfffd, 0xbb28, 0xbb2a, 0xbb2c, 0xbb2d, 0xbb2e, 0xbb2f, 0xbb30, 0xbb31, 0xbb32, 0xbb33, 0xbb37, 0xbb39, 0xbb3a, 0xbb3f, 0xbb40, 0xbb41, 0xbb42, 0xbb43, 0xbb46, 0xbb48, 0xbb4a, 0xbb4b, 0xbb4c, 0xbb4e, 0xbb51, 0xbb52, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbb53, 0xbb55, 0xbb56, 0xbb57, 0xbb59, 0xbb5a, 0xbb5b, 0xbb5c, 0xbb5d, 0xbb5e, 0xbb5f, 0xbb60, 0xbb62, 0xbb64, 0xbb65, 0xbb66, 0xbb67, 0xbb68, 0xbb69, 0xbb6a, 0xbb6b, 0xbb6d, 0xbb6e, 0xbb6f, 0xbb70, 0xbb71, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbb72, 0xbb73, 0xbb74, 0xbb75, 0xbb76, 0xbb77, 0xbb78, 0xbb79, 0xbb7a, 0xbb7b, 0xbb7c, 0xbb7d, 0xbb7e, 0xbb7f, 0xbb80, 0xbb81, 0xbb82, 0xbb83, 0xbb84, 0xbb85, 0xbb86, 0xbb87, 0xbb89, 0xbb8a, 0xbb8b, 0xbb8d, 0xbb8e, 0xbb8f, 0xbb91, 0xbb92, 0xbb93, 0xbb94, 0xbb95, 0xbb96, 0xbb97, 0xbb98, 0xbb99, 0xbb9a, 0xbb9b, 0xbb9c, 0xbb9d, 0xbb9e, 0xbb9f, 0xbba0, 0xbba1, 0xbba2, 0xbba3, 0xbba5, 0xbba6, 0xbba7, 0xbba9, 0xbbaa, 0xbbab, 0xbbad, 0xbbae, 0xbbaf, 0xbbb0, 0xbbb1, 0xbbb2, 0xbbb3, 0xbbb5, 0xbbb6, 0xbbb8, 0xbbb9, 0xbbba, 0xbbbb, 0xbbbc, 0xbbbd, 0xbbbe, 0xbbbf, 0xbbc1, 0xbbc2, 0xbbc3, 0xbbc5, 0xbbc6, 0xbbc7, 0xbbc9, 0xbbca, 0xbbcb, 0xbbcc, 0xbbcd, 0xbbce, 0xbbcf, 0xbbd1, 0xbbd2, 0xbbd4, 0xbbd5, 0xbbd6, 0xbbd7, 0xbbd8, 0xbbd9, 0xbbda, 0xbbdb, 0xbbdc, 0xbbdd, 0xbbde, 0xbbdf, 0xbbe0, 0xbbe1, 0xbbe2, 0xbbe3, 0xbbe4, 0xbbe5, 0xbbe6, 0xbbe7, 0xbbe8, 0xbbe9, 0xbbea, 0xbbeb, 0xbbec, 0xbbed, 0xbbee, 0xbbef, 0xbbf0, 0xbbf1, 0xbbf2, 0xbbf3, 0xbbf4, 0xbbf5, 0xbbf6, 0xbbf7, 0xbbfa, 0xbbfb, 0xbbfd, 0xbbfe, 0xbc01, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9340[ 192 ] = { 0xfffd, 0xbc03, 0xbc04, 0xbc05, 0xbc06, 0xbc07, 0xbc0a, 0xbc0e, 0xbc10, 0xbc12, 0xbc13, 0xbc19, 0xbc1a, 0xbc20, 0xbc21, 0xbc22, 0xbc23, 0xbc26, 0xbc28, 0xbc2a, 0xbc2b, 0xbc2c, 0xbc2e, 0xbc2f, 0xbc32, 0xbc33, 0xbc35, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbc36, 0xbc37, 0xbc39, 0xbc3a, 0xbc3b, 0xbc3c, 0xbc3d, 0xbc3e, 0xbc3f, 0xbc42, 0xbc46, 0xbc47, 0xbc48, 0xbc4a, 0xbc4b, 0xbc4e, 0xbc4f, 0xbc51, 0xbc52, 0xbc53, 0xbc54, 0xbc55, 0xbc56, 0xbc57, 0xbc58, 0xbc59, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbc5a, 0xbc5b, 0xbc5c, 0xbc5e, 0xbc5f, 0xbc60, 0xbc61, 0xbc62, 0xbc63, 0xbc64, 0xbc65, 0xbc66, 0xbc67, 0xbc68, 0xbc69, 0xbc6a, 0xbc6b, 0xbc6c, 0xbc6d, 0xbc6e, 0xbc6f, 0xbc70, 0xbc71, 0xbc72, 0xbc73, 0xbc74, 0xbc75, 0xbc76, 0xbc77, 0xbc78, 0xbc79, 0xbc7a, 0xbc7b, 0xbc7c, 0xbc7d, 0xbc7e, 0xbc7f, 0xbc80, 0xbc81, 0xbc82, 0xbc83, 0xbc86, 0xbc87, 0xbc89, 0xbc8a, 0xbc8d, 0xbc8f, 0xbc90, 0xbc91, 0xbc92, 0xbc93, 0xbc96, 0xbc98, 0xbc9b, 0xbc9c, 0xbc9d, 0xbc9e, 0xbc9f, 0xbca2, 0xbca3, 0xbca5, 0xbca6, 0xbca9, 0xbcaa, 0xbcab, 0xbcac, 0xbcad, 0xbcae, 0xbcaf, 0xbcb2, 0xbcb6, 0xbcb7, 0xbcb8, 0xbcb9, 0xbcba, 0xbcbb, 0xbcbe, 0xbcbf, 0xbcc1, 0xbcc2, 0xbcc3, 0xbcc5, 0xbcc6, 0xbcc7, 0xbcc8, 0xbcc9, 0xbcca, 0xbccb, 0xbccc, 0xbcce, 0xbcd2, 0xbcd3, 0xbcd4, 0xbcd6, 0xbcd7, 0xbcd9, 0xbcda, 0xbcdb, 0xbcdd, 0xbcde, 0xbcdf, 0xbce0, 0xbce1, 0xbce2, 0xbce3, 0xbce4, 0xbce5, 0xbce6, 0xbce7, 0xbce8, 0xbce9, 0xbcea, 0xbceb, 0xbcec, 0xbced, 0xbcee, 0xbcef, 0xbcf0, 0xbcf1, 0xbcf2, 0xbcf3, 0xbcf7, 0xbcf9, 0xbcfa, 0xbcfb, 0xbcfd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9440[ 192 ] = { 0xfffd, 0xbcfe, 0xbcff, 0xbd00, 0xbd01, 0xbd02, 0xbd03, 0xbd06, 0xbd08, 0xbd0a, 0xbd0b, 0xbd0c, 0xbd0d, 0xbd0e, 0xbd0f, 0xbd11, 0xbd12, 0xbd13, 0xbd15, 0xbd16, 0xbd17, 0xbd18, 0xbd19, 0xbd1a, 0xbd1b, 0xbd1c, 0xbd1d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbd1e, 0xbd1f, 0xbd20, 0xbd21, 0xbd22, 0xbd23, 0xbd25, 0xbd26, 0xbd27, 0xbd28, 0xbd29, 0xbd2a, 0xbd2b, 0xbd2d, 0xbd2e, 0xbd2f, 0xbd30, 0xbd31, 0xbd32, 0xbd33, 0xbd34, 0xbd35, 0xbd36, 0xbd37, 0xbd38, 0xbd39, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbd3a, 0xbd3b, 0xbd3c, 0xbd3d, 0xbd3e, 0xbd3f, 0xbd41, 0xbd42, 0xbd43, 0xbd44, 0xbd45, 0xbd46, 0xbd47, 0xbd4a, 0xbd4b, 0xbd4d, 0xbd4e, 0xbd4f, 0xbd51, 0xbd52, 0xbd53, 0xbd54, 0xbd55, 0xbd56, 0xbd57, 0xbd5a, 0xbd5b, 0xbd5c, 0xbd5d, 0xbd5e, 0xbd5f, 0xbd60, 0xbd61, 0xbd62, 0xbd63, 0xbd65, 0xbd66, 0xbd67, 0xbd69, 0xbd6a, 0xbd6b, 0xbd6c, 0xbd6d, 0xbd6e, 0xbd6f, 0xbd70, 0xbd71, 0xbd72, 0xbd73, 0xbd74, 0xbd75, 0xbd76, 0xbd77, 0xbd78, 0xbd79, 0xbd7a, 0xbd7b, 0xbd7c, 0xbd7d, 0xbd7e, 0xbd7f, 0xbd82, 0xbd83, 0xbd85, 0xbd86, 0xbd8b, 0xbd8c, 0xbd8d, 0xbd8e, 0xbd8f, 0xbd92, 0xbd94, 0xbd96, 0xbd97, 0xbd98, 0xbd9b, 0xbd9d, 0xbd9e, 0xbd9f, 0xbda0, 0xbda1, 0xbda2, 0xbda3, 0xbda5, 0xbda6, 0xbda7, 0xbda8, 0xbda9, 0xbdaa, 0xbdab, 0xbdac, 0xbdad, 0xbdae, 0xbdaf, 0xbdb1, 0xbdb2, 0xbdb3, 0xbdb4, 0xbdb5, 0xbdb6, 0xbdb7, 0xbdb9, 0xbdba, 0xbdbb, 0xbdbc, 0xbdbd, 0xbdbe, 0xbdbf, 0xbdc0, 0xbdc1, 0xbdc2, 0xbdc3, 0xbdc4, 0xbdc5, 0xbdc6, 0xbdc7, 0xbdc8, 0xbdc9, 0xbdca, 0xbdcb, 0xbdcc, 0xbdcd, 0xbdce, 0xbdcf, 0xbdd0, 0xbdd1, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9540[ 192 ] = { 0xfffd, 0xbdd2, 0xbdd3, 0xbdd6, 0xbdd7, 0xbdd9, 0xbdda, 0xbddb, 0xbddd, 0xbdde, 0xbddf, 0xbde0, 0xbde1, 0xbde2, 0xbde3, 0xbde4, 0xbde5, 0xbde6, 0xbde7, 0xbde8, 0xbdea, 0xbdeb, 0xbdec, 0xbded, 0xbdee, 0xbdef, 0xbdf1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbdf2, 0xbdf3, 0xbdf5, 0xbdf6, 0xbdf7, 0xbdf9, 0xbdfa, 0xbdfb, 0xbdfc, 0xbdfd, 0xbdfe, 0xbdff, 0xbe01, 0xbe02, 0xbe04, 0xbe06, 0xbe07, 0xbe08, 0xbe09, 0xbe0a, 0xbe0b, 0xbe0e, 0xbe0f, 0xbe11, 0xbe12, 0xbe13, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbe15, 0xbe16, 0xbe17, 0xbe18, 0xbe19, 0xbe1a, 0xbe1b, 0xbe1e, 0xbe20, 0xbe21, 0xbe22, 0xbe23, 0xbe24, 0xbe25, 0xbe26, 0xbe27, 0xbe28, 0xbe29, 0xbe2a, 0xbe2b, 0xbe2c, 0xbe2d, 0xbe2e, 0xbe2f, 0xbe30, 0xbe31, 0xbe32, 0xbe33, 0xbe34, 0xbe35, 0xbe36, 0xbe37, 0xbe38, 0xbe39, 0xbe3a, 0xbe3b, 0xbe3c, 0xbe3d, 0xbe3e, 0xbe3f, 0xbe40, 0xbe41, 0xbe42, 0xbe43, 0xbe46, 0xbe47, 0xbe49, 0xbe4a, 0xbe4b, 0xbe4d, 0xbe4f, 0xbe50, 0xbe51, 0xbe52, 0xbe53, 0xbe56, 0xbe58, 0xbe5c, 0xbe5d, 0xbe5e, 0xbe5f, 0xbe62, 0xbe63, 0xbe65, 0xbe66, 0xbe67, 0xbe69, 0xbe6b, 0xbe6c, 0xbe6d, 0xbe6e, 0xbe6f, 0xbe72, 0xbe76, 0xbe77, 0xbe78, 0xbe79, 0xbe7a, 0xbe7e, 0xbe7f, 0xbe81, 0xbe82, 0xbe83, 0xbe85, 0xbe86, 0xbe87, 0xbe88, 0xbe89, 0xbe8a, 0xbe8b, 0xbe8e, 0xbe92, 0xbe93, 0xbe94, 0xbe95, 0xbe96, 0xbe97, 0xbe9a, 0xbe9b, 0xbe9c, 0xbe9d, 0xbe9e, 0xbe9f, 0xbea0, 0xbea1, 0xbea2, 0xbea3, 0xbea4, 0xbea5, 0xbea6, 0xbea7, 0xbea9, 0xbeaa, 0xbeab, 0xbeac, 0xbead, 0xbeae, 0xbeaf, 0xbeb0, 0xbeb1, 0xbeb2, 0xbeb3, 0xbeb4, 0xbeb5, 0xbeb6, 0xbeb7, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9640[ 192 ] = { 0xfffd, 0xbeb8, 0xbeb9, 0xbeba, 0xbebb, 0xbebc, 0xbebd, 0xbebe, 0xbebf, 0xbec0, 0xbec1, 0xbec2, 0xbec3, 0xbec4, 0xbec5, 0xbec6, 0xbec7, 0xbec8, 0xbec9, 0xbeca, 0xbecb, 0xbecc, 0xbecd, 0xbece, 0xbecf, 0xbed2, 0xbed3, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbed5, 0xbed6, 0xbed9, 0xbeda, 0xbedb, 0xbedc, 0xbedd, 0xbede, 0xbedf, 0xbee1, 0xbee2, 0xbee6, 0xbee7, 0xbee8, 0xbee9, 0xbeea, 0xbeeb, 0xbeed, 0xbeee, 0xbeef, 0xbef0, 0xbef1, 0xbef2, 0xbef3, 0xbef4, 0xbef5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbef6, 0xbef7, 0xbef8, 0xbef9, 0xbefa, 0xbefb, 0xbefc, 0xbefd, 0xbefe, 0xbeff, 0xbf00, 0xbf02, 0xbf03, 0xbf04, 0xbf05, 0xbf06, 0xbf07, 0xbf0a, 0xbf0b, 0xbf0c, 0xbf0d, 0xbf0e, 0xbf0f, 0xbf10, 0xbf11, 0xbf12, 0xbf13, 0xbf14, 0xbf15, 0xbf16, 0xbf17, 0xbf1a, 0xbf1e, 0xbf1f, 0xbf20, 0xbf21, 0xbf22, 0xbf23, 0xbf24, 0xbf25, 0xbf26, 0xbf27, 0xbf28, 0xbf29, 0xbf2a, 0xbf2b, 0xbf2c, 0xbf2d, 0xbf2e, 0xbf2f, 0xbf30, 0xbf31, 0xbf32, 0xbf33, 0xbf34, 0xbf35, 0xbf36, 0xbf37, 0xbf38, 0xbf39, 0xbf3a, 0xbf3b, 0xbf3c, 0xbf3d, 0xbf3e, 0xbf3f, 0xbf42, 0xbf43, 0xbf45, 0xbf46, 0xbf47, 0xbf49, 0xbf4a, 0xbf4b, 0xbf4c, 0xbf4d, 0xbf4e, 0xbf4f, 0xbf52, 0xbf53, 0xbf54, 0xbf56, 0xbf57, 0xbf58, 0xbf59, 0xbf5a, 0xbf5b, 0xbf5c, 0xbf5d, 0xbf5e, 0xbf5f, 0xbf60, 0xbf61, 0xbf62, 0xbf63, 0xbf64, 0xbf65, 0xbf66, 0xbf67, 0xbf68, 0xbf69, 0xbf6a, 0xbf6b, 0xbf6c, 0xbf6d, 0xbf6e, 0xbf6f, 0xbf70, 0xbf71, 0xbf72, 0xbf73, 0xbf74, 0xbf75, 0xbf76, 0xbf77, 0xbf78, 0xbf79, 0xbf7a, 0xbf7b, 0xbf7c, 0xbf7d, 0xbf7e, 0xbf7f, 0xbf80, 0xbf81, 0xbf82, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9740[ 192 ] = { 0xfffd, 0xbf83, 0xbf84, 0xbf85, 0xbf86, 0xbf87, 0xbf88, 0xbf89, 0xbf8a, 0xbf8b, 0xbf8c, 0xbf8d, 0xbf8e, 0xbf8f, 0xbf90, 0xbf91, 0xbf92, 0xbf93, 0xbf95, 0xbf96, 0xbf97, 0xbf98, 0xbf99, 0xbf9a, 0xbf9b, 0xbf9c, 0xbf9d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbf9e, 0xbf9f, 0xbfa0, 0xbfa1, 0xbfa2, 0xbfa3, 0xbfa4, 0xbfa5, 0xbfa6, 0xbfa7, 0xbfa8, 0xbfa9, 0xbfaa, 0xbfab, 0xbfac, 0xbfad, 0xbfae, 0xbfaf, 0xbfb1, 0xbfb2, 0xbfb3, 0xbfb4, 0xbfb5, 0xbfb6, 0xbfb7, 0xbfb8, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbfb9, 0xbfba, 0xbfbb, 0xbfbc, 0xbfbd, 0xbfbe, 0xbfbf, 0xbfc0, 0xbfc1, 0xbfc2, 0xbfc3, 0xbfc4, 0xbfc6, 0xbfc7, 0xbfc8, 0xbfc9, 0xbfca, 0xbfcb, 0xbfce, 0xbfcf, 0xbfd1, 0xbfd2, 0xbfd3, 0xbfd5, 0xbfd6, 0xbfd7, 0xbfd8, 0xbfd9, 0xbfda, 0xbfdb, 0xbfdd, 0xbfde, 0xbfe0, 0xbfe2, 0xbfe3, 0xbfe4, 0xbfe5, 0xbfe6, 0xbfe7, 0xbfe8, 0xbfe9, 0xbfea, 0xbfeb, 0xbfec, 0xbfed, 0xbfee, 0xbfef, 0xbff0, 0xbff1, 0xbff2, 0xbff3, 0xbff4, 0xbff5, 0xbff6, 0xbff7, 0xbff8, 0xbff9, 0xbffa, 0xbffb, 0xbffc, 0xbffd, 0xbffe, 0xbfff, 0xc000, 0xc001, 0xc002, 0xc003, 0xc004, 0xc005, 0xc006, 0xc007, 0xc008, 0xc009, 0xc00a, 0xc00b, 0xc00c, 0xc00d, 0xc00e, 0xc00f, 0xc010, 0xc011, 0xc012, 0xc013, 0xc014, 0xc015, 0xc016, 0xc017, 0xc018, 0xc019, 0xc01a, 0xc01b, 0xc01c, 0xc01d, 0xc01e, 0xc01f, 0xc020, 0xc021, 0xc022, 0xc023, 0xc024, 0xc025, 0xc026, 0xc027, 0xc028, 0xc029, 0xc02a, 0xc02b, 0xc02c, 0xc02d, 0xc02e, 0xc02f, 0xc030, 0xc031, 0xc032, 0xc033, 0xc034, 0xc035, 0xc036, 0xc037, 0xc038, 0xc039, 0xc03a, 0xc03b, 0xc03d, 0xc03e, 0xc03f, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9840[ 192 ] = { 0xfffd, 0xc040, 0xc041, 0xc042, 0xc043, 0xc044, 0xc045, 0xc046, 0xc047, 0xc048, 0xc049, 0xc04a, 0xc04b, 0xc04c, 0xc04d, 0xc04e, 0xc04f, 0xc050, 0xc052, 0xc053, 0xc054, 0xc055, 0xc056, 0xc057, 0xc059, 0xc05a, 0xc05b, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc05d, 0xc05e, 0xc05f, 0xc061, 0xc062, 0xc063, 0xc064, 0xc065, 0xc066, 0xc067, 0xc06a, 0xc06b, 0xc06c, 0xc06d, 0xc06e, 0xc06f, 0xc070, 0xc071, 0xc072, 0xc073, 0xc074, 0xc075, 0xc076, 0xc077, 0xc078, 0xc079, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc07a, 0xc07b, 0xc07c, 0xc07d, 0xc07e, 0xc07f, 0xc080, 0xc081, 0xc082, 0xc083, 0xc084, 0xc085, 0xc086, 0xc087, 0xc088, 0xc089, 0xc08a, 0xc08b, 0xc08c, 0xc08d, 0xc08e, 0xc08f, 0xc092, 0xc093, 0xc095, 0xc096, 0xc097, 0xc099, 0xc09a, 0xc09b, 0xc09c, 0xc09d, 0xc09e, 0xc09f, 0xc0a2, 0xc0a4, 0xc0a6, 0xc0a7, 0xc0a8, 0xc0a9, 0xc0aa, 0xc0ab, 0xc0ae, 0xc0b1, 0xc0b2, 0xc0b7, 0xc0b8, 0xc0b9, 0xc0ba, 0xc0bb, 0xc0be, 0xc0c2, 0xc0c3, 0xc0c4, 0xc0c6, 0xc0c7, 0xc0ca, 0xc0cb, 0xc0cd, 0xc0ce, 0xc0cf, 0xc0d1, 0xc0d2, 0xc0d3, 0xc0d4, 0xc0d5, 0xc0d6, 0xc0d7, 0xc0da, 0xc0de, 0xc0df, 0xc0e0, 0xc0e1, 0xc0e2, 0xc0e3, 0xc0e6, 0xc0e7, 0xc0e9, 0xc0ea, 0xc0eb, 0xc0ed, 0xc0ee, 0xc0ef, 0xc0f0, 0xc0f1, 0xc0f2, 0xc0f3, 0xc0f6, 0xc0f8, 0xc0fa, 0xc0fb, 0xc0fc, 0xc0fd, 0xc0fe, 0xc0ff, 0xc101, 0xc102, 0xc103, 0xc105, 0xc106, 0xc107, 0xc109, 0xc10a, 0xc10b, 0xc10c, 0xc10d, 0xc10e, 0xc10f, 0xc111, 0xc112, 0xc113, 0xc114, 0xc116, 0xc117, 0xc118, 0xc119, 0xc11a, 0xc11b, 0xc121, 0xc122, 0xc125, 0xc128, 0xc129, 0xc12a, 0xc12b, 0xc12e, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9940[ 192 ] = { 0xfffd, 0xc132, 0xc133, 0xc134, 0xc135, 0xc137, 0xc13a, 0xc13b, 0xc13d, 0xc13e, 0xc13f, 0xc141, 0xc142, 0xc143, 0xc144, 0xc145, 0xc146, 0xc147, 0xc14a, 0xc14e, 0xc14f, 0xc150, 0xc151, 0xc152, 0xc153, 0xc156, 0xc157, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc159, 0xc15a, 0xc15b, 0xc15d, 0xc15e, 0xc15f, 0xc160, 0xc161, 0xc162, 0xc163, 0xc166, 0xc16a, 0xc16b, 0xc16c, 0xc16d, 0xc16e, 0xc16f, 0xc171, 0xc172, 0xc173, 0xc175, 0xc176, 0xc177, 0xc179, 0xc17a, 0xc17b, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc17c, 0xc17d, 0xc17e, 0xc17f, 0xc180, 0xc181, 0xc182, 0xc183, 0xc184, 0xc186, 0xc187, 0xc188, 0xc189, 0xc18a, 0xc18b, 0xc18f, 0xc191, 0xc192, 0xc193, 0xc195, 0xc197, 0xc198, 0xc199, 0xc19a, 0xc19b, 0xc19e, 0xc1a0, 0xc1a2, 0xc1a3, 0xc1a4, 0xc1a6, 0xc1a7, 0xc1aa, 0xc1ab, 0xc1ad, 0xc1ae, 0xc1af, 0xc1b1, 0xc1b2, 0xc1b3, 0xc1b4, 0xc1b5, 0xc1b6, 0xc1b7, 0xc1b8, 0xc1b9, 0xc1ba, 0xc1bb, 0xc1bc, 0xc1be, 0xc1bf, 0xc1c0, 0xc1c1, 0xc1c2, 0xc1c3, 0xc1c5, 0xc1c6, 0xc1c7, 0xc1c9, 0xc1ca, 0xc1cb, 0xc1cd, 0xc1ce, 0xc1cf, 0xc1d0, 0xc1d1, 0xc1d2, 0xc1d3, 0xc1d5, 0xc1d6, 0xc1d9, 0xc1da, 0xc1db, 0xc1dc, 0xc1dd, 0xc1de, 0xc1df, 0xc1e1, 0xc1e2, 0xc1e3, 0xc1e5, 0xc1e6, 0xc1e7, 0xc1e9, 0xc1ea, 0xc1eb, 0xc1ec, 0xc1ed, 0xc1ee, 0xc1ef, 0xc1f2, 0xc1f4, 0xc1f5, 0xc1f6, 0xc1f7, 0xc1f8, 0xc1f9, 0xc1fa, 0xc1fb, 0xc1fe, 0xc1ff, 0xc201, 0xc202, 0xc203, 0xc205, 0xc206, 0xc207, 0xc208, 0xc209, 0xc20a, 0xc20b, 0xc20e, 0xc210, 0xc212, 0xc213, 0xc214, 0xc215, 0xc216, 0xc217, 0xc21a, 0xc21b, 0xc21d, 0xc21e, 0xc221, 0xc222, 0xc223, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9a40[ 192 ] = { 0xfffd, 0xc224, 0xc225, 0xc226, 0xc227, 0xc22a, 0xc22c, 0xc22e, 0xc230, 0xc233, 0xc235, 0xc236, 0xc237, 0xc238, 0xc239, 0xc23a, 0xc23b, 0xc23c, 0xc23d, 0xc23e, 0xc23f, 0xc240, 0xc241, 0xc242, 0xc243, 0xc244, 0xc245, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc246, 0xc247, 0xc249, 0xc24a, 0xc24b, 0xc24c, 0xc24d, 0xc24e, 0xc24f, 0xc252, 0xc253, 0xc255, 0xc256, 0xc257, 0xc259, 0xc25a, 0xc25b, 0xc25c, 0xc25d, 0xc25e, 0xc25f, 0xc261, 0xc262, 0xc263, 0xc264, 0xc266, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc267, 0xc268, 0xc269, 0xc26a, 0xc26b, 0xc26e, 0xc26f, 0xc271, 0xc272, 0xc273, 0xc275, 0xc276, 0xc277, 0xc278, 0xc279, 0xc27a, 0xc27b, 0xc27e, 0xc280, 0xc282, 0xc283, 0xc284, 0xc285, 0xc286, 0xc287, 0xc28a, 0xc28b, 0xc28c, 0xc28d, 0xc28e, 0xc28f, 0xc291, 0xc292, 0xc293, 0xc294, 0xc295, 0xc296, 0xc297, 0xc299, 0xc29a, 0xc29c, 0xc29e, 0xc29f, 0xc2a0, 0xc2a1, 0xc2a2, 0xc2a3, 0xc2a6, 0xc2a7, 0xc2a9, 0xc2aa, 0xc2ab, 0xc2ae, 0xc2af, 0xc2b0, 0xc2b1, 0xc2b2, 0xc2b3, 0xc2b6, 0xc2b8, 0xc2ba, 0xc2bb, 0xc2bc, 0xc2bd, 0xc2be, 0xc2bf, 0xc2c0, 0xc2c1, 0xc2c2, 0xc2c3, 0xc2c4, 0xc2c5, 0xc2c6, 0xc2c7, 0xc2c8, 0xc2c9, 0xc2ca, 0xc2cb, 0xc2cc, 0xc2cd, 0xc2ce, 0xc2cf, 0xc2d0, 0xc2d1, 0xc2d2, 0xc2d3, 0xc2d4, 0xc2d5, 0xc2d6, 0xc2d7, 0xc2d8, 0xc2d9, 0xc2da, 0xc2db, 0xc2de, 0xc2df, 0xc2e1, 0xc2e2, 0xc2e5, 0xc2e6, 0xc2e7, 0xc2e8, 0xc2e9, 0xc2ea, 0xc2ee, 0xc2f0, 0xc2f2, 0xc2f3, 0xc2f4, 0xc2f5, 0xc2f7, 0xc2fa, 0xc2fd, 0xc2fe, 0xc2ff, 0xc301, 0xc302, 0xc303, 0xc304, 0xc305, 0xc306, 0xc307, 0xc30a, 0xc30b, 0xc30e, 0xc30f, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9b40[ 192 ] = { 0xfffd, 0xc310, 0xc311, 0xc312, 0xc316, 0xc317, 0xc319, 0xc31a, 0xc31b, 0xc31d, 0xc31e, 0xc31f, 0xc320, 0xc321, 0xc322, 0xc323, 0xc326, 0xc327, 0xc32a, 0xc32b, 0xc32c, 0xc32d, 0xc32e, 0xc32f, 0xc330, 0xc331, 0xc332, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc333, 0xc334, 0xc335, 0xc336, 0xc337, 0xc338, 0xc339, 0xc33a, 0xc33b, 0xc33c, 0xc33d, 0xc33e, 0xc33f, 0xc340, 0xc341, 0xc342, 0xc343, 0xc344, 0xc346, 0xc347, 0xc348, 0xc349, 0xc34a, 0xc34b, 0xc34c, 0xc34d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc34e, 0xc34f, 0xc350, 0xc351, 0xc352, 0xc353, 0xc354, 0xc355, 0xc356, 0xc357, 0xc358, 0xc359, 0xc35a, 0xc35b, 0xc35c, 0xc35d, 0xc35e, 0xc35f, 0xc360, 0xc361, 0xc362, 0xc363, 0xc364, 0xc365, 0xc366, 0xc367, 0xc36a, 0xc36b, 0xc36d, 0xc36e, 0xc36f, 0xc371, 0xc373, 0xc374, 0xc375, 0xc376, 0xc377, 0xc37a, 0xc37b, 0xc37e, 0xc37f, 0xc380, 0xc381, 0xc382, 0xc383, 0xc385, 0xc386, 0xc387, 0xc389, 0xc38a, 0xc38b, 0xc38d, 0xc38e, 0xc38f, 0xc390, 0xc391, 0xc392, 0xc393, 0xc394, 0xc395, 0xc396, 0xc397, 0xc398, 0xc399, 0xc39a, 0xc39b, 0xc39c, 0xc39d, 0xc39e, 0xc39f, 0xc3a0, 0xc3a1, 0xc3a2, 0xc3a3, 0xc3a4, 0xc3a5, 0xc3a6, 0xc3a7, 0xc3a8, 0xc3a9, 0xc3aa, 0xc3ab, 0xc3ac, 0xc3ad, 0xc3ae, 0xc3af, 0xc3b0, 0xc3b1, 0xc3b2, 0xc3b3, 0xc3b4, 0xc3b5, 0xc3b6, 0xc3b7, 0xc3b8, 0xc3b9, 0xc3ba, 0xc3bb, 0xc3bc, 0xc3bd, 0xc3be, 0xc3bf, 0xc3c1, 0xc3c2, 0xc3c3, 0xc3c4, 0xc3c5, 0xc3c6, 0xc3c7, 0xc3c8, 0xc3c9, 0xc3ca, 0xc3cb, 0xc3cc, 0xc3cd, 0xc3ce, 0xc3cf, 0xc3d0, 0xc3d1, 0xc3d2, 0xc3d3, 0xc3d4, 0xc3d5, 0xc3d6, 0xc3d7, 0xc3da, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9c40[ 192 ] = { 0xfffd, 0xc3db, 0xc3dd, 0xc3de, 0xc3e1, 0xc3e3, 0xc3e4, 0xc3e5, 0xc3e6, 0xc3e7, 0xc3ea, 0xc3eb, 0xc3ec, 0xc3ee, 0xc3ef, 0xc3f0, 0xc3f1, 0xc3f2, 0xc3f3, 0xc3f6, 0xc3f7, 0xc3f9, 0xc3fa, 0xc3fb, 0xc3fc, 0xc3fd, 0xc3fe, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc3ff, 0xc400, 0xc401, 0xc402, 0xc403, 0xc404, 0xc405, 0xc406, 0xc407, 0xc409, 0xc40a, 0xc40b, 0xc40c, 0xc40d, 0xc40e, 0xc40f, 0xc411, 0xc412, 0xc413, 0xc414, 0xc415, 0xc416, 0xc417, 0xc418, 0xc419, 0xc41a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc41b, 0xc41c, 0xc41d, 0xc41e, 0xc41f, 0xc420, 0xc421, 0xc422, 0xc423, 0xc425, 0xc426, 0xc427, 0xc428, 0xc429, 0xc42a, 0xc42b, 0xc42d, 0xc42e, 0xc42f, 0xc431, 0xc432, 0xc433, 0xc435, 0xc436, 0xc437, 0xc438, 0xc439, 0xc43a, 0xc43b, 0xc43e, 0xc43f, 0xc440, 0xc441, 0xc442, 0xc443, 0xc444, 0xc445, 0xc446, 0xc447, 0xc449, 0xc44a, 0xc44b, 0xc44c, 0xc44d, 0xc44e, 0xc44f, 0xc450, 0xc451, 0xc452, 0xc453, 0xc454, 0xc455, 0xc456, 0xc457, 0xc458, 0xc459, 0xc45a, 0xc45b, 0xc45c, 0xc45d, 0xc45e, 0xc45f, 0xc460, 0xc461, 0xc462, 0xc463, 0xc466, 0xc467, 0xc469, 0xc46a, 0xc46b, 0xc46d, 0xc46e, 0xc46f, 0xc470, 0xc471, 0xc472, 0xc473, 0xc476, 0xc477, 0xc478, 0xc47a, 0xc47b, 0xc47c, 0xc47d, 0xc47e, 0xc47f, 0xc481, 0xc482, 0xc483, 0xc484, 0xc485, 0xc486, 0xc487, 0xc488, 0xc489, 0xc48a, 0xc48b, 0xc48c, 0xc48d, 0xc48e, 0xc48f, 0xc490, 0xc491, 0xc492, 0xc493, 0xc495, 0xc496, 0xc497, 0xc498, 0xc499, 0xc49a, 0xc49b, 0xc49d, 0xc49e, 0xc49f, 0xc4a0, 0xc4a1, 0xc4a2, 0xc4a3, 0xc4a4, 0xc4a5, 0xc4a6, 0xc4a7, 0xc4a8, 0xc4a9, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9d40[ 192 ] = { 0xfffd, 0xc4aa, 0xc4ab, 0xc4ac, 0xc4ad, 0xc4ae, 0xc4af, 0xc4b0, 0xc4b1, 0xc4b2, 0xc4b3, 0xc4b4, 0xc4b5, 0xc4b6, 0xc4b7, 0xc4b9, 0xc4ba, 0xc4bb, 0xc4bd, 0xc4be, 0xc4bf, 0xc4c0, 0xc4c1, 0xc4c2, 0xc4c3, 0xc4c4, 0xc4c5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc4c6, 0xc4c7, 0xc4c8, 0xc4c9, 0xc4ca, 0xc4cb, 0xc4cc, 0xc4cd, 0xc4ce, 0xc4cf, 0xc4d0, 0xc4d1, 0xc4d2, 0xc4d3, 0xc4d4, 0xc4d5, 0xc4d6, 0xc4d7, 0xc4d8, 0xc4d9, 0xc4da, 0xc4db, 0xc4dc, 0xc4dd, 0xc4de, 0xc4df, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc4e0, 0xc4e1, 0xc4e2, 0xc4e3, 0xc4e4, 0xc4e5, 0xc4e6, 0xc4e7, 0xc4e8, 0xc4ea, 0xc4eb, 0xc4ec, 0xc4ed, 0xc4ee, 0xc4ef, 0xc4f2, 0xc4f3, 0xc4f5, 0xc4f6, 0xc4f7, 0xc4f9, 0xc4fb, 0xc4fc, 0xc4fd, 0xc4fe, 0xc502, 0xc503, 0xc504, 0xc505, 0xc506, 0xc507, 0xc508, 0xc509, 0xc50a, 0xc50b, 0xc50d, 0xc50e, 0xc50f, 0xc511, 0xc512, 0xc513, 0xc515, 0xc516, 0xc517, 0xc518, 0xc519, 0xc51a, 0xc51b, 0xc51d, 0xc51e, 0xc51f, 0xc520, 0xc521, 0xc522, 0xc523, 0xc524, 0xc525, 0xc526, 0xc527, 0xc52a, 0xc52b, 0xc52d, 0xc52e, 0xc52f, 0xc531, 0xc532, 0xc533, 0xc534, 0xc535, 0xc536, 0xc537, 0xc53a, 0xc53c, 0xc53e, 0xc53f, 0xc540, 0xc541, 0xc542, 0xc543, 0xc546, 0xc547, 0xc54b, 0xc54f, 0xc550, 0xc551, 0xc552, 0xc556, 0xc55a, 0xc55b, 0xc55c, 0xc55f, 0xc562, 0xc563, 0xc565, 0xc566, 0xc567, 0xc569, 0xc56a, 0xc56b, 0xc56c, 0xc56d, 0xc56e, 0xc56f, 0xc572, 0xc576, 0xc577, 0xc578, 0xc579, 0xc57a, 0xc57b, 0xc57e, 0xc57f, 0xc581, 0xc582, 0xc583, 0xc585, 0xc586, 0xc588, 0xc589, 0xc58a, 0xc58b, 0xc58e, 0xc590, 0xc592, 0xc593, 0xc594, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9e40[ 192 ] = { 0xfffd, 0xc596, 0xc599, 0xc59a, 0xc59b, 0xc59d, 0xc59e, 0xc59f, 0xc5a1, 0xc5a2, 0xc5a3, 0xc5a4, 0xc5a5, 0xc5a6, 0xc5a7, 0xc5a8, 0xc5aa, 0xc5ab, 0xc5ac, 0xc5ad, 0xc5ae, 0xc5af, 0xc5b0, 0xc5b1, 0xc5b2, 0xc5b3, 0xc5b6, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc5b7, 0xc5ba, 0xc5bf, 0xc5c0, 0xc5c1, 0xc5c2, 0xc5c3, 0xc5cb, 0xc5cd, 0xc5cf, 0xc5d2, 0xc5d3, 0xc5d5, 0xc5d6, 0xc5d7, 0xc5d9, 0xc5da, 0xc5db, 0xc5dc, 0xc5dd, 0xc5de, 0xc5df, 0xc5e2, 0xc5e4, 0xc5e6, 0xc5e7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc5e8, 0xc5e9, 0xc5ea, 0xc5eb, 0xc5ef, 0xc5f1, 0xc5f2, 0xc5f3, 0xc5f5, 0xc5f8, 0xc5f9, 0xc5fa, 0xc5fb, 0xc602, 0xc603, 0xc604, 0xc609, 0xc60a, 0xc60b, 0xc60d, 0xc60e, 0xc60f, 0xc611, 0xc612, 0xc613, 0xc614, 0xc615, 0xc616, 0xc617, 0xc61a, 0xc61d, 0xc61e, 0xc61f, 0xc620, 0xc621, 0xc622, 0xc623, 0xc626, 0xc627, 0xc629, 0xc62a, 0xc62b, 0xc62f, 0xc631, 0xc632, 0xc636, 0xc638, 0xc63a, 0xc63c, 0xc63d, 0xc63e, 0xc63f, 0xc642, 0xc643, 0xc645, 0xc646, 0xc647, 0xc649, 0xc64a, 0xc64b, 0xc64c, 0xc64d, 0xc64e, 0xc64f, 0xc652, 0xc656, 0xc657, 0xc658, 0xc659, 0xc65a, 0xc65b, 0xc65e, 0xc65f, 0xc661, 0xc662, 0xc663, 0xc664, 0xc665, 0xc666, 0xc667, 0xc668, 0xc669, 0xc66a, 0xc66b, 0xc66d, 0xc66e, 0xc670, 0xc672, 0xc673, 0xc674, 0xc675, 0xc676, 0xc677, 0xc67a, 0xc67b, 0xc67d, 0xc67e, 0xc67f, 0xc681, 0xc682, 0xc683, 0xc684, 0xc685, 0xc686, 0xc687, 0xc68a, 0xc68c, 0xc68e, 0xc68f, 0xc690, 0xc691, 0xc692, 0xc693, 0xc696, 0xc697, 0xc699, 0xc69a, 0xc69b, 0xc69d, 0xc69e, 0xc69f, 0xc6a0, 0xc6a1, 0xc6a2, 0xc6a3, 0xc6a6, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9f40[ 192 ] = { 0xfffd, 0xc6a8, 0xc6aa, 0xc6ab, 0xc6ac, 0xc6ad, 0xc6ae, 0xc6af, 0xc6b2, 0xc6b3, 0xc6b5, 0xc6b6, 0xc6b7, 0xc6bb, 0xc6bc, 0xc6bd, 0xc6be, 0xc6bf, 0xc6c2, 0xc6c4, 0xc6c6, 0xc6c7, 0xc6c8, 0xc6c9, 0xc6ca, 0xc6cb, 0xc6ce, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc6cf, 0xc6d1, 0xc6d2, 0xc6d3, 0xc6d5, 0xc6d6, 0xc6d7, 0xc6d8, 0xc6d9, 0xc6da, 0xc6db, 0xc6de, 0xc6df, 0xc6e2, 0xc6e3, 0xc6e4, 0xc6e5, 0xc6e6, 0xc6e7, 0xc6ea, 0xc6eb, 0xc6ed, 0xc6ee, 0xc6ef, 0xc6f1, 0xc6f2, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc6f3, 0xc6f4, 0xc6f5, 0xc6f6, 0xc6f7, 0xc6fa, 0xc6fb, 0xc6fc, 0xc6fe, 0xc6ff, 0xc700, 0xc701, 0xc702, 0xc703, 0xc706, 0xc707, 0xc709, 0xc70a, 0xc70b, 0xc70d, 0xc70e, 0xc70f, 0xc710, 0xc711, 0xc712, 0xc713, 0xc716, 0xc718, 0xc71a, 0xc71b, 0xc71c, 0xc71d, 0xc71e, 0xc71f, 0xc722, 0xc723, 0xc725, 0xc726, 0xc727, 0xc729, 0xc72a, 0xc72b, 0xc72c, 0xc72d, 0xc72e, 0xc72f, 0xc732, 0xc734, 0xc736, 0xc738, 0xc739, 0xc73a, 0xc73b, 0xc73e, 0xc73f, 0xc741, 0xc742, 0xc743, 0xc745, 0xc746, 0xc747, 0xc748, 0xc749, 0xc74b, 0xc74e, 0xc750, 0xc759, 0xc75a, 0xc75b, 0xc75d, 0xc75e, 0xc75f, 0xc761, 0xc762, 0xc763, 0xc764, 0xc765, 0xc766, 0xc767, 0xc769, 0xc76a, 0xc76c, 0xc76d, 0xc76e, 0xc76f, 0xc770, 0xc771, 0xc772, 0xc773, 0xc776, 0xc777, 0xc779, 0xc77a, 0xc77b, 0xc77f, 0xc780, 0xc781, 0xc782, 0xc786, 0xc78b, 0xc78c, 0xc78d, 0xc78f, 0xc792, 0xc793, 0xc795, 0xc799, 0xc79b, 0xc79c, 0xc79d, 0xc79e, 0xc79f, 0xc7a2, 0xc7a7, 0xc7a8, 0xc7a9, 0xc7aa, 0xc7ab, 0xc7ae, 0xc7af, 0xc7b1, 0xc7b2, 0xc7b3, 0xc7b5, 0xc7b6, 0xc7b7, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa040[ 192 ] = { 0xfffd, 0xc7b8, 0xc7b9, 0xc7ba, 0xc7bb, 0xc7be, 0xc7c2, 0xc7c3, 0xc7c4, 0xc7c5, 0xc7c6, 0xc7c7, 0xc7ca, 0xc7cb, 0xc7cd, 0xc7cf, 0xc7d1, 0xc7d2, 0xc7d3, 0xc7d4, 0xc7d5, 0xc7d6, 0xc7d7, 0xc7d9, 0xc7da, 0xc7db, 0xc7dc, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc7de, 0xc7df, 0xc7e0, 0xc7e1, 0xc7e2, 0xc7e3, 0xc7e5, 0xc7e6, 0xc7e7, 0xc7e9, 0xc7ea, 0xc7eb, 0xc7ed, 0xc7ee, 0xc7ef, 0xc7f0, 0xc7f1, 0xc7f2, 0xc7f3, 0xc7f4, 0xc7f5, 0xc7f6, 0xc7f7, 0xc7f8, 0xc7f9, 0xc7fa, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc7fb, 0xc7fc, 0xc7fd, 0xc7fe, 0xc7ff, 0xc802, 0xc803, 0xc805, 0xc806, 0xc807, 0xc809, 0xc80b, 0xc80c, 0xc80d, 0xc80e, 0xc80f, 0xc812, 0xc814, 0xc817, 0xc818, 0xc819, 0xc81a, 0xc81b, 0xc81e, 0xc81f, 0xc821, 0xc822, 0xc823, 0xc825, 0xc826, 0xc827, 0xc828, 0xc829, 0xc82a, 0xc82b, 0xc82e, 0xc830, 0xc832, 0xc833, 0xc834, 0xc835, 0xc836, 0xc837, 0xc839, 0xc83a, 0xc83b, 0xc83d, 0xc83e, 0xc83f, 0xc841, 0xc842, 0xc843, 0xc844, 0xc845, 0xc846, 0xc847, 0xc84a, 0xc84b, 0xc84e, 0xc84f, 0xc850, 0xc851, 0xc852, 0xc853, 0xc855, 0xc856, 0xc857, 0xc858, 0xc859, 0xc85a, 0xc85b, 0xc85c, 0xc85d, 0xc85e, 0xc85f, 0xc860, 0xc861, 0xc862, 0xc863, 0xc864, 0xc865, 0xc866, 0xc867, 0xc868, 0xc869, 0xc86a, 0xc86b, 0xc86c, 0xc86d, 0xc86e, 0xc86f, 0xc872, 0xc873, 0xc875, 0xc876, 0xc877, 0xc879, 0xc87b, 0xc87c, 0xc87d, 0xc87e, 0xc87f, 0xc882, 0xc884, 0xc888, 0xc889, 0xc88a, 0xc88e, 0xc88f, 0xc890, 0xc891, 0xc892, 0xc893, 0xc895, 0xc896, 0xc897, 0xc898, 0xc899, 0xc89a, 0xc89b, 0xc89c, 0xc89e, 0xc8a0, 0xc8a2, 0xc8a3, 0xc8a4, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa140[ 192 ] = { 0xfffd, 0xc8a5, 0xc8a6, 0xc8a7, 0xc8a9, 0xc8aa, 0xc8ab, 0xc8ac, 0xc8ad, 0xc8ae, 0xc8af, 0xc8b0, 0xc8b1, 0xc8b2, 0xc8b3, 0xc8b4, 0xc8b5, 0xc8b6, 0xc8b7, 0xc8b8, 0xc8b9, 0xc8ba, 0xc8bb, 0xc8be, 0xc8bf, 0xc8c0, 0xc8c1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc8c2, 0xc8c3, 0xc8c5, 0xc8c6, 0xc8c7, 0xc8c9, 0xc8ca, 0xc8cb, 0xc8cd, 0xc8ce, 0xc8cf, 0xc8d0, 0xc8d1, 0xc8d2, 0xc8d3, 0xc8d6, 0xc8d8, 0xc8da, 0xc8db, 0xc8dc, 0xc8dd, 0xc8de, 0xc8df, 0xc8e2, 0xc8e3, 0xc8e5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc8e6, 0xc8e7, 0xc8e8, 0xc8e9, 0xc8ea, 0xc8eb, 0xc8ec, 0xc8ed, 0xc8ee, 0xc8ef, 0xc8f0, 0xc8f1, 0xc8f2, 0xc8f3, 0xc8f4, 0xc8f6, 0xc8f7, 0xc8f8, 0xc8f9, 0xc8fa, 0xc8fb, 0xc8fe, 0xc8ff, 0xc901, 0xc902, 0xc903, 0xc907, 0xc908, 0xc909, 0xc90a, 0xc90b, 0xc90e, 0x3000, 0x3001, 0x3002, 0x00b7, 0x2025, 0x2026, 0x00a8, 0x3003, 0x00ad, 0x2015, 0x2225, 0xff3c, 0x223c, 0x2018, 0x2019, 0x201c, 0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e, 0x300f, 0x3010, 0x3011, 0x00b1, 0x00d7, 0x00f7, 0x2260, 0x2264, 0x2265, 0x221e, 0x2234, 0x00b0, 0x2032, 0x2033, 0x2103, 0x212b, 0xffe0, 0xffe1, 0xffe5, 0x2642, 0x2640, 0x2220, 0x22a5, 0x2312, 0x2202, 0x2207, 0x2261, 0x2252, 0x00a7, 0x203b, 0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x2192, 0x2190, 0x2191, 0x2193, 0x2194, 0x3013, 0x226a, 0x226b, 0x221a, 0x223d, 0x221d, 0x2235, 0x222b, 0x222c, 0x2208, 0x220b, 0x2286, 0x2287, 0x2282, 0x2283, 0x222a, 0x2229, 0x2227, 0x2228, 0xffe2, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa240[ 168 ] = { 0xfffd, 0xc910, 0xc912, 0xc913, 0xc914, 0xc915, 0xc916, 0xc917, 0xc919, 0xc91a, 0xc91b, 0xc91c, 0xc91d, 0xc91e, 0xc91f, 0xc920, 0xc921, 0xc922, 0xc923, 0xc924, 0xc925, 0xc926, 0xc927, 0xc928, 0xc929, 0xc92a, 0xc92b, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc92d, 0xc92e, 0xc92f, 0xc930, 0xc931, 0xc932, 0xc933, 0xc935, 0xc936, 0xc937, 0xc938, 0xc939, 0xc93a, 0xc93b, 0xc93c, 0xc93d, 0xc93e, 0xc93f, 0xc940, 0xc941, 0xc942, 0xc943, 0xc944, 0xc945, 0xc946, 0xc947, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc948, 0xc949, 0xc94a, 0xc94b, 0xc94c, 0xc94d, 0xc94e, 0xc94f, 0xc952, 0xc953, 0xc955, 0xc956, 0xc957, 0xc959, 0xc95a, 0xc95b, 0xc95c, 0xc95d, 0xc95e, 0xc95f, 0xc962, 0xc964, 0xc965, 0xc966, 0xc967, 0xc968, 0xc969, 0xc96a, 0xc96b, 0xc96d, 0xc96e, 0xc96f, 0x21d2, 0x21d4, 0x2200, 0x2203, 0x00b4, 0xff5e, 0x02c7, 0x02d8, 0x02dd, 0x02da, 0x02d9, 0x00b8, 0x02db, 0x00a1, 0x00bf, 0x02d0, 0x222e, 0x2211, 0x220f, 0x00a4, 0x2109, 0x2030, 0x25c1, 0x25c0, 0x25b7, 0x25b6, 0x2664, 0x2660, 0x2661, 0x2665, 0x2667, 0x2663, 0x2299, 0x25c8, 0x25a3, 0x25d0, 0x25d1, 0x2592, 0x25a4, 0x25a5, 0x25a8, 0x25a7, 0x25a6, 0x25a9, 0x2668, 0x260f, 0x260e, 0x261c, 0x261e, 0x00b6, 0x2020, 0x2021, 0x2195, 0x2197, 0x2199, 0x2196, 0x2198, 0x266d, 0x2669, 0x266a, 0x266c, 0x327f, 0x321c, 0x2116, 0x33c7, 0x2122, 0x33c2, 0x33d8, 0x2121, 0x20ac, 0x00ae }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa340[ 192 ] = { 0xfffd, 0xc971, 0xc972, 0xc973, 0xc975, 0xc976, 0xc977, 0xc978, 0xc979, 0xc97a, 0xc97b, 0xc97d, 0xc97e, 0xc97f, 0xc980, 0xc981, 0xc982, 0xc983, 0xc984, 0xc985, 0xc986, 0xc987, 0xc98a, 0xc98b, 0xc98d, 0xc98e, 0xc98f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc991, 0xc992, 0xc993, 0xc994, 0xc995, 0xc996, 0xc997, 0xc99a, 0xc99c, 0xc99e, 0xc99f, 0xc9a0, 0xc9a1, 0xc9a2, 0xc9a3, 0xc9a4, 0xc9a5, 0xc9a6, 0xc9a7, 0xc9a8, 0xc9a9, 0xc9aa, 0xc9ab, 0xc9ac, 0xc9ad, 0xc9ae, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc9af, 0xc9b0, 0xc9b1, 0xc9b2, 0xc9b3, 0xc9b4, 0xc9b5, 0xc9b6, 0xc9b7, 0xc9b8, 0xc9b9, 0xc9ba, 0xc9bb, 0xc9bc, 0xc9bd, 0xc9be, 0xc9bf, 0xc9c2, 0xc9c3, 0xc9c5, 0xc9c6, 0xc9c9, 0xc9cb, 0xc9cc, 0xc9cd, 0xc9ce, 0xc9cf, 0xc9d2, 0xc9d4, 0xc9d7, 0xc9d8, 0xc9db, 0xff01, 0xff02, 0xff03, 0xff04, 0xff05, 0xff06, 0xff07, 0xff08, 0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, 0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, 0xff20, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38, 0xff39, 0xff3a, 0xff3b, 0xffe6, 0xff3d, 0xff3e, 0xff3f, 0xff40, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, 0xff58, 0xff59, 0xff5a, 0xff5b, 0xff5c, 0xff5d, 0xffe3, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa440[ 192 ] = { 0xfffd, 0xc9de, 0xc9df, 0xc9e1, 0xc9e3, 0xc9e5, 0xc9e6, 0xc9e8, 0xc9e9, 0xc9ea, 0xc9eb, 0xc9ee, 0xc9f2, 0xc9f3, 0xc9f4, 0xc9f5, 0xc9f6, 0xc9f7, 0xc9fa, 0xc9fb, 0xc9fd, 0xc9fe, 0xc9ff, 0xca01, 0xca02, 0xca03, 0xca04, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xca05, 0xca06, 0xca07, 0xca0a, 0xca0e, 0xca0f, 0xca10, 0xca11, 0xca12, 0xca13, 0xca15, 0xca16, 0xca17, 0xca19, 0xca1a, 0xca1b, 0xca1c, 0xca1d, 0xca1e, 0xca1f, 0xca20, 0xca21, 0xca22, 0xca23, 0xca24, 0xca25, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xca26, 0xca27, 0xca28, 0xca2a, 0xca2b, 0xca2c, 0xca2d, 0xca2e, 0xca2f, 0xca30, 0xca31, 0xca32, 0xca33, 0xca34, 0xca35, 0xca36, 0xca37, 0xca38, 0xca39, 0xca3a, 0xca3b, 0xca3c, 0xca3d, 0xca3e, 0xca3f, 0xca40, 0xca41, 0xca42, 0xca43, 0xca44, 0xca45, 0xca46, 0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3138, 0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, 0x3140, 0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148, 0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f, 0x3150, 0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156, 0x3157, 0x3158, 0x3159, 0x315a, 0x315b, 0x315c, 0x315d, 0x315e, 0x315f, 0x3160, 0x3161, 0x3162, 0x3163, 0x3164, 0x3165, 0x3166, 0x3167, 0x3168, 0x3169, 0x316a, 0x316b, 0x316c, 0x316d, 0x316e, 0x316f, 0x3170, 0x3171, 0x3172, 0x3173, 0x3174, 0x3175, 0x3176, 0x3177, 0x3178, 0x3179, 0x317a, 0x317b, 0x317c, 0x317d, 0x317e, 0x317f, 0x3180, 0x3181, 0x3182, 0x3183, 0x3184, 0x3185, 0x3186, 0x3187, 0x3188, 0x3189, 0x318a, 0x318b, 0x318c, 0x318d, 0x318e, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa540[ 192 ] = { 0xfffd, 0xca47, 0xca48, 0xca49, 0xca4a, 0xca4b, 0xca4e, 0xca4f, 0xca51, 0xca52, 0xca53, 0xca55, 0xca56, 0xca57, 0xca58, 0xca59, 0xca5a, 0xca5b, 0xca5e, 0xca62, 0xca63, 0xca64, 0xca65, 0xca66, 0xca67, 0xca69, 0xca6a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xca6b, 0xca6c, 0xca6d, 0xca6e, 0xca6f, 0xca70, 0xca71, 0xca72, 0xca73, 0xca74, 0xca75, 0xca76, 0xca77, 0xca78, 0xca79, 0xca7a, 0xca7b, 0xca7c, 0xca7e, 0xca7f, 0xca80, 0xca81, 0xca82, 0xca83, 0xca85, 0xca86, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xca87, 0xca88, 0xca89, 0xca8a, 0xca8b, 0xca8c, 0xca8d, 0xca8e, 0xca8f, 0xca90, 0xca91, 0xca92, 0xca93, 0xca94, 0xca95, 0xca96, 0xca97, 0xca99, 0xca9a, 0xca9b, 0xca9c, 0xca9d, 0xca9e, 0xca9f, 0xcaa0, 0xcaa1, 0xcaa2, 0xcaa3, 0xcaa4, 0xcaa5, 0xcaa6, 0xcaa7, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa640[ 168 ] = { 0xfffd, 0xcaa8, 0xcaa9, 0xcaaa, 0xcaab, 0xcaac, 0xcaad, 0xcaae, 0xcaaf, 0xcab0, 0xcab1, 0xcab2, 0xcab3, 0xcab4, 0xcab5, 0xcab6, 0xcab7, 0xcab8, 0xcab9, 0xcaba, 0xcabb, 0xcabe, 0xcabf, 0xcac1, 0xcac2, 0xcac3, 0xcac5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcac6, 0xcac7, 0xcac8, 0xcac9, 0xcaca, 0xcacb, 0xcace, 0xcad0, 0xcad2, 0xcad4, 0xcad5, 0xcad6, 0xcad7, 0xcada, 0xcadb, 0xcadc, 0xcadd, 0xcade, 0xcadf, 0xcae1, 0xcae2, 0xcae3, 0xcae4, 0xcae5, 0xcae6, 0xcae7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcae8, 0xcae9, 0xcaea, 0xcaeb, 0xcaed, 0xcaee, 0xcaef, 0xcaf0, 0xcaf1, 0xcaf2, 0xcaf3, 0xcaf5, 0xcaf6, 0xcaf7, 0xcaf8, 0xcaf9, 0xcafa, 0xcafb, 0xcafc, 0xcafd, 0xcafe, 0xcaff, 0xcb00, 0xcb01, 0xcb02, 0xcb03, 0xcb04, 0xcb05, 0xcb06, 0xcb07, 0xcb09, 0xcb0a, 0x2500, 0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, 0x252c, 0x2524, 0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, 0x251b, 0x2517, 0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, 0x252f, 0x2528, 0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, 0x2542, 0x2512, 0x2511, 0x251a, 0x2519, 0x2516, 0x2515, 0x250e, 0x250d, 0x251e, 0x251f, 0x2521, 0x2522, 0x2526, 0x2527, 0x2529, 0x252a, 0x252d, 0x252e, 0x2531, 0x2532, 0x2535, 0x2536, 0x2539, 0x253a, 0x253d, 0x253e, 0x2540, 0x2541, 0x2543, 0x2544, 0x2545, 0x2546, 0x2547, 0x2548, 0x2549, 0x254a, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa740[ 176 ] = { 0xfffd, 0xcb0b, 0xcb0c, 0xcb0d, 0xcb0e, 0xcb0f, 0xcb11, 0xcb12, 0xcb13, 0xcb15, 0xcb16, 0xcb17, 0xcb19, 0xcb1a, 0xcb1b, 0xcb1c, 0xcb1d, 0xcb1e, 0xcb1f, 0xcb22, 0xcb23, 0xcb24, 0xcb25, 0xcb26, 0xcb27, 0xcb28, 0xcb29, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcb2a, 0xcb2b, 0xcb2c, 0xcb2d, 0xcb2e, 0xcb2f, 0xcb30, 0xcb31, 0xcb32, 0xcb33, 0xcb34, 0xcb35, 0xcb36, 0xcb37, 0xcb38, 0xcb39, 0xcb3a, 0xcb3b, 0xcb3c, 0xcb3d, 0xcb3e, 0xcb3f, 0xcb40, 0xcb42, 0xcb43, 0xcb44, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcb45, 0xcb46, 0xcb47, 0xcb4a, 0xcb4b, 0xcb4d, 0xcb4e, 0xcb4f, 0xcb51, 0xcb52, 0xcb53, 0xcb54, 0xcb55, 0xcb56, 0xcb57, 0xcb5a, 0xcb5b, 0xcb5c, 0xcb5e, 0xcb5f, 0xcb60, 0xcb61, 0xcb62, 0xcb63, 0xcb65, 0xcb66, 0xcb67, 0xcb68, 0xcb69, 0xcb6a, 0xcb6b, 0xcb6c, 0x3395, 0x3396, 0x3397, 0x2113, 0x3398, 0x33c4, 0x33a3, 0x33a4, 0x33a5, 0x33a6, 0x3399, 0x339a, 0x339b, 0x339c, 0x339d, 0x339e, 0x339f, 0x33a0, 0x33a1, 0x33a2, 0x33ca, 0x338d, 0x338e, 0x338f, 0x33cf, 0x3388, 0x3389, 0x33c8, 0x33a7, 0x33a8, 0x33b0, 0x33b1, 0x33b2, 0x33b3, 0x33b4, 0x33b5, 0x33b6, 0x33b7, 0x33b8, 0x33b9, 0x3380, 0x3381, 0x3382, 0x3383, 0x3384, 0x33ba, 0x33bb, 0x33bc, 0x33bd, 0x33be, 0x33bf, 0x3390, 0x3391, 0x3392, 0x3393, 0x3394, 0x2126, 0x33c0, 0x33c1, 0x338a, 0x338b, 0x338c, 0x33d6, 0x33c5, 0x33ad, 0x33ae, 0x33af, 0x33db, 0x33a9, 0x33aa, 0x33ab, 0x33ac, 0x33dd, 0x33d0, 0x33d3, 0x33c3, 0x33c9, 0x33dc, 0x33c6 }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa840[ 192 ] = { 0xfffd, 0xcb6d, 0xcb6e, 0xcb6f, 0xcb70, 0xcb71, 0xcb72, 0xcb73, 0xcb74, 0xcb75, 0xcb76, 0xcb77, 0xcb7a, 0xcb7b, 0xcb7c, 0xcb7d, 0xcb7e, 0xcb7f, 0xcb80, 0xcb81, 0xcb82, 0xcb83, 0xcb84, 0xcb85, 0xcb86, 0xcb87, 0xcb88, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcb89, 0xcb8a, 0xcb8b, 0xcb8c, 0xcb8d, 0xcb8e, 0xcb8f, 0xcb90, 0xcb91, 0xcb92, 0xcb93, 0xcb94, 0xcb95, 0xcb96, 0xcb97, 0xcb98, 0xcb99, 0xcb9a, 0xcb9b, 0xcb9d, 0xcb9e, 0xcb9f, 0xcba0, 0xcba1, 0xcba2, 0xcba3, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcba4, 0xcba5, 0xcba6, 0xcba7, 0xcba8, 0xcba9, 0xcbaa, 0xcbab, 0xcbac, 0xcbad, 0xcbae, 0xcbaf, 0xcbb0, 0xcbb1, 0xcbb2, 0xcbb3, 0xcbb4, 0xcbb5, 0xcbb6, 0xcbb7, 0xcbb9, 0xcbba, 0xcbbb, 0xcbbc, 0xcbbd, 0xcbbe, 0xcbbf, 0xcbc0, 0xcbc1, 0xcbc2, 0xcbc3, 0xcbc4, 0x00c6, 0x00d0, 0x00aa, 0x0126, 0xfffd, 0x0132, 0xfffd, 0x013f, 0x0141, 0x00d8, 0x0152, 0x00ba, 0x00de, 0x0166, 0x014a, 0xfffd, 0x3260, 0x3261, 0x3262, 0x3263, 0x3264, 0x3265, 0x3266, 0x3267, 0x3268, 0x3269, 0x326a, 0x326b, 0x326c, 0x326d, 0x326e, 0x326f, 0x3270, 0x3271, 0x3272, 0x3273, 0x3274, 0x3275, 0x3276, 0x3277, 0x3278, 0x3279, 0x327a, 0x327b, 0x24d0, 0x24d1, 0x24d2, 0x24d3, 0x24d4, 0x24d5, 0x24d6, 0x24d7, 0x24d8, 0x24d9, 0x24da, 0x24db, 0x24dc, 0x24dd, 0x24de, 0x24df, 0x24e0, 0x24e1, 0x24e2, 0x24e3, 0x24e4, 0x24e5, 0x24e6, 0x24e7, 0x24e8, 0x24e9, 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x00bd, 0x2153, 0x2154, 0x00bc, 0x00be, 0x215b, 0x215c, 0x215d, 0x215e, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa940[ 192 ] = { 0xfffd, 0xcbc5, 0xcbc6, 0xcbc7, 0xcbc8, 0xcbc9, 0xcbca, 0xcbcb, 0xcbcc, 0xcbcd, 0xcbce, 0xcbcf, 0xcbd0, 0xcbd1, 0xcbd2, 0xcbd3, 0xcbd5, 0xcbd6, 0xcbd7, 0xcbd8, 0xcbd9, 0xcbda, 0xcbdb, 0xcbdc, 0xcbdd, 0xcbde, 0xcbdf, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcbe0, 0xcbe1, 0xcbe2, 0xcbe3, 0xcbe5, 0xcbe6, 0xcbe8, 0xcbea, 0xcbeb, 0xcbec, 0xcbed, 0xcbee, 0xcbef, 0xcbf0, 0xcbf1, 0xcbf2, 0xcbf3, 0xcbf4, 0xcbf5, 0xcbf6, 0xcbf7, 0xcbf8, 0xcbf9, 0xcbfa, 0xcbfb, 0xcbfc, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcbfd, 0xcbfe, 0xcbff, 0xcc00, 0xcc01, 0xcc02, 0xcc03, 0xcc04, 0xcc05, 0xcc06, 0xcc07, 0xcc08, 0xcc09, 0xcc0a, 0xcc0b, 0xcc0e, 0xcc0f, 0xcc11, 0xcc12, 0xcc13, 0xcc15, 0xcc16, 0xcc17, 0xcc18, 0xcc19, 0xcc1a, 0xcc1b, 0xcc1e, 0xcc1f, 0xcc20, 0xcc23, 0xcc24, 0x00e6, 0x0111, 0x00f0, 0x0127, 0x0131, 0x0133, 0x0138, 0x0140, 0x0142, 0x00f8, 0x0153, 0x00df, 0x00fe, 0x0167, 0x014b, 0x0149, 0x3200, 0x3201, 0x3202, 0x3203, 0x3204, 0x3205, 0x3206, 0x3207, 0x3208, 0x3209, 0x320a, 0x320b, 0x320c, 0x320d, 0x320e, 0x320f, 0x3210, 0x3211, 0x3212, 0x3213, 0x3214, 0x3215, 0x3216, 0x3217, 0x3218, 0x3219, 0x321a, 0x321b, 0x249c, 0x249d, 0x249e, 0x249f, 0x24a0, 0x24a1, 0x24a2, 0x24a3, 0x24a4, 0x24a5, 0x24a6, 0x24a7, 0x24a8, 0x24a9, 0x24aa, 0x24ab, 0x24ac, 0x24ad, 0x24ae, 0x24af, 0x24b0, 0x24b1, 0x24b2, 0x24b3, 0x24b4, 0x24b5, 0x2474, 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d, 0x247e, 0x247f, 0x2480, 0x2481, 0x2482, 0x00b9, 0x00b2, 0x00b3, 0x2074, 0x207f, 0x2081, 0x2082, 0x2083, 0x2084, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaa40[ 184 ] = { 0xfffd, 0xcc25, 0xcc26, 0xcc2a, 0xcc2b, 0xcc2d, 0xcc2f, 0xcc31, 0xcc32, 0xcc33, 0xcc34, 0xcc35, 0xcc36, 0xcc37, 0xcc3a, 0xcc3f, 0xcc40, 0xcc41, 0xcc42, 0xcc43, 0xcc46, 0xcc47, 0xcc49, 0xcc4a, 0xcc4b, 0xcc4d, 0xcc4e, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcc4f, 0xcc50, 0xcc51, 0xcc52, 0xcc53, 0xcc56, 0xcc5a, 0xcc5b, 0xcc5c, 0xcc5d, 0xcc5e, 0xcc5f, 0xcc61, 0xcc62, 0xcc63, 0xcc65, 0xcc67, 0xcc69, 0xcc6a, 0xcc6b, 0xcc6c, 0xcc6d, 0xcc6e, 0xcc6f, 0xcc71, 0xcc72, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcc73, 0xcc74, 0xcc76, 0xcc77, 0xcc78, 0xcc79, 0xcc7a, 0xcc7b, 0xcc7c, 0xcc7d, 0xcc7e, 0xcc7f, 0xcc80, 0xcc81, 0xcc82, 0xcc83, 0xcc84, 0xcc85, 0xcc86, 0xcc87, 0xcc88, 0xcc89, 0xcc8a, 0xcc8b, 0xcc8c, 0xcc8d, 0xcc8e, 0xcc8f, 0xcc90, 0xcc91, 0xcc92, 0xcc93, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068, 0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078, 0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088, 0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090, 0x3091, 0x3092, 0x3093, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xab40[ 184 ] = { 0xfffd, 0xcc94, 0xcc95, 0xcc96, 0xcc97, 0xcc9a, 0xcc9b, 0xcc9d, 0xcc9e, 0xcc9f, 0xcca1, 0xcca2, 0xcca3, 0xcca4, 0xcca5, 0xcca6, 0xcca7, 0xccaa, 0xccae, 0xccaf, 0xccb0, 0xccb1, 0xccb2, 0xccb3, 0xccb6, 0xccb7, 0xccb9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xccba, 0xccbb, 0xccbd, 0xccbe, 0xccbf, 0xccc0, 0xccc1, 0xccc2, 0xccc3, 0xccc6, 0xccc8, 0xccca, 0xcccb, 0xcccc, 0xcccd, 0xccce, 0xcccf, 0xccd1, 0xccd2, 0xccd3, 0xccd5, 0xccd6, 0xccd7, 0xccd8, 0xccd9, 0xccda, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xccdb, 0xccdc, 0xccdd, 0xccde, 0xccdf, 0xcce0, 0xcce1, 0xcce2, 0xcce3, 0xcce5, 0xcce6, 0xcce7, 0xcce8, 0xcce9, 0xccea, 0xcceb, 0xcced, 0xccee, 0xccef, 0xccf1, 0xccf2, 0xccf3, 0xccf4, 0xccf5, 0xccf6, 0xccf7, 0xccf8, 0xccf9, 0xccfa, 0xccfb, 0xccfc, 0xccfd, 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8, 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0, 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8, 0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0, 0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8, 0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0, 0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8, 0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, 0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xac40[ 136 ] = { 0xfffd, 0xccfe, 0xccff, 0xcd00, 0xcd02, 0xcd03, 0xcd04, 0xcd05, 0xcd06, 0xcd07, 0xcd0a, 0xcd0b, 0xcd0d, 0xcd0e, 0xcd0f, 0xcd11, 0xcd12, 0xcd13, 0xcd14, 0xcd15, 0xcd16, 0xcd17, 0xcd1a, 0xcd1c, 0xcd1e, 0xcd1f, 0xcd20, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcd21, 0xcd22, 0xcd23, 0xcd25, 0xcd26, 0xcd27, 0xcd29, 0xcd2a, 0xcd2b, 0xcd2d, 0xcd2e, 0xcd2f, 0xcd30, 0xcd31, 0xcd32, 0xcd33, 0xcd34, 0xcd35, 0xcd36, 0xcd37, 0xcd38, 0xcd3a, 0xcd3b, 0xcd3c, 0xcd3d, 0xcd3e, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcd3f, 0xcd40, 0xcd41, 0xcd42, 0xcd43, 0xcd44, 0xcd45, 0xcd46, 0xcd47, 0xcd48, 0xcd49, 0xcd4a, 0xcd4b, 0xcd4c, 0xcd4d, 0xcd4e, 0xcd4f, 0xcd50, 0xcd51, 0xcd52, 0xcd53, 0xcd54, 0xcd55, 0xcd56, 0xcd57, 0xcd58, 0xcd59, 0xcd5a, 0xcd5b, 0xcd5d, 0xcd5e, 0xcd5f, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xacd0[ 40 ] = { 0xfffd, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xad40[ 96 ] = { 0xfffd, 0xcd61, 0xcd62, 0xcd63, 0xcd65, 0xcd66, 0xcd67, 0xcd68, 0xcd69, 0xcd6a, 0xcd6b, 0xcd6e, 0xcd70, 0xcd72, 0xcd73, 0xcd74, 0xcd75, 0xcd76, 0xcd77, 0xcd79, 0xcd7a, 0xcd7b, 0xcd7c, 0xcd7d, 0xcd7e, 0xcd7f, 0xcd80, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcd81, 0xcd82, 0xcd83, 0xcd84, 0xcd85, 0xcd86, 0xcd87, 0xcd89, 0xcd8a, 0xcd8b, 0xcd8c, 0xcd8d, 0xcd8e, 0xcd8f, 0xcd90, 0xcd91, 0xcd92, 0xcd93, 0xcd96, 0xcd97, 0xcd99, 0xcd9a, 0xcd9b, 0xcd9d, 0xcd9e, 0xcd9f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcda0, 0xcda1, 0xcda2, 0xcda3, 0xcda6, 0xcda8, 0xcdaa, 0xcdab, 0xcdac, 0xcdad, 0xcdae, 0xcdaf, 0xcdb1, 0xcdb2, 0xcdb3, 0xcdb4, 0xcdb5, 0xcdb6, 0xcdb7, 0xcdb8, 0xcdb9, 0xcdba, 0xcdbb, 0xcdbc, 0xcdbd, 0xcdbe, 0xcdbf, 0xcdc0, 0xcdc1, 0xcdc2, 0xcdc3 }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xae40[ 96 ] = { 0xfffd, 0xcdc6, 0xcdc7, 0xcdc8, 0xcdc9, 0xcdca, 0xcdcb, 0xcdcd, 0xcdce, 0xcdcf, 0xcdd1, 0xcdd2, 0xcdd3, 0xcdd4, 0xcdd5, 0xcdd6, 0xcdd7, 0xcdd8, 0xcdd9, 0xcdda, 0xcddb, 0xcddc, 0xcddd, 0xcdde, 0xcddf, 0xcde0, 0xcde1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcde2, 0xcde3, 0xcde4, 0xcde5, 0xcde6, 0xcde7, 0xcde9, 0xcdea, 0xcdeb, 0xcded, 0xcdee, 0xcdef, 0xcdf1, 0xcdf2, 0xcdf3, 0xcdf4, 0xcdf5, 0xcdf6, 0xcdf7, 0xcdfa, 0xcdfc, 0xcdfe, 0xcdff, 0xce00, 0xce01, 0xce02, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xce03, 0xce05, 0xce06, 0xce07, 0xce09, 0xce0a, 0xce0b, 0xce0d, 0xce0e, 0xce0f, 0xce10, 0xce11, 0xce12, 0xce13, 0xce15, 0xce16, 0xce17, 0xce18, 0xce1a, 0xce1b, 0xce1c, 0xce1d, 0xce1e, 0xce1f, 0xce22, 0xce23, 0xce25, 0xce26, 0xce27, 0xce29, 0xce2a }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaf40[ 96 ] = { 0xfffd, 0xce2c, 0xce2d, 0xce2e, 0xce2f, 0xce32, 0xce34, 0xce36, 0xce37, 0xce38, 0xce39, 0xce3a, 0xce3b, 0xce3c, 0xce3d, 0xce3e, 0xce3f, 0xce40, 0xce41, 0xce42, 0xce43, 0xce44, 0xce45, 0xce46, 0xce47, 0xce48, 0xce49, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xce4a, 0xce4b, 0xce4c, 0xce4d, 0xce4e, 0xce4f, 0xce50, 0xce51, 0xce52, 0xce53, 0xce54, 0xce55, 0xce56, 0xce57, 0xce5a, 0xce5b, 0xce5d, 0xce5e, 0xce62, 0xce63, 0xce64, 0xce65, 0xce66, 0xce67, 0xce6a, 0xce6c, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xce6e, 0xce6f, 0xce70, 0xce71, 0xce72, 0xce73, 0xce76, 0xce77, 0xce79, 0xce7a, 0xce7b, 0xce7d, 0xce7e, 0xce7f, 0xce80, 0xce81, 0xce82, 0xce83, 0xce86, 0xce88, 0xce8a, 0xce8b, 0xce8c, 0xce8d, 0xce8e, 0xce8f, 0xce92, 0xce93, 0xce95, 0xce96, 0xce97 }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb040[ 192 ] = { 0xfffd, 0xce9a, 0xce9b, 0xce9c, 0xce9d, 0xce9e, 0xce9f, 0xcea2, 0xcea6, 0xcea7, 0xcea8, 0xcea9, 0xceaa, 0xceab, 0xceae, 0xceaf, 0xceb0, 0xceb1, 0xceb2, 0xceb3, 0xceb4, 0xceb5, 0xceb6, 0xceb7, 0xceb8, 0xceb9, 0xceba, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcebb, 0xcebc, 0xcebd, 0xcebe, 0xcebf, 0xcec0, 0xcec2, 0xcec3, 0xcec4, 0xcec5, 0xcec6, 0xcec7, 0xcec8, 0xcec9, 0xceca, 0xcecb, 0xcecc, 0xcecd, 0xcece, 0xcecf, 0xced0, 0xced1, 0xced2, 0xced3, 0xced4, 0xced5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xced6, 0xced7, 0xced8, 0xced9, 0xceda, 0xcedb, 0xcedc, 0xcedd, 0xcede, 0xcedf, 0xcee0, 0xcee1, 0xcee2, 0xcee3, 0xcee6, 0xcee7, 0xcee9, 0xceea, 0xceed, 0xceee, 0xceef, 0xcef0, 0xcef1, 0xcef2, 0xcef3, 0xcef6, 0xcefa, 0xcefb, 0xcefc, 0xcefd, 0xcefe, 0xceff, 0xac00, 0xac01, 0xac04, 0xac07, 0xac08, 0xac09, 0xac0a, 0xac10, 0xac11, 0xac12, 0xac13, 0xac14, 0xac15, 0xac16, 0xac17, 0xac19, 0xac1a, 0xac1b, 0xac1c, 0xac1d, 0xac20, 0xac24, 0xac2c, 0xac2d, 0xac2f, 0xac30, 0xac31, 0xac38, 0xac39, 0xac3c, 0xac40, 0xac4b, 0xac4d, 0xac54, 0xac58, 0xac5c, 0xac70, 0xac71, 0xac74, 0xac77, 0xac78, 0xac7a, 0xac80, 0xac81, 0xac83, 0xac84, 0xac85, 0xac86, 0xac89, 0xac8a, 0xac8b, 0xac8c, 0xac90, 0xac94, 0xac9c, 0xac9d, 0xac9f, 0xaca0, 0xaca1, 0xaca8, 0xaca9, 0xacaa, 0xacac, 0xacaf, 0xacb0, 0xacb8, 0xacb9, 0xacbb, 0xacbc, 0xacbd, 0xacc1, 0xacc4, 0xacc8, 0xaccc, 0xacd5, 0xacd7, 0xace0, 0xace1, 0xace4, 0xace7, 0xace8, 0xacea, 0xacec, 0xacef, 0xacf0, 0xacf1, 0xacf3, 0xacf5, 0xacf6, 0xacfc, 0xacfd, 0xad00, 0xad04, 0xad06, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb140[ 192 ] = { 0xfffd, 0xcf02, 0xcf03, 0xcf05, 0xcf06, 0xcf07, 0xcf09, 0xcf0a, 0xcf0b, 0xcf0c, 0xcf0d, 0xcf0e, 0xcf0f, 0xcf12, 0xcf14, 0xcf16, 0xcf17, 0xcf18, 0xcf19, 0xcf1a, 0xcf1b, 0xcf1d, 0xcf1e, 0xcf1f, 0xcf21, 0xcf22, 0xcf23, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcf25, 0xcf26, 0xcf27, 0xcf28, 0xcf29, 0xcf2a, 0xcf2b, 0xcf2e, 0xcf32, 0xcf33, 0xcf34, 0xcf35, 0xcf36, 0xcf37, 0xcf39, 0xcf3a, 0xcf3b, 0xcf3c, 0xcf3d, 0xcf3e, 0xcf3f, 0xcf40, 0xcf41, 0xcf42, 0xcf43, 0xcf44, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcf45, 0xcf46, 0xcf47, 0xcf48, 0xcf49, 0xcf4a, 0xcf4b, 0xcf4c, 0xcf4d, 0xcf4e, 0xcf4f, 0xcf50, 0xcf51, 0xcf52, 0xcf53, 0xcf56, 0xcf57, 0xcf59, 0xcf5a, 0xcf5b, 0xcf5d, 0xcf5e, 0xcf5f, 0xcf60, 0xcf61, 0xcf62, 0xcf63, 0xcf66, 0xcf68, 0xcf6a, 0xcf6b, 0xcf6c, 0xad0c, 0xad0d, 0xad0f, 0xad11, 0xad18, 0xad1c, 0xad20, 0xad29, 0xad2c, 0xad2d, 0xad34, 0xad35, 0xad38, 0xad3c, 0xad44, 0xad45, 0xad47, 0xad49, 0xad50, 0xad54, 0xad58, 0xad61, 0xad63, 0xad6c, 0xad6d, 0xad70, 0xad73, 0xad74, 0xad75, 0xad76, 0xad7b, 0xad7c, 0xad7d, 0xad7f, 0xad81, 0xad82, 0xad88, 0xad89, 0xad8c, 0xad90, 0xad9c, 0xad9d, 0xada4, 0xadb7, 0xadc0, 0xadc1, 0xadc4, 0xadc8, 0xadd0, 0xadd1, 0xadd3, 0xaddc, 0xade0, 0xade4, 0xadf8, 0xadf9, 0xadfc, 0xadff, 0xae00, 0xae01, 0xae08, 0xae09, 0xae0b, 0xae0d, 0xae14, 0xae30, 0xae31, 0xae34, 0xae37, 0xae38, 0xae3a, 0xae40, 0xae41, 0xae43, 0xae45, 0xae46, 0xae4a, 0xae4c, 0xae4d, 0xae4e, 0xae50, 0xae54, 0xae56, 0xae5c, 0xae5d, 0xae5f, 0xae60, 0xae61, 0xae65, 0xae68, 0xae69, 0xae6c, 0xae70, 0xae78, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb240[ 192 ] = { 0xfffd, 0xcf6d, 0xcf6e, 0xcf6f, 0xcf72, 0xcf73, 0xcf75, 0xcf76, 0xcf77, 0xcf79, 0xcf7a, 0xcf7b, 0xcf7c, 0xcf7d, 0xcf7e, 0xcf7f, 0xcf81, 0xcf82, 0xcf83, 0xcf84, 0xcf86, 0xcf87, 0xcf88, 0xcf89, 0xcf8a, 0xcf8b, 0xcf8d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcf8e, 0xcf8f, 0xcf90, 0xcf91, 0xcf92, 0xcf93, 0xcf94, 0xcf95, 0xcf96, 0xcf97, 0xcf98, 0xcf99, 0xcf9a, 0xcf9b, 0xcf9c, 0xcf9d, 0xcf9e, 0xcf9f, 0xcfa0, 0xcfa2, 0xcfa3, 0xcfa4, 0xcfa5, 0xcfa6, 0xcfa7, 0xcfa9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcfaa, 0xcfab, 0xcfac, 0xcfad, 0xcfae, 0xcfaf, 0xcfb1, 0xcfb2, 0xcfb3, 0xcfb4, 0xcfb5, 0xcfb6, 0xcfb7, 0xcfb8, 0xcfb9, 0xcfba, 0xcfbb, 0xcfbc, 0xcfbd, 0xcfbe, 0xcfbf, 0xcfc0, 0xcfc1, 0xcfc2, 0xcfc3, 0xcfc5, 0xcfc6, 0xcfc7, 0xcfc8, 0xcfc9, 0xcfca, 0xcfcb, 0xae79, 0xae7b, 0xae7c, 0xae7d, 0xae84, 0xae85, 0xae8c, 0xaebc, 0xaebd, 0xaebe, 0xaec0, 0xaec4, 0xaecc, 0xaecd, 0xaecf, 0xaed0, 0xaed1, 0xaed8, 0xaed9, 0xaedc, 0xaee8, 0xaeeb, 0xaeed, 0xaef4, 0xaef8, 0xaefc, 0xaf07, 0xaf08, 0xaf0d, 0xaf10, 0xaf2c, 0xaf2d, 0xaf30, 0xaf32, 0xaf34, 0xaf3c, 0xaf3d, 0xaf3f, 0xaf41, 0xaf42, 0xaf43, 0xaf48, 0xaf49, 0xaf50, 0xaf5c, 0xaf5d, 0xaf64, 0xaf65, 0xaf79, 0xaf80, 0xaf84, 0xaf88, 0xaf90, 0xaf91, 0xaf95, 0xaf9c, 0xafb8, 0xafb9, 0xafbc, 0xafc0, 0xafc7, 0xafc8, 0xafc9, 0xafcb, 0xafcd, 0xafce, 0xafd4, 0xafdc, 0xafe8, 0xafe9, 0xaff0, 0xaff1, 0xaff4, 0xaff8, 0xb000, 0xb001, 0xb004, 0xb00c, 0xb010, 0xb014, 0xb01c, 0xb01d, 0xb028, 0xb044, 0xb045, 0xb048, 0xb04a, 0xb04c, 0xb04e, 0xb053, 0xb054, 0xb055, 0xb057, 0xb059, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb340[ 192 ] = { 0xfffd, 0xcfcc, 0xcfcd, 0xcfce, 0xcfcf, 0xcfd0, 0xcfd1, 0xcfd2, 0xcfd3, 0xcfd4, 0xcfd5, 0xcfd6, 0xcfd7, 0xcfd8, 0xcfd9, 0xcfda, 0xcfdb, 0xcfdc, 0xcfdd, 0xcfde, 0xcfdf, 0xcfe2, 0xcfe3, 0xcfe5, 0xcfe6, 0xcfe7, 0xcfe9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcfea, 0xcfeb, 0xcfec, 0xcfed, 0xcfee, 0xcfef, 0xcff2, 0xcff4, 0xcff6, 0xcff7, 0xcff8, 0xcff9, 0xcffa, 0xcffb, 0xcffd, 0xcffe, 0xcfff, 0xd001, 0xd002, 0xd003, 0xd005, 0xd006, 0xd007, 0xd008, 0xd009, 0xd00a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd00b, 0xd00c, 0xd00d, 0xd00e, 0xd00f, 0xd010, 0xd012, 0xd013, 0xd014, 0xd015, 0xd016, 0xd017, 0xd019, 0xd01a, 0xd01b, 0xd01c, 0xd01d, 0xd01e, 0xd01f, 0xd020, 0xd021, 0xd022, 0xd023, 0xd024, 0xd025, 0xd026, 0xd027, 0xd028, 0xd029, 0xd02a, 0xd02b, 0xd02c, 0xb05d, 0xb07c, 0xb07d, 0xb080, 0xb084, 0xb08c, 0xb08d, 0xb08f, 0xb091, 0xb098, 0xb099, 0xb09a, 0xb09c, 0xb09f, 0xb0a0, 0xb0a1, 0xb0a2, 0xb0a8, 0xb0a9, 0xb0ab, 0xb0ac, 0xb0ad, 0xb0ae, 0xb0af, 0xb0b1, 0xb0b3, 0xb0b4, 0xb0b5, 0xb0b8, 0xb0bc, 0xb0c4, 0xb0c5, 0xb0c7, 0xb0c8, 0xb0c9, 0xb0d0, 0xb0d1, 0xb0d4, 0xb0d8, 0xb0e0, 0xb0e5, 0xb108, 0xb109, 0xb10b, 0xb10c, 0xb110, 0xb112, 0xb113, 0xb118, 0xb119, 0xb11b, 0xb11c, 0xb11d, 0xb123, 0xb124, 0xb125, 0xb128, 0xb12c, 0xb134, 0xb135, 0xb137, 0xb138, 0xb139, 0xb140, 0xb141, 0xb144, 0xb148, 0xb150, 0xb151, 0xb154, 0xb155, 0xb158, 0xb15c, 0xb160, 0xb178, 0xb179, 0xb17c, 0xb180, 0xb182, 0xb188, 0xb189, 0xb18b, 0xb18d, 0xb192, 0xb193, 0xb194, 0xb198, 0xb19c, 0xb1a8, 0xb1cc, 0xb1d0, 0xb1d4, 0xb1dc, 0xb1dd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb440[ 192 ] = { 0xfffd, 0xd02e, 0xd02f, 0xd030, 0xd031, 0xd032, 0xd033, 0xd036, 0xd037, 0xd039, 0xd03a, 0xd03b, 0xd03d, 0xd03e, 0xd03f, 0xd040, 0xd041, 0xd042, 0xd043, 0xd046, 0xd048, 0xd04a, 0xd04b, 0xd04c, 0xd04d, 0xd04e, 0xd04f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd051, 0xd052, 0xd053, 0xd055, 0xd056, 0xd057, 0xd059, 0xd05a, 0xd05b, 0xd05c, 0xd05d, 0xd05e, 0xd05f, 0xd061, 0xd062, 0xd063, 0xd064, 0xd065, 0xd066, 0xd067, 0xd068, 0xd069, 0xd06a, 0xd06b, 0xd06e, 0xd06f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd071, 0xd072, 0xd073, 0xd075, 0xd076, 0xd077, 0xd078, 0xd079, 0xd07a, 0xd07b, 0xd07e, 0xd07f, 0xd080, 0xd082, 0xd083, 0xd084, 0xd085, 0xd086, 0xd087, 0xd088, 0xd089, 0xd08a, 0xd08b, 0xd08c, 0xd08d, 0xd08e, 0xd08f, 0xd090, 0xd091, 0xd092, 0xd093, 0xd094, 0xb1df, 0xb1e8, 0xb1e9, 0xb1ec, 0xb1f0, 0xb1f9, 0xb1fb, 0xb1fd, 0xb204, 0xb205, 0xb208, 0xb20b, 0xb20c, 0xb214, 0xb215, 0xb217, 0xb219, 0xb220, 0xb234, 0xb23c, 0xb258, 0xb25c, 0xb260, 0xb268, 0xb269, 0xb274, 0xb275, 0xb27c, 0xb284, 0xb285, 0xb289, 0xb290, 0xb291, 0xb294, 0xb298, 0xb299, 0xb29a, 0xb2a0, 0xb2a1, 0xb2a3, 0xb2a5, 0xb2a6, 0xb2aa, 0xb2ac, 0xb2b0, 0xb2b4, 0xb2c8, 0xb2c9, 0xb2cc, 0xb2d0, 0xb2d2, 0xb2d8, 0xb2d9, 0xb2db, 0xb2dd, 0xb2e2, 0xb2e4, 0xb2e5, 0xb2e6, 0xb2e8, 0xb2eb, 0xb2ec, 0xb2ed, 0xb2ee, 0xb2ef, 0xb2f3, 0xb2f4, 0xb2f5, 0xb2f7, 0xb2f8, 0xb2f9, 0xb2fa, 0xb2fb, 0xb2ff, 0xb300, 0xb301, 0xb304, 0xb308, 0xb310, 0xb311, 0xb313, 0xb314, 0xb315, 0xb31c, 0xb354, 0xb355, 0xb356, 0xb358, 0xb35b, 0xb35c, 0xb35e, 0xb35f, 0xb364, 0xb365, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb540[ 192 ] = { 0xfffd, 0xd095, 0xd096, 0xd097, 0xd098, 0xd099, 0xd09a, 0xd09b, 0xd09c, 0xd09d, 0xd09e, 0xd09f, 0xd0a0, 0xd0a1, 0xd0a2, 0xd0a3, 0xd0a6, 0xd0a7, 0xd0a9, 0xd0aa, 0xd0ab, 0xd0ad, 0xd0ae, 0xd0af, 0xd0b0, 0xd0b1, 0xd0b2, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd0b3, 0xd0b6, 0xd0b8, 0xd0ba, 0xd0bb, 0xd0bc, 0xd0bd, 0xd0be, 0xd0bf, 0xd0c2, 0xd0c3, 0xd0c5, 0xd0c6, 0xd0c7, 0xd0ca, 0xd0cb, 0xd0cc, 0xd0cd, 0xd0ce, 0xd0cf, 0xd0d2, 0xd0d6, 0xd0d7, 0xd0d8, 0xd0d9, 0xd0da, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd0db, 0xd0de, 0xd0df, 0xd0e1, 0xd0e2, 0xd0e3, 0xd0e5, 0xd0e6, 0xd0e7, 0xd0e8, 0xd0e9, 0xd0ea, 0xd0eb, 0xd0ee, 0xd0f2, 0xd0f3, 0xd0f4, 0xd0f5, 0xd0f6, 0xd0f7, 0xd0f9, 0xd0fa, 0xd0fb, 0xd0fc, 0xd0fd, 0xd0fe, 0xd0ff, 0xd100, 0xd101, 0xd102, 0xd103, 0xd104, 0xb367, 0xb369, 0xb36b, 0xb36e, 0xb370, 0xb371, 0xb374, 0xb378, 0xb380, 0xb381, 0xb383, 0xb384, 0xb385, 0xb38c, 0xb390, 0xb394, 0xb3a0, 0xb3a1, 0xb3a8, 0xb3ac, 0xb3c4, 0xb3c5, 0xb3c8, 0xb3cb, 0xb3cc, 0xb3ce, 0xb3d0, 0xb3d4, 0xb3d5, 0xb3d7, 0xb3d9, 0xb3db, 0xb3dd, 0xb3e0, 0xb3e4, 0xb3e8, 0xb3fc, 0xb410, 0xb418, 0xb41c, 0xb420, 0xb428, 0xb429, 0xb42b, 0xb434, 0xb450, 0xb451, 0xb454, 0xb458, 0xb460, 0xb461, 0xb463, 0xb465, 0xb46c, 0xb480, 0xb488, 0xb49d, 0xb4a4, 0xb4a8, 0xb4ac, 0xb4b5, 0xb4b7, 0xb4b9, 0xb4c0, 0xb4c4, 0xb4c8, 0xb4d0, 0xb4d5, 0xb4dc, 0xb4dd, 0xb4e0, 0xb4e3, 0xb4e4, 0xb4e6, 0xb4ec, 0xb4ed, 0xb4ef, 0xb4f1, 0xb4f8, 0xb514, 0xb515, 0xb518, 0xb51b, 0xb51c, 0xb524, 0xb525, 0xb527, 0xb528, 0xb529, 0xb52a, 0xb530, 0xb531, 0xb534, 0xb538, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb640[ 192 ] = { 0xfffd, 0xd105, 0xd106, 0xd107, 0xd108, 0xd109, 0xd10a, 0xd10b, 0xd10c, 0xd10e, 0xd10f, 0xd110, 0xd111, 0xd112, 0xd113, 0xd114, 0xd115, 0xd116, 0xd117, 0xd118, 0xd119, 0xd11a, 0xd11b, 0xd11c, 0xd11d, 0xd11e, 0xd11f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd120, 0xd121, 0xd122, 0xd123, 0xd124, 0xd125, 0xd126, 0xd127, 0xd128, 0xd129, 0xd12a, 0xd12b, 0xd12c, 0xd12d, 0xd12e, 0xd12f, 0xd132, 0xd133, 0xd135, 0xd136, 0xd137, 0xd139, 0xd13b, 0xd13c, 0xd13d, 0xd13e, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd13f, 0xd142, 0xd146, 0xd147, 0xd148, 0xd149, 0xd14a, 0xd14b, 0xd14e, 0xd14f, 0xd151, 0xd152, 0xd153, 0xd155, 0xd156, 0xd157, 0xd158, 0xd159, 0xd15a, 0xd15b, 0xd15e, 0xd160, 0xd162, 0xd163, 0xd164, 0xd165, 0xd166, 0xd167, 0xd169, 0xd16a, 0xd16b, 0xd16d, 0xb540, 0xb541, 0xb543, 0xb544, 0xb545, 0xb54b, 0xb54c, 0xb54d, 0xb550, 0xb554, 0xb55c, 0xb55d, 0xb55f, 0xb560, 0xb561, 0xb5a0, 0xb5a1, 0xb5a4, 0xb5a8, 0xb5aa, 0xb5ab, 0xb5b0, 0xb5b1, 0xb5b3, 0xb5b4, 0xb5b5, 0xb5bb, 0xb5bc, 0xb5bd, 0xb5c0, 0xb5c4, 0xb5cc, 0xb5cd, 0xb5cf, 0xb5d0, 0xb5d1, 0xb5d8, 0xb5ec, 0xb610, 0xb611, 0xb614, 0xb618, 0xb625, 0xb62c, 0xb634, 0xb648, 0xb664, 0xb668, 0xb69c, 0xb69d, 0xb6a0, 0xb6a4, 0xb6ab, 0xb6ac, 0xb6b1, 0xb6d4, 0xb6f0, 0xb6f4, 0xb6f8, 0xb700, 0xb701, 0xb705, 0xb728, 0xb729, 0xb72c, 0xb72f, 0xb730, 0xb738, 0xb739, 0xb73b, 0xb744, 0xb748, 0xb74c, 0xb754, 0xb755, 0xb760, 0xb764, 0xb768, 0xb770, 0xb771, 0xb773, 0xb775, 0xb77c, 0xb77d, 0xb780, 0xb784, 0xb78c, 0xb78d, 0xb78f, 0xb790, 0xb791, 0xb792, 0xb796, 0xb797, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb740[ 192 ] = { 0xfffd, 0xd16e, 0xd16f, 0xd170, 0xd171, 0xd172, 0xd173, 0xd174, 0xd175, 0xd176, 0xd177, 0xd178, 0xd179, 0xd17a, 0xd17b, 0xd17d, 0xd17e, 0xd17f, 0xd180, 0xd181, 0xd182, 0xd183, 0xd185, 0xd186, 0xd187, 0xd189, 0xd18a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd18b, 0xd18c, 0xd18d, 0xd18e, 0xd18f, 0xd190, 0xd191, 0xd192, 0xd193, 0xd194, 0xd195, 0xd196, 0xd197, 0xd198, 0xd199, 0xd19a, 0xd19b, 0xd19c, 0xd19d, 0xd19e, 0xd19f, 0xd1a2, 0xd1a3, 0xd1a5, 0xd1a6, 0xd1a7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd1a9, 0xd1aa, 0xd1ab, 0xd1ac, 0xd1ad, 0xd1ae, 0xd1af, 0xd1b2, 0xd1b4, 0xd1b6, 0xd1b7, 0xd1b8, 0xd1b9, 0xd1bb, 0xd1bd, 0xd1be, 0xd1bf, 0xd1c1, 0xd1c2, 0xd1c3, 0xd1c4, 0xd1c5, 0xd1c6, 0xd1c7, 0xd1c8, 0xd1c9, 0xd1ca, 0xd1cb, 0xd1cc, 0xd1cd, 0xd1ce, 0xd1cf, 0xb798, 0xb799, 0xb79c, 0xb7a0, 0xb7a8, 0xb7a9, 0xb7ab, 0xb7ac, 0xb7ad, 0xb7b4, 0xb7b5, 0xb7b8, 0xb7c7, 0xb7c9, 0xb7ec, 0xb7ed, 0xb7f0, 0xb7f4, 0xb7fc, 0xb7fd, 0xb7ff, 0xb800, 0xb801, 0xb807, 0xb808, 0xb809, 0xb80c, 0xb810, 0xb818, 0xb819, 0xb81b, 0xb81d, 0xb824, 0xb825, 0xb828, 0xb82c, 0xb834, 0xb835, 0xb837, 0xb838, 0xb839, 0xb840, 0xb844, 0xb851, 0xb853, 0xb85c, 0xb85d, 0xb860, 0xb864, 0xb86c, 0xb86d, 0xb86f, 0xb871, 0xb878, 0xb87c, 0xb88d, 0xb8a8, 0xb8b0, 0xb8b4, 0xb8b8, 0xb8c0, 0xb8c1, 0xb8c3, 0xb8c5, 0xb8cc, 0xb8d0, 0xb8d4, 0xb8dd, 0xb8df, 0xb8e1, 0xb8e8, 0xb8e9, 0xb8ec, 0xb8f0, 0xb8f8, 0xb8f9, 0xb8fb, 0xb8fd, 0xb904, 0xb918, 0xb920, 0xb93c, 0xb93d, 0xb940, 0xb944, 0xb94c, 0xb94f, 0xb951, 0xb958, 0xb959, 0xb95c, 0xb960, 0xb968, 0xb969, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb840[ 192 ] = { 0xfffd, 0xd1d0, 0xd1d1, 0xd1d2, 0xd1d3, 0xd1d4, 0xd1d5, 0xd1d6, 0xd1d7, 0xd1d9, 0xd1da, 0xd1db, 0xd1dc, 0xd1dd, 0xd1de, 0xd1df, 0xd1e0, 0xd1e1, 0xd1e2, 0xd1e3, 0xd1e4, 0xd1e5, 0xd1e6, 0xd1e7, 0xd1e8, 0xd1e9, 0xd1ea, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd1eb, 0xd1ec, 0xd1ed, 0xd1ee, 0xd1ef, 0xd1f0, 0xd1f1, 0xd1f2, 0xd1f3, 0xd1f5, 0xd1f6, 0xd1f7, 0xd1f9, 0xd1fa, 0xd1fb, 0xd1fc, 0xd1fd, 0xd1fe, 0xd1ff, 0xd200, 0xd201, 0xd202, 0xd203, 0xd204, 0xd205, 0xd206, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd208, 0xd20a, 0xd20b, 0xd20c, 0xd20d, 0xd20e, 0xd20f, 0xd211, 0xd212, 0xd213, 0xd214, 0xd215, 0xd216, 0xd217, 0xd218, 0xd219, 0xd21a, 0xd21b, 0xd21c, 0xd21d, 0xd21e, 0xd21f, 0xd220, 0xd221, 0xd222, 0xd223, 0xd224, 0xd225, 0xd226, 0xd227, 0xd228, 0xd229, 0xb96b, 0xb96d, 0xb974, 0xb975, 0xb978, 0xb97c, 0xb984, 0xb985, 0xb987, 0xb989, 0xb98a, 0xb98d, 0xb98e, 0xb9ac, 0xb9ad, 0xb9b0, 0xb9b4, 0xb9bc, 0xb9bd, 0xb9bf, 0xb9c1, 0xb9c8, 0xb9c9, 0xb9cc, 0xb9ce, 0xb9cf, 0xb9d0, 0xb9d1, 0xb9d2, 0xb9d8, 0xb9d9, 0xb9db, 0xb9dd, 0xb9de, 0xb9e1, 0xb9e3, 0xb9e4, 0xb9e5, 0xb9e8, 0xb9ec, 0xb9f4, 0xb9f5, 0xb9f7, 0xb9f8, 0xb9f9, 0xb9fa, 0xba00, 0xba01, 0xba08, 0xba15, 0xba38, 0xba39, 0xba3c, 0xba40, 0xba42, 0xba48, 0xba49, 0xba4b, 0xba4d, 0xba4e, 0xba53, 0xba54, 0xba55, 0xba58, 0xba5c, 0xba64, 0xba65, 0xba67, 0xba68, 0xba69, 0xba70, 0xba71, 0xba74, 0xba78, 0xba83, 0xba84, 0xba85, 0xba87, 0xba8c, 0xbaa8, 0xbaa9, 0xbaab, 0xbaac, 0xbab0, 0xbab2, 0xbab8, 0xbab9, 0xbabb, 0xbabd, 0xbac4, 0xbac8, 0xbad8, 0xbad9, 0xbafc, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb940[ 192 ] = { 0xfffd, 0xd22a, 0xd22b, 0xd22e, 0xd22f, 0xd231, 0xd232, 0xd233, 0xd235, 0xd236, 0xd237, 0xd238, 0xd239, 0xd23a, 0xd23b, 0xd23e, 0xd240, 0xd242, 0xd243, 0xd244, 0xd245, 0xd246, 0xd247, 0xd249, 0xd24a, 0xd24b, 0xd24c, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd24d, 0xd24e, 0xd24f, 0xd250, 0xd251, 0xd252, 0xd253, 0xd254, 0xd255, 0xd256, 0xd257, 0xd258, 0xd259, 0xd25a, 0xd25b, 0xd25d, 0xd25e, 0xd25f, 0xd260, 0xd261, 0xd262, 0xd263, 0xd265, 0xd266, 0xd267, 0xd268, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd269, 0xd26a, 0xd26b, 0xd26c, 0xd26d, 0xd26e, 0xd26f, 0xd270, 0xd271, 0xd272, 0xd273, 0xd274, 0xd275, 0xd276, 0xd277, 0xd278, 0xd279, 0xd27a, 0xd27b, 0xd27c, 0xd27d, 0xd27e, 0xd27f, 0xd282, 0xd283, 0xd285, 0xd286, 0xd287, 0xd289, 0xd28a, 0xd28b, 0xd28c, 0xbb00, 0xbb04, 0xbb0d, 0xbb0f, 0xbb11, 0xbb18, 0xbb1c, 0xbb20, 0xbb29, 0xbb2b, 0xbb34, 0xbb35, 0xbb36, 0xbb38, 0xbb3b, 0xbb3c, 0xbb3d, 0xbb3e, 0xbb44, 0xbb45, 0xbb47, 0xbb49, 0xbb4d, 0xbb4f, 0xbb50, 0xbb54, 0xbb58, 0xbb61, 0xbb63, 0xbb6c, 0xbb88, 0xbb8c, 0xbb90, 0xbba4, 0xbba8, 0xbbac, 0xbbb4, 0xbbb7, 0xbbc0, 0xbbc4, 0xbbc8, 0xbbd0, 0xbbd3, 0xbbf8, 0xbbf9, 0xbbfc, 0xbbff, 0xbc00, 0xbc02, 0xbc08, 0xbc09, 0xbc0b, 0xbc0c, 0xbc0d, 0xbc0f, 0xbc11, 0xbc14, 0xbc15, 0xbc16, 0xbc17, 0xbc18, 0xbc1b, 0xbc1c, 0xbc1d, 0xbc1e, 0xbc1f, 0xbc24, 0xbc25, 0xbc27, 0xbc29, 0xbc2d, 0xbc30, 0xbc31, 0xbc34, 0xbc38, 0xbc40, 0xbc41, 0xbc43, 0xbc44, 0xbc45, 0xbc49, 0xbc4c, 0xbc4d, 0xbc50, 0xbc5d, 0xbc84, 0xbc85, 0xbc88, 0xbc8b, 0xbc8c, 0xbc8e, 0xbc94, 0xbc95, 0xbc97, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xba40[ 192 ] = { 0xfffd, 0xd28d, 0xd28e, 0xd28f, 0xd292, 0xd293, 0xd294, 0xd296, 0xd297, 0xd298, 0xd299, 0xd29a, 0xd29b, 0xd29d, 0xd29e, 0xd29f, 0xd2a1, 0xd2a2, 0xd2a3, 0xd2a5, 0xd2a6, 0xd2a7, 0xd2a8, 0xd2a9, 0xd2aa, 0xd2ab, 0xd2ad, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd2ae, 0xd2af, 0xd2b0, 0xd2b2, 0xd2b3, 0xd2b4, 0xd2b5, 0xd2b6, 0xd2b7, 0xd2ba, 0xd2bb, 0xd2bd, 0xd2be, 0xd2c1, 0xd2c3, 0xd2c4, 0xd2c5, 0xd2c6, 0xd2c7, 0xd2ca, 0xd2cc, 0xd2cd, 0xd2ce, 0xd2cf, 0xd2d0, 0xd2d1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd2d2, 0xd2d3, 0xd2d5, 0xd2d6, 0xd2d7, 0xd2d9, 0xd2da, 0xd2db, 0xd2dd, 0xd2de, 0xd2df, 0xd2e0, 0xd2e1, 0xd2e2, 0xd2e3, 0xd2e6, 0xd2e7, 0xd2e8, 0xd2e9, 0xd2ea, 0xd2eb, 0xd2ec, 0xd2ed, 0xd2ee, 0xd2ef, 0xd2f2, 0xd2f3, 0xd2f5, 0xd2f6, 0xd2f7, 0xd2f9, 0xd2fa, 0xbc99, 0xbc9a, 0xbca0, 0xbca1, 0xbca4, 0xbca7, 0xbca8, 0xbcb0, 0xbcb1, 0xbcb3, 0xbcb4, 0xbcb5, 0xbcbc, 0xbcbd, 0xbcc0, 0xbcc4, 0xbccd, 0xbccf, 0xbcd0, 0xbcd1, 0xbcd5, 0xbcd8, 0xbcdc, 0xbcf4, 0xbcf5, 0xbcf6, 0xbcf8, 0xbcfc, 0xbd04, 0xbd05, 0xbd07, 0xbd09, 0xbd10, 0xbd14, 0xbd24, 0xbd2c, 0xbd40, 0xbd48, 0xbd49, 0xbd4c, 0xbd50, 0xbd58, 0xbd59, 0xbd64, 0xbd68, 0xbd80, 0xbd81, 0xbd84, 0xbd87, 0xbd88, 0xbd89, 0xbd8a, 0xbd90, 0xbd91, 0xbd93, 0xbd95, 0xbd99, 0xbd9a, 0xbd9c, 0xbda4, 0xbdb0, 0xbdb8, 0xbdd4, 0xbdd5, 0xbdd8, 0xbddc, 0xbde9, 0xbdf0, 0xbdf4, 0xbdf8, 0xbe00, 0xbe03, 0xbe05, 0xbe0c, 0xbe0d, 0xbe10, 0xbe14, 0xbe1c, 0xbe1d, 0xbe1f, 0xbe44, 0xbe45, 0xbe48, 0xbe4c, 0xbe4e, 0xbe54, 0xbe55, 0xbe57, 0xbe59, 0xbe5a, 0xbe5b, 0xbe60, 0xbe61, 0xbe64, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbb40[ 192 ] = { 0xfffd, 0xd2fb, 0xd2fc, 0xd2fd, 0xd2fe, 0xd2ff, 0xd302, 0xd304, 0xd306, 0xd307, 0xd308, 0xd309, 0xd30a, 0xd30b, 0xd30f, 0xd311, 0xd312, 0xd313, 0xd315, 0xd317, 0xd318, 0xd319, 0xd31a, 0xd31b, 0xd31e, 0xd322, 0xd323, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd324, 0xd326, 0xd327, 0xd32a, 0xd32b, 0xd32d, 0xd32e, 0xd32f, 0xd331, 0xd332, 0xd333, 0xd334, 0xd335, 0xd336, 0xd337, 0xd33a, 0xd33e, 0xd33f, 0xd340, 0xd341, 0xd342, 0xd343, 0xd346, 0xd347, 0xd348, 0xd349, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd34a, 0xd34b, 0xd34c, 0xd34d, 0xd34e, 0xd34f, 0xd350, 0xd351, 0xd352, 0xd353, 0xd354, 0xd355, 0xd356, 0xd357, 0xd358, 0xd359, 0xd35a, 0xd35b, 0xd35c, 0xd35d, 0xd35e, 0xd35f, 0xd360, 0xd361, 0xd362, 0xd363, 0xd364, 0xd365, 0xd366, 0xd367, 0xd368, 0xd369, 0xbe68, 0xbe6a, 0xbe70, 0xbe71, 0xbe73, 0xbe74, 0xbe75, 0xbe7b, 0xbe7c, 0xbe7d, 0xbe80, 0xbe84, 0xbe8c, 0xbe8d, 0xbe8f, 0xbe90, 0xbe91, 0xbe98, 0xbe99, 0xbea8, 0xbed0, 0xbed1, 0xbed4, 0xbed7, 0xbed8, 0xbee0, 0xbee3, 0xbee4, 0xbee5, 0xbeec, 0xbf01, 0xbf08, 0xbf09, 0xbf18, 0xbf19, 0xbf1b, 0xbf1c, 0xbf1d, 0xbf40, 0xbf41, 0xbf44, 0xbf48, 0xbf50, 0xbf51, 0xbf55, 0xbf94, 0xbfb0, 0xbfc5, 0xbfcc, 0xbfcd, 0xbfd0, 0xbfd4, 0xbfdc, 0xbfdf, 0xbfe1, 0xc03c, 0xc051, 0xc058, 0xc05c, 0xc060, 0xc068, 0xc069, 0xc090, 0xc091, 0xc094, 0xc098, 0xc0a0, 0xc0a1, 0xc0a3, 0xc0a5, 0xc0ac, 0xc0ad, 0xc0af, 0xc0b0, 0xc0b3, 0xc0b4, 0xc0b5, 0xc0b6, 0xc0bc, 0xc0bd, 0xc0bf, 0xc0c0, 0xc0c1, 0xc0c5, 0xc0c8, 0xc0c9, 0xc0cc, 0xc0d0, 0xc0d8, 0xc0d9, 0xc0db, 0xc0dc, 0xc0dd, 0xc0e4, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbc40[ 192 ] = { 0xfffd, 0xd36a, 0xd36b, 0xd36c, 0xd36d, 0xd36e, 0xd36f, 0xd370, 0xd371, 0xd372, 0xd373, 0xd374, 0xd375, 0xd376, 0xd377, 0xd378, 0xd379, 0xd37a, 0xd37b, 0xd37e, 0xd37f, 0xd381, 0xd382, 0xd383, 0xd385, 0xd386, 0xd387, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd388, 0xd389, 0xd38a, 0xd38b, 0xd38e, 0xd392, 0xd393, 0xd394, 0xd395, 0xd396, 0xd397, 0xd39a, 0xd39b, 0xd39d, 0xd39e, 0xd39f, 0xd3a1, 0xd3a2, 0xd3a3, 0xd3a4, 0xd3a5, 0xd3a6, 0xd3a7, 0xd3aa, 0xd3ac, 0xd3ae, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd3af, 0xd3b0, 0xd3b1, 0xd3b2, 0xd3b3, 0xd3b5, 0xd3b6, 0xd3b7, 0xd3b9, 0xd3ba, 0xd3bb, 0xd3bd, 0xd3be, 0xd3bf, 0xd3c0, 0xd3c1, 0xd3c2, 0xd3c3, 0xd3c6, 0xd3c7, 0xd3ca, 0xd3cb, 0xd3cc, 0xd3cd, 0xd3ce, 0xd3cf, 0xd3d1, 0xd3d2, 0xd3d3, 0xd3d4, 0xd3d5, 0xd3d6, 0xc0e5, 0xc0e8, 0xc0ec, 0xc0f4, 0xc0f5, 0xc0f7, 0xc0f9, 0xc100, 0xc104, 0xc108, 0xc110, 0xc115, 0xc11c, 0xc11d, 0xc11e, 0xc11f, 0xc120, 0xc123, 0xc124, 0xc126, 0xc127, 0xc12c, 0xc12d, 0xc12f, 0xc130, 0xc131, 0xc136, 0xc138, 0xc139, 0xc13c, 0xc140, 0xc148, 0xc149, 0xc14b, 0xc14c, 0xc14d, 0xc154, 0xc155, 0xc158, 0xc15c, 0xc164, 0xc165, 0xc167, 0xc168, 0xc169, 0xc170, 0xc174, 0xc178, 0xc185, 0xc18c, 0xc18d, 0xc18e, 0xc190, 0xc194, 0xc196, 0xc19c, 0xc19d, 0xc19f, 0xc1a1, 0xc1a5, 0xc1a8, 0xc1a9, 0xc1ac, 0xc1b0, 0xc1bd, 0xc1c4, 0xc1c8, 0xc1cc, 0xc1d4, 0xc1d7, 0xc1d8, 0xc1e0, 0xc1e4, 0xc1e8, 0xc1f0, 0xc1f1, 0xc1f3, 0xc1fc, 0xc1fd, 0xc200, 0xc204, 0xc20c, 0xc20d, 0xc20f, 0xc211, 0xc218, 0xc219, 0xc21c, 0xc21f, 0xc220, 0xc228, 0xc229, 0xc22b, 0xc22d, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbd40[ 192 ] = { 0xfffd, 0xd3d7, 0xd3d9, 0xd3da, 0xd3db, 0xd3dc, 0xd3dd, 0xd3de, 0xd3df, 0xd3e0, 0xd3e2, 0xd3e4, 0xd3e5, 0xd3e6, 0xd3e7, 0xd3e8, 0xd3e9, 0xd3ea, 0xd3eb, 0xd3ee, 0xd3ef, 0xd3f1, 0xd3f2, 0xd3f3, 0xd3f5, 0xd3f6, 0xd3f7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd3f8, 0xd3f9, 0xd3fa, 0xd3fb, 0xd3fe, 0xd400, 0xd402, 0xd403, 0xd404, 0xd405, 0xd406, 0xd407, 0xd409, 0xd40a, 0xd40b, 0xd40c, 0xd40d, 0xd40e, 0xd40f, 0xd410, 0xd411, 0xd412, 0xd413, 0xd414, 0xd415, 0xd416, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd417, 0xd418, 0xd419, 0xd41a, 0xd41b, 0xd41c, 0xd41e, 0xd41f, 0xd420, 0xd421, 0xd422, 0xd423, 0xd424, 0xd425, 0xd426, 0xd427, 0xd428, 0xd429, 0xd42a, 0xd42b, 0xd42c, 0xd42d, 0xd42e, 0xd42f, 0xd430, 0xd431, 0xd432, 0xd433, 0xd434, 0xd435, 0xd436, 0xd437, 0xc22f, 0xc231, 0xc232, 0xc234, 0xc248, 0xc250, 0xc251, 0xc254, 0xc258, 0xc260, 0xc265, 0xc26c, 0xc26d, 0xc270, 0xc274, 0xc27c, 0xc27d, 0xc27f, 0xc281, 0xc288, 0xc289, 0xc290, 0xc298, 0xc29b, 0xc29d, 0xc2a4, 0xc2a5, 0xc2a8, 0xc2ac, 0xc2ad, 0xc2b4, 0xc2b5, 0xc2b7, 0xc2b9, 0xc2dc, 0xc2dd, 0xc2e0, 0xc2e3, 0xc2e4, 0xc2eb, 0xc2ec, 0xc2ed, 0xc2ef, 0xc2f1, 0xc2f6, 0xc2f8, 0xc2f9, 0xc2fb, 0xc2fc, 0xc300, 0xc308, 0xc309, 0xc30c, 0xc30d, 0xc313, 0xc314, 0xc315, 0xc318, 0xc31c, 0xc324, 0xc325, 0xc328, 0xc329, 0xc345, 0xc368, 0xc369, 0xc36c, 0xc370, 0xc372, 0xc378, 0xc379, 0xc37c, 0xc37d, 0xc384, 0xc388, 0xc38c, 0xc3c0, 0xc3d8, 0xc3d9, 0xc3dc, 0xc3df, 0xc3e0, 0xc3e2, 0xc3e8, 0xc3e9, 0xc3ed, 0xc3f4, 0xc3f5, 0xc3f8, 0xc408, 0xc410, 0xc424, 0xc42c, 0xc430, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbe40[ 192 ] = { 0xfffd, 0xd438, 0xd439, 0xd43a, 0xd43b, 0xd43c, 0xd43d, 0xd43e, 0xd43f, 0xd441, 0xd442, 0xd443, 0xd445, 0xd446, 0xd447, 0xd448, 0xd449, 0xd44a, 0xd44b, 0xd44c, 0xd44d, 0xd44e, 0xd44f, 0xd450, 0xd451, 0xd452, 0xd453, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd454, 0xd455, 0xd456, 0xd457, 0xd458, 0xd459, 0xd45a, 0xd45b, 0xd45d, 0xd45e, 0xd45f, 0xd461, 0xd462, 0xd463, 0xd465, 0xd466, 0xd467, 0xd468, 0xd469, 0xd46a, 0xd46b, 0xd46c, 0xd46e, 0xd470, 0xd471, 0xd472, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd473, 0xd474, 0xd475, 0xd476, 0xd477, 0xd47a, 0xd47b, 0xd47d, 0xd47e, 0xd481, 0xd483, 0xd484, 0xd485, 0xd486, 0xd487, 0xd48a, 0xd48c, 0xd48e, 0xd48f, 0xd490, 0xd491, 0xd492, 0xd493, 0xd495, 0xd496, 0xd497, 0xd498, 0xd499, 0xd49a, 0xd49b, 0xd49c, 0xd49d, 0xc434, 0xc43c, 0xc43d, 0xc448, 0xc464, 0xc465, 0xc468, 0xc46c, 0xc474, 0xc475, 0xc479, 0xc480, 0xc494, 0xc49c, 0xc4b8, 0xc4bc, 0xc4e9, 0xc4f0, 0xc4f1, 0xc4f4, 0xc4f8, 0xc4fa, 0xc4ff, 0xc500, 0xc501, 0xc50c, 0xc510, 0xc514, 0xc51c, 0xc528, 0xc529, 0xc52c, 0xc530, 0xc538, 0xc539, 0xc53b, 0xc53d, 0xc544, 0xc545, 0xc548, 0xc549, 0xc54a, 0xc54c, 0xc54d, 0xc54e, 0xc553, 0xc554, 0xc555, 0xc557, 0xc558, 0xc559, 0xc55d, 0xc55e, 0xc560, 0xc561, 0xc564, 0xc568, 0xc570, 0xc571, 0xc573, 0xc574, 0xc575, 0xc57c, 0xc57d, 0xc580, 0xc584, 0xc587, 0xc58c, 0xc58d, 0xc58f, 0xc591, 0xc595, 0xc597, 0xc598, 0xc59c, 0xc5a0, 0xc5a9, 0xc5b4, 0xc5b5, 0xc5b8, 0xc5b9, 0xc5bb, 0xc5bc, 0xc5bd, 0xc5be, 0xc5c4, 0xc5c5, 0xc5c6, 0xc5c7, 0xc5c8, 0xc5c9, 0xc5ca, 0xc5cc, 0xc5ce, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbf40[ 192 ] = { 0xfffd, 0xd49e, 0xd49f, 0xd4a0, 0xd4a1, 0xd4a2, 0xd4a3, 0xd4a4, 0xd4a5, 0xd4a6, 0xd4a7, 0xd4a8, 0xd4aa, 0xd4ab, 0xd4ac, 0xd4ad, 0xd4ae, 0xd4af, 0xd4b0, 0xd4b1, 0xd4b2, 0xd4b3, 0xd4b4, 0xd4b5, 0xd4b6, 0xd4b7, 0xd4b8, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd4b9, 0xd4ba, 0xd4bb, 0xd4bc, 0xd4bd, 0xd4be, 0xd4bf, 0xd4c0, 0xd4c1, 0xd4c2, 0xd4c3, 0xd4c4, 0xd4c5, 0xd4c6, 0xd4c7, 0xd4c8, 0xd4c9, 0xd4ca, 0xd4cb, 0xd4cd, 0xd4ce, 0xd4cf, 0xd4d1, 0xd4d2, 0xd4d3, 0xd4d5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd4d6, 0xd4d7, 0xd4d8, 0xd4d9, 0xd4da, 0xd4db, 0xd4dd, 0xd4de, 0xd4e0, 0xd4e1, 0xd4e2, 0xd4e3, 0xd4e4, 0xd4e5, 0xd4e6, 0xd4e7, 0xd4e9, 0xd4ea, 0xd4eb, 0xd4ed, 0xd4ee, 0xd4ef, 0xd4f1, 0xd4f2, 0xd4f3, 0xd4f4, 0xd4f5, 0xd4f6, 0xd4f7, 0xd4f9, 0xd4fa, 0xd4fc, 0xc5d0, 0xc5d1, 0xc5d4, 0xc5d8, 0xc5e0, 0xc5e1, 0xc5e3, 0xc5e5, 0xc5ec, 0xc5ed, 0xc5ee, 0xc5f0, 0xc5f4, 0xc5f6, 0xc5f7, 0xc5fc, 0xc5fd, 0xc5fe, 0xc5ff, 0xc600, 0xc601, 0xc605, 0xc606, 0xc607, 0xc608, 0xc60c, 0xc610, 0xc618, 0xc619, 0xc61b, 0xc61c, 0xc624, 0xc625, 0xc628, 0xc62c, 0xc62d, 0xc62e, 0xc630, 0xc633, 0xc634, 0xc635, 0xc637, 0xc639, 0xc63b, 0xc640, 0xc641, 0xc644, 0xc648, 0xc650, 0xc651, 0xc653, 0xc654, 0xc655, 0xc65c, 0xc65d, 0xc660, 0xc66c, 0xc66f, 0xc671, 0xc678, 0xc679, 0xc67c, 0xc680, 0xc688, 0xc689, 0xc68b, 0xc68d, 0xc694, 0xc695, 0xc698, 0xc69c, 0xc6a4, 0xc6a5, 0xc6a7, 0xc6a9, 0xc6b0, 0xc6b1, 0xc6b4, 0xc6b8, 0xc6b9, 0xc6ba, 0xc6c0, 0xc6c1, 0xc6c3, 0xc6c5, 0xc6cc, 0xc6cd, 0xc6d0, 0xc6d4, 0xc6dc, 0xc6dd, 0xc6e0, 0xc6e1, 0xc6e8, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc040[ 192 ] = { 0xfffd, 0xd4fe, 0xd4ff, 0xd500, 0xd501, 0xd502, 0xd503, 0xd505, 0xd506, 0xd507, 0xd509, 0xd50a, 0xd50b, 0xd50d, 0xd50e, 0xd50f, 0xd510, 0xd511, 0xd512, 0xd513, 0xd516, 0xd518, 0xd519, 0xd51a, 0xd51b, 0xd51c, 0xd51d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd51e, 0xd51f, 0xd520, 0xd521, 0xd522, 0xd523, 0xd524, 0xd525, 0xd526, 0xd527, 0xd528, 0xd529, 0xd52a, 0xd52b, 0xd52c, 0xd52d, 0xd52e, 0xd52f, 0xd530, 0xd531, 0xd532, 0xd533, 0xd534, 0xd535, 0xd536, 0xd537, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd538, 0xd539, 0xd53a, 0xd53b, 0xd53e, 0xd53f, 0xd541, 0xd542, 0xd543, 0xd545, 0xd546, 0xd547, 0xd548, 0xd549, 0xd54a, 0xd54b, 0xd54e, 0xd550, 0xd552, 0xd553, 0xd554, 0xd555, 0xd556, 0xd557, 0xd55a, 0xd55b, 0xd55d, 0xd55e, 0xd55f, 0xd561, 0xd562, 0xd563, 0xc6e9, 0xc6ec, 0xc6f0, 0xc6f8, 0xc6f9, 0xc6fd, 0xc704, 0xc705, 0xc708, 0xc70c, 0xc714, 0xc715, 0xc717, 0xc719, 0xc720, 0xc721, 0xc724, 0xc728, 0xc730, 0xc731, 0xc733, 0xc735, 0xc737, 0xc73c, 0xc73d, 0xc740, 0xc744, 0xc74a, 0xc74c, 0xc74d, 0xc74f, 0xc751, 0xc752, 0xc753, 0xc754, 0xc755, 0xc756, 0xc757, 0xc758, 0xc75c, 0xc760, 0xc768, 0xc76b, 0xc774, 0xc775, 0xc778, 0xc77c, 0xc77d, 0xc77e, 0xc783, 0xc784, 0xc785, 0xc787, 0xc788, 0xc789, 0xc78a, 0xc78e, 0xc790, 0xc791, 0xc794, 0xc796, 0xc797, 0xc798, 0xc79a, 0xc7a0, 0xc7a1, 0xc7a3, 0xc7a4, 0xc7a5, 0xc7a6, 0xc7ac, 0xc7ad, 0xc7b0, 0xc7b4, 0xc7bc, 0xc7bd, 0xc7bf, 0xc7c0, 0xc7c1, 0xc7c8, 0xc7c9, 0xc7cc, 0xc7ce, 0xc7d0, 0xc7d8, 0xc7dd, 0xc7e4, 0xc7e8, 0xc7ec, 0xc800, 0xc801, 0xc804, 0xc808, 0xc80a, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc140[ 192 ] = { 0xfffd, 0xd564, 0xd566, 0xd567, 0xd56a, 0xd56c, 0xd56e, 0xd56f, 0xd570, 0xd571, 0xd572, 0xd573, 0xd576, 0xd577, 0xd579, 0xd57a, 0xd57b, 0xd57d, 0xd57e, 0xd57f, 0xd580, 0xd581, 0xd582, 0xd583, 0xd586, 0xd58a, 0xd58b, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd58c, 0xd58d, 0xd58e, 0xd58f, 0xd591, 0xd592, 0xd593, 0xd594, 0xd595, 0xd596, 0xd597, 0xd598, 0xd599, 0xd59a, 0xd59b, 0xd59c, 0xd59d, 0xd59e, 0xd59f, 0xd5a0, 0xd5a1, 0xd5a2, 0xd5a3, 0xd5a4, 0xd5a6, 0xd5a7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd5a8, 0xd5a9, 0xd5aa, 0xd5ab, 0xd5ac, 0xd5ad, 0xd5ae, 0xd5af, 0xd5b0, 0xd5b1, 0xd5b2, 0xd5b3, 0xd5b4, 0xd5b5, 0xd5b6, 0xd5b7, 0xd5b8, 0xd5b9, 0xd5ba, 0xd5bb, 0xd5bc, 0xd5bd, 0xd5be, 0xd5bf, 0xd5c0, 0xd5c1, 0xd5c2, 0xd5c3, 0xd5c4, 0xd5c5, 0xd5c6, 0xd5c7, 0xc810, 0xc811, 0xc813, 0xc815, 0xc816, 0xc81c, 0xc81d, 0xc820, 0xc824, 0xc82c, 0xc82d, 0xc82f, 0xc831, 0xc838, 0xc83c, 0xc840, 0xc848, 0xc849, 0xc84c, 0xc84d, 0xc854, 0xc870, 0xc871, 0xc874, 0xc878, 0xc87a, 0xc880, 0xc881, 0xc883, 0xc885, 0xc886, 0xc887, 0xc88b, 0xc88c, 0xc88d, 0xc894, 0xc89d, 0xc89f, 0xc8a1, 0xc8a8, 0xc8bc, 0xc8bd, 0xc8c4, 0xc8c8, 0xc8cc, 0xc8d4, 0xc8d5, 0xc8d7, 0xc8d9, 0xc8e0, 0xc8e1, 0xc8e4, 0xc8f5, 0xc8fc, 0xc8fd, 0xc900, 0xc904, 0xc905, 0xc906, 0xc90c, 0xc90d, 0xc90f, 0xc911, 0xc918, 0xc92c, 0xc934, 0xc950, 0xc951, 0xc954, 0xc958, 0xc960, 0xc961, 0xc963, 0xc96c, 0xc970, 0xc974, 0xc97c, 0xc988, 0xc989, 0xc98c, 0xc990, 0xc998, 0xc999, 0xc99b, 0xc99d, 0xc9c0, 0xc9c1, 0xc9c4, 0xc9c7, 0xc9c8, 0xc9ca, 0xc9d0, 0xc9d1, 0xc9d3, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc240[ 192 ] = { 0xfffd, 0xd5ca, 0xd5cb, 0xd5cd, 0xd5ce, 0xd5cf, 0xd5d1, 0xd5d3, 0xd5d4, 0xd5d5, 0xd5d6, 0xd5d7, 0xd5da, 0xd5dc, 0xd5de, 0xd5df, 0xd5e0, 0xd5e1, 0xd5e2, 0xd5e3, 0xd5e6, 0xd5e7, 0xd5e9, 0xd5ea, 0xd5eb, 0xd5ed, 0xd5ee, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd5ef, 0xd5f0, 0xd5f1, 0xd5f2, 0xd5f3, 0xd5f6, 0xd5f8, 0xd5fa, 0xd5fb, 0xd5fc, 0xd5fd, 0xd5fe, 0xd5ff, 0xd602, 0xd603, 0xd605, 0xd606, 0xd607, 0xd609, 0xd60a, 0xd60b, 0xd60c, 0xd60d, 0xd60e, 0xd60f, 0xd612, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd616, 0xd617, 0xd618, 0xd619, 0xd61a, 0xd61b, 0xd61d, 0xd61e, 0xd61f, 0xd621, 0xd622, 0xd623, 0xd625, 0xd626, 0xd627, 0xd628, 0xd629, 0xd62a, 0xd62b, 0xd62c, 0xd62e, 0xd62f, 0xd630, 0xd631, 0xd632, 0xd633, 0xd634, 0xd635, 0xd636, 0xd637, 0xd63a, 0xd63b, 0xc9d5, 0xc9d6, 0xc9d9, 0xc9da, 0xc9dc, 0xc9dd, 0xc9e0, 0xc9e2, 0xc9e4, 0xc9e7, 0xc9ec, 0xc9ed, 0xc9ef, 0xc9f0, 0xc9f1, 0xc9f8, 0xc9f9, 0xc9fc, 0xca00, 0xca08, 0xca09, 0xca0b, 0xca0c, 0xca0d, 0xca14, 0xca18, 0xca29, 0xca4c, 0xca4d, 0xca50, 0xca54, 0xca5c, 0xca5d, 0xca5f, 0xca60, 0xca61, 0xca68, 0xca7d, 0xca84, 0xca98, 0xcabc, 0xcabd, 0xcac0, 0xcac4, 0xcacc, 0xcacd, 0xcacf, 0xcad1, 0xcad3, 0xcad8, 0xcad9, 0xcae0, 0xcaec, 0xcaf4, 0xcb08, 0xcb10, 0xcb14, 0xcb18, 0xcb20, 0xcb21, 0xcb41, 0xcb48, 0xcb49, 0xcb4c, 0xcb50, 0xcb58, 0xcb59, 0xcb5d, 0xcb64, 0xcb78, 0xcb79, 0xcb9c, 0xcbb8, 0xcbd4, 0xcbe4, 0xcbe7, 0xcbe9, 0xcc0c, 0xcc0d, 0xcc10, 0xcc14, 0xcc1c, 0xcc1d, 0xcc21, 0xcc22, 0xcc27, 0xcc28, 0xcc29, 0xcc2c, 0xcc2e, 0xcc30, 0xcc38, 0xcc39, 0xcc3b, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc340[ 192 ] = { 0xfffd, 0xd63d, 0xd63e, 0xd63f, 0xd641, 0xd642, 0xd643, 0xd644, 0xd646, 0xd647, 0xd64a, 0xd64c, 0xd64e, 0xd64f, 0xd650, 0xd652, 0xd653, 0xd656, 0xd657, 0xd659, 0xd65a, 0xd65b, 0xd65d, 0xd65e, 0xd65f, 0xd660, 0xd661, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd662, 0xd663, 0xd664, 0xd665, 0xd666, 0xd668, 0xd66a, 0xd66b, 0xd66c, 0xd66d, 0xd66e, 0xd66f, 0xd672, 0xd673, 0xd675, 0xd676, 0xd677, 0xd678, 0xd679, 0xd67a, 0xd67b, 0xd67c, 0xd67d, 0xd67e, 0xd67f, 0xd680, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd681, 0xd682, 0xd684, 0xd686, 0xd687, 0xd688, 0xd689, 0xd68a, 0xd68b, 0xd68e, 0xd68f, 0xd691, 0xd692, 0xd693, 0xd695, 0xd696, 0xd697, 0xd698, 0xd699, 0xd69a, 0xd69b, 0xd69c, 0xd69e, 0xd6a0, 0xd6a2, 0xd6a3, 0xd6a4, 0xd6a5, 0xd6a6, 0xd6a7, 0xd6a9, 0xd6aa, 0xcc3c, 0xcc3d, 0xcc3e, 0xcc44, 0xcc45, 0xcc48, 0xcc4c, 0xcc54, 0xcc55, 0xcc57, 0xcc58, 0xcc59, 0xcc60, 0xcc64, 0xcc66, 0xcc68, 0xcc70, 0xcc75, 0xcc98, 0xcc99, 0xcc9c, 0xcca0, 0xcca8, 0xcca9, 0xccab, 0xccac, 0xccad, 0xccb4, 0xccb5, 0xccb8, 0xccbc, 0xccc4, 0xccc5, 0xccc7, 0xccc9, 0xccd0, 0xccd4, 0xcce4, 0xccec, 0xccf0, 0xcd01, 0xcd08, 0xcd09, 0xcd0c, 0xcd10, 0xcd18, 0xcd19, 0xcd1b, 0xcd1d, 0xcd24, 0xcd28, 0xcd2c, 0xcd39, 0xcd5c, 0xcd60, 0xcd64, 0xcd6c, 0xcd6d, 0xcd6f, 0xcd71, 0xcd78, 0xcd88, 0xcd94, 0xcd95, 0xcd98, 0xcd9c, 0xcda4, 0xcda5, 0xcda7, 0xcda9, 0xcdb0, 0xcdc4, 0xcdcc, 0xcdd0, 0xcde8, 0xcdec, 0xcdf0, 0xcdf8, 0xcdf9, 0xcdfb, 0xcdfd, 0xce04, 0xce08, 0xce0c, 0xce14, 0xce19, 0xce20, 0xce21, 0xce24, 0xce28, 0xce30, 0xce31, 0xce33, 0xce35, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc440[ 192 ] = { 0xfffd, 0xd6ab, 0xd6ad, 0xd6ae, 0xd6af, 0xd6b1, 0xd6b2, 0xd6b3, 0xd6b4, 0xd6b5, 0xd6b6, 0xd6b7, 0xd6b8, 0xd6ba, 0xd6bc, 0xd6bd, 0xd6be, 0xd6bf, 0xd6c0, 0xd6c1, 0xd6c2, 0xd6c3, 0xd6c6, 0xd6c7, 0xd6c9, 0xd6ca, 0xd6cb, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd6cd, 0xd6ce, 0xd6cf, 0xd6d0, 0xd6d2, 0xd6d3, 0xd6d5, 0xd6d6, 0xd6d8, 0xd6da, 0xd6db, 0xd6dc, 0xd6dd, 0xd6de, 0xd6df, 0xd6e1, 0xd6e2, 0xd6e3, 0xd6e5, 0xd6e6, 0xd6e7, 0xd6e9, 0xd6ea, 0xd6eb, 0xd6ec, 0xd6ed, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd6ee, 0xd6ef, 0xd6f1, 0xd6f2, 0xd6f3, 0xd6f4, 0xd6f6, 0xd6f7, 0xd6f8, 0xd6f9, 0xd6fa, 0xd6fb, 0xd6fe, 0xd6ff, 0xd701, 0xd702, 0xd703, 0xd705, 0xd706, 0xd707, 0xd708, 0xd709, 0xd70a, 0xd70b, 0xd70c, 0xd70d, 0xd70e, 0xd70f, 0xd710, 0xd712, 0xd713, 0xd714, 0xce58, 0xce59, 0xce5c, 0xce5f, 0xce60, 0xce61, 0xce68, 0xce69, 0xce6b, 0xce6d, 0xce74, 0xce75, 0xce78, 0xce7c, 0xce84, 0xce85, 0xce87, 0xce89, 0xce90, 0xce91, 0xce94, 0xce98, 0xcea0, 0xcea1, 0xcea3, 0xcea4, 0xcea5, 0xceac, 0xcead, 0xcec1, 0xcee4, 0xcee5, 0xcee8, 0xceeb, 0xceec, 0xcef4, 0xcef5, 0xcef7, 0xcef8, 0xcef9, 0xcf00, 0xcf01, 0xcf04, 0xcf08, 0xcf10, 0xcf11, 0xcf13, 0xcf15, 0xcf1c, 0xcf20, 0xcf24, 0xcf2c, 0xcf2d, 0xcf2f, 0xcf30, 0xcf31, 0xcf38, 0xcf54, 0xcf55, 0xcf58, 0xcf5c, 0xcf64, 0xcf65, 0xcf67, 0xcf69, 0xcf70, 0xcf71, 0xcf74, 0xcf78, 0xcf80, 0xcf85, 0xcf8c, 0xcfa1, 0xcfa8, 0xcfb0, 0xcfc4, 0xcfe0, 0xcfe1, 0xcfe4, 0xcfe8, 0xcff0, 0xcff1, 0xcff3, 0xcff5, 0xcffc, 0xd000, 0xd004, 0xd011, 0xd018, 0xd02d, 0xd034, 0xd035, 0xd038, 0xd03c, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc540[ 192 ] = { 0xfffd, 0xd715, 0xd716, 0xd717, 0xd71a, 0xd71b, 0xd71d, 0xd71e, 0xd71f, 0xd721, 0xd722, 0xd723, 0xd724, 0xd725, 0xd726, 0xd727, 0xd72a, 0xd72c, 0xd72e, 0xd72f, 0xd730, 0xd731, 0xd732, 0xd733, 0xd736, 0xd737, 0xd739, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd73a, 0xd73b, 0xd73d, 0xd73e, 0xd73f, 0xd740, 0xd741, 0xd742, 0xd743, 0xd745, 0xd746, 0xd748, 0xd74a, 0xd74b, 0xd74c, 0xd74d, 0xd74e, 0xd74f, 0xd752, 0xd753, 0xd755, 0xd75a, 0xd75b, 0xd75c, 0xd75d, 0xd75e, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd75f, 0xd762, 0xd764, 0xd766, 0xd767, 0xd768, 0xd76a, 0xd76b, 0xd76d, 0xd76e, 0xd76f, 0xd771, 0xd772, 0xd773, 0xd775, 0xd776, 0xd777, 0xd778, 0xd779, 0xd77a, 0xd77b, 0xd77e, 0xd77f, 0xd780, 0xd782, 0xd783, 0xd784, 0xd785, 0xd786, 0xd787, 0xd78a, 0xd78b, 0xd044, 0xd045, 0xd047, 0xd049, 0xd050, 0xd054, 0xd058, 0xd060, 0xd06c, 0xd06d, 0xd070, 0xd074, 0xd07c, 0xd07d, 0xd081, 0xd0a4, 0xd0a5, 0xd0a8, 0xd0ac, 0xd0b4, 0xd0b5, 0xd0b7, 0xd0b9, 0xd0c0, 0xd0c1, 0xd0c4, 0xd0c8, 0xd0c9, 0xd0d0, 0xd0d1, 0xd0d3, 0xd0d4, 0xd0d5, 0xd0dc, 0xd0dd, 0xd0e0, 0xd0e4, 0xd0ec, 0xd0ed, 0xd0ef, 0xd0f0, 0xd0f1, 0xd0f8, 0xd10d, 0xd130, 0xd131, 0xd134, 0xd138, 0xd13a, 0xd140, 0xd141, 0xd143, 0xd144, 0xd145, 0xd14c, 0xd14d, 0xd150, 0xd154, 0xd15c, 0xd15d, 0xd15f, 0xd161, 0xd168, 0xd16c, 0xd17c, 0xd184, 0xd188, 0xd1a0, 0xd1a1, 0xd1a4, 0xd1a8, 0xd1b0, 0xd1b1, 0xd1b3, 0xd1b5, 0xd1ba, 0xd1bc, 0xd1c0, 0xd1d8, 0xd1f4, 0xd1f8, 0xd207, 0xd209, 0xd210, 0xd22c, 0xd22d, 0xd230, 0xd234, 0xd23c, 0xd23d, 0xd23f, 0xd241, 0xd248, 0xd25c, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc640[ 24 ] = { 0xfffd, 0xd78d, 0xd78e, 0xd78f, 0xd791, 0xd792, 0xd793, 0xd794, 0xd795, 0xd796, 0xd797, 0xd79a, 0xd79c, 0xd79e, 0xd79f, 0xd7a0, 0xd7a1, 0xd7a2, 0xd7a3, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc6a0[ 96 ] = { 0xfffd, 0xd264, 0xd280, 0xd281, 0xd284, 0xd288, 0xd290, 0xd291, 0xd295, 0xd29c, 0xd2a0, 0xd2a4, 0xd2ac, 0xd2b1, 0xd2b8, 0xd2b9, 0xd2bc, 0xd2bf, 0xd2c0, 0xd2c2, 0xd2c8, 0xd2c9, 0xd2cb, 0xd2d4, 0xd2d8, 0xd2dc, 0xd2e4, 0xd2e5, 0xd2f0, 0xd2f1, 0xd2f4, 0xd2f8, 0xd300, 0xd301, 0xd303, 0xd305, 0xd30c, 0xd30d, 0xd30e, 0xd310, 0xd314, 0xd316, 0xd31c, 0xd31d, 0xd31f, 0xd320, 0xd321, 0xd325, 0xd328, 0xd329, 0xd32c, 0xd330, 0xd338, 0xd339, 0xd33b, 0xd33c, 0xd33d, 0xd344, 0xd345, 0xd37c, 0xd37d, 0xd380, 0xd384, 0xd38c, 0xd38d, 0xd38f, 0xd390, 0xd391, 0xd398, 0xd399, 0xd39c, 0xd3a0, 0xd3a8, 0xd3a9, 0xd3ab, 0xd3ad, 0xd3b4, 0xd3b8, 0xd3bc, 0xd3c4, 0xd3c5, 0xd3c8, 0xd3c9, 0xd3d0, 0xd3d8, 0xd3e1, 0xd3e3, 0xd3ec, 0xd3ed, 0xd3f0, 0xd3f4, 0xd3fc, 0xd3fd, 0xd3ff, 0xd401, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc7a0[ 96 ] = { 0xfffd, 0xd408, 0xd41d, 0xd440, 0xd444, 0xd45c, 0xd460, 0xd464, 0xd46d, 0xd46f, 0xd478, 0xd479, 0xd47c, 0xd47f, 0xd480, 0xd482, 0xd488, 0xd489, 0xd48b, 0xd48d, 0xd494, 0xd4a9, 0xd4cc, 0xd4d0, 0xd4d4, 0xd4dc, 0xd4df, 0xd4e8, 0xd4ec, 0xd4f0, 0xd4f8, 0xd4fb, 0xd4fd, 0xd504, 0xd508, 0xd50c, 0xd514, 0xd515, 0xd517, 0xd53c, 0xd53d, 0xd540, 0xd544, 0xd54c, 0xd54d, 0xd54f, 0xd551, 0xd558, 0xd559, 0xd55c, 0xd560, 0xd565, 0xd568, 0xd569, 0xd56b, 0xd56d, 0xd574, 0xd575, 0xd578, 0xd57c, 0xd584, 0xd585, 0xd587, 0xd588, 0xd589, 0xd590, 0xd5a5, 0xd5c8, 0xd5c9, 0xd5cc, 0xd5d0, 0xd5d2, 0xd5d8, 0xd5d9, 0xd5db, 0xd5dd, 0xd5e4, 0xd5e5, 0xd5e8, 0xd5ec, 0xd5f4, 0xd5f5, 0xd5f7, 0xd5f9, 0xd600, 0xd601, 0xd604, 0xd608, 0xd610, 0xd611, 0xd613, 0xd614, 0xd615, 0xd61c, 0xd620, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc8a0[ 96 ] = { 0xfffd, 0xd624, 0xd62d, 0xd638, 0xd639, 0xd63c, 0xd640, 0xd645, 0xd648, 0xd649, 0xd64b, 0xd64d, 0xd651, 0xd654, 0xd655, 0xd658, 0xd65c, 0xd667, 0xd669, 0xd670, 0xd671, 0xd674, 0xd683, 0xd685, 0xd68c, 0xd68d, 0xd690, 0xd694, 0xd69d, 0xd69f, 0xd6a1, 0xd6a8, 0xd6ac, 0xd6b0, 0xd6b9, 0xd6bb, 0xd6c4, 0xd6c5, 0xd6c8, 0xd6cc, 0xd6d1, 0xd6d4, 0xd6d7, 0xd6d9, 0xd6e0, 0xd6e4, 0xd6e8, 0xd6f0, 0xd6f5, 0xd6fc, 0xd6fd, 0xd700, 0xd704, 0xd711, 0xd718, 0xd719, 0xd71c, 0xd720, 0xd728, 0xd729, 0xd72b, 0xd72d, 0xd734, 0xd735, 0xd738, 0xd73c, 0xd744, 0xd747, 0xd749, 0xd750, 0xd751, 0xd754, 0xd756, 0xd757, 0xd758, 0xd759, 0xd760, 0xd761, 0xd763, 0xd765, 0xd769, 0xd76c, 0xd770, 0xd774, 0xd77c, 0xd77d, 0xd781, 0xd788, 0xd789, 0xd78c, 0xd790, 0xd798, 0xd799, 0xd79b, 0xd79d, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcaa0[ 96 ] = { 0xfffd, 0x4f3d, 0x4f73, 0x5047, 0x50f9, 0x52a0, 0x53ef, 0x5475, 0x54e5, 0x5609, 0x5ac1, 0x5bb6, 0x6687, 0x67b6, 0x67b7, 0x67ef, 0x6b4c, 0x73c2, 0x75c2, 0x7a3c, 0x82db, 0x8304, 0x8857, 0x8888, 0x8a36, 0x8cc8, 0x8dcf, 0x8efb, 0x8fe6, 0x99d5, 0x523b, 0x5374, 0x5404, 0x606a, 0x6164, 0x6bbc, 0x73cf, 0x811a, 0x89ba, 0x89d2, 0x95a3, 0x4f83, 0x520a, 0x58be, 0x5978, 0x59e6, 0x5e72, 0x5e79, 0x61c7, 0x63c0, 0x6746, 0x67ec, 0x687f, 0x6f97, 0x764e, 0x770b, 0x78f5, 0x7a08, 0x7aff, 0x7c21, 0x809d, 0x826e, 0x8271, 0x8aeb, 0x9593, 0x4e6b, 0x559d, 0x66f7, 0x6e34, 0x78a3, 0x7aed, 0x845b, 0x8910, 0x874e, 0x97a8, 0x52d8, 0x574e, 0x582a, 0x5d4c, 0x611f, 0x61be, 0x6221, 0x6562, 0x67d1, 0x6a44, 0x6e1b, 0x7518, 0x75b3, 0x76e3, 0x77b0, 0x7d3a, 0x90af, 0x9451, 0x9452, 0x9f95, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcba0[ 96 ] = { 0xfffd, 0x5323, 0x5cac, 0x7532, 0x80db, 0x9240, 0x9598, 0x525b, 0x5808, 0x59dc, 0x5ca1, 0x5d17, 0x5eb7, 0x5f3a, 0x5f4a, 0x6177, 0x6c5f, 0x757a, 0x7586, 0x7ce0, 0x7d73, 0x7db1, 0x7f8c, 0x8154, 0x8221, 0x8591, 0x8941, 0x8b1b, 0x92fc, 0x964d, 0x9c47, 0x4ecb, 0x4ef7, 0x500b, 0x51f1, 0x584f, 0x6137, 0x613e, 0x6168, 0x6539, 0x69ea, 0x6f11, 0x75a5, 0x7686, 0x76d6, 0x7b87, 0x82a5, 0x84cb, 0xf900, 0x93a7, 0x958b, 0x5580, 0x5ba2, 0x5751, 0xf901, 0x7cb3, 0x7fb9, 0x91b5, 0x5028, 0x53bb, 0x5c45, 0x5de8, 0x62d2, 0x636e, 0x64da, 0x64e7, 0x6e20, 0x70ac, 0x795b, 0x8ddd, 0x8e1e, 0xf902, 0x907d, 0x9245, 0x92f8, 0x4e7e, 0x4ef6, 0x5065, 0x5dfe, 0x5efa, 0x6106, 0x6957, 0x8171, 0x8654, 0x8e47, 0x9375, 0x9a2b, 0x4e5e, 0x5091, 0x6770, 0x6840, 0x5109, 0x528d, 0x5292, 0x6aa2, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcca0[ 96 ] = { 0xfffd, 0x77bc, 0x9210, 0x9ed4, 0x52ab, 0x602f, 0x8ff2, 0x5048, 0x61a9, 0x63ed, 0x64ca, 0x683c, 0x6a84, 0x6fc0, 0x8188, 0x89a1, 0x9694, 0x5805, 0x727d, 0x72ac, 0x7504, 0x7d79, 0x7e6d, 0x80a9, 0x898b, 0x8b74, 0x9063, 0x9d51, 0x6289, 0x6c7a, 0x6f54, 0x7d50, 0x7f3a, 0x8a23, 0x517c, 0x614a, 0x7b9d, 0x8b19, 0x9257, 0x938c, 0x4eac, 0x4fd3, 0x501e, 0x50be, 0x5106, 0x52c1, 0x52cd, 0x537f, 0x5770, 0x5883, 0x5e9a, 0x5f91, 0x6176, 0x61ac, 0x64ce, 0x656c, 0x666f, 0x66bb, 0x66f4, 0x6897, 0x6d87, 0x7085, 0x70f1, 0x749f, 0x74a5, 0x74ca, 0x75d9, 0x786c, 0x78ec, 0x7adf, 0x7af6, 0x7d45, 0x7d93, 0x8015, 0x803f, 0x811b, 0x8396, 0x8b66, 0x8f15, 0x9015, 0x93e1, 0x9803, 0x9838, 0x9a5a, 0x9be8, 0x4fc2, 0x5553, 0x583a, 0x5951, 0x5b63, 0x5c46, 0x60b8, 0x6212, 0x6842, 0x68b0, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcda0[ 96 ] = { 0xfffd, 0x68e8, 0x6eaa, 0x754c, 0x7678, 0x78ce, 0x7a3d, 0x7cfb, 0x7e6b, 0x7e7c, 0x8a08, 0x8aa1, 0x8c3f, 0x968e, 0x9dc4, 0x53e4, 0x53e9, 0x544a, 0x5471, 0x56fa, 0x59d1, 0x5b64, 0x5c3b, 0x5eab, 0x62f7, 0x6537, 0x6545, 0x6572, 0x66a0, 0x67af, 0x69c1, 0x6cbd, 0x75fc, 0x7690, 0x777e, 0x7a3f, 0x7f94, 0x8003, 0x80a1, 0x818f, 0x82e6, 0x82fd, 0x83f0, 0x85c1, 0x8831, 0x88b4, 0x8aa5, 0xf903, 0x8f9c, 0x932e, 0x96c7, 0x9867, 0x9ad8, 0x9f13, 0x54ed, 0x659b, 0x66f2, 0x688f, 0x7a40, 0x8c37, 0x9d60, 0x56f0, 0x5764, 0x5d11, 0x6606, 0x68b1, 0x68cd, 0x6efe, 0x7428, 0x889e, 0x9be4, 0x6c68, 0xf904, 0x9aa8, 0x4f9b, 0x516c, 0x5171, 0x529f, 0x5b54, 0x5de5, 0x6050, 0x606d, 0x62f1, 0x63a7, 0x653b, 0x73d9, 0x7a7a, 0x86a3, 0x8ca2, 0x978f, 0x4e32, 0x5be1, 0x6208, 0x679c, 0x74dc, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcea0[ 96 ] = { 0xfffd, 0x79d1, 0x83d3, 0x8a87, 0x8ab2, 0x8de8, 0x904e, 0x934b, 0x9846, 0x5ed3, 0x69e8, 0x85ff, 0x90ed, 0xf905, 0x51a0, 0x5b98, 0x5bec, 0x6163, 0x68fa, 0x6b3e, 0x704c, 0x742f, 0x74d8, 0x7ba1, 0x7f50, 0x83c5, 0x89c0, 0x8cab, 0x95dc, 0x9928, 0x522e, 0x605d, 0x62ec, 0x9002, 0x4f8a, 0x5149, 0x5321, 0x58d9, 0x5ee3, 0x66e0, 0x6d38, 0x709a, 0x72c2, 0x73d6, 0x7b50, 0x80f1, 0x945b, 0x5366, 0x639b, 0x7f6b, 0x4e56, 0x5080, 0x584a, 0x58de, 0x602a, 0x6127, 0x62d0, 0x69d0, 0x9b41, 0x5b8f, 0x7d18, 0x80b1, 0x8f5f, 0x4ea4, 0x50d1, 0x54ac, 0x55ac, 0x5b0c, 0x5da0, 0x5de7, 0x652a, 0x654e, 0x6821, 0x6a4b, 0x72e1, 0x768e, 0x77ef, 0x7d5e, 0x7ff9, 0x81a0, 0x854e, 0x86df, 0x8f03, 0x8f4e, 0x90ca, 0x9903, 0x9a55, 0x9bab, 0x4e18, 0x4e45, 0x4e5d, 0x4ec7, 0x4ff1, 0x5177, 0x52fe, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcfa0[ 96 ] = { 0xfffd, 0x5340, 0x53e3, 0x53e5, 0x548e, 0x5614, 0x5775, 0x57a2, 0x5bc7, 0x5d87, 0x5ed0, 0x61fc, 0x62d8, 0x6551, 0x67b8, 0x67e9, 0x69cb, 0x6b50, 0x6bc6, 0x6bec, 0x6c42, 0x6e9d, 0x7078, 0x72d7, 0x7396, 0x7403, 0x77bf, 0x77e9, 0x7a76, 0x7d7f, 0x8009, 0x81fc, 0x8205, 0x820a, 0x82df, 0x8862, 0x8b33, 0x8cfc, 0x8ec0, 0x9011, 0x90b1, 0x9264, 0x92b6, 0x99d2, 0x9a45, 0x9ce9, 0x9dd7, 0x9f9c, 0x570b, 0x5c40, 0x83ca, 0x97a0, 0x97ab, 0x9eb4, 0x541b, 0x7a98, 0x7fa4, 0x88d9, 0x8ecd, 0x90e1, 0x5800, 0x5c48, 0x6398, 0x7a9f, 0x5bae, 0x5f13, 0x7a79, 0x7aae, 0x828e, 0x8eac, 0x5026, 0x5238, 0x52f8, 0x5377, 0x5708, 0x62f3, 0x6372, 0x6b0a, 0x6dc3, 0x7737, 0x53a5, 0x7357, 0x8568, 0x8e76, 0x95d5, 0x673a, 0x6ac3, 0x6f70, 0x8a6d, 0x8ecc, 0x994b, 0xf906, 0x6677, 0x6b78, 0x8cb4, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd0a0[ 96 ] = { 0xfffd, 0x9b3c, 0xf907, 0x53eb, 0x572d, 0x594e, 0x63c6, 0x69fb, 0x73ea, 0x7845, 0x7aba, 0x7ac5, 0x7cfe, 0x8475, 0x898f, 0x8d73, 0x9035, 0x95a8, 0x52fb, 0x5747, 0x7547, 0x7b60, 0x83cc, 0x921e, 0xf908, 0x6a58, 0x514b, 0x524b, 0x5287, 0x621f, 0x68d8, 0x6975, 0x9699, 0x50c5, 0x52a4, 0x52e4, 0x61c3, 0x65a4, 0x6839, 0x69ff, 0x747e, 0x7b4b, 0x82b9, 0x83eb, 0x89b2, 0x8b39, 0x8fd1, 0x9949, 0xf909, 0x4eca, 0x5997, 0x64d2, 0x6611, 0x6a8e, 0x7434, 0x7981, 0x79bd, 0x82a9, 0x887e, 0x887f, 0x895f, 0xf90a, 0x9326, 0x4f0b, 0x53ca, 0x6025, 0x6271, 0x6c72, 0x7d1a, 0x7d66, 0x4e98, 0x5162, 0x77dc, 0x80af, 0x4f01, 0x4f0e, 0x5176, 0x5180, 0x55dc, 0x5668, 0x573b, 0x57fa, 0x57fc, 0x5914, 0x5947, 0x5993, 0x5bc4, 0x5c90, 0x5d0e, 0x5df1, 0x5e7e, 0x5fcc, 0x6280, 0x65d7, 0x65e3, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd1a0[ 96 ] = { 0xfffd, 0x671e, 0x671f, 0x675e, 0x68cb, 0x68c4, 0x6a5f, 0x6b3a, 0x6c23, 0x6c7d, 0x6c82, 0x6dc7, 0x7398, 0x7426, 0x742a, 0x7482, 0x74a3, 0x7578, 0x757f, 0x7881, 0x78ef, 0x7941, 0x7947, 0x7948, 0x797a, 0x7b95, 0x7d00, 0x7dba, 0x7f88, 0x8006, 0x802d, 0x808c, 0x8a18, 0x8b4f, 0x8c48, 0x8d77, 0x9321, 0x9324, 0x98e2, 0x9951, 0x9a0e, 0x9a0f, 0x9a65, 0x9e92, 0x7dca, 0x4f76, 0x5409, 0x62ee, 0x6854, 0x91d1, 0x55ab, 0x513a, 0xf90b, 0xf90c, 0x5a1c, 0x61e6, 0xf90d, 0x62cf, 0x62ff, 0xf90e, 0xf90f, 0xf910, 0xf911, 0xf912, 0xf913, 0x90a3, 0xf914, 0xf915, 0xf916, 0xf917, 0xf918, 0x8afe, 0xf919, 0xf91a, 0xf91b, 0xf91c, 0x6696, 0xf91d, 0x7156, 0xf91e, 0xf91f, 0x96e3, 0xf920, 0x634f, 0x637a, 0x5357, 0xf921, 0x678f, 0x6960, 0x6e73, 0xf922, 0x7537, 0xf923, 0xf924, 0xf925, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd2a0[ 96 ] = { 0xfffd, 0x7d0d, 0xf926, 0xf927, 0x8872, 0x56ca, 0x5a18, 0xf928, 0xf929, 0xf92a, 0xf92b, 0xf92c, 0x4e43, 0xf92d, 0x5167, 0x5948, 0x67f0, 0x8010, 0xf92e, 0x5973, 0x5e74, 0x649a, 0x79ca, 0x5ff5, 0x606c, 0x62c8, 0x637b, 0x5be7, 0x5bd7, 0x52aa, 0xf92f, 0x5974, 0x5f29, 0x6012, 0xf930, 0xf931, 0xf932, 0x7459, 0xf933, 0xf934, 0xf935, 0xf936, 0xf937, 0xf938, 0x99d1, 0xf939, 0xf93a, 0xf93b, 0xf93c, 0xf93d, 0xf93e, 0xf93f, 0xf940, 0xf941, 0xf942, 0xf943, 0x6fc3, 0xf944, 0xf945, 0x81bf, 0x8fb2, 0x60f1, 0xf946, 0xf947, 0x8166, 0xf948, 0xf949, 0x5c3f, 0xf94a, 0xf94b, 0xf94c, 0xf94d, 0xf94e, 0xf94f, 0xf950, 0xf951, 0x5ae9, 0x8a25, 0x677b, 0x7d10, 0xf952, 0xf953, 0xf954, 0xf955, 0xf956, 0xf957, 0x80fd, 0xf958, 0xf959, 0x5c3c, 0x6ce5, 0x533f, 0x6eba, 0x591a, 0x8336, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd3a0[ 96 ] = { 0xfffd, 0x4e39, 0x4eb6, 0x4f46, 0x55ae, 0x5718, 0x58c7, 0x5f56, 0x65b7, 0x65e6, 0x6a80, 0x6bb5, 0x6e4d, 0x77ed, 0x7aef, 0x7c1e, 0x7dde, 0x86cb, 0x8892, 0x9132, 0x935b, 0x64bb, 0x6fbe, 0x737a, 0x75b8, 0x9054, 0x5556, 0x574d, 0x61ba, 0x64d4, 0x66c7, 0x6de1, 0x6e5b, 0x6f6d, 0x6fb9, 0x75f0, 0x8043, 0x81bd, 0x8541, 0x8983, 0x8ac7, 0x8b5a, 0x931f, 0x6c93, 0x7553, 0x7b54, 0x8e0f, 0x905d, 0x5510, 0x5802, 0x5858, 0x5e62, 0x6207, 0x649e, 0x68e0, 0x7576, 0x7cd6, 0x87b3, 0x9ee8, 0x4ee3, 0x5788, 0x576e, 0x5927, 0x5c0d, 0x5cb1, 0x5e36, 0x5f85, 0x6234, 0x64e1, 0x73b3, 0x81fa, 0x888b, 0x8cb8, 0x968a, 0x9edb, 0x5b85, 0x5fb7, 0x60b3, 0x5012, 0x5200, 0x5230, 0x5716, 0x5835, 0x5857, 0x5c0e, 0x5c60, 0x5cf6, 0x5d8b, 0x5ea6, 0x5f92, 0x60bc, 0x6311, 0x6389, 0x6417, 0x6843, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd4a0[ 96 ] = { 0xfffd, 0x68f9, 0x6ac2, 0x6dd8, 0x6e21, 0x6ed4, 0x6fe4, 0x71fe, 0x76dc, 0x7779, 0x79b1, 0x7a3b, 0x8404, 0x89a9, 0x8ced, 0x8df3, 0x8e48, 0x9003, 0x9014, 0x9053, 0x90fd, 0x934d, 0x9676, 0x97dc, 0x6bd2, 0x7006, 0x7258, 0x72a2, 0x7368, 0x7763, 0x79bf, 0x7be4, 0x7e9b, 0x8b80, 0x58a9, 0x60c7, 0x6566, 0x65fd, 0x66be, 0x6c8c, 0x711e, 0x71c9, 0x8c5a, 0x9813, 0x4e6d, 0x7a81, 0x4edd, 0x51ac, 0x51cd, 0x52d5, 0x540c, 0x61a7, 0x6771, 0x6850, 0x68df, 0x6d1e, 0x6f7c, 0x75bc, 0x77b3, 0x7ae5, 0x80f4, 0x8463, 0x9285, 0x515c, 0x6597, 0x675c, 0x6793, 0x75d8, 0x7ac7, 0x8373, 0xf95a, 0x8c46, 0x9017, 0x982d, 0x5c6f, 0x81c0, 0x829a, 0x9041, 0x906f, 0x920d, 0x5f97, 0x5d9d, 0x6a59, 0x71c8, 0x767b, 0x7b49, 0x85e4, 0x8b04, 0x9127, 0x9a30, 0x5587, 0x61f6, 0xf95b, 0x7669, 0x7f85, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd5a0[ 96 ] = { 0xfffd, 0x863f, 0x87ba, 0x88f8, 0x908f, 0xf95c, 0x6d1b, 0x70d9, 0x73de, 0x7d61, 0x843d, 0xf95d, 0x916a, 0x99f1, 0xf95e, 0x4e82, 0x5375, 0x6b04, 0x6b12, 0x703e, 0x721b, 0x862d, 0x9e1e, 0x524c, 0x8fa3, 0x5d50, 0x64e5, 0x652c, 0x6b16, 0x6feb, 0x7c43, 0x7e9c, 0x85cd, 0x8964, 0x89bd, 0x62c9, 0x81d8, 0x881f, 0x5eca, 0x6717, 0x6d6a, 0x72fc, 0x7405, 0x746f, 0x8782, 0x90de, 0x4f86, 0x5d0d, 0x5fa0, 0x840a, 0x51b7, 0x63a0, 0x7565, 0x4eae, 0x5006, 0x5169, 0x51c9, 0x6881, 0x6a11, 0x7cae, 0x7cb1, 0x7ce7, 0x826f, 0x8ad2, 0x8f1b, 0x91cf, 0x4fb6, 0x5137, 0x52f5, 0x5442, 0x5eec, 0x616e, 0x623e, 0x65c5, 0x6ada, 0x6ffe, 0x792a, 0x85dc, 0x8823, 0x95ad, 0x9a62, 0x9a6a, 0x9e97, 0x9ece, 0x529b, 0x66c6, 0x6b77, 0x701d, 0x792b, 0x8f62, 0x9742, 0x6190, 0x6200, 0x6523, 0x6f23, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd6a0[ 96 ] = { 0xfffd, 0x7149, 0x7489, 0x7df4, 0x806f, 0x84ee, 0x8f26, 0x9023, 0x934a, 0x51bd, 0x5217, 0x52a3, 0x6d0c, 0x70c8, 0x88c2, 0x5ec9, 0x6582, 0x6bae, 0x6fc2, 0x7c3e, 0x7375, 0x4ee4, 0x4f36, 0x56f9, 0xf95f, 0x5cba, 0x5dba, 0x601c, 0x73b2, 0x7b2d, 0x7f9a, 0x7fce, 0x8046, 0x901e, 0x9234, 0x96f6, 0x9748, 0x9818, 0x9f61, 0x4f8b, 0x6fa7, 0x79ae, 0x91b4, 0x96b7, 0x52de, 0xf960, 0x6488, 0x64c4, 0x6ad3, 0x6f5e, 0x7018, 0x7210, 0x76e7, 0x8001, 0x8606, 0x865c, 0x8def, 0x8f05, 0x9732, 0x9b6f, 0x9dfa, 0x9e75, 0x788c, 0x797f, 0x7da0, 0x83c9, 0x9304, 0x9e7f, 0x9e93, 0x8ad6, 0x58df, 0x5f04, 0x6727, 0x7027, 0x74cf, 0x7c60, 0x807e, 0x5121, 0x7028, 0x7262, 0x78ca, 0x8cc2, 0x8cda, 0x8cf4, 0x96f7, 0x4e86, 0x50da, 0x5bee, 0x5ed6, 0x6599, 0x71ce, 0x7642, 0x77ad, 0x804a, 0x84fc, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd7a0[ 96 ] = { 0xfffd, 0x907c, 0x9b27, 0x9f8d, 0x58d8, 0x5a41, 0x5c62, 0x6a13, 0x6dda, 0x6f0f, 0x763b, 0x7d2f, 0x7e37, 0x851e, 0x8938, 0x93e4, 0x964b, 0x5289, 0x65d2, 0x67f3, 0x69b4, 0x6d41, 0x6e9c, 0x700f, 0x7409, 0x7460, 0x7559, 0x7624, 0x786b, 0x8b2c, 0x985e, 0x516d, 0x622e, 0x9678, 0x4f96, 0x502b, 0x5d19, 0x6dea, 0x7db8, 0x8f2a, 0x5f8b, 0x6144, 0x6817, 0xf961, 0x9686, 0x52d2, 0x808b, 0x51dc, 0x51cc, 0x695e, 0x7a1c, 0x7dbe, 0x83f1, 0x9675, 0x4fda, 0x5229, 0x5398, 0x540f, 0x550e, 0x5c65, 0x60a7, 0x674e, 0x68a8, 0x6d6c, 0x7281, 0x72f8, 0x7406, 0x7483, 0xf962, 0x75e2, 0x7c6c, 0x7f79, 0x7fb8, 0x8389, 0x88cf, 0x88e1, 0x91cc, 0x91d0, 0x96e2, 0x9bc9, 0x541d, 0x6f7e, 0x71d0, 0x7498, 0x85fa, 0x8eaa, 0x96a3, 0x9c57, 0x9e9f, 0x6797, 0x6dcb, 0x7433, 0x81e8, 0x9716, 0x782c, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd8a0[ 96 ] = { 0xfffd, 0x7acb, 0x7b20, 0x7c92, 0x6469, 0x746a, 0x75f2, 0x78bc, 0x78e8, 0x99ac, 0x9b54, 0x9ebb, 0x5bde, 0x5e55, 0x6f20, 0x819c, 0x83ab, 0x9088, 0x4e07, 0x534d, 0x5a29, 0x5dd2, 0x5f4e, 0x6162, 0x633d, 0x6669, 0x66fc, 0x6eff, 0x6f2b, 0x7063, 0x779e, 0x842c, 0x8513, 0x883b, 0x8f13, 0x9945, 0x9c3b, 0x551c, 0x62b9, 0x672b, 0x6cab, 0x8309, 0x896a, 0x977a, 0x4ea1, 0x5984, 0x5fd8, 0x5fd9, 0x671b, 0x7db2, 0x7f54, 0x8292, 0x832b, 0x83bd, 0x8f1e, 0x9099, 0x57cb, 0x59b9, 0x5a92, 0x5bd0, 0x6627, 0x679a, 0x6885, 0x6bcf, 0x7164, 0x7f75, 0x8cb7, 0x8ce3, 0x9081, 0x9b45, 0x8108, 0x8c8a, 0x964c, 0x9a40, 0x9ea5, 0x5b5f, 0x6c13, 0x731b, 0x76f2, 0x76df, 0x840c, 0x51aa, 0x8993, 0x514d, 0x5195, 0x52c9, 0x68c9, 0x6c94, 0x7704, 0x7720, 0x7dbf, 0x7dec, 0x9762, 0x9eb5, 0x6ec5, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd9a0[ 96 ] = { 0xfffd, 0x8511, 0x51a5, 0x540d, 0x547d, 0x660e, 0x669d, 0x6927, 0x6e9f, 0x76bf, 0x7791, 0x8317, 0x84c2, 0x879f, 0x9169, 0x9298, 0x9cf4, 0x8882, 0x4fae, 0x5192, 0x52df, 0x59c6, 0x5e3d, 0x6155, 0x6478, 0x6479, 0x66ae, 0x67d0, 0x6a21, 0x6bcd, 0x6bdb, 0x725f, 0x7261, 0x7441, 0x7738, 0x77db, 0x8017, 0x82bc, 0x8305, 0x8b00, 0x8b28, 0x8c8c, 0x6728, 0x6c90, 0x7267, 0x76ee, 0x7766, 0x7a46, 0x9da9, 0x6b7f, 0x6c92, 0x5922, 0x6726, 0x8499, 0x536f, 0x5893, 0x5999, 0x5edf, 0x63cf, 0x6634, 0x6773, 0x6e3a, 0x732b, 0x7ad7, 0x82d7, 0x9328, 0x52d9, 0x5deb, 0x61ae, 0x61cb, 0x620a, 0x62c7, 0x64ab, 0x65e0, 0x6959, 0x6b66, 0x6bcb, 0x7121, 0x73f7, 0x755d, 0x7e46, 0x821e, 0x8302, 0x856a, 0x8aa3, 0x8cbf, 0x9727, 0x9d61, 0x58a8, 0x9ed8, 0x5011, 0x520e, 0x543b, 0x554f, 0x6587, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdaa0[ 96 ] = { 0xfffd, 0x6c76, 0x7d0a, 0x7d0b, 0x805e, 0x868a, 0x9580, 0x96ef, 0x52ff, 0x6c95, 0x7269, 0x5473, 0x5a9a, 0x5c3e, 0x5d4b, 0x5f4c, 0x5fae, 0x672a, 0x68b6, 0x6963, 0x6e3c, 0x6e44, 0x7709, 0x7c73, 0x7f8e, 0x8587, 0x8b0e, 0x8ff7, 0x9761, 0x9ef4, 0x5cb7, 0x60b6, 0x610d, 0x61ab, 0x654f, 0x65fb, 0x65fc, 0x6c11, 0x6cef, 0x739f, 0x73c9, 0x7de1, 0x9594, 0x5bc6, 0x871c, 0x8b10, 0x525d, 0x535a, 0x62cd, 0x640f, 0x64b2, 0x6734, 0x6a38, 0x6cca, 0x73c0, 0x749e, 0x7b94, 0x7c95, 0x7e1b, 0x818a, 0x8236, 0x8584, 0x8feb, 0x96f9, 0x99c1, 0x4f34, 0x534a, 0x53cd, 0x53db, 0x62cc, 0x642c, 0x6500, 0x6591, 0x69c3, 0x6cee, 0x6f58, 0x73ed, 0x7554, 0x7622, 0x76e4, 0x76fc, 0x78d0, 0x78fb, 0x792c, 0x7d46, 0x822c, 0x87e0, 0x8fd4, 0x9812, 0x98ef, 0x52c3, 0x62d4, 0x64a5, 0x6e24, 0x6f51, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdba0[ 96 ] = { 0xfffd, 0x767c, 0x8dcb, 0x91b1, 0x9262, 0x9aee, 0x9b43, 0x5023, 0x508d, 0x574a, 0x59a8, 0x5c28, 0x5e47, 0x5f77, 0x623f, 0x653e, 0x65b9, 0x65c1, 0x6609, 0x678b, 0x699c, 0x6ec2, 0x78c5, 0x7d21, 0x80aa, 0x8180, 0x822b, 0x82b3, 0x84a1, 0x868c, 0x8a2a, 0x8b17, 0x90a6, 0x9632, 0x9f90, 0x500d, 0x4ff3, 0xf963, 0x57f9, 0x5f98, 0x62dc, 0x6392, 0x676f, 0x6e43, 0x7119, 0x76c3, 0x80cc, 0x80da, 0x88f4, 0x88f5, 0x8919, 0x8ce0, 0x8f29, 0x914d, 0x966a, 0x4f2f, 0x4f70, 0x5e1b, 0x67cf, 0x6822, 0x767d, 0x767e, 0x9b44, 0x5e61, 0x6a0a, 0x7169, 0x71d4, 0x756a, 0xf964, 0x7e41, 0x8543, 0x85e9, 0x98dc, 0x4f10, 0x7b4f, 0x7f70, 0x95a5, 0x51e1, 0x5e06, 0x68b5, 0x6c3e, 0x6c4e, 0x6cdb, 0x72af, 0x7bc4, 0x8303, 0x6cd5, 0x743a, 0x50fb, 0x5288, 0x58c1, 0x64d8, 0x6a97, 0x74a7, 0x7656, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdca0[ 96 ] = { 0xfffd, 0x78a7, 0x8617, 0x95e2, 0x9739, 0xf965, 0x535e, 0x5f01, 0x8b8a, 0x8fa8, 0x8faf, 0x908a, 0x5225, 0x77a5, 0x9c49, 0x9f08, 0x4e19, 0x5002, 0x5175, 0x5c5b, 0x5e77, 0x661e, 0x663a, 0x67c4, 0x68c5, 0x70b3, 0x7501, 0x75c5, 0x79c9, 0x7add, 0x8f27, 0x9920, 0x9a08, 0x4fdd, 0x5821, 0x5831, 0x5bf6, 0x666e, 0x6b65, 0x6d11, 0x6e7a, 0x6f7d, 0x73e4, 0x752b, 0x83e9, 0x88dc, 0x8913, 0x8b5c, 0x8f14, 0x4f0f, 0x50d5, 0x5310, 0x535c, 0x5b93, 0x5fa9, 0x670d, 0x798f, 0x8179, 0x832f, 0x8514, 0x8907, 0x8986, 0x8f39, 0x8f3b, 0x99a5, 0x9c12, 0x672c, 0x4e76, 0x4ff8, 0x5949, 0x5c01, 0x5cef, 0x5cf0, 0x6367, 0x68d2, 0x70fd, 0x71a2, 0x742b, 0x7e2b, 0x84ec, 0x8702, 0x9022, 0x92d2, 0x9cf3, 0x4e0d, 0x4ed8, 0x4fef, 0x5085, 0x5256, 0x526f, 0x5426, 0x5490, 0x57e0, 0x592b, 0x5a66, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdda0[ 96 ] = { 0xfffd, 0x5b5a, 0x5b75, 0x5bcc, 0x5e9c, 0xf966, 0x6276, 0x6577, 0x65a7, 0x6d6e, 0x6ea5, 0x7236, 0x7b26, 0x7c3f, 0x7f36, 0x8150, 0x8151, 0x819a, 0x8240, 0x8299, 0x83a9, 0x8a03, 0x8ca0, 0x8ce6, 0x8cfb, 0x8d74, 0x8dba, 0x90e8, 0x91dc, 0x961c, 0x9644, 0x99d9, 0x9ce7, 0x5317, 0x5206, 0x5429, 0x5674, 0x58b3, 0x5954, 0x596e, 0x5fff, 0x61a4, 0x626e, 0x6610, 0x6c7e, 0x711a, 0x76c6, 0x7c89, 0x7cde, 0x7d1b, 0x82ac, 0x8cc1, 0x96f0, 0xf967, 0x4f5b, 0x5f17, 0x5f7f, 0x62c2, 0x5d29, 0x670b, 0x68da, 0x787c, 0x7e43, 0x9d6c, 0x4e15, 0x5099, 0x5315, 0x532a, 0x5351, 0x5983, 0x5a62, 0x5e87, 0x60b2, 0x618a, 0x6249, 0x6279, 0x6590, 0x6787, 0x69a7, 0x6bd4, 0x6bd6, 0x6bd7, 0x6bd8, 0x6cb8, 0xf968, 0x7435, 0x75fa, 0x7812, 0x7891, 0x79d5, 0x79d8, 0x7c83, 0x7dcb, 0x7fe1, 0x80a5, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdea0[ 96 ] = { 0xfffd, 0x813e, 0x81c2, 0x83f2, 0x871a, 0x88e8, 0x8ab9, 0x8b6c, 0x8cbb, 0x9119, 0x975e, 0x98db, 0x9f3b, 0x56ac, 0x5b2a, 0x5f6c, 0x658c, 0x6ab3, 0x6baf, 0x6d5c, 0x6ff1, 0x7015, 0x725d, 0x73ad, 0x8ca7, 0x8cd3, 0x983b, 0x6191, 0x6c37, 0x8058, 0x9a01, 0x4e4d, 0x4e8b, 0x4e9b, 0x4ed5, 0x4f3a, 0x4f3c, 0x4f7f, 0x4fdf, 0x50ff, 0x53f2, 0x53f8, 0x5506, 0x55e3, 0x56db, 0x58eb, 0x5962, 0x5a11, 0x5beb, 0x5bfa, 0x5c04, 0x5df3, 0x5e2b, 0x5f99, 0x601d, 0x6368, 0x659c, 0x65af, 0x67f6, 0x67fb, 0x68ad, 0x6b7b, 0x6c99, 0x6cd7, 0x6e23, 0x7009, 0x7345, 0x7802, 0x793e, 0x7940, 0x7960, 0x79c1, 0x7be9, 0x7d17, 0x7d72, 0x8086, 0x820d, 0x838e, 0x84d1, 0x86c7, 0x88df, 0x8a50, 0x8a5e, 0x8b1d, 0x8cdc, 0x8d66, 0x8fad, 0x90aa, 0x98fc, 0x99df, 0x9e9d, 0x524a, 0xf969, 0x6714, 0xf96a, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdfa0[ 96 ] = { 0xfffd, 0x5098, 0x522a, 0x5c71, 0x6563, 0x6c55, 0x73ca, 0x7523, 0x759d, 0x7b97, 0x849c, 0x9178, 0x9730, 0x4e77, 0x6492, 0x6bba, 0x715e, 0x85a9, 0x4e09, 0xf96b, 0x6749, 0x68ee, 0x6e17, 0x829f, 0x8518, 0x886b, 0x63f7, 0x6f81, 0x9212, 0x98af, 0x4e0a, 0x50b7, 0x50cf, 0x511f, 0x5546, 0x55aa, 0x5617, 0x5b40, 0x5c19, 0x5ce0, 0x5e38, 0x5e8a, 0x5ea0, 0x5ec2, 0x60f3, 0x6851, 0x6a61, 0x6e58, 0x723d, 0x7240, 0x72c0, 0x76f8, 0x7965, 0x7bb1, 0x7fd4, 0x88f3, 0x89f4, 0x8a73, 0x8c61, 0x8cde, 0x971c, 0x585e, 0x74bd, 0x8cfd, 0x55c7, 0xf96c, 0x7a61, 0x7d22, 0x8272, 0x7272, 0x751f, 0x7525, 0xf96d, 0x7b19, 0x5885, 0x58fb, 0x5dbc, 0x5e8f, 0x5eb6, 0x5f90, 0x6055, 0x6292, 0x637f, 0x654d, 0x6691, 0x66d9, 0x66f8, 0x6816, 0x68f2, 0x7280, 0x745e, 0x7b6e, 0x7d6e, 0x7dd6, 0x7f72, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe0a0[ 96 ] = { 0xfffd, 0x80e5, 0x8212, 0x85af, 0x897f, 0x8a93, 0x901d, 0x92e4, 0x9ecd, 0x9f20, 0x5915, 0x596d, 0x5e2d, 0x60dc, 0x6614, 0x6673, 0x6790, 0x6c50, 0x6dc5, 0x6f5f, 0x77f3, 0x78a9, 0x84c6, 0x91cb, 0x932b, 0x4ed9, 0x50ca, 0x5148, 0x5584, 0x5b0b, 0x5ba3, 0x6247, 0x657e, 0x65cb, 0x6e32, 0x717d, 0x7401, 0x7444, 0x7487, 0x74bf, 0x766c, 0x79aa, 0x7dda, 0x7e55, 0x7fa8, 0x817a, 0x81b3, 0x8239, 0x861a, 0x87ec, 0x8a75, 0x8de3, 0x9078, 0x9291, 0x9425, 0x994d, 0x9bae, 0x5368, 0x5c51, 0x6954, 0x6cc4, 0x6d29, 0x6e2b, 0x820c, 0x859b, 0x893b, 0x8a2d, 0x8aaa, 0x96ea, 0x9f67, 0x5261, 0x66b9, 0x6bb2, 0x7e96, 0x87fe, 0x8d0d, 0x9583, 0x965d, 0x651d, 0x6d89, 0x71ee, 0xf96e, 0x57ce, 0x59d3, 0x5bac, 0x6027, 0x60fa, 0x6210, 0x661f, 0x665f, 0x7329, 0x73f9, 0x76db, 0x7701, 0x7b6c, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe1a0[ 96 ] = { 0xfffd, 0x8056, 0x8072, 0x8165, 0x8aa0, 0x9192, 0x4e16, 0x52e2, 0x6b72, 0x6d17, 0x7a05, 0x7b39, 0x7d30, 0xf96f, 0x8cb0, 0x53ec, 0x562f, 0x5851, 0x5bb5, 0x5c0f, 0x5c11, 0x5de2, 0x6240, 0x6383, 0x6414, 0x662d, 0x68b3, 0x6cbc, 0x6d88, 0x6eaf, 0x701f, 0x70a4, 0x71d2, 0x7526, 0x758f, 0x758e, 0x7619, 0x7b11, 0x7be0, 0x7c2b, 0x7d20, 0x7d39, 0x852c, 0x856d, 0x8607, 0x8a34, 0x900d, 0x9061, 0x90b5, 0x92b7, 0x97f6, 0x9a37, 0x4fd7, 0x5c6c, 0x675f, 0x6d91, 0x7c9f, 0x7e8c, 0x8b16, 0x8d16, 0x901f, 0x5b6b, 0x5dfd, 0x640d, 0x84c0, 0x905c, 0x98e1, 0x7387, 0x5b8b, 0x609a, 0x677e, 0x6dde, 0x8a1f, 0x8aa6, 0x9001, 0x980c, 0x5237, 0xf970, 0x7051, 0x788e, 0x9396, 0x8870, 0x91d7, 0x4fee, 0x53d7, 0x55fd, 0x56da, 0x5782, 0x58fd, 0x5ac2, 0x5b88, 0x5cab, 0x5cc0, 0x5e25, 0x6101, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe2a0[ 96 ] = { 0xfffd, 0x620d, 0x624b, 0x6388, 0x641c, 0x6536, 0x6578, 0x6a39, 0x6b8a, 0x6c34, 0x6d19, 0x6f31, 0x71e7, 0x72e9, 0x7378, 0x7407, 0x74b2, 0x7626, 0x7761, 0x79c0, 0x7a57, 0x7aea, 0x7cb9, 0x7d8f, 0x7dac, 0x7e61, 0x7f9e, 0x8129, 0x8331, 0x8490, 0x84da, 0x85ea, 0x8896, 0x8ab0, 0x8b90, 0x8f38, 0x9042, 0x9083, 0x916c, 0x9296, 0x92b9, 0x968b, 0x96a7, 0x96a8, 0x96d6, 0x9700, 0x9808, 0x9996, 0x9ad3, 0x9b1a, 0x53d4, 0x587e, 0x5919, 0x5b70, 0x5bbf, 0x6dd1, 0x6f5a, 0x719f, 0x7421, 0x74b9, 0x8085, 0x83fd, 0x5de1, 0x5f87, 0x5faa, 0x6042, 0x65ec, 0x6812, 0x696f, 0x6a53, 0x6b89, 0x6d35, 0x6df3, 0x73e3, 0x76fe, 0x77ac, 0x7b4d, 0x7d14, 0x8123, 0x821c, 0x8340, 0x84f4, 0x8563, 0x8a62, 0x8ac4, 0x9187, 0x931e, 0x9806, 0x99b4, 0x620c, 0x8853, 0x8ff0, 0x9265, 0x5d07, 0x5d27, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe3a0[ 96 ] = { 0xfffd, 0x5d69, 0x745f, 0x819d, 0x8768, 0x6fd5, 0x62fe, 0x7fd2, 0x8936, 0x8972, 0x4e1e, 0x4e58, 0x50e7, 0x52dd, 0x5347, 0x627f, 0x6607, 0x7e69, 0x8805, 0x965e, 0x4f8d, 0x5319, 0x5636, 0x59cb, 0x5aa4, 0x5c38, 0x5c4e, 0x5c4d, 0x5e02, 0x5f11, 0x6043, 0x65bd, 0x662f, 0x6642, 0x67be, 0x67f4, 0x731c, 0x77e2, 0x793a, 0x7fc5, 0x8494, 0x84cd, 0x8996, 0x8a66, 0x8a69, 0x8ae1, 0x8c55, 0x8c7a, 0x57f4, 0x5bd4, 0x5f0f, 0x606f, 0x62ed, 0x690d, 0x6b96, 0x6e5c, 0x7184, 0x7bd2, 0x8755, 0x8b58, 0x8efe, 0x98df, 0x98fe, 0x4f38, 0x4f81, 0x4fe1, 0x547b, 0x5a20, 0x5bb8, 0x613c, 0x65b0, 0x6668, 0x71fc, 0x7533, 0x795e, 0x7d33, 0x814e, 0x81e3, 0x8398, 0x85aa, 0x85ce, 0x8703, 0x8a0a, 0x8eab, 0x8f9b, 0xf971, 0x8fc5, 0x5931, 0x5ba4, 0x5be6, 0x6089, 0x5be9, 0x5c0b, 0x5fc3, 0x6c81, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe4a0[ 96 ] = { 0xfffd, 0xf972, 0x6df1, 0x700b, 0x751a, 0x82af, 0x8af6, 0x4ec0, 0x5341, 0xf973, 0x96d9, 0x6c0f, 0x4e9e, 0x4fc4, 0x5152, 0x555e, 0x5a25, 0x5ce8, 0x6211, 0x7259, 0x82bd, 0x83aa, 0x86fe, 0x8859, 0x8a1d, 0x963f, 0x96c5, 0x9913, 0x9d09, 0x9d5d, 0x580a, 0x5cb3, 0x5dbd, 0x5e44, 0x60e1, 0x6115, 0x63e1, 0x6a02, 0x6e25, 0x9102, 0x9354, 0x984e, 0x9c10, 0x9f77, 0x5b89, 0x5cb8, 0x6309, 0x664f, 0x6848, 0x773c, 0x96c1, 0x978d, 0x9854, 0x9b9f, 0x65a1, 0x8b01, 0x8ecb, 0x95bc, 0x5535, 0x5ca9, 0x5dd6, 0x5eb5, 0x6697, 0x764c, 0x83f4, 0x95c7, 0x58d3, 0x62bc, 0x72ce, 0x9d28, 0x4ef0, 0x592e, 0x600f, 0x663b, 0x6b83, 0x79e7, 0x9d26, 0x5393, 0x54c0, 0x57c3, 0x5d16, 0x611b, 0x66d6, 0x6daf, 0x788d, 0x827e, 0x9698, 0x9744, 0x5384, 0x627c, 0x6396, 0x6db2, 0x7e0a, 0x814b, 0x984d, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe5a0[ 96 ] = { 0xfffd, 0x6afb, 0x7f4c, 0x9daf, 0x9e1a, 0x4e5f, 0x503b, 0x51b6, 0x591c, 0x60f9, 0x63f6, 0x6930, 0x723a, 0x8036, 0xf974, 0x91ce, 0x5f31, 0xf975, 0xf976, 0x7d04, 0x82e5, 0x846f, 0x84bb, 0x85e5, 0x8e8d, 0xf977, 0x4f6f, 0xf978, 0xf979, 0x58e4, 0x5b43, 0x6059, 0x63da, 0x6518, 0x656d, 0x6698, 0xf97a, 0x694a, 0x6a23, 0x6d0b, 0x7001, 0x716c, 0x75d2, 0x760d, 0x79b3, 0x7a70, 0xf97b, 0x7f8a, 0xf97c, 0x8944, 0xf97d, 0x8b93, 0x91c0, 0x967d, 0xf97e, 0x990a, 0x5704, 0x5fa1, 0x65bc, 0x6f01, 0x7600, 0x79a6, 0x8a9e, 0x99ad, 0x9b5a, 0x9f6c, 0x5104, 0x61b6, 0x6291, 0x6a8d, 0x81c6, 0x5043, 0x5830, 0x5f66, 0x7109, 0x8a00, 0x8afa, 0x5b7c, 0x8616, 0x4ffa, 0x513c, 0x56b4, 0x5944, 0x63a9, 0x6df9, 0x5daa, 0x696d, 0x5186, 0x4e88, 0x4f59, 0xf97f, 0xf980, 0xf981, 0x5982, 0xf982, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe6a0[ 96 ] = { 0xfffd, 0xf983, 0x6b5f, 0x6c5d, 0xf984, 0x74b5, 0x7916, 0xf985, 0x8207, 0x8245, 0x8339, 0x8f3f, 0x8f5d, 0xf986, 0x9918, 0xf987, 0xf988, 0xf989, 0x4ea6, 0xf98a, 0x57df, 0x5f79, 0x6613, 0xf98b, 0xf98c, 0x75ab, 0x7e79, 0x8b6f, 0xf98d, 0x9006, 0x9a5b, 0x56a5, 0x5827, 0x59f8, 0x5a1f, 0x5bb4, 0xf98e, 0x5ef6, 0xf98f, 0xf990, 0x6350, 0x633b, 0xf991, 0x693d, 0x6c87, 0x6cbf, 0x6d8e, 0x6d93, 0x6df5, 0x6f14, 0xf992, 0x70df, 0x7136, 0x7159, 0xf993, 0x71c3, 0x71d5, 0xf994, 0x784f, 0x786f, 0xf995, 0x7b75, 0x7de3, 0xf996, 0x7e2f, 0xf997, 0x884d, 0x8edf, 0xf998, 0xf999, 0xf99a, 0x925b, 0xf99b, 0x9cf6, 0xf99c, 0xf99d, 0xf99e, 0x6085, 0x6d85, 0xf99f, 0x71b1, 0xf9a0, 0xf9a1, 0x95b1, 0x53ad, 0xf9a2, 0xf9a3, 0xf9a4, 0x67d3, 0xf9a5, 0x708e, 0x7130, 0x7430, 0x8276, 0x82d2, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe7a0[ 96 ] = { 0xfffd, 0xf9a6, 0x95bb, 0x9ae5, 0x9e7d, 0x66c4, 0xf9a7, 0x71c1, 0x8449, 0xf9a8, 0xf9a9, 0x584b, 0xf9aa, 0xf9ab, 0x5db8, 0x5f71, 0xf9ac, 0x6620, 0x668e, 0x6979, 0x69ae, 0x6c38, 0x6cf3, 0x6e36, 0x6f41, 0x6fda, 0x701b, 0x702f, 0x7150, 0x71df, 0x7370, 0xf9ad, 0x745b, 0xf9ae, 0x74d4, 0x76c8, 0x7a4e, 0x7e93, 0xf9af, 0xf9b0, 0x82f1, 0x8a60, 0x8fce, 0xf9b1, 0x9348, 0xf9b2, 0x9719, 0xf9b3, 0xf9b4, 0x4e42, 0x502a, 0xf9b5, 0x5208, 0x53e1, 0x66f3, 0x6c6d, 0x6fca, 0x730a, 0x777f, 0x7a62, 0x82ae, 0x85dd, 0x8602, 0xf9b6, 0x88d4, 0x8a63, 0x8b7d, 0x8c6b, 0xf9b7, 0x92b3, 0xf9b8, 0x9713, 0x9810, 0x4e94, 0x4f0d, 0x4fc9, 0x50b2, 0x5348, 0x543e, 0x5433, 0x55da, 0x5862, 0x58ba, 0x5967, 0x5a1b, 0x5be4, 0x609f, 0xf9b9, 0x61ca, 0x6556, 0x65ff, 0x6664, 0x68a7, 0x6c5a, 0x6fb3, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe8a0[ 96 ] = { 0xfffd, 0x70cf, 0x71ac, 0x7352, 0x7b7d, 0x8708, 0x8aa4, 0x9c32, 0x9f07, 0x5c4b, 0x6c83, 0x7344, 0x7389, 0x923a, 0x6eab, 0x7465, 0x761f, 0x7a69, 0x7e15, 0x860a, 0x5140, 0x58c5, 0x64c1, 0x74ee, 0x7515, 0x7670, 0x7fc1, 0x9095, 0x96cd, 0x9954, 0x6e26, 0x74e6, 0x7aa9, 0x7aaa, 0x81e5, 0x86d9, 0x8778, 0x8a1b, 0x5a49, 0x5b8c, 0x5b9b, 0x68a1, 0x6900, 0x6d63, 0x73a9, 0x7413, 0x742c, 0x7897, 0x7de9, 0x7feb, 0x8118, 0x8155, 0x839e, 0x8c4c, 0x962e, 0x9811, 0x66f0, 0x5f80, 0x65fa, 0x6789, 0x6c6a, 0x738b, 0x502d, 0x5a03, 0x6b6a, 0x77ee, 0x5916, 0x5d6c, 0x5dcd, 0x7325, 0x754f, 0xf9ba, 0xf9bb, 0x50e5, 0x51f9, 0x582f, 0x592d, 0x5996, 0x59da, 0x5be5, 0xf9bc, 0xf9bd, 0x5da2, 0x62d7, 0x6416, 0x6493, 0x64fe, 0xf9be, 0x66dc, 0xf9bf, 0x6a48, 0xf9c0, 0x71ff, 0x7464, 0xf9c1, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe9a0[ 96 ] = { 0xfffd, 0x7a88, 0x7aaf, 0x7e47, 0x7e5e, 0x8000, 0x8170, 0xf9c2, 0x87ef, 0x8981, 0x8b20, 0x9059, 0xf9c3, 0x9080, 0x9952, 0x617e, 0x6b32, 0x6d74, 0x7e1f, 0x8925, 0x8fb1, 0x4fd1, 0x50ad, 0x5197, 0x52c7, 0x57c7, 0x5889, 0x5bb9, 0x5eb8, 0x6142, 0x6995, 0x6d8c, 0x6e67, 0x6eb6, 0x7194, 0x7462, 0x7528, 0x752c, 0x8073, 0x8338, 0x84c9, 0x8e0a, 0x9394, 0x93de, 0xf9c4, 0x4e8e, 0x4f51, 0x5076, 0x512a, 0x53c8, 0x53cb, 0x53f3, 0x5b87, 0x5bd3, 0x5c24, 0x611a, 0x6182, 0x65f4, 0x725b, 0x7397, 0x7440, 0x76c2, 0x7950, 0x7991, 0x79b9, 0x7d06, 0x7fbd, 0x828b, 0x85d5, 0x865e, 0x8fc2, 0x9047, 0x90f5, 0x91ea, 0x9685, 0x96e8, 0x96e9, 0x52d6, 0x5f67, 0x65ed, 0x6631, 0x682f, 0x715c, 0x7a36, 0x90c1, 0x980a, 0x4e91, 0xf9c5, 0x6a52, 0x6b9e, 0x6f90, 0x7189, 0x8018, 0x82b8, 0x8553, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeaa0[ 96 ] = { 0xfffd, 0x904b, 0x9695, 0x96f2, 0x97fb, 0x851a, 0x9b31, 0x4e90, 0x718a, 0x96c4, 0x5143, 0x539f, 0x54e1, 0x5713, 0x5712, 0x57a3, 0x5a9b, 0x5ac4, 0x5bc3, 0x6028, 0x613f, 0x63f4, 0x6c85, 0x6d39, 0x6e72, 0x6e90, 0x7230, 0x733f, 0x7457, 0x82d1, 0x8881, 0x8f45, 0x9060, 0xf9c6, 0x9662, 0x9858, 0x9d1b, 0x6708, 0x8d8a, 0x925e, 0x4f4d, 0x5049, 0x50de, 0x5371, 0x570d, 0x59d4, 0x5a01, 0x5c09, 0x6170, 0x6690, 0x6e2d, 0x7232, 0x744b, 0x7def, 0x80c3, 0x840e, 0x8466, 0x853f, 0x875f, 0x885b, 0x8918, 0x8b02, 0x9055, 0x97cb, 0x9b4f, 0x4e73, 0x4f91, 0x5112, 0x516a, 0xf9c7, 0x552f, 0x55a9, 0x5b7a, 0x5ba5, 0x5e7c, 0x5e7d, 0x5ebe, 0x60a0, 0x60df, 0x6108, 0x6109, 0x63c4, 0x6538, 0x6709, 0xf9c8, 0x67d4, 0x67da, 0xf9c9, 0x6961, 0x6962, 0x6cb9, 0x6d27, 0xf9ca, 0x6e38, 0xf9cb, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeba0[ 96 ] = { 0xfffd, 0x6fe1, 0x7336, 0x7337, 0xf9cc, 0x745c, 0x7531, 0xf9cd, 0x7652, 0xf9ce, 0xf9cf, 0x7dad, 0x81fe, 0x8438, 0x88d5, 0x8a98, 0x8adb, 0x8aed, 0x8e30, 0x8e42, 0x904a, 0x903e, 0x907a, 0x9149, 0x91c9, 0x936e, 0xf9d0, 0xf9d1, 0x5809, 0xf9d2, 0x6bd3, 0x8089, 0x80b2, 0xf9d3, 0xf9d4, 0x5141, 0x596b, 0x5c39, 0xf9d5, 0xf9d6, 0x6f64, 0x73a7, 0x80e4, 0x8d07, 0xf9d7, 0x9217, 0x958f, 0xf9d8, 0xf9d9, 0xf9da, 0xf9db, 0x807f, 0x620e, 0x701c, 0x7d68, 0x878d, 0xf9dc, 0x57a0, 0x6069, 0x6147, 0x6bb7, 0x8abe, 0x9280, 0x96b1, 0x4e59, 0x541f, 0x6deb, 0x852d, 0x9670, 0x97f3, 0x98ee, 0x63d6, 0x6ce3, 0x9091, 0x51dd, 0x61c9, 0x81ba, 0x9df9, 0x4f9d, 0x501a, 0x5100, 0x5b9c, 0x610f, 0x61ff, 0x64ec, 0x6905, 0x6bc5, 0x7591, 0x77e3, 0x7fa9, 0x8264, 0x858f, 0x87fb, 0x8863, 0x8abc, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeca0[ 96 ] = { 0xfffd, 0x8b70, 0x91ab, 0x4e8c, 0x4ee5, 0x4f0a, 0xf9dd, 0xf9de, 0x5937, 0x59e8, 0xf9df, 0x5df2, 0x5f1b, 0x5f5b, 0x6021, 0xf9e0, 0xf9e1, 0xf9e2, 0xf9e3, 0x723e, 0x73e5, 0xf9e4, 0x7570, 0x75cd, 0xf9e5, 0x79fb, 0xf9e6, 0x800c, 0x8033, 0x8084, 0x82e1, 0x8351, 0xf9e7, 0xf9e8, 0x8cbd, 0x8cb3, 0x9087, 0xf9e9, 0xf9ea, 0x98f4, 0x990c, 0xf9eb, 0xf9ec, 0x7037, 0x76ca, 0x7fca, 0x7fcc, 0x7ffc, 0x8b1a, 0x4eba, 0x4ec1, 0x5203, 0x5370, 0xf9ed, 0x54bd, 0x56e0, 0x59fb, 0x5bc5, 0x5f15, 0x5fcd, 0x6e6e, 0xf9ee, 0xf9ef, 0x7d6a, 0x8335, 0xf9f0, 0x8693, 0x8a8d, 0xf9f1, 0x976d, 0x9777, 0xf9f2, 0xf9f3, 0x4e00, 0x4f5a, 0x4f7e, 0x58f9, 0x65e5, 0x6ea2, 0x9038, 0x93b0, 0x99b9, 0x4efb, 0x58ec, 0x598a, 0x59d9, 0x6041, 0xf9f4, 0xf9f5, 0x7a14, 0xf9f6, 0x834f, 0x8cc3, 0x5165, 0x5344, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeda0[ 96 ] = { 0xfffd, 0xf9f7, 0xf9f8, 0xf9f9, 0x4ecd, 0x5269, 0x5b55, 0x82bf, 0x4ed4, 0x523a, 0x54a8, 0x59c9, 0x59ff, 0x5b50, 0x5b57, 0x5b5c, 0x6063, 0x6148, 0x6ecb, 0x7099, 0x716e, 0x7386, 0x74f7, 0x75b5, 0x78c1, 0x7d2b, 0x8005, 0x81ea, 0x8328, 0x8517, 0x85c9, 0x8aee, 0x8cc7, 0x96cc, 0x4f5c, 0x52fa, 0x56bc, 0x65ab, 0x6628, 0x707c, 0x70b8, 0x7235, 0x7dbd, 0x828d, 0x914c, 0x96c0, 0x9d72, 0x5b71, 0x68e7, 0x6b98, 0x6f7a, 0x76de, 0x5c91, 0x66ab, 0x6f5b, 0x7bb4, 0x7c2a, 0x8836, 0x96dc, 0x4e08, 0x4ed7, 0x5320, 0x5834, 0x58bb, 0x58ef, 0x596c, 0x5c07, 0x5e33, 0x5e84, 0x5f35, 0x638c, 0x66b2, 0x6756, 0x6a1f, 0x6aa3, 0x6b0c, 0x6f3f, 0x7246, 0xf9fa, 0x7350, 0x748b, 0x7ae0, 0x7ca7, 0x8178, 0x81df, 0x81e7, 0x838a, 0x846c, 0x8523, 0x8594, 0x85cf, 0x88dd, 0x8d13, 0x91ac, 0x9577, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeea0[ 96 ] = { 0xfffd, 0x969c, 0x518d, 0x54c9, 0x5728, 0x5bb0, 0x624d, 0x6750, 0x683d, 0x6893, 0x6e3d, 0x6ed3, 0x707d, 0x7e21, 0x88c1, 0x8ca1, 0x8f09, 0x9f4b, 0x9f4e, 0x722d, 0x7b8f, 0x8acd, 0x931a, 0x4f47, 0x4f4e, 0x5132, 0x5480, 0x59d0, 0x5e95, 0x62b5, 0x6775, 0x696e, 0x6a17, 0x6cae, 0x6e1a, 0x72d9, 0x732a, 0x75bd, 0x7bb8, 0x7d35, 0x82e7, 0x83f9, 0x8457, 0x85f7, 0x8a5b, 0x8caf, 0x8e87, 0x9019, 0x90b8, 0x96ce, 0x9f5f, 0x52e3, 0x540a, 0x5ae1, 0x5bc2, 0x6458, 0x6575, 0x6ef4, 0x72c4, 0xf9fb, 0x7684, 0x7a4d, 0x7b1b, 0x7c4d, 0x7e3e, 0x7fdf, 0x837b, 0x8b2b, 0x8cca, 0x8d64, 0x8de1, 0x8e5f, 0x8fea, 0x8ff9, 0x9069, 0x93d1, 0x4f43, 0x4f7a, 0x50b3, 0x5168, 0x5178, 0x524d, 0x526a, 0x5861, 0x587c, 0x5960, 0x5c08, 0x5c55, 0x5edb, 0x609b, 0x6230, 0x6813, 0x6bbf, 0x6c08, 0x6fb1, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xefa0[ 96 ] = { 0xfffd, 0x714e, 0x7420, 0x7530, 0x7538, 0x7551, 0x7672, 0x7b4c, 0x7b8b, 0x7bad, 0x7bc6, 0x7e8f, 0x8a6e, 0x8f3e, 0x8f49, 0x923f, 0x9293, 0x9322, 0x942b, 0x96fb, 0x985a, 0x986b, 0x991e, 0x5207, 0x622a, 0x6298, 0x6d59, 0x7664, 0x7aca, 0x7bc0, 0x7d76, 0x5360, 0x5cbe, 0x5e97, 0x6f38, 0x70b9, 0x7c98, 0x9711, 0x9b8e, 0x9ede, 0x63a5, 0x647a, 0x8776, 0x4e01, 0x4e95, 0x4ead, 0x505c, 0x5075, 0x5448, 0x59c3, 0x5b9a, 0x5e40, 0x5ead, 0x5ef7, 0x5f81, 0x60c5, 0x633a, 0x653f, 0x6574, 0x65cc, 0x6676, 0x6678, 0x67fe, 0x6968, 0x6a89, 0x6b63, 0x6c40, 0x6dc0, 0x6de8, 0x6e1f, 0x6e5e, 0x701e, 0x70a1, 0x738e, 0x73fd, 0x753a, 0x775b, 0x7887, 0x798e, 0x7a0b, 0x7a7d, 0x7cbe, 0x7d8e, 0x8247, 0x8a02, 0x8aea, 0x8c9e, 0x912d, 0x914a, 0x91d8, 0x9266, 0x92cc, 0x9320, 0x9706, 0x9756, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf0a0[ 96 ] = { 0xfffd, 0x975c, 0x9802, 0x9f0e, 0x5236, 0x5291, 0x557c, 0x5824, 0x5e1d, 0x5f1f, 0x608c, 0x63d0, 0x68af, 0x6fdf, 0x796d, 0x7b2c, 0x81cd, 0x85ba, 0x88fd, 0x8af8, 0x8e44, 0x918d, 0x9664, 0x969b, 0x973d, 0x984c, 0x9f4a, 0x4fce, 0x5146, 0x51cb, 0x52a9, 0x5632, 0x5f14, 0x5f6b, 0x63aa, 0x64cd, 0x65e9, 0x6641, 0x66fa, 0x66f9, 0x671d, 0x689d, 0x68d7, 0x69fd, 0x6f15, 0x6f6e, 0x7167, 0x71e5, 0x722a, 0x74aa, 0x773a, 0x7956, 0x795a, 0x79df, 0x7a20, 0x7a95, 0x7c97, 0x7cdf, 0x7d44, 0x7e70, 0x8087, 0x85fb, 0x86a4, 0x8a54, 0x8abf, 0x8d99, 0x8e81, 0x9020, 0x906d, 0x91e3, 0x963b, 0x96d5, 0x9ce5, 0x65cf, 0x7c07, 0x8db3, 0x93c3, 0x5b58, 0x5c0a, 0x5352, 0x62d9, 0x731d, 0x5027, 0x5b97, 0x5f9e, 0x60b0, 0x616b, 0x68d5, 0x6dd9, 0x742e, 0x7a2e, 0x7d42, 0x7d9c, 0x7e31, 0x816b, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf1a0[ 96 ] = { 0xfffd, 0x8e2a, 0x8e35, 0x937e, 0x9418, 0x4f50, 0x5750, 0x5de6, 0x5ea7, 0x632b, 0x7f6a, 0x4e3b, 0x4f4f, 0x4f8f, 0x505a, 0x59dd, 0x80c4, 0x546a, 0x5468, 0x55fe, 0x594f, 0x5b99, 0x5dde, 0x5eda, 0x665d, 0x6731, 0x67f1, 0x682a, 0x6ce8, 0x6d32, 0x6e4a, 0x6f8d, 0x70b7, 0x73e0, 0x7587, 0x7c4c, 0x7d02, 0x7d2c, 0x7da2, 0x821f, 0x86db, 0x8a3b, 0x8a85, 0x8d70, 0x8e8a, 0x8f33, 0x9031, 0x914e, 0x9152, 0x9444, 0x99d0, 0x7af9, 0x7ca5, 0x4fca, 0x5101, 0x51c6, 0x57c8, 0x5bef, 0x5cfb, 0x6659, 0x6a3d, 0x6d5a, 0x6e96, 0x6fec, 0x710c, 0x756f, 0x7ae3, 0x8822, 0x9021, 0x9075, 0x96cb, 0x99ff, 0x8301, 0x4e2d, 0x4ef2, 0x8846, 0x91cd, 0x537d, 0x6adb, 0x696b, 0x6c41, 0x847a, 0x589e, 0x618e, 0x66fe, 0x62ef, 0x70dd, 0x7511, 0x75c7, 0x7e52, 0x84b8, 0x8b49, 0x8d08, 0x4e4b, 0x53ea, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf2a0[ 96 ] = { 0xfffd, 0x54ab, 0x5730, 0x5740, 0x5fd7, 0x6301, 0x6307, 0x646f, 0x652f, 0x65e8, 0x667a, 0x679d, 0x67b3, 0x6b62, 0x6c60, 0x6c9a, 0x6f2c, 0x77e5, 0x7825, 0x7949, 0x7957, 0x7d19, 0x80a2, 0x8102, 0x81f3, 0x829d, 0x82b7, 0x8718, 0x8a8c, 0xf9fc, 0x8d04, 0x8dbe, 0x9072, 0x76f4, 0x7a19, 0x7a37, 0x7e54, 0x8077, 0x5507, 0x55d4, 0x5875, 0x632f, 0x6422, 0x6649, 0x664b, 0x686d, 0x699b, 0x6b84, 0x6d25, 0x6eb1, 0x73cd, 0x7468, 0x74a1, 0x755b, 0x75b9, 0x76e1, 0x771e, 0x778b, 0x79e6, 0x7e09, 0x7e1d, 0x81fb, 0x852f, 0x8897, 0x8a3a, 0x8cd1, 0x8eeb, 0x8fb0, 0x9032, 0x93ad, 0x9663, 0x9673, 0x9707, 0x4f84, 0x53f1, 0x59ea, 0x5ac9, 0x5e19, 0x684e, 0x74c6, 0x75be, 0x79e9, 0x7a92, 0x81a3, 0x86ed, 0x8cea, 0x8dcc, 0x8fed, 0x659f, 0x6715, 0xf9fd, 0x57f7, 0x6f57, 0x7ddd, 0x8f2f, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf3a0[ 96 ] = { 0xfffd, 0x93f6, 0x96c6, 0x5fb5, 0x61f2, 0x6f84, 0x4e14, 0x4f98, 0x501f, 0x53c9, 0x55df, 0x5d6f, 0x5dee, 0x6b21, 0x6b64, 0x78cb, 0x7b9a, 0xf9fe, 0x8e49, 0x8eca, 0x906e, 0x6349, 0x643e, 0x7740, 0x7a84, 0x932f, 0x947f, 0x9f6a, 0x64b0, 0x6faf, 0x71e6, 0x74a8, 0x74da, 0x7ac4, 0x7c12, 0x7e82, 0x7cb2, 0x7e98, 0x8b9a, 0x8d0a, 0x947d, 0x9910, 0x994c, 0x5239, 0x5bdf, 0x64e6, 0x672d, 0x7d2e, 0x50ed, 0x53c3, 0x5879, 0x6158, 0x6159, 0x61fa, 0x65ac, 0x7ad9, 0x8b92, 0x8b96, 0x5009, 0x5021, 0x5275, 0x5531, 0x5a3c, 0x5ee0, 0x5f70, 0x6134, 0x655e, 0x660c, 0x6636, 0x66a2, 0x69cd, 0x6ec4, 0x6f32, 0x7316, 0x7621, 0x7a93, 0x8139, 0x8259, 0x83d6, 0x84bc, 0x50b5, 0x57f0, 0x5bc0, 0x5be8, 0x5f69, 0x63a1, 0x7826, 0x7db5, 0x83dc, 0x8521, 0x91c7, 0x91f5, 0x518a, 0x67f5, 0x7b56, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf4a0[ 96 ] = { 0xfffd, 0x8cac, 0x51c4, 0x59bb, 0x60bd, 0x8655, 0x501c, 0xf9ff, 0x5254, 0x5c3a, 0x617d, 0x621a, 0x62d3, 0x64f2, 0x65a5, 0x6ecc, 0x7620, 0x810a, 0x8e60, 0x965f, 0x96bb, 0x4edf, 0x5343, 0x5598, 0x5929, 0x5ddd, 0x64c5, 0x6cc9, 0x6dfa, 0x7394, 0x7a7f, 0x821b, 0x85a6, 0x8ce4, 0x8e10, 0x9077, 0x91e7, 0x95e1, 0x9621, 0x97c6, 0x51f8, 0x54f2, 0x5586, 0x5fb9, 0x64a4, 0x6f88, 0x7db4, 0x8f1f, 0x8f4d, 0x9435, 0x50c9, 0x5c16, 0x6cbe, 0x6dfb, 0x751b, 0x77bb, 0x7c3d, 0x7c64, 0x8a79, 0x8ac2, 0x581e, 0x59be, 0x5e16, 0x6377, 0x7252, 0x758a, 0x776b, 0x8adc, 0x8cbc, 0x8f12, 0x5ef3, 0x6674, 0x6df8, 0x807d, 0x83c1, 0x8acb, 0x9751, 0x9bd6, 0xfa00, 0x5243, 0x66ff, 0x6d95, 0x6eef, 0x7de0, 0x8ae6, 0x902e, 0x905e, 0x9ad4, 0x521d, 0x527f, 0x54e8, 0x6194, 0x6284, 0x62db, 0x68a2, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf5a0[ 96 ] = { 0xfffd, 0x6912, 0x695a, 0x6a35, 0x7092, 0x7126, 0x785d, 0x7901, 0x790e, 0x79d2, 0x7a0d, 0x8096, 0x8278, 0x82d5, 0x8349, 0x8549, 0x8c82, 0x8d85, 0x9162, 0x918b, 0x91ae, 0x4fc3, 0x56d1, 0x71ed, 0x77d7, 0x8700, 0x89f8, 0x5bf8, 0x5fd6, 0x6751, 0x90a8, 0x53e2, 0x585a, 0x5bf5, 0x60a4, 0x6181, 0x6460, 0x7e3d, 0x8070, 0x8525, 0x9283, 0x64ae, 0x50ac, 0x5d14, 0x6700, 0x589c, 0x62bd, 0x63a8, 0x690e, 0x6978, 0x6a1e, 0x6e6b, 0x76ba, 0x79cb, 0x82bb, 0x8429, 0x8acf, 0x8da8, 0x8ffd, 0x9112, 0x914b, 0x919c, 0x9310, 0x9318, 0x939a, 0x96db, 0x9a36, 0x9c0d, 0x4e11, 0x755c, 0x795d, 0x7afa, 0x7b51, 0x7bc9, 0x7e2e, 0x84c4, 0x8e59, 0x8e74, 0x8ef8, 0x9010, 0x6625, 0x693f, 0x7443, 0x51fa, 0x672e, 0x9edc, 0x5145, 0x5fe0, 0x6c96, 0x87f2, 0x885d, 0x8877, 0x60b4, 0x81b5, 0x8403, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf6a0[ 96 ] = { 0xfffd, 0x8d05, 0x53d6, 0x5439, 0x5634, 0x5a36, 0x5c31, 0x708a, 0x7fe0, 0x805a, 0x8106, 0x81ed, 0x8da3, 0x9189, 0x9a5f, 0x9df2, 0x5074, 0x4ec4, 0x53a0, 0x60fb, 0x6e2c, 0x5c64, 0x4f88, 0x5024, 0x55e4, 0x5cd9, 0x5e5f, 0x6065, 0x6894, 0x6cbb, 0x6dc4, 0x71be, 0x75d4, 0x75f4, 0x7661, 0x7a1a, 0x7a49, 0x7dc7, 0x7dfb, 0x7f6e, 0x81f4, 0x86a9, 0x8f1c, 0x96c9, 0x99b3, 0x9f52, 0x5247, 0x52c5, 0x98ed, 0x89aa, 0x4e03, 0x67d2, 0x6f06, 0x4fb5, 0x5be2, 0x6795, 0x6c88, 0x6d78, 0x741b, 0x7827, 0x91dd, 0x937c, 0x87c4, 0x79e4, 0x7a31, 0x5feb, 0x4ed6, 0x54a4, 0x553e, 0x58ae, 0x59a5, 0x60f0, 0x6253, 0x62d6, 0x6736, 0x6955, 0x8235, 0x9640, 0x99b1, 0x99dd, 0x502c, 0x5353, 0x5544, 0x577c, 0xfa01, 0x6258, 0xfa02, 0x64e2, 0x666b, 0x67dd, 0x6fc1, 0x6fef, 0x7422, 0x7438, 0x8a17, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf7a0[ 96 ] = { 0xfffd, 0x9438, 0x5451, 0x5606, 0x5766, 0x5f48, 0x619a, 0x6b4e, 0x7058, 0x70ad, 0x7dbb, 0x8a95, 0x596a, 0x812b, 0x63a2, 0x7708, 0x803d, 0x8caa, 0x5854, 0x642d, 0x69bb, 0x5b95, 0x5e11, 0x6e6f, 0xfa03, 0x8569, 0x514c, 0x53f0, 0x592a, 0x6020, 0x614b, 0x6b86, 0x6c70, 0x6cf0, 0x7b1e, 0x80ce, 0x82d4, 0x8dc6, 0x90b0, 0x98b1, 0xfa04, 0x64c7, 0x6fa4, 0x6491, 0x6504, 0x514e, 0x5410, 0x571f, 0x8a0e, 0x615f, 0x6876, 0xfa05, 0x75db, 0x7b52, 0x7d71, 0x901a, 0x5806, 0x69cc, 0x817f, 0x892a, 0x9000, 0x9839, 0x5078, 0x5957, 0x59ac, 0x6295, 0x900f, 0x9b2a, 0x615d, 0x7279, 0x95d6, 0x5761, 0x5a46, 0x5df4, 0x628a, 0x64ad, 0x64fa, 0x6777, 0x6ce2, 0x6d3e, 0x722c, 0x7436, 0x7834, 0x7f77, 0x82ad, 0x8ddb, 0x9817, 0x5224, 0x5742, 0x677f, 0x7248, 0x74e3, 0x8ca9, 0x8fa6, 0x9211, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf8a0[ 96 ] = { 0xfffd, 0x962a, 0x516b, 0x53ed, 0x634c, 0x4f69, 0x5504, 0x6096, 0x6557, 0x6c9b, 0x6d7f, 0x724c, 0x72fd, 0x7a17, 0x8987, 0x8c9d, 0x5f6d, 0x6f8e, 0x70f9, 0x81a8, 0x610e, 0x4fbf, 0x504f, 0x6241, 0x7247, 0x7bc7, 0x7de8, 0x7fe9, 0x904d, 0x97ad, 0x9a19, 0x8cb6, 0x576a, 0x5e73, 0x67b0, 0x840d, 0x8a55, 0x5420, 0x5b16, 0x5e63, 0x5ee2, 0x5f0a, 0x6583, 0x80ba, 0x853d, 0x9589, 0x965b, 0x4f48, 0x5305, 0x530d, 0x530f, 0x5486, 0x54fa, 0x5703, 0x5e03, 0x6016, 0x629b, 0x62b1, 0x6355, 0xfa06, 0x6ce1, 0x6d66, 0x75b1, 0x7832, 0x80de, 0x812f, 0x82de, 0x8461, 0x84b2, 0x888d, 0x8912, 0x900b, 0x92ea, 0x98fd, 0x9b91, 0x5e45, 0x66b4, 0x66dd, 0x7011, 0x7206, 0xfa07, 0x4ff5, 0x527d, 0x5f6a, 0x6153, 0x6753, 0x6a19, 0x6f02, 0x74e2, 0x7968, 0x8868, 0x8c79, 0x98c7, 0x98c4, 0x9a43, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf9a0[ 96 ] = { 0xfffd, 0x54c1, 0x7a1f, 0x6953, 0x8af7, 0x8c4a, 0x98a8, 0x99ae, 0x5f7c, 0x62ab, 0x75b2, 0x76ae, 0x88ab, 0x907f, 0x9642, 0x5339, 0x5f3c, 0x5fc5, 0x6ccc, 0x73cc, 0x7562, 0x758b, 0x7b46, 0x82fe, 0x999d, 0x4e4f, 0x903c, 0x4e0b, 0x4f55, 0x53a6, 0x590f, 0x5ec8, 0x6630, 0x6cb3, 0x7455, 0x8377, 0x8766, 0x8cc0, 0x9050, 0x971e, 0x9c15, 0x58d1, 0x5b78, 0x8650, 0x8b14, 0x9db4, 0x5bd2, 0x6068, 0x608d, 0x65f1, 0x6c57, 0x6f22, 0x6fa3, 0x701a, 0x7f55, 0x7ff0, 0x9591, 0x9592, 0x9650, 0x97d3, 0x5272, 0x8f44, 0x51fd, 0x542b, 0x54b8, 0x5563, 0x558a, 0x6abb, 0x6db5, 0x7dd8, 0x8266, 0x929c, 0x9677, 0x9e79, 0x5408, 0x54c8, 0x76d2, 0x86e4, 0x95a4, 0x95d4, 0x965c, 0x4ea2, 0x4f09, 0x59ee, 0x5ae6, 0x5df7, 0x6052, 0x6297, 0x676d, 0x6841, 0x6c86, 0x6e2f, 0x7f38, 0x809b, 0x822a, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfaa0[ 96 ] = { 0xfffd, 0xfa08, 0xfa09, 0x9805, 0x4ea5, 0x5055, 0x54b3, 0x5793, 0x595a, 0x5b69, 0x5bb3, 0x61c8, 0x6977, 0x6d77, 0x7023, 0x87f9, 0x89e3, 0x8a72, 0x8ae7, 0x9082, 0x99ed, 0x9ab8, 0x52be, 0x6838, 0x5016, 0x5e78, 0x674f, 0x8347, 0x884c, 0x4eab, 0x5411, 0x56ae, 0x73e6, 0x9115, 0x97ff, 0x9909, 0x9957, 0x9999, 0x5653, 0x589f, 0x865b, 0x8a31, 0x61b2, 0x6af6, 0x737b, 0x8ed2, 0x6b47, 0x96aa, 0x9a57, 0x5955, 0x7200, 0x8d6b, 0x9769, 0x4fd4, 0x5cf4, 0x5f26, 0x61f8, 0x665b, 0x6ceb, 0x70ab, 0x7384, 0x73b9, 0x73fe, 0x7729, 0x774d, 0x7d43, 0x7d62, 0x7e23, 0x8237, 0x8852, 0xfa0a, 0x8ce2, 0x9249, 0x986f, 0x5b51, 0x7a74, 0x8840, 0x9801, 0x5acc, 0x4fe0, 0x5354, 0x593e, 0x5cfd, 0x633e, 0x6d79, 0x72f9, 0x8105, 0x8107, 0x83a2, 0x92cf, 0x9830, 0x4ea8, 0x5144, 0x5211, 0x578b, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfba0[ 96 ] = { 0xfffd, 0x5f62, 0x6cc2, 0x6ece, 0x7005, 0x7050, 0x70af, 0x7192, 0x73e9, 0x7469, 0x834a, 0x87a2, 0x8861, 0x9008, 0x90a2, 0x93a3, 0x99a8, 0x516e, 0x5f57, 0x60e0, 0x6167, 0x66b3, 0x8559, 0x8e4a, 0x91af, 0x978b, 0x4e4e, 0x4e92, 0x547c, 0x58d5, 0x58fa, 0x597d, 0x5cb5, 0x5f27, 0x6236, 0x6248, 0x660a, 0x6667, 0x6beb, 0x6d69, 0x6dcf, 0x6e56, 0x6ef8, 0x6f94, 0x6fe0, 0x6fe9, 0x705d, 0x72d0, 0x7425, 0x745a, 0x74e0, 0x7693, 0x795c, 0x7cca, 0x7e1e, 0x80e1, 0x82a6, 0x846b, 0x84bf, 0x864e, 0x865f, 0x8774, 0x8b77, 0x8c6a, 0x93ac, 0x9800, 0x9865, 0x60d1, 0x6216, 0x9177, 0x5a5a, 0x660f, 0x6df7, 0x6e3e, 0x743f, 0x9b42, 0x5ffd, 0x60da, 0x7b0f, 0x54c4, 0x5f18, 0x6c5e, 0x6cd3, 0x6d2a, 0x70d8, 0x7d05, 0x8679, 0x8a0c, 0x9d3b, 0x5316, 0x548c, 0x5b05, 0x6a3a, 0x706b, 0x7575, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfca0[ 96 ] = { 0xfffd, 0x798d, 0x79be, 0x82b1, 0x83ef, 0x8a71, 0x8b41, 0x8ca8, 0x9774, 0xfa0b, 0x64f4, 0x652b, 0x78ba, 0x78bb, 0x7a6b, 0x4e38, 0x559a, 0x5950, 0x5ba6, 0x5e7b, 0x60a3, 0x63db, 0x6b61, 0x6665, 0x6853, 0x6e19, 0x7165, 0x74b0, 0x7d08, 0x9084, 0x9a69, 0x9c25, 0x6d3b, 0x6ed1, 0x733e, 0x8c41, 0x95ca, 0x51f0, 0x5e4c, 0x5fa8, 0x604d, 0x60f6, 0x6130, 0x614c, 0x6643, 0x6644, 0x69a5, 0x6cc1, 0x6e5f, 0x6ec9, 0x6f62, 0x714c, 0x749c, 0x7687, 0x7bc1, 0x7c27, 0x8352, 0x8757, 0x9051, 0x968d, 0x9ec3, 0x532f, 0x56de, 0x5efb, 0x5f8a, 0x6062, 0x6094, 0x61f7, 0x6666, 0x6703, 0x6a9c, 0x6dee, 0x6fae, 0x7070, 0x736a, 0x7e6a, 0x81be, 0x8334, 0x86d4, 0x8aa8, 0x8cc4, 0x5283, 0x7372, 0x5b96, 0x6a6b, 0x9404, 0x54ee, 0x5686, 0x5b5d, 0x6548, 0x6585, 0x66c9, 0x689f, 0x6d8d, 0x6dc6, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfda0[ 96 ] = { 0xfffd, 0x723b, 0x80b4, 0x9175, 0x9a4d, 0x4faf, 0x5019, 0x539a, 0x540e, 0x543c, 0x5589, 0x55c5, 0x5e3f, 0x5f8c, 0x673d, 0x7166, 0x73dd, 0x9005, 0x52db, 0x52f3, 0x5864, 0x58ce, 0x7104, 0x718f, 0x71fb, 0x85b0, 0x8a13, 0x6688, 0x85a8, 0x55a7, 0x6684, 0x714a, 0x8431, 0x5349, 0x5599, 0x6bc1, 0x5f59, 0x5fbd, 0x63ee, 0x6689, 0x7147, 0x8af1, 0x8f1d, 0x9ebe, 0x4f11, 0x643a, 0x70cb, 0x7566, 0x8667, 0x6064, 0x8b4e, 0x9df8, 0x5147, 0x51f6, 0x5308, 0x6d36, 0x80f8, 0x9ed1, 0x6615, 0x6b23, 0x7098, 0x75d5, 0x5403, 0x5c79, 0x7d07, 0x8a16, 0x6b20, 0x6b3d, 0x6b46, 0x5438, 0x6070, 0x6d3d, 0x7fd5, 0x8208, 0x50d6, 0x51de, 0x559c, 0x566b, 0x56cd, 0x59ec, 0x5b09, 0x5e0c, 0x6199, 0x6198, 0x6231, 0x665e, 0x66e6, 0x7199, 0x71b9, 0x71ba, 0x72a7, 0x79a7, 0x7a00, 0x7fb2, 0x8a70, 0xfffd }; /* Unicode to ASCII character lookup table for Windows 949 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0x0080[ 256 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaea2, 0x001a, 0x001a, 0xb4a2, 0x001a, 0x001a, 0xd7a1, 0xa7a1, 0x001a, 0xa3a8, 0x001a, 0x001a, 0xa9a1, 0xe7a2, 0x001a, 0xc6a1, 0xbea1, 0xf7a9, 0xf8a9, 0xa5a2, 0x001a, 0xd2a2, 0xa4a1, 0xaca2, 0xf6a9, 0xaca8, 0x001a, 0xf9a8, 0xf6a8, 0xfaa8, 0xafa2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfa1, 0xaaa8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xada8, 0xaca9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0a1, 0xaaa9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xada9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a8, 0xa4a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5a9, 0xa6a8, 0xa6a9, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8a8, 0xa8a9, 0xa9a8, 0xa9a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0a9, 0xafa8, 0xafa9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaba8, 0xaba9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaea8, 0xaea9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0x02c0[ 448 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8a2, 0xaba2, 0xaaa2, 0xada2, 0x001a, 0xa9a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1a5, 0xc2a5, 0xc3a5, 0xc4a5, 0xc5a5, 0xc6a5, 0xc7a5, 0xc8a5, 0xc9a5, 0xcaa5, 0xcba5, 0xcca5, 0xcda5, 0xcea5, 0xcfa5, 0xd0a5, 0xd1a5, 0x001a, 0xd2a5, 0xd3a5, 0xd4a5, 0xd5a5, 0xd6a5, 0xd7a5, 0xd8a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1a5, 0xe2a5, 0xe3a5, 0xe4a5, 0xe5a5, 0xe6a5, 0xe7a5, 0xe8a5, 0xe9a5, 0xeaa5, 0xeba5, 0xeca5, 0xeda5, 0xeea5, 0xefa5, 0xf0a5, 0xf1a5, 0x001a, 0xf2a5, 0xf3a5, 0xf4a5, 0xf5a5, 0xf6a5, 0xf7a5, 0xf8a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7ac, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1ac, 0xa2ac, 0xa3ac, 0xa4ac, 0xa5ac, 0xa6ac, 0xa8ac, 0xa9ac, 0xaaac, 0xabac, 0xacac, 0xadac, 0xaeac, 0xafac, 0xb0ac, 0xb1ac, 0xb2ac, 0xb3ac, 0xb4ac, 0xb5ac, 0xb6ac, 0xb7ac, 0xb8ac, 0xb9ac, 0xbaac, 0xbbac, 0xbcac, 0xbdac, 0xbeac, 0xbfac, 0xc0ac, 0xc1ac, 0xd1ac, 0xd2ac, 0xd3ac, 0xd4ac, 0xd5ac, 0xd6ac, 0xd8ac, 0xd9ac, 0xdaac, 0xdbac, 0xdcac, 0xddac, 0xdeac, 0xdfac, 0xe0ac, 0xe1ac, 0xe2ac, 0xe3ac, 0xe4ac, 0xe5ac, 0xe6ac, 0xe7ac, 0xe8ac, 0xe9ac, 0xeaac, 0xebac, 0xecac, 0xedac, 0xeeac, 0xefac, 0xf0ac, 0xf1ac, 0x001a, 0xd7ac, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0x2000[ 1664 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaa1, 0x001a, 0x001a, 0xaea1, 0xafa1, 0x001a, 0x001a, 0xb0a1, 0xb1a1, 0x001a, 0x001a, 0xd3a2, 0xd4a2, 0x001a, 0x001a, 0x001a, 0xa5a1, 0xa6a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6a2, 0x001a, 0xc7a1, 0xc8a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaa9, 0x001a, 0xfba9, 0xfca9, 0xfda9, 0xfea9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a7, 0x001a, 0x001a, 0xe0a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5a2, 0xe2a2, 0x001a, 0x001a, 0x001a, 0xd9a7, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaa1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7a8, 0xf8a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfba8, 0xfca8, 0xfda8, 0xfea8, 0x001a, 0xb0a5, 0xb1a5, 0xb2a5, 0xb3a5, 0xb4a5, 0xb5a5, 0xb6a5, 0xb7a5, 0xb8a5, 0xb9a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a5, 0xa2a5, 0xa3a5, 0xa4a5, 0xa5a5, 0xa6a5, 0xa7a5, 0xa8a5, 0xa9a5, 0xaaa5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7a1, 0xe8a1, 0xe6a1, 0xe9a1, 0xeaa1, 0xd5a2, 0xd8a2, 0xd6a2, 0xd9a2, 0xd7a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a2, 0x001a, 0xa2a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3a2, 0x001a, 0xd3a1, 0xa4a2, 0x001a, 0x001a, 0x001a, 0xd4a1, 0xf4a1, 0x001a, 0x001a, 0xf5a1, 0x001a, 0x001a, 0x001a, 0xb3a2, 0x001a, 0xb2a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeea1, 0x001a, 0x001a, 0xf0a1, 0xc4a1, 0x001a, 0xd0a1, 0x001a, 0x001a, 0x001a, 0x001a, 0xaba1, 0x001a, 0xfca1, 0xfda1, 0xfba1, 0xfaa1, 0xf2a1, 0xf3a1, 0x001a, 0xb1a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5a1, 0xf1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xada1, 0xefa1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1a1, 0xd5a1, 0x001a, 0x001a, 0xc2a1, 0xc3a1, 0x001a, 0x001a, 0x001a, 0x001a, 0xeca1, 0xeda1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8a1, 0xf9a1, 0x001a, 0x001a, 0xf6a1, 0xf7a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7a8, 0xe8a8, 0xe9a8, 0xeaa8, 0xeba8, 0xeca8, 0xeda8, 0xeea8, 0xefa8, 0xf0a8, 0xf1a8, 0xf2a8, 0xf3a8, 0xf4a8, 0xf5a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7a9, 0xe8a9, 0xe9a9, 0xeaa9, 0xeba9, 0xeca9, 0xeda9, 0xeea9, 0xefa9, 0xf0a9, 0xf1a9, 0xf2a9, 0xf3a9, 0xf4a9, 0xf5a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcda9, 0xcea9, 0xcfa9, 0xd0a9, 0xd1a9, 0xd2a9, 0xd3a9, 0xd4a9, 0xd5a9, 0xd6a9, 0xd7a9, 0xd8a9, 0xd9a9, 0xdaa9, 0xdba9, 0xdca9, 0xdda9, 0xdea9, 0xdfa9, 0xe0a9, 0xe1a9, 0xe2a9, 0xe3a9, 0xe4a9, 0xe5a9, 0xe6a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcda8, 0xcea8, 0xcfa8, 0xd0a8, 0xd1a8, 0xd2a8, 0xd3a8, 0xd4a8, 0xd5a8, 0xd6a8, 0xd7a8, 0xd8a8, 0xd9a8, 0xdaa8, 0xdba8, 0xdca8, 0xdda8, 0xdea8, 0xdfa8, 0xe0a8, 0xe1a8, 0xe2a8, 0xe3a8, 0xe4a8, 0xe5a8, 0xe6a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a6, 0xaca6, 0xa2a6, 0xada6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3a6, 0xc8a6, 0xc7a6, 0xaea6, 0xa4a6, 0xc2a6, 0xc1a6, 0xafa6, 0xa6a6, 0xc6a6, 0xc5a6, 0xb1a6, 0xa5a6, 0xc4a6, 0xc3a6, 0xb0a6, 0xa7a6, 0xbca6, 0xc9a6, 0xcaa6, 0xb7a6, 0xcba6, 0xcca6, 0xb2a6, 0xa9a6, 0xbea6, 0xcda6, 0xcea6, 0xb9a6, 0xcfa6, 0xd0a6, 0xb4a6, 0xa8a6, 0xd1a6, 0xd2a6, 0xb8a6, 0xbda6, 0xd3a6, 0xd4a6, 0xb3a6, 0xaaa6, 0xd5a6, 0xd6a6, 0xbaa6, 0xbfa6, 0xd7a6, 0xd8a6, 0xb5a6, 0xaba6, 0xd9a6, 0xdaa6, 0xbba6, 0xdba6, 0xdca6, 0xc0a6, 0xdda6, 0xdea6, 0xdfa6, 0xe0a6, 0xe1a6, 0xe2a6, 0xe3a6, 0xe4a6, 0xb6a6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1a1, 0xe0a1, 0x001a, 0xc3a2, 0xc7a2, 0xc8a2, 0xcba2, 0xcaa2, 0xc9a2, 0xcca2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3a1, 0xe2a1, 0x001a, 0x001a, 0xbaa2, 0xb9a2, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5a1, 0xe4a1, 0x001a, 0x001a, 0xb8a2, 0xb7a2, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfa1, 0xdea1, 0xc2a2, 0x001a, 0x001a, 0xdba1, 0x001a, 0x001a, 0xdda1, 0xdca1, 0xc4a2, 0xc5a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaa1, 0xd9a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfa2, 0xcea2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0a2, 0x001a, 0xd1a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfa1, 0x001a, 0xcea1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbca2, 0xbda2, 0x001a, 0xc0a2, 0xbba2, 0xbea2, 0x001a, 0xbfa2, 0xcda2, 0xdba2, 0xdca2, 0x001a, 0xdda2, 0xdaa2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0x3000[ 1024 ] = { 0xa1a1, 0xa2a1, 0xa3a1, 0xa8a1, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4a1, 0xb5a1, 0xb6a1, 0xb7a1, 0xb8a1, 0xb9a1, 0xbaa1, 0xbba1, 0xbca1, 0xbda1, 0x001a, 0xeba1, 0xb2a1, 0xb3a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1aa, 0xa2aa, 0xa3aa, 0xa4aa, 0xa5aa, 0xa6aa, 0xa7aa, 0xa8aa, 0xa9aa, 0xaaaa, 0xabaa, 0xacaa, 0xadaa, 0xaeaa, 0xafaa, 0xb0aa, 0xb1aa, 0xb2aa, 0xb3aa, 0xb4aa, 0xb5aa, 0xb6aa, 0xb7aa, 0xb8aa, 0xb9aa, 0xbaaa, 0xbbaa, 0xbcaa, 0xbdaa, 0xbeaa, 0xbfaa, 0xc0aa, 0xc1aa, 0xc2aa, 0xc3aa, 0xc4aa, 0xc5aa, 0xc6aa, 0xc7aa, 0xc8aa, 0xc9aa, 0xcaaa, 0xcbaa, 0xccaa, 0xcdaa, 0xceaa, 0xcfaa, 0xd0aa, 0xd1aa, 0xd2aa, 0xd3aa, 0xd4aa, 0xd5aa, 0xd6aa, 0xd7aa, 0xd8aa, 0xd9aa, 0xdaaa, 0xdbaa, 0xdcaa, 0xddaa, 0xdeaa, 0xdfaa, 0xe0aa, 0xe1aa, 0xe2aa, 0xe3aa, 0xe4aa, 0xe5aa, 0xe6aa, 0xe7aa, 0xe8aa, 0xe9aa, 0xeaaa, 0xebaa, 0xecaa, 0xedaa, 0xeeaa, 0xefaa, 0xf0aa, 0xf1aa, 0xf2aa, 0xf3aa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1ab, 0xa2ab, 0xa3ab, 0xa4ab, 0xa5ab, 0xa6ab, 0xa7ab, 0xa8ab, 0xa9ab, 0xaaab, 0xabab, 0xacab, 0xadab, 0xaeab, 0xafab, 0xb0ab, 0xb1ab, 0xb2ab, 0xb3ab, 0xb4ab, 0xb5ab, 0xb6ab, 0xb7ab, 0xb8ab, 0xb9ab, 0xbaab, 0xbbab, 0xbcab, 0xbdab, 0xbeab, 0xbfab, 0xc0ab, 0xc1ab, 0xc2ab, 0xc3ab, 0xc4ab, 0xc5ab, 0xc6ab, 0xc7ab, 0xc8ab, 0xc9ab, 0xcaab, 0xcbab, 0xccab, 0xcdab, 0xceab, 0xcfab, 0xd0ab, 0xd1ab, 0xd2ab, 0xd3ab, 0xd4ab, 0xd5ab, 0xd6ab, 0xd7ab, 0xd8ab, 0xd9ab, 0xdaab, 0xdbab, 0xdcab, 0xddab, 0xdeab, 0xdfab, 0xe0ab, 0xe1ab, 0xe2ab, 0xe3ab, 0xe4ab, 0xe5ab, 0xe6ab, 0xe7ab, 0xe8ab, 0xe9ab, 0xeaab, 0xebab, 0xecab, 0xedab, 0xeeab, 0xefab, 0xf0ab, 0xf1ab, 0xf2ab, 0xf3ab, 0xf4ab, 0xf5ab, 0xf6ab, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a4, 0xa2a4, 0xa3a4, 0xa4a4, 0xa5a4, 0xa6a4, 0xa7a4, 0xa8a4, 0xa9a4, 0xaaa4, 0xaba4, 0xaca4, 0xada4, 0xaea4, 0xafa4, 0xb0a4, 0xb1a4, 0xb2a4, 0xb3a4, 0xb4a4, 0xb5a4, 0xb6a4, 0xb7a4, 0xb8a4, 0xb9a4, 0xbaa4, 0xbba4, 0xbca4, 0xbda4, 0xbea4, 0xbfa4, 0xc0a4, 0xc1a4, 0xc2a4, 0xc3a4, 0xc4a4, 0xc5a4, 0xc6a4, 0xc7a4, 0xc8a4, 0xc9a4, 0xcaa4, 0xcba4, 0xcca4, 0xcda4, 0xcea4, 0xcfa4, 0xd0a4, 0xd1a4, 0xd2a4, 0xd3a4, 0xd4a4, 0xd5a4, 0xd6a4, 0xd7a4, 0xd8a4, 0xd9a4, 0xdaa4, 0xdba4, 0xdca4, 0xdda4, 0xdea4, 0xdfa4, 0xe0a4, 0xe1a4, 0xe2a4, 0xe3a4, 0xe4a4, 0xe5a4, 0xe6a4, 0xe7a4, 0xe8a4, 0xe9a4, 0xeaa4, 0xeba4, 0xeca4, 0xeda4, 0xeea4, 0xefa4, 0xf0a4, 0xf1a4, 0xf2a4, 0xf3a4, 0xf4a4, 0xf5a4, 0xf6a4, 0xf7a4, 0xf8a4, 0xf9a4, 0xfaa4, 0xfba4, 0xfca4, 0xfda4, 0xfea4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1a9, 0xb2a9, 0xb3a9, 0xb4a9, 0xb5a9, 0xb6a9, 0xb7a9, 0xb8a9, 0xb9a9, 0xbaa9, 0xbba9, 0xbca9, 0xbda9, 0xbea9, 0xbfa9, 0xc0a9, 0xc1a9, 0xc2a9, 0xc3a9, 0xc4a9, 0xc5a9, 0xc6a9, 0xc7a9, 0xc8a9, 0xc9a9, 0xcaa9, 0xcba9, 0xcca9, 0xdfa2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1a8, 0xb2a8, 0xb3a8, 0xb4a8, 0xb5a8, 0xb6a8, 0xb7a8, 0xb8a8, 0xb9a8, 0xbaa8, 0xbba8, 0xbca8, 0xbda8, 0xbea8, 0xbfa8, 0xc0a8, 0xc1a8, 0xc2a8, 0xc3a8, 0xc4a8, 0xc5a8, 0xc6a8, 0xc7a8, 0xc8a8, 0xc9a8, 0xcaa8, 0xcba8, 0xcca8, 0x001a, 0x001a, 0x001a, 0xdea2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9a7, 0xcaa7, 0xcba7, 0xcca7, 0xcda7, 0x001a, 0x001a, 0x001a, 0xbaa7, 0xbba7, 0xdca7, 0xdda7, 0xdea7, 0xb6a7, 0xb7a7, 0xb8a7, 0xd4a7, 0xd5a7, 0xd6a7, 0xd7a7, 0xd8a7, 0xa1a7, 0xa2a7, 0xa3a7, 0xa5a7, 0xaba7, 0xaca7, 0xada7, 0xaea7, 0xafa7, 0xb0a7, 0xb1a7, 0xb2a7, 0xb3a7, 0xb4a7, 0xa7a7, 0xa8a7, 0xa9a7, 0xaaa7, 0xbda7, 0xbea7, 0xe5a7, 0xe6a7, 0xe7a7, 0xe8a7, 0xe1a7, 0xe2a7, 0xe3a7, 0xbfa7, 0xc0a7, 0xc1a7, 0xc2a7, 0xc3a7, 0xc4a7, 0xc5a7, 0xc6a7, 0xc7a7, 0xc8a7, 0xcea7, 0xcfa7, 0xd0a7, 0xd1a7, 0xd2a7, 0xd3a7, 0xdaa7, 0xdba7, 0xe3a2, 0xeca7, 0xa6a7, 0xe0a7, 0xefa7, 0xe1a2, 0xbca7, 0xeda7, 0xb5a7, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9a7, 0xeaa7, 0x001a, 0x001a, 0xeba7, 0x001a, 0x001a, 0xdfa7, 0x001a, 0xe4a2, 0x001a, 0x001a, 0xe4a7, 0xeea7, 0xe9a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0x4e00[ 20928 ] = { 0xe9ec, 0xcbef, 0x001a, 0xd2f6, 0x001a, 0x001a, 0x001a, 0xb2d8, 0xdbed, 0xb2df, 0xbedf, 0xbbf9, 0x001a, 0xf4dc, 0x001a, 0x001a, 0x001a, 0xe4f5, 0x001a, 0x001a, 0xa6f3, 0xe0dd, 0xa6e1, 0x001a, 0xf8ce, 0xb0dc, 0x001a, 0x001a, 0x001a, 0x001a, 0xaae3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9f1, 0x001a, 0x001a, 0x001a, 0x001a, 0xfacd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaffc, 0xa1d3, 0x001a, 0xabf1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e7, 0xacd2, 0x001a, 0xf9ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdf1, 0x001a, 0xbfde, 0xbafb, 0xb9f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2ce, 0x001a, 0xabe3, 0xe0eb, 0x001a, 0x001a, 0x001a, 0xface, 0xf7cb, 0xa5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1ca, 0x001a, 0xccd4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1ea, 0x001a, 0x001a, 0xe3dc, 0xaddf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebcb, 0x001a, 0x001a, 0x001a, 0xafd5, 0x001a, 0x001a, 0x001a, 0xf5d6, 0x001a, 0xf8e5, 0x001a, 0x001a, 0xc0de, 0xa3ec, 0x001a, 0xcde9, 0x001a, 0xa7ea, 0xf6e9, 0xbbfb, 0x001a, 0xe9e7, 0xccef, 0x001a, 0x001a, 0xe6d0, 0x001a, 0x001a, 0xc1de, 0x001a, 0x001a, 0xace4, 0x001a, 0x001a, 0xccd8, 0xf1f9, 0x001a, 0xdfce, 0xa4fa, 0xb2e6, 0x001a, 0xfbfa, 0x001a, 0x001a, 0xbdfa, 0xc8cc, 0xcdef, 0xd5d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2d3, 0x001a, 0x001a, 0x001a, 0xd1ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7e4, 0xd2ec, 0x001a, 0x001a, 0xb1f6, 0x001a, 0x001a, 0xfbce, 0x001a, 0x001a, 0xd1d0, 0xbfcb, 0x001a, 0xa4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8ed, 0xc2de, 0xe2f6, 0xdced, 0xf5dc, 0xb9e0, 0x001a, 0x001a, 0x001a, 0xced4, 0x001a, 0xb5f4, 0x001a, 0x001a, 0x001a, 0xdbd3, 0xb5d6, 0xa4ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6e4, 0x001a, 0xeaf1, 0x001a, 0x001a, 0x001a, 0xeccb, 0xc0cb, 0x001a, 0x001a, 0x001a, 0xf2ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xead0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2f9, 0xa5ec, 0xdfd0, 0x001a, 0xeae7, 0xebd0, 0xd1dc, 0xe9db, 0xccfd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7db, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1da, 0x001a, 0xb6d6, 0x001a, 0xdfe3, 0x001a, 0xc3de, 0x001a, 0xc4de, 0xa1ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecee, 0x001a, 0x001a, 0xa3d3, 0xb7ee, 0xcff8, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ea, 0xb8ee, 0xacf1, 0xa5f1, 0xcee9, 0x001a, 0x001a, 0x001a, 0xbcf9, 0x001a, 0x001a, 0x001a, 0xf9e5, 0xeaec, 0xd6dd, 0xc2ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbae5, 0xd8db, 0x001a, 0x001a, 0xa2ca, 0x001a, 0x001a, 0xcdd1, 0x001a, 0x001a, 0x001a, 0xedee, 0x001a, 0x001a, 0x001a, 0xebec, 0xc5de, 0x001a, 0xe0e3, 0x001a, 0xc9ca, 0xe9f2, 0x001a, 0xced5, 0x001a, 0xb6f6, 0x001a, 0xc2ce, 0xc7d6, 0x001a, 0xb4e3, 0x001a, 0xadf1, 0x001a, 0xe2ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2d7, 0x001a, 0xa7f3, 0x001a, 0x001a, 0xeacd, 0x001a, 0xeeeb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2d9, 0xa5fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5f6, 0xe2d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5f8, 0x001a, 0x001a, 0xf5cc, 0xb5f5, 0xade4, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe7, 0xd5f1, 0x001a, 0x001a, 0x001a, 0xbbf0, 0x001a, 0x001a, 0xb5e9, 0x001a, 0xc9cc, 0xd5fa, 0x001a, 0x001a, 0xd4e1, 0x001a, 0x001a, 0xd6d7, 0x001a, 0x001a, 0xc1dc, 0x001a, 0xc6de, 0xeffa, 0xe1e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3e1, 0xf6dc, 0x001a, 0xfcce, 0x001a, 0xc4db, 0x001a, 0xf1f8, 0x001a, 0x001a, 0xe4dc, 0x001a, 0xefe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1dc, 0x001a, 0x001a, 0x001a, 0xd6d5, 0x001a, 0x001a, 0xdaf3, 0x001a, 0xc1cb, 0x001a, 0xc3db, 0x001a, 0x001a, 0x001a, 0xfad9, 0xeed3, 0x001a, 0x001a, 0x001a, 0xb8fa, 0x001a, 0x001a, 0xa6fd, 0xefeb, 0x001a, 0xa6f4, 0x001a, 0xcacc, 0xa8f3, 0x001a, 0xdbf3, 0x001a, 0xa7db, 0xb7f6, 0x001a, 0xe6cf, 0xf2f0, 0xdacb, 0x001a, 0xd2e7, 0xc3d7, 0xf0f6, 0xdee8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7e5, 0x001a, 0x001a, 0x001a, 0xa3ca, 0xa7cc, 0xc9ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5fa, 0x001a, 0x001a, 0x001a, 0x001a, 0xaef1, 0x001a, 0xceef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedcb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0f6, 0xcfef, 0xcfe9, 0x001a, 0xdef7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8db, 0x001a, 0x001a, 0x001a, 0xf8cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1df, 0xe1dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaf5, 0xb6e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xece7, 0xeeee, 0x001a, 0xf0f3, 0x001a, 0xbfdf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1d0, 0x001a, 0x001a, 0x001a, 0xd2f4, 0xbae0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0df, 0x001a, 0xe0ce, 0x001a, 0x001a, 0x001a, 0xd2dc, 0xeafd, 0x001a, 0x001a, 0x001a, 0xf6d6, 0x001a, 0x001a, 0x001a, 0xcaea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e8, 0x001a, 0xace3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4ca, 0x001a, 0xf8db, 0x001a, 0x001a, 0x001a, 0xc7de, 0xf0eb, 0xd6f1, 0x001a, 0x001a, 0xe2e5, 0x001a, 0xcccc, 0x001a, 0x001a, 0xfbcb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1df, 0x001a, 0xedd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3d5, 0x001a, 0x001a, 0xd3d1, 0x001a, 0xf0e5, 0x001a, 0x001a, 0x001a, 0xb4e8, 0xc3eb, 0x001a, 0xaaea, 0xfcfa, 0xf6f5, 0xbcf0, 0xd4fd, 0xbbe0, 0xc3ce, 0x001a, 0xbad0, 0xbaf7, 0xf3d8, 0xcdf7, 0x001a, 0x001a, 0x001a, 0xaee4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfd4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7d0, 0x001a, 0x001a, 0xfdec, 0x001a, 0xaed2, 0xefee, 0xd7d5, 0xe4ea, 0xa2f8, 0xebcd, 0xbfd7, 0xb1fb, 0x001a, 0x001a, 0xeccd, 0x001a, 0x001a, 0x001a, 0xb2dc, 0xecd0, 0xfdce, 0xf0ee, 0x001a, 0x001a, 0x001a, 0xc2cc, 0x001a, 0x001a, 0x001a, 0xedd0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e5, 0x001a, 0x001a, 0x001a, 0xfcf3, 0x001a, 0x001a, 0xa2ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3d9, 0x001a, 0x001a, 0xf4d8, 0x001a, 0xb7e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaece, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2d9, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1d8, 0x001a, 0xcfd4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7e5, 0xd2d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2f4, 0x001a, 0xd7f1, 0x001a, 0x001a, 0xd8d5, 0x001a, 0xbdf0, 0xd0d7, 0xd0d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfd7, 0xeaeb, 0xebfd, 0x001a, 0x001a, 0xeddb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5fc, 0xc2cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5fd, 0x001a, 0xc8f4, 0xeae8, 0xf3f5, 0x001a, 0x001a, 0xdef9, 0x001a, 0x001a, 0xefd3, 0x001a, 0x001a, 0xd3ec, 0x001a, 0x001a, 0xc2dd, 0xb7ef, 0xd4e7, 0x001a, 0xcaca, 0x001a, 0x001a, 0x001a, 0xfbd9, 0x001a, 0x001a, 0xfdfa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7f7, 0xacdc, 0x001a, 0x001a, 0x001a, 0xd7d7, 0xa2df, 0x001a, 0x001a, 0x001a, 0xbece, 0x001a, 0xf0d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4f0, 0xece1, 0xe7cf, 0xcbf3, 0xa9ed, 0xbeca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeff4, 0x001a, 0x001a, 0x001a, 0xcef6, 0x001a, 0x001a, 0xfbde, 0xbbd0, 0xb7d5, 0xf1ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8f4, 0x001a, 0xf8dc, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7cb, 0x001a, 0xceda, 0x001a, 0x001a, 0x001a, 0xe6e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5ed, 0xf2ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9dc, 0x001a, 0x001a, 0xdcf9, 0x001a, 0x001a, 0xdcf3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2f8, 0x001a, 0xf9f4, 0x001a, 0x001a, 0x001a, 0xf1fc, 0x001a, 0x001a, 0x001a, 0xbcd0, 0xf9db, 0xb1d7, 0x001a, 0x001a, 0x001a, 0xfccb, 0x001a, 0x001a, 0x001a, 0xa5f0, 0xfdcb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4d5, 0x001a, 0x001a, 0x001a, 0xedcd, 0xa5ca, 0x001a, 0x001a, 0xabd6, 0xc2d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xbef0, 0xbdd2, 0xa4cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6fa, 0x001a, 0x001a, 0xcdcc, 0x001a, 0xfada, 0x001a, 0xcff6, 0x001a, 0xb8e9, 0x001a, 0xf5d8, 0x001a, 0x001a, 0x001a, 0xcecc, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdd7, 0x001a, 0x001a, 0xd1d4, 0xede9, 0x001a, 0xebca, 0xe2d9, 0x001a, 0xb2fd, 0x001a, 0xade3, 0xccd6, 0xb4d9, 0x001a, 0x001a, 0xa7e1, 0xd3ee, 0xc3d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3fd, 0x001a, 0xe4d5, 0x001a, 0x001a, 0xe8cf, 0x001a, 0xc3ed, 0xb2d0, 0x001a, 0x001a, 0xfece, 0xa8da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0f8, 0x001a, 0x001a, 0xd6fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1f8, 0x001a, 0xd2f8, 0xd3dc, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2dd, 0xf9fb, 0xc1dd, 0x001a, 0xb5e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdded, 0xc4ce, 0x001a, 0xa1cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xddfc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaff9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbd2, 0xa1cf, 0xa8e4, 0x001a, 0xb6f4, 0xfeec, 0x001a, 0x001a, 0xaee3, 0xede7, 0xc1fd, 0xe2da, 0x001a, 0x001a, 0xb3d8, 0x001a, 0x001a, 0x001a, 0xe4dd, 0xeff0, 0xf1f6, 0xf0fa, 0x001a, 0x001a, 0xf5d1, 0x001a, 0x001a, 0xcfda, 0x001a, 0xd4dc, 0x001a, 0xa6dc, 0x001a, 0xbfef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfce, 0x001a, 0xd9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6d9, 0xd4ec, 0xcbea, 0x001a, 0x001a, 0xbfca, 0xb0d5, 0x001a, 0xe9cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedf1, 0x001a, 0xcfcc, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xede4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8d7, 0x001a, 0xa7fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xabea, 0xb2f6, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0cf, 0xbdf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbcb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1f3, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e9, 0xa9f3, 0xe0d0, 0xd2e9, 0x001a, 0xe3da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2e2, 0x001a, 0xa2f6, 0xf4e1, 0x001a, 0x001a, 0x001a, 0xe4da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e7, 0xbff5, 0xa2cf, 0xafcd, 0xa3cf, 0x001a, 0x001a, 0x001a, 0xb0cd, 0xfef1, 0xa3d0, 0xafe1, 0xa3f8, 0x001a, 0xa6ca, 0xbbf7, 0xeaf2, 0xc8de, 0xd3e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdefd, 0xc0ca, 0x001a, 0x001a, 0x001a, 0xeaf9, 0xced1, 0xd4ee, 0x001a, 0xd2d4, 0xa3d9, 0xa8fd, 0xd9d7, 0xcef7, 0xbefa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6cf, 0x001a, 0xf0d7, 0x001a, 0xe1eb, 0xc5f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfadc, 0x001a, 0x001a, 0xc3dd, 0x001a, 0xdff9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefe7, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5fd, 0xa3f6, 0x001a, 0xfcd9, 0xa9fd, 0x001a, 0xeee7, 0x001a, 0x001a, 0x001a, 0xe5d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0ef, 0x001a, 0xb1cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2f1, 0x001a, 0xb1f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2cd, 0x001a, 0xabda, 0x001a, 0xa7ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2e3, 0xbcfb, 0xa4d9, 0x001a, 0x001a, 0xbaee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfafb, 0x001a, 0xa4cf, 0x001a, 0xfbdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3f6, 0x001a, 0x001a, 0x001a, 0xaaed, 0x001a, 0x001a, 0xa1f2, 0xe1ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6fa, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0f9, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6ec, 0x001a, 0x001a, 0xeee4, 0xa1f9, 0x001a, 0x001a, 0xeffb, 0x001a, 0x001a, 0x001a, 0xebf9, 0xa3ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacea, 0x001a, 0x001a, 0x001a, 0xa8ca, 0x001a, 0x001a, 0xfaf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6cd, 0xf6fc, 0x001a, 0x001a, 0x001a, 0xc9f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f8, 0x001a, 0xcade, 0xc6f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdad7, 0x001a, 0xd0d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6ea, 0x001a, 0xddf3, 0x001a, 0x001a, 0x001a, 0xdae4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2f6, 0x001a, 0xc2df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdd9, 0x001a, 0x001a, 0x001a, 0xf6cc, 0x001a, 0x001a, 0xbad3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafe4, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f0, 0x001a, 0x001a, 0x001a, 0xd3cb, 0x001a, 0x001a, 0x001a, 0xbce0, 0x001a, 0xcaf4, 0xfad4, 0x001a, 0xaafd, 0xe2f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7f4, 0xc2fd, 0xb0fc, 0x001a, 0xecfd, 0xe2ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdfd, 0x001a, 0xe7ea, 0xc3df, 0xd2d1, 0xe2ce, 0x001a, 0xa4d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabfd, 0x001a, 0xe0df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0e7, 0x001a, 0xeed0, 0x001a, 0x001a, 0xaaf3, 0x001a, 0x001a, 0x001a, 0xcbde, 0xb8f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e1, 0xb3f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3f7, 0x001a, 0x001a, 0xa9ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5cf, 0x001a, 0x001a, 0xc4df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0e1, 0x001a, 0x001a, 0xbff0, 0x001a, 0xa4f6, 0x001a, 0xb6e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefd0, 0x001a, 0x001a, 0xedfd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfe6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadde, 0x001a, 0xbffa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5d2, 0x001a, 0x001a, 0xeefd, 0x001a, 0x001a, 0x001a, 0xb6f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6e1, 0xccde, 0x001a, 0x001a, 0xdefc, 0x001a, 0xd7ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddcd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7d6, 0xb3cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5f8, 0xd8e5, 0x001a, 0x001a, 0x001a, 0xeacf, 0x001a, 0x001a, 0xd0cf, 0x001a, 0xccea, 0x001a, 0x001a, 0x001a, 0x001a, 0xaeea, 0xadea, 0x001a, 0x001a, 0xf1d3, 0x001a, 0xa5d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcff7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4d0, 0x001a, 0x001a, 0xa2f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3f2, 0x001a, 0xf8f7, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3d0, 0x001a, 0x001a, 0xa9db, 0x001a, 0x001a, 0xbbd3, 0xecca, 0x001a, 0xa6f1, 0xd5cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7f7, 0x001a, 0x001a, 0xdecd, 0x001a, 0xa4f7, 0x001a, 0x001a, 0x001a, 0xc0f8, 0x001a, 0x001a, 0x001a, 0xddd3, 0x001a, 0xd0cc, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcd3, 0x001a, 0x001a, 0xfefa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9eb, 0x001a, 0xa7cf, 0xafea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefe4, 0x001a, 0x001a, 0x001a, 0xb9e9, 0xd8f1, 0x001a, 0x001a, 0xd8d8, 0x001a, 0x001a, 0xf2e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e6, 0xfcdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1f3, 0x001a, 0x001a, 0x001a, 0xd0e3, 0x001a, 0x001a, 0xfbf2, 0x001a, 0xc6db, 0xf1d0, 0x001a, 0xf2d0, 0x001a, 0x001a, 0x001a, 0xdccf, 0x001a, 0xd1d3, 0x001a, 0x001a, 0xb1cc, 0xd8f7, 0x001a, 0xa8cb, 0xbceb, 0xbee4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcf4, 0x001a, 0x001a, 0xc2dc, 0x001a, 0x001a, 0xa7f0, 0x001a, 0x001a, 0xc0e6, 0x001a, 0x001a, 0xedca, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe8, 0xe8e5, 0xc3dc, 0x001a, 0x001a, 0xdeed, 0xf2d3, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4ce, 0xabe7, 0x001a, 0x001a, 0x001a, 0xc3cb, 0x001a, 0xb1e1, 0x001a, 0x001a, 0xb2f7, 0x001a, 0x001a, 0xf3d3, 0xd2d3, 0x001a, 0xc0f5, 0x001a, 0x001a, 0x001a, 0xdddf, 0x001a, 0x001a, 0xf3ee, 0xf1e7, 0x001a, 0xb4fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8f2, 0x001a, 0x001a, 0x001a, 0xd2f3, 0x001a, 0x001a, 0xf4ee, 0x001a, 0xd3e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1cc, 0x001a, 0xeadf, 0x001a, 0x001a, 0x001a, 0xbae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdf5, 0x001a, 0xf2f1, 0xc7fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8d9, 0xc2d4, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5f6, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2e7, 0xdfed, 0x001a, 0x001a, 0xcbca, 0x001a, 0x001a, 0xfadb, 0x001a, 0x001a, 0x001a, 0xb5e8, 0x001a, 0xa6d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5fd, 0x001a, 0x001a, 0xc9f9, 0x001a, 0xe2e4, 0x001a, 0xbdfb, 0x001a, 0x001a, 0xa4d7, 0xc5ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5ce, 0xe6d6, 0x001a, 0x001a, 0x001a, 0x001a, 0xbde5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdde, 0xf3ec, 0x001a, 0x001a, 0xe0ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecec, 0xbefb, 0xebdf, 0x001a, 0xf8e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbef9, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3d0, 0xaae0, 0xe2e8, 0x001a, 0x001a, 0xd4e2, 0xfdd2, 0x001a, 0xa8e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3d9, 0x001a, 0x001a, 0x001a, 0x001a, 0xded3, 0x001a, 0xb8f4, 0xbcf7, 0xfddc, 0x001a, 0xece8, 0xe7e4, 0x001a, 0x001a, 0xf7e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2e5, 0x001a, 0x001a, 0xf4d0, 0xafd2, 0xe5dc, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5d0, 0xb4f1, 0xb1fc, 0xf8cc, 0x001a, 0x001a, 0xc6dd, 0xd1fa, 0x001a, 0xdff7, 0x001a, 0x001a, 0xa8fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5ee, 0x001a, 0xcede, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3e7, 0x001a, 0x001a, 0xacf7, 0xc4eb, 0xe1ed, 0xabe0, 0xc7dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3d2, 0xbfd2, 0x001a, 0x001a, 0x001a, 0xccca, 0x001a, 0x001a, 0x001a, 0x001a, 0xbffb, 0x001a, 0x001a, 0x001a, 0x001a, 0xfde5, 0xe5dd, 0xcdd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5d0, 0x001a, 0x001a, 0xede8, 0xd2d0, 0x001a, 0xd8d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6f6, 0x001a, 0x001a, 0xaadb, 0x001a, 0x001a, 0x001a, 0xe0f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9d8, 0x001a, 0xa3f4, 0x001a, 0x001a, 0xddf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1ef, 0x001a, 0x001a, 0xb5d9, 0x001a, 0x001a, 0xabed, 0x001a, 0xb7e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbee, 0xb4cd, 0x001a, 0xf3e0, 0xcdea, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5ec, 0xeee8, 0x001a, 0xa9cb, 0xaff1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdca, 0x001a, 0xa9ec, 0x001a, 0xebf2, 0x001a, 0xeffd, 0x001a, 0xf3f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e6, 0x001a, 0x001a, 0xd8ec, 0x001a, 0x001a, 0x001a, 0xaced, 0x001a, 0xceea, 0x001a, 0xdfe8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfde, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6d2, 0x001a, 0x001a, 0xf4e7, 0xd6d1, 0x001a, 0x001a, 0xc2e6, 0xe3e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0e4, 0x001a, 0x001a, 0x001a, 0xb4d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdef3, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5d7, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8f7, 0x001a, 0x001a, 0xc6e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6dd, 0x001a, 0x001a, 0x001a, 0xfedc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdad8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacda, 0xb0ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaca, 0xf9e1, 0x001a, 0xb1ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf2, 0x001a, 0x001a, 0xeefa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4f9, 0x001a, 0x001a, 0xecd2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbfb, 0x001a, 0x001a, 0x001a, 0xf0fd, 0x001a, 0xbde0, 0xe3ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaede, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5df, 0x001a, 0x001a, 0xbee5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaded, 0xeafa, 0x001a, 0x001a, 0xeecd, 0xa6ed, 0x001a, 0xaeed, 0xedf0, 0x001a, 0xa1dd, 0x001a, 0xafed, 0xf8fc, 0x001a, 0xebd8, 0x001a, 0x001a, 0x001a, 0xf9cc, 0xb5cd, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9fa, 0x001a, 0xdde1, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e2, 0xcfed, 0x001a, 0x001a, 0x001a, 0xa2dd, 0x001a, 0x001a, 0xcaf9, 0x001a, 0xe8ea, 0x001a, 0xede5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebd3, 0x001a, 0xd4e9, 0xfae1, 0xcce4, 0x001a, 0xe4e1, 0xc7e8, 0x001a, 0x001a, 0xdbce, 0x001a, 0x001a, 0x001a, 0xd5dc, 0x001a, 0xb5f7, 0xf3fc, 0xf3f0, 0xafce, 0xb5f1, 0xd2ef, 0xc8e8, 0xf1eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4cb, 0xbee0, 0xf8e3, 0xe9ea, 0xb2fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e0, 0x001a, 0xe0cf, 0x001a, 0xa5ee, 0x001a, 0x001a, 0xaafa, 0xc3e6, 0xb2e1, 0xabca, 0x001a, 0xe4e3, 0xbbe9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e2, 0xf2f3, 0x001a, 0xd6ee, 0xb2ea, 0xf6d0, 0xd9ec, 0xcbda, 0xa8cf, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3dd, 0x001a, 0x001a, 0x001a, 0xdbd8, 0x001a, 0xcef9, 0xd5e9, 0xd1e3, 0x001a, 0x001a, 0xbcd2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacd8, 0xccf3, 0x001a, 0xfbcd, 0xd6f6, 0x001a, 0xf5e7, 0xefe8, 0xf9e3, 0xbbd2, 0xf3f3, 0xfbe3, 0x001a, 0xd0de, 0xb0ce, 0x001a, 0xf7d6, 0xd9f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1f5, 0xc4dc, 0x001a, 0xbbf5, 0x001a, 0xd1de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6dc, 0x001a, 0x001a, 0xd2de, 0x001a, 0x001a, 0xe2ed, 0xf6ee, 0xcfea, 0xeef0, 0xfce3, 0x001a, 0xdfd3, 0xf4d3, 0xb3e1, 0x001a, 0xb4e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3f4, 0x001a, 0x001a, 0xc6df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e9, 0x001a, 0x001a, 0x001a, 0xabdb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9e3, 0xc5eb, 0xa9f4, 0xb6cd, 0xf9d2, 0x001a, 0xadda, 0xe3d2, 0xd1cf, 0x001a, 0x001a, 0x001a, 0x001a, 0xdccb, 0xfacc, 0x001a, 0xddcf, 0x001a, 0x001a, 0xa9e8, 0x001a, 0xbbe3, 0xbae3, 0x001a, 0x001a, 0xdae0, 0x001a, 0x001a, 0x001a, 0xf7ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3dc, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5d3, 0x001a, 0xa6d7, 0x001a, 0xb5f6, 0xdbd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e1, 0x001a, 0x001a, 0xead4, 0x001a, 0xa3df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdffd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7d0, 0xd4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaacb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbe4, 0x001a, 0xfbe1, 0xa2cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0d3, 0x001a, 0xbfe4, 0x001a, 0xc0fb, 0x001a, 0xbeda, 0xcde4, 0x001a, 0xb9d6, 0x001a, 0x001a, 0x001a, 0xc0ef, 0x001a, 0xfce1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7dc, 0xe8dc, 0x001a, 0x001a, 0x001a, 0xd6fa, 0x001a, 0xf6d3, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaf1, 0x001a, 0xf2fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfde2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfd5, 0xf8d0, 0x001a, 0x001a, 0xdfcd, 0x001a, 0x001a, 0xcbf5, 0x001a, 0xf0e4, 0xabcb, 0x001a, 0xc4d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfee2, 0x001a, 0xdadd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaeda, 0xeeca, 0x001a, 0x001a, 0x001a, 0xb9d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1e3, 0x001a, 0x001a, 0xe3e8, 0x001a, 0x001a, 0xabf3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9cf, 0x001a, 0x001a, 0x001a, 0xf7d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1d4, 0x001a, 0x001a, 0xe4ce, 0x001a, 0xf2e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaee7, 0x001a, 0xbad6, 0x001a, 0xecdf, 0xc0e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5d8, 0x001a, 0x001a, 0x001a, 0xdce4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9f4, 0xb6f1, 0x001a, 0x001a, 0xdee2, 0xb5e1, 0x001a, 0x001a, 0xefcd, 0xa7f1, 0xe5ce, 0xddcb, 0x001a, 0x001a, 0xe3d9, 0x001a, 0x001a, 0xacf3, 0x001a, 0x001a, 0xf9d0, 0xabec, 0xd3de, 0xe9f7, 0x001a, 0x001a, 0xf5f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee1, 0xeecb, 0x001a, 0x001a, 0x001a, 0xbce3, 0xd6f8, 0x001a, 0x001a, 0xeedb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6f7, 0x001a, 0x001a, 0x001a, 0x001a, 0xdef4, 0x001a, 0x001a, 0xedf2, 0x001a, 0xd9db, 0x001a, 0xa8f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfde1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4de, 0x001a, 0xace0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3ed, 0x001a, 0x001a, 0xe1d3, 0x001a, 0xc8df, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6d9, 0x001a, 0xacfd, 0xd3ef, 0x001a, 0x001a, 0x001a, 0xc1e4, 0xebf8, 0x001a, 0xacdb, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbaf6, 0x001a, 0xdfdb, 0xd3d3, 0xc7f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xceca, 0xc1f8, 0xb4d2, 0x001a, 0x001a, 0xb4dc, 0xb9fa, 0xcfca, 0x001a, 0xb3fc, 0xeaea, 0xebea, 0xfad0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4ed, 0x001a, 0x001a, 0xe7dd, 0x001a, 0x001a, 0xc9df, 0x001a, 0x001a, 0x001a, 0x001a, 0xeddf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcee, 0x001a, 0xc1ef, 0x001a, 0x001a, 0xd2cc, 0x001a, 0xa4dd, 0x001a, 0x001a, 0x001a, 0xcadf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8d3, 0xa8f1, 0x001a, 0x001a, 0x001a, 0xb7cd, 0x001a, 0xd4ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde4, 0xeedf, 0xaccb, 0xbce9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecea, 0x001a, 0x001a, 0x001a, 0xcbdf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbff9, 0xafd6, 0xc6d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaacf, 0x001a, 0x001a, 0xa9ce, 0x001a, 0x001a, 0xf8d6, 0x001a, 0x001a, 0x001a, 0xb7f1, 0xf8ee, 0x001a, 0x001a, 0x001a, 0xd9d9, 0xdff3, 0x001a, 0xc8f8, 0xc6ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6f4, 0x001a, 0x001a, 0xc5e6, 0xd5ef, 0x001a, 0x001a, 0xefcb, 0xdffc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7dc, 0x001a, 0x001a, 0xe7d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9f8, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2e3, 0x001a, 0xbde3, 0x001a, 0xe1cf, 0xc0f0, 0xdaec, 0x001a, 0xd7dd, 0xf0fb, 0x001a, 0x001a, 0xacec, 0x001a, 0x001a, 0x001a, 0xa9f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7fa, 0xc1fb, 0x001a, 0xc0d2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0e5, 0x001a, 0x001a, 0x001a, 0xe5ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xadcb, 0x001a, 0xb0f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5f7, 0x001a, 0xaecb, 0x001a, 0xafda, 0x001a, 0xb6d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7d3, 0xb2fb, 0x001a, 0xc4fd, 0x001a, 0xadec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1fb, 0x001a, 0x001a, 0x001a, 0xe9e5, 0xeee9, 0x001a, 0xf4f3, 0xf3f8, 0xc1f0, 0xafde, 0xb0f8, 0x001a, 0x001a, 0xe0f3, 0xafe7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaddb, 0x001a, 0xb5e6, 0x001a, 0x001a, 0xa8f9, 0x001a, 0x001a, 0xd8dd, 0xd9e8, 0xd6ef, 0x001a, 0x001a, 0x001a, 0xe2d3, 0x001a, 0xdfe2, 0x001a, 0x001a, 0xe0fc, 0xc8d7, 0xadfd, 0x001a, 0x001a, 0x001a, 0xefdf, 0xd3cc, 0xf9d3, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0d4, 0xc7db, 0xd5de, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4f0, 0x001a, 0xd0d5, 0xd9e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7fc, 0xd6dc, 0xe0e2, 0x001a, 0x001a, 0x001a, 0xb0da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3f3, 0x001a, 0xecd3, 0x001a, 0xcbf4, 0x001a, 0x001a, 0x001a, 0xc5fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfde3, 0x001a, 0xb1f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbd0, 0xdbec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcf5, 0xa4f2, 0xced8, 0xcfd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7d2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecfb, 0x001a, 0xc8dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8e4, 0x001a, 0x001a, 0xc1d2, 0x001a, 0x001a, 0x001a, 0xd7f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbd6, 0xd6de, 0x001a, 0x001a, 0xbdf7, 0xaeec, 0x001a, 0x001a, 0x001a, 0xe1d0, 0x001a, 0xf5e0, 0xb3ea, 0x001a, 0xd6ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6ec, 0xe1e2, 0xbee3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8fc, 0x001a, 0x001a, 0xf0cd, 0x001a, 0xf6f9, 0x001a, 0x001a, 0xf0df, 0x001a, 0x001a, 0x001a, 0xbfe5, 0x001a, 0x001a, 0x001a, 0xbfce, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1fc, 0xb0ed, 0xd1fd, 0xbbf6, 0x001a, 0x001a, 0xcff9, 0xdaeb, 0xc1ca, 0x001a, 0xb8d2, 0xf1cd, 0x001a, 0xd3e3, 0xe6fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xede6, 0x001a, 0x001a, 0x001a, 0xfae3, 0x001a, 0x001a, 0xaaf0, 0xd0f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2fc, 0x001a, 0xa7f8, 0x001a, 0x001a, 0x001a, 0xe5e1, 0xf9ee, 0x001a, 0x001a, 0x001a, 0xf6e7, 0xedea, 0x001a, 0x001a, 0xb4fc, 0xc2f5, 0x001a, 0x001a, 0xdcd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5f0, 0x001a, 0xe8dd, 0xedd3, 0xfcf5, 0x001a, 0xbfda, 0x001a, 0xfbcc, 0x001a, 0x001a, 0x001a, 0xfad3, 0xa4f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7ef, 0x001a, 0xc3d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedfb, 0x001a, 0xade0, 0x001a, 0x001a, 0xeeea, 0xb3fb, 0xc2e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7f6, 0xddd2, 0x001a, 0xccdf, 0x001a, 0x001a, 0xc9fc, 0x001a, 0x001a, 0xa9e5, 0xf6e0, 0xb3f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfee1, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0cb, 0x001a, 0xefea, 0xf0ea, 0x001a, 0x001a, 0x001a, 0xc0da, 0xb4f8, 0xf2eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7e9, 0xf1e4, 0x001a, 0x001a, 0x001a, 0xefca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcafc, 0x001a, 0x001a, 0x001a, 0xe1f3, 0x001a, 0x001a, 0xc4cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e3, 0x001a, 0xc5cb, 0xb4ea, 0x001a, 0x001a, 0xbde9, 0x001a, 0xc9d7, 0x001a, 0x001a, 0xdbeb, 0xb1ed, 0x001a, 0xc3cc, 0xbef7, 0xcbfc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4f8, 0x001a, 0xb7d9, 0x001a, 0x001a, 0xd3f3, 0xd4f3, 0x001a, 0x001a, 0x001a, 0xe4f7, 0x001a, 0xd1f7, 0x001a, 0x001a, 0xb7d8, 0xb1ce, 0xc2ca, 0x001a, 0x001a, 0xb4fb, 0xc6cb, 0x001a, 0x001a, 0xf6f0, 0x001a, 0x001a, 0xe7d5, 0x001a, 0xd0ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4cc, 0xafcb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaf4, 0xafe9, 0x001a, 0x001a, 0xc3f5, 0xd8e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9dd, 0x001a, 0x001a, 0x001a, 0xf3f1, 0x001a, 0xfbd5, 0xbbde, 0x001a, 0x001a, 0xfbf4, 0x001a, 0x001a, 0x001a, 0xf3fd, 0xf2fd, 0xa6f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9dd, 0x001a, 0x001a, 0xd3d4, 0x001a, 0xa8cc, 0x001a, 0xc1da, 0xd5cc, 0x001a, 0xe4d9, 0x001a, 0x001a, 0x001a, 0xcafa, 0x001a, 0x001a, 0x001a, 0xe3e5, 0x001a, 0x001a, 0x001a, 0xbcd3, 0x001a, 0x001a, 0x001a, 0xf0ca, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4d0, 0x001a, 0x001a, 0x001a, 0xd0ca, 0xabfa, 0xebeb, 0xf8e7, 0xe5d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4f3, 0x001a, 0x001a, 0x001a, 0xfbd4, 0xe3fc, 0xd8fa, 0x001a, 0xd5f3, 0x001a, 0xabcf, 0x001a, 0x001a, 0xf3eb, 0xfcd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4d3, 0xfccd, 0x001a, 0xe6d9, 0x001a, 0xf9e2, 0xa1e2, 0xd4eb, 0x001a, 0xf7e0, 0xb2e4, 0xfccc, 0x001a, 0x001a, 0x001a, 0xe4fb, 0x001a, 0x001a, 0x001a, 0xabf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdd0, 0x001a, 0xf1ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8ef, 0x001a, 0x001a, 0x001a, 0xc0d7, 0x001a, 0xfaee, 0xf4fd, 0x001a, 0x001a, 0xe3d3, 0x001a, 0xc2fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8d5, 0xaedb, 0xb6e1, 0xb7f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfe0, 0xc3fb, 0xeadd, 0x001a, 0xa2e2, 0x001a, 0xa6ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8f6, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcadd, 0x001a, 0x001a, 0xe2d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6dd, 0x001a, 0x001a, 0xebdd, 0x001a, 0x001a, 0xf9e4, 0x001a, 0x001a, 0xafe3, 0xfcd0, 0x001a, 0x001a, 0x001a, 0xfcf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xbccc, 0xeaf7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4e5, 0xf1df, 0x001a, 0x001a, 0xe1f7, 0x001a, 0xf7f9, 0xb9ef, 0x001a, 0x001a, 0xd8f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9f8, 0x001a, 0x001a, 0x001a, 0xbdee, 0x001a, 0x001a, 0x001a, 0xc6d8, 0x001a, 0x001a, 0xe3e4, 0xcef5, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7d9, 0xb9d2, 0xc3d5, 0x001a, 0x001a, 0xe5da, 0xd0da, 0x001a, 0xd9d1, 0xd8ce, 0x001a, 0xdecb, 0xacf4, 0xfbda, 0x001a, 0xe9f6, 0xf3e8, 0xaccf, 0xf0f0, 0x001a, 0xfdf4, 0xc8db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0ce, 0xd4e3, 0xcfd1, 0xf5f1, 0x001a, 0xf2cd, 0x001a, 0xebcf, 0x001a, 0x001a, 0x001a, 0xb8cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6e3, 0xdad1, 0x001a, 0xa5f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f2, 0x001a, 0xcee4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbd3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9f1, 0x001a, 0x001a, 0x001a, 0xc9f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8ef, 0xc9e6, 0x001a, 0xb8d8, 0xf3fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5f3, 0x001a, 0x001a, 0xa4f8, 0x001a, 0x001a, 0xf3d1, 0xc8e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9dc, 0xd7de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfcb, 0x001a, 0x001a, 0x001a, 0xeccf, 0x001a, 0x001a, 0x001a, 0x001a, 0xdff4, 0x001a, 0x001a, 0xf4d1, 0xbad2, 0x001a, 0x001a, 0x001a, 0xf2df, 0x001a, 0x001a, 0x001a, 0xb7e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e2, 0xfcd3, 0x001a, 0x001a, 0xe6ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9db, 0x001a, 0x001a, 0x001a, 0xfae4, 0x001a, 0xdecf, 0x001a, 0x001a, 0xd0ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3d5, 0xf5f3, 0xaef7, 0x001a, 0x001a, 0xc8ef, 0x001a, 0xf3cd, 0xcff5, 0xf3e5, 0xc2f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1ca, 0x001a, 0x001a, 0x001a, 0xf1ea, 0x001a, 0xa6d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdad9, 0xabf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7eb, 0x001a, 0x001a, 0x001a, 0xc0e5, 0xb5fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9cc, 0xc6fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5ea, 0x001a, 0xaae5, 0xbadf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfe1, 0x001a, 0xd1da, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8e1, 0x001a, 0xf4e8, 0xfdd3, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaf2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6da, 0xb3f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdfd, 0x001a, 0x001a, 0x001a, 0xb6f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8d9, 0xb9d9, 0xc9ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xced6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbf7, 0xaedf, 0xf5e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5d2, 0x001a, 0x001a, 0x001a, 0xd5d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccf4, 0xfcda, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8d9, 0x001a, 0xebf7, 0xc9f5, 0x001a, 0xbcf3, 0x001a, 0xd2da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e8, 0x001a, 0x001a, 0xcfd6, 0xbaf4, 0x001a, 0xc9f7, 0x001a, 0x001a, 0xaacc, 0x001a, 0x001a, 0xc3f0, 0xd6cc, 0x001a, 0x001a, 0x001a, 0xd3d0, 0x001a, 0xbdd3, 0x001a, 0x001a, 0x001a, 0xfbdb, 0x001a, 0xe0cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4d3, 0xf7f6, 0x001a, 0x001a, 0xbad5, 0xcdf3, 0xe1cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadf4, 0x001a, 0xaafc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf7, 0x001a, 0x001a, 0x001a, 0xf6e8, 0x001a, 0xe7da, 0x001a, 0x001a, 0x001a, 0xccf7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xeee0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6ce, 0xabfc, 0xbbd5, 0x001a, 0x001a, 0xa8f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5e2, 0xb9cd, 0xf2ea, 0xc7cb, 0x001a, 0xf4cd, 0x001a, 0x001a, 0xafdb, 0xd9ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbacd, 0x001a, 0x001a, 0xf9fc, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3df, 0xe7ce, 0xc2da, 0x001a, 0xadcf, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e7, 0xa8f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2f3, 0x001a, 0x001a, 0x001a, 0xf2ca, 0xa4df, 0x001a, 0x001a, 0xc4d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7cc, 0xc2e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbcd, 0x001a, 0xdaef, 0xd8ee, 0x001a, 0xa7dd, 0xa6e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0e0, 0x001a, 0x001a, 0x001a, 0xb0d6, 0xcaf8, 0x001a, 0xfafc, 0x001a, 0xfed9, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0de, 0x001a, 0x001a, 0x001a, 0xecdd, 0xe8da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0d4, 0x001a, 0xf9d6, 0x001a, 0xd7cd, 0xd8de, 0x001a, 0x001a, 0xf8f2, 0x001a, 0xd6e4, 0x001a, 0x001a, 0xc5d0, 0xaef4, 0x001a, 0xa8dd, 0x001a, 0x001a, 0x001a, 0xc5ed, 0xd6f3, 0x001a, 0x001a, 0xd9de, 0xe6e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8d3, 0x001a, 0xb0db, 0x001a, 0x001a, 0xdae5, 0xbfe3, 0x001a, 0x001a, 0x001a, 0xb1db, 0x001a, 0x001a, 0x001a, 0xe9d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e0, 0xdbef, 0x001a, 0x001a, 0xe9f0, 0x001a, 0x001a, 0xb2d7, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdd0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9d9, 0x001a, 0x001a, 0xfed0, 0x001a, 0xedec, 0xa9d3, 0x001a, 0xa9f2, 0xc4f0, 0x001a, 0x001a, 0xe2e2, 0xefe9, 0x001a, 0x001a, 0x001a, 0xd1f9, 0x001a, 0x001a, 0xd9e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdae8, 0xc3da, 0xc4da, 0xc5d4, 0x001a, 0xfae7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0cd, 0xb0e3, 0x001a, 0xb2db, 0xc4fb, 0x001a, 0xe3f3, 0x001a, 0xa5d9, 0xe7fb, 0xcbdd, 0xd4d0, 0x001a, 0xb6e6, 0xaee0, 0xdafd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5dc, 0xf8e0, 0xb1e7, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0f5, 0x001a, 0xdcd8, 0xc6ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9e1, 0x001a, 0xc0e3, 0xc0f9, 0xf0e9, 0x001a, 0x001a, 0xdbd9, 0x001a, 0xe4f3, 0x001a, 0x001a, 0x001a, 0xb6dc, 0xe9e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5f0, 0xc1e3, 0xccfc, 0xcdfc, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbf2, 0x001a, 0xccf2, 0x001a, 0x001a, 0x001a, 0xcfe4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbf1, 0x001a, 0xd9fa, 0x001a, 0xb8f1, 0xf5fd, 0xf9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe7, 0xb7fc, 0xe4fc, 0xc5fb, 0xe7e3, 0xb9d8, 0x001a, 0xf8f6, 0x001a, 0x001a, 0xc5dc, 0xd8cc, 0x001a, 0x001a, 0x001a, 0xafe0, 0xe7f4, 0x001a, 0xdcef, 0xfccf, 0xddef, 0x001a, 0xaaf2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbefd, 0x001a, 0x001a, 0xacca, 0xbbfd, 0xc7fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2e7, 0x001a, 0xd1ea, 0xf4df, 0x001a, 0x001a, 0x001a, 0x001a, 0xecd1, 0xdee4, 0xc3e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6d9, 0x001a, 0x001a, 0xbccd, 0x001a, 0xe5f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5ed, 0x001a, 0x001a, 0xbad9, 0x001a, 0x001a, 0x001a, 0xe7ed, 0xb5fb, 0xecf8, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7e0, 0x001a, 0xd9cc, 0x001a, 0x001a, 0xc6d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5e7, 0x001a, 0xf5d5, 0xbed3, 0x001a, 0xfbfc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2e4, 0x001a, 0x001a, 0xf5df, 0x001a, 0x001a, 0xf8e8, 0xedf8, 0x001a, 0x001a, 0xc7ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e8, 0x001a, 0xd8cd, 0xd6e7, 0xdacc, 0x001a, 0x001a, 0xe3ca, 0xf6df, 0xc7f0, 0xc6f0, 0x001a, 0xbad8, 0x001a, 0xf4f1, 0xf0f4, 0xccf5, 0x001a, 0x001a, 0xe5fc, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5ea, 0xf3ea, 0x001a, 0xdbdd, 0x001a, 0xd7dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdde, 0xf9f2, 0x001a, 0xc7d5, 0x001a, 0x001a, 0x001a, 0xd0d8, 0x001a, 0xc8f0, 0xa1d1, 0xa2d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4d9, 0xe8d6, 0xcad9, 0x001a, 0xb1da, 0xc7d8, 0xe2dc, 0xcef3, 0xf4f5, 0x001a, 0x001a, 0xb9f1, 0x001a, 0x001a, 0xd3da, 0x001a, 0xeaf6, 0x001a, 0x001a, 0x001a, 0xf5cf, 0x001a, 0x001a, 0xaefd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2ca, 0x001a, 0x001a, 0xb4df, 0x001a, 0x001a, 0x001a, 0x001a, 0xddd7, 0xbafa, 0xa7ee, 0xbdf5, 0x001a, 0xf5f8, 0x001a, 0x001a, 0xe8ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1d4, 0x001a, 0xa3d1, 0xd6e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8f9, 0x001a, 0xcadb, 0xf9cb, 0xd4d4, 0x001a, 0xdcd9, 0x001a, 0xbeee, 0x001a, 0xedf7, 0x001a, 0x001a, 0x001a, 0xeed2, 0x001a, 0x001a, 0xe6e1, 0xf9f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeddd, 0x001a, 0xdbe8, 0x001a, 0xb3db, 0x001a, 0x001a, 0x001a, 0xf7d1, 0xb0e0, 0x001a, 0x001a, 0xe2d4, 0x001a, 0xd7f6, 0x001a, 0xf9d7, 0x001a, 0x001a, 0xddd8, 0x001a, 0xfdcd, 0xabf2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdcd, 0xc2f8, 0x001a, 0x001a, 0xacf2, 0x001a, 0x001a, 0xadca, 0xaeca, 0xaecf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdadb, 0xbbd9, 0xf3ca, 0xd3f6, 0xf8e6, 0xf5ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6ea, 0x001a, 0x001a, 0xf9f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafcf, 0x001a, 0x001a, 0xd3ca, 0x001a, 0x001a, 0xafca, 0xb0d2, 0xbaf1, 0x001a, 0xb3d7, 0xc3e3, 0xfdf3, 0xdade, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbde, 0x001a, 0x001a, 0xdeef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3e2, 0xfbee, 0x001a, 0x001a, 0xf7df, 0xcad7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8ce, 0xdbdb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbf1, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7fa, 0xc6d0, 0x001a, 0x001a, 0xabcc, 0xa8ee, 0x001a, 0x001a, 0xfacb, 0xf9f9, 0xfdcc, 0xfed3, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeef2, 0x001a, 0xd5d4, 0xcddf, 0x001a, 0xb8fc, 0xd0d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdf2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4ca, 0x001a, 0xd9d5, 0x001a, 0x001a, 0x001a, 0xded8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9cd, 0x001a, 0x001a, 0x001a, 0xa9ee, 0xbcf6, 0x001a, 0x001a, 0xdbcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9f0, 0x001a, 0xfcfc, 0x001a, 0xc9e8, 0xfef4, 0x001a, 0x001a, 0x001a, 0x001a, 0xfce7, 0xded7, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcde, 0x001a, 0xacf0, 0xfecc, 0xe1cd, 0x001a, 0xbae1, 0x001a, 0xefdb, 0xb2da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5d1, 0xb8dc, 0x001a, 0x001a, 0x001a, 0xf6d8, 0x001a, 0xa4d1, 0x001a, 0xe2cd, 0x001a, 0x001a, 0x001a, 0x001a, 0xeadc, 0x001a, 0x001a, 0xf7f0, 0x001a, 0xcaf0, 0xbed0, 0x001a, 0xdcdd, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6d4, 0xd6d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0ed, 0xa1cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5df, 0x001a, 0x001a, 0x001a, 0xf8df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1d4, 0xb2ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcae8, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e3, 0xd0f5, 0x001a, 0x001a, 0x001a, 0xa1f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe6, 0x001a, 0xf1f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3f9, 0xdbe0, 0xebf6, 0x001a, 0xf1cb, 0x001a, 0xead9, 0xa2f5, 0x001a, 0x001a, 0x001a, 0xd1d7, 0x001a, 0xf8d1, 0xf8ea, 0xf9ea, 0xb3da, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfef, 0x001a, 0x001a, 0xeff1, 0x001a, 0xf6e5, 0xbfee, 0xe4e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfd0, 0x001a, 0xacfa, 0xd1f5, 0xb3e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcef2, 0xb4db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcefc, 0x001a, 0xeedd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbecd, 0x001a, 0xe9da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0cf, 0xd9f7, 0xe6f3, 0x001a, 0x001a, 0xd9ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaace, 0x001a, 0xc8cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7d0, 0x001a, 0xcbf0, 0x001a, 0xc7d0, 0x001a, 0x001a, 0xc5e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdad5, 0x001a, 0xa7d7, 0x001a, 0x001a, 0x001a, 0xc0ee, 0x001a, 0xf6f8, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2f5, 0xe9ed, 0x001a, 0xbcd9, 0x001a, 0xc6e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3f5, 0x001a, 0x001a, 0xd4da, 0xa7e2, 0xfcfb, 0x001a, 0x001a, 0xdcf1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4ca, 0x001a, 0x001a, 0x001a, 0xfae8, 0x001a, 0x001a, 0xe9ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8e9, 0xe5e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9d0, 0xf2d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6d1, 0x001a, 0xcedf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad3, 0x001a, 0x001a, 0x001a, 0xaccc, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0ef, 0x001a, 0x001a, 0x001a, 0xe5e5, 0xd5d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfcdb, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfecb, 0xeaed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2d4, 0xf6cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xead5, 0xeef1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbfa, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedcf, 0x001a, 0xebed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2d5, 0x001a, 0x001a, 0x001a, 0xbcd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2fd, 0xadf3, 0x001a, 0xdbfd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7d1, 0x001a, 0x001a, 0xe3fd, 0xb3ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4fd, 0xcefa, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0ca, 0x001a, 0xa7f7, 0x001a, 0xb1cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2e6, 0x001a, 0xb6fc, 0xadf2, 0xe1ef, 0xaef3, 0xc6dc, 0xebd9, 0x001a, 0x001a, 0x001a, 0xe0e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6d5, 0xfdcf, 0x001a, 0x001a, 0xddde, 0x001a, 0x001a, 0x001a, 0xd1d9, 0x001a, 0x001a, 0x001a, 0xeae4, 0xcff2, 0x001a, 0xbff7, 0x001a, 0x001a, 0xe6e2, 0xa8e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e3, 0x001a, 0xd1ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1d6, 0xb2de, 0x001a, 0x001a, 0xe8e0, 0x001a, 0x001a, 0xabd3, 0x001a, 0xdceb, 0x001a, 0x001a, 0xafdf, 0x001a, 0xc3ca, 0x001a, 0x001a, 0xfcee, 0x001a, 0xc3fd, 0x001a, 0x001a, 0x001a, 0xf6eb, 0xb2cf, 0x001a, 0x001a, 0x001a, 0x001a, 0xecd9, 0x001a, 0xbdd9, 0x001a, 0xdfd8, 0x001a, 0x001a, 0xb8d4, 0xbeeb, 0xefdd, 0x001a, 0xf0dd, 0xf1dd, 0xf2dd, 0x001a, 0x001a, 0xbed9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6fb, 0xb3cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabe4, 0x001a, 0xc5da, 0x001a, 0xecd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9e2, 0x001a, 0x001a, 0xbcde, 0xb5e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0db, 0x001a, 0xe2ef, 0xf0f1, 0xb4cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1db, 0x001a, 0xb1e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5df, 0x001a, 0xd2f9, 0x001a, 0x001a, 0xfde7, 0x001a, 0x001a, 0xa3e6, 0xf1fb, 0xb0cb, 0xaef2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7cd, 0x001a, 0xdce8, 0x001a, 0x001a, 0xd7e7, 0x001a, 0x001a, 0xc0f7, 0x001a, 0xe3d0, 0x001a, 0x001a, 0x001a, 0xa1da, 0x001a, 0x001a, 0x001a, 0xbdcc, 0x001a, 0x001a, 0xa9d1, 0xccdd, 0x001a, 0x001a, 0xfee3, 0xaad1, 0xaae8, 0x001a, 0xb6ea, 0xfaf9, 0xcce6, 0xd8f6, 0x001a, 0x001a, 0x001a, 0xc7d4, 0x001a, 0x001a, 0x001a, 0xcbd9, 0x001a, 0xd2d9, 0xcbd3, 0xf7d8, 0xa9da, 0xf8f5, 0x001a, 0x001a, 0xdede, 0xaff2, 0xa9f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8d8, 0x001a, 0x001a, 0xc1ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1f9, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3dd, 0xfaea, 0x001a, 0xbdf6, 0xbbe1, 0xbfcd, 0xd4f4, 0xcde6, 0x001a, 0xcffc, 0xa2fb, 0x001a, 0xdce0, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbf4, 0xd5da, 0x001a, 0xb2f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2fb, 0x001a, 0xf6db, 0x001a, 0xdfde, 0x001a, 0x001a, 0x001a, 0xf2db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcf8, 0xeef7, 0xe8eb, 0x001a, 0xfad2, 0x001a, 0x001a, 0xbcf1, 0x001a, 0x001a, 0xdafa, 0x001a, 0x001a, 0xeada, 0xc6da, 0xc1f7, 0x001a, 0x001a, 0xb6e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7e5, 0xacd6, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9e1, 0x001a, 0xaae2, 0x001a, 0xa6d5, 0x001a, 0x001a, 0xd7d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0f2, 0x001a, 0xfbea, 0x001a, 0xdde0, 0xf3fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdf1, 0x001a, 0x001a, 0xe7e2, 0xd7fd, 0x001a, 0xc8ce, 0xb7ea, 0x001a, 0xc0fc, 0x001a, 0xe7fd, 0xeff7, 0x001a, 0x001a, 0xb5d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbaef, 0xddf1, 0x001a, 0xb3de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe8, 0x001a, 0x001a, 0xddf8, 0x001a, 0x001a, 0xc7fb, 0xc8d5, 0x001a, 0xdfd7, 0x001a, 0xa9dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1e9, 0x001a, 0x001a, 0xadfa, 0xd9f6, 0xf4fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeee6, 0x001a, 0xdccc, 0xbce1, 0xefe0, 0x001a, 0x001a, 0xbfe9, 0xfdfc, 0xcee6, 0x001a, 0x001a, 0xd7e1, 0x001a, 0xcfe6, 0x001a, 0xf1f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3e4, 0x001a, 0x001a, 0xfbe4, 0x001a, 0x001a, 0xe4f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3ef, 0x001a, 0x001a, 0xeecf, 0xbef6, 0xb2e0, 0xfefc, 0xabd1, 0x001a, 0x001a, 0x001a, 0xfad7, 0x001a, 0x001a, 0x001a, 0xc8fb, 0x001a, 0xd7e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3d4, 0xf8f0, 0xa8d7, 0x001a, 0x001a, 0x001a, 0xe7e1, 0x001a, 0x001a, 0xbfd3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4ef, 0x001a, 0xc5d7, 0xe2eb, 0x001a, 0x001a, 0xe7fc, 0x001a, 0x001a, 0xa2e4, 0x001a, 0xe8e2, 0x001a, 0xd0e6, 0x001a, 0xe8fb, 0xe8f4, 0xf4e5, 0xbcf4, 0xd5f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6df, 0x001a, 0xb9fc, 0xc2ee, 0xf5ca, 0x001a, 0x001a, 0x001a, 0xe5ef, 0xe2cb, 0xa4d4, 0x001a, 0xe0de, 0xfdda, 0xc6e4, 0xbee8, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee0, 0xb4f6, 0xd2ea, 0x001a, 0xfbf9, 0x001a, 0x001a, 0xc2e0, 0x001a, 0xe4ca, 0x001a, 0xb7e7, 0x001a, 0xfdea, 0x001a, 0xddd9, 0x001a, 0xb4da, 0xaaee, 0xe9fb, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbdb, 0xb5da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbef1, 0x001a, 0x001a, 0xacd3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9fb, 0x001a, 0xcfdf, 0x001a, 0x001a, 0xc0d3, 0xd7e3, 0x001a, 0xe6ef, 0xd0fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0e9, 0x001a, 0x001a, 0x001a, 0xd3f5, 0x001a, 0x001a, 0xdcec, 0xb7f7, 0x001a, 0x001a, 0xb8ea, 0xf9d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdef1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6d7, 0xb5cf, 0x001a, 0xa8d9, 0x001a, 0x001a, 0xeeec, 0x001a, 0x001a, 0xaadd, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2cd, 0xaee8, 0x001a, 0x001a, 0x001a, 0xbde1, 0x001a, 0xd1f2, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e9, 0x001a, 0x001a, 0x001a, 0xfcd2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5db, 0x001a, 0xe7f3, 0xfed8, 0x001a, 0x001a, 0x001a, 0xd1fc, 0x001a, 0xb2ed, 0xaff4, 0x001a, 0xa3fb, 0x001a, 0x001a, 0xc1fc, 0x001a, 0xabee, 0xa5d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2f4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9ee, 0x001a, 0x001a, 0x001a, 0xcafb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3cd, 0xbbd8, 0x001a, 0xdbe5, 0xf7f8, 0x001a, 0x001a, 0x001a, 0xd4f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9d7, 0x001a, 0xc9cb, 0x001a, 0x001a, 0xd1e6, 0xccf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaed8, 0x001a, 0xd3f9, 0xfed5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcd8, 0xb0f2, 0x001a, 0x001a, 0x001a, 0x001a, 0xabe2, 0xe8f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeced, 0x001a, 0xb8e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfeda, 0x001a, 0x001a, 0xbecc, 0x001a, 0x001a, 0xfcf2, 0xebda, 0x001a, 0xd8e2, 0xd6ed, 0x001a, 0x001a, 0xd1d6, 0xb3e0, 0x001a, 0x001a, 0xd2fc, 0x001a, 0xc8eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1d3, 0xcdf0, 0x001a, 0xf7cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2ed, 0x001a, 0xd8d4, 0xc9dc, 0xf1d7, 0x001a, 0x001a, 0xbbdf, 0x001a, 0x001a, 0xa5f3, 0x001a, 0x001a, 0x001a, 0xcdf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xbff1, 0xb1f8, 0x001a, 0xfae9, 0x001a, 0x001a, 0x001a, 0xcbfb, 0x001a, 0x001a, 0xd5ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4f9, 0xcaf7, 0x001a, 0x001a, 0xc8d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8fc, 0xbdf3, 0x001a, 0xfeee, 0x001a, 0xfee7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2d3, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6d3, 0x001a, 0xadcc, 0xfaf6, 0xb2d6, 0xd8d2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9e7, 0x001a, 0x001a, 0x001a, 0x001a, 0xadf0, 0xccfb, 0xa1eb, 0x001a, 0x001a, 0xa6d4, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdfb, 0x001a, 0xbdd5, 0xdff1, 0x001a, 0x001a, 0xfbf6, 0x001a, 0xb4de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebd5, 0x001a, 0x001a, 0xc8e5, 0x001a, 0x001a, 0x001a, 0xa4fb, 0xb9d4, 0x001a, 0x001a, 0xe1de, 0x001a, 0xa3e4, 0x001a, 0x001a, 0x001a, 0xb7d7, 0x001a, 0xeef8, 0x001a, 0x001a, 0x001a, 0xb5de, 0x001a, 0x001a, 0xd2d6, 0x001a, 0xd5f9, 0xbae7, 0xd5eb, 0xf7d5, 0xe7ef, 0xbee1, 0x001a, 0x001a, 0x001a, 0xaefa, 0x001a, 0x001a, 0x001a, 0xe9d6, 0xeed6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbe7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4ce, 0x001a, 0x001a, 0x001a, 0xa5fb, 0xeee1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8f7, 0x001a, 0x001a, 0x001a, 0x001a, 0xcefb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdfb, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6cf, 0x001a, 0x001a, 0x001a, 0xc7ed, 0xacee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddcc, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7f6, 0x001a, 0x001a, 0x001a, 0xfae6, 0x001a, 0x001a, 0x001a, 0xa4f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcfd, 0xb3ed, 0xc9ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8ef, 0x001a, 0x001a, 0xbfe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbfa, 0xe3cb, 0xa9f7, 0x001a, 0xa6fb, 0x001a, 0x001a, 0x001a, 0xb9dc, 0x001a, 0x001a, 0x001a, 0xc0f1, 0xc8ed, 0xc3ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadd6, 0x001a, 0x001a, 0xcefd, 0x001a, 0x001a, 0x001a, 0xa1e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4fb, 0xa7d5, 0x001a, 0x001a, 0x001a, 0xf6f1, 0x001a, 0xd3e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdecc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2f8, 0x001a, 0x001a, 0x001a, 0xebdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xeae5, 0x001a, 0x001a, 0xe0f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccdb, 0xcddd, 0x001a, 0x001a, 0x001a, 0xc8d4, 0x001a, 0x001a, 0xedd9, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8fd, 0x001a, 0xa1d6, 0xbffd, 0x001a, 0xd3fc, 0x001a, 0xa1ef, 0x001a, 0xbce7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeed1, 0x001a, 0x001a, 0xd5e6, 0x001a, 0x001a, 0xf2e9, 0x001a, 0xb0df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0d8, 0xbafc, 0xaffd, 0xcef0, 0x001a, 0xe1db, 0x001a, 0x001a, 0xc9e5, 0x001a, 0xb4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe9, 0xa8ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7fd, 0x001a, 0x001a, 0xa7fb, 0x001a, 0xc2e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e2, 0x001a, 0x001a, 0xecdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8fd, 0xf9fd, 0x001a, 0x001a, 0x001a, 0xbff6, 0x001a, 0x001a, 0xa7e7, 0x001a, 0xd7e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3d4, 0xc9d4, 0x001a, 0x001a, 0x001a, 0x001a, 0xfad6, 0x001a, 0xf2d7, 0x001a, 0xc0e1, 0x001a, 0xe2db, 0xd8e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbde7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcff0, 0xbef3, 0xace2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7f5, 0xf0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8fd, 0xe8e3, 0x001a, 0xa7d4, 0xfce8, 0xd2fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeff8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0f0, 0x001a, 0xf0f7, 0xb3ee, 0x001a, 0x001a, 0xbaea, 0x001a, 0xd3ea, 0x001a, 0x001a, 0xc9ed, 0xabdd, 0x001a, 0x001a, 0x001a, 0xace5, 0xa1fd, 0x001a, 0xd0df, 0xb3ec, 0x001a, 0xd1df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeded, 0xb8f8, 0xfaf7, 0x001a, 0x001a, 0x001a, 0xabf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbad4, 0xb3e4, 0x001a, 0xdae9, 0x001a, 0xb6de, 0x001a, 0xbfd9, 0x001a, 0xc0d9, 0xefd6, 0x001a, 0x001a, 0x001a, 0x001a, 0xccd9, 0x001a, 0xaada, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5f7, 0x001a, 0x001a, 0x001a, 0xb2cc, 0x001a, 0x001a, 0xf9df, 0xe0d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbd4, 0x001a, 0x001a, 0x001a, 0x001a, 0xfafd, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3cc, 0x001a, 0x001a, 0xf3db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2df, 0x001a, 0xcace, 0x001a, 0xdaee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4e4, 0x001a, 0xcffb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7cf, 0x001a, 0xc3ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeace, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xade2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1d7, 0xf5fa, 0x001a, 0x001a, 0xc9d5, 0xacf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9f3, 0x001a, 0x001a, 0x001a, 0x001a, 0xedd8, 0xc4e3, 0xf1f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e8, 0x001a, 0x001a, 0x001a, 0xfae0, 0xc4ee, 0xded9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2eb, 0xa3eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2fc, 0xbbea, 0x001a, 0x001a, 0x001a, 0x001a, 0xabe8, 0xe2de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefed, 0x001a, 0xa3e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcd4, 0x001a, 0xeafc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee7, 0x001a, 0xf2fc, 0x001a, 0x001a, 0xb4d6, 0x001a, 0x001a, 0xaee2, 0x001a, 0xb7d3, 0xccfa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcfa, 0x001a, 0xb5ed, 0xe3e1, 0x001a, 0xace8, 0x001a, 0xdde8, 0x001a, 0x001a, 0xe9ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdf4, 0x001a, 0xb8cf, 0xdbe9, 0xacd1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9eb, 0x001a, 0xcce8, 0x001a, 0x001a, 0x001a, 0xb7de, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcd6, 0xe5d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddfa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6da, 0x001a, 0xb1ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8da, 0xa6df, 0x001a, 0xb3f9, 0xd2f2, 0x001a, 0xc4ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbce, 0x001a, 0x001a, 0xf5cd, 0x001a, 0x001a, 0x001a, 0xb0fd, 0xa8d5, 0x001a, 0xc1f1, 0x001a, 0x001a, 0xe9e2, 0xcadc, 0xb4ec, 0xc0fa, 0x001a, 0x001a, 0xa8fb, 0xa8d0, 0x001a, 0x001a, 0xecda, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeed9, 0x001a, 0xfbe0, 0x001a, 0x001a, 0x001a, 0xeaef, 0xdefa, 0x001a, 0x001a, 0xc4e0, 0x001a, 0xb9cf, 0x001a, 0xcad5, 0xe2d7, 0xafe2, 0x001a, 0xb8d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaf6, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2ef, 0xdae2, 0xfcf6, 0x001a, 0x001a, 0xd0fb, 0xadd1, 0x001a, 0xe4cd, 0x001a, 0xaed1, 0xeddc, 0xcee8, 0x001a, 0xf9f0, 0xb5ce, 0xfce6, 0x001a, 0x001a, 0xfbd7, 0xd6d0, 0xf5dd, 0xf1f7, 0x001a, 0xfdf6, 0x001a, 0xf7db, 0x001a, 0x001a, 0x001a, 0x001a, 0xeafb, 0xdce9, 0xc1d9, 0x001a, 0xf2f5, 0xc5e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2f9, 0x001a, 0xbcea, 0x001a, 0xc5d2, 0xd1fb, 0xc0e7, 0xa5eb, 0x001a, 0xfadf, 0xa2e3, 0xb9d7, 0x001a, 0xc3e9, 0x001a, 0xfde8, 0xafe8, 0x001a, 0x001a, 0xd3f2, 0xa9fb, 0xa5d8, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8d0, 0x001a, 0x001a, 0x001a, 0xafd1, 0xe3d7, 0x001a, 0x001a, 0x001a, 0xc6e0, 0x001a, 0xa2d6, 0x001a, 0xf0ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3d7, 0x001a, 0x001a, 0x001a, 0xd4fc, 0x001a, 0xd7da, 0xdfcc, 0x001a, 0xd4f2, 0x001a, 0xb0d1, 0x001a, 0xe0cc, 0x001a, 0xfddb, 0xbff3, 0x001a, 0xd1f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbfc, 0x001a, 0xb0e2, 0x001a, 0x001a, 0xa5e6, 0x001a, 0x001a, 0x001a, 0xdbe2, 0x001a, 0x001a, 0x001a, 0xdedf, 0x001a, 0xc7e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeff2, 0x001a, 0x001a, 0x001a, 0xe1cc, 0x001a, 0x001a, 0x001a, 0x001a, 0xead6, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e7, 0x001a, 0x001a, 0x001a, 0xb6ce, 0x001a, 0xc0f3, 0x001a, 0xfecd, 0x001a, 0x001a, 0x001a, 0xd2fb, 0x001a, 0xf8f8, 0xfbf7, 0x001a, 0x001a, 0xbfe8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbadc, 0x001a, 0x001a, 0xb4cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7f1, 0x001a, 0x001a, 0x001a, 0xb8e8, 0x001a, 0x001a, 0xf6ca, 0x001a, 0xa4e4, 0xd6f4, 0x001a, 0x001a, 0x001a, 0xe6df, 0x001a, 0x001a, 0x001a, 0xa7df, 0x001a, 0xe7df, 0xc1e1, 0x001a, 0xc4e9, 0x001a, 0x001a, 0xcbdc, 0xc5e9, 0x001a, 0x001a, 0x001a, 0xa3ef, 0xa6eb, 0xa3cb, 0xe9e3, 0x001a, 0x001a, 0x001a, 0xfbd1, 0xa4ef, 0x001a, 0xebef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3cd, 0x001a, 0x001a, 0xe6e8, 0x001a, 0xa5ef, 0x001a, 0xccd3, 0xedda, 0x001a, 0x001a, 0x001a, 0x001a, 0xbad7, 0x001a, 0xd5f2, 0xe5f5, 0xefd9, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4f9, 0x001a, 0x001a, 0xd4d5, 0xcffd, 0x001a, 0x001a, 0x001a, 0xe3db, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1f1, 0xb6ec, 0x001a, 0x001a, 0x001a, 0x001a, 0xfefb, 0xd7d3, 0x001a, 0xb1d1, 0x001a, 0xb1cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2cb, 0xc2f1, 0x001a, 0x001a, 0xe1f4, 0xb5f9, 0x001a, 0x001a, 0xc3e1, 0xc2e1, 0x001a, 0xf7eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcacb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdef8, 0xaaf9, 0xf7ca, 0x001a, 0xb7ed, 0x001a, 0x001a, 0xb8d3, 0xd6f2, 0x001a, 0x001a, 0xd9d4, 0xc5ee, 0xf0f2, 0x001a, 0x001a, 0x001a, 0xb2ca, 0x001a, 0x001a, 0xbbdc, 0x001a, 0xf8f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7ec, 0x001a, 0x001a, 0x001a, 0x001a, 0xcae5, 0x001a, 0xc0f6, 0xddfd, 0x001a, 0x001a, 0xe3d4, 0xe2cc, 0x001a, 0xd4f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3d3, 0x001a, 0xa6d8, 0x001a, 0xc1f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6dd, 0x001a, 0xc0cd, 0x001a, 0x001a, 0x001a, 0xdce5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0e8, 0xb0f4, 0xeaf3, 0xeeda, 0x001a, 0xbbd7, 0x001a, 0xb1e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfe4, 0x001a, 0xd6ca, 0x001a, 0x001a, 0x001a, 0xa8eb, 0x001a, 0x001a, 0x001a, 0xfedb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2f6, 0x001a, 0x001a, 0xbbef, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdd4, 0x001a, 0x001a, 0xc8e0, 0x001a, 0x001a, 0x001a, 0xb9e8, 0x001a, 0xa6ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4cd, 0x001a, 0x001a, 0xf4d4, 0xa1db, 0xdcdb, 0xdddb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcee, 0x001a, 0xcbcb, 0xd5fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebce, 0x001a, 0xc1cd, 0x001a, 0x001a, 0xd3fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4f5, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9d9, 0x001a, 0x001a, 0xdde9, 0xcddb, 0x001a, 0x001a, 0xcedd, 0x001a, 0xc3e7, 0x001a, 0xccec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf9, 0x001a, 0x001a, 0x001a, 0xcccb, 0x001a, 0x001a, 0x001a, 0x001a, 0xfce0, 0xa8d4, 0x001a, 0xd3ed, 0xefd8, 0x001a, 0xd7f2, 0x001a, 0xf8ca, 0xefda, 0x001a, 0x001a, 0xd4d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdd9, 0x001a, 0x001a, 0x001a, 0xeed8, 0x001a, 0xc1f2, 0x001a, 0x001a, 0x001a, 0xd3df, 0x001a, 0x001a, 0x001a, 0xf0da, 0x001a, 0xeae2, 0x001a, 0x001a, 0xfde0, 0x001a, 0x001a, 0xf8d8, 0x001a, 0x001a, 0x001a, 0xaff7, 0xb6da, 0x001a, 0xd7ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8f2, 0x001a, 0xf9d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdffa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefcf, 0xc2d9, 0x001a, 0xd2f0, 0x001a, 0xd1e4, 0x001a, 0x001a, 0x001a, 0xb7f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2e2, 0x001a, 0xbdd4, 0x001a, 0x001a, 0xced9, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9d4, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2cd, 0xdae7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbed8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaddc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe2, 0xfcd6, 0x001a, 0x001a, 0xf9ca, 0x001a, 0x001a, 0xdad4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7f4, 0xa1cc, 0x001a, 0x001a, 0xbacf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8f5, 0x001a, 0x001a, 0x001a, 0xc3d9, 0xe8d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5e3, 0xf8eb, 0x001a, 0xb1f2, 0x001a, 0x001a, 0x001a, 0xbbcf, 0x001a, 0x001a, 0x001a, 0xadd3, 0xe1e8, 0xecce, 0x001a, 0x001a, 0x001a, 0xb4e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2f2, 0xf6f3, 0xdbf6, 0x001a, 0x001a, 0x001a, 0x001a, 0xfed7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdff8, 0x001a, 0xf2f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdae6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcd7, 0xe3cc, 0x001a, 0x001a, 0xdbe6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdddd, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedef, 0x001a, 0x001a, 0x001a, 0x001a, 0xded6, 0xf4e4, 0xefe1, 0x001a, 0x001a, 0xf8dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5ca, 0x001a, 0x001a, 0x001a, 0xa1dc, 0x001a, 0xb5e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacfc, 0xadfc, 0xa7d8, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8ed, 0x001a, 0x001a, 0x001a, 0xb6db, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0d6, 0xaff3, 0x001a, 0x001a, 0xa5cd, 0x001a, 0xf1da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8d8, 0x001a, 0x001a, 0x001a, 0xe4cc, 0x001a, 0x001a, 0xb4d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecd5, 0xf8d5, 0xf3da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6e3, 0x001a, 0x001a, 0x001a, 0xe4de, 0x001a, 0xe5de, 0xb5d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6d1, 0xb7d1, 0xb3f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3f0, 0xb4f2, 0x001a, 0x001a, 0xd4f0, 0xe4cb, 0xd4fb, 0xe6f5, 0xeae3, 0x001a, 0xe6de, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4df, 0x001a, 0x001a, 0xf9f8, 0x001a, 0x001a, 0x001a, 0x001a, 0xaef0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8d1, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfd6, 0x001a, 0xd7d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1fc, 0xeeef, 0xd8dc, 0x001a, 0xdfe9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde5, 0xfbfd, 0x001a, 0x001a, 0xc9e0, 0x001a, 0x001a, 0x001a, 0xc9d6, 0x001a, 0x001a, 0xaad4, 0x001a, 0xcce5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0e9, 0x001a, 0x001a, 0x001a, 0xd8d0, 0xa2fc, 0xbed4, 0xb3e2, 0xe7de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcdc, 0xb6d2, 0xd5f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1ce, 0xa9f5, 0x001a, 0x001a, 0xf9dd, 0x001a, 0x001a, 0xfadd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5f0, 0x001a, 0x001a, 0x001a, 0x001a, 0xdff6, 0x001a, 0xdaf2, 0xebe4, 0x001a, 0xf1f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9ec, 0x001a, 0x001a, 0x001a, 0x001a, 0xfcfd, 0x001a, 0x001a, 0x001a, 0x001a, 0xaae1, 0x001a, 0x001a, 0xd9ca, 0x001a, 0x001a, 0xefef, 0x001a, 0xaaf5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9ec, 0x001a, 0x001a, 0xadf8, 0x001a, 0xc2f2, 0xc3f6, 0x001a, 0xd2d7, 0x001a, 0x001a, 0xa2f9, 0xd6f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaf0, 0x001a, 0x001a, 0xe0f6, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3e9, 0xc3f2, 0x001a, 0x001a, 0x001a, 0xabd4, 0xb3ca, 0xa6cd, 0x001a, 0xc3cd, 0xdacd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfd9, 0x001a, 0x001a, 0xc4f6, 0x001a, 0x001a, 0x001a, 0xddee, 0xc4e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2df, 0xdbe7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1e8, 0x001a, 0xaefc, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde5, 0x001a, 0x001a, 0x001a, 0xebfa, 0x001a, 0xbccf, 0x001a, 0x001a, 0xe2cf, 0xf6cd, 0x001a, 0x001a, 0xf0ef, 0x001a, 0xbef4, 0x001a, 0xcdd4, 0x001a, 0x001a, 0xb8f3, 0x001a, 0x001a, 0x001a, 0xa1e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2f2, 0xebf3, 0x001a, 0xd7f0, 0x001a, 0x001a, 0xd7cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfcf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0e8, 0xc1e8, 0x001a, 0x001a, 0x001a, 0xe3cf, 0xa2e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1f3, 0xabd0, 0x001a, 0xe4d4, 0x001a, 0x001a, 0xbcef, 0xa1d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfd9, 0x001a, 0xd7f3, 0x001a, 0x001a, 0x001a, 0xbddc, 0x001a, 0xe5cc, 0xf1ed, 0x001a, 0x001a, 0xe2f1, 0x001a, 0xdbd4, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5e2, 0x001a, 0x001a, 0xe6ca, 0x001a, 0xaed3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6cc, 0x001a, 0x001a, 0xd3f1, 0xe7f5, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeefb, 0x001a, 0xc5e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9df, 0x001a, 0xdeee, 0x001a, 0x001a, 0xc2f7, 0x001a, 0xa2d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacdd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaff0, 0xbdd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6f9, 0x001a, 0x001a, 0xf5d4, 0x001a, 0xc9d0, 0xa7ef, 0xece2, 0x001a, 0xeadb, 0xccce, 0xe8f5, 0xd5f7, 0x001a, 0xcdd3, 0x001a, 0xfef3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfee0, 0x001a, 0xfbdf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdcb, 0x001a, 0x001a, 0x001a, 0xa8ef, 0x001a, 0x001a, 0x001a, 0xb4ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8da, 0xb9d1, 0x001a, 0xa9df, 0x001a, 0x001a, 0xb0f3, 0x001a, 0x001a, 0xc4cc, 0x001a, 0x001a, 0x001a, 0xb7ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9ef, 0x001a, 0x001a, 0x001a, 0xd5df, 0x001a, 0x001a, 0xd7ed, 0x001a, 0x001a, 0x001a, 0xc6ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdef, 0xd6fc, 0x001a, 0x001a, 0xf4db, 0x001a, 0xaaef, 0xb9f8, 0x001a, 0xe9f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6e1, 0x001a, 0x001a, 0x001a, 0xbfd4, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeaf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafd3, 0x001a, 0x001a, 0xdbca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7fc, 0x001a, 0x001a, 0xd8ed, 0xc7e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8f4, 0xb3d6, 0xaddd, 0x001a, 0x001a, 0x001a, 0xbed5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3f1, 0xdfee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebd6, 0x001a, 0x001a, 0x001a, 0xd9f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbdd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfdd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3d8, 0x001a, 0x001a, 0xd9da, 0x001a, 0xd8f0, 0xc4ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4f1, 0x001a, 0xf2ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbd5, 0x001a, 0x001a, 0xdcd5, 0xc4f3, 0xd7cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0dd, 0xd9f0, 0xb3cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7cd, 0x001a, 0x001a, 0xacd0, 0x001a, 0xbad1, 0x001a, 0xc4f1, 0x001a, 0xb3e5, 0xf5fb, 0xe1e9, 0xe0fd, 0xbcfc, 0x001a, 0xa2da, 0xa3da, 0x001a, 0xa1d2, 0x001a, 0x001a, 0xefd2, 0x001a, 0x001a, 0x001a, 0xede2, 0x001a, 0x001a, 0xe9de, 0xdcce, 0xb5f2, 0xe4d0, 0xd1dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8e1, 0xb7db, 0xe3df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9ed, 0xc5f1, 0x001a, 0xcff3, 0xabd7, 0xace1, 0x001a, 0x001a, 0xebe3, 0x001a, 0xc7ee, 0x001a, 0x001a, 0x001a, 0xc9e1, 0xfaca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbf0, 0xe1fa, 0xdaf0, 0xe7cc, 0xf4da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedce, 0x001a, 0x001a, 0xa9d5, 0xe2fa, 0x001a, 0x001a, 0x001a, 0xe5d0, 0x001a, 0xd6eb, 0x001a, 0xdfec, 0x001a, 0x001a, 0x001a, 0xfcdf, 0x001a, 0x001a, 0xd6f7, 0xeade, 0xb4cb, 0x001a, 0x001a, 0xbeef, 0x001a, 0x001a, 0xb5cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdcf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2ef, 0xb7e2, 0x001a, 0x001a, 0x001a, 0xe8cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfcf0, 0x001a, 0x001a, 0x001a, 0xe0d6, 0x001a, 0xc6f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8e2, 0xabeb, 0x001a, 0x001a, 0x001a, 0xb5cb, 0xd1d8, 0x001a, 0xcef4, 0xf7f3, 0x001a, 0x001a, 0xc6d7, 0x001a, 0xbbd1, 0xaaf7, 0x001a, 0xcaed, 0xd3d7, 0xfad8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5f6, 0x001a, 0x001a, 0xccd1, 0xfcdd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfddf, 0x001a, 0xe5f9, 0x001a, 0xcae0, 0x001a, 0x001a, 0xfdf2, 0xb0d3, 0x001a, 0xf3f4, 0xc9da, 0x001a, 0xdee6, 0x001a, 0x001a, 0x001a, 0x001a, 0xbaf8, 0xd0e8, 0x001a, 0x001a, 0xfbd8, 0x001a, 0x001a, 0xd5ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbf2, 0xfce4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdada, 0x001a, 0xdcf2, 0xd6fb, 0xb2e9, 0x001a, 0xadee, 0x001a, 0xe3fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeedc, 0x001a, 0x001a, 0xeaf5, 0xe0e6, 0x001a, 0xfdf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5f5, 0xe0ee, 0x001a, 0x001a, 0xe5db, 0x001a, 0xdedd, 0x001a, 0x001a, 0xf0d9, 0xa3e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9f1, 0x001a, 0xc4f2, 0xcbe0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e9, 0x001a, 0x001a, 0xb9e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1e3, 0xebfc, 0xa8cd, 0x001a, 0xb6cc, 0x001a, 0x001a, 0xdbf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbae6, 0x001a, 0x001a, 0xa9cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e1, 0x001a, 0x001a, 0xabef, 0x001a, 0x001a, 0x001a, 0xc5e7, 0x001a, 0x001a, 0xe9e0, 0x001a, 0xc5f3, 0x001a, 0x001a, 0xc0d4, 0xbfd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaedd, 0x001a, 0xfcf9, 0x001a, 0xc0cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2e5, 0x001a, 0x001a, 0x001a, 0xb8ce, 0x001a, 0x001a, 0x001a, 0xd2d8, 0xd6f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaf1, 0xd1ce, 0x001a, 0x001a, 0xc7f6, 0x001a, 0xebdb, 0x001a, 0xfedf, 0x001a, 0x001a, 0xe1d8, 0x001a, 0xf3f7, 0x001a, 0xe7d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfed4, 0x001a, 0x001a, 0xbcd1, 0x001a, 0xcfe5, 0x001a, 0xb6cb, 0x001a, 0xb8da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbed6, 0x001a, 0x001a, 0x001a, 0xbae2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8cf, 0x001a, 0x001a, 0x001a, 0xcce0, 0xf9eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdfd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8d7, 0xd8cb, 0x001a, 0x001a, 0x001a, 0xe2e9, 0x001a, 0x001a, 0x001a, 0xbae8, 0x001a, 0x001a, 0x001a, 0xc7e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdec, 0x001a, 0xceec, 0x001a, 0xbfd6, 0x001a, 0x001a, 0x001a, 0xa7e3, 0x001a, 0xd6df, 0xe8fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1ee, 0xa8f6, 0xfddd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbf8, 0x001a, 0xd1e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeece, 0x001a, 0x001a, 0xcfec, 0x001a, 0x001a, 0x001a, 0xa5e9, 0xd5d6, 0x001a, 0xc5cd, 0x001a, 0xbaed, 0xbdd1, 0x001a, 0x001a, 0xbecf, 0x001a, 0x001a, 0xbbec, 0x001a, 0x001a, 0x001a, 0xb1d2, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9cc, 0x001a, 0xc4d9, 0xfce9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbed1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcec, 0x001a, 0x001a, 0xade5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0f7, 0x001a, 0xeacc, 0x001a, 0x001a, 0x001a, 0xc4d3, 0x001a, 0x001a, 0xc0d6, 0x001a, 0x001a, 0x001a, 0xfdd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1e1, 0x001a, 0xbdde, 0x001a, 0xa9f6, 0x001a, 0x001a, 0x001a, 0xa4da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4d6, 0xc6f5, 0x001a, 0xa2e1, 0xc6e9, 0x001a, 0x001a, 0x001a, 0xc5f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9f4, 0xecd6, 0xd3eb, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdec, 0xdce2, 0xebde, 0xdcf0, 0x001a, 0xbfeb, 0x001a, 0xced7, 0xbfd1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabf5, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdf9, 0x001a, 0xdcca, 0x001a, 0x001a, 0x001a, 0xc6cd, 0xb6f2, 0x001a, 0x001a, 0xfedd, 0x001a, 0x001a, 0x001a, 0xb7cc, 0xb8db, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9d0, 0x001a, 0xddce, 0xc0eb, 0x001a, 0xa2fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6ea, 0xb0f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcedb, 0x001a, 0xc3f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfdb, 0xa4cb, 0x001a, 0x001a, 0xe0f8, 0x001a, 0x001a, 0xd7fb, 0x001a, 0x001a, 0xcaeb, 0xa1e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdce, 0x001a, 0x001a, 0xdcd4, 0x001a, 0x001a, 0x001a, 0xd8fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6d2, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7f2, 0x001a, 0x001a, 0xf6fa, 0xaaf6, 0xf7fa, 0xe6d8, 0x001a, 0xb1f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2e8, 0x001a, 0xc5ca, 0xebcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeee2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbe2, 0x001a, 0xadf7, 0x001a, 0x001a, 0x001a, 0xe1f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf3, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfde4, 0x001a, 0x001a, 0xece3, 0x001a, 0xafdd, 0xb0dd, 0x001a, 0x001a, 0xb7cb, 0xd3e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e1, 0xe0d2, 0x001a, 0x001a, 0x001a, 0x001a, 0xfef0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6e9, 0xf2cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3ed, 0xd9dc, 0xcde0, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaf7, 0xb9db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaecc, 0x001a, 0xdbda, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1dd, 0x001a, 0xafd8, 0xa3e3, 0x001a, 0x001a, 0xefce, 0x001a, 0x001a, 0xf3f2, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcee0, 0x001a, 0xfdf5, 0x001a, 0x001a, 0x001a, 0x001a, 0xeceb, 0x001a, 0x001a, 0xc5d3, 0xecfc, 0xdbd2, 0xebd4, 0x001a, 0xa2de, 0x001a, 0x001a, 0x001a, 0xe6e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4ed, 0x001a, 0x001a, 0x001a, 0xede3, 0x001a, 0xc2e8, 0x001a, 0xf5ed, 0xfcd7, 0x001a, 0xbbed, 0x001a, 0x001a, 0xabf6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8f2, 0xc8f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6d3, 0xddf2, 0xbfcf, 0x001a, 0xaceb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0cf, 0x001a, 0xa8e6, 0xe9fd, 0x001a, 0xc1cf, 0x001a, 0xdfe0, 0xecde, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbff4, 0xefe2, 0x001a, 0xf1d9, 0xc7f1, 0x001a, 0xb8cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfef9, 0xbadb, 0xf5da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf6, 0xdcda, 0xe4fa, 0x001a, 0xcfe0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9e6, 0x001a, 0xf3ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedf3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaeb, 0x001a, 0xe6f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddca, 0xded5, 0x001a, 0xdeca, 0xe4df, 0x001a, 0x001a, 0x001a, 0xfde6, 0x001a, 0xacf5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3e9, 0x001a, 0xcbed, 0xe4cf, 0x001a, 0x001a, 0x001a, 0xd3d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3dd, 0xecd4, 0x001a, 0x001a, 0xb9f2, 0x001a, 0xb7df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcecb, 0xd8fb, 0x001a, 0x001a, 0xd9d0, 0x001a, 0x001a, 0xd2dd, 0xf4f7, 0xdce7, 0xa5e4, 0x001a, 0xa3fc, 0x001a, 0xbbdb, 0x001a, 0x001a, 0x001a, 0xbaf2, 0xfde9, 0xcad0, 0x001a, 0xd6f5, 0xc5d9, 0xb4e4, 0x001a, 0xa7ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdea, 0xfee6, 0x001a, 0xc4f7, 0xadf5, 0x001a, 0xe0d9, 0x001a, 0x001a, 0x001a, 0xb4ca, 0x001a, 0x001a, 0xe2f8, 0xc2cf, 0x001a, 0xbeec, 0x001a, 0x001a, 0x001a, 0xb4e5, 0xc8cd, 0xc8ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9cd, 0xb7f9, 0x001a, 0x001a, 0xe8f1, 0xf2d9, 0xf5db, 0xb5ca, 0xc6d9, 0x001a, 0x001a, 0x001a, 0xc9d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabd9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbced, 0x001a, 0x001a, 0xd4d8, 0x001a, 0x001a, 0x001a, 0xdadc, 0x001a, 0xbce2, 0x001a, 0x001a, 0xedfc, 0xe0ec, 0xfed2, 0x001a, 0xc7e9, 0xaae6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbfa, 0x001a, 0xaef5, 0xaafb, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbec, 0x001a, 0xbfec, 0xd8fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5d4, 0x001a, 0x001a, 0x001a, 0xc3f9, 0x001a, 0x001a, 0x001a, 0xe2ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9d7, 0xf6ed, 0x001a, 0x001a, 0x001a, 0xedde, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeccc, 0x001a, 0xeee3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e8, 0x001a, 0x001a, 0x001a, 0xf8fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4dd, 0xb5e4, 0xb0d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5d8, 0x001a, 0x001a, 0x001a, 0xeaf4, 0x001a, 0x001a, 0x001a, 0xb9ce, 0x001a, 0x001a, 0x001a, 0xe1d6, 0xd2cf, 0x001a, 0xb6d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2ce, 0x001a, 0x001a, 0xeef3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccdc, 0x001a, 0xcbd0, 0x001a, 0x001a, 0x001a, 0xa4fc, 0xcacd, 0xd4d7, 0xa3de, 0x001a, 0xe0e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9ee, 0x001a, 0x001a, 0x001a, 0xdde2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfef5, 0xacd4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1d5, 0x001a, 0xf0d8, 0xc3f8, 0xd7ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7f5, 0x001a, 0x001a, 0xbfd8, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadeb, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaee, 0x001a, 0x001a, 0x001a, 0xe7ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3f8, 0x001a, 0xddd4, 0x001a, 0x001a, 0xd8ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9fb, 0xf7ed, 0x001a, 0x001a, 0xb5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadd0, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbde2, 0x001a, 0x001a, 0x001a, 0xc8e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5d9, 0x001a, 0x001a, 0xaadf, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcdb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaf1, 0x001a, 0x001a, 0xb6e5, 0xeff3, 0x001a, 0x001a, 0xdafb, 0xe0e1, 0x001a, 0xacd9, 0x001a, 0xebf5, 0x001a, 0xb6e0, 0x001a, 0x001a, 0xc8e9, 0x001a, 0xcfcb, 0x001a, 0xc9e3, 0x001a, 0x001a, 0x001a, 0xeede, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefdc, 0x001a, 0xa5d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfed6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1d9, 0x001a, 0xc0d8, 0xdbdc, 0x001a, 0x001a, 0xbded, 0xb8df, 0x001a, 0xa5ea, 0x001a, 0x001a, 0x001a, 0xadd7, 0x001a, 0x001a, 0xf9f3, 0x001a, 0xf8ed, 0x001a, 0xc7f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcae1, 0xe3eb, 0x001a, 0xdef2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccf8, 0x001a, 0xd9ea, 0x001a, 0xc6d3, 0x001a, 0xe6db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaff5, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xfee9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2cf, 0xb9f7, 0xf3d9, 0x001a, 0x001a, 0xcbe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddda, 0x001a, 0x001a, 0xb9da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbeb, 0x001a, 0xb9cb, 0x001a, 0x001a, 0xf9ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0f4, 0x001a, 0xbcfd, 0xb1df, 0xefe3, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e0, 0xb9fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbcd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbeed, 0x001a, 0x001a, 0x001a, 0xc0d5, 0xf0e3, 0xfaed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedd5, 0xdde7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6d4, 0xb7e5, 0x001a, 0x001a, 0x001a, 0xe7db, 0xbfe2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbee, 0x001a, 0x001a, 0xf4d7, 0xddf0, 0x001a, 0x001a, 0x001a, 0xabce, 0x001a, 0x001a, 0xdee7, 0x001a, 0x001a, 0x001a, 0xd6d6, 0xcce1, 0x001a, 0x001a, 0xb3e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeee5, 0xa2dc, 0x001a, 0x001a, 0xd0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbfb, 0x001a, 0xcbf9, 0x001a, 0x001a, 0x001a, 0xf3cb, 0xa5f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8fa, 0xd7d6, 0x001a, 0xe5e9, 0xdcfb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5da, 0x001a, 0xbddb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7cd, 0xdef0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefde, 0x001a, 0x001a, 0x001a, 0xb1d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeefc, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3e8, 0x001a, 0xc8f1, 0x001a, 0x001a, 0x001a, 0xf1ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xedf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e4, 0x001a, 0xb9f5, 0x001a, 0xf0dc, 0xf1e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbf2, 0x001a, 0xa4de, 0x001a, 0xccda, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdae3, 0x001a, 0xd9fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4f9, 0x001a, 0xa4e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddfb, 0x001a, 0xcaef, 0x001a, 0xc4e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadd9, 0x001a, 0x001a, 0xabfb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdef6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e0, 0x001a, 0x001a, 0xa8e9, 0x001a, 0x001a, 0xf9f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaffa, 0x001a, 0xfceb, 0x001a, 0x001a, 0xeae0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5d5, 0x001a, 0x001a, 0xe3f1, 0xeed5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcccd, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1d8, 0x001a, 0x001a, 0x001a, 0x001a, 0xecfa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebf1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcfa, 0xe2e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5fa, 0xfae2, 0x001a, 0x001a, 0x001a, 0xb6ca, 0x001a, 0xb7e4, 0x001a, 0xdbea, 0x001a, 0xfaf5, 0x001a, 0x001a, 0x001a, 0xacfb, 0xc3cf, 0xfdeb, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaf8, 0x001a, 0x001a, 0xb9df, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e1, 0x001a, 0xa4d2, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbf5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdad0, 0xdbd0, 0x001a, 0xbeea, 0xb1d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7ca, 0x001a, 0x001a, 0xe7d3, 0x001a, 0xe5f8, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2d3, 0x001a, 0x001a, 0x001a, 0xc0e2, 0xdff2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdcd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaeee, 0xaed6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xead7, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0e7, 0xaeeb, 0x001a, 0x001a, 0x001a, 0xd9cf, 0x001a, 0x001a, 0xcddc, 0xfbed, 0x001a, 0xf0de, 0x001a, 0xebd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7df, 0xd0db, 0xd1db, 0x001a, 0x001a, 0xa3d5, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8ca, 0x001a, 0xe6f8, 0xcedc, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcea, 0xd2db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbf7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8e3, 0x001a, 0xaed7, 0x001a, 0x001a, 0xe1e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbacb, 0x001a, 0x001a, 0xd1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcd0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcad8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e0, 0x001a, 0xa9e9, 0x001a, 0xc7d3, 0x001a, 0x001a, 0xdddc, 0xaef8, 0x001a, 0x001a, 0x001a, 0xb8cc, 0x001a, 0x001a, 0x001a, 0xaed0, 0x001a, 0x001a, 0x001a, 0xf2d8, 0x001a, 0x001a, 0xcae3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadd4, 0xd1f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccd0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6ca, 0x001a, 0x001a, 0xc2d5, 0x001a, 0x001a, 0xbace, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8df, 0x001a, 0x001a, 0x001a, 0xbaf5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe5, 0x001a, 0xf4ef, 0xb5dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xaacd, 0x001a, 0xf2e3, 0x001a, 0xf7fb, 0x001a, 0xd0f7, 0x001a, 0x001a, 0x001a, 0x001a, 0xbafd, 0x001a, 0x001a, 0xe1fd, 0xfef6, 0xc0d1, 0x001a, 0x001a, 0xc5e8, 0x001a, 0xb8e4, 0x001a, 0xe8e1, 0x001a, 0x001a, 0x001a, 0xc1cc, 0x001a, 0xedd2, 0x001a, 0x001a, 0x001a, 0x001a, 0xbedb, 0x001a, 0x001a, 0xe2e0, 0x001a, 0x001a, 0x001a, 0xc9fa, 0x001a, 0x001a, 0xcde1, 0x001a, 0xb8ca, 0x001a, 0x001a, 0x001a, 0xe0f2, 0xc9f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1de, 0x001a, 0x001a, 0x001a, 0xdff0, 0xc4f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccee, 0x001a, 0x001a, 0xf2de, 0x001a, 0xc9e7, 0x001a, 0xf3e2, 0xe1e7, 0x001a, 0x001a, 0xcbe3, 0x001a, 0x001a, 0xcce3, 0x001a, 0x001a, 0x001a, 0xf8cf, 0xacef, 0x001a, 0xfefd, 0xa5fc, 0xb1fa, 0xd9df, 0x001a, 0xd2e0, 0x001a, 0x001a, 0x001a, 0xdaf4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaf1, 0x001a, 0xa3ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcf2, 0xe3ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5e0, 0x001a, 0xabf7, 0x001a, 0x001a, 0xafeb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee5, 0x001a, 0xa4e1, 0xabcd, 0x001a, 0xf4d9, 0xa6e8, 0xcecd, 0xe9e1, 0x001a, 0xeffc, 0x001a, 0xe3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e2, 0x001a, 0xa4ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6de, 0x001a, 0x001a, 0xfeeb, 0x001a, 0xddeb, 0xe0f0, 0x001a, 0x001a, 0xdbf4, 0x001a, 0xf4e2, 0x001a, 0x001a, 0xc8d3, 0x001a, 0x001a, 0x001a, 0xebf4, 0x001a, 0xb5ee, 0x001a, 0xd8f5, 0x001a, 0x001a, 0xdfd5, 0x001a, 0x001a, 0x001a, 0xe5d6, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0eb, 0xe3f4, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde3, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4f4, 0xb2fa, 0x001a, 0x001a, 0xf5ef, 0xdfca, 0x001a, 0xb1eb, 0xbfed, 0x001a, 0x001a, 0xc9fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6e4, 0xa4f9, 0xb3f0, 0x001a, 0xece5, 0x001a, 0x001a, 0x001a, 0xe7d1, 0x001a, 0xc7d9, 0xd7e4, 0xddea, 0x001a, 0xf7d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbada, 0x001a, 0xcdda, 0x001a, 0x001a, 0x001a, 0xccf9, 0x001a, 0xdae1, 0xbfdb, 0x001a, 0xc5cc, 0xd0ec, 0xbbcb, 0x001a, 0xf3de, 0x001a, 0x001a, 0xaae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8d9, 0x001a, 0x001a, 0xe3ee, 0xbdd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdd0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbf1, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2fd, 0xc1d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbe3, 0x001a, 0xc9d3, 0x001a, 0xcfdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7de, 0x001a, 0x001a, 0xbbe6, 0xa1ec, 0x001a, 0x001a, 0x001a, 0xb9cc, 0x001a, 0x001a, 0xdefb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2e7, 0x001a, 0x001a, 0xc1d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e2, 0x001a, 0xd8f3, 0xd3e5, 0x001a, 0x001a, 0xd9f3, 0x001a, 0x001a, 0x001a, 0xc6f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbcd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaccd, 0x001a, 0xc3fc, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7d4, 0x001a, 0xc2d1, 0x001a, 0xa5f9, 0x001a, 0xd5e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcee3, 0x001a, 0x001a, 0x001a, 0x001a, 0xcad4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdadf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdffb, 0xe3e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbf8, 0xcfe3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7d8, 0x001a, 0xc9d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaff8, 0xf6ef, 0x001a, 0xb6dd, 0xafee, 0xf8cd, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8de, 0xa7fc, 0xfcf7, 0xb1f7, 0xbbce, 0xa1f4, 0x001a, 0x001a, 0xcdee, 0xaee1, 0x001a, 0x001a, 0xc3ec, 0xfecf, 0x001a, 0xbff8, 0xe2d8, 0xe8d3, 0x001a, 0x001a, 0xa8de, 0xe4f4, 0xc2ec, 0x001a, 0xf5d9, 0xc5f9, 0xd3dd, 0xf1d6, 0xfcec, 0xf0fc, 0x001a, 0x001a, 0xc0ed, 0xb9ca, 0x001a, 0xe4ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1f2, 0x001a, 0xb9de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2d6, 0x001a, 0xf4de, 0x001a, 0xdbdf, 0x001a, 0xd3db, 0x001a, 0xe7fa, 0xe3d8, 0xc1f4, 0x001a, 0xb7dd, 0x001a, 0x001a, 0x001a, 0xf5f2, 0x001a, 0x001a, 0xaed4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8dd, 0xc5cf, 0xdfdf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbef2, 0xa1f6, 0x001a, 0xcbeb, 0xfcf1, 0x001a, 0xc7f3, 0x001a, 0x001a, 0xebe0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfced, 0x001a, 0x001a, 0xdbe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5ee, 0x001a, 0xf5de, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3fa, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbf1, 0x001a, 0x001a, 0xafd0, 0xb9dd, 0x001a, 0x001a, 0xc3d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1f5, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacf6, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbadd, 0x001a, 0x001a, 0x001a, 0xbff2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5f7, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2db, 0xf6f2, 0x001a, 0x001a, 0xbaca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5f7, 0x001a, 0xe5cb, 0x001a, 0x001a, 0x001a, 0xe6ee, 0x001a, 0xd3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8d6, 0x001a, 0x001a, 0x001a, 0xafd4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xced3, 0xc2f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2eb, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3eb, 0x001a, 0xb4f0, 0x001a, 0x001a, 0xf4cb, 0xb0d4, 0xb2f3, 0xb7fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7ee, 0xb2f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedf5, 0x001a, 0xf3cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xceee, 0x001a, 0x001a, 0xccf1, 0x001a, 0x001a, 0xb8e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5d7, 0xf3e3, 0xe5cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3f3, 0xd8e4, 0xf9cf, 0xdacf, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdfa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeef5, 0x001a, 0x001a, 0xbbca, 0x001a, 0x001a, 0xdce3, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2ce, 0x001a, 0xd9d6, 0x001a, 0x001a, 0x001a, 0xb0ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5f4, 0xc2d8, 0xd0dc, 0xeecc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0d5, 0xcaf6, 0xcafd, 0xd6d8, 0xcff4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6d6, 0xbedc, 0x001a, 0xd4db, 0xc7d7, 0x001a, 0x001a, 0x001a, 0x001a, 0xfef2, 0x001a, 0x001a, 0x001a, 0xcdf1, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3e2, 0xdedc, 0x001a, 0xdfdc, 0x001a, 0x001a, 0xadef, 0xabe6, 0x001a, 0x001a, 0x001a, 0x001a, 0xddf9, 0xbfea, 0x001a, 0x001a, 0x001a, 0xaeef, 0x001a, 0x001a, 0x001a, 0xd0f4, 0xf3ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xace6, 0x001a, 0xdece, 0x001a, 0x001a, 0xf9d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e3, 0xd0cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8d5, 0x001a, 0x001a, 0xfdf7, 0x001a, 0xa9dc, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6de, 0x001a, 0xaadc, 0xe3f2, 0xb4e9, 0xdcd2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6e9, 0x001a, 0x001a, 0xf6e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcae7, 0x001a, 0x001a, 0xced0, 0x001a, 0x001a, 0xf7da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcca, 0x001a, 0x001a, 0x001a, 0xe8ee, 0xdeda, 0x001a, 0xf7f2, 0x001a, 0x001a, 0xfbe2, 0x001a, 0xa6cc, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbda, 0x001a, 0xe9ee, 0x001a, 0x001a, 0x001a, 0xdaf5, 0x001a, 0x001a, 0xdcf7, 0xeae1, 0xc1ce, 0xb1d4, 0x001a, 0xb1fd, 0xbde6, 0x001a, 0xadfb, 0x001a, 0x001a, 0xe7f8, 0x001a, 0xcee1, 0x001a, 0xe2f7, 0xeff5, 0xc7cf, 0x001a, 0x001a, 0xb2d4, 0xefcc, 0x001a, 0xe8d4, 0x001a, 0xcfee, 0xd7f7, 0x001a, 0x001a, 0xa6e0, 0xc1d6, 0xdce1, 0xe3f0, 0xe4f1, 0xf1dc, 0xa7d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5f4, 0x001a, 0x001a, 0xcef1, 0xe4f2, 0x001a, 0x001a, 0xb0d0, 0x001a, 0x001a, 0xefec, 0x001a, 0x001a, 0x001a, 0xbaf9, 0x001a, 0xb5eb, 0x001a, 0x001a, 0xedd4, 0xc4e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7e9, 0x001a, 0x001a, 0xb4eb, 0xa1ea, 0x001a, 0xbcf8, 0xa6ce, 0x001a, 0xc6f9, 0xdafc, 0x001a, 0xb3d4, 0xb9d3, 0xdeea, 0x001a, 0x001a, 0x001a, 0xabe9, 0x001a, 0x001a, 0xe1e1, 0xcfd3, 0xf6f4, 0x001a, 0xc0ea, 0xcfe1, 0x001a, 0xbacc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeaee, 0x001a, 0x001a, 0x001a, 0xe4f0, 0xb4f3, 0xeed4, 0x001a, 0x001a, 0xc0f2, 0x001a, 0x001a, 0xe5f1, 0x001a, 0xc3f4, 0xd4e0, 0x001a, 0xb6eb, 0x001a, 0xa1d7, 0xe8cb, 0x001a, 0xadf9, 0xade9, 0xe4d8, 0xb3fa, 0xc5e2, 0xbdfc, 0x001a, 0x001a, 0xc4ec, 0xb1d8, 0x001a, 0xabdc, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4d5, 0x001a, 0xe9eb, 0x001a, 0x001a, 0x001a, 0xbbe8, 0x001a, 0x001a, 0x001a, 0xd7d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaefb, 0xe1d1, 0x001a, 0x001a, 0xc0db, 0x001a, 0xbef5, 0x001a, 0xf7de, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbca, 0xc6f7, 0xc8cf, 0x001a, 0x001a, 0x001a, 0xd0e1, 0x001a, 0x001a, 0xd0ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdd5, 0x001a, 0x001a, 0xdbcf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbdd, 0x001a, 0x001a, 0x001a, 0x001a, 0xacce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4d4, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbf5, 0x001a, 0x001a, 0xc1fa, 0x001a, 0x001a, 0x001a, 0xa9de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7ef, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7eb, 0xf8ef, 0xdcf5, 0xcced, 0xd5db, 0xcff1, 0x001a, 0x001a, 0x001a, 0xd0f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaed9, 0xacd5, 0x001a, 0xc6e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3fd, 0x001a, 0xe5fb, 0xabdf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e2, 0x001a, 0xadf6, 0x001a, 0xb3f5, 0x001a, 0xb5f0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddf5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2ec, 0xfded, 0x001a, 0xb4f5, 0xb8fb, 0x001a, 0xa3db, 0x001a, 0x001a, 0xcad6, 0xd9cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaf3, 0x001a, 0xb8eb, 0x001a, 0xb7e0, 0xecd7, 0xecf1, 0xafe5, 0xe1d5, 0xedd7, 0xd1d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2e1, 0xf9ef, 0x001a, 0x001a, 0x001a, 0xbcdd, 0xdcf6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5f0, 0x001a, 0x001a, 0x001a, 0xc4f4, 0x001a, 0x001a, 0xe9e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbf3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefd4, 0x001a, 0x001a, 0xa2cc, 0xfef7, 0xbcdf, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdeb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xade8, 0x001a, 0x001a, 0x001a, 0x001a, 0xafef, 0xa5cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9cb, 0x001a, 0x001a, 0x001a, 0xe8fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6cc, 0x001a, 0x001a, 0x001a, 0xe7e6, 0x001a, 0x001a, 0xc7ea, 0x001a, 0x001a, 0x001a, 0xa4db, 0x001a, 0xc9cf, 0xfce2, 0xfaef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdeeb, 0x001a, 0x001a, 0xc8f5, 0x001a, 0xded4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e0, 0x001a, 0xb0ef, 0x001a, 0x001a, 0xc7e2, 0x001a, 0xafd9, 0x001a, 0x001a, 0x001a, 0xe7f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e7, 0x001a, 0x001a, 0xcacf, 0xd1e1, 0x001a, 0xc8e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbef, 0x001a, 0x001a, 0xf9fa, 0x001a, 0x001a, 0xf2dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeacb, 0x001a, 0x001a, 0x001a, 0xbccb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdef5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdff5, 0x001a, 0xb6ee, 0x001a, 0x001a, 0x001a, 0xf6e2, 0xcad3, 0xfcef, 0xc4d1, 0xb1ef, 0x001a, 0xc5d1, 0x001a, 0xded0, 0x001a, 0xe1d9, 0x001a, 0x001a, 0xb8e0, 0x001a, 0x001a, 0xd1cd, 0xb9f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcce7, 0x001a, 0xa8d6, 0xa7ce, 0x001a, 0xb5d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddf6, 0x001a, 0xa3f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcae9, 0x001a, 0xf0e1, 0x001a, 0x001a, 0x001a, 0xe0f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaffb, 0x001a, 0x001a, 0x001a, 0xd1cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0fb, 0xe5f2, 0x001a, 0x001a, 0xf0ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe9, 0x001a, 0x001a, 0xf0cc, 0x001a, 0x001a, 0xafd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1f4, 0x001a, 0x001a, 0xa1f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfcca, 0xfdca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcece, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8f3, 0x001a, 0xbaf3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfeed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6da, 0x001a, 0x001a, 0xece0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdf8, 0x001a, 0xd2cb, 0x001a, 0x001a, 0x001a, 0xceeb, 0x001a, 0xd8f9, 0xd9f9, 0xe0ca, 0xcada, 0x001a, 0x001a, 0x001a, 0xa6cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ca, 0xeef9, 0xecdb, 0x001a, 0x001a, 0xb1d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xefd5, 0x001a, 0x001a, 0x001a, 0xf3e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2e7, 0xd9e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1e4, 0x001a, 0x001a, 0xc4fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeff9, 0xf4cf, 0xe6f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcce, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5f4, 0xa3dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbddd, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1f8, 0x001a, 0x001a, 0x001a, 0xd6e8, 0x001a, 0x001a, 0x001a, 0xc1db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6f0, 0x001a, 0x001a, 0x001a, 0xb9e4, 0xedf6, 0x001a, 0xaef9, 0x001a, 0xbedd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0d7, 0xe8d8, 0xbdcb, 0x001a, 0x001a, 0xdaf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcef8, 0xf0f9, 0xede0, 0xb3e3, 0xb3f4, 0x001a, 0x001a, 0xc2ea, 0xe6f2, 0xb6f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4eb, 0x001a, 0x001a, 0xe7f2, 0x001a, 0xd5d7, 0xb6d4, 0xe8f9, 0xc1d7, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeae9, 0xccd7, 0x001a, 0x001a, 0x001a, 0xe9d3, 0xc9e2, 0x001a, 0xdbfc, 0xadcd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0cc, 0xa2ea, 0x001a, 0x001a, 0xf6e4, 0xc0d0, 0x001a, 0xb7f0, 0xa1ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6d7, 0x001a, 0x001a, 0x001a, 0xcae2, 0xcbe2, 0x001a, 0xcffa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfeb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbd6, 0x001a, 0x001a, 0x001a, 0xb4f4, 0x001a, 0x001a, 0x001a, 0x001a, 0xcded, 0xd2e4, 0x001a, 0x001a, 0xa9ea, 0xbae4, 0xa2f3, 0xd2cd, 0x001a, 0xcbf6, 0x001a, 0xe6f1, 0xc1ed, 0xbce8, 0xd1ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7f0, 0xcce2, 0x001a, 0x001a, 0xaae4, 0x001a, 0xe1f5, 0xdaed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeed7, 0xf1d1, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe9, 0xece9, 0xe4e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7da, 0xd4dd, 0x001a, 0xa3ea, 0x001a, 0x001a, 0x001a, 0xc3d6, 0xf4d6, 0x001a, 0xdfda, 0x001a, 0xb3ef, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdef, 0xe8f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5ef, 0x001a, 0xe7e7, 0x001a, 0x001a, 0xfdd7, 0x001a, 0x001a, 0xcee7, 0x001a, 0x001a, 0xdcdf, 0x001a, 0xc7f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacdf, 0x001a, 0xdad6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4dc, 0x001a, 0x001a, 0x001a, 0xb8f0, 0x001a, 0x001a, 0x001a, 0x001a, 0xfad5, 0x001a, 0xf7e4, 0x001a, 0x001a, 0x001a, 0xc4d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xfeef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1f0, 0x001a, 0xaade, 0x001a, 0x001a, 0xbcda, 0xfcd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4fa, 0x001a, 0x001a, 0x001a, 0xe5ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8fc, 0x001a, 0x001a, 0xe6ec, 0x001a, 0x001a, 0xcbd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9fb, 0x001a, 0xd3e4, 0x001a, 0xf9cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeaca, 0x001a, 0x001a, 0xd4cf, 0x001a, 0xbdf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7f4, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5eb, 0x001a, 0x001a, 0xd2e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4ea, 0x001a, 0x001a, 0x001a, 0xc2fa, 0xe1fb, 0xedfa, 0xa2f0, 0xf1cc, 0x001a, 0xa3fa, 0xf7e2, 0x001a, 0xcee2, 0x001a, 0xf5e9, 0x001a, 0xebe1, 0x001a, 0x001a, 0x001a, 0xe8e7, 0xd7e8, 0xf8da, 0xcbd4, 0x001a, 0x001a, 0x001a, 0xf6f7, 0xc5d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9d4, 0x001a, 0x001a, 0xfafa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2cc, 0xddf7, 0x001a, 0xbade, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9f0, 0xfee4, 0xc9e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e4, 0x001a, 0x001a, 0x001a, 0xc3ea, 0x001a, 0xb4ef, 0x001a, 0x001a, 0x001a, 0xbed7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2fb, 0x001a, 0xd3cd, 0x001a, 0x001a, 0x001a, 0xb5ef, 0x001a, 0x001a, 0x001a, 0xe9fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbddf, 0x001a, 0xc7f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdf8, 0x001a, 0x001a, 0xfcf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabde, 0xe8db, 0x001a, 0x001a, 0xdde3, 0x001a, 0xe2e1, 0xc6d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0f6, 0xe6eb, 0xf9da, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8de, 0xe9f8, 0xdee3, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3fa, 0xd7e5, 0x001a, 0xc8ec, 0x001a, 0x001a, 0x001a, 0xc9f3, 0x001a, 0x001a, 0xbbe4, 0x001a, 0x001a, 0x001a, 0x001a, 0xaee6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6ef, 0x001a, 0xbfdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3d8, 0x001a, 0x001a, 0x001a, 0xcfd0, 0x001a, 0xfacf, 0xcaf3, 0xd7e0, 0x001a, 0x001a, 0x001a, 0xc7d1, 0xaee9, 0x001a, 0xbde8, 0x001a, 0x001a, 0xc4fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe2, 0x001a, 0x001a, 0xc5fa, 0x001a, 0x001a, 0x001a, 0xb8f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0dc, 0x001a, 0x001a, 0xb0fb, 0x001a, 0x001a, 0x001a, 0xa9d8, 0xdfe5, 0xa7f9, 0x001a, 0x001a, 0xeef6, 0x001a, 0xccf6, 0xf8e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2f1, 0xccd2, 0xcbcf, 0x001a, 0x001a, 0xbdca, 0x001a, 0x001a, 0x001a, 0xbfdd, 0x001a, 0x001a, 0x001a, 0xeff6, 0x001a, 0xf9de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4fa, 0x001a, 0x001a, 0x001a, 0xadd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7f1, 0x001a, 0xbede, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8d1, 0xc9d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbef8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2f5, 0xd3e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9d8, 0x001a, 0x001a, 0xfef8, 0x001a, 0xcccf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6ce, 0x001a, 0xd0fa, 0x001a, 0x001a, 0xf3cc, 0xbee6, 0x001a, 0x001a, 0x001a, 0xaef6, 0x001a, 0x001a, 0xf0d5, 0x001a, 0x001a, 0xcad1, 0x001a, 0x001a, 0x001a, 0xbefc, 0xf1d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0e2, 0xf7f4, 0x001a, 0x001a, 0x001a, 0xd4cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2d7, 0x001a, 0x001a, 0xe3f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xdace, 0xebfb, 0xa6db, 0xdedb, 0xe5d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6ef, 0x001a, 0x001a, 0xeaf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7ce, 0x001a, 0x001a, 0xd8e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedf4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6cd, 0x001a, 0x001a, 0x001a, 0xf4cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3f5, 0x001a, 0x001a, 0xcae4, 0x001a, 0xe1dc, 0x001a, 0x001a, 0xc8f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbffc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbecb, 0x001a, 0xaedc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8f0, 0x001a, 0xc0dd, 0x001a, 0xcdcf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3dc, 0xb0d9, 0x001a, 0xe9e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbce4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xece4, 0x001a, 0xe5e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbde4, 0x001a, 0x001a, 0xdccd, 0xf7d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfdd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xceed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaecd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcecf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaff6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3fd, 0xedeb, 0xdcd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e5, 0x001a, 0x001a, 0x001a, 0xb6d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddd6, 0x001a, 0x001a, 0x001a, 0xe9f9, 0x001a, 0x001a, 0x001a, 0xa4e7, 0x001a, 0xe3d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbd1, 0xe4d6, 0x001a, 0x001a, 0x001a, 0xf2d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfade, 0x001a, 0xf8d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xead8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5cf, 0xfdd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabd8, 0x001a, 0x001a, 0xcbfd, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcfc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8e0, 0xf3d5, 0x001a, 0x001a, 0xd9fd, 0x001a, 0x001a, 0xa3cc, 0x001a, 0x001a, 0x001a, 0xf9d9, 0x001a, 0x001a, 0xead3, 0xf5f5, 0x001a, 0xc7ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdad3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdda, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8e8, 0xafdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3f0, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacde, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbaf0, 0xb1ee, 0x001a, 0x001a, 0xb2ee, 0x001a, 0x001a, 0x001a, 0xcdf6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2ee, 0x001a, 0xc6d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e0, 0x001a, 0x001a, 0xbbf3, 0x001a, 0xe1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3d7, 0x001a, 0x001a, 0xc2db, 0x001a, 0x001a, 0x001a, 0x001a, 0xfeca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfcf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0xac00[ 11172 ] = { 0xa1b0, 0xa2b0, 0x4181, 0x4281, 0xa3b0, 0x4381, 0x4481, 0xa4b0, 0xa5b0, 0xa6b0, 0xa7b0, 0x4581, 0x4681, 0x4781, 0x4881, 0x4981, 0xa8b0, 0xa9b0, 0xaab0, 0xabb0, 0xacb0, 0xadb0, 0xaeb0, 0xafb0, 0x4a81, 0xb0b0, 0xb1b0, 0xb2b0, 0xb3b0, 0xb4b0, 0x4b81, 0x4c81, 0xb5b0, 0x4d81, 0x4e81, 0x4f81, 0xb6b0, 0x5081, 0x5181, 0x5281, 0x5381, 0x5481, 0x5581, 0x5681, 0xb7b0, 0xb8b0, 0x5781, 0xb9b0, 0xbab0, 0xbbb0, 0x5881, 0x5981, 0x5a81, 0x6181, 0x6281, 0x6381, 0xbcb0, 0xbdb0, 0x6481, 0x6581, 0xbeb0, 0x6681, 0x6781, 0x6881, 0xbfb0, 0x6981, 0x6a81, 0x6b81, 0x6c81, 0x6d81, 0x6e81, 0x6f81, 0x7081, 0x7181, 0x7281, 0xc0b0, 0x7381, 0xc1b0, 0x7481, 0x7581, 0x7681, 0x7781, 0x7881, 0x7981, 0xc2b0, 0x7a81, 0x8181, 0x8281, 0xc3b0, 0x8381, 0x8481, 0x8581, 0xc4b0, 0x8681, 0x8781, 0x8881, 0x8981, 0x8a81, 0x8b81, 0x8c81, 0x8d81, 0x8e81, 0x8f81, 0x9081, 0x9181, 0x9281, 0x9381, 0x9481, 0x9581, 0x9681, 0x9781, 0x9881, 0xc5b0, 0xc6b0, 0x9981, 0x9a81, 0xc7b0, 0x9b81, 0x9c81, 0xc8b0, 0xc9b0, 0x9d81, 0xcab0, 0x9e81, 0x9f81, 0xa081, 0xa181, 0xa281, 0xcbb0, 0xccb0, 0xa381, 0xcdb0, 0xceb0, 0xcfb0, 0xd0b0, 0xa481, 0xa581, 0xd1b0, 0xd2b0, 0xd3b0, 0xd4b0, 0xa681, 0xa781, 0xa881, 0xd5b0, 0xa981, 0xaa81, 0xab81, 0xd6b0, 0xac81, 0xad81, 0xae81, 0xaf81, 0xb081, 0xb181, 0xb281, 0xd7b0, 0xd8b0, 0xb381, 0xd9b0, 0xdab0, 0xdbb0, 0xb481, 0xb581, 0xb681, 0xb781, 0xb881, 0xb981, 0xdcb0, 0xddb0, 0xdeb0, 0xba81, 0xdfb0, 0xbb81, 0xbc81, 0xe0b0, 0xe1b0, 0xbd81, 0xbe81, 0xbf81, 0xc081, 0xc181, 0xc281, 0xc381, 0xe2b0, 0xe3b0, 0xc481, 0xe4b0, 0xe5b0, 0xe6b0, 0xc581, 0xc681, 0xc781, 0xe7b0, 0xc881, 0xc981, 0xe8b0, 0xca81, 0xcb81, 0xcc81, 0xe9b0, 0xcd81, 0xce81, 0xcf81, 0xeab0, 0xd081, 0xd181, 0xd281, 0xd381, 0xd481, 0xd581, 0xd681, 0xd781, 0xebb0, 0xd881, 0xecb0, 0xd981, 0xda81, 0xdb81, 0xdc81, 0xdd81, 0xde81, 0xdf81, 0xe081, 0xedb0, 0xeeb0, 0xe181, 0xe281, 0xefb0, 0xe381, 0xe481, 0xf0b0, 0xf1b0, 0xe581, 0xf2b0, 0xe681, 0xf3b0, 0xe781, 0xe881, 0xf4b0, 0xf5b0, 0xf6b0, 0xe981, 0xf7b0, 0xea81, 0xf8b0, 0xf9b0, 0xeb81, 0xec81, 0xed81, 0xee81, 0xef81, 0xfab0, 0xfbb0, 0xf081, 0xf181, 0xfcb0, 0xf281, 0xf381, 0xf481, 0xfdb0, 0xf581, 0xfeb0, 0xf681, 0xf781, 0xf881, 0xf981, 0xfa81, 0xa1b1, 0xa2b1, 0xfb81, 0xa3b1, 0xfc81, 0xa4b1, 0xfd81, 0xfe81, 0x4182, 0x4282, 0x4382, 0x4482, 0xa5b1, 0x4582, 0x4682, 0x4782, 0xa6b1, 0x4882, 0x4982, 0x4a82, 0xa7b1, 0x4b82, 0x4c82, 0x4d82, 0x4e82, 0x4f82, 0x5082, 0x5182, 0x5282, 0xa8b1, 0x5382, 0x5482, 0xa9b1, 0xaab1, 0x5582, 0x5682, 0x5782, 0x5882, 0x5982, 0x5a82, 0xabb1, 0xacb1, 0x6182, 0x6282, 0xadb1, 0x6382, 0x6482, 0x6582, 0xaeb1, 0x6682, 0x6782, 0x6882, 0x6982, 0x6a82, 0x6b82, 0x6c82, 0xafb1, 0xb0b1, 0x6d82, 0xb1b1, 0x6e82, 0xb2b1, 0x6f82, 0x7082, 0x7182, 0x7282, 0x7382, 0x7482, 0xb3b1, 0x7582, 0x7682, 0x7782, 0xb4b1, 0x7882, 0x7982, 0x7a82, 0xb5b1, 0x8182, 0x8282, 0x8382, 0x8482, 0x8582, 0x8682, 0x8782, 0x8882, 0xb6b1, 0x8982, 0xb7b1, 0x8a82, 0x8b82, 0x8c82, 0x8d82, 0x8e82, 0x8f82, 0x9082, 0x9182, 0xb8b1, 0xb9b1, 0x9282, 0x9382, 0xbab1, 0x9482, 0x9582, 0xbbb1, 0xbcb1, 0xbdb1, 0xbeb1, 0x9682, 0x9782, 0x9882, 0x9982, 0xbfb1, 0xc0b1, 0xc1b1, 0x9a82, 0xc2b1, 0x9b82, 0xc3b1, 0xc4b1, 0x9c82, 0x9d82, 0x9e82, 0x9f82, 0xa082, 0xc5b1, 0xc6b1, 0xa182, 0xa282, 0xc7b1, 0xa382, 0xa482, 0xa582, 0xc8b1, 0xa682, 0xa782, 0xa882, 0xa982, 0xaa82, 0xab82, 0xac82, 0xad82, 0xae82, 0xaf82, 0xb082, 0xc9b1, 0xcab1, 0xb182, 0xb282, 0xb382, 0xb482, 0xb582, 0xb682, 0xcbb1, 0xb782, 0xb882, 0xb982, 0xba82, 0xbb82, 0xbc82, 0xbd82, 0xbe82, 0xbf82, 0xc082, 0xc182, 0xc282, 0xc382, 0xc482, 0xc582, 0xc682, 0xc782, 0xc882, 0xccb1, 0xc982, 0xca82, 0xcb82, 0xcc82, 0xcd82, 0xce82, 0xcf82, 0xd082, 0xcdb1, 0xceb1, 0xd182, 0xd282, 0xcfb1, 0xd382, 0xd482, 0xd582, 0xd0b1, 0xd682, 0xd782, 0xd882, 0xd982, 0xda82, 0xdb82, 0xdc82, 0xd1b1, 0xd2b1, 0xdd82, 0xd3b1, 0xde82, 0xdf82, 0xe082, 0xe182, 0xe282, 0xe382, 0xe482, 0xe582, 0xd4b1, 0xe682, 0xe782, 0xe882, 0xd5b1, 0xe982, 0xea82, 0xeb82, 0xd6b1, 0xec82, 0xed82, 0xee82, 0xef82, 0xf082, 0xf182, 0xf282, 0xf382, 0xf482, 0xf582, 0xf682, 0xf782, 0xf882, 0xf982, 0xfa82, 0xfb82, 0xfc82, 0xfd82, 0xfe82, 0xd7b1, 0xd8b1, 0x4183, 0x4283, 0xd9b1, 0x4383, 0x4483, 0xdab1, 0xdbb1, 0xdcb1, 0x4583, 0x4683, 0x4783, 0x4883, 0x4983, 0x4a83, 0xddb1, 0xdeb1, 0x4b83, 0xdfb1, 0x4c83, 0xe0b1, 0x4d83, 0x4e83, 0x4f83, 0x5083, 0x5183, 0x5283, 0xe1b1, 0x5383, 0x5483, 0x5583, 0x5683, 0x5783, 0x5883, 0x5983, 0x5a83, 0x6183, 0x6283, 0x6383, 0x6483, 0x6583, 0x6683, 0x6783, 0x6883, 0x6983, 0x6a83, 0x6b83, 0x6c83, 0x6d83, 0x6e83, 0x6f83, 0x7083, 0x7183, 0x7283, 0x7383, 0xe2b1, 0xe3b1, 0x7483, 0x7583, 0xe4b1, 0x7683, 0x7783, 0xe5b1, 0xe6b1, 0x7883, 0xe7b1, 0x7983, 0x7a83, 0x8183, 0x8283, 0x8383, 0xe8b1, 0xe9b1, 0x8483, 0xeab1, 0x8583, 0xebb1, 0xecb1, 0x8683, 0x8783, 0x8883, 0xedb1, 0x8983, 0xeeb1, 0xefb1, 0xf0b1, 0x8a83, 0xf1b1, 0x8b83, 0x8c83, 0x8d83, 0xf2b1, 0x8e83, 0xf3b1, 0x8f83, 0x9083, 0x9183, 0x9283, 0x9383, 0xf4b1, 0xf5b1, 0x9483, 0xf6b1, 0xf7b1, 0xf8b1, 0x9583, 0x9683, 0x9783, 0xf9b1, 0x9883, 0x9983, 0xfab1, 0xfbb1, 0x9a83, 0x9b83, 0xfcb1, 0x9c83, 0x9d83, 0x9e83, 0xfdb1, 0x9f83, 0xa083, 0xa183, 0xa283, 0xa383, 0xa483, 0xa583, 0xfeb1, 0xa1b2, 0xa683, 0xa2b2, 0xa3b2, 0xa4b2, 0xa783, 0xa883, 0xa983, 0xaa83, 0xab83, 0xac83, 0xa5b2, 0xa6b2, 0xad83, 0xae83, 0xaf83, 0xb083, 0xb183, 0xb283, 0xa7b2, 0xb383, 0xb483, 0xb583, 0xb683, 0xb783, 0xb883, 0xb983, 0xba83, 0xbb83, 0xbc83, 0xbd83, 0xbe83, 0xbf83, 0xc083, 0xc183, 0xc283, 0xc383, 0xc483, 0xc583, 0xc683, 0xc783, 0xc883, 0xc983, 0xca83, 0xcb83, 0xcc83, 0xcd83, 0xce83, 0xcf83, 0xd083, 0xd183, 0xd283, 0xd383, 0xd483, 0xd583, 0xd683, 0xd783, 0xd883, 0xd983, 0xda83, 0xdb83, 0xdc83, 0xdd83, 0xde83, 0xdf83, 0xe083, 0xe183, 0xa8b2, 0xa9b2, 0xaab2, 0xe283, 0xabb2, 0xe383, 0xe483, 0xe583, 0xacb2, 0xe683, 0xe783, 0xe883, 0xe983, 0xea83, 0xeb83, 0xec83, 0xadb2, 0xaeb2, 0xed83, 0xafb2, 0xb0b2, 0xb1b2, 0xee83, 0xef83, 0xf083, 0xf183, 0xf283, 0xf383, 0xb2b2, 0xb3b2, 0xf483, 0xf583, 0xb4b2, 0xf683, 0xf783, 0xf883, 0xf983, 0xfa83, 0xfb83, 0xfc83, 0xfd83, 0xfe83, 0x4184, 0x4284, 0xb5b2, 0x4384, 0x4484, 0xb6b2, 0x4584, 0xb7b2, 0x4684, 0x4784, 0x4884, 0x4984, 0x4a84, 0x4b84, 0xb8b2, 0x4c84, 0x4d84, 0x4e84, 0xb9b2, 0x4f84, 0x5084, 0x5184, 0xbab2, 0x5284, 0x5384, 0x5484, 0x5584, 0x5684, 0x5784, 0x5884, 0x5984, 0x5a84, 0x6184, 0xbbb2, 0xbcb2, 0x6284, 0x6384, 0x6484, 0x6584, 0xbdb2, 0x6684, 0x6784, 0xbeb2, 0x6884, 0x6984, 0x6a84, 0x6b84, 0x6c84, 0x6d84, 0x6e84, 0x6f84, 0x7084, 0x7184, 0x7284, 0x7384, 0x7484, 0x7584, 0x7684, 0x7784, 0x7884, 0x7984, 0x7a84, 0x8184, 0x8284, 0x8384, 0x8484, 0x8584, 0x8684, 0x8784, 0x8884, 0xbfb2, 0xc0b2, 0x8984, 0x8a84, 0xc1b2, 0x8b84, 0xc2b2, 0x8c84, 0xc3b2, 0x8d84, 0x8e84, 0x8f84, 0x9084, 0x9184, 0x9284, 0x9384, 0xc4b2, 0xc5b2, 0x9484, 0xc6b2, 0x9584, 0xc7b2, 0xc8b2, 0xc9b2, 0x9684, 0x9784, 0x9884, 0x9984, 0xcab2, 0xcbb2, 0x9a84, 0x9b84, 0x9c84, 0x9d84, 0x9e84, 0x9f84, 0xccb2, 0xa084, 0xa184, 0xa284, 0xa384, 0xa484, 0xa584, 0xa684, 0xa784, 0xa884, 0xa984, 0xaa84, 0xcdb2, 0xceb2, 0xab84, 0xac84, 0xad84, 0xae84, 0xaf84, 0xb084, 0xcfb2, 0xd0b2, 0xb184, 0xb284, 0xb384, 0xb484, 0xb584, 0xb684, 0xb784, 0xb884, 0xb984, 0xba84, 0xbb84, 0xbc84, 0xbd84, 0xbe84, 0xbf84, 0xc084, 0xc184, 0xc284, 0xc384, 0xd1b2, 0xc484, 0xc584, 0xc684, 0xc784, 0xc884, 0xc984, 0xd2b2, 0xca84, 0xcb84, 0xcc84, 0xd3b2, 0xcd84, 0xce84, 0xcf84, 0xd4b2, 0xd084, 0xd184, 0xd284, 0xd384, 0xd484, 0xd584, 0xd684, 0xd5b2, 0xd6b2, 0xd784, 0xd884, 0xd984, 0xd7b2, 0xda84, 0xdb84, 0xdc84, 0xdd84, 0xde84, 0xdf84, 0xd8b2, 0xe084, 0xe184, 0xe284, 0xe384, 0xe484, 0xe584, 0xe684, 0xe784, 0xe884, 0xe984, 0xea84, 0xeb84, 0xec84, 0xed84, 0xee84, 0xef84, 0xf084, 0xf184, 0xf284, 0xf384, 0xf484, 0xf584, 0xf684, 0xf784, 0xf884, 0xf984, 0xfa84, 0xd9b2, 0xdab2, 0xfb84, 0xfc84, 0xdbb2, 0xfd84, 0xfe84, 0x4185, 0xdcb2, 0x4285, 0x4385, 0x4485, 0x4585, 0x4685, 0x4785, 0xddb2, 0xdeb2, 0xdfb2, 0x4885, 0xe0b2, 0x4985, 0xe1b2, 0xe2b2, 0x4a85, 0x4b85, 0x4c85, 0x4d85, 0x4e85, 0xe3b2, 0x4f85, 0x5085, 0x5185, 0x5285, 0x5385, 0x5485, 0x5585, 0xe4b2, 0x5685, 0x5785, 0x5885, 0x5985, 0x5a85, 0x6185, 0x6285, 0x6385, 0x6485, 0x6585, 0x6685, 0xe5b2, 0xe6b2, 0x6785, 0x6885, 0x6985, 0x6a85, 0x6b85, 0x6c85, 0xe7b2, 0xe8b2, 0x6d85, 0x6e85, 0xe9b2, 0x6f85, 0x7085, 0x7185, 0xeab2, 0x7285, 0x7385, 0x7485, 0x7585, 0x7685, 0x7785, 0x7885, 0xebb2, 0xecb2, 0x7985, 0x7a85, 0xedb2, 0x8185, 0x8285, 0x8385, 0x8485, 0x8585, 0x8685, 0x8785, 0xeeb2, 0x8885, 0x8985, 0x8a85, 0xefb2, 0x8b85, 0x8c85, 0x8d85, 0xf0b2, 0x8e85, 0x8f85, 0x9085, 0x9185, 0x9285, 0x9385, 0x9485, 0xf1b2, 0xf2b2, 0x9585, 0x9685, 0x9785, 0x9885, 0x9985, 0x9a85, 0x9b85, 0x9c85, 0x9d85, 0x9e85, 0xf3b2, 0x9f85, 0xa085, 0xa185, 0xa285, 0xa385, 0xa485, 0xa585, 0xa685, 0xa785, 0xa885, 0xa985, 0xaa85, 0xab85, 0xac85, 0xad85, 0xae85, 0xaf85, 0xb085, 0xb185, 0xb285, 0xb385, 0xb485, 0xb585, 0xb685, 0xb785, 0xb885, 0xb985, 0xf4b2, 0xf5b2, 0xba85, 0xbb85, 0xf6b2, 0xbc85, 0xf7b2, 0xbd85, 0xf8b2, 0xbe85, 0xf9b2, 0xbf85, 0xc085, 0xc185, 0xc285, 0xfab2, 0xfbb2, 0xfcb2, 0xc385, 0xfdb2, 0xc485, 0xfeb2, 0xc585, 0xc685, 0xc785, 0xa1b3, 0xc885, 0xc985, 0xca85, 0xcb85, 0xcc85, 0xcd85, 0xce85, 0xcf85, 0xd085, 0xd185, 0xd285, 0xd385, 0xd485, 0xd585, 0xd685, 0xd785, 0xd885, 0xd985, 0xda85, 0xdb85, 0xdc85, 0xdd85, 0xde85, 0xdf85, 0xe085, 0xe185, 0xe285, 0xe385, 0xe485, 0xe585, 0xa2b3, 0xa3b3, 0xe685, 0xe785, 0xa4b3, 0xe885, 0xe985, 0xea85, 0xa5b3, 0xeb85, 0xec85, 0xed85, 0xee85, 0xef85, 0xf085, 0xf185, 0xa6b3, 0xa7b3, 0xf285, 0xa8b3, 0xf385, 0xa9b3, 0xf485, 0xf585, 0xf685, 0xf785, 0xf885, 0xf985, 0xaab3, 0xabb3, 0xacb3, 0xfa85, 0xadb3, 0xfb85, 0xfc85, 0xaeb3, 0xafb3, 0xb0b3, 0xb1b3, 0xfd85, 0xfe85, 0x4186, 0x4286, 0x4386, 0xb2b3, 0xb3b3, 0x4486, 0xb4b3, 0xb5b3, 0xb6b3, 0xb7b3, 0xb8b3, 0x4586, 0xb9b3, 0x4686, 0xbab3, 0xbbb3, 0xbcb3, 0x4786, 0x4886, 0xbdb3, 0x4986, 0x4a86, 0x4b86, 0xbeb3, 0x4c86, 0x4d86, 0x4e86, 0x4f86, 0x5086, 0x5186, 0x5286, 0xbfb3, 0xc0b3, 0x5386, 0xc1b3, 0xc2b3, 0xc3b3, 0x5486, 0x5586, 0x5686, 0x5786, 0x5886, 0x5986, 0xc4b3, 0xc5b3, 0x5a86, 0x6186, 0xc6b3, 0x6286, 0x6386, 0x6486, 0xc7b3, 0x6586, 0x6686, 0x6786, 0x6886, 0x6986, 0x6a86, 0x6b86, 0xc8b3, 0x6c86, 0x6d86, 0x6e86, 0x6f86, 0xc9b3, 0x7086, 0x7186, 0x7286, 0x7386, 0x7486, 0x7586, 0x7686, 0x7786, 0x7886, 0x7986, 0x7a86, 0x8186, 0x8286, 0x8386, 0x8486, 0x8586, 0x8686, 0x8786, 0x8886, 0x8986, 0x8a86, 0x8b86, 0x8c86, 0x8d86, 0x8e86, 0x8f86, 0x9086, 0x9186, 0x9286, 0x9386, 0x9486, 0x9586, 0x9686, 0x9786, 0xcab3, 0xcbb3, 0x9886, 0xccb3, 0xcdb3, 0x9986, 0x9a86, 0x9b86, 0xceb3, 0x9c86, 0xcfb3, 0xd0b3, 0x9d86, 0x9e86, 0x9f86, 0xa086, 0xd1b3, 0xd2b3, 0xa186, 0xd3b3, 0xd4b3, 0xd5b3, 0xa286, 0xa386, 0xa486, 0xa586, 0xa686, 0xd6b3, 0xd7b3, 0xd8b3, 0xa786, 0xa886, 0xd9b3, 0xa986, 0xaa86, 0xab86, 0xdab3, 0xac86, 0xad86, 0xae86, 0xaf86, 0xb086, 0xb186, 0xb286, 0xdbb3, 0xdcb3, 0xb386, 0xddb3, 0xdeb3, 0xdfb3, 0xb486, 0xb586, 0xb686, 0xb786, 0xb886, 0xb986, 0xe0b3, 0xe1b3, 0xba86, 0xbb86, 0xe2b3, 0xbc86, 0xbd86, 0xbe86, 0xe3b3, 0xbf86, 0xc086, 0xc186, 0xc286, 0xc386, 0xc486, 0xc586, 0xe4b3, 0xe5b3, 0xc686, 0xc786, 0xe6b3, 0xe7b3, 0xc886, 0xc986, 0xe8b3, 0xca86, 0xcb86, 0xcc86, 0xe9b3, 0xcd86, 0xce86, 0xcf86, 0xeab3, 0xd086, 0xd186, 0xd286, 0xd386, 0xd486, 0xd586, 0xd686, 0xd786, 0xd886, 0xd986, 0xda86, 0xdb86, 0xdc86, 0xdd86, 0xde86, 0xdf86, 0xe086, 0xe186, 0xe286, 0xe386, 0xe486, 0xe586, 0xe686, 0xebb3, 0xecb3, 0xe786, 0xe886, 0xedb3, 0xe986, 0xea86, 0xeb86, 0xeeb3, 0xec86, 0xefb3, 0xed86, 0xee86, 0xef86, 0xf086, 0xf186, 0xf0b3, 0xf1b3, 0xf286, 0xf2b3, 0xf386, 0xf3b3, 0xf486, 0xf586, 0xf686, 0xf786, 0xf4b3, 0xf5b3, 0xf6b3, 0xf886, 0xf986, 0xfa86, 0xf7b3, 0xfb86, 0xfc86, 0xfd86, 0xf8b3, 0xfe86, 0x4187, 0x4287, 0x4387, 0x4487, 0x4587, 0x4687, 0x4787, 0x4887, 0x4987, 0x4a87, 0xf9b3, 0x4b87, 0x4c87, 0x4d87, 0x4e87, 0x4f87, 0x5087, 0x5187, 0x5287, 0x5387, 0x5487, 0x5587, 0x5687, 0x5787, 0x5887, 0x5987, 0x5a87, 0x6187, 0x6287, 0x6387, 0x6487, 0x6587, 0x6687, 0x6787, 0x6887, 0x6987, 0x6a87, 0x6b87, 0x6c87, 0x6d87, 0x6e87, 0x6f87, 0x7087, 0x7187, 0x7287, 0x7387, 0xfab3, 0x7487, 0x7587, 0x7687, 0xfbb3, 0x7787, 0x7887, 0x7987, 0xfcb3, 0x7a87, 0x8187, 0x8287, 0x8387, 0x8487, 0x8587, 0x8687, 0xfdb3, 0xfeb3, 0x8787, 0xa1b4, 0x8887, 0x8987, 0x8a87, 0x8b87, 0x8c87, 0x8d87, 0x8e87, 0x8f87, 0xa2b4, 0xa3b4, 0x9087, 0x9187, 0xa4b4, 0x9287, 0x9387, 0x9487, 0xa5b4, 0x9587, 0x9687, 0x9787, 0x9887, 0x9987, 0x9a87, 0x9b87, 0x9c87, 0xa6b4, 0x9d87, 0xa7b4, 0x9e87, 0xa8b4, 0x9f87, 0xa087, 0xa187, 0xa287, 0xa387, 0xa487, 0xa9b4, 0xaab4, 0xa587, 0xa687, 0xabb4, 0xa787, 0xa887, 0xacb4, 0xadb4, 0xa987, 0xaa87, 0xab87, 0xac87, 0xad87, 0xae87, 0xaf87, 0xaeb4, 0xafb4, 0xb087, 0xb0b4, 0xb187, 0xb1b4, 0xb287, 0xb387, 0xb487, 0xb587, 0xb687, 0xb787, 0xb2b4, 0xb887, 0xb987, 0xba87, 0xbb87, 0xbc87, 0xbd87, 0xbe87, 0xbf87, 0xc087, 0xc187, 0xc287, 0xc387, 0xc487, 0xc587, 0xc687, 0xc787, 0xc887, 0xc987, 0xca87, 0xb3b4, 0xcb87, 0xcc87, 0xcd87, 0xce87, 0xcf87, 0xd087, 0xd187, 0xb4b4, 0xd287, 0xd387, 0xd487, 0xd587, 0xd687, 0xd787, 0xd887, 0xd987, 0xda87, 0xdb87, 0xdc87, 0xdd87, 0xde87, 0xdf87, 0xe087, 0xe187, 0xe287, 0xe387, 0xe487, 0xe587, 0xe687, 0xe787, 0xe887, 0xe987, 0xea87, 0xeb87, 0xec87, 0xb5b4, 0xed87, 0xee87, 0xef87, 0xb6b4, 0xf087, 0xf187, 0xf287, 0xb7b4, 0xf387, 0xf487, 0xf587, 0xf687, 0xf787, 0xf887, 0xf987, 0xb8b4, 0xb9b4, 0xfa87, 0xfb87, 0xfc87, 0xfd87, 0xfe87, 0x4188, 0x4288, 0x4388, 0x4488, 0x4588, 0xbab4, 0xbbb4, 0x4688, 0x4788, 0x4888, 0x4988, 0x4a88, 0x4b88, 0xbcb4, 0x4c88, 0x4d88, 0x4e88, 0x4f88, 0x5088, 0x5188, 0x5288, 0xbdb4, 0xbeb4, 0x5388, 0x5488, 0x5588, 0xbfb4, 0x5688, 0x5788, 0x5888, 0x5988, 0x5a88, 0x6188, 0xc0b4, 0xc1b4, 0x6288, 0x6388, 0xc2b4, 0x6488, 0x6588, 0x6688, 0xc3b4, 0xc4b4, 0xc5b4, 0x6788, 0x6888, 0x6988, 0x6a88, 0x6b88, 0xc6b4, 0xc7b4, 0x6c88, 0xc8b4, 0x6d88, 0xc9b4, 0xcab4, 0x6e88, 0x6f88, 0x7088, 0xcbb4, 0x7188, 0xccb4, 0x7288, 0x7388, 0x7488, 0xcdb4, 0x7588, 0x7688, 0x7788, 0xceb4, 0x7888, 0x7988, 0x7a88, 0x8188, 0x8288, 0x8388, 0x8488, 0x8588, 0x8688, 0x8788, 0x8888, 0x8988, 0x8a88, 0x8b88, 0x8c88, 0x8d88, 0x8e88, 0x8f88, 0x9088, 0xcfb4, 0xd0b4, 0x9188, 0x9288, 0xd1b4, 0x9388, 0x9488, 0x9588, 0xd2b4, 0x9688, 0xd3b4, 0x9788, 0x9888, 0x9988, 0x9a88, 0x9b88, 0xd4b4, 0xd5b4, 0x9c88, 0xd6b4, 0x9d88, 0xd7b4, 0x9e88, 0x9f88, 0xa088, 0xa188, 0xd8b4, 0xa288, 0xd9b4, 0xdab4, 0xdbb4, 0xa388, 0xdcb4, 0xa488, 0xa588, 0xddb4, 0xdeb4, 0xdfb4, 0xe0b4, 0xe1b4, 0xa688, 0xa788, 0xa888, 0xe2b4, 0xe3b4, 0xe4b4, 0xa988, 0xe5b4, 0xe6b4, 0xe7b4, 0xe8b4, 0xe9b4, 0xaa88, 0xab88, 0xac88, 0xeab4, 0xebb4, 0xecb4, 0xad88, 0xae88, 0xedb4, 0xaf88, 0xb088, 0xb188, 0xeeb4, 0xb288, 0xb388, 0xb488, 0xb588, 0xb688, 0xb788, 0xb888, 0xefb4, 0xf0b4, 0xb988, 0xf1b4, 0xf2b4, 0xf3b4, 0xba88, 0xbb88, 0xbc88, 0xbd88, 0xbe88, 0xbf88, 0xf4b4, 0xc088, 0xc188, 0xc288, 0xc388, 0xc488, 0xc588, 0xc688, 0xc788, 0xc888, 0xc988, 0xca88, 0xcb88, 0xcc88, 0xcd88, 0xce88, 0xcf88, 0xd088, 0xd188, 0xd288, 0xd388, 0xd488, 0xd588, 0xd688, 0xd788, 0xd888, 0xd988, 0xda88, 0xdb88, 0xdc88, 0xdd88, 0xde88, 0xdf88, 0xe088, 0xe188, 0xe288, 0xe388, 0xe488, 0xe588, 0xe688, 0xe788, 0xe888, 0xe988, 0xea88, 0xeb88, 0xec88, 0xed88, 0xee88, 0xef88, 0xf088, 0xf188, 0xf288, 0xf388, 0xf488, 0xf588, 0xf688, 0xf5b4, 0xf6b4, 0xf7b4, 0xf788, 0xf8b4, 0xf888, 0xf988, 0xf9b4, 0xfab4, 0xfa88, 0xfbb4, 0xfcb4, 0xfb88, 0xfc88, 0xfd88, 0xfe88, 0xfdb4, 0xfeb4, 0x4189, 0xa1b5, 0x4289, 0xa2b5, 0x4389, 0xa3b5, 0x4489, 0x4589, 0xa4b5, 0x4689, 0xa5b5, 0xa6b5, 0x4789, 0x4889, 0xa7b5, 0x4989, 0x4a89, 0x4b89, 0xa8b5, 0x4c89, 0x4d89, 0x4e89, 0x4f89, 0x5089, 0x5189, 0x5289, 0xa9b5, 0xaab5, 0x5389, 0xabb5, 0xacb5, 0xadb5, 0x5489, 0x5589, 0x5689, 0x5789, 0x5889, 0x5989, 0xaeb5, 0x5a89, 0x6189, 0x6289, 0xafb5, 0x6389, 0x6489, 0x6589, 0xb0b5, 0x6689, 0x6789, 0x6889, 0x6989, 0x6a89, 0x6b89, 0x6c89, 0x6d89, 0x6e89, 0x6f89, 0x7089, 0xb1b5, 0xb2b5, 0x7189, 0x7289, 0x7389, 0x7489, 0x7589, 0x7689, 0xb3b5, 0x7789, 0x7889, 0x7989, 0xb4b5, 0x7a89, 0x8189, 0x8289, 0x8389, 0x8489, 0x8589, 0x8689, 0x8789, 0x8889, 0x8989, 0x8a89, 0x8b89, 0x8c89, 0x8d89, 0x8e89, 0x8f89, 0x9089, 0x9189, 0x9289, 0x9389, 0x9489, 0x9589, 0x9689, 0xb5b5, 0xb6b5, 0x9789, 0x9889, 0xb7b5, 0x9989, 0x9a89, 0xb8b5, 0xb9b5, 0x9b89, 0xbab5, 0x9c89, 0xbbb5, 0x9d89, 0x9e89, 0x9f89, 0xbcb5, 0xbdb5, 0xa089, 0xbeb5, 0xa189, 0xbfb5, 0xa289, 0xc0b5, 0xa389, 0xc1b5, 0xa489, 0xa589, 0xc2b5, 0xa689, 0xa789, 0xa889, 0xc3b5, 0xa989, 0xaa89, 0xab89, 0xc4b5, 0xac89, 0xad89, 0xae89, 0xaf89, 0xb089, 0xb189, 0xb289, 0xb389, 0xb489, 0xb589, 0xb689, 0xb789, 0xb889, 0xb989, 0xba89, 0xbb89, 0xbc89, 0xbd89, 0xbe89, 0xc5b5, 0xbf89, 0xc089, 0xc189, 0xc289, 0xc389, 0xc489, 0xc589, 0xc689, 0xc789, 0xc889, 0xc989, 0xca89, 0xcb89, 0xcc89, 0xcd89, 0xce89, 0xcf89, 0xd089, 0xd189, 0xc6b5, 0xd289, 0xd389, 0xd489, 0xd589, 0xd689, 0xd789, 0xd889, 0xc7b5, 0xd989, 0xda89, 0xdb89, 0xc8b5, 0xdc89, 0xdd89, 0xde89, 0xc9b5, 0xdf89, 0xe089, 0xe189, 0xe289, 0xe389, 0xe489, 0xe589, 0xcab5, 0xcbb5, 0xe689, 0xccb5, 0xe789, 0xe889, 0xe989, 0xea89, 0xeb89, 0xec89, 0xed89, 0xee89, 0xcdb5, 0xef89, 0xf089, 0xf189, 0xf289, 0xf389, 0xf489, 0xf589, 0xf689, 0xf789, 0xf889, 0xf989, 0xfa89, 0xfb89, 0xfc89, 0xfd89, 0xfe89, 0x418a, 0x428a, 0x438a, 0x448a, 0x458a, 0x468a, 0x478a, 0x488a, 0x498a, 0x4a8a, 0x4b8a, 0xceb5, 0xcfb5, 0x4c8a, 0x4d8a, 0xd0b5, 0x4e8a, 0x4f8a, 0x508a, 0xd1b5, 0x518a, 0x528a, 0x538a, 0x548a, 0x558a, 0x568a, 0x578a, 0xd2b5, 0xd3b5, 0x588a, 0xd4b5, 0x598a, 0xd5b5, 0x5a8a, 0x618a, 0x628a, 0x638a, 0x648a, 0x658a, 0xd6b5, 0x668a, 0x678a, 0x688a, 0x698a, 0x6a8a, 0x6b8a, 0x6c8a, 0x6d8a, 0x6e8a, 0x6f8a, 0x708a, 0x718a, 0x728a, 0x738a, 0x748a, 0x758a, 0x768a, 0x778a, 0x788a, 0xd7b5, 0x798a, 0x7a8a, 0x818a, 0x828a, 0x838a, 0x848a, 0x858a, 0xd8b5, 0x868a, 0x878a, 0x888a, 0x898a, 0x8a8a, 0x8b8a, 0x8c8a, 0x8d8a, 0x8e8a, 0x8f8a, 0x908a, 0x918a, 0x928a, 0x938a, 0x948a, 0x958a, 0x968a, 0x978a, 0x988a, 0x998a, 0xd9b5, 0x9a8a, 0x9b8a, 0x9c8a, 0x9d8a, 0x9e8a, 0x9f8a, 0xdab5, 0xa08a, 0xa18a, 0xa28a, 0xdbb5, 0xa38a, 0xa48a, 0xa58a, 0xdcb5, 0xa68a, 0xa78a, 0xa88a, 0xa98a, 0xaa8a, 0xab8a, 0xac8a, 0xad8a, 0xddb5, 0xae8a, 0xdeb5, 0xaf8a, 0xdfb5, 0xb08a, 0xb18a, 0xb28a, 0xb38a, 0xb48a, 0xb58a, 0xe0b5, 0xb68a, 0xb78a, 0xb88a, 0xe1b5, 0xb98a, 0xba8a, 0xbb8a, 0xe2b5, 0xbc8a, 0xbd8a, 0xbe8a, 0xbf8a, 0xc08a, 0xc18a, 0xc28a, 0xe3b5, 0xc38a, 0xc48a, 0xc58a, 0xc68a, 0xe4b5, 0xc78a, 0xc88a, 0xc98a, 0xca8a, 0xcb8a, 0xcc8a, 0xe5b5, 0xe6b5, 0xcd8a, 0xce8a, 0xe7b5, 0xcf8a, 0xd08a, 0xe8b5, 0xe9b5, 0xd18a, 0xeab5, 0xd28a, 0xd38a, 0xd48a, 0xd58a, 0xd68a, 0xebb5, 0xecb5, 0xd78a, 0xedb5, 0xd88a, 0xeeb5, 0xd98a, 0xda8a, 0xdb8a, 0xdc8a, 0xdd8a, 0xde8a, 0xefb5, 0xdf8a, 0xe08a, 0xe18a, 0xe28a, 0xe38a, 0xe48a, 0xe58a, 0xe68a, 0xe78a, 0xe88a, 0xe98a, 0xea8a, 0xeb8a, 0xec8a, 0xed8a, 0xee8a, 0xef8a, 0xf08a, 0xf18a, 0xf28a, 0xf38a, 0xf48a, 0xf58a, 0xf68a, 0xf78a, 0xf88a, 0xf98a, 0xf0b5, 0xf1b5, 0xfa8a, 0xfb8a, 0xf2b5, 0xfc8a, 0xfd8a, 0xf3b5, 0xf4b5, 0xfe8a, 0x418b, 0x428b, 0x438b, 0x448b, 0x458b, 0x468b, 0xf5b5, 0xf6b5, 0x478b, 0xf7b5, 0xf8b5, 0xf9b5, 0xfab5, 0x488b, 0x498b, 0x4a8b, 0x4b8b, 0x4c8b, 0xfbb5, 0xfcb5, 0x4d8b, 0x4e8b, 0xfdb5, 0x4f8b, 0x508b, 0x518b, 0xfeb5, 0x528b, 0x538b, 0x548b, 0x558b, 0x568b, 0x578b, 0x588b, 0xa1b6, 0xa2b6, 0x598b, 0xa3b6, 0xa4b6, 0xa5b6, 0x5a8b, 0x618b, 0x628b, 0x638b, 0x648b, 0xa6b6, 0xa7b6, 0xa8b6, 0x658b, 0x668b, 0xa9b6, 0x678b, 0x688b, 0x698b, 0xaab6, 0x6a8b, 0x6b8b, 0x6c8b, 0x6d8b, 0x6e8b, 0x6f8b, 0x708b, 0xabb6, 0xacb6, 0x718b, 0xadb6, 0xaeb6, 0xafb6, 0x728b, 0x738b, 0x748b, 0x758b, 0x768b, 0x778b, 0x788b, 0x798b, 0x7a8b, 0x818b, 0x828b, 0x838b, 0x848b, 0x858b, 0x868b, 0x878b, 0x888b, 0x898b, 0x8a8b, 0x8b8b, 0x8c8b, 0x8d8b, 0x8e8b, 0x8f8b, 0x908b, 0x918b, 0x928b, 0x938b, 0x948b, 0x958b, 0x968b, 0x978b, 0x988b, 0x998b, 0x9a8b, 0x9b8b, 0x9c8b, 0x9d8b, 0x9e8b, 0x9f8b, 0xa08b, 0xa18b, 0xa28b, 0xa38b, 0xa48b, 0xa58b, 0xa68b, 0xa78b, 0xa88b, 0xa98b, 0xaa8b, 0xab8b, 0xac8b, 0xad8b, 0xae8b, 0xaf8b, 0xb08b, 0xb18b, 0xb28b, 0xb38b, 0xb48b, 0xb58b, 0xb0b6, 0xb1b6, 0xb68b, 0xb78b, 0xb2b6, 0xb88b, 0xb98b, 0xba8b, 0xb3b6, 0xbb8b, 0xb4b6, 0xb5b6, 0xbc8b, 0xbd8b, 0xbe8b, 0xbf8b, 0xb6b6, 0xb7b6, 0xc08b, 0xb8b6, 0xb9b6, 0xbab6, 0xc18b, 0xc28b, 0xc38b, 0xc48b, 0xc58b, 0xbbb6, 0xbcb6, 0xbdb6, 0xc68b, 0xc78b, 0xbeb6, 0xc88b, 0xc98b, 0xca8b, 0xbfb6, 0xcb8b, 0xcc8b, 0xcd8b, 0xce8b, 0xcf8b, 0xd08b, 0xd18b, 0xc0b6, 0xc1b6, 0xd28b, 0xc2b6, 0xc3b6, 0xc4b6, 0xd38b, 0xd48b, 0xd58b, 0xd68b, 0xd78b, 0xd88b, 0xc5b6, 0xd98b, 0xda8b, 0xdb8b, 0xdc8b, 0xdd8b, 0xde8b, 0xdf8b, 0xe08b, 0xe18b, 0xe28b, 0xe38b, 0xe48b, 0xe58b, 0xe68b, 0xe78b, 0xe88b, 0xe98b, 0xea8b, 0xeb8b, 0xc6b6, 0xec8b, 0xed8b, 0xee8b, 0xef8b, 0xf08b, 0xf18b, 0xf28b, 0xf38b, 0xf48b, 0xf58b, 0xf68b, 0xf78b, 0xf88b, 0xf98b, 0xfa8b, 0xfb8b, 0xfc8b, 0xfd8b, 0xfe8b, 0x418c, 0x428c, 0x438c, 0x448c, 0x458c, 0x468c, 0x478c, 0x488c, 0x498c, 0x4a8c, 0x4b8c, 0x4c8c, 0x4d8c, 0x4e8c, 0x4f8c, 0x508c, 0xc7b6, 0xc8b6, 0x518c, 0x528c, 0xc9b6, 0x538c, 0x548c, 0x558c, 0xcab6, 0x568c, 0x578c, 0x588c, 0x598c, 0x5a8c, 0x618c, 0x628c, 0x638c, 0x648c, 0x658c, 0x668c, 0x678c, 0xcbb6, 0x688c, 0x698c, 0x6a8c, 0x6b8c, 0x6c8c, 0x6d8c, 0xccb6, 0x6e8c, 0x6f8c, 0x708c, 0x718c, 0x728c, 0x738c, 0x748c, 0xcdb6, 0x758c, 0x768c, 0x778c, 0x788c, 0x798c, 0x7a8c, 0x818c, 0x828c, 0x838c, 0x848c, 0x858c, 0x868c, 0x878c, 0x888c, 0x898c, 0x8a8c, 0x8b8c, 0x8c8c, 0x8d8c, 0xceb6, 0x8e8c, 0x8f8c, 0x908c, 0x918c, 0x928c, 0x938c, 0x948c, 0x958c, 0x968c, 0x978c, 0x988c, 0x998c, 0x9a8c, 0x9b8c, 0x9c8c, 0x9d8c, 0x9e8c, 0x9f8c, 0xa08c, 0xa18c, 0xa28c, 0xa38c, 0xa48c, 0xa58c, 0xa68c, 0xa78c, 0xa88c, 0xcfb6, 0xa98c, 0xaa8c, 0xab8c, 0xd0b6, 0xac8c, 0xad8c, 0xae8c, 0xaf8c, 0xb08c, 0xb18c, 0xb28c, 0xb38c, 0xb48c, 0xb58c, 0xb68c, 0xb78c, 0xb88c, 0xb98c, 0xba8c, 0xbb8c, 0xbc8c, 0xbd8c, 0xbe8c, 0xbf8c, 0xc08c, 0xc18c, 0xc28c, 0xc38c, 0xc48c, 0xc58c, 0xc68c, 0xc78c, 0xc88c, 0xc98c, 0xca8c, 0xcb8c, 0xcc8c, 0xcd8c, 0xce8c, 0xcf8c, 0xd08c, 0xd18c, 0xd28c, 0xd38c, 0xd48c, 0xd58c, 0xd68c, 0xd78c, 0xd88c, 0xd98c, 0xda8c, 0xdb8c, 0xdc8c, 0xdd8c, 0xde8c, 0xd1b6, 0xd2b6, 0xdf8c, 0xe08c, 0xd3b6, 0xe18c, 0xe28c, 0xe38c, 0xd4b6, 0xe48c, 0xe58c, 0xe68c, 0xe78c, 0xe88c, 0xe98c, 0xd5b6, 0xd6b6, 0xea8c, 0xeb8c, 0xec8c, 0xed8c, 0xd7b6, 0xee8c, 0xef8c, 0xf08c, 0xf18c, 0xf28c, 0xf38c, 0xf48c, 0xf58c, 0xf68c, 0xf78c, 0xf88c, 0xf98c, 0xfa8c, 0xfb8c, 0xfc8c, 0xfd8c, 0xfe8c, 0x418d, 0x428d, 0x438d, 0x448d, 0x458d, 0x468d, 0x478d, 0x488d, 0x498d, 0x4a8d, 0x4b8d, 0x4c8d, 0x4d8d, 0x4e8d, 0x4f8d, 0x508d, 0x518d, 0xd8b6, 0x528d, 0x538d, 0x548d, 0x558d, 0x568d, 0x578d, 0x588d, 0x598d, 0x5a8d, 0x618d, 0x628d, 0x638d, 0x648d, 0x658d, 0x668d, 0x678d, 0x688d, 0x698d, 0x6a8d, 0x6b8d, 0x6c8d, 0x6d8d, 0x6e8d, 0x6f8d, 0x708d, 0x718d, 0x728d, 0xd9b6, 0x738d, 0x748d, 0x758d, 0xdab6, 0x768d, 0x778d, 0x788d, 0xdbb6, 0x798d, 0x7a8d, 0x818d, 0x828d, 0x838d, 0x848d, 0x858d, 0xdcb6, 0xddb6, 0x868d, 0x878d, 0x888d, 0xdeb6, 0x898d, 0x8a8d, 0x8b8d, 0x8c8d, 0x8d8d, 0x8e8d, 0x8f8d, 0x908d, 0x918d, 0x928d, 0x938d, 0x948d, 0x958d, 0x968d, 0x978d, 0x988d, 0x998d, 0x9a8d, 0x9b8d, 0x9c8d, 0x9d8d, 0x9e8d, 0x9f8d, 0xa08d, 0xa18d, 0xa28d, 0xa38d, 0xa48d, 0xa58d, 0xa68d, 0xa78d, 0xa88d, 0xa98d, 0xaa8d, 0xdfb6, 0xe0b6, 0xab8d, 0xac8d, 0xe1b6, 0xad8d, 0xae8d, 0xe2b6, 0xe3b6, 0xaf8d, 0xb08d, 0xb18d, 0xb28d, 0xb38d, 0xb48d, 0xb58d, 0xe4b6, 0xe5b6, 0xb68d, 0xe6b6, 0xb78d, 0xb88d, 0xb98d, 0xba8d, 0xbb8d, 0xbc8d, 0xbd8d, 0xbe8d, 0xe7b6, 0xbf8d, 0xc08d, 0xc18d, 0xe8b6, 0xc28d, 0xc38d, 0xc48d, 0xe9b6, 0xc58d, 0xc68d, 0xc78d, 0xc88d, 0xc98d, 0xca8d, 0xcb8d, 0xeab6, 0xebb6, 0xcc8d, 0xcd8d, 0xce8d, 0xcf8d, 0xd08d, 0xd18d, 0xd28d, 0xd38d, 0xd48d, 0xd58d, 0xecb6, 0xd68d, 0xd78d, 0xd88d, 0xedb6, 0xd98d, 0xda8d, 0xdb8d, 0xeeb6, 0xdc8d, 0xdd8d, 0xde8d, 0xdf8d, 0xe08d, 0xe18d, 0xe28d, 0xefb6, 0xf0b6, 0xe38d, 0xf1b6, 0xe48d, 0xf2b6, 0xe58d, 0xe68d, 0xe78d, 0xe88d, 0xe98d, 0xea8d, 0xf3b6, 0xf4b6, 0xeb8d, 0xec8d, 0xf5b6, 0xed8d, 0xee8d, 0xef8d, 0xf6b6, 0xf08d, 0xf18d, 0xf28d, 0xf38d, 0xf48d, 0xf58d, 0xf68d, 0xf7b6, 0xf8b6, 0xf78d, 0xf9b6, 0xfab6, 0xfbb6, 0xfcb6, 0xf88d, 0xf98d, 0xfa8d, 0xfdb6, 0xfeb6, 0xa1b7, 0xa2b7, 0xfb8d, 0xfc8d, 0xa3b7, 0xfd8d, 0xfe8d, 0x418e, 0xa4b7, 0x428e, 0x438e, 0x448e, 0x458e, 0x468e, 0x478e, 0x488e, 0xa5b7, 0xa6b7, 0x498e, 0xa7b7, 0xa8b7, 0xa9b7, 0x4a8e, 0x4b8e, 0x4c8e, 0x4d8e, 0x4e8e, 0x4f8e, 0xaab7, 0xabb7, 0x508e, 0x518e, 0xacb7, 0x528e, 0x538e, 0x548e, 0x558e, 0x568e, 0x578e, 0x588e, 0x598e, 0x5a8e, 0x618e, 0x628e, 0x638e, 0x648e, 0x658e, 0xadb7, 0x668e, 0xaeb7, 0x678e, 0x688e, 0x698e, 0x6a8e, 0x6b8e, 0x6c8e, 0x6d8e, 0x6e8e, 0x6f8e, 0x708e, 0x718e, 0x728e, 0x738e, 0x748e, 0x758e, 0x768e, 0x778e, 0x788e, 0x798e, 0x7a8e, 0x818e, 0x828e, 0x838e, 0x848e, 0x858e, 0x868e, 0x878e, 0x888e, 0x898e, 0x8a8e, 0x8b8e, 0x8c8e, 0x8d8e, 0x8e8e, 0xafb7, 0xb0b7, 0x8f8e, 0x908e, 0xb1b7, 0x918e, 0x928e, 0x938e, 0xb2b7, 0x948e, 0x958e, 0x968e, 0x978e, 0x988e, 0x998e, 0x9a8e, 0xb3b7, 0xb4b7, 0x9b8e, 0xb5b7, 0xb6b7, 0xb7b7, 0x9c8e, 0x9d8e, 0x9e8e, 0x9f8e, 0xa08e, 0xb8b7, 0xb9b7, 0xbab7, 0xa18e, 0xa28e, 0xbbb7, 0xa38e, 0xa48e, 0xa58e, 0xbcb7, 0xa68e, 0xa78e, 0xa88e, 0xa98e, 0xaa8e, 0xab8e, 0xac8e, 0xbdb7, 0xbeb7, 0xad8e, 0xbfb7, 0xae8e, 0xc0b7, 0xaf8e, 0xb08e, 0xb18e, 0xb28e, 0xb38e, 0xb48e, 0xc1b7, 0xc2b7, 0xb58e, 0xb68e, 0xc3b7, 0xb78e, 0xb88e, 0xb98e, 0xc4b7, 0xba8e, 0xbb8e, 0xbc8e, 0xbd8e, 0xbe8e, 0xbf8e, 0xc08e, 0xc5b7, 0xc6b7, 0xc18e, 0xc7b7, 0xc8b7, 0xc9b7, 0xc28e, 0xc38e, 0xc48e, 0xc58e, 0xc68e, 0xc78e, 0xcab7, 0xc88e, 0xc98e, 0xca8e, 0xcbb7, 0xcb8e, 0xcc8e, 0xcd8e, 0xce8e, 0xcf8e, 0xd08e, 0xd18e, 0xd28e, 0xd38e, 0xd48e, 0xd58e, 0xd68e, 0xccb7, 0xd78e, 0xcdb7, 0xd88e, 0xd98e, 0xda8e, 0xdb8e, 0xdc8e, 0xdd8e, 0xde8e, 0xdf8e, 0xceb7, 0xcfb7, 0xe08e, 0xe18e, 0xd0b7, 0xe28e, 0xe38e, 0xe48e, 0xd1b7, 0xe58e, 0xe68e, 0xe78e, 0xe88e, 0xe98e, 0xea8e, 0xeb8e, 0xd2b7, 0xd3b7, 0xec8e, 0xd4b7, 0xed8e, 0xd5b7, 0xee8e, 0xef8e, 0xf08e, 0xf18e, 0xf28e, 0xf38e, 0xd6b7, 0xf48e, 0xf58e, 0xf68e, 0xd7b7, 0xf78e, 0xf88e, 0xf98e, 0xfa8e, 0xfb8e, 0xfc8e, 0xfd8e, 0xfe8e, 0x418f, 0x428f, 0x438f, 0x448f, 0x458f, 0x468f, 0x478f, 0x488f, 0xd8b7, 0x498f, 0x4a8f, 0x4b8f, 0x4c8f, 0x4d8f, 0x4e8f, 0x4f8f, 0x508f, 0x518f, 0x528f, 0x538f, 0x548f, 0x558f, 0x568f, 0x578f, 0x588f, 0x598f, 0x5a8f, 0x618f, 0x628f, 0x638f, 0x648f, 0x658f, 0x668f, 0x678f, 0x688f, 0xd9b7, 0x698f, 0x6a8f, 0x6b8f, 0x6c8f, 0x6d8f, 0x6e8f, 0x6f8f, 0xdab7, 0x708f, 0x718f, 0x728f, 0xdbb7, 0x738f, 0x748f, 0x758f, 0xdcb7, 0x768f, 0x778f, 0x788f, 0x798f, 0x7a8f, 0x818f, 0x828f, 0xddb7, 0xdeb7, 0x838f, 0xdfb7, 0x848f, 0xe0b7, 0x858f, 0x868f, 0x878f, 0x888f, 0x898f, 0x8a8f, 0xe1b7, 0x8b8f, 0x8c8f, 0x8d8f, 0xe2b7, 0x8e8f, 0x8f8f, 0x908f, 0xe3b7, 0x918f, 0x928f, 0x938f, 0x948f, 0x958f, 0x968f, 0x978f, 0x988f, 0xe4b7, 0x998f, 0xe5b7, 0x9a8f, 0xe6b7, 0x9b8f, 0x9c8f, 0x9d8f, 0x9e8f, 0x9f8f, 0xa08f, 0xe7b7, 0xe8b7, 0xa18f, 0xa28f, 0xe9b7, 0xa38f, 0xa48f, 0xa58f, 0xeab7, 0xa68f, 0xa78f, 0xa88f, 0xa98f, 0xaa8f, 0xab8f, 0xac8f, 0xebb7, 0xecb7, 0xad8f, 0xedb7, 0xae8f, 0xeeb7, 0xaf8f, 0xb08f, 0xb18f, 0xb28f, 0xb38f, 0xb48f, 0xefb7, 0xb58f, 0xb68f, 0xb78f, 0xb88f, 0xb98f, 0xba8f, 0xbb8f, 0xbc8f, 0xbd8f, 0xbe8f, 0xbf8f, 0xc08f, 0xc18f, 0xc28f, 0xc38f, 0xc48f, 0xc58f, 0xc68f, 0xc78f, 0xf0b7, 0xc88f, 0xc98f, 0xca8f, 0xcb8f, 0xcc8f, 0xcd8f, 0xce8f, 0xf1b7, 0xcf8f, 0xd08f, 0xd18f, 0xd28f, 0xd38f, 0xd48f, 0xd58f, 0xd68f, 0xd78f, 0xd88f, 0xd98f, 0xda8f, 0xdb8f, 0xdc8f, 0xdd8f, 0xde8f, 0xdf8f, 0xe08f, 0xe18f, 0xe28f, 0xe38f, 0xe48f, 0xe58f, 0xe68f, 0xe78f, 0xe88f, 0xe98f, 0xf2b7, 0xf3b7, 0xea8f, 0xeb8f, 0xf4b7, 0xec8f, 0xed8f, 0xee8f, 0xf5b7, 0xef8f, 0xf08f, 0xf18f, 0xf28f, 0xf38f, 0xf48f, 0xf58f, 0xf6b7, 0xf68f, 0xf78f, 0xf7b7, 0xf88f, 0xf8b7, 0xf98f, 0xfa8f, 0xfb8f, 0xfc8f, 0xfd8f, 0xfe8f, 0xf9b7, 0xfab7, 0x4190, 0x4290, 0xfbb7, 0x4390, 0x4490, 0x4590, 0xfcb7, 0x4690, 0x4790, 0x4890, 0x4990, 0x4a90, 0x4b90, 0x4c90, 0xfdb7, 0xfeb7, 0x4d90, 0xa1b8, 0x4e90, 0xa2b8, 0x4f90, 0x5090, 0x5190, 0x5290, 0x5390, 0x5490, 0xa3b8, 0xa4b8, 0x5590, 0x5690, 0xa5b8, 0x5790, 0x5890, 0x5990, 0xa6b8, 0x5a90, 0x6190, 0x6290, 0x6390, 0x6490, 0x6590, 0x6690, 0xa7b8, 0xa8b8, 0x6790, 0xa9b8, 0x6890, 0xaab8, 0xabb8, 0x6990, 0x6a90, 0xacb8, 0xadb8, 0x6b90, 0x6c90, 0x6d90, 0x6e90, 0x6f90, 0x7090, 0x7190, 0x7290, 0x7390, 0x7490, 0x7590, 0x7690, 0x7790, 0x7890, 0x7990, 0x7a90, 0x8190, 0x8290, 0x8390, 0x8490, 0x8590, 0x8690, 0x8790, 0x8890, 0x8990, 0x8a90, 0x8b90, 0x8c90, 0x8d90, 0xaeb8, 0xafb8, 0x8e90, 0x8f90, 0xb0b8, 0x9090, 0x9190, 0x9290, 0xb1b8, 0x9390, 0x9490, 0x9590, 0x9690, 0x9790, 0x9890, 0x9990, 0xb2b8, 0xb3b8, 0x9a90, 0xb4b8, 0x9b90, 0xb5b8, 0x9c90, 0x9d90, 0x9e90, 0x9f90, 0xa090, 0xa190, 0xb6b8, 0xb7b8, 0xa290, 0xa390, 0xb8b8, 0xa490, 0xb9b8, 0xbab8, 0xbbb8, 0xbcb8, 0xbdb8, 0xa590, 0xa690, 0xa790, 0xa890, 0xa990, 0xbeb8, 0xbfb8, 0xaa90, 0xc0b8, 0xab90, 0xc1b8, 0xc2b8, 0xac90, 0xad90, 0xc3b8, 0xae90, 0xc4b8, 0xc5b8, 0xc6b8, 0xaf90, 0xb090, 0xc7b8, 0xb190, 0xb290, 0xb390, 0xc8b8, 0xb490, 0xb590, 0xb690, 0xb790, 0xb890, 0xb990, 0xba90, 0xc9b8, 0xcab8, 0xbb90, 0xcbb8, 0xccb8, 0xcdb8, 0xceb8, 0xbc90, 0xbd90, 0xbe90, 0xbf90, 0xc090, 0xcfb8, 0xd0b8, 0xc190, 0xc290, 0xc390, 0xc490, 0xc590, 0xc690, 0xd1b8, 0xc790, 0xc890, 0xc990, 0xca90, 0xcb90, 0xcc90, 0xcd90, 0xce90, 0xcf90, 0xd090, 0xd190, 0xd290, 0xd2b8, 0xd390, 0xd490, 0xd590, 0xd690, 0xd790, 0xd890, 0xd990, 0xda90, 0xdb90, 0xdc90, 0xdd90, 0xde90, 0xdf90, 0xe090, 0xe190, 0xe290, 0xe390, 0xe490, 0xe590, 0xe690, 0xe790, 0xe890, 0xe990, 0xea90, 0xeb90, 0xec90, 0xed90, 0xee90, 0xef90, 0xf090, 0xf190, 0xf290, 0xf390, 0xf490, 0xd3b8, 0xd4b8, 0xf590, 0xf690, 0xd5b8, 0xf790, 0xf890, 0xf990, 0xd6b8, 0xfa90, 0xd7b8, 0xfb90, 0xfc90, 0xfd90, 0xfe90, 0x4191, 0xd8b8, 0xd9b8, 0x4291, 0xdab8, 0x4391, 0xdbb8, 0xdcb8, 0x4491, 0x4591, 0x4691, 0x4791, 0xddb8, 0xdeb8, 0xdfb8, 0x4891, 0x4991, 0xe0b8, 0x4a91, 0x4b91, 0x4c91, 0xe1b8, 0x4d91, 0x4e91, 0x4f91, 0x5091, 0x5191, 0x5291, 0x5391, 0xe2b8, 0xe3b8, 0x5491, 0xe4b8, 0xe5b8, 0xe6b8, 0x5591, 0x5691, 0x5791, 0x5891, 0x5991, 0x5a91, 0xe7b8, 0xe8b8, 0x6191, 0x6291, 0xe9b8, 0x6391, 0x6491, 0x6591, 0xeab8, 0x6691, 0x6791, 0x6891, 0x6991, 0x6a91, 0x6b91, 0x6c91, 0x6d91, 0x6e91, 0x6f91, 0xebb8, 0xecb8, 0xedb8, 0x7091, 0xeeb8, 0x7191, 0x7291, 0x7391, 0x7491, 0xefb8, 0x7591, 0x7691, 0x7791, 0x7891, 0x7991, 0x7a91, 0x8191, 0x8291, 0x8391, 0x8491, 0x8591, 0x8691, 0x8791, 0x8891, 0x8991, 0x8a91, 0x8b91, 0x8c91, 0x8d91, 0x8e91, 0x8f91, 0x9091, 0x9191, 0x9291, 0x9391, 0x9491, 0x9591, 0xf0b8, 0xf1b8, 0x9691, 0xf2b8, 0xf3b8, 0x9791, 0x9891, 0x9991, 0xf4b8, 0x9a91, 0xf5b8, 0x9b91, 0x9c91, 0x9d91, 0x9e91, 0x9f91, 0xf6b8, 0xf7b8, 0xa091, 0xf8b8, 0xa191, 0xf9b8, 0xa291, 0xa391, 0xa491, 0xa591, 0xa691, 0xa791, 0xfab8, 0xa891, 0xa991, 0xaa91, 0xfbb8, 0xab91, 0xac91, 0xad91, 0xae91, 0xaf91, 0xb091, 0xb191, 0xb291, 0xb391, 0xb491, 0xb591, 0xb691, 0xb791, 0xb891, 0xb991, 0xfcb8, 0xfdb8, 0xba91, 0xbb91, 0xbc91, 0xbd91, 0xbe91, 0xbf91, 0xc091, 0xc191, 0xc291, 0xc391, 0xc491, 0xc591, 0xc691, 0xc791, 0xc891, 0xc991, 0xca91, 0xcb91, 0xcc91, 0xcd91, 0xce91, 0xcf91, 0xd091, 0xd191, 0xd291, 0xd391, 0xd491, 0xd591, 0xd691, 0xd791, 0xd891, 0xd991, 0xda91, 0xdb91, 0xfeb8, 0xdc91, 0xdd91, 0xde91, 0xa1b9, 0xdf91, 0xe091, 0xe191, 0xa2b9, 0xe291, 0xe391, 0xe491, 0xe591, 0xe691, 0xe791, 0xe891, 0xe991, 0xa3b9, 0xea91, 0xa4b9, 0xeb91, 0xa5b9, 0xec91, 0xed91, 0xee91, 0xef91, 0xf091, 0xf191, 0xa6b9, 0xf291, 0xf391, 0xf491, 0xa7b9, 0xf591, 0xf691, 0xf791, 0xa8b9, 0xf891, 0xf991, 0xfa91, 0xfb91, 0xfc91, 0xfd91, 0xfe91, 0x4192, 0xa9b9, 0x4292, 0xaab9, 0x4392, 0x4492, 0x4592, 0x4692, 0x4792, 0x4892, 0x4992, 0x4a92, 0xabb9, 0xacb9, 0xadb9, 0x4b92, 0xaeb9, 0x4c92, 0x4d92, 0xafb9, 0xb0b9, 0xb1b9, 0xb2b9, 0x4e92, 0x4f92, 0x5092, 0x5192, 0x5292, 0xb3b9, 0xb4b9, 0x5392, 0xb5b9, 0x5492, 0xb6b9, 0x5592, 0x5692, 0x5792, 0xb7b9, 0x5892, 0xb8b9, 0xb9b9, 0x5992, 0x5a92, 0x6192, 0xbab9, 0x6292, 0x6392, 0x6492, 0xbbb9, 0x6592, 0x6692, 0x6792, 0x6892, 0x6992, 0x6a92, 0x6b92, 0x6c92, 0xbcb9, 0x6d92, 0xbdb9, 0x6e92, 0x6f92, 0x7092, 0x7192, 0x7292, 0x7392, 0x7492, 0x7592, 0xbeb9, 0x7692, 0x7792, 0x7892, 0x7992, 0x7a92, 0x8192, 0x8292, 0x8392, 0x8492, 0x8592, 0x8692, 0x8792, 0x8892, 0x8992, 0x8a92, 0x8b92, 0x8c92, 0x8d92, 0x8e92, 0x8f92, 0x9092, 0x9192, 0x9292, 0x9392, 0x9492, 0x9592, 0x9692, 0xbfb9, 0x9792, 0x9892, 0x9992, 0xc0b9, 0x9a92, 0x9b92, 0x9c92, 0xc1b9, 0x9d92, 0x9e92, 0x9f92, 0xa092, 0xa192, 0xa292, 0xa392, 0xa492, 0xa592, 0xa692, 0xa792, 0xa892, 0xa992, 0xaa92, 0xab92, 0xac92, 0xad92, 0xae92, 0xaf92, 0xc2b9, 0xb092, 0xb192, 0xb292, 0xc3b9, 0xb392, 0xb492, 0xb592, 0xc4b9, 0xb692, 0xb792, 0xb892, 0xb992, 0xba92, 0xbb92, 0xbc92, 0xc5b9, 0xbd92, 0xbe92, 0xc6b9, 0xbf92, 0xc092, 0xc192, 0xc292, 0xc392, 0xc492, 0xc592, 0xc692, 0xc7b9, 0xc792, 0xc892, 0xc992, 0xc8b9, 0xca92, 0xcb92, 0xcc92, 0xc9b9, 0xcd92, 0xce92, 0xcf92, 0xd092, 0xd192, 0xd292, 0xd392, 0xcab9, 0xd492, 0xd592, 0xcbb9, 0xd692, 0xd792, 0xd892, 0xd992, 0xda92, 0xdb92, 0xdc92, 0xdd92, 0xde92, 0xdf92, 0xe092, 0xe192, 0xe292, 0xe392, 0xe492, 0xe592, 0xe692, 0xe792, 0xe892, 0xe992, 0xea92, 0xeb92, 0xec92, 0xed92, 0xee92, 0xef92, 0xf092, 0xf192, 0xf292, 0xf392, 0xf492, 0xf592, 0xf692, 0xf792, 0xf892, 0xf992, 0xccb9, 0xcdb9, 0xfa92, 0xfb92, 0xceb9, 0xfc92, 0xfd92, 0xcfb9, 0xd0b9, 0xfe92, 0xd1b9, 0x4193, 0x4293, 0x4393, 0x4493, 0x4593, 0xd2b9, 0xd3b9, 0x4693, 0xd4b9, 0xd5b9, 0xd6b9, 0x4793, 0xd7b9, 0x4893, 0xd8b9, 0x4993, 0x4a93, 0xd9b9, 0xdab9, 0xdbb9, 0xdcb9, 0xddb9, 0x4b93, 0x4c93, 0xdeb9, 0xdfb9, 0xe0b9, 0xe1b9, 0xe2b9, 0x4d93, 0x4e93, 0x4f93, 0x5093, 0xe3b9, 0xe4b9, 0x5193, 0xe5b9, 0x5293, 0xe6b9, 0x5393, 0x5493, 0x5593, 0xe7b9, 0x5693, 0x5793, 0xe8b9, 0xe9b9, 0x5893, 0x5993, 0xeab9, 0x5a93, 0x6193, 0x6293, 0xebb9, 0x6393, 0x6493, 0x6593, 0x6693, 0x6793, 0x6893, 0x6993, 0xecb9, 0xedb9, 0x6a93, 0xeeb9, 0xefb9, 0xf0b9, 0x6b93, 0x6c93, 0x6d93, 0xf1b9, 0x6e93, 0x6f93, 0xf2b9, 0xf3b9, 0x7093, 0x7193, 0xf4b9, 0x7293, 0x7393, 0x7493, 0x7593, 0x7693, 0x7793, 0x7893, 0x7993, 0x7a93, 0x8193, 0x8293, 0x8393, 0xf5b9, 0x8493, 0x8593, 0x8693, 0x8793, 0x8893, 0x8993, 0x8a93, 0x8b93, 0x8c93, 0x8d93, 0x8e93, 0x8f93, 0x9093, 0x9193, 0x9293, 0x9393, 0x9493, 0x9593, 0x9693, 0x9793, 0x9893, 0x9993, 0x9a93, 0x9b93, 0x9c93, 0x9d93, 0x9e93, 0x9f93, 0xa093, 0xa193, 0xa293, 0xa393, 0xa493, 0xa593, 0xa693, 0xa793, 0xa893, 0xa993, 0xf6b9, 0xf7b9, 0xaa93, 0xab93, 0xf8b9, 0xac93, 0xad93, 0xf9b9, 0xfab9, 0xae93, 0xfbb9, 0xaf93, 0xb093, 0xb193, 0xb293, 0xb393, 0xfcb9, 0xfdb9, 0xb493, 0xfeb9, 0xb593, 0xa1ba, 0xa2ba, 0xb693, 0xb793, 0xb893, 0xb993, 0xba93, 0xa3ba, 0xa4ba, 0xbb93, 0xbc93, 0xa5ba, 0xbd93, 0xbe93, 0xa6ba, 0xa7ba, 0xbf93, 0xc093, 0xc193, 0xc293, 0xc393, 0xc493, 0xc593, 0xa8ba, 0xa9ba, 0xc693, 0xaaba, 0xabba, 0xacba, 0xc793, 0xc893, 0xc993, 0xca93, 0xcb93, 0xcc93, 0xadba, 0xaeba, 0xcd93, 0xce93, 0xafba, 0xcf93, 0xd093, 0xd193, 0xb0ba, 0xd293, 0xd393, 0xd493, 0xd593, 0xd693, 0xd793, 0xd893, 0xd993, 0xb1ba, 0xda93, 0xb2ba, 0xb3ba, 0xb4ba, 0xdb93, 0xdc93, 0xdd93, 0xb5ba, 0xde93, 0xdf93, 0xb6ba, 0xe093, 0xe193, 0xe293, 0xb7ba, 0xe393, 0xe493, 0xe593, 0xe693, 0xe793, 0xe893, 0xe993, 0xea93, 0xeb93, 0xec93, 0xed93, 0xee93, 0xef93, 0xf093, 0xf193, 0xf293, 0xf393, 0xf493, 0xf593, 0xf693, 0xf793, 0xf893, 0xf993, 0xb8ba, 0xb9ba, 0xbaba, 0xfa93, 0xbbba, 0xfb93, 0xfc93, 0xfd93, 0xbcba, 0xfe93, 0x4194, 0x4294, 0x4394, 0x4494, 0x4594, 0x4694, 0xbdba, 0xbeba, 0x4794, 0xbfba, 0x4894, 0xc0ba, 0x4994, 0x4a94, 0x4b94, 0x4c94, 0x4d94, 0x4e94, 0xc1ba, 0x4f94, 0x5094, 0x5194, 0xc2ba, 0x5294, 0x5394, 0x5494, 0x5594, 0x5694, 0x5794, 0x5894, 0x5994, 0x5a94, 0x6194, 0x6294, 0x6394, 0x6494, 0x6594, 0x6694, 0xc3ba, 0x6794, 0x6894, 0x6994, 0x6a94, 0x6b94, 0x6c94, 0x6d94, 0xc4ba, 0x6e94, 0x6f94, 0x7094, 0x7194, 0x7294, 0x7394, 0x7494, 0x7594, 0x7694, 0x7794, 0x7894, 0x7994, 0x7a94, 0x8194, 0x8294, 0x8394, 0x8494, 0x8594, 0x8694, 0xc5ba, 0x8794, 0x8894, 0x8994, 0x8a94, 0x8b94, 0x8c94, 0x8d94, 0xc6ba, 0xc7ba, 0x8e94, 0x8f94, 0xc8ba, 0x9094, 0x9194, 0x9294, 0xc9ba, 0x9394, 0x9494, 0x9594, 0x9694, 0x9794, 0x9894, 0x9994, 0xcaba, 0xcbba, 0x9a94, 0x9b94, 0x9c94, 0x9d94, 0x9e94, 0x9f94, 0xa094, 0xa194, 0xa294, 0xa394, 0xccba, 0xa494, 0xa594, 0xa694, 0xcdba, 0xa794, 0xa894, 0xa994, 0xaa94, 0xab94, 0xac94, 0xad94, 0xae94, 0xaf94, 0xb094, 0xb194, 0xb294, 0xb394, 0xb494, 0xb594, 0xb694, 0xb794, 0xb894, 0xb994, 0xba94, 0xbb94, 0xbc94, 0xbd94, 0xceba, 0xcfba, 0xbe94, 0xbf94, 0xd0ba, 0xc094, 0xc194, 0xd1ba, 0xd2ba, 0xd3ba, 0xd4ba, 0xc294, 0xc394, 0xc494, 0xc594, 0xc694, 0xd5ba, 0xd6ba, 0xc794, 0xd7ba, 0xc894, 0xd8ba, 0xc994, 0xca94, 0xcb94, 0xd9ba, 0xdaba, 0xcc94, 0xdbba, 0xcd94, 0xce94, 0xcf94, 0xd094, 0xd194, 0xd294, 0xd394, 0xdcba, 0xd494, 0xd594, 0xd694, 0xd794, 0xd894, 0xd994, 0xda94, 0xdb94, 0xdc94, 0xdd94, 0xde94, 0xddba, 0xdf94, 0xe094, 0xe194, 0xe294, 0xe394, 0xe494, 0xe594, 0xdeba, 0xe694, 0xe794, 0xe894, 0xe994, 0xea94, 0xeb94, 0xec94, 0xed94, 0xee94, 0xef94, 0xf094, 0xf194, 0xf294, 0xf394, 0xf494, 0xf594, 0xf694, 0xf794, 0xf894, 0xf994, 0xfa94, 0xfb94, 0xfc94, 0xfd94, 0xfe94, 0x4195, 0x4295, 0xdfba, 0xe0ba, 0x4395, 0x4495, 0xe1ba, 0x4595, 0x4695, 0x4795, 0xe2ba, 0x4895, 0x4995, 0x4a95, 0x4b95, 0x4c95, 0x4d95, 0x4e95, 0x4f95, 0x5095, 0x5195, 0x5295, 0x5395, 0xe3ba, 0x5495, 0x5595, 0x5695, 0x5795, 0x5895, 0x5995, 0xe4ba, 0x5a95, 0x6195, 0x6295, 0xe5ba, 0x6395, 0x6495, 0x6595, 0xe6ba, 0x6695, 0x6795, 0x6895, 0x6995, 0x6a95, 0x6b95, 0x6c95, 0xe7ba, 0x6d95, 0x6e95, 0xe8ba, 0x6f95, 0xe9ba, 0x7095, 0x7195, 0x7295, 0x7395, 0x7495, 0x7595, 0xeaba, 0xebba, 0x7695, 0x7795, 0xecba, 0x7895, 0x7995, 0x7a95, 0xedba, 0x8195, 0x8295, 0x8395, 0x8495, 0x8595, 0x8695, 0x8795, 0xeeba, 0xefba, 0x8895, 0xf0ba, 0x8995, 0x8a95, 0x8b95, 0x8c95, 0x8d95, 0x8e95, 0x8f95, 0x9095, 0x9195, 0x9295, 0x9395, 0x9495, 0x9595, 0x9695, 0x9795, 0x9895, 0x9995, 0x9a95, 0x9b95, 0x9c95, 0x9d95, 0x9e95, 0x9f95, 0xa095, 0xa195, 0xa295, 0xa395, 0xa495, 0xa595, 0xa695, 0xa795, 0xa895, 0xa995, 0xaa95, 0xab95, 0xac95, 0xf1ba, 0xf2ba, 0xad95, 0xae95, 0xf3ba, 0xaf95, 0xb095, 0xb195, 0xf4ba, 0xb295, 0xf5ba, 0xb395, 0xb495, 0xb595, 0xb695, 0xb795, 0xf6ba, 0xf7ba, 0xb895, 0xf8ba, 0xb995, 0xf9ba, 0xfaba, 0xfbba, 0xba95, 0xbb95, 0xbc95, 0xbd95, 0xfcba, 0xfdba, 0xbe95, 0xbf95, 0xfeba, 0xc095, 0xc195, 0xc295, 0xa1bb, 0xc395, 0xa2bb, 0xc495, 0xc595, 0xc695, 0xc795, 0xc895, 0xa3bb, 0xa4bb, 0xc995, 0xa5bb, 0xa6bb, 0xa7bb, 0xca95, 0xcb95, 0xcc95, 0xcd95, 0xce95, 0xa8bb, 0xa9bb, 0xaabb, 0xcf95, 0xd095, 0xabbb, 0xd195, 0xd295, 0xd395, 0xacbb, 0xd495, 0xd595, 0xd695, 0xd795, 0xd895, 0xd995, 0xda95, 0xadbb, 0xaebb, 0xdb95, 0xafbb, 0xb0bb, 0xb1bb, 0xdc95, 0xdd95, 0xde95, 0xdf95, 0xe095, 0xe195, 0xb2bb, 0xb3bb, 0xe295, 0xe395, 0xe495, 0xe595, 0xe695, 0xe795, 0xe895, 0xe995, 0xea95, 0xeb95, 0xec95, 0xed95, 0xee95, 0xef95, 0xb4bb, 0xf095, 0xf195, 0xf295, 0xf395, 0xf495, 0xf595, 0xf695, 0xf795, 0xf895, 0xf995, 0xfa95, 0xfb95, 0xfc95, 0xfd95, 0xfe95, 0x4196, 0x4296, 0x4396, 0x4496, 0x4596, 0x4696, 0x4796, 0x4896, 0x4996, 0x4a96, 0x4b96, 0x4c96, 0x4d96, 0x4e96, 0x4f96, 0x5096, 0x5196, 0x5296, 0x5396, 0x5496, 0x5596, 0x5696, 0x5796, 0x5896, 0xb5bb, 0xb6bb, 0x5996, 0x5a96, 0xb7bb, 0x6196, 0x6296, 0xb8bb, 0xb9bb, 0x6396, 0x6496, 0x6596, 0x6696, 0x6796, 0x6896, 0x6996, 0xbabb, 0x6a96, 0x6b96, 0xbbbb, 0xbcbb, 0xbdbb, 0x6c96, 0x6d96, 0x6e96, 0x6f96, 0x7096, 0x7196, 0xbebb, 0x7296, 0x7396, 0x7496, 0x7596, 0x7696, 0x7796, 0x7896, 0x7996, 0x7a96, 0x8196, 0x8296, 0x8396, 0x8496, 0x8596, 0x8696, 0x8796, 0x8896, 0x8996, 0x8a96, 0x8b96, 0xbfbb, 0x8c96, 0x8d96, 0x8e96, 0x8f96, 0x9096, 0x9196, 0xc0bb, 0xc1bb, 0x9296, 0x9396, 0x9496, 0x9596, 0x9696, 0x9796, 0x9896, 0x9996, 0x9a96, 0x9b96, 0x9c96, 0x9d96, 0x9e96, 0x9f96, 0xc2bb, 0xc3bb, 0xa096, 0xc4bb, 0xc5bb, 0xc6bb, 0xa196, 0xa296, 0xa396, 0xa496, 0xa596, 0xa696, 0xa796, 0xa896, 0xa996, 0xaa96, 0xab96, 0xac96, 0xad96, 0xae96, 0xaf96, 0xb096, 0xb196, 0xb296, 0xb396, 0xb496, 0xb596, 0xb696, 0xb796, 0xb896, 0xb996, 0xba96, 0xbb96, 0xbc96, 0xbd96, 0xbe96, 0xbf96, 0xc096, 0xc196, 0xc296, 0xc7bb, 0xc8bb, 0xc396, 0xc496, 0xc9bb, 0xc596, 0xc696, 0xc796, 0xcabb, 0xc896, 0xc996, 0xca96, 0xcb96, 0xcc96, 0xcd96, 0xce96, 0xcbbb, 0xccbb, 0xcf96, 0xd096, 0xd196, 0xcdbb, 0xd296, 0xd396, 0xd496, 0xd596, 0xd696, 0xd796, 0xd896, 0xd996, 0xda96, 0xdb96, 0xdc96, 0xdd96, 0xde96, 0xdf96, 0xe096, 0xe196, 0xe296, 0xe396, 0xe496, 0xe596, 0xe696, 0xe796, 0xe896, 0xe996, 0xea96, 0xeb96, 0xec96, 0xed96, 0xee96, 0xef96, 0xf096, 0xf196, 0xf296, 0xf396, 0xf496, 0xf596, 0xf696, 0xf796, 0xf896, 0xf996, 0xfa96, 0xfb96, 0xfc96, 0xfd96, 0xfe96, 0x4197, 0x4297, 0x4397, 0x4497, 0x4597, 0x4697, 0x4797, 0x4897, 0x4997, 0x4a97, 0x4b97, 0x4c97, 0x4d97, 0x4e97, 0x4f97, 0x5097, 0x5197, 0xcebb, 0x5297, 0x5397, 0x5497, 0x5597, 0x5697, 0x5797, 0x5897, 0x5997, 0x5a97, 0x6197, 0x6297, 0x6397, 0x6497, 0x6597, 0x6697, 0x6797, 0x6897, 0x6997, 0x6a97, 0x6b97, 0x6c97, 0x6d97, 0x6e97, 0x6f97, 0x7097, 0x7197, 0x7297, 0xcfbb, 0x7397, 0x7497, 0x7597, 0x7697, 0x7797, 0x7897, 0x7997, 0x7a97, 0x8197, 0x8297, 0x8397, 0x8497, 0x8597, 0x8697, 0x8797, 0x8897, 0x8997, 0x8a97, 0x8b97, 0x8c97, 0xd0bb, 0x8d97, 0x8e97, 0x8f97, 0x9097, 0x9197, 0x9297, 0xd1bb, 0xd2bb, 0x9397, 0x9497, 0xd3bb, 0x9597, 0x9697, 0x9797, 0xd4bb, 0x9897, 0x9997, 0x9a97, 0x9b97, 0x9c97, 0x9d97, 0x9e97, 0xd5bb, 0x9f97, 0xa097, 0xd6bb, 0xa197, 0xd7bb, 0xa297, 0xa397, 0xa497, 0xa597, 0xa697, 0xa797, 0xa897, 0xa997, 0xaa97, 0xab97, 0xac97, 0xad97, 0xae97, 0xaf97, 0xb097, 0xb197, 0xb297, 0xb397, 0xb497, 0xb597, 0xb697, 0xb797, 0xb897, 0xb997, 0xba97, 0xbb97, 0xbc97, 0xbd97, 0xbe97, 0xbf97, 0xc097, 0xc197, 0xc297, 0xc397, 0xc497, 0xc597, 0xc697, 0xc797, 0xc897, 0xc997, 0xca97, 0xcb97, 0xcc97, 0xcd97, 0xce97, 0xcf97, 0xd097, 0xd197, 0xd297, 0xd397, 0xd497, 0xd597, 0xd697, 0xd797, 0xd897, 0xd997, 0xda97, 0xdb97, 0xdc97, 0xdd97, 0xde97, 0xdf97, 0xe097, 0xe197, 0xe297, 0xe397, 0xe497, 0xe597, 0xe697, 0xe797, 0xe897, 0xe997, 0xea97, 0xeb97, 0xec97, 0xed97, 0xee97, 0xef97, 0xf097, 0xf197, 0xf297, 0xf397, 0xf497, 0xf597, 0xf697, 0xf797, 0xf897, 0xf997, 0xfa97, 0xfb97, 0xd8bb, 0xfc97, 0xfd97, 0xfe97, 0x4198, 0x4298, 0x4398, 0x4498, 0x4598, 0x4698, 0x4798, 0x4898, 0x4998, 0x4a98, 0x4b98, 0x4c98, 0x4d98, 0x4e98, 0x4f98, 0x5098, 0x5198, 0xd9bb, 0x5298, 0x5398, 0x5498, 0x5598, 0x5698, 0x5798, 0xdabb, 0x5898, 0x5998, 0x5a98, 0xdbbb, 0x6198, 0x6298, 0x6398, 0xdcbb, 0x6498, 0x6598, 0x6698, 0x6798, 0x6898, 0x6998, 0x6a98, 0xddbb, 0xdebb, 0x6b98, 0x6c98, 0x6d98, 0x6e98, 0x6f98, 0x7098, 0x7198, 0x7298, 0x7398, 0x7498, 0x7598, 0x7698, 0x7798, 0x7898, 0x7998, 0x7a98, 0x8198, 0x8298, 0x8398, 0x8498, 0x8598, 0x8698, 0x8798, 0x8898, 0x8998, 0x8a98, 0x8b98, 0x8c98, 0x8d98, 0x8e98, 0x8f98, 0x9098, 0x9198, 0x9298, 0x9398, 0x9498, 0x9598, 0x9698, 0xdfbb, 0xe0bb, 0x9798, 0x9898, 0xe1bb, 0x9998, 0x9a98, 0x9b98, 0xe2bb, 0x9c98, 0x9d98, 0x9e98, 0x9f98, 0xa098, 0xa198, 0xa298, 0xe3bb, 0xe4bb, 0xa398, 0xe5bb, 0xa498, 0xe6bb, 0xa598, 0xa698, 0xa798, 0xa898, 0xa998, 0xaa98, 0xe7bb, 0xe8bb, 0xab98, 0xe9bb, 0xeabb, 0xac98, 0xad98, 0xebbb, 0xecbb, 0xedbb, 0xeebb, 0xae98, 0xaf98, 0xb098, 0xb198, 0xb298, 0xefbb, 0xf0bb, 0xb398, 0xf1bb, 0xf2bb, 0xf3bb, 0xb498, 0xb598, 0xb698, 0xf4bb, 0xb798, 0xb898, 0xf5bb, 0xf6bb, 0xb998, 0xba98, 0xf7bb, 0xbb98, 0xbc98, 0xbd98, 0xf8bb, 0xbe98, 0xbf98, 0xc098, 0xc198, 0xc298, 0xc398, 0xc498, 0xf9bb, 0xfabb, 0xc598, 0xfbbb, 0xfcbb, 0xfdbb, 0xc698, 0xc798, 0xc898, 0xc998, 0xca98, 0xcb98, 0xfebb, 0xa1bc, 0xcc98, 0xcd98, 0xa2bc, 0xce98, 0xcf98, 0xd098, 0xa3bc, 0xd198, 0xd298, 0xd398, 0xd498, 0xd598, 0xd698, 0xd798, 0xa4bc, 0xa5bc, 0xd898, 0xa6bc, 0xd998, 0xa7bc, 0xda98, 0xdb98, 0xdc98, 0xdd98, 0xde98, 0xdf98, 0xa8bc, 0xe098, 0xe198, 0xe298, 0xa9bc, 0xe398, 0xe498, 0xe598, 0xaabc, 0xe698, 0xe798, 0xe898, 0xe998, 0xea98, 0xeb98, 0xec98, 0xabbc, 0xed98, 0xee98, 0xef98, 0xf098, 0xacbc, 0xf198, 0xf298, 0xf398, 0xf498, 0xf598, 0xf698, 0xadbc, 0xaebc, 0xafbc, 0xb0bc, 0xb1bc, 0xf798, 0xf898, 0xb2bc, 0xb3bc, 0xf998, 0xb4bc, 0xb5bc, 0xfa98, 0xfb98, 0xfc98, 0xfd98, 0xb6bc, 0xb7bc, 0xfe98, 0xb8bc, 0xb9bc, 0xbabc, 0x4199, 0x4299, 0x4399, 0x4499, 0xbbbc, 0x4599, 0xbcbc, 0xbdbc, 0x4699, 0x4799, 0xbebc, 0x4899, 0x4999, 0x4a99, 0xbfbc, 0x4b99, 0x4c99, 0x4d99, 0x4e99, 0x4f99, 0x5099, 0x5199, 0xc0bc, 0xc1bc, 0x5299, 0xc2bc, 0xc3bc, 0xc4bc, 0x5399, 0x5499, 0x5599, 0x5699, 0x5799, 0x5899, 0xc5bc, 0xc6bc, 0x5999, 0x5a99, 0xc7bc, 0x6199, 0x6299, 0x6399, 0xc8bc, 0x6499, 0x6599, 0x6699, 0x6799, 0x6899, 0x6999, 0x6a99, 0xc9bc, 0xcabc, 0x6b99, 0xcbbc, 0xccbc, 0xcdbc, 0x6c99, 0x6d99, 0x6e99, 0x6f99, 0x7099, 0x7199, 0xcebc, 0x7299, 0x7399, 0x7499, 0xcfbc, 0x7599, 0x7699, 0x7799, 0xd0bc, 0x7899, 0x7999, 0x7a99, 0x8199, 0x8299, 0x8399, 0x8499, 0x8599, 0x8699, 0x8799, 0x8899, 0x8999, 0xd1bc, 0x8a99, 0x8b99, 0x8c99, 0x8d99, 0x8e99, 0x8f99, 0xd2bc, 0xd3bc, 0xd4bc, 0x9099, 0xd5bc, 0x9199, 0x9299, 0x9399, 0xd6bc, 0x9499, 0xd7bc, 0x9599, 0x9699, 0x9799, 0x9899, 0x9999, 0xd8bc, 0xd9bc, 0x9a99, 0xdabc, 0x9b99, 0xdbbc, 0x9c99, 0x9d99, 0x9e99, 0xdcbc, 0x9f99, 0xa099, 0xddbc, 0xdebc, 0xa199, 0xa299, 0xdfbc, 0xa399, 0xa499, 0xa599, 0xe0bc, 0xa699, 0xa799, 0xa899, 0xa999, 0xaa99, 0xab99, 0xac99, 0xad99, 0xae99, 0xaf99, 0xb099, 0xb199, 0xe1bc, 0xb299, 0xb399, 0xb499, 0xb599, 0xb699, 0xb799, 0xe2bc, 0xb899, 0xb999, 0xba99, 0xe3bc, 0xbb99, 0xbc99, 0xbd99, 0xe4bc, 0xbe99, 0xbf99, 0xc099, 0xc199, 0xc299, 0xc399, 0xc499, 0xe5bc, 0xc599, 0xc699, 0xe6bc, 0xe7bc, 0xc799, 0xc899, 0xc999, 0xca99, 0xcb99, 0xcc99, 0xcd99, 0xe8bc, 0xce99, 0xcf99, 0xd099, 0xe9bc, 0xd199, 0xd299, 0xd399, 0xeabc, 0xd499, 0xd599, 0xd699, 0xd799, 0xd899, 0xd999, 0xda99, 0xebbc, 0xecbc, 0xdb99, 0xedbc, 0xdc99, 0xdd99, 0xde99, 0xdf99, 0xe099, 0xe199, 0xe299, 0xe399, 0xeebc, 0xefbc, 0xe499, 0xe599, 0xf0bc, 0xe699, 0xe799, 0xe899, 0xf1bc, 0xe999, 0xea99, 0xeb99, 0xec99, 0xed99, 0xee99, 0xef99, 0xf2bc, 0xf3bc, 0xf099, 0xf4bc, 0xf199, 0xf5bc, 0xf299, 0xf399, 0xf499, 0xf599, 0xf699, 0xf799, 0xf6bc, 0xf7bc, 0xf899, 0xf999, 0xf8bc, 0xfa99, 0xfb99, 0xf9bc, 0xfabc, 0xfc99, 0xfd99, 0xfe99, 0x419a, 0x429a, 0x439a, 0x449a, 0xfbbc, 0xfcbc, 0x459a, 0xfdbc, 0x469a, 0xfebc, 0x479a, 0xa1bd, 0x489a, 0xa2bd, 0xa3bd, 0x499a, 0xa4bd, 0x4a9a, 0x4b9a, 0x4c9a, 0x4d9a, 0x4e9a, 0x4f9a, 0x509a, 0x519a, 0x529a, 0x539a, 0x549a, 0x559a, 0x569a, 0x579a, 0x589a, 0x599a, 0x5a9a, 0x619a, 0x629a, 0xa5bd, 0x639a, 0x649a, 0x659a, 0x669a, 0x679a, 0x689a, 0x699a, 0xa6bd, 0xa7bd, 0x6a9a, 0x6b9a, 0xa8bd, 0x6c9a, 0x6d9a, 0x6e9a, 0xa9bd, 0x6f9a, 0x709a, 0x719a, 0x729a, 0x739a, 0x749a, 0x759a, 0xaabd, 0x769a, 0x779a, 0x789a, 0x799a, 0xabbd, 0x7a9a, 0x819a, 0x829a, 0x839a, 0x849a, 0x859a, 0xacbd, 0xadbd, 0x869a, 0x879a, 0xaebd, 0x889a, 0x899a, 0x8a9a, 0xafbd, 0x8b9a, 0x8c9a, 0x8d9a, 0x8e9a, 0x8f9a, 0x909a, 0x919a, 0xb0bd, 0xb1bd, 0x929a, 0xb2bd, 0x939a, 0xb3bd, 0x949a, 0x959a, 0x969a, 0x979a, 0x989a, 0x999a, 0xb4bd, 0xb5bd, 0x9a9a, 0x9b9a, 0x9c9a, 0x9d9a, 0x9e9a, 0x9f9a, 0xb6bd, 0xa09a, 0xa19a, 0xa29a, 0xa39a, 0xa49a, 0xa59a, 0xa69a, 0xb7bd, 0xa79a, 0xa89a, 0xb8bd, 0xa99a, 0xb9bd, 0xaa9a, 0xab9a, 0xac9a, 0xad9a, 0xae9a, 0xaf9a, 0xbabd, 0xbbbd, 0xb09a, 0xb19a, 0xbcbd, 0xb29a, 0xb39a, 0xb49a, 0xbdbd, 0xbebd, 0xb59a, 0xb69a, 0xb79a, 0xb89a, 0xb99a, 0xba9a, 0xbfbd, 0xc0bd, 0xbb9a, 0xc1bd, 0xbc9a, 0xc2bd, 0xbd9a, 0xbe9a, 0xbf9a, 0xc09a, 0xc19a, 0xc29a, 0xc39a, 0xc49a, 0xc59a, 0xc69a, 0xc79a, 0xc89a, 0xc99a, 0xca9a, 0xcb9a, 0xcc9a, 0xcd9a, 0xce9a, 0xcf9a, 0xd09a, 0xd19a, 0xd29a, 0xd39a, 0xd49a, 0xd59a, 0xd69a, 0xd79a, 0xd89a, 0xd99a, 0xda9a, 0xdb9a, 0xdc9a, 0xdd9a, 0xde9a, 0xc3bd, 0xc4bd, 0xdf9a, 0xe09a, 0xc5bd, 0xe19a, 0xe29a, 0xc6bd, 0xc7bd, 0xe39a, 0xe49a, 0xe59a, 0xe69a, 0xe79a, 0xe89a, 0xc8bd, 0xc9bd, 0xcabd, 0xe99a, 0xcbbd, 0xea9a, 0xccbd, 0xeb9a, 0xec9a, 0xed9a, 0xee9a, 0xcdbd, 0xef9a, 0xcebd, 0xcfbd, 0xf09a, 0xd0bd, 0xd1bd, 0xf19a, 0xf29a, 0xf39a, 0xd2bd, 0xf49a, 0xf59a, 0xf69a, 0xf79a, 0xf89a, 0xf99a, 0xfa9a, 0xd3bd, 0xd4bd, 0xfb9a, 0xfc9a, 0xd5bd, 0xd6bd, 0xfd9a, 0xfe9a, 0x419b, 0x429b, 0x439b, 0xd7bd, 0xd8bd, 0xd9bd, 0x449b, 0x459b, 0xdabd, 0x469b, 0x479b, 0x489b, 0xdbbd, 0x499b, 0x4a9b, 0x4b9b, 0x4c9b, 0x4d9b, 0x4e9b, 0x4f9b, 0xdcbd, 0xddbd, 0x509b, 0x519b, 0xdebd, 0xdfbd, 0x529b, 0x539b, 0x549b, 0x559b, 0x569b, 0x579b, 0x589b, 0x599b, 0x5a9b, 0x619b, 0x629b, 0x639b, 0x649b, 0x659b, 0x669b, 0x679b, 0x689b, 0x699b, 0x6a9b, 0x6b9b, 0x6c9b, 0x6d9b, 0x6e9b, 0x6f9b, 0x709b, 0x719b, 0x729b, 0xe0bd, 0x739b, 0x749b, 0x759b, 0x769b, 0x779b, 0x789b, 0x799b, 0x7a9b, 0x819b, 0x829b, 0x839b, 0x849b, 0x859b, 0x869b, 0x879b, 0x889b, 0x899b, 0x8a9b, 0x8b9b, 0x8c9b, 0x8d9b, 0x8e9b, 0x8f9b, 0x909b, 0x919b, 0x929b, 0x939b, 0x949b, 0x959b, 0x969b, 0x979b, 0x989b, 0x999b, 0x9a9b, 0xe1bd, 0xe2bd, 0x9b9b, 0x9c9b, 0xe3bd, 0x9d9b, 0x9e9b, 0x9f9b, 0xe4bd, 0xa09b, 0xe5bd, 0xa19b, 0xa29b, 0xa39b, 0xa49b, 0xa59b, 0xe6bd, 0xe7bd, 0xa69b, 0xa79b, 0xe8bd, 0xe9bd, 0xa89b, 0xa99b, 0xaa9b, 0xab9b, 0xac9b, 0xad9b, 0xeabd, 0xae9b, 0xaf9b, 0xb09b, 0xebbd, 0xb19b, 0xb29b, 0xb39b, 0xecbd, 0xb49b, 0xb59b, 0xb69b, 0xb79b, 0xb89b, 0xb99b, 0xba9b, 0xbb9b, 0xbc9b, 0xbd9b, 0xbe9b, 0xbf9b, 0xc09b, 0xc19b, 0xc29b, 0xc39b, 0xc49b, 0xc59b, 0xc69b, 0xc79b, 0xc89b, 0xc99b, 0xca9b, 0xcb9b, 0xcc9b, 0xcd9b, 0xce9b, 0xcf9b, 0xd09b, 0xd19b, 0xd29b, 0xd39b, 0xd49b, 0xd59b, 0xd69b, 0xd79b, 0xd89b, 0xd99b, 0xda9b, 0xdb9b, 0xdc9b, 0xdd9b, 0xde9b, 0xdf9b, 0xe09b, 0xe19b, 0xe29b, 0xe39b, 0xe49b, 0xe59b, 0xe69b, 0xedbd, 0xe79b, 0xe89b, 0xe99b, 0xea9b, 0xeb9b, 0xec9b, 0xed9b, 0xee9b, 0xef9b, 0xf09b, 0xf19b, 0xf29b, 0xf39b, 0xf49b, 0xf59b, 0xf69b, 0xf79b, 0xf89b, 0xf99b, 0xfa9b, 0xfb9b, 0xfc9b, 0xfd9b, 0xeebd, 0xefbd, 0xfe9b, 0x419c, 0xf0bd, 0x429c, 0x439c, 0xf1bd, 0xf2bd, 0x449c, 0xf3bd, 0x459c, 0x469c, 0x479c, 0x489c, 0x499c, 0xf4bd, 0xf5bd, 0x4a9c, 0x4b9c, 0x4c9c, 0xf6bd, 0x4d9c, 0x4e9c, 0x4f9c, 0x509c, 0x519c, 0x529c, 0xf7bd, 0xf8bd, 0x539c, 0x549c, 0xf9bd, 0x559c, 0x569c, 0x579c, 0x589c, 0x599c, 0x5a9c, 0x619c, 0x629c, 0x639c, 0x649c, 0x659c, 0x669c, 0x679c, 0x689c, 0x699c, 0xfabd, 0x6a9c, 0x6b9c, 0x6c9c, 0x6d9c, 0x6e9c, 0x6f9c, 0x709c, 0xfbbd, 0x719c, 0x729c, 0x739c, 0x749c, 0x759c, 0x769c, 0x779c, 0x789c, 0x799c, 0x7a9c, 0x819c, 0x829c, 0x839c, 0x849c, 0x859c, 0x869c, 0x879c, 0x889c, 0x899c, 0xfcbd, 0x8a9c, 0x8b9c, 0x8c9c, 0x8d9c, 0x8e9c, 0x8f9c, 0x909c, 0xfdbd, 0x919c, 0x929c, 0x939c, 0xfebd, 0x949c, 0x959c, 0x969c, 0xa1be, 0x979c, 0x989c, 0x999c, 0x9a9c, 0x9b9c, 0x9c9c, 0x9d9c, 0xa2be, 0xa3be, 0x9e9c, 0x9f9c, 0xa09c, 0xa19c, 0xa29c, 0xa39c, 0xa49c, 0xa59c, 0xa69c, 0xa79c, 0xa4be, 0xa89c, 0xa99c, 0xaa9c, 0xab9c, 0xac9c, 0xad9c, 0xae9c, 0xaf9c, 0xb09c, 0xb19c, 0xb29c, 0xb39c, 0xb49c, 0xb59c, 0xb69c, 0xb79c, 0xb89c, 0xb99c, 0xba9c, 0xbb9c, 0xbc9c, 0xbd9c, 0xbe9c, 0xbf9c, 0xc09c, 0xc19c, 0xc29c, 0xa5be, 0xa6be, 0xc39c, 0xc49c, 0xa7be, 0xc59c, 0xc69c, 0xc79c, 0xa8be, 0xc89c, 0xc99c, 0xca9c, 0xcb9c, 0xcc9c, 0xcd9c, 0xce9c, 0xa9be, 0xaabe, 0xcf9c, 0xd09c, 0xd19c, 0xabbe, 0xd29c, 0xd39c, 0xd49c, 0xd59c, 0xd69c, 0xd79c, 0xacbe, 0xd89c, 0xd99c, 0xda9c, 0xdb9c, 0xdc9c, 0xdd9c, 0xde9c, 0xdf9c, 0xe09c, 0xe19c, 0xe29c, 0xe39c, 0xe49c, 0xe59c, 0xe69c, 0xe79c, 0xe89c, 0xe99c, 0xea9c, 0xadbe, 0xeb9c, 0xec9c, 0xed9c, 0xee9c, 0xef9c, 0xf09c, 0xf19c, 0xaebe, 0xf29c, 0xf39c, 0xf49c, 0xf59c, 0xf69c, 0xf79c, 0xf89c, 0xf99c, 0xfa9c, 0xfb9c, 0xfc9c, 0xfd9c, 0xfe9c, 0x419d, 0x429d, 0x439d, 0x449d, 0x459d, 0x469d, 0x479d, 0x489d, 0x499d, 0x4a9d, 0x4b9d, 0x4c9d, 0x4d9d, 0x4e9d, 0xafbe, 0x4f9d, 0x509d, 0x519d, 0xb0be, 0x529d, 0x539d, 0x549d, 0x559d, 0x569d, 0x579d, 0x589d, 0x599d, 0x5a9d, 0x619d, 0x629d, 0x639d, 0x649d, 0x659d, 0x669d, 0x679d, 0x689d, 0x699d, 0x6a9d, 0x6b9d, 0x6c9d, 0x6d9d, 0x6e9d, 0x6f9d, 0x709d, 0x719d, 0x729d, 0x739d, 0x749d, 0x759d, 0x769d, 0x779d, 0x789d, 0x799d, 0x7a9d, 0x819d, 0x829d, 0x839d, 0x849d, 0x859d, 0x869d, 0x879d, 0x889d, 0x899d, 0xb1be, 0x8a9d, 0x8b9d, 0x8c9d, 0x8d9d, 0x8e9d, 0x8f9d, 0xb2be, 0xb3be, 0x909d, 0x919d, 0xb4be, 0x929d, 0x939d, 0x949d, 0xb5be, 0x959d, 0xb6be, 0x969d, 0x979d, 0x989d, 0x999d, 0xb7be, 0xb8be, 0xb9be, 0x9a9d, 0x9b9d, 0x9c9d, 0x9d9d, 0x9e9d, 0x9f9d, 0xa09d, 0xa19d, 0xa29d, 0xa39d, 0xbabe, 0xa49d, 0xa59d, 0xa69d, 0xbbbe, 0xa79d, 0xa89d, 0xa99d, 0xbcbe, 0xaa9d, 0xab9d, 0xac9d, 0xad9d, 0xae9d, 0xaf9d, 0xb09d, 0xbdbe, 0xb19d, 0xb29d, 0xb39d, 0xb49d, 0xb59d, 0xb69d, 0xb79d, 0xb89d, 0xb99d, 0xba9d, 0xbb9d, 0xbebe, 0xbfbe, 0xbc9d, 0xbd9d, 0xc0be, 0xbe9d, 0xbf9d, 0xc09d, 0xc1be, 0xc19d, 0xc29d, 0xc39d, 0xc49d, 0xc59d, 0xc69d, 0xc79d, 0xc2be, 0xc3be, 0xc89d, 0xc4be, 0xc99d, 0xc5be, 0xca9d, 0xcb9d, 0xcc9d, 0xcd9d, 0xce9d, 0xcf9d, 0xc6be, 0xc7be, 0xd09d, 0xd19d, 0xc8be, 0xc9be, 0xcabe, 0xd29d, 0xcbbe, 0xccbe, 0xcdbe, 0xd39d, 0xd49d, 0xd59d, 0xd69d, 0xcebe, 0xcfbe, 0xd0be, 0xd79d, 0xd1be, 0xd2be, 0xd3be, 0xd89d, 0xd99d, 0xda9d, 0xd4be, 0xd5be, 0xdb9d, 0xd6be, 0xd7be, 0xdc9d, 0xdd9d, 0xd8be, 0xde9d, 0xdf9d, 0xe09d, 0xd9be, 0xe19d, 0xe29d, 0xe39d, 0xe49d, 0xe59d, 0xe69d, 0xe79d, 0xdabe, 0xdbbe, 0xe89d, 0xdcbe, 0xddbe, 0xdebe, 0xe99d, 0xea9d, 0xeb9d, 0xec9d, 0xed9d, 0xee9d, 0xdfbe, 0xe0be, 0xef9d, 0xf09d, 0xe1be, 0xf19d, 0xf29d, 0xf39d, 0xe2be, 0xf49d, 0xf59d, 0xe3be, 0xf69d, 0xf79d, 0xf89d, 0xf99d, 0xe4be, 0xe5be, 0xfa9d, 0xe6be, 0xfb9d, 0xe7be, 0xfc9d, 0xfd9d, 0xfe9d, 0xe8be, 0x419e, 0xe9be, 0xeabe, 0x429e, 0x439e, 0x449e, 0xebbe, 0x459e, 0x469e, 0x479e, 0xecbe, 0x489e, 0x499e, 0x4a9e, 0x4b9e, 0x4c9e, 0x4d9e, 0x4e9e, 0x4f9e, 0xedbe, 0x509e, 0x519e, 0x529e, 0x539e, 0x549e, 0x559e, 0x569e, 0x579e, 0x589e, 0x599e, 0xeebe, 0xefbe, 0x5a9e, 0x619e, 0xf0be, 0xf1be, 0x629e, 0xf2be, 0xf3be, 0xf4be, 0xf5be, 0x639e, 0x649e, 0x659e, 0x669e, 0x679e, 0xf6be, 0xf7be, 0xf8be, 0xf9be, 0xfabe, 0xfbbe, 0xfcbe, 0x689e, 0xfdbe, 0x699e, 0xfebe, 0x6a9e, 0xa1bf, 0xa2bf, 0x6b9e, 0x6c9e, 0xa3bf, 0x6d9e, 0x6e9e, 0x6f9e, 0xa4bf, 0x709e, 0x719e, 0x729e, 0x739e, 0x749e, 0x759e, 0x769e, 0xa5bf, 0xa6bf, 0x779e, 0xa7bf, 0x789e, 0xa8bf, 0x799e, 0x7a9e, 0x819e, 0x829e, 0x839e, 0x849e, 0xa9bf, 0xaabf, 0xabbf, 0x859e, 0xacbf, 0x869e, 0x879e, 0x889e, 0xadbf, 0x899e, 0xaebf, 0xafbf, 0x8a9e, 0x8b9e, 0x8c9e, 0x8d9e, 0xb0bf, 0xb1bf, 0xb2bf, 0xb3bf, 0xb4bf, 0xb5bf, 0x8e9e, 0x8f9e, 0x909e, 0xb6bf, 0xb7bf, 0xb8bf, 0xb9bf, 0x919e, 0x929e, 0x939e, 0xbabf, 0x949e, 0x959e, 0x969e, 0xbbbf, 0x979e, 0x989e, 0x999e, 0x9a9e, 0x9b9e, 0x9c9e, 0x9d9e, 0xbcbf, 0xbdbf, 0x9e9e, 0xbebf, 0xbfbf, 0x9f9e, 0xa09e, 0xa19e, 0xa29e, 0xa39e, 0xa49e, 0xa59e, 0xc0bf, 0xc1bf, 0xa69e, 0xa79e, 0xc2bf, 0xa89e, 0xa99e, 0xaa9e, 0xc3bf, 0xc4bf, 0xc5bf, 0xab9e, 0xc6bf, 0xac9e, 0xad9e, 0xc7bf, 0xc8bf, 0xc9bf, 0xae9e, 0xcabf, 0xaf9e, 0xcbbf, 0xb09e, 0xccbf, 0xb19e, 0xb29e, 0xb39e, 0xb49e, 0xcdbf, 0xcebf, 0xb59e, 0xb69e, 0xcfbf, 0xb79e, 0xb89e, 0xb99e, 0xd0bf, 0xba9e, 0xbb9e, 0xbc9e, 0xbd9e, 0xbe9e, 0xbf9e, 0xc09e, 0xd1bf, 0xd2bf, 0xc19e, 0xd3bf, 0xd4bf, 0xd5bf, 0xc29e, 0xc39e, 0xc49e, 0xc59e, 0xc69e, 0xc79e, 0xd6bf, 0xd7bf, 0xc89e, 0xc99e, 0xd8bf, 0xca9e, 0xcb9e, 0xcc9e, 0xcd9e, 0xce9e, 0xcf9e, 0xd09e, 0xd19e, 0xd29e, 0xd39e, 0xd49e, 0xd9bf, 0xd59e, 0xd69e, 0xdabf, 0xd79e, 0xdbbf, 0xd89e, 0xd99e, 0xda9e, 0xdb9e, 0xdc9e, 0xdd9e, 0xdcbf, 0xddbf, 0xde9e, 0xdf9e, 0xdebf, 0xe09e, 0xe19e, 0xe29e, 0xdfbf, 0xe39e, 0xe49e, 0xe59e, 0xe69e, 0xe79e, 0xe89e, 0xe99e, 0xe0bf, 0xe1bf, 0xea9e, 0xe2bf, 0xeb9e, 0xe3bf, 0xec9e, 0xed9e, 0xee9e, 0xef9e, 0xf09e, 0xf19e, 0xe4bf, 0xe5bf, 0xf29e, 0xf39e, 0xe6bf, 0xf49e, 0xf59e, 0xf69e, 0xe7bf, 0xf79e, 0xf89e, 0xf99e, 0xfa9e, 0xfb9e, 0xfc9e, 0xfd9e, 0xe8bf, 0xe9bf, 0xfe9e, 0xeabf, 0x419f, 0xebbf, 0x429f, 0x439f, 0x449f, 0x459f, 0x469f, 0x479f, 0xecbf, 0xedbf, 0x489f, 0x499f, 0xeebf, 0x4a9f, 0x4b9f, 0x4c9f, 0xefbf, 0xf0bf, 0xf1bf, 0x4d9f, 0x4e9f, 0x4f9f, 0x509f, 0x519f, 0xf2bf, 0xf3bf, 0x529f, 0xf4bf, 0x539f, 0xf5bf, 0x549f, 0x559f, 0x569f, 0x579f, 0x589f, 0x599f, 0xf6bf, 0xf7bf, 0x5a9f, 0x619f, 0xf8bf, 0x629f, 0x639f, 0x649f, 0xf9bf, 0x659f, 0x669f, 0x679f, 0x689f, 0x699f, 0x6a9f, 0x6b9f, 0xfabf, 0xfbbf, 0x6c9f, 0x6d9f, 0xfcbf, 0xfdbf, 0x6e9f, 0x6f9f, 0x709f, 0x719f, 0x729f, 0x739f, 0xfebf, 0xa1c0, 0x749f, 0x759f, 0xa2c0, 0x769f, 0x779f, 0x789f, 0xa3c0, 0x799f, 0x7a9f, 0x819f, 0x829f, 0x839f, 0x849f, 0x859f, 0xa4c0, 0xa5c0, 0x869f, 0x879f, 0x889f, 0xa6c0, 0x899f, 0x8a9f, 0x8b9f, 0x8c9f, 0x8d9f, 0x8e9f, 0xa7c0, 0xa8c0, 0x8f9f, 0x909f, 0xa9c0, 0x919f, 0x929f, 0x939f, 0xaac0, 0x949f, 0x959f, 0x969f, 0x979f, 0x989f, 0x999f, 0x9a9f, 0xabc0, 0xacc0, 0x9b9f, 0xadc0, 0x9c9f, 0xaec0, 0x9d9f, 0x9e9f, 0x9f9f, 0xa09f, 0xa19f, 0xa29f, 0xafc0, 0xb0c0, 0xa39f, 0xa49f, 0xb1c0, 0xa59f, 0xa69f, 0xa79f, 0xb2c0, 0xa89f, 0xa99f, 0xaa9f, 0xab9f, 0xac9f, 0xad9f, 0xae9f, 0xb3c0, 0xb4c0, 0xaf9f, 0xb5c0, 0xb09f, 0xb6c0, 0xb19f, 0xb7c0, 0xb29f, 0xb39f, 0xb49f, 0xb59f, 0xb8c0, 0xb9c0, 0xb69f, 0xb79f, 0xbac0, 0xb89f, 0xb99f, 0xba9f, 0xbbc0, 0xbb9f, 0xbc9f, 0xbd9f, 0xbe9f, 0xbf9f, 0xbcc0, 0xc09f, 0xbdc0, 0xbec0, 0xc19f, 0xbfc0, 0xc29f, 0xc0c0, 0xc1c0, 0xc2c0, 0xc3c0, 0xc4c0, 0xc5c0, 0xc6c0, 0xc7c0, 0xc39f, 0xc49f, 0xc59f, 0xc8c0, 0xc69f, 0xc79f, 0xc89f, 0xc9c0, 0xc99f, 0xca9f, 0xcb9f, 0xcc9f, 0xcd9f, 0xce9f, 0xcf9f, 0xcac0, 0xd09f, 0xd19f, 0xcbc0, 0xd29f, 0xd39f, 0xd49f, 0xd59f, 0xd69f, 0xd79f, 0xd89f, 0xd99f, 0xccc0, 0xcdc0, 0xda9f, 0xdb9f, 0xcec0, 0xdc9f, 0xdd9f, 0xde9f, 0xcfc0, 0xd0c0, 0xd1c0, 0xdf9f, 0xe09f, 0xe19f, 0xe29f, 0xd2c0, 0xd3c0, 0xd4c0, 0xe39f, 0xd5c0, 0xd6c0, 0xd7c0, 0xd8c0, 0xe49f, 0xe59f, 0xe69f, 0xd9c0, 0xe79f, 0xdac0, 0xdbc0, 0xe89f, 0xe99f, 0xdcc0, 0xea9f, 0xddc0, 0xdec0, 0xdfc0, 0xeb9f, 0xe0c0, 0xec9f, 0xed9f, 0xee9f, 0xef9f, 0xf09f, 0xe1c0, 0xe2c0, 0xf19f, 0xe3c0, 0xe4c0, 0xe5c0, 0xe6c0, 0xf29f, 0xf39f, 0xf49f, 0xf59f, 0xf69f, 0xe7c0, 0xe8c0, 0xf79f, 0xf89f, 0xe9c0, 0xf99f, 0xfa9f, 0xfb9f, 0xeac0, 0xfc9f, 0xfd9f, 0xfe9f, 0x41a0, 0x42a0, 0x43a0, 0x44a0, 0xebc0, 0xecc0, 0x45a0, 0xedc0, 0xeec0, 0xefc0, 0x46a0, 0x47a0, 0x48a0, 0x49a0, 0x4aa0, 0x4ba0, 0xf0c0, 0xf1c0, 0x4ca0, 0x4da0, 0xf2c0, 0x4ea0, 0xf3c0, 0x4fa0, 0xf4c0, 0x50a0, 0x51a0, 0x52a0, 0x53a0, 0x54a0, 0x55a0, 0x56a0, 0xf5c0, 0x57a0, 0x58a0, 0x59a0, 0x5aa0, 0xf6c0, 0x61a0, 0x62a0, 0x63a0, 0x64a0, 0x65a0, 0x66a0, 0xf7c0, 0x67a0, 0x68a0, 0x69a0, 0xf8c0, 0x6aa0, 0x6ba0, 0x6ca0, 0xf9c0, 0x6da0, 0x6ea0, 0x6fa0, 0x70a0, 0x71a0, 0x72a0, 0x73a0, 0x74a0, 0x75a0, 0x76a0, 0x77a0, 0x78a0, 0x79a0, 0x7aa0, 0x81a0, 0x82a0, 0x83a0, 0x84a0, 0x85a0, 0xfac0, 0xfbc0, 0x86a0, 0x87a0, 0xfcc0, 0x88a0, 0x89a0, 0x8aa0, 0xfdc0, 0x8ba0, 0xfec0, 0x8ca0, 0x8da0, 0x8ea0, 0x8fa0, 0x90a0, 0xa1c1, 0xa2c1, 0x91a0, 0xa3c1, 0x92a0, 0xa4c1, 0xa5c1, 0x93a0, 0x94a0, 0x95a0, 0x96a0, 0x97a0, 0xa6c1, 0xa7c1, 0x98a0, 0x99a0, 0xa8c1, 0x9aa0, 0x9ba0, 0x9ca0, 0xa9c1, 0x9da0, 0x9ea0, 0x9fa0, 0xa0a0, 0xa1a0, 0xa2a0, 0xa3a0, 0xaac1, 0xabc1, 0xa4a0, 0xacc1, 0xa5a0, 0xadc1, 0xa6a0, 0xa7a0, 0xa8a0, 0xa9a0, 0xaaa0, 0xaba0, 0xaec1, 0xaca0, 0xada0, 0xaea0, 0xafc1, 0xafa0, 0xb0a0, 0xb1a0, 0xb0c1, 0xb2a0, 0xb3a0, 0xb4a0, 0xb5a0, 0xb6a0, 0xb7a0, 0xb8a0, 0xb1c1, 0xb2c1, 0xb9a0, 0xbaa0, 0xb3c1, 0xb4c1, 0xbba0, 0xbca0, 0xbda0, 0xbea0, 0xbfa0, 0xc0a0, 0xb5c1, 0xc1a0, 0xc2a0, 0xc3a0, 0xc4a0, 0xc5a0, 0xc6a0, 0xc7a0, 0xc8a0, 0xc9a0, 0xcaa0, 0xcba0, 0xcca0, 0xcda0, 0xcea0, 0xcfa0, 0xd0a0, 0xd1a0, 0xd2a0, 0xd3a0, 0xd4a0, 0xd5a0, 0xd6a0, 0xd7a0, 0xd8a0, 0xd9a0, 0xdaa0, 0xdba0, 0xb6c1, 0xb7c1, 0xdca0, 0xdda0, 0xb8c1, 0xdea0, 0xdfa0, 0xe0a0, 0xb9c1, 0xe1a0, 0xbac1, 0xe2a0, 0xe3a0, 0xe4a0, 0xe5a0, 0xe6a0, 0xbbc1, 0xbcc1, 0xe7a0, 0xbdc1, 0xe8a0, 0xbec1, 0xbfc1, 0xc0c1, 0xe9a0, 0xeaa0, 0xeba0, 0xc1c1, 0xc2c1, 0xc3c1, 0xeca0, 0xeda0, 0xeea0, 0xefa0, 0xf0a0, 0xf1a0, 0xc4c1, 0xf2a0, 0xf3a0, 0xf4a0, 0xf5a0, 0xf6a0, 0xf7a0, 0xf8a0, 0xf9a0, 0xc5c1, 0xfaa0, 0xc6c1, 0xfba0, 0xc7c1, 0xfca0, 0xfda0, 0xfea0, 0x41a1, 0x42a1, 0x43a1, 0xc8c1, 0x44a1, 0x45a1, 0x46a1, 0x47a1, 0x48a1, 0x49a1, 0x4aa1, 0x4ba1, 0x4ca1, 0x4da1, 0x4ea1, 0x4fa1, 0x50a1, 0x51a1, 0x52a1, 0x53a1, 0x54a1, 0x55a1, 0x56a1, 0xc9c1, 0xcac1, 0x57a1, 0x58a1, 0x59a1, 0x5aa1, 0x61a1, 0x62a1, 0xcbc1, 0x63a1, 0x64a1, 0x65a1, 0xccc1, 0x66a1, 0x67a1, 0x68a1, 0xcdc1, 0x69a1, 0x6aa1, 0x6ba1, 0x6ca1, 0x6da1, 0x6ea1, 0x6fa1, 0xcec1, 0xcfc1, 0x70a1, 0xd0c1, 0x71a1, 0xd1c1, 0x72a1, 0x73a1, 0x74a1, 0x75a1, 0x76a1, 0x77a1, 0xd2c1, 0xd3c1, 0x78a1, 0x79a1, 0xd4c1, 0x7aa1, 0x81a1, 0x82a1, 0x83a1, 0x84a1, 0x85a1, 0x86a1, 0x87a1, 0x88a1, 0x89a1, 0x8aa1, 0x8ba1, 0x8ca1, 0x8da1, 0x8ea1, 0x8fa1, 0xd5c1, 0x90a1, 0x91a1, 0x92a1, 0x93a1, 0x94a1, 0x95a1, 0xd6c1, 0xd7c1, 0x96a1, 0x97a1, 0xd8c1, 0x98a1, 0x99a1, 0x9aa1, 0xd9c1, 0xdac1, 0xdbc1, 0x9ba1, 0x9ca1, 0x9da1, 0x9ea1, 0x9fa1, 0xdcc1, 0xddc1, 0xa0a1, 0xdec1, 0x41a2, 0xdfc1, 0x42a2, 0x43a2, 0x44a2, 0x45a2, 0x46a2, 0x47a2, 0xe0c1, 0x48a2, 0x49a2, 0x4aa2, 0x4ba2, 0x4ca2, 0x4da2, 0x4ea2, 0x4fa2, 0x50a2, 0x51a2, 0x52a2, 0x53a2, 0x54a2, 0x55a2, 0x56a2, 0x57a2, 0x58a2, 0x59a2, 0x5aa2, 0xe1c1, 0x61a2, 0x62a2, 0x63a2, 0x64a2, 0x65a2, 0x66a2, 0x67a2, 0xe2c1, 0x68a2, 0x69a2, 0x6aa2, 0x6ba2, 0x6ca2, 0x6da2, 0x6ea2, 0x6fa2, 0x70a2, 0x71a2, 0x72a2, 0x73a2, 0x74a2, 0x75a2, 0x76a2, 0x77a2, 0x78a2, 0x79a2, 0x7aa2, 0x81a2, 0x82a2, 0x83a2, 0x84a2, 0x85a2, 0x86a2, 0x87a2, 0x88a2, 0xe3c1, 0xe4c1, 0x89a2, 0x8aa2, 0xe5c1, 0x8ba2, 0x8ca2, 0x8da2, 0xe6c1, 0x8ea2, 0x8fa2, 0x90a2, 0x91a2, 0x92a2, 0x93a2, 0x94a2, 0xe7c1, 0xe8c1, 0x95a2, 0xe9c1, 0x96a2, 0x97a2, 0x98a2, 0x99a2, 0x9aa2, 0x9ba2, 0x9ca2, 0x9da2, 0xeac1, 0x9ea2, 0x9fa2, 0xa0a2, 0xebc1, 0x41a3, 0x42a3, 0x43a3, 0xecc1, 0x44a3, 0x45a3, 0x46a3, 0x47a3, 0x48a3, 0x49a3, 0x4aa3, 0xedc1, 0x4ba3, 0x4ca3, 0x4da3, 0x4ea3, 0x4fa3, 0x50a3, 0x51a3, 0x52a3, 0x53a3, 0x54a3, 0x55a3, 0xeec1, 0xefc1, 0x56a3, 0x57a3, 0xf0c1, 0x58a3, 0x59a3, 0x5aa3, 0xf1c1, 0x61a3, 0x62a3, 0x63a3, 0x64a3, 0x65a3, 0x66a3, 0x67a3, 0xf2c1, 0xf3c1, 0x68a3, 0xf4c1, 0x69a3, 0xf5c1, 0x6aa3, 0x6ba3, 0x6ca3, 0x6da3, 0x6ea3, 0x6fa3, 0x70a3, 0x71a3, 0x72a3, 0x73a3, 0x74a3, 0x75a3, 0x76a3, 0x77a3, 0x78a3, 0x79a3, 0x7aa3, 0x81a3, 0x82a3, 0x83a3, 0x84a3, 0x85a3, 0x86a3, 0x87a3, 0x88a3, 0x89a3, 0x8aa3, 0x8ba3, 0x8ca3, 0x8da3, 0x8ea3, 0x8fa3, 0x90a3, 0x91a3, 0xf6c1, 0xf7c1, 0x92a3, 0x93a3, 0xf8c1, 0x94a3, 0x95a3, 0xf9c1, 0xfac1, 0x96a3, 0xfbc1, 0x97a3, 0x98a3, 0x99a3, 0x9aa3, 0x9ba3, 0xfcc1, 0xfdc1, 0x9ca3, 0xfec1, 0x9da3, 0xa1c2, 0xa2c2, 0x9ea3, 0x9fa3, 0xa3c2, 0xa4c2, 0xa0a3, 0xa5c2, 0xa6c2, 0x41a4, 0x42a4, 0xa7c2, 0x43a4, 0xa8c2, 0x44a4, 0xa9c2, 0x45a4, 0x46a4, 0xaac2, 0x47a4, 0x48a4, 0x49a4, 0x4aa4, 0xabc2, 0xacc2, 0x4ba4, 0xadc2, 0xaec2, 0xafc2, 0x4ca4, 0x4da4, 0x4ea4, 0x4fa4, 0x50a4, 0x51a4, 0xb0c2, 0xb1c2, 0x52a4, 0x53a4, 0xb2c2, 0x54a4, 0x55a4, 0x56a4, 0xb3c2, 0x57a4, 0x58a4, 0x59a4, 0x5aa4, 0x61a4, 0x62a4, 0x63a4, 0xb4c2, 0xb5c2, 0x64a4, 0xb6c2, 0xb7c2, 0xb8c2, 0x65a4, 0x66a4, 0x67a4, 0x68a4, 0x69a4, 0x6aa4, 0xb9c2, 0x6ba4, 0x6ca4, 0x6da4, 0xbac2, 0x6ea4, 0x6fa4, 0x70a4, 0x71a4, 0x72a4, 0x73a4, 0x74a4, 0x75a4, 0x76a4, 0x77a4, 0x78a4, 0x79a4, 0x7aa4, 0x81a4, 0x82a4, 0x83a4, 0xbbc2, 0x84a4, 0x85a4, 0x86a4, 0x87a4, 0x88a4, 0x89a4, 0x8aa4, 0x8ba4, 0x8ca4, 0x8da4, 0x8ea4, 0x8fa4, 0x90a4, 0x91a4, 0x92a4, 0x93a4, 0x94a4, 0x95a4, 0x96a4, 0x97a4, 0x98a4, 0x99a4, 0x9aa4, 0x9ba4, 0x9ca4, 0x9da4, 0x9ea4, 0x9fa4, 0xa0a4, 0x41a5, 0x42a5, 0x43a5, 0x44a5, 0x45a5, 0xbcc2, 0xbdc2, 0x46a5, 0x47a5, 0xbec2, 0x48a5, 0x49a5, 0x4aa5, 0xbfc2, 0x4ba5, 0x4ca5, 0x4da5, 0x4ea5, 0x4fa5, 0x50a5, 0x51a5, 0xc0c2, 0xc1c2, 0x52a5, 0xc2c2, 0xc3c2, 0xc4c2, 0x53a5, 0x54a5, 0x55a5, 0x56a5, 0x57a5, 0x58a5, 0xc5c2, 0x59a5, 0x5aa5, 0x61a5, 0x62a5, 0x63a5, 0x64a5, 0x65a5, 0x66a5, 0x67a5, 0x68a5, 0x69a5, 0x6aa5, 0x6ba5, 0x6ca5, 0x6da5, 0x6ea5, 0x6fa5, 0x70a5, 0x71a5, 0x72a5, 0xc6c2, 0x73a5, 0x74a5, 0x75a5, 0x76a5, 0x77a5, 0x78a5, 0xc7c2, 0x79a5, 0x7aa5, 0x81a5, 0x82a5, 0x83a5, 0x84a5, 0x85a5, 0x86a5, 0x87a5, 0x88a5, 0x89a5, 0x8aa5, 0x8ba5, 0x8ca5, 0x8da5, 0x8ea5, 0x8fa5, 0x90a5, 0x91a5, 0xc8c2, 0x92a5, 0x93a5, 0x94a5, 0x95a5, 0x96a5, 0x97a5, 0x98a5, 0x99a5, 0x9aa5, 0x9ba5, 0x9ca5, 0x9da5, 0x9ea5, 0x9fa5, 0xa0a5, 0x41a6, 0x42a6, 0x43a6, 0x44a6, 0x45a6, 0x46a6, 0x47a6, 0x48a6, 0x49a6, 0x4aa6, 0x4ba6, 0x4ca6, 0x4da6, 0x4ea6, 0x4fa6, 0x50a6, 0x51a6, 0x52a6, 0x53a6, 0x54a6, 0xc9c2, 0xcac2, 0x55a6, 0x56a6, 0xcbc2, 0x57a6, 0x58a6, 0x59a6, 0xccc2, 0x5aa6, 0x61a6, 0x62a6, 0x63a6, 0x64a6, 0x65a6, 0x66a6, 0xcdc2, 0xcec2, 0x67a6, 0xcfc2, 0x68a6, 0xd0c2, 0x69a6, 0xd1c2, 0x6aa6, 0x6ba6, 0x6ca6, 0x6da6, 0xd2c2, 0xd3c2, 0x6ea6, 0x6fa6, 0x70a6, 0x71a6, 0x72a6, 0x73a6, 0xd4c2, 0x74a6, 0x75a6, 0x76a6, 0x77a6, 0x78a6, 0x79a6, 0x7aa6, 0x81a6, 0x82a6, 0x83a6, 0x84a6, 0xd5c2, 0x85a6, 0x86a6, 0x87a6, 0x88a6, 0x89a6, 0x8aa6, 0x8ba6, 0xd6c2, 0x8ca6, 0x8da6, 0x8ea6, 0x8fa6, 0x90a6, 0x91a6, 0x92a6, 0x93a6, 0x94a6, 0x95a6, 0x96a6, 0x97a6, 0x98a6, 0x99a6, 0x9aa6, 0x9ba6, 0x9ca6, 0x9da6, 0x9ea6, 0xd7c2, 0x9fa6, 0xa0a6, 0x41a7, 0x42a7, 0x43a7, 0x44a7, 0x45a7, 0xd8c2, 0x46a7, 0x47a7, 0x48a7, 0xd9c2, 0x49a7, 0x4aa7, 0x4ba7, 0xdac2, 0x4ca7, 0x4da7, 0x4ea7, 0x4fa7, 0x50a7, 0x51a7, 0x52a7, 0xdbc2, 0xdcc2, 0x53a7, 0x54a7, 0x55a7, 0x56a7, 0x57a7, 0x58a7, 0x59a7, 0x5aa7, 0x61a7, 0x62a7, 0x63a7, 0x64a7, 0x65a7, 0x66a7, 0x67a7, 0x68a7, 0x69a7, 0x6aa7, 0x6ba7, 0x6ca7, 0x6da7, 0x6ea7, 0x6fa7, 0x70a7, 0x71a7, 0x72a7, 0x73a7, 0x74a7, 0x75a7, 0x76a7, 0x77a7, 0xddc2, 0x78a7, 0x79a7, 0x7aa7, 0x81a7, 0x82a7, 0x83a7, 0xdec2, 0xdfc2, 0x84a7, 0x85a7, 0xe0c2, 0x86a7, 0x87a7, 0x88a7, 0xe1c2, 0x89a7, 0x8aa7, 0x8ba7, 0x8ca7, 0x8da7, 0x8ea7, 0x8fa7, 0xe2c2, 0xe3c2, 0x90a7, 0x91a7, 0x92a7, 0xe4c2, 0x93a7, 0x94a7, 0x95a7, 0x96a7, 0x97a7, 0x98a7, 0xe5c2, 0x99a7, 0x9aa7, 0x9ba7, 0x9ca7, 0x9da7, 0x9ea7, 0x9fa7, 0xa0a7, 0x41a8, 0x42a8, 0x43a8, 0x44a8, 0x45a8, 0x46a8, 0x47a8, 0x48a8, 0x49a8, 0x4aa8, 0x4ba8, 0xe6c2, 0xe7c2, 0x4ca8, 0x4da8, 0x4ea8, 0x4fa8, 0x50a8, 0x51a8, 0x52a8, 0x53a8, 0x54a8, 0x55a8, 0x56a8, 0x57a8, 0x58a8, 0x59a8, 0x5aa8, 0x61a8, 0x62a8, 0x63a8, 0x64a8, 0x65a8, 0x66a8, 0x67a8, 0x68a8, 0x69a8, 0x6aa8, 0x6ba8, 0x6ca8, 0x6da8, 0x6ea8, 0x6fa8, 0x70a8, 0x71a8, 0x72a8, 0x73a8, 0xe8c2, 0x74a8, 0x75a8, 0x76a8, 0x77a8, 0x78a8, 0x79a8, 0x7aa8, 0x81a8, 0x82a8, 0x83a8, 0x84a8, 0x85a8, 0x86a8, 0x87a8, 0x88a8, 0x89a8, 0x8aa8, 0x8ba8, 0x8ca8, 0x8da8, 0x8ea8, 0x8fa8, 0x90a8, 0x91a8, 0x92a8, 0x93a8, 0x94a8, 0xe9c2, 0x95a8, 0x96a8, 0x97a8, 0x98a8, 0x99a8, 0x9aa8, 0x9ba8, 0x9ca8, 0x9da8, 0x9ea8, 0x9fa8, 0xa0a8, 0x41a9, 0x42a9, 0x43a9, 0x44a9, 0x45a9, 0x46a9, 0x47a9, 0x48a9, 0x49a9, 0x4aa9, 0x4ba9, 0x4ca9, 0x4da9, 0x4ea9, 0x4fa9, 0xeac2, 0x50a9, 0x51a9, 0x52a9, 0x53a9, 0x54a9, 0x55a9, 0x56a9, 0x57a9, 0x58a9, 0x59a9, 0x5aa9, 0x61a9, 0x62a9, 0x63a9, 0x64a9, 0xebc2, 0x65a9, 0x66a9, 0xecc2, 0x67a9, 0xedc2, 0x68a9, 0x69a9, 0x6aa9, 0x6ba9, 0x6ca9, 0x6da9, 0x6ea9, 0x6fa9, 0x70a9, 0x71a9, 0x72a9, 0x73a9, 0x74a9, 0x75a9, 0x76a9, 0x77a9, 0x78a9, 0x79a9, 0x7aa9, 0x81a9, 0x82a9, 0x83a9, 0x84a9, 0x85a9, 0x86a9, 0x87a9, 0x88a9, 0x89a9, 0x8aa9, 0x8ba9, 0x8ca9, 0x8da9, 0x8ea9, 0x8fa9, 0xeec2, 0xefc2, 0x90a9, 0x91a9, 0xf0c2, 0x92a9, 0x93a9, 0x94a9, 0xf1c2, 0x95a9, 0x96a9, 0x97a9, 0x98a9, 0x99a9, 0x9aa9, 0x9ba9, 0xf2c2, 0xf3c2, 0x9ca9, 0x9da9, 0x9ea9, 0xf4c2, 0xf5c2, 0x9fa9, 0xa0a9, 0x41aa, 0x42aa, 0xf6c2, 0xf7c2, 0xf8c2, 0x43aa, 0x44aa, 0xf9c2, 0x45aa, 0xfac2, 0x46aa, 0xfbc2, 0x47aa, 0x48aa, 0x49aa, 0x4aaa, 0x4baa, 0x4caa, 0x4daa, 0xfcc2, 0xfdc2, 0x4eaa, 0xfec2, 0xa1c3, 0xa2c3, 0xa3c3, 0x4faa, 0x50aa, 0x51aa, 0x52aa, 0x53aa, 0xa4c3, 0xa5c3, 0x54aa, 0x55aa, 0xa6c3, 0x56aa, 0x57aa, 0x58aa, 0xa7c3, 0x59aa, 0x5aaa, 0x61aa, 0x62aa, 0x63aa, 0x64aa, 0x65aa, 0xa8c3, 0xa9c3, 0x66aa, 0xaac3, 0xabc3, 0xacc3, 0x67aa, 0x68aa, 0x69aa, 0x6aaa, 0x6baa, 0x6caa, 0xadc3, 0x6daa, 0x6eaa, 0x6faa, 0xaec3, 0x70aa, 0xafc3, 0x71aa, 0xb0c3, 0x72aa, 0x73aa, 0x74aa, 0x75aa, 0x76aa, 0x77aa, 0x78aa, 0xb1c3, 0x79aa, 0x7aaa, 0x81aa, 0x82aa, 0xb2c3, 0x83aa, 0x84aa, 0x85aa, 0x86aa, 0x87aa, 0x88aa, 0x89aa, 0x8aaa, 0x8baa, 0x8caa, 0x8daa, 0x8eaa, 0x8faa, 0x90aa, 0x91aa, 0x92aa, 0x93aa, 0x94aa, 0x95aa, 0x96aa, 0x97aa, 0x98aa, 0x99aa, 0x9aaa, 0x9baa, 0x9caa, 0x9daa, 0x9eaa, 0x9faa, 0xa0aa, 0x41ab, 0x42ab, 0x43ab, 0x44ab, 0xb3c3, 0xb4c3, 0x45ab, 0x46ab, 0xb5c3, 0x47ab, 0x48ab, 0x49ab, 0xb6c3, 0x4aab, 0x4bab, 0x4cab, 0x4dab, 0x4eab, 0x4fab, 0x50ab, 0xb7c3, 0xb8c3, 0x51ab, 0xb9c3, 0xbac3, 0xbbc3, 0x52ab, 0x53ab, 0x54ab, 0x55ab, 0x56ab, 0x57ab, 0xbcc3, 0xbdc3, 0x58ab, 0x59ab, 0xbec3, 0x5aab, 0x61ab, 0x62ab, 0xbfc3, 0x63ab, 0x64ab, 0x65ab, 0x66ab, 0x67ab, 0x68ab, 0x69ab, 0xc0c3, 0xc1c3, 0x6aab, 0xc2c3, 0x6bab, 0xc3c3, 0x6cab, 0x6dab, 0x6eab, 0x6fab, 0x70ab, 0x71ab, 0xc4c3, 0x72ab, 0x73ab, 0x74ab, 0xc5c3, 0x75ab, 0x76ab, 0x77ab, 0x78ab, 0x79ab, 0x7aab, 0x81ab, 0x82ab, 0x83ab, 0x84ab, 0x85ab, 0x86ab, 0x87ab, 0x88ab, 0x89ab, 0xc6c3, 0x8aab, 0x8bab, 0x8cab, 0x8dab, 0x8eab, 0x8fab, 0x90ab, 0xc7c3, 0x91ab, 0x92ab, 0x93ab, 0xc8c3, 0x94ab, 0x95ab, 0x96ab, 0x97ab, 0x98ab, 0x99ab, 0x9aab, 0x9bab, 0x9cab, 0x9dab, 0x9eab, 0x9fab, 0xa0ab, 0x41ac, 0x42ac, 0x43ac, 0xc9c3, 0x44ac, 0x45ac, 0x46ac, 0x47ac, 0x48ac, 0x49ac, 0xcac3, 0xcbc3, 0x4aac, 0x4bac, 0xccc3, 0x4cac, 0x4dac, 0x4eac, 0xcdc3, 0x4fac, 0x50ac, 0x51ac, 0x52ac, 0x53ac, 0x54ac, 0x55ac, 0xcec3, 0xcfc3, 0x56ac, 0xd0c3, 0x57ac, 0xd1c3, 0x58ac, 0x59ac, 0x5aac, 0x61ac, 0x62ac, 0x63ac, 0xd2c3, 0x64ac, 0x65ac, 0x66ac, 0xd3c3, 0x67ac, 0x68ac, 0x69ac, 0xd4c3, 0x6aac, 0x6bac, 0x6cac, 0x6dac, 0x6eac, 0x6fac, 0x70ac, 0x71ac, 0x72ac, 0x73ac, 0x74ac, 0x75ac, 0xd5c3, 0x76ac, 0x77ac, 0x78ac, 0x79ac, 0x7aac, 0x81ac, 0x82ac, 0x83ac, 0x84ac, 0x85ac, 0x86ac, 0x87ac, 0x88ac, 0x89ac, 0x8aac, 0x8bac, 0x8cac, 0x8dac, 0x8eac, 0x8fac, 0x90ac, 0x91ac, 0x92ac, 0x93ac, 0x94ac, 0x95ac, 0x96ac, 0x97ac, 0x98ac, 0x99ac, 0x9aac, 0x9bac, 0x9cac, 0x9dac, 0xd6c3, 0x9eac, 0x9fac, 0xa0ac, 0xd7c3, 0x41ad, 0x42ad, 0x43ad, 0xd8c3, 0x44ad, 0x45ad, 0x46ad, 0x47ad, 0x48ad, 0x49ad, 0x4aad, 0xd9c3, 0xdac3, 0x4bad, 0xdbc3, 0x4cad, 0xdcc3, 0x4dad, 0x4ead, 0x4fad, 0x50ad, 0x51ad, 0x52ad, 0xddc3, 0x53ad, 0x54ad, 0x55ad, 0x56ad, 0x57ad, 0x58ad, 0x59ad, 0x5aad, 0x61ad, 0x62ad, 0x63ad, 0x64ad, 0x65ad, 0x66ad, 0x67ad, 0xdec3, 0x68ad, 0x69ad, 0x6aad, 0x6bad, 0x6cad, 0x6dad, 0x6ead, 0x6fad, 0x70ad, 0x71ad, 0x72ad, 0xdfc3, 0xe0c3, 0x73ad, 0x74ad, 0xe1c3, 0x75ad, 0x76ad, 0x77ad, 0xe2c3, 0x78ad, 0x79ad, 0x7aad, 0x81ad, 0x82ad, 0x83ad, 0x84ad, 0xe3c3, 0xe4c3, 0x85ad, 0xe5c3, 0x86ad, 0xe6c3, 0x87ad, 0x88ad, 0x89ad, 0x8aad, 0x8bad, 0x8cad, 0xe7c3, 0x8dad, 0x8ead, 0x8fad, 0x90ad, 0x91ad, 0x92ad, 0x93ad, 0x94ad, 0x95ad, 0x96ad, 0x97ad, 0x98ad, 0x99ad, 0x9aad, 0x9bad, 0x9cad, 0x9dad, 0x9ead, 0x9fad, 0xe8c3, 0xa0ad, 0x41ae, 0x42ae, 0x43ae, 0x44ae, 0x45ae, 0x46ae, 0xe9c3, 0x47ae, 0x48ae, 0x49ae, 0xeac3, 0x4aae, 0x4bae, 0x4cae, 0x4dae, 0x4eae, 0x4fae, 0x50ae, 0x51ae, 0x52ae, 0x53ae, 0x54ae, 0x55ae, 0x56ae, 0x57ae, 0x58ae, 0x59ae, 0x5aae, 0x61ae, 0x62ae, 0x63ae, 0x64ae, 0x65ae, 0x66ae, 0xebc3, 0x67ae, 0x68ae, 0x69ae, 0xecc3, 0x6aae, 0x6bae, 0x6cae, 0xedc3, 0x6dae, 0x6eae, 0x6fae, 0x70ae, 0x71ae, 0x72ae, 0x73ae, 0xeec3, 0xefc3, 0x74ae, 0xf0c3, 0x75ae, 0xf1c3, 0x76ae, 0x77ae, 0x78ae, 0x79ae, 0x7aae, 0x81ae, 0xf2c3, 0x82ae, 0x83ae, 0x84ae, 0xf3c3, 0x85ae, 0x86ae, 0x87ae, 0xf4c3, 0x88ae, 0x89ae, 0x8aae, 0x8bae, 0x8cae, 0x8dae, 0x8eae, 0xf5c3, 0x8fae, 0x90ae, 0x91ae, 0x92ae, 0xf6c3, 0x93ae, 0x94ae, 0x95ae, 0x96ae, 0x97ae, 0x98ae, 0xf7c3, 0xf8c3, 0x99ae, 0x9aae, 0xf9c3, 0x9bae, 0x9cae, 0x9dae, 0xfac3, 0x9eae, 0x9fae, 0xa0ae, 0x41af, 0x42af, 0x43af, 0x44af, 0xfbc3, 0xfcc3, 0x45af, 0xfdc3, 0x46af, 0xfec3, 0x47af, 0x48af, 0x49af, 0x4aaf, 0x4baf, 0x4caf, 0x4daf, 0x4eaf, 0x4faf, 0x50af, 0x51af, 0x52af, 0x53af, 0x54af, 0x55af, 0x56af, 0x57af, 0x58af, 0x59af, 0x5aaf, 0x61af, 0x62af, 0x63af, 0x64af, 0x65af, 0x66af, 0x67af, 0x68af, 0x69af, 0x6aaf, 0x6baf, 0x6caf, 0x6daf, 0x6eaf, 0xa1c4, 0xa2c4, 0x6faf, 0x70af, 0xa3c4, 0x71af, 0x72af, 0xa4c4, 0xa5c4, 0xa6c4, 0x73af, 0x74af, 0x75af, 0x76af, 0x77af, 0x78af, 0xa7c4, 0xa8c4, 0x79af, 0xa9c4, 0x7aaf, 0xaac4, 0x81af, 0x82af, 0x83af, 0x84af, 0x85af, 0x86af, 0xabc4, 0xacc4, 0x87af, 0x88af, 0xadc4, 0x89af, 0x8aaf, 0x8baf, 0xaec4, 0x8caf, 0x8daf, 0x8eaf, 0x8faf, 0x90af, 0x91af, 0x92af, 0xafc4, 0xb0c4, 0x93af, 0xb1c4, 0x94af, 0xb2c4, 0x95af, 0x96af, 0x97af, 0x98af, 0x99af, 0x9aaf, 0xb3c4, 0xb4c4, 0x9baf, 0x9caf, 0xb5c4, 0x9daf, 0x9eaf, 0x9faf, 0xb6c4, 0xa0af, 0x41b0, 0x42b0, 0x43b0, 0x44b0, 0x45b0, 0x46b0, 0xb7c4, 0xb8c4, 0x47b0, 0xb9c4, 0xbac4, 0xbbc4, 0x48b0, 0x49b0, 0x4ab0, 0x4bb0, 0x4cb0, 0x4db0, 0xbcc4, 0xbdc4, 0x4eb0, 0x4fb0, 0x50b0, 0x51b0, 0x52b0, 0x53b0, 0x54b0, 0x55b0, 0x56b0, 0x57b0, 0x58b0, 0x59b0, 0x5ab0, 0x61b0, 0x62b0, 0x63b0, 0x64b0, 0x65b0, 0x66b0, 0xbec4, 0x67b0, 0x68b0, 0x69b0, 0x6ab0, 0x6bb0, 0x6cb0, 0x6db0, 0x6eb0, 0x6fb0, 0x70b0, 0x71b0, 0x72b0, 0x73b0, 0x74b0, 0x75b0, 0x76b0, 0x77b0, 0x78b0, 0x79b0, 0x7ab0, 0x81b0, 0x82b0, 0x83b0, 0x84b0, 0x85b0, 0x86b0, 0x87b0, 0x88b0, 0x89b0, 0x8ab0, 0x8bb0, 0x8cb0, 0x8db0, 0x8eb0, 0xbfc4, 0xc0c4, 0x8fb0, 0x90b0, 0xc1c4, 0x91b0, 0x92b0, 0xc2c4, 0xc3c4, 0x93b0, 0x94b0, 0x95b0, 0x96b0, 0x97b0, 0x98b0, 0x99b0, 0xc4c4, 0xc5c4, 0x9ab0, 0xc6c4, 0xc7c4, 0xc8c4, 0x9bb0, 0x9cb0, 0x9db0, 0x9eb0, 0x9fb0, 0xa0b0, 0xc9c4, 0xcac4, 0x41b1, 0x42b1, 0xcbc4, 0x43b1, 0x44b1, 0x45b1, 0xccc4, 0x46b1, 0x47b1, 0x48b1, 0x49b1, 0x4ab1, 0x4bb1, 0x4cb1, 0xcdc4, 0xcec4, 0x4db1, 0xcfc4, 0x4eb1, 0xd0c4, 0x4fb1, 0x50b1, 0x51b1, 0x52b1, 0x53b1, 0x54b1, 0xd1c4, 0x55b1, 0x56b1, 0x57b1, 0xd2c4, 0x58b1, 0x59b1, 0x5ab1, 0xd3c4, 0x61b1, 0x62b1, 0x63b1, 0x64b1, 0x65b1, 0x66b1, 0x67b1, 0xd4c4, 0xd5c4, 0x68b1, 0xd6c4, 0xd7c4, 0xd8c4, 0x69b1, 0x6ab1, 0x6bb1, 0x6cb1, 0x6db1, 0x6eb1, 0xd9c4, 0x6fb1, 0x70b1, 0x71b1, 0x72b1, 0x73b1, 0x74b1, 0x75b1, 0x76b1, 0x77b1, 0x78b1, 0x79b1, 0x7ab1, 0x81b1, 0x82b1, 0x83b1, 0x84b1, 0x85b1, 0x86b1, 0x87b1, 0x88b1, 0x89b1, 0x8ab1, 0x8bb1, 0x8cb1, 0x8db1, 0x8eb1, 0x8fb1, 0xdac4, 0xdbc4, 0x90b1, 0x91b1, 0xdcc4, 0x92b1, 0x93b1, 0x94b1, 0xddc4, 0x95b1, 0x96b1, 0x97b1, 0x98b1, 0x99b1, 0x9ab1, 0x9bb1, 0xdec4, 0xdfc4, 0x9cb1, 0xe0c4, 0x9db1, 0xe1c4, 0x9eb1, 0x9fb1, 0xa0b1, 0x41b2, 0x42b2, 0x43b2, 0xe2c4, 0xe3c4, 0x44b2, 0x45b2, 0xe4c4, 0x46b2, 0x47b2, 0x48b2, 0xe5c4, 0x49b2, 0x4ab2, 0x4bb2, 0x4cb2, 0x4db2, 0x4eb2, 0x4fb2, 0xe6c4, 0x50b2, 0x51b2, 0x52b2, 0x53b2, 0xe7c4, 0x54b2, 0x55b2, 0x56b2, 0x57b2, 0x58b2, 0x59b2, 0xe8c4, 0x5ab2, 0x61b2, 0x62b2, 0x63b2, 0x64b2, 0x65b2, 0x66b2, 0x67b2, 0x68b2, 0x69b2, 0x6ab2, 0x6bb2, 0x6cb2, 0x6db2, 0x6eb2, 0x6fb2, 0x70b2, 0x71b2, 0x72b2, 0x73b2, 0xe9c4, 0x74b2, 0x75b2, 0x76b2, 0x77b2, 0x78b2, 0x79b2, 0xeac4, 0x7ab2, 0x81b2, 0x82b2, 0x83b2, 0x84b2, 0x85b2, 0x86b2, 0xebc4, 0x87b2, 0x88b2, 0x89b2, 0x8ab2, 0x8bb2, 0x8cb2, 0x8db2, 0x8eb2, 0x8fb2, 0x90b2, 0x91b2, 0x92b2, 0x93b2, 0x94b2, 0x95b2, 0x96b2, 0x97b2, 0x98b2, 0x99b2, 0xecc4, 0x9ab2, 0x9bb2, 0x9cb2, 0x9db2, 0x9eb2, 0x9fb2, 0xa0b2, 0x41b3, 0x42b3, 0x43b3, 0x44b3, 0x45b3, 0x46b3, 0x47b3, 0x48b3, 0x49b3, 0x4ab3, 0x4bb3, 0x4cb3, 0x4db3, 0x4eb3, 0x4fb3, 0x50b3, 0x51b3, 0x52b3, 0x53b3, 0x54b3, 0xedc4, 0xeec4, 0x55b3, 0x56b3, 0xefc4, 0x57b3, 0x58b3, 0x59b3, 0xf0c4, 0x5ab3, 0x61b3, 0x62b3, 0x63b3, 0x64b3, 0x65b3, 0x66b3, 0xf1c4, 0xf2c4, 0x67b3, 0xf3c4, 0x68b3, 0xf4c4, 0x69b3, 0x6ab3, 0x6bb3, 0x6cb3, 0x6db3, 0x6eb3, 0xf5c4, 0x6fb3, 0x70b3, 0x71b3, 0xf6c4, 0x72b3, 0x73b3, 0x74b3, 0xf7c4, 0x75b3, 0x76b3, 0x77b3, 0x78b3, 0x79b3, 0x7ab3, 0x81b3, 0x82b3, 0x83b3, 0x84b3, 0x85b3, 0x86b3, 0xf8c4, 0x87b3, 0x88b3, 0x89b3, 0x8ab3, 0x8bb3, 0x8cb3, 0xf9c4, 0x8db3, 0x8eb3, 0x8fb3, 0x90b3, 0x91b3, 0x92b3, 0x93b3, 0x94b3, 0x95b3, 0x96b3, 0x97b3, 0x98b3, 0x99b3, 0x9ab3, 0x9bb3, 0x9cb3, 0x9db3, 0x9eb3, 0x9fb3, 0xa0b3, 0xfac4, 0x41b4, 0x42b4, 0x43b4, 0x44b4, 0x45b4, 0x46b4, 0xfbc4, 0xfcc4, 0x47b4, 0x48b4, 0xfdc4, 0x49b4, 0x4ab4, 0x4bb4, 0xfec4, 0x4cb4, 0x4db4, 0x4eb4, 0x4fb4, 0x50b4, 0x51b4, 0x52b4, 0xa1c5, 0xa2c5, 0x53b4, 0xa3c5, 0x54b4, 0xa4c5, 0x55b4, 0x56b4, 0x57b4, 0x58b4, 0x59b4, 0x5ab4, 0xa5c5, 0x61b4, 0x62b4, 0x63b4, 0xa6c5, 0x64b4, 0x65b4, 0x66b4, 0xa7c5, 0x67b4, 0x68b4, 0x69b4, 0x6ab4, 0x6bb4, 0x6cb4, 0x6db4, 0xa8c5, 0x6eb4, 0x6fb4, 0x70b4, 0x71b4, 0x72b4, 0x73b4, 0x74b4, 0x75b4, 0x76b4, 0x77b4, 0x78b4, 0xa9c5, 0xaac5, 0x79b4, 0x7ab4, 0xabc5, 0x81b4, 0x82b4, 0x83b4, 0xacc5, 0x84b4, 0x85b4, 0x86b4, 0x87b4, 0x88b4, 0x89b4, 0x8ab4, 0xadc5, 0xaec5, 0x8bb4, 0x8cb4, 0x8db4, 0xafc5, 0x8eb4, 0x8fb4, 0x90b4, 0x91b4, 0x92b4, 0x93b4, 0x94b4, 0x95b4, 0x96b4, 0x97b4, 0x98b4, 0x99b4, 0x9ab4, 0x9bb4, 0x9cb4, 0x9db4, 0x9eb4, 0x9fb4, 0xa0b4, 0x41b5, 0x42b5, 0x43b5, 0x44b5, 0x45b5, 0x46b5, 0x47b5, 0x48b5, 0x49b5, 0x4ab5, 0x4bb5, 0x4cb5, 0x4db5, 0x4eb5, 0x4fb5, 0xb0c5, 0xb1c5, 0x50b5, 0x51b5, 0xb2c5, 0x52b5, 0x53b5, 0x54b5, 0xb3c5, 0x55b5, 0x56b5, 0x57b5, 0x58b5, 0x59b5, 0x5ab5, 0x61b5, 0xb4c5, 0xb5c5, 0x62b5, 0xb6c5, 0x63b5, 0xb7c5, 0x64b5, 0x65b5, 0x66b5, 0x67b5, 0x68b5, 0x69b5, 0xb8c5, 0xb9c5, 0x6ab5, 0x6bb5, 0xbac5, 0x6cb5, 0x6db5, 0x6eb5, 0xbbc5, 0xbcc5, 0x6fb5, 0x70b5, 0x71b5, 0x72b5, 0x73b5, 0x74b5, 0xbdc5, 0xbec5, 0x75b5, 0xbfc5, 0xc0c5, 0xc1c5, 0x76b5, 0x77b5, 0x78b5, 0x79b5, 0x7ab5, 0x81b5, 0xc2c5, 0xc3c5, 0x82b5, 0x83b5, 0xc4c5, 0x84b5, 0x85b5, 0x86b5, 0xc5c5, 0x87b5, 0x88b5, 0x89b5, 0x8ab5, 0x8bb5, 0x8cb5, 0x8db5, 0xc6c5, 0xc7c5, 0x8eb5, 0xc8c5, 0xc9c5, 0xcac5, 0x8fb5, 0x90b5, 0x91b5, 0x92b5, 0x93b5, 0x94b5, 0xcbc5, 0x95b5, 0x96b5, 0x97b5, 0x98b5, 0x99b5, 0x9ab5, 0x9bb5, 0x9cb5, 0x9db5, 0x9eb5, 0x9fb5, 0xa0b5, 0x41b6, 0x42b6, 0x43b6, 0x44b6, 0x45b6, 0x46b6, 0x47b6, 0x48b6, 0xccc5, 0x49b6, 0x4ab6, 0x4bb6, 0x4cb6, 0x4db6, 0x4eb6, 0x4fb6, 0x50b6, 0x51b6, 0x52b6, 0x53b6, 0x54b6, 0x55b6, 0x56b6, 0x57b6, 0x58b6, 0x59b6, 0x5ab6, 0x61b6, 0x62b6, 0x63b6, 0x64b6, 0x65b6, 0x66b6, 0x67b6, 0x68b6, 0x69b6, 0x6ab6, 0x6bb6, 0x6cb6, 0x6db6, 0x6eb6, 0x6fb6, 0x70b6, 0xcdc5, 0xcec5, 0x71b6, 0x72b6, 0xcfc5, 0x73b6, 0x74b6, 0x75b6, 0xd0c5, 0x76b6, 0xd1c5, 0x77b6, 0x78b6, 0x79b6, 0x7ab6, 0x81b6, 0xd2c5, 0xd3c5, 0x82b6, 0xd4c5, 0xd5c5, 0xd6c5, 0x83b6, 0x84b6, 0x85b6, 0x86b6, 0x87b6, 0x88b6, 0xd7c5, 0xd8c5, 0x89b6, 0x8ab6, 0xd9c5, 0x8bb6, 0x8cb6, 0x8db6, 0xdac5, 0x8eb6, 0x8fb6, 0x90b6, 0x91b6, 0x92b6, 0x93b6, 0x94b6, 0xdbc5, 0xdcc5, 0x95b6, 0xddc5, 0x96b6, 0xdec5, 0x97b6, 0x98b6, 0x99b6, 0x9ab6, 0x9bb6, 0x9cb6, 0xdfc5, 0x9db6, 0x9eb6, 0x9fb6, 0xe0c5, 0xa0b6, 0x41b7, 0x42b7, 0x43b7, 0x44b7, 0x45b7, 0x46b7, 0x47b7, 0x48b7, 0x49b7, 0x4ab7, 0x4bb7, 0x4cb7, 0x4db7, 0x4eb7, 0xe1c5, 0x4fb7, 0x50b7, 0x51b7, 0x52b7, 0x53b7, 0x54b7, 0x55b7, 0xe2c5, 0x56b7, 0x57b7, 0x58b7, 0xe3c5, 0x59b7, 0x5ab7, 0x61b7, 0x62b7, 0x63b7, 0x64b7, 0x65b7, 0x66b7, 0x67b7, 0x68b7, 0x69b7, 0x6ab7, 0x6bb7, 0x6cb7, 0x6db7, 0x6eb7, 0x6fb7, 0x70b7, 0x71b7, 0x72b7, 0x73b7, 0x74b7, 0x75b7, 0xe4c5, 0xe5c5, 0x76b7, 0x77b7, 0xe6c5, 0x78b7, 0x79b7, 0x7ab7, 0xe7c5, 0x81b7, 0x82b7, 0x83b7, 0x84b7, 0x85b7, 0x86b7, 0x87b7, 0xe8c5, 0xe9c5, 0x88b7, 0xeac5, 0x89b7, 0xebc5, 0x8ab7, 0x8bb7, 0x8cb7, 0x8db7, 0xecc5, 0x8eb7, 0xedc5, 0x8fb7, 0x90b7, 0x91b7, 0xeec5, 0x92b7, 0x93b7, 0x94b7, 0x95b7, 0x96b7, 0x97b7, 0x98b7, 0x99b7, 0x9ab7, 0x9bb7, 0x9cb7, 0x9db7, 0x9eb7, 0x9fb7, 0xa0b7, 0x41b8, 0x42b8, 0x43b8, 0x44b8, 0x45b8, 0x46b8, 0x47b8, 0x48b8, 0xefc5, 0x49b8, 0x4ab8, 0x4bb8, 0x4cb8, 0x4db8, 0x4eb8, 0x4fb8, 0x50b8, 0x51b8, 0x52b8, 0x53b8, 0x54b8, 0x55b8, 0x56b8, 0x57b8, 0x58b8, 0x59b8, 0x5ab8, 0x61b8, 0x62b8, 0x63b8, 0x64b8, 0x65b8, 0x66b8, 0x67b8, 0x68b8, 0x69b8, 0xf0c5, 0x6ab8, 0x6bb8, 0x6cb8, 0xf1c5, 0x6db8, 0x6eb8, 0x6fb8, 0x70b8, 0x71b8, 0x72b8, 0x73b8, 0x74b8, 0x75b8, 0x76b8, 0x77b8, 0x78b8, 0x79b8, 0x7ab8, 0xf2c5, 0x81b8, 0xf3c5, 0x82b8, 0x83b8, 0x84b8, 0x85b8, 0x86b8, 0x87b8, 0xf4c5, 0x88b8, 0x89b8, 0x8ab8, 0x8bb8, 0x8cb8, 0x8db8, 0x8eb8, 0x8fb8, 0x90b8, 0x91b8, 0x92b8, 0x93b8, 0x94b8, 0x95b8, 0x96b8, 0x97b8, 0x98b8, 0x99b8, 0x9ab8, 0x9bb8, 0x9cb8, 0x9db8, 0x9eb8, 0x9fb8, 0xa0b8, 0x41b9, 0x42b9, 0xf5c5, 0xf6c5, 0x43b9, 0x44b9, 0xf7c5, 0x45b9, 0x46b9, 0x47b9, 0xf8c5, 0x48b9, 0x49b9, 0x4ab9, 0x4bb9, 0x4cb9, 0x4db9, 0x4eb9, 0xf9c5, 0xfac5, 0x4fb9, 0xfbc5, 0x50b9, 0xfcc5, 0x51b9, 0x52b9, 0x53b9, 0x54b9, 0x55b9, 0x56b9, 0xfdc5, 0x57b9, 0x58b9, 0x59b9, 0x5ab9, 0x61b9, 0x62b9, 0x63b9, 0x64b9, 0x65b9, 0x66b9, 0x67b9, 0x68b9, 0x69b9, 0x6ab9, 0x6bb9, 0x6cb9, 0x6db9, 0x6eb9, 0x6fb9, 0xfec5, 0x70b9, 0x71b9, 0x72b9, 0x73b9, 0x74b9, 0x75b9, 0x76b9, 0xa1c6, 0x77b9, 0x78b9, 0x79b9, 0x7ab9, 0x81b9, 0x82b9, 0x83b9, 0x84b9, 0x85b9, 0x86b9, 0x87b9, 0x88b9, 0x89b9, 0x8ab9, 0x8bb9, 0x8cb9, 0x8db9, 0x8eb9, 0x8fb9, 0x90b9, 0x91b9, 0x92b9, 0x93b9, 0x94b9, 0x95b9, 0x96b9, 0x97b9, 0xa2c6, 0xa3c6, 0x98b9, 0x99b9, 0xa4c6, 0x9ab9, 0x9bb9, 0x9cb9, 0xa5c6, 0x9db9, 0x9eb9, 0x9fb9, 0xa0b9, 0x41ba, 0x42ba, 0x43ba, 0xa6c6, 0xa7c6, 0x44ba, 0x45ba, 0x46ba, 0xa8c6, 0x47ba, 0x48ba, 0x49ba, 0x4aba, 0x4bba, 0x4cba, 0xa9c6, 0x4dba, 0x4eba, 0x4fba, 0xaac6, 0x50ba, 0x51ba, 0x52ba, 0xabc6, 0x53ba, 0x54ba, 0x55ba, 0x56ba, 0x57ba, 0x58ba, 0x59ba, 0xacc6, 0x5aba, 0x61ba, 0x62ba, 0x63ba, 0xadc6, 0x64ba, 0x65ba, 0x66ba, 0x67ba, 0x68ba, 0x69ba, 0xaec6, 0xafc6, 0x6aba, 0x6bba, 0xb0c6, 0x6cba, 0x6dba, 0xb1c6, 0xb2c6, 0x6eba, 0xb3c6, 0x6fba, 0x70ba, 0x71ba, 0x72ba, 0x73ba, 0xb4c6, 0xb5c6, 0x74ba, 0xb6c6, 0x75ba, 0x76ba, 0x77ba, 0x78ba, 0x79ba, 0x7aba, 0x81ba, 0x82ba, 0xb7c6, 0x83ba, 0x84ba, 0x85ba, 0xb8c6, 0x86ba, 0x87ba, 0x88ba, 0xb9c6, 0x89ba, 0x8aba, 0x8bba, 0x8cba, 0x8dba, 0x8eba, 0x8fba, 0xbac6, 0xbbc6, 0x90ba, 0x91ba, 0x92ba, 0x93ba, 0x94ba, 0x95ba, 0x96ba, 0x97ba, 0x98ba, 0x99ba, 0xbcc6, 0xbdc6, 0x9aba, 0x9bba, 0xbec6, 0x9cba, 0x9dba, 0x9eba, 0xbfc6, 0x9fba, 0xa0ba, 0x41bb, 0x42bb, 0x43bb, 0x44bb, 0x45bb, 0xc0c6, 0xc1c6, 0x46bb, 0xc2c6, 0x47bb, 0xc3c6, 0x48bb, 0x49bb, 0x4abb, 0x4bbb, 0x4cbb, 0x4dbb, 0xc4c6, 0xc5c6, 0xc6c6, 0x4ebb, 0xc7c6, 0x4fbb, 0x50bb, 0x51bb, 0xc8c6, 0x52bb, 0xc9c6, 0x53bb, 0x54bb, 0x55bb, 0x56bb, 0x57bb, 0xcac6, 0xcbc6, 0x58bb, 0xccc6, 0xcdc6, 0xcec6, 0x59bb, 0x5abb, 0x61bb, 0xcfc6, 0x62bb, 0x63bb, 0xd0c6, 0xd1c6, 0x64bb, 0x65bb, 0xd2c6, 0x66bb, 0x67bb, 0x68bb, 0xd3c6, 0x69bb, 0x6abb, 0x6bbb, 0x6cbb, 0x6dbb, 0x6ebb, 0x6fbb, 0xd4c6, 0xd5c6, 0x70bb, 0xd6c6, 0xd7c6, 0xd8c6, 0x71bb, 0x72bb, 0x73bb, 0x74bb, 0x75bb, 0x76bb, 0xd9c6, 0xdac6, 0x77bb, 0x78bb, 0x79bb, 0x7abb, 0x81bb, 0x82bb, 0x83bb, 0x84bb, 0x85bb, 0x86bb, 0x87bb, 0x88bb, 0x89bb, 0x8abb, 0x8bbb, 0x8cbb, 0x8dbb, 0x8ebb, 0x8fbb, 0x90bb, 0x91bb, 0x92bb, 0x93bb, 0x94bb, 0x95bb, 0x96bb, 0x97bb, 0x98bb, 0x99bb, 0x9abb, 0x9bbb, 0x9cbb, 0x9dbb, 0x9ebb, 0x9fbb, 0xa0bb, 0x41bc, 0x42bc, 0x43bc, 0x44bc, 0x45bc, 0x46bc, 0x47bc, 0x48bc, 0x49bc, 0x4abc, 0x4bbc, 0x4cbc, 0x4dbc, 0x4ebc, 0x4fbc, 0x50bc, 0x51bc, 0x52bc, 0xdbc6, 0xdcc6, 0x53bc, 0x54bc, 0xddc6, 0x55bc, 0x56bc, 0x57bc, 0xdec6, 0x58bc, 0x59bc, 0x5abc, 0x61bc, 0x62bc, 0x63bc, 0x64bc, 0xdfc6, 0xe0c6, 0x65bc, 0xe1c6, 0xe2c6, 0xe3c6, 0x66bc, 0x67bc, 0x68bc, 0x69bc, 0x6abc, 0x6bbc, 0xe4c6, 0xe5c6, 0x6cbc, 0x6dbc, 0xe6c6, 0x6ebc, 0x6fbc, 0x70bc, 0xe7c6, 0x71bc, 0x72bc, 0x73bc, 0x74bc, 0x75bc, 0x76bc, 0x77bc, 0xe8c6, 0xe9c6, 0x78bc, 0xeac6, 0x79bc, 0xebc6, 0x7abc, 0x81bc, 0x82bc, 0x83bc, 0x84bc, 0x85bc, 0xecc6, 0x86bc, 0x87bc, 0x88bc, 0xedc6, 0x89bc, 0x8abc, 0x8bbc, 0xeec6, 0x8cbc, 0x8dbc, 0x8ebc, 0x8fbc, 0x90bc, 0x91bc, 0x92bc, 0xefc6, 0xf0c6, 0x93bc, 0x94bc, 0xf1c6, 0xf2c6, 0x95bc, 0x96bc, 0x97bc, 0x98bc, 0x99bc, 0x9abc, 0xf3c6, 0x9bbc, 0x9cbc, 0x9dbc, 0x9ebc, 0x9fbc, 0xa0bc, 0x41bd, 0xf4c6, 0x42bd, 0x43bd, 0x44bd, 0x45bd, 0x46bd, 0x47bd, 0x48bd, 0x49bd, 0xf5c6, 0x4abd, 0xf6c6, 0x4bbd, 0x4cbd, 0x4dbd, 0x4ebd, 0x4fbd, 0x50bd, 0x51bd, 0x52bd, 0xf7c6, 0xf8c6, 0x53bd, 0x54bd, 0xf9c6, 0x55bd, 0x56bd, 0x57bd, 0xfac6, 0x58bd, 0x59bd, 0x5abd, 0x61bd, 0x62bd, 0x63bd, 0x64bd, 0xfbc6, 0xfcc6, 0x65bd, 0xfdc6, 0x66bd, 0xfec6, 0x67bd, 0x68bd, 0x69bd, 0x6abd, 0x6bbd, 0x6cbd, 0xa1c7, 0x6dbd, 0x6ebd, 0x6fbd, 0x70bd, 0x71bd, 0x72bd, 0x73bd, 0x74bd, 0x75bd, 0x76bd, 0x77bd, 0x78bd, 0x79bd, 0x7abd, 0x81bd, 0x82bd, 0x83bd, 0x84bd, 0x85bd, 0x86bd, 0xa2c7, 0x87bd, 0x88bd, 0x89bd, 0x8abd, 0x8bbd, 0x8cbd, 0x8dbd, 0x8ebd, 0x8fbd, 0x90bd, 0x91bd, 0x92bd, 0x93bd, 0x94bd, 0x95bd, 0x96bd, 0x97bd, 0x98bd, 0x99bd, 0x9abd, 0x9bbd, 0x9cbd, 0x9dbd, 0x9ebd, 0x9fbd, 0xa0bd, 0x41be, 0x42be, 0x43be, 0x44be, 0x45be, 0x46be, 0x47be, 0x48be, 0xa3c7, 0x49be, 0x4abe, 0x4bbe, 0xa4c7, 0x4cbe, 0x4dbe, 0x4ebe, 0x4fbe, 0x50be, 0x51be, 0x52be, 0x53be, 0x54be, 0x55be, 0x56be, 0x57be, 0x58be, 0x59be, 0x5abe, 0x61be, 0x62be, 0x63be, 0x64be, 0x65be, 0x66be, 0x67be, 0x68be, 0xa5c7, 0x69be, 0x6abe, 0x6bbe, 0xa6c7, 0x6cbe, 0x6dbe, 0x6ebe, 0xa7c7, 0x6fbe, 0x70be, 0x71be, 0x72be, 0x73be, 0x74be, 0x75be, 0x76be, 0xa8c7, 0x77be, 0xa9c7, 0x78be, 0x79be, 0x7abe, 0x81be, 0x82be, 0x83be, 0x84be, 0x85be, 0xaac7, 0xabc7, 0x86be, 0x87be, 0xacc7, 0x88be, 0x89be, 0xadc7, 0xaec7, 0x8abe, 0xafc7, 0x8bbe, 0x8cbe, 0x8dbe, 0x8ebe, 0x8fbe, 0xb0c7, 0xb1c7, 0x90be, 0xb2c7, 0x91be, 0xb3c7, 0x92be, 0x93be, 0x94be, 0x95be, 0x96be, 0x97be, 0xb4c7, 0x98be, 0x99be, 0x9abe, 0x9bbe, 0x9cbe, 0x9dbe, 0x9ebe, 0x9fbe, 0xa0be, 0x41bf, 0x42bf, 0x43bf, 0x44bf, 0x45bf, 0x46bf, 0x47bf, 0x48bf, 0x49bf, 0x4abf, 0x4bbf, 0xb5c7, 0x4cbf, 0x4dbf, 0x4ebf, 0x4fbf, 0x50bf, 0x51bf, 0x52bf, 0x53bf, 0x54bf, 0x55bf, 0x56bf, 0x57bf, 0x58bf, 0x59bf, 0x5abf, 0x61bf, 0x62bf, 0x63bf, 0x64bf, 0x65bf, 0x66bf, 0x67bf, 0x68bf, 0x69bf, 0x6abf, 0x6bbf, 0x6cbf, 0x6dbf, 0x6ebf, 0x6fbf, 0x70bf, 0x71bf, 0x72bf, 0x73bf, 0xb6c7, 0x74bf, 0x75bf, 0x76bf, 0xb7c7, 0x77bf, 0x78bf, 0x79bf, 0xb8c7, 0x7abf, 0x81bf, 0x82bf, 0x83bf, 0x84bf, 0x85bf, 0x86bf, 0xb9c7, 0x87bf, 0x88bf, 0xbac7, 0x89bf, 0x8abf, 0x8bbf, 0x8cbf, 0x8dbf, 0x8ebf, 0x8fbf, 0x90bf, 0xbbc7, 0x91bf, 0x92bf, 0x93bf, 0xbcc7, 0x94bf, 0x95bf, 0x96bf, 0xbdc7, 0x97bf, 0x98bf, 0x99bf, 0x9abf, 0x9bbf, 0x9cbf, 0x9dbf, 0xbec7, 0x9ebf, 0x9fbf, 0xbfc7, 0xa0bf, 0xc0c7, 0x41c0, 0x42c0, 0x43c0, 0x44c0, 0x45c0, 0x46c0, 0xc1c7, 0x47c0, 0x48c0, 0x49c0, 0xc2c7, 0x4ac0, 0x4bc0, 0x4cc0, 0xc3c7, 0x4dc0, 0x4ec0, 0x4fc0, 0x50c0, 0x51c0, 0x52c0, 0x53c0, 0xc4c7, 0xc5c7, 0x54c0, 0xc6c7, 0x55c0, 0x56c0, 0x57c0, 0x58c0, 0x59c0, 0x5ac0, 0x61c0, 0x62c0, 0x63c0, 0x64c0, 0x65c0, 0x66c0, 0x67c0, 0x68c0, 0x69c0, 0x6ac0, 0x6bc0, 0x6cc0, 0x6dc0, 0x6ec0, 0x6fc0, 0x70c0, 0x71c0, 0x72c0, 0x73c0, 0x74c0, 0x75c0, 0x76c0, 0x77c0, 0x78c0, 0x79c0, 0x7ac0, 0x81c0, 0x82c0, 0x83c0, 0x84c0, 0xc7c7, 0xc8c7, 0x85c0, 0x86c0, 0xc9c7, 0x87c0, 0x88c0, 0x89c0, 0xcac7, 0x8ac0, 0x8bc0, 0x8cc0, 0x8dc0, 0x8ec0, 0x8fc0, 0x90c0, 0xcbc7, 0xccc7, 0x91c0, 0xcdc7, 0x92c0, 0xcec7, 0x93c0, 0x94c0, 0x95c0, 0x96c0, 0x97c0, 0x98c0, 0xcfc7, 0xd0c7, 0x99c0, 0x9ac0, 0xd1c7, 0x9bc0, 0x9cc0, 0x9dc0, 0xd2c7, 0x9ec0, 0x9fc0, 0xa0c0, 0x41c1, 0xd3c7, 0x42c1, 0x43c1, 0xd4c7, 0xd5c7, 0x44c1, 0xd6c7, 0x45c1, 0xd7c7, 0x46c1, 0x47c1, 0x48c1, 0x49c1, 0x4ac1, 0x4bc1, 0xd8c7, 0xd9c7, 0x4cc1, 0x4dc1, 0xdac7, 0x4ec1, 0x4fc1, 0x50c1, 0xdbc7, 0x51c1, 0x52c1, 0x53c1, 0x54c1, 0x55c1, 0x56c1, 0x57c1, 0xdcc7, 0xddc7, 0x58c1, 0xdec7, 0xdfc7, 0xe0c7, 0x59c1, 0x5ac1, 0x61c1, 0x62c1, 0x63c1, 0x64c1, 0xe1c7, 0x65c1, 0x66c1, 0x67c1, 0x68c1, 0x69c1, 0x6ac1, 0x6bc1, 0x6cc1, 0x6dc1, 0x6ec1, 0x6fc1, 0x70c1, 0x71c1, 0x72c1, 0x73c1, 0x74c1, 0x75c1, 0x76c1, 0x77c1, 0x78c1, 0xe2c7, 0x79c1, 0x7ac1, 0x81c1, 0x82c1, 0x83c1, 0x84c1, 0x85c1, 0x86c1, 0x87c1, 0x88c1, 0x89c1, 0x8ac1, 0x8bc1, 0x8cc1, 0x8dc1, 0x8ec1, 0x8fc1, 0x90c1, 0x91c1, 0x92c1, 0x93c1, 0x94c1, 0x95c1, 0x96c1, 0x97c1, 0x98c1, 0x99c1, 0x9ac1, 0x9bc1, 0x9cc1, 0x9dc1, 0x9ec1, 0x9fc1, 0xa0c1, 0xe3c7, 0xe4c7, 0x41c2, 0x42c2, 0xe5c7, 0x43c2, 0x44c2, 0x45c2, 0xe6c7, 0x46c2, 0xe7c7, 0x47c2, 0x48c2, 0x49c2, 0x4ac2, 0x4bc2, 0xe8c7, 0xe9c7, 0x4cc2, 0xeac7, 0x4dc2, 0xebc7, 0x4ec2, 0x4fc2, 0x50c2, 0x51c2, 0x52c2, 0x53c2, 0xecc7, 0xedc7, 0x54c2, 0x55c2, 0xeec7, 0x56c2, 0x57c2, 0x58c2, 0xefc7, 0x59c2, 0x5ac2, 0x61c2, 0x62c2, 0x63c2, 0x64c2, 0x65c2, 0xf0c7, 0xf1c7, 0x66c2, 0xf2c7, 0x67c2, 0xf3c7, 0x68c2, 0x69c2, 0x6ac2, 0x6bc2, 0x6cc2, 0x6dc2, 0xf4c7, 0xf5c7, 0x6ec2, 0x6fc2, 0xf6c7, 0x70c2, 0x71c2, 0x72c2, 0xf7c7, 0x73c2, 0x74c2, 0x75c2, 0x76c2, 0x77c2, 0x78c2, 0x79c2, 0xf8c7, 0xf9c7, 0x7ac2, 0xfac7, 0xfbc7, 0xfcc7, 0x81c2, 0x82c2, 0x83c2, 0x84c2, 0x85c2, 0x86c2, 0xfdc7, 0x87c2, 0x88c2, 0x89c2, 0xfec7, 0x8ac2, 0x8bc2, 0x8cc2, 0xa1c8, 0x8dc2, 0x8ec2, 0x8fc2, 0x90c2, 0x91c2, 0x92c2, 0x93c2, 0x94c2, 0xa2c8, 0x95c2, 0x96c2, 0x97c2, 0x98c2, 0x99c2, 0x9ac2, 0x9bc2, 0x9cc2, 0x9dc2, 0x9ec2, 0xa3c8, 0xa4c8, 0x9fc2, 0xa0c2, 0xa5c8, 0x41c3, 0x42c3, 0x43c3, 0xa6c8, 0x44c3, 0x45c3, 0x46c3, 0x47c3, 0xa7c8, 0x48c3, 0x49c3, 0xa8c8, 0xa9c8, 0x4ac3, 0xaac8, 0x4bc3, 0xabc8, 0x4cc3, 0x4dc3, 0x4ec3, 0xacc8, 0x4fc3, 0x50c3, 0xadc8, 0xaec8, 0x51c3, 0x52c3, 0xafc8, 0x53c3, 0x54c3, 0x55c3, 0xb0c8, 0x56c3, 0x57c3, 0x58c3, 0x59c3, 0x5ac3, 0x61c3, 0x62c3, 0x63c3, 0x64c3, 0x65c3, 0xb1c8, 0x66c3, 0xb2c8, 0x67c3, 0x68c3, 0x69c3, 0x6ac3, 0x6bc3, 0x6cc3, 0xb3c8, 0xb4c8, 0x6dc3, 0x6ec3, 0xb5c8, 0x6fc3, 0x70c3, 0x71c3, 0x72c3, 0x73c3, 0x74c3, 0x75c3, 0x76c3, 0x77c3, 0x78c3, 0x79c3, 0x7ac3, 0x81c3, 0x82c3, 0xb6c8, 0x83c3, 0xb7c8, 0x84c3, 0x85c3, 0x86c3, 0x87c3, 0x88c3, 0x89c3, 0xb8c8, 0xb9c8, 0x8ac3, 0x8bc3, 0xbac8, 0x8cc3, 0x8dc3, 0x8ec3, 0xbbc8, 0x8fc3, 0x90c3, 0x91c3, 0x92c3, 0x93c3, 0x94c3, 0x95c3, 0x96c3, 0xbcc8, 0x97c3, 0xbdc8, 0x98c3, 0xbec8, 0x99c3, 0x9ac3, 0x9bc3, 0x9cc3, 0x9dc3, 0x9ec3, 0xbfc8, 0x9fc3, 0xa0c3, 0x41c4, 0xc0c8, 0x42c4, 0x43c4, 0x44c4, 0xc1c8, 0x45c4, 0x46c4, 0x47c4, 0x48c4, 0x49c4, 0x4ac4, 0x4bc4, 0x4cc4, 0xc2c8, 0x4dc4, 0xc3c8, 0x4ec4, 0x4fc4, 0x50c4, 0x51c4, 0x52c4, 0x53c4, 0x54c4, 0x55c4, 0xc4c8, 0xc5c8, 0x56c4, 0x57c4, 0xc6c8, 0x58c4, 0x59c4, 0x5ac4, 0xc7c8, 0x61c4, 0x62c4, 0x63c4, 0x64c4, 0xc8c8, 0x65c4, 0x66c4, 0xc9c8, 0x67c4, 0x68c4, 0xcac8, 0x69c4, 0xcbc8, 0x6ac4, 0x6bc4, 0x6cc4, 0x6dc4, 0x6ec4, 0x6fc4, 0xccc8, 0x70c4, 0x71c4, 0x72c4, 0xcdc8, 0x73c4, 0x74c4, 0x75c4, 0xcec8, 0x76c4, 0x77c4, 0x78c4, 0x79c4, 0x7ac4, 0x81c4, 0x82c4, 0xcfc8, 0x83c4, 0x84c4, 0x85c4, 0x86c4, 0xd0c8, 0x87c4, 0x88c4, 0x89c4, 0x8ac4, 0x8bc4, 0x8cc4, 0xd1c8, 0xd2c8, 0x8dc4, 0x8ec4, 0xd3c8, 0x8fc4, 0x90c4, 0x91c4, 0xd4c8, 0x92c4, 0x93c4, 0x94c4, 0x95c4, 0x96c4, 0x97c4, 0x98c4, 0x99c4, 0x9ac4, 0x9bc4, 0x9cc4, 0x9dc4, 0xd5c8, 0x9ec4, 0x9fc4, 0xa0c4, 0x41c5, 0x42c5, 0x43c5, 0xd6c8, 0xd7c8, 0x44c5, 0x45c5, 0xd8c8, 0x46c5, 0x47c5, 0x48c5, 0xd9c8, 0x49c5, 0x4ac5, 0x4bc5, 0x4cc5, 0x4dc5, 0x4ec5, 0x4fc5, 0xdac8, 0xdbc8, 0x50c5, 0xdcc8, 0x51c5, 0xddc8, 0x52c5, 0x53c5, 0x54c5, 0x55c5, 0x56c5, 0x57c5, 0xdec8, 0xdfc8, 0x58c5, 0x59c5, 0xe0c8, 0x5ac5, 0x61c5, 0x62c5, 0xe1c8, 0x63c5, 0x64c5, 0x65c5, 0x66c5, 0x67c5, 0x68c5, 0x69c5, 0xe2c8, 0x6ac5, 0x6bc5, 0xe3c8, 0x6cc5, 0xe4c8, 0x6dc5, 0x6ec5, 0x6fc5, 0x70c5, 0x71c5, 0x72c5, 0xe5c8, 0xe6c8, 0x73c5, 0x74c5, 0xe7c8, 0x75c5, 0xe8c8, 0xe9c8, 0xeac8, 0xebc8, 0x76c5, 0x77c5, 0x78c5, 0x79c5, 0x7ac5, 0x81c5, 0xecc8, 0xedc8, 0x82c5, 0xeec8, 0x83c5, 0xefc8, 0x84c5, 0x85c5, 0x86c5, 0xf0c8, 0x87c5, 0x88c5, 0xf1c8, 0x89c5, 0x8ac5, 0x8bc5, 0xf2c8, 0x8cc5, 0x8dc5, 0x8ec5, 0xf3c8, 0x8fc5, 0x90c5, 0x91c5, 0x92c5, 0x93c5, 0x94c5, 0x95c5, 0xf4c8, 0xf5c8, 0x96c5, 0x97c5, 0x98c5, 0xf6c8, 0x99c5, 0x9ac5, 0x9bc5, 0x9cc5, 0x9dc5, 0x9ec5, 0xf7c8, 0xf8c8, 0x9fc5, 0xa0c5, 0xf9c8, 0x41c6, 0x42c6, 0x43c6, 0xfac8, 0x44c6, 0x45c6, 0x46c6, 0x47c6, 0x48c6, 0x49c6, 0x4ac6, 0xfbc8, 0xfcc8, 0x4bc6, 0xfdc8, 0x4cc6, 0xfec8, 0x4dc6, 0x4ec6, 0x4fc6, 0x50c6, 0x51c6, 0x52c6 }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0xf900[ 268 ] = { 0xd0cb, 0xd6cb, 0xe7cb, 0xcfcd, 0xe8cd, 0xadce, 0xfbcf, 0xa2d0, 0xb8d0, 0xd0d0, 0xddd0, 0xd4d1, 0xd5d1, 0xd8d1, 0xdbd1, 0xdcd1, 0xddd1, 0xded1, 0xdfd1, 0xe0d1, 0xe2d1, 0xe3d1, 0xe4d1, 0xe5d1, 0xe6d1, 0xe8d1, 0xe9d1, 0xead1, 0xebd1, 0xedd1, 0xefd1, 0xf0d1, 0xf2d1, 0xf6d1, 0xfad1, 0xfcd1, 0xfdd1, 0xfed1, 0xa2d2, 0xa3d2, 0xa7d2, 0xa8d2, 0xa9d2, 0xaad2, 0xabd2, 0xadd2, 0xb2d2, 0xbed2, 0xc2d2, 0xc3d2, 0xc4d2, 0xc6d2, 0xc7d2, 0xc8d2, 0xc9d2, 0xcad2, 0xcbd2, 0xcdd2, 0xced2, 0xcfd2, 0xd0d2, 0xd1d2, 0xd2d2, 0xd3d2, 0xd4d2, 0xd5d2, 0xd6d2, 0xd7d2, 0xd9d2, 0xdad2, 0xded2, 0xdfd2, 0xe1d2, 0xe2d2, 0xe4d2, 0xe5d2, 0xe6d2, 0xe7d2, 0xe8d2, 0xe9d2, 0xead2, 0xebd2, 0xf0d2, 0xf1d2, 0xf2d2, 0xf3d2, 0xf4d2, 0xf5d2, 0xf7d2, 0xf8d2, 0xe6d4, 0xfcd4, 0xa5d5, 0xabd5, 0xaed5, 0xb8d6, 0xcdd6, 0xcbd7, 0xe4d7, 0xc5db, 0xe4db, 0xa5dc, 0xa5dd, 0xd5dd, 0xf4dd, 0xfcde, 0xfede, 0xb3df, 0xe1df, 0xe8df, 0xf1e0, 0xade1, 0xede1, 0xf5e3, 0xa1e4, 0xa9e4, 0xaee5, 0xb1e5, 0xb2e5, 0xb9e5, 0xbbe5, 0xbce5, 0xc4e5, 0xcee5, 0xd0e5, 0xd2e5, 0xd6e5, 0xfae5, 0xfbe5, 0xfce5, 0xfee5, 0xa1e6, 0xa4e6, 0xa7e6, 0xade6, 0xafe6, 0xb0e6, 0xb1e6, 0xb3e6, 0xb7e6, 0xb8e6, 0xbce6, 0xc4e6, 0xc6e6, 0xc7e6, 0xcae6, 0xd2e6, 0xd6e6, 0xd9e6, 0xdce6, 0xdfe6, 0xe1e6, 0xe4e6, 0xe5e6, 0xe6e6, 0xe8e6, 0xeae6, 0xebe6, 0xece6, 0xefe6, 0xf1e6, 0xf2e6, 0xf5e6, 0xf6e6, 0xf7e6, 0xf9e6, 0xa1e7, 0xa6e7, 0xa9e7, 0xaae7, 0xace7, 0xade7, 0xb0e7, 0xbfe7, 0xc1e7, 0xc6e7, 0xc7e7, 0xcbe7, 0xcde7, 0xcfe7, 0xd0e7, 0xd3e7, 0xdfe7, 0xe4e7, 0xe6e7, 0xf7e7, 0xe7e8, 0xe8e8, 0xf0e8, 0xf1e8, 0xf7e8, 0xf9e8, 0xfbe8, 0xfee8, 0xa7e9, 0xace9, 0xcce9, 0xf7e9, 0xc1ea, 0xe5ea, 0xf4ea, 0xf7ea, 0xfcea, 0xfeea, 0xa4eb, 0xa7eb, 0xa9eb, 0xaaeb, 0xbaeb, 0xbbeb, 0xbdeb, 0xc1eb, 0xc2eb, 0xc6eb, 0xc7eb, 0xcceb, 0xcfeb, 0xd0eb, 0xd1eb, 0xd2eb, 0xd8eb, 0xa6ec, 0xa7ec, 0xaaec, 0xafec, 0xb0ec, 0xb1ec, 0xb2ec, 0xb5ec, 0xb8ec, 0xbaec, 0xc0ec, 0xc1ec, 0xc5ec, 0xc6ec, 0xc9ec, 0xcaec, 0xd5ec, 0xddec, 0xdeec, 0xe1ec, 0xe4ec, 0xe7ec, 0xe8ec, 0xf7ec, 0xf8ec, 0xfaec, 0xa1ed, 0xa2ed, 0xa3ed, 0xeeed, 0xdbee, 0xbdf2, 0xfaf2, 0xb1f3, 0xa7f4, 0xeef4, 0xf4f6, 0xf6f6, 0xb8f7, 0xc8f7, 0xd3f7, 0xdbf8, 0xf0f8, 0xa1fa, 0xa2fa, 0xe6fa, 0xa9fc }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0xff00[ 256 ] = { 0x001a, 0xa1a3, 0xa2a3, 0xa3a3, 0xa4a3, 0xa5a3, 0xa6a3, 0xa7a3, 0xa8a3, 0xa9a3, 0xaaa3, 0xaba3, 0xaca3, 0xada3, 0xaea3, 0xafa3, 0xb0a3, 0xb1a3, 0xb2a3, 0xb3a3, 0xb4a3, 0xb5a3, 0xb6a3, 0xb7a3, 0xb8a3, 0xb9a3, 0xbaa3, 0xbba3, 0xbca3, 0xbda3, 0xbea3, 0xbfa3, 0xc0a3, 0xc1a3, 0xc2a3, 0xc3a3, 0xc4a3, 0xc5a3, 0xc6a3, 0xc7a3, 0xc8a3, 0xc9a3, 0xcaa3, 0xcba3, 0xcca3, 0xcda3, 0xcea3, 0xcfa3, 0xd0a3, 0xd1a3, 0xd2a3, 0xd3a3, 0xd4a3, 0xd5a3, 0xd6a3, 0xd7a3, 0xd8a3, 0xd9a3, 0xdaa3, 0xdba3, 0xaca1, 0xdda3, 0xdea3, 0xdfa3, 0xe0a3, 0xe1a3, 0xe2a3, 0xe3a3, 0xe4a3, 0xe5a3, 0xe6a3, 0xe7a3, 0xe8a3, 0xe9a3, 0xeaa3, 0xeba3, 0xeca3, 0xeda3, 0xeea3, 0xefa3, 0xf0a3, 0xf1a3, 0xf2a3, 0xf3a3, 0xf4a3, 0xf5a3, 0xf6a3, 0xf7a3, 0xf8a3, 0xf9a3, 0xfaa3, 0xfba3, 0xfca3, 0xfda3, 0xa6a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcba1, 0xcca1, 0xfea1, 0xfea3, 0x001a, 0xcda1, 0xdca3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; /* Determines the size of a byte stream character from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_949_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_949_unicode_character_size_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream character size.", function ); return( -1 ); } if( unicode_character < 0x80 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x02c0 ) && ( unicode_character < 0x0480 ) ) { unicode_character -= 0x02c0; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x02c0[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fc0 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xac00 ) && ( unicode_character < 0xd7a4 ) ) { unicode_character -= 0xac00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xac00[ unicode_character ]; } else if( ( unicode_character >= 0xf900 ) && ( unicode_character < 0xfa14 ) ) { unicode_character -= 0xf900; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xf900[ unicode_character ]; } else if( ( unicode_character >= 0xff00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xff00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xff00[ unicode_character ]; } byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_character_size += 2; } else { *byte_stream_character_size += 1; } return( 1 ); } /* Copies a Unicode character from a byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_949_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_949_copy_from_byte_stream"; uint8_t additional_character = 0; uint8_t byte_stream_character = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } byte_stream_character = byte_stream[ *byte_stream_index ]; if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else if( ( *byte_stream_index + 1 ) <= byte_stream_size ) { *byte_stream_index += 1; additional_character = byte_stream[ *byte_stream_index ]; if( ( byte_stream_character >= 0x81 ) && ( byte_stream_character <= 0xa1 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0x81: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8140[ additional_character ]; break; case 0x82: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8240[ additional_character ]; break; case 0x83: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8340[ additional_character ]; break; case 0x84: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8440[ additional_character ]; break; case 0x85: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8540[ additional_character ]; break; case 0x86: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8640[ additional_character ]; break; case 0x87: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8740[ additional_character ]; break; case 0x88: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8840[ additional_character ]; break; case 0x89: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8940[ additional_character ]; break; case 0x8a: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8a40[ additional_character ]; break; case 0x8b: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8b40[ additional_character ]; break; case 0x8c: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8c40[ additional_character ]; break; case 0x8d: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8d40[ additional_character ]; break; case 0x8e: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8e40[ additional_character ]; break; case 0x8f: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8f40[ additional_character ]; break; case 0x90: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9040[ additional_character ]; break; case 0x91: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9140[ additional_character ]; break; case 0x92: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9240[ additional_character ]; break; case 0x93: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9340[ additional_character ]; break; case 0x94: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9440[ additional_character ]; break; case 0x95: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9540[ additional_character ]; break; case 0x96: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9640[ additional_character ]; break; case 0x97: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9740[ additional_character ]; break; case 0x98: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9840[ additional_character ]; break; case 0x99: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9940[ additional_character ]; break; case 0x9a: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9a40[ additional_character ]; break; case 0x9b: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9b40[ additional_character ]; break; case 0x9c: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9c40[ additional_character ]; break; case 0x9d: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9d40[ additional_character ]; break; case 0x9e: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9e40[ additional_character ]; break; case 0x9f: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9f40[ additional_character ]; break; case 0xa0: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa040[ additional_character ]; break; case 0xa1: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa140[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa2 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xe8 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa240[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xa3 ) && ( byte_stream_character <= 0xa4 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xa3: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa340[ additional_character ]; break; case 0xa4: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa440[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa5 ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa540[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa6 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xe8 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa640[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa7 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xf0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa740[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xa8 ) && ( byte_stream_character <= 0xa9 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xa8: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa840[ additional_character ]; break; case 0xa9: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa940[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xaa ) && ( byte_stream_character <= 0xab ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xaa: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaa40[ additional_character ]; break; case 0xab: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xab40[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xac ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xc8 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xac40[ additional_character ]; } else if( ( additional_character >= 0xd0 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0xd0; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xacd0[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xad ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xad40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0xcdc5; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xae ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xae40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0xce2b; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xaf ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaf40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0xce99; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xb0 ) && ( byte_stream_character <= 0xc5 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xb0: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb040[ additional_character ]; break; case 0xb1: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb140[ additional_character ]; break; case 0xb2: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb240[ additional_character ]; break; case 0xb3: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb340[ additional_character ]; break; case 0xb4: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb440[ additional_character ]; break; case 0xb5: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb540[ additional_character ]; break; case 0xb6: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb640[ additional_character ]; break; case 0xb7: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb740[ additional_character ]; break; case 0xb8: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb840[ additional_character ]; break; case 0xb9: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb940[ additional_character ]; break; case 0xba: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xba40[ additional_character ]; break; case 0xbb: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbb40[ additional_character ]; break; case 0xbc: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbc40[ additional_character ]; break; case 0xbd: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbd40[ additional_character ]; break; case 0xbe: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbe40[ additional_character ]; break; case 0xbf: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbf40[ additional_character ]; break; case 0xc0: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc040[ additional_character ]; break; case 0xc1: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc140[ additional_character ]; break; case 0xc2: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc240[ additional_character ]; break; case 0xc3: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc340[ additional_character ]; break; case 0xc4: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc440[ additional_character ]; break; case 0xc5: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc540[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xc6 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x58 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc640[ additional_character ]; } else if( additional_character >= 0xa0 ) { additional_character -= 0xa0; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc6a0[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xc7 ) && ( byte_stream_character <= 0xc8 ) ) { if( additional_character >= 0xa0 ) { additional_character -= 0xa0; switch( byte_stream_character ) { case 0xc7: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc7a0[ additional_character ]; break; case 0xc8: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc8a0[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xca ) && ( byte_stream_character <= 0xfd ) ) { if( additional_character >= 0xa0 ) { additional_character -= 0xa0; switch( byte_stream_character ) { case 0xca: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcaa0[ additional_character ]; break; case 0xcb: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcba0[ additional_character ]; break; case 0xcc: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcca0[ additional_character ]; break; case 0xcd: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcda0[ additional_character ]; break; case 0xce: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcea0[ additional_character ]; break; case 0xcf: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcfa0[ additional_character ]; break; case 0xd0: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd0a0[ additional_character ]; break; case 0xd1: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd1a0[ additional_character ]; break; case 0xd2: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd2a0[ additional_character ]; break; case 0xd3: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd3a0[ additional_character ]; break; case 0xd4: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd4a0[ additional_character ]; break; case 0xd5: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd5a0[ additional_character ]; break; case 0xd6: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd6a0[ additional_character ]; break; case 0xd7: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd7a0[ additional_character ]; break; case 0xd8: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd8a0[ additional_character ]; break; case 0xd9: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd9a0[ additional_character ]; break; case 0xda: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdaa0[ additional_character ]; break; case 0xdb: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdba0[ additional_character ]; break; case 0xdc: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdca0[ additional_character ]; break; case 0xdd: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdda0[ additional_character ]; break; case 0xde: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdea0[ additional_character ]; break; case 0xdf: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdfa0[ additional_character ]; break; case 0xe0: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe0a0[ additional_character ]; break; case 0xe1: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe1a0[ additional_character ]; break; case 0xe2: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe2a0[ additional_character ]; break; case 0xe3: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe3a0[ additional_character ]; break; case 0xe4: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe4a0[ additional_character ]; break; case 0xe5: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe5a0[ additional_character ]; break; case 0xe6: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe6a0[ additional_character ]; break; case 0xe7: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe7a0[ additional_character ]; break; case 0xe8: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe8a0[ additional_character ]; break; case 0xe9: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe9a0[ additional_character ]; break; case 0xea: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeaa0[ additional_character ]; break; case 0xeb: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeba0[ additional_character ]; break; case 0xec: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeca0[ additional_character ]; break; case 0xed: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeda0[ additional_character ]; break; case 0xee: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeea0[ additional_character ]; break; case 0xef: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xefa0[ additional_character ]; break; case 0xf0: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf0a0[ additional_character ]; break; case 0xf1: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf1a0[ additional_character ]; break; case 0xf2: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf2a0[ additional_character ]; break; case 0xf3: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf3a0[ additional_character ]; break; case 0xf4: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf4a0[ additional_character ]; break; case 0xf5: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf5a0[ additional_character ]; break; case 0xf6: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf6a0[ additional_character ]; break; case 0xf7: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf7a0[ additional_character ]; break; case 0xf8: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf8a0[ additional_character ]; break; case 0xf9: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf9a0[ additional_character ]; break; case 0xfa: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfaa0[ additional_character ]; break; case 0xfb: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfba0[ additional_character ]; break; case 0xfc: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfca0[ additional_character ]; break; case 0xfd: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfda0[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } *byte_stream_index += 1; return( 1 ); } /* Copies a Unicode character to a byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_949_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_949_copy_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( unicode_character < 0x80 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x02c0 ) && ( unicode_character < 0x0480 ) ) { unicode_character -= 0x02c0; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x02c0[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fc0 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xac00 ) && ( unicode_character < 0xd7a4 ) ) { unicode_character -= 0xac00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xac00[ unicode_character ]; } else if( ( unicode_character >= 0xf900 ) && ( unicode_character < 0xfa14 ) ) { unicode_character -= 0xf900; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xf900[ unicode_character ]; } else if( ( unicode_character >= 0xff00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xff00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xff00[ unicode_character ]; } byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_index += 1; byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); } *byte_stream_index += 1; return( 1 ); } libevt-20170120/libuna/libuna_codepage_iso_8859_6.h0000664000175000017500000000237513040331677023670 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-6 codepage (Arabic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_6_H ) #define _LIBUNA_CODEPAGE_ISO_8859_6_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_6_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_6_unicode_to_byte_stream_base_0x0618[ 64 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_6_H ) */ libevt-20170120/libuna/libuna_codepage_windows_1256.h0000664000175000017500000000303613040331677024316 0ustar00lordyestalordyesta00000000000000/* * Windows 1256 codepage (Arabic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1256_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1256_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1256_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00a0[ 32 ]; extern const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00e0[ 32 ]; extern const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x0618[ 64 ]; extern const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x2008[ 32 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1256_H ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_6.c0000664000175000017500000000475613040331677023670 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-6 codepage (Arabic) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_6.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-6 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_6_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0xfffd, 0xfffd, 0xfffd, 0x00a4, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x060c, 0x00ad, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x061b, 0xfffd, 0xfffd, 0xfffd, 0x061f, 0xfffd, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, 0x0650, 0x0651, 0x0652, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; /* Unicode to ASCII character lookup table for ISO 8859-6 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_6_unicode_to_byte_stream_base_0x0618[ 64 ] = { 0x1a, 0x1a, 0x1a, 0xbb, 0x1a, 0x1a, 0x1a, 0xbf, 0x1a, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; libevt-20170120/libuna/libuna_codepage_windows_874.h0000664000175000017500000000253413040331677024245 0ustar00lordyestalordyesta00000000000000/* * Windows 874 codepage (Thai) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_874_H ) #define _LIBUNA_CODEPAGE_WINDOWS_874_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_874_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_874_unicode_to_byte_stream_base_0x0e00[ 96 ]; extern const uint8_t libuna_codepage_windows_874_unicode_to_byte_stream_base_0x2018[ 8 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_874_H ) */ libevt-20170120/libuna/libuna_codepage_windows_1251.c0000664000175000017500000000672313040331677024312 0ustar00lordyestalordyesta00000000000000/* * Windows 1251 codepage (Cyrillic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1251.h" /* Extended ASCII to Unicode character lookup table for Windows 1251 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1251_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021, 0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f, 0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0xfffd, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f, 0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7, 0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407, 0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7, 0x0451, 0x2116, 0x0454, 0x00bb, 0x0458, 0x0405, 0x0455, 0x0457, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f }; /* Unicode to ASCII character lookup table for Windows 1251 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xa0, 0x1a, 0x1a, 0x1a, 0xa4, 0x1a, 0xa6, 0xa7, 0x1a, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0x1a, 0xb0, 0xb1, 0x1a, 0x1a, 0x1a, 0xb5, 0xb6, 0xb7, 0x1a, 0x1a, 0x1a, 0xbb, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x0400[ 96 ] = { 0x1a, 0xa8, 0x80, 0x81, 0xaa, 0xbd, 0xb2, 0xaf, 0xa3, 0x8a, 0x8c, 0x8e, 0x8d, 0x1a, 0xa1, 0x8f, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x1a, 0xb8, 0x90, 0x83, 0xba, 0xbe, 0xb3, 0xbf, 0xbc, 0x9a, 0x9c, 0x9e, 0x9d, 0x1a, 0xa2, 0x9f }; const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libevt-20170120/libuna/libuna_codepage_windows_1256.c0000664000175000017500000000713513040331677024315 0ustar00lordyestalordyesta00000000000000/* * Windows 1256 codepage (Arabic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1256.h" /* Extended ASCII to Unicode character lookup table for Windows 1256 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1256_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0x067e, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688, 0x06af, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x06a9, 0x2122, 0x0691, 0x203a, 0x0153, 0x200c, 0x200d, 0x06ba, 0x00a0, 0x060c, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x06be, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x061b, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x061f, 0x06c1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00d7, 0x0637, 0x0638, 0x0639, 0x063a, 0x0640, 0x0641, 0x0642, 0x0643, 0x00e0, 0x0644, 0x00e2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x0649, 0x064a, 0x00ee, 0x00ef, 0x064b, 0x064c, 0x064d, 0x064e, 0x00f4, 0x064f, 0x0650, 0x00f7, 0x0651, 0x00f9, 0x0652, 0x00fb, 0x00fc, 0x200e, 0x200f, 0x06d2 }; /* Unicode to ASCII character lookup table for Windows 1256 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xa0, 0x1a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0x1a, 0xbb, 0xbc, 0xbd, 0xbe, 0x1a }; const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00e0[ 32 ] = { 0xe0, 0x1a, 0xe2, 0x1a, 0x1a, 0x1a, 0x1a, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0x1a, 0x1a, 0xee, 0xef, 0x1a, 0x1a, 0x1a, 0x1a, 0xf4, 0x1a, 0x1a, 0xf7, 0x1a, 0xf9, 0x1a, 0xfb, 0xfc, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x0618[ 64 ] = { 0x1a, 0x1a, 0x1a, 0xba, 0x1a, 0x1a, 0x1a, 0xbf, 0x1a, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd8, 0xd9, 0xda, 0xdb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xdc, 0xdd, 0xde, 0xdf, 0xe1, 0xe3, 0xe4, 0xe5, 0xe6, 0xec, 0xed, 0xf0, 0xf1, 0xf2, 0xf3, 0xf5, 0xf6, 0xf8, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x2008[ 32 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0x9d, 0x9e, 0xfd, 0xfe, 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libevt-20170120/libuna/libuna_base16_stream.h0000664000175000017500000000460713040331677022761 0ustar00lordyestalordyesta00000000000000/* * Base16 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_BASE16_STREAM_H ) #define _LIBUNA_BASE16_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_base16_stream_size_to_byte_stream( const uint8_t *base16_stream, size_t base16_stream_size, size_t *byte_stream_size, uint32_t base16_variant, uint8_t flags, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base16_stream_copy_to_byte_stream( const uint8_t *base16_stream, size_t base16_stream_size, uint8_t *byte_stream, size_t byte_stream_size, uint32_t base16_variant, uint8_t flags, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base16_stream_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, size_t *base16_stream_size, uint32_t base16_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base16_stream_copy_from_byte_stream( uint8_t *base16_stream, size_t base16_stream_size, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base16_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base16_stream_with_index_copy_from_byte_stream( uint8_t *base16_stream, size_t base16_stream_size, size_t *base16_stream_index, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base16_variant, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_BASE16_STREAM_H ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_2.h0000664000175000017500000000267313040331677023665 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-2 codepage (Central European) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_2_H ) #define _LIBUNA_CODEPAGE_ISO_8859_2_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_2_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x00a0[ 128 ]; extern const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x0138[ 72 ]; extern const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x02d8[ 8 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_2_H ) */ libevt-20170120/libuna/Makefile.am0000664000175000017500000000570513012271520020643 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBUNA AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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_windows_874.c libuna_codepage_windows_874.h \ libuna_codepage_windows_932.c libuna_codepage_windows_932.h \ libuna_codepage_windows_936.c libuna_codepage_windows_936.h \ libuna_codepage_windows_949.c libuna_codepage_windows_949.h \ libuna_codepage_windows_950.c libuna_codepage_windows_950.h \ libuna_codepage_windows_1250.c libuna_codepage_windows_1250.h \ libuna_codepage_windows_1251.c libuna_codepage_windows_1251.h \ libuna_codepage_windows_1252.c libuna_codepage_windows_1252.h \ libuna_codepage_windows_1253.c libuna_codepage_windows_1253.h \ libuna_codepage_windows_1254.c libuna_codepage_windows_1254.h \ libuna_codepage_windows_1255.c libuna_codepage_windows_1255.h \ libuna_codepage_windows_1256.c libuna_codepage_windows_1256.h \ libuna_codepage_windows_1257.c libuna_codepage_windows_1257.h \ libuna_codepage_windows_1258.c libuna_codepage_windows_1258.h \ libuna_definitions.h \ libuna_error.c libuna_error.h \ libuna_extern.h \ libuna_inline.h \ libuna_libcerror.h \ libuna_support.c libuna_support.h \ libuna_types.h \ libuna_unicode_character.c libuna_unicode_character.h \ libuna_unused.h \ libuna_url_stream.c libuna_url_stream.h \ libuna_utf16_stream.c libuna_utf16_stream.h \ libuna_utf16_string.c libuna_utf16_string.h \ libuna_utf32_stream.c libuna_utf32_stream.h \ libuna_utf32_string.c libuna_utf32_string.h \ libuna_utf7_stream.c libuna_utf7_stream.h \ libuna_utf8_stream.c libuna_utf8_stream.h \ libuna_utf8_string.c libuna_utf8_string.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libuna ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libuna_la_SOURCES) libevt-20170120/libuna/libuna_codepage_windows_1257.c0000664000175000017500000000770313040331677024317 0ustar00lordyestalordyesta00000000000000/* * Windows 1257 codepage (Baltic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1257.h" /* Extended ASCII to Unicode character lookup table for Windows 1257 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1257_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0xfffd, 0x201a, 0xfffd, 0x201e, 0x2026, 0x2020, 0x2021, 0xfffd, 0x2030, 0xfffd, 0x2039, 0xfffd, 0x00a8, 0x02c7, 0x00b8, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0xfffd, 0x2122, 0xfffd, 0x203a, 0xfffd, 0x00af, 0x02db, 0xfffd, 0x00a0, 0xfffd, 0x00a2, 0x00a3, 0x00a4, 0xfffd, 0x00a6, 0x00a7, 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, 0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b, 0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df, 0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c, 0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x02d9 }; /* Unicode to ASCII character lookup table for Windows 1257 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x00a0[ 224 ] = { 0xa0, 0x1a, 0xa2, 0xa3, 0xa4, 0x1a, 0xa6, 0xa7, 0x8d, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0x9d, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0x8f, 0xb9, 0x1a, 0xbb, 0xbc, 0xbd, 0xbe, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc4, 0xc5, 0xaf, 0x1a, 0x1a, 0xc9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd3, 0x1a, 0xd5, 0xd6, 0xd7, 0xa8, 0x1a, 0x1a, 0x1a, 0xdc, 0x1a, 0x1a, 0xdf, 0x1a, 0x1a, 0x1a, 0x1a, 0xe4, 0xe5, 0xbf, 0x1a, 0x1a, 0xe9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf3, 0x1a, 0xf5, 0xf6, 0xf7, 0xb8, 0x1a, 0x1a, 0x1a, 0xfc, 0x1a, 0x1a, 0x1a, 0xc2, 0xe2, 0x1a, 0x1a, 0xc0, 0xe0, 0xc3, 0xe3, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0x1a, 0x1a, 0x1a, 0x1a, 0xc7, 0xe7, 0x1a, 0x1a, 0xcb, 0xeb, 0xc6, 0xe6, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xcc, 0xec, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xce, 0xee, 0x1a, 0x1a, 0xc1, 0xe1, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xcd, 0xed, 0x1a, 0x1a, 0x1a, 0xcf, 0xef, 0x1a, 0x1a, 0x1a, 0x1a, 0xd9, 0xf9, 0xd1, 0xf1, 0xd2, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd4, 0xf4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xaa, 0xba, 0x1a, 0x1a, 0xda, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0xd0, 0xf0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xdb, 0xfb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd8, 0xf8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xca, 0xea, 0xdd, 0xfd, 0xde, 0xfe, 0x1a }; const uint8_t libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libevt-20170120/libuna/libuna_codepage_windows_1254.h0000664000175000017500000000303413040331677024312 0ustar00lordyestalordyesta00000000000000/* * Windows 1254 codepage (Turkish) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1254_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1254_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0x80[ 32 ]; extern const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xd0[ 16 ]; extern const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xf0[ 16 ]; extern const uint8_t libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x00d0[ 48 ]; extern const uint8_t libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1254_H ) */ libevt-20170120/libuna/libuna_codepage_windows_1255.c0000664000175000017500000000655013040331677024314 0ustar00lordyestalordyesta00000000000000/* * Windows 1255 codepage (Hebrew) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1255.h" /* Extended ASCII to Unicode character lookup table for Windows 1255 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1255_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0xfffd, 0x2039, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0xfffd, 0x203a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20aa, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, 0x05b0, 0x05b1, 0x05b2, 0x05b3, 0x05b4, 0x05b5, 0x05b6, 0x05b7, 0x05b8, 0x05b9, 0xfffd, 0x05bb, 0x05bc, 0x05bd, 0x05be, 0x05bf, 0x05c0, 0x05c1, 0x05c2, 0x05c3, 0x05f0, 0x05f1, 0x05f2, 0x05f3, 0x05f4, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, 0x05e8, 0x05e9, 0x05ea, 0xfffd, 0xfffd, 0x200e, 0x200f, 0xfffd }; /* Unicode to ASCII character lookup table for Windows 1255 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xa0, 0xa1, 0xa2, 0xa3, 0x1a, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0x1a, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf }; const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05b0[ 24 ] = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0x1a, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05d0[ 40 ] = { 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libevt-20170120/libuna/libuna_unused.h0000664000175000017500000000252613040331677021626 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_INTERNAL_UNUSED_H ) #define _LIBUNA_INTERNAL_UNUSED_H #include #if !defined( LIBUNA_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBUNA_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBUNA_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBUNA_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBUNA_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBUNA_INTERNAL_UNUSED_H ) */ libevt-20170120/libuna/libuna_codepage_windows_1253.h0000664000175000017500000000270113040331677024311 0ustar00lordyestalordyesta00000000000000/* * Windows 1253 codepage (Greek) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1253_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1253_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1253_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x00a0[ 32 ]; extern const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x0380[ 80 ]; extern const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1253_H ) */ libevt-20170120/libuna/libuna_unicode_character.h0000664000175000017500000001343113040331677023762 0ustar00lordyestalordyesta00000000000000/* * Unicode character functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UNICDODE_CHARACTER_H ) #define _LIBUNA_UNICDODE_CHARACTER_H #include #include #include "libuna_definitions.h" #include "libuna_extern.h" #include "libuna_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_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_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_UNICDODE_CHARACTER_H ) */ libevt-20170120/libuna/libuna_byte_stream.c0000664000175000017500000003552313040331677022637 0ustar00lordyestalordyesta00000000000000/* * Byte stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_byte_stream.h" #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" /* Determines the size of a byte stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_byte_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, int codepage, size_t *byte_stream_size, libcerror_error_t **error ) { static char *function = "libuna_byte_stream_size_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } *byte_stream_size = 0; while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Determine how many byte stream character bytes are required */ if( libuna_unicode_character_size_to_byte_stream( unicode_character, codepage, byte_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to unable to determine size of Unicode character in byte stream.", function ); return( -1 ); } } return( 1 ); } /* Copies a byte stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_byte_stream_copy_from_utf8( uint8_t *byte_stream, size_t byte_stream_size, int codepage, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_byte_stream_copy_from_utf8"; size_t byte_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 string.", function ); return( -1 ); } /* Convert the Unicode character into a byte stream */ if( libuna_unicode_character_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to byte stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of a byte stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_byte_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, int codepage, size_t *byte_stream_size, libcerror_error_t **error ) { static char *function = "libuna_byte_stream_size_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } *byte_stream_size = 0; while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Determine how many byte stream character bytes are required */ if( libuna_unicode_character_size_to_byte_stream( unicode_character, codepage, byte_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to unable to determine size of Unicode character in byte stream.", function ); return( -1 ); } } return( 1 ); } /* Copies a byte stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_byte_stream_copy_from_utf16( uint8_t *byte_stream, size_t byte_stream_size, int codepage, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_byte_stream_copy_from_utf16"; size_t byte_stream_index = 0; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 string.", function ); return( -1 ); } /* Convert the Unicode character into a byte stream */ if( libuna_unicode_character_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to byte stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of a byte stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_byte_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, int codepage, size_t *byte_stream_size, libcerror_error_t **error ) { static char *function = "libuna_byte_stream_size_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } *byte_stream_size = 0; while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Determine how many byte stream character bytes are required */ if( libuna_unicode_character_size_to_byte_stream( unicode_character, codepage, byte_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to unable to determine size of Unicode character in byte stream.", function ); return( -1 ); } } return( 1 ); } /* Copies a byte stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_byte_stream_copy_from_utf32( uint8_t *byte_stream, size_t byte_stream_size, int codepage, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_byte_stream_copy_from_utf32"; size_t byte_stream_index = 0; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 string.", function ); return( -1 ); } /* Convert the Unicode character into a byte stream */ if( libuna_unicode_character_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to byte stream.", function ); return( -1 ); } } return( 1 ); } libevt-20170120/libuna/libuna_codepage_iso_8859_3.h0000664000175000017500000000314313040331677023657 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-3 codepage (Latin 3) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_3_H ) #define _LIBUNA_CODEPAGE_ISO_8859_3_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_3_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x00a0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0108[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0118[ 16 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0130[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0158[ 8 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_3_H ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_15.h0000664000175000017500000000240413040331677023741 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-15 codepage (Latin 9) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_15_H ) #define _LIBUNA_CODEPAGE_ISO_8859_15_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_15_byte_stream_to_unicode_base_0xa0[ 32 ]; extern const uint8_t libuna_codepage_iso_8859_15_unicode_to_byte_stream_base_0x00a0[ 32 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_15_H ) */ libevt-20170120/libuna/libuna_utf32_string.h0000664000175000017500000002116113040331677022650 0ustar00lordyestalordyesta00000000000000/* * UTF-32 string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF32_STRING_H ) #define _LIBUNA_UTF32_STRING_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_utf32_string_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, int codepage, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_byte_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_byte_stream is implemented by * libuna_byte_stream_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_byte_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_compare_with_byte_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_size_from_utf7_stream( const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_utf7_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_utf7_stream is implemented by * libuna_utf7_stream_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_utf7_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_compare_with_utf7_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_utf8( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_utf8 is implemented by * libuna_utf8_string_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_utf8( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_compare_with_utf8 is implemented by * libuna_utf8_string_compare_with_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_size_from_utf8_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_utf8_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_utf8_stream is implemented by * libuna_utf8_stream_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_utf8_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_compare_with_utf8_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_utf16( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_utf16 is implemented by * libuna_utf16_string_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_utf16( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_compare_with_utf16 is implemented by * libuna_utf16_string_compare_with_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_size_from_utf16_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_utf16_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_utf16_stream is implemented by * libuna_utf16_stream_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_utf16_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_compare_with_utf16_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_size_from_utf32_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_utf32_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_utf32_stream is implemented by * libuna_utf32_stream_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_utf32_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_compare_with_utf32_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_UTF32_STRING_H ) */ libevt-20170120/libuna/libuna_codepage_koi8_r.c0000664000175000017500000000577613040331677023352 0ustar00lordyestalordyesta00000000000000/* * KOI8-R codepage (Russian Cyrillic) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_koi8_r.h" /* Extended ASCII to Unicode character lookup table for KOI8-R codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_koi8_r_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248, 0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7, 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e, 0x255f, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x00a9, 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a }; /* Unicode to ASCII character lookup table for KOI8-R codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x0410[ 64 ] = { 0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, 0xfb, 0xfd, 0xff, 0xf9, 0xf8, 0xfc, 0xe0, 0xf1, 0xc1, 0xc2, 0xd7, 0xc7, 0xc4, 0xc5, 0xd6, 0xda, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, 0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1 }; const uint8_t libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x2550[ 32 ] = { 0xa0, 0xa1, 0xa2, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0x1a, 0x1a, 0x1a }; libevt-20170120/libuna/libuna_codepage_windows_936.h0000664000175000017500000000356313040331677024247 0ustar00lordyestalordyesta00000000000000/* * Windows 936 codepage (Chinese Simplified) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_936_H ) #define _LIBUNA_CODEPAGE_WINDOWS_936_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_codepage_windows_936_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_codepage_windows_936_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ); LIBUNA_EXTERN \ 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 ) */ libevt-20170120/libuna/libuna_base64_stream.h0000664000175000017500000000714013040331677022757 0ustar00lordyestalordyesta00000000000000/* * Base64 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_BASE64_STREAM_H ) #define _LIBUNA_BASE64_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_base64_character_copy_to_sixtet( uint8_t base64_character, uint8_t *base64_sixtet, uint32_t base64_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ 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 ) */ libevt-20170120/libuna/libuna_codepage_windows_950.c0000664000175000017500000127674413040331677024254 0ustar00lordyestalordyesta00000000000000/* * Windows 950 codepage (Traditional Chinese) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_950.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for Windows 950 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa140[ 63 ] = { 0x3000, 0xff0c, 0x3001, 0x3002, 0xff0e, 0x2027, 0xff1b, 0xff1a, 0xff1f, 0xff01, 0xfe30, 0x2026, 0x2025, 0xfe50, 0xfe51, 0xfe52, 0x00b7, 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xff5c, 0x2013, 0xfe31, 0x2014, 0xfe33, 0x2574, 0xfe34, 0xfe4f, 0xff08, 0xff09, 0xfe35, 0xfe36, 0xff5b, 0xff5d, 0xfe37, 0xfe38, 0x3014, 0x3015, 0xfe39, 0xfe3a, 0x3010, 0x3011, 0xfe3b, 0xfe3c, 0x300a, 0x300b, 0xfe3d, 0xfe3e, 0x3008, 0x3009, 0xfe3f, 0xfe40, 0x300c, 0x300d, 0xfe41, 0xfe42, 0x300e, 0x300f, 0xfe43, 0xfe44, 0xfe59, 0xfe5a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa1a1[ 94 ] = { 0xfe5b, 0xfe5c, 0xfe5d, 0xfe5e, 0x2018, 0x2019, 0x201c, 0x201d, 0x301d, 0x301e, 0x2035, 0x2032, 0xff03, 0xff06, 0xff0a, 0x203b, 0x00a7, 0x3003, 0x25cb, 0x25cf, 0x25b3, 0x25b2, 0x25ce, 0x2606, 0x2605, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25bd, 0x25bc, 0x32a3, 0x2105, 0x00af, 0xffe3, 0xff3f, 0x02cd, 0xfe49, 0xfe4a, 0xfe4d, 0xfe4e, 0xfe4b, 0xfe4c, 0xfe5f, 0xfe60, 0xfe61, 0xff0b, 0xff0d, 0x00d7, 0x00f7, 0x00b1, 0x221a, 0xff1c, 0xff1e, 0xff1d, 0x2266, 0x2267, 0x2260, 0x221e, 0x2252, 0x2261, 0xfe62, 0xfe63, 0xfe64, 0xfe65, 0xfe66, 0xff5e, 0x2229, 0x222a, 0x22a5, 0x2220, 0x221f, 0x22bf, 0x33d2, 0x33d1, 0x222b, 0x222e, 0x2235, 0x2234, 0x2640, 0x2642, 0x2295, 0x2299, 0x2191, 0x2193, 0x2190, 0x2192, 0x2196, 0x2197, 0x2199, 0x2198, 0x2225, 0x2223, 0xff0f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa240[ 63 ] = { 0xff3c, 0x2215, 0xfe68, 0xff04, 0xffe5, 0x3012, 0xffe0, 0xffe1, 0xff05, 0xff20, 0x2103, 0x2109, 0xfe69, 0xfe6a, 0xfe6b, 0x33d5, 0x339c, 0x339d, 0x339e, 0x33ce, 0x33a1, 0x338e, 0x338f, 0x33c4, 0x00b0, 0x5159, 0x515b, 0x515e, 0x515d, 0x5161, 0x5163, 0x55e7, 0x74e9, 0x7cce, 0x2581, 0x2582, 0x2583, 0x2584, 0x2585, 0x2586, 0x2587, 0x2588, 0x258f, 0x258e, 0x258d, 0x258c, 0x258b, 0x258a, 0x2589, 0x253c, 0x2534, 0x252c, 0x2524, 0x251c, 0x2594, 0x2500, 0x2502, 0x2595, 0x250c, 0x2510, 0x2514, 0x2518, 0x256d }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa2a1[ 94 ] = { 0x256e, 0x2570, 0x256f, 0x2550, 0x255e, 0x256a, 0x2561, 0x25e2, 0x25e3, 0x25e5, 0x25e4, 0x2571, 0x2572, 0x2573, 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, 0xff19, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026, 0x3027, 0x3028, 0x3029, 0x5341, 0x5344, 0x5345, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38, 0xff39, 0xff3a, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa340[ 63 ] = { 0xff57, 0xff58, 0xff59, 0xff5a, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x3105, 0x3106, 0x3107, 0x3108, 0x3109, 0x310a, 0x310b, 0x310c, 0x310d, 0x310e, 0x310f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa3a1[ 31 ] = { 0x3110, 0x3111, 0x3112, 0x3113, 0x3114, 0x3115, 0x3116, 0x3117, 0x3118, 0x3119, 0x311a, 0x311b, 0x311c, 0x311d, 0x311e, 0x311f, 0x3120, 0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127, 0x3128, 0x3129, 0x02d9, 0x02c9, 0x02ca, 0x02c7, 0x02cb }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa440[ 63 ] = { 0x4e00, 0x4e59, 0x4e01, 0x4e03, 0x4e43, 0x4e5d, 0x4e86, 0x4e8c, 0x4eba, 0x513f, 0x5165, 0x516b, 0x51e0, 0x5200, 0x5201, 0x529b, 0x5315, 0x5341, 0x535c, 0x53c8, 0x4e09, 0x4e0b, 0x4e08, 0x4e0a, 0x4e2b, 0x4e38, 0x51e1, 0x4e45, 0x4e48, 0x4e5f, 0x4e5e, 0x4e8e, 0x4ea1, 0x5140, 0x5203, 0x52fa, 0x5343, 0x53c9, 0x53e3, 0x571f, 0x58eb, 0x5915, 0x5927, 0x5973, 0x5b50, 0x5b51, 0x5b53, 0x5bf8, 0x5c0f, 0x5c22, 0x5c38, 0x5c71, 0x5ddd, 0x5de5, 0x5df1, 0x5df2, 0x5df3, 0x5dfe, 0x5e72, 0x5efe, 0x5f0b, 0x5f13, 0x624d }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa4a1[ 94 ] = { 0x4e11, 0x4e10, 0x4e0d, 0x4e2d, 0x4e30, 0x4e39, 0x4e4b, 0x5c39, 0x4e88, 0x4e91, 0x4e95, 0x4e92, 0x4e94, 0x4ea2, 0x4ec1, 0x4ec0, 0x4ec3, 0x4ec6, 0x4ec7, 0x4ecd, 0x4eca, 0x4ecb, 0x4ec4, 0x5143, 0x5141, 0x5167, 0x516d, 0x516e, 0x516c, 0x5197, 0x51f6, 0x5206, 0x5207, 0x5208, 0x52fb, 0x52fe, 0x52ff, 0x5316, 0x5339, 0x5348, 0x5347, 0x5345, 0x535e, 0x5384, 0x53cb, 0x53ca, 0x53cd, 0x58ec, 0x5929, 0x592b, 0x592a, 0x592d, 0x5b54, 0x5c11, 0x5c24, 0x5c3a, 0x5c6f, 0x5df4, 0x5e7b, 0x5eff, 0x5f14, 0x5f15, 0x5fc3, 0x6208, 0x6236, 0x624b, 0x624e, 0x652f, 0x6587, 0x6597, 0x65a4, 0x65b9, 0x65e5, 0x66f0, 0x6708, 0x6728, 0x6b20, 0x6b62, 0x6b79, 0x6bcb, 0x6bd4, 0x6bdb, 0x6c0f, 0x6c34, 0x706b, 0x722a, 0x7236, 0x723b, 0x7247, 0x7259, 0x725b, 0x72ac, 0x738b, 0x4e19 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa540[ 63 ] = { 0x4e16, 0x4e15, 0x4e14, 0x4e18, 0x4e3b, 0x4e4d, 0x4e4f, 0x4e4e, 0x4ee5, 0x4ed8, 0x4ed4, 0x4ed5, 0x4ed6, 0x4ed7, 0x4ee3, 0x4ee4, 0x4ed9, 0x4ede, 0x5145, 0x5144, 0x5189, 0x518a, 0x51ac, 0x51f9, 0x51fa, 0x51f8, 0x520a, 0x52a0, 0x529f, 0x5305, 0x5306, 0x5317, 0x531d, 0x4edf, 0x534a, 0x5349, 0x5361, 0x5360, 0x536f, 0x536e, 0x53bb, 0x53ef, 0x53e4, 0x53f3, 0x53ec, 0x53ee, 0x53e9, 0x53e8, 0x53fc, 0x53f8, 0x53f5, 0x53eb, 0x53e6, 0x53ea, 0x53f2, 0x53f1, 0x53f0, 0x53e5, 0x53ed, 0x53fb, 0x56db, 0x56da, 0x5916 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa5a1[ 94 ] = { 0x592e, 0x5931, 0x5974, 0x5976, 0x5b55, 0x5b83, 0x5c3c, 0x5de8, 0x5de7, 0x5de6, 0x5e02, 0x5e03, 0x5e73, 0x5e7c, 0x5f01, 0x5f18, 0x5f17, 0x5fc5, 0x620a, 0x6253, 0x6254, 0x6252, 0x6251, 0x65a5, 0x65e6, 0x672e, 0x672c, 0x672a, 0x672b, 0x672d, 0x6b63, 0x6bcd, 0x6c11, 0x6c10, 0x6c38, 0x6c41, 0x6c40, 0x6c3e, 0x72af, 0x7384, 0x7389, 0x74dc, 0x74e6, 0x7518, 0x751f, 0x7528, 0x7529, 0x7530, 0x7531, 0x7532, 0x7533, 0x758b, 0x767d, 0x76ae, 0x76bf, 0x76ee, 0x77db, 0x77e2, 0x77f3, 0x793a, 0x79be, 0x7a74, 0x7acb, 0x4e1e, 0x4e1f, 0x4e52, 0x4e53, 0x4e69, 0x4e99, 0x4ea4, 0x4ea6, 0x4ea5, 0x4eff, 0x4f09, 0x4f19, 0x4f0a, 0x4f15, 0x4f0d, 0x4f10, 0x4f11, 0x4f0f, 0x4ef2, 0x4ef6, 0x4efb, 0x4ef0, 0x4ef3, 0x4efd, 0x4f01, 0x4f0b, 0x5149, 0x5147, 0x5146, 0x5148, 0x5168 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa640[ 63 ] = { 0x5171, 0x518d, 0x51b0, 0x5217, 0x5211, 0x5212, 0x520e, 0x5216, 0x52a3, 0x5308, 0x5321, 0x5320, 0x5370, 0x5371, 0x5409, 0x540f, 0x540c, 0x540a, 0x5410, 0x5401, 0x540b, 0x5404, 0x5411, 0x540d, 0x5408, 0x5403, 0x540e, 0x5406, 0x5412, 0x56e0, 0x56de, 0x56dd, 0x5733, 0x5730, 0x5728, 0x572d, 0x572c, 0x572f, 0x5729, 0x5919, 0x591a, 0x5937, 0x5938, 0x5984, 0x5978, 0x5983, 0x597d, 0x5979, 0x5982, 0x5981, 0x5b57, 0x5b58, 0x5b87, 0x5b88, 0x5b85, 0x5b89, 0x5bfa, 0x5c16, 0x5c79, 0x5dde, 0x5e06, 0x5e76, 0x5e74 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa6a1[ 94 ] = { 0x5f0f, 0x5f1b, 0x5fd9, 0x5fd6, 0x620e, 0x620c, 0x620d, 0x6210, 0x6263, 0x625b, 0x6258, 0x6536, 0x65e9, 0x65e8, 0x65ec, 0x65ed, 0x66f2, 0x66f3, 0x6709, 0x673d, 0x6734, 0x6731, 0x6735, 0x6b21, 0x6b64, 0x6b7b, 0x6c16, 0x6c5d, 0x6c57, 0x6c59, 0x6c5f, 0x6c60, 0x6c50, 0x6c55, 0x6c61, 0x6c5b, 0x6c4d, 0x6c4e, 0x7070, 0x725f, 0x725d, 0x767e, 0x7af9, 0x7c73, 0x7cf8, 0x7f36, 0x7f8a, 0x7fbd, 0x8001, 0x8003, 0x800c, 0x8012, 0x8033, 0x807f, 0x8089, 0x808b, 0x808c, 0x81e3, 0x81ea, 0x81f3, 0x81fc, 0x820c, 0x821b, 0x821f, 0x826e, 0x8272, 0x827e, 0x866b, 0x8840, 0x884c, 0x8863, 0x897f, 0x9621, 0x4e32, 0x4ea8, 0x4f4d, 0x4f4f, 0x4f47, 0x4f57, 0x4f5e, 0x4f34, 0x4f5b, 0x4f55, 0x4f30, 0x4f50, 0x4f51, 0x4f3d, 0x4f3a, 0x4f38, 0x4f43, 0x4f54, 0x4f3c, 0x4f46, 0x4f63 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa740[ 63 ] = { 0x4f5c, 0x4f60, 0x4f2f, 0x4f4e, 0x4f36, 0x4f59, 0x4f5d, 0x4f48, 0x4f5a, 0x514c, 0x514b, 0x514d, 0x5175, 0x51b6, 0x51b7, 0x5225, 0x5224, 0x5229, 0x522a, 0x5228, 0x52ab, 0x52a9, 0x52aa, 0x52ac, 0x5323, 0x5373, 0x5375, 0x541d, 0x542d, 0x541e, 0x543e, 0x5426, 0x544e, 0x5427, 0x5446, 0x5443, 0x5433, 0x5448, 0x5442, 0x541b, 0x5429, 0x544a, 0x5439, 0x543b, 0x5438, 0x542e, 0x5435, 0x5436, 0x5420, 0x543c, 0x5440, 0x5431, 0x542b, 0x541f, 0x542c, 0x56ea, 0x56f0, 0x56e4, 0x56eb, 0x574a, 0x5751, 0x5740, 0x574d }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa7a1[ 94 ] = { 0x5747, 0x574e, 0x573e, 0x5750, 0x574f, 0x573b, 0x58ef, 0x593e, 0x599d, 0x5992, 0x59a8, 0x599e, 0x59a3, 0x5999, 0x5996, 0x598d, 0x59a4, 0x5993, 0x598a, 0x59a5, 0x5b5d, 0x5b5c, 0x5b5a, 0x5b5b, 0x5b8c, 0x5b8b, 0x5b8f, 0x5c2c, 0x5c40, 0x5c41, 0x5c3f, 0x5c3e, 0x5c90, 0x5c91, 0x5c94, 0x5c8c, 0x5deb, 0x5e0c, 0x5e8f, 0x5e87, 0x5e8a, 0x5ef7, 0x5f04, 0x5f1f, 0x5f64, 0x5f62, 0x5f77, 0x5f79, 0x5fd8, 0x5fcc, 0x5fd7, 0x5fcd, 0x5ff1, 0x5feb, 0x5ff8, 0x5fea, 0x6212, 0x6211, 0x6284, 0x6297, 0x6296, 0x6280, 0x6276, 0x6289, 0x626d, 0x628a, 0x627c, 0x627e, 0x6279, 0x6273, 0x6292, 0x626f, 0x6298, 0x626e, 0x6295, 0x6293, 0x6291, 0x6286, 0x6539, 0x653b, 0x6538, 0x65f1, 0x66f4, 0x675f, 0x674e, 0x674f, 0x6750, 0x6751, 0x675c, 0x6756, 0x675e, 0x6749, 0x6746, 0x6760 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa840[ 63 ] = { 0x6753, 0x6757, 0x6b65, 0x6bcf, 0x6c42, 0x6c5e, 0x6c99, 0x6c81, 0x6c88, 0x6c89, 0x6c85, 0x6c9b, 0x6c6a, 0x6c7a, 0x6c90, 0x6c70, 0x6c8c, 0x6c68, 0x6c96, 0x6c92, 0x6c7d, 0x6c83, 0x6c72, 0x6c7e, 0x6c74, 0x6c86, 0x6c76, 0x6c8d, 0x6c94, 0x6c98, 0x6c82, 0x7076, 0x707c, 0x707d, 0x7078, 0x7262, 0x7261, 0x7260, 0x72c4, 0x72c2, 0x7396, 0x752c, 0x752b, 0x7537, 0x7538, 0x7682, 0x76ef, 0x77e3, 0x79c1, 0x79c0, 0x79bf, 0x7a76, 0x7cfb, 0x7f55, 0x8096, 0x8093, 0x809d, 0x8098, 0x809b, 0x809a, 0x80b2, 0x826f, 0x8292 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa8a1[ 94 ] = { 0x828b, 0x828d, 0x898b, 0x89d2, 0x8a00, 0x8c37, 0x8c46, 0x8c55, 0x8c9d, 0x8d64, 0x8d70, 0x8db3, 0x8eab, 0x8eca, 0x8f9b, 0x8fb0, 0x8fc2, 0x8fc6, 0x8fc5, 0x8fc4, 0x5de1, 0x9091, 0x90a2, 0x90aa, 0x90a6, 0x90a3, 0x9149, 0x91c6, 0x91cc, 0x9632, 0x962e, 0x9631, 0x962a, 0x962c, 0x4e26, 0x4e56, 0x4e73, 0x4e8b, 0x4e9b, 0x4e9e, 0x4eab, 0x4eac, 0x4f6f, 0x4f9d, 0x4f8d, 0x4f73, 0x4f7f, 0x4f6c, 0x4f9b, 0x4f8b, 0x4f86, 0x4f83, 0x4f70, 0x4f75, 0x4f88, 0x4f69, 0x4f7b, 0x4f96, 0x4f7e, 0x4f8f, 0x4f91, 0x4f7a, 0x5154, 0x5152, 0x5155, 0x5169, 0x5177, 0x5176, 0x5178, 0x51bd, 0x51fd, 0x523b, 0x5238, 0x5237, 0x523a, 0x5230, 0x522e, 0x5236, 0x5241, 0x52be, 0x52bb, 0x5352, 0x5354, 0x5353, 0x5351, 0x5366, 0x5377, 0x5378, 0x5379, 0x53d6, 0x53d4, 0x53d7, 0x5473, 0x5475 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa940[ 63 ] = { 0x5496, 0x5478, 0x5495, 0x5480, 0x547b, 0x5477, 0x5484, 0x5492, 0x5486, 0x547c, 0x5490, 0x5471, 0x5476, 0x548c, 0x549a, 0x5462, 0x5468, 0x548b, 0x547d, 0x548e, 0x56fa, 0x5783, 0x5777, 0x576a, 0x5769, 0x5761, 0x5766, 0x5764, 0x577c, 0x591c, 0x5949, 0x5947, 0x5948, 0x5944, 0x5954, 0x59be, 0x59bb, 0x59d4, 0x59b9, 0x59ae, 0x59d1, 0x59c6, 0x59d0, 0x59cd, 0x59cb, 0x59d3, 0x59ca, 0x59af, 0x59b3, 0x59d2, 0x59c5, 0x5b5f, 0x5b64, 0x5b63, 0x5b97, 0x5b9a, 0x5b98, 0x5b9c, 0x5b99, 0x5b9b, 0x5c1a, 0x5c48, 0x5c45 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa9a1[ 94 ] = { 0x5c46, 0x5cb7, 0x5ca1, 0x5cb8, 0x5ca9, 0x5cab, 0x5cb1, 0x5cb3, 0x5e18, 0x5e1a, 0x5e16, 0x5e15, 0x5e1b, 0x5e11, 0x5e78, 0x5e9a, 0x5e97, 0x5e9c, 0x5e95, 0x5e96, 0x5ef6, 0x5f26, 0x5f27, 0x5f29, 0x5f80, 0x5f81, 0x5f7f, 0x5f7c, 0x5fdd, 0x5fe0, 0x5ffd, 0x5ff5, 0x5fff, 0x600f, 0x6014, 0x602f, 0x6035, 0x6016, 0x602a, 0x6015, 0x6021, 0x6027, 0x6029, 0x602b, 0x601b, 0x6216, 0x6215, 0x623f, 0x623e, 0x6240, 0x627f, 0x62c9, 0x62cc, 0x62c4, 0x62bf, 0x62c2, 0x62b9, 0x62d2, 0x62db, 0x62ab, 0x62d3, 0x62d4, 0x62cb, 0x62c8, 0x62a8, 0x62bd, 0x62bc, 0x62d0, 0x62d9, 0x62c7, 0x62cd, 0x62b5, 0x62da, 0x62b1, 0x62d8, 0x62d6, 0x62d7, 0x62c6, 0x62ac, 0x62ce, 0x653e, 0x65a7, 0x65bc, 0x65fa, 0x6614, 0x6613, 0x660c, 0x6606, 0x6602, 0x660e, 0x6600, 0x660f, 0x6615, 0x660a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaa40[ 63 ] = { 0x6607, 0x670d, 0x670b, 0x676d, 0x678b, 0x6795, 0x6771, 0x679c, 0x6773, 0x6777, 0x6787, 0x679d, 0x6797, 0x676f, 0x6770, 0x677f, 0x6789, 0x677e, 0x6790, 0x6775, 0x679a, 0x6793, 0x677c, 0x676a, 0x6772, 0x6b23, 0x6b66, 0x6b67, 0x6b7f, 0x6c13, 0x6c1b, 0x6ce3, 0x6ce8, 0x6cf3, 0x6cb1, 0x6ccc, 0x6ce5, 0x6cb3, 0x6cbd, 0x6cbe, 0x6cbc, 0x6ce2, 0x6cab, 0x6cd5, 0x6cd3, 0x6cb8, 0x6cc4, 0x6cb9, 0x6cc1, 0x6cae, 0x6cd7, 0x6cc5, 0x6cf1, 0x6cbf, 0x6cbb, 0x6ce1, 0x6cdb, 0x6cca, 0x6cac, 0x6cef, 0x6cdc, 0x6cd6, 0x6ce0 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaaa1[ 94 ] = { 0x7095, 0x708e, 0x7092, 0x708a, 0x7099, 0x722c, 0x722d, 0x7238, 0x7248, 0x7267, 0x7269, 0x72c0, 0x72ce, 0x72d9, 0x72d7, 0x72d0, 0x73a9, 0x73a8, 0x739f, 0x73ab, 0x73a5, 0x753d, 0x759d, 0x7599, 0x759a, 0x7684, 0x76c2, 0x76f2, 0x76f4, 0x77e5, 0x77fd, 0x793e, 0x7940, 0x7941, 0x79c9, 0x79c8, 0x7a7a, 0x7a79, 0x7afa, 0x7cfe, 0x7f54, 0x7f8c, 0x7f8b, 0x8005, 0x80ba, 0x80a5, 0x80a2, 0x80b1, 0x80a1, 0x80ab, 0x80a9, 0x80b4, 0x80aa, 0x80af, 0x81e5, 0x81fe, 0x820d, 0x82b3, 0x829d, 0x8299, 0x82ad, 0x82bd, 0x829f, 0x82b9, 0x82b1, 0x82ac, 0x82a5, 0x82af, 0x82b8, 0x82a3, 0x82b0, 0x82be, 0x82b7, 0x864e, 0x8671, 0x521d, 0x8868, 0x8ecb, 0x8fce, 0x8fd4, 0x8fd1, 0x90b5, 0x90b8, 0x90b1, 0x90b6, 0x91c7, 0x91d1, 0x9577, 0x9580, 0x961c, 0x9640, 0x963f, 0x963b, 0x9644 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xab40[ 63 ] = { 0x9642, 0x96b9, 0x96e8, 0x9752, 0x975e, 0x4e9f, 0x4ead, 0x4eae, 0x4fe1, 0x4fb5, 0x4faf, 0x4fbf, 0x4fe0, 0x4fd1, 0x4fcf, 0x4fdd, 0x4fc3, 0x4fb6, 0x4fd8, 0x4fdf, 0x4fca, 0x4fd7, 0x4fae, 0x4fd0, 0x4fc4, 0x4fc2, 0x4fda, 0x4fce, 0x4fde, 0x4fb7, 0x5157, 0x5192, 0x5191, 0x51a0, 0x524e, 0x5243, 0x524a, 0x524d, 0x524c, 0x524b, 0x5247, 0x52c7, 0x52c9, 0x52c3, 0x52c1, 0x530d, 0x5357, 0x537b, 0x539a, 0x53db, 0x54ac, 0x54c0, 0x54a8, 0x54ce, 0x54c9, 0x54b8, 0x54a6, 0x54b3, 0x54c7, 0x54c2, 0x54bd, 0x54aa, 0x54c1 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaba1[ 94 ] = { 0x54c4, 0x54c8, 0x54af, 0x54ab, 0x54b1, 0x54bb, 0x54a9, 0x54a7, 0x54bf, 0x56ff, 0x5782, 0x578b, 0x57a0, 0x57a3, 0x57a2, 0x57ce, 0x57ae, 0x5793, 0x5955, 0x5951, 0x594f, 0x594e, 0x5950, 0x59dc, 0x59d8, 0x59ff, 0x59e3, 0x59e8, 0x5a03, 0x59e5, 0x59ea, 0x59da, 0x59e6, 0x5a01, 0x59fb, 0x5b69, 0x5ba3, 0x5ba6, 0x5ba4, 0x5ba2, 0x5ba5, 0x5c01, 0x5c4e, 0x5c4f, 0x5c4d, 0x5c4b, 0x5cd9, 0x5cd2, 0x5df7, 0x5e1d, 0x5e25, 0x5e1f, 0x5e7d, 0x5ea0, 0x5ea6, 0x5efa, 0x5f08, 0x5f2d, 0x5f65, 0x5f88, 0x5f85, 0x5f8a, 0x5f8b, 0x5f87, 0x5f8c, 0x5f89, 0x6012, 0x601d, 0x6020, 0x6025, 0x600e, 0x6028, 0x604d, 0x6070, 0x6068, 0x6062, 0x6046, 0x6043, 0x606c, 0x606b, 0x606a, 0x6064, 0x6241, 0x62dc, 0x6316, 0x6309, 0x62fc, 0x62ed, 0x6301, 0x62ee, 0x62fd, 0x6307, 0x62f1, 0x62f7 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xac40[ 63 ] = { 0x62ef, 0x62ec, 0x62fe, 0x62f4, 0x6311, 0x6302, 0x653f, 0x6545, 0x65ab, 0x65bd, 0x65e2, 0x6625, 0x662d, 0x6620, 0x6627, 0x662f, 0x661f, 0x6628, 0x6631, 0x6624, 0x66f7, 0x67ff, 0x67d3, 0x67f1, 0x67d4, 0x67d0, 0x67ec, 0x67b6, 0x67af, 0x67f5, 0x67e9, 0x67ef, 0x67c4, 0x67d1, 0x67b4, 0x67da, 0x67e5, 0x67b8, 0x67cf, 0x67de, 0x67f3, 0x67b0, 0x67d9, 0x67e2, 0x67dd, 0x67d2, 0x6b6a, 0x6b83, 0x6b86, 0x6bb5, 0x6bd2, 0x6bd7, 0x6c1f, 0x6cc9, 0x6d0b, 0x6d32, 0x6d2a, 0x6d41, 0x6d25, 0x6d0c, 0x6d31, 0x6d1e, 0x6d17 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaca1[ 94 ] = { 0x6d3b, 0x6d3d, 0x6d3e, 0x6d36, 0x6d1b, 0x6cf5, 0x6d39, 0x6d27, 0x6d38, 0x6d29, 0x6d2e, 0x6d35, 0x6d0e, 0x6d2b, 0x70ab, 0x70ba, 0x70b3, 0x70ac, 0x70af, 0x70ad, 0x70b8, 0x70ae, 0x70a4, 0x7230, 0x7272, 0x726f, 0x7274, 0x72e9, 0x72e0, 0x72e1, 0x73b7, 0x73ca, 0x73bb, 0x73b2, 0x73cd, 0x73c0, 0x73b3, 0x751a, 0x752d, 0x754f, 0x754c, 0x754e, 0x754b, 0x75ab, 0x75a4, 0x75a5, 0x75a2, 0x75a3, 0x7678, 0x7686, 0x7687, 0x7688, 0x76c8, 0x76c6, 0x76c3, 0x76c5, 0x7701, 0x76f9, 0x76f8, 0x7709, 0x770b, 0x76fe, 0x76fc, 0x7707, 0x77dc, 0x7802, 0x7814, 0x780c, 0x780d, 0x7946, 0x7949, 0x7948, 0x7947, 0x79b9, 0x79ba, 0x79d1, 0x79d2, 0x79cb, 0x7a7f, 0x7a81, 0x7aff, 0x7afd, 0x7c7d, 0x7d02, 0x7d05, 0x7d00, 0x7d09, 0x7d07, 0x7d04, 0x7d06, 0x7f38, 0x7f8e, 0x7fbf, 0x8004 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xad40[ 63 ] = { 0x8010, 0x800d, 0x8011, 0x8036, 0x80d6, 0x80e5, 0x80da, 0x80c3, 0x80c4, 0x80cc, 0x80e1, 0x80db, 0x80ce, 0x80de, 0x80e4, 0x80dd, 0x81f4, 0x8222, 0x82e7, 0x8303, 0x8305, 0x82e3, 0x82db, 0x82e6, 0x8304, 0x82e5, 0x8302, 0x8309, 0x82d2, 0x82d7, 0x82f1, 0x8301, 0x82dc, 0x82d4, 0x82d1, 0x82de, 0x82d3, 0x82df, 0x82ef, 0x8306, 0x8650, 0x8679, 0x867b, 0x867a, 0x884d, 0x886b, 0x8981, 0x89d4, 0x8a08, 0x8a02, 0x8a03, 0x8c9e, 0x8ca0, 0x8d74, 0x8d73, 0x8db4, 0x8ecd, 0x8ecc, 0x8ff0, 0x8fe6, 0x8fe2, 0x8fea, 0x8fe5 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xada1[ 94 ] = { 0x8fed, 0x8feb, 0x8fe4, 0x8fe8, 0x90ca, 0x90ce, 0x90c1, 0x90c3, 0x914b, 0x914a, 0x91cd, 0x9582, 0x9650, 0x964b, 0x964c, 0x964d, 0x9762, 0x9769, 0x97cb, 0x97ed, 0x97f3, 0x9801, 0x98a8, 0x98db, 0x98df, 0x9996, 0x9999, 0x4e58, 0x4eb3, 0x500c, 0x500d, 0x5023, 0x4fef, 0x5026, 0x5025, 0x4ff8, 0x5029, 0x5016, 0x5006, 0x503c, 0x501f, 0x501a, 0x5012, 0x5011, 0x4ffa, 0x5000, 0x5014, 0x5028, 0x4ff1, 0x5021, 0x500b, 0x5019, 0x5018, 0x4ff3, 0x4fee, 0x502d, 0x502a, 0x4ffe, 0x502b, 0x5009, 0x517c, 0x51a4, 0x51a5, 0x51a2, 0x51cd, 0x51cc, 0x51c6, 0x51cb, 0x5256, 0x525c, 0x5254, 0x525b, 0x525d, 0x532a, 0x537f, 0x539f, 0x539d, 0x53df, 0x54e8, 0x5510, 0x5501, 0x5537, 0x54fc, 0x54e5, 0x54f2, 0x5506, 0x54fa, 0x5514, 0x54e9, 0x54ed, 0x54e1, 0x5509, 0x54ee, 0x54ea }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xae40[ 63 ] = { 0x54e6, 0x5527, 0x5507, 0x54fd, 0x550f, 0x5703, 0x5704, 0x57c2, 0x57d4, 0x57cb, 0x57c3, 0x5809, 0x590f, 0x5957, 0x5958, 0x595a, 0x5a11, 0x5a18, 0x5a1c, 0x5a1f, 0x5a1b, 0x5a13, 0x59ec, 0x5a20, 0x5a23, 0x5a29, 0x5a25, 0x5a0c, 0x5a09, 0x5b6b, 0x5c58, 0x5bb0, 0x5bb3, 0x5bb6, 0x5bb4, 0x5bae, 0x5bb5, 0x5bb9, 0x5bb8, 0x5c04, 0x5c51, 0x5c55, 0x5c50, 0x5ced, 0x5cfd, 0x5cfb, 0x5cea, 0x5ce8, 0x5cf0, 0x5cf6, 0x5d01, 0x5cf4, 0x5dee, 0x5e2d, 0x5e2b, 0x5eab, 0x5ead, 0x5ea7, 0x5f31, 0x5f92, 0x5f91, 0x5f90, 0x6059 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaea1[ 94 ] = { 0x6063, 0x6065, 0x6050, 0x6055, 0x606d, 0x6069, 0x606f, 0x6084, 0x609f, 0x609a, 0x608d, 0x6094, 0x608c, 0x6085, 0x6096, 0x6247, 0x62f3, 0x6308, 0x62ff, 0x634e, 0x633e, 0x632f, 0x6355, 0x6342, 0x6346, 0x634f, 0x6349, 0x633a, 0x6350, 0x633d, 0x632a, 0x632b, 0x6328, 0x634d, 0x634c, 0x6548, 0x6549, 0x6599, 0x65c1, 0x65c5, 0x6642, 0x6649, 0x664f, 0x6643, 0x6652, 0x664c, 0x6645, 0x6641, 0x66f8, 0x6714, 0x6715, 0x6717, 0x6821, 0x6838, 0x6848, 0x6846, 0x6853, 0x6839, 0x6842, 0x6854, 0x6829, 0x68b3, 0x6817, 0x684c, 0x6851, 0x683d, 0x67f4, 0x6850, 0x6840, 0x683c, 0x6843, 0x682a, 0x6845, 0x6813, 0x6818, 0x6841, 0x6b8a, 0x6b89, 0x6bb7, 0x6c23, 0x6c27, 0x6c28, 0x6c26, 0x6c24, 0x6cf0, 0x6d6a, 0x6d95, 0x6d88, 0x6d87, 0x6d66, 0x6d78, 0x6d77, 0x6d59, 0x6d93 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaf40[ 63 ] = { 0x6d6c, 0x6d89, 0x6d6e, 0x6d5a, 0x6d74, 0x6d69, 0x6d8c, 0x6d8a, 0x6d79, 0x6d85, 0x6d65, 0x6d94, 0x70ca, 0x70d8, 0x70e4, 0x70d9, 0x70c8, 0x70cf, 0x7239, 0x7279, 0x72fc, 0x72f9, 0x72fd, 0x72f8, 0x72f7, 0x7386, 0x73ed, 0x7409, 0x73ee, 0x73e0, 0x73ea, 0x73de, 0x7554, 0x755d, 0x755c, 0x755a, 0x7559, 0x75be, 0x75c5, 0x75c7, 0x75b2, 0x75b3, 0x75bd, 0x75bc, 0x75b9, 0x75c2, 0x75b8, 0x768b, 0x76b0, 0x76ca, 0x76cd, 0x76ce, 0x7729, 0x771f, 0x7720, 0x7728, 0x77e9, 0x7830, 0x7827, 0x7838, 0x781d, 0x7834, 0x7837 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xafa1[ 94 ] = { 0x7825, 0x782d, 0x7820, 0x781f, 0x7832, 0x7955, 0x7950, 0x7960, 0x795f, 0x7956, 0x795e, 0x795d, 0x7957, 0x795a, 0x79e4, 0x79e3, 0x79e7, 0x79df, 0x79e6, 0x79e9, 0x79d8, 0x7a84, 0x7a88, 0x7ad9, 0x7b06, 0x7b11, 0x7c89, 0x7d21, 0x7d17, 0x7d0b, 0x7d0a, 0x7d20, 0x7d22, 0x7d14, 0x7d10, 0x7d15, 0x7d1a, 0x7d1c, 0x7d0d, 0x7d19, 0x7d1b, 0x7f3a, 0x7f5f, 0x7f94, 0x7fc5, 0x7fc1, 0x8006, 0x8018, 0x8015, 0x8019, 0x8017, 0x803d, 0x803f, 0x80f1, 0x8102, 0x80f0, 0x8105, 0x80ed, 0x80f4, 0x8106, 0x80f8, 0x80f3, 0x8108, 0x80fd, 0x810a, 0x80fc, 0x80ef, 0x81ed, 0x81ec, 0x8200, 0x8210, 0x822a, 0x822b, 0x8228, 0x822c, 0x82bb, 0x832b, 0x8352, 0x8354, 0x834a, 0x8338, 0x8350, 0x8349, 0x8335, 0x8334, 0x834f, 0x8332, 0x8339, 0x8336, 0x8317, 0x8340, 0x8331, 0x8328, 0x8343 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb040[ 63 ] = { 0x8654, 0x868a, 0x86aa, 0x8693, 0x86a4, 0x86a9, 0x868c, 0x86a3, 0x869c, 0x8870, 0x8877, 0x8881, 0x8882, 0x887d, 0x8879, 0x8a18, 0x8a10, 0x8a0e, 0x8a0c, 0x8a15, 0x8a0a, 0x8a17, 0x8a13, 0x8a16, 0x8a0f, 0x8a11, 0x8c48, 0x8c7a, 0x8c79, 0x8ca1, 0x8ca2, 0x8d77, 0x8eac, 0x8ed2, 0x8ed4, 0x8ecf, 0x8fb1, 0x9001, 0x9006, 0x8ff7, 0x9000, 0x8ffa, 0x8ff4, 0x9003, 0x8ffd, 0x9005, 0x8ff8, 0x9095, 0x90e1, 0x90dd, 0x90e2, 0x9152, 0x914d, 0x914c, 0x91d8, 0x91dd, 0x91d7, 0x91dc, 0x91d9, 0x9583, 0x9662, 0x9663, 0x9661 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb0a1[ 94 ] = { 0x965b, 0x965d, 0x9664, 0x9658, 0x965e, 0x96bb, 0x98e2, 0x99ac, 0x9aa8, 0x9ad8, 0x9b25, 0x9b32, 0x9b3c, 0x4e7e, 0x507a, 0x507d, 0x505c, 0x5047, 0x5043, 0x504c, 0x505a, 0x5049, 0x5065, 0x5076, 0x504e, 0x5055, 0x5075, 0x5074, 0x5077, 0x504f, 0x500f, 0x506f, 0x506d, 0x515c, 0x5195, 0x51f0, 0x526a, 0x526f, 0x52d2, 0x52d9, 0x52d8, 0x52d5, 0x5310, 0x530f, 0x5319, 0x533f, 0x5340, 0x533e, 0x53c3, 0x66fc, 0x5546, 0x556a, 0x5566, 0x5544, 0x555e, 0x5561, 0x5543, 0x554a, 0x5531, 0x5556, 0x554f, 0x5555, 0x552f, 0x5564, 0x5538, 0x552e, 0x555c, 0x552c, 0x5563, 0x5533, 0x5541, 0x5557, 0x5708, 0x570b, 0x5709, 0x57df, 0x5805, 0x580a, 0x5806, 0x57e0, 0x57e4, 0x57fa, 0x5802, 0x5835, 0x57f7, 0x57f9, 0x5920, 0x5962, 0x5a36, 0x5a41, 0x5a49, 0x5a66, 0x5a6a, 0x5a40 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb140[ 63 ] = { 0x5a3c, 0x5a62, 0x5a5a, 0x5a46, 0x5a4a, 0x5b70, 0x5bc7, 0x5bc5, 0x5bc4, 0x5bc2, 0x5bbf, 0x5bc6, 0x5c09, 0x5c08, 0x5c07, 0x5c60, 0x5c5c, 0x5c5d, 0x5d07, 0x5d06, 0x5d0e, 0x5d1b, 0x5d16, 0x5d22, 0x5d11, 0x5d29, 0x5d14, 0x5d19, 0x5d24, 0x5d27, 0x5d17, 0x5de2, 0x5e38, 0x5e36, 0x5e33, 0x5e37, 0x5eb7, 0x5eb8, 0x5eb6, 0x5eb5, 0x5ebe, 0x5f35, 0x5f37, 0x5f57, 0x5f6c, 0x5f69, 0x5f6b, 0x5f97, 0x5f99, 0x5f9e, 0x5f98, 0x5fa1, 0x5fa0, 0x5f9c, 0x607f, 0x60a3, 0x6089, 0x60a0, 0x60a8, 0x60cb, 0x60b4, 0x60e6, 0x60bd }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb1a1[ 94 ] = { 0x60c5, 0x60bb, 0x60b5, 0x60dc, 0x60bc, 0x60d8, 0x60d5, 0x60c6, 0x60df, 0x60b8, 0x60da, 0x60c7, 0x621a, 0x621b, 0x6248, 0x63a0, 0x63a7, 0x6372, 0x6396, 0x63a2, 0x63a5, 0x6377, 0x6367, 0x6398, 0x63aa, 0x6371, 0x63a9, 0x6389, 0x6383, 0x639b, 0x636b, 0x63a8, 0x6384, 0x6388, 0x6399, 0x63a1, 0x63ac, 0x6392, 0x638f, 0x6380, 0x637b, 0x6369, 0x6368, 0x637a, 0x655d, 0x6556, 0x6551, 0x6559, 0x6557, 0x555f, 0x654f, 0x6558, 0x6555, 0x6554, 0x659c, 0x659b, 0x65ac, 0x65cf, 0x65cb, 0x65cc, 0x65ce, 0x665d, 0x665a, 0x6664, 0x6668, 0x6666, 0x665e, 0x66f9, 0x52d7, 0x671b, 0x6881, 0x68af, 0x68a2, 0x6893, 0x68b5, 0x687f, 0x6876, 0x68b1, 0x68a7, 0x6897, 0x68b0, 0x6883, 0x68c4, 0x68ad, 0x6886, 0x6885, 0x6894, 0x689d, 0x68a8, 0x689f, 0x68a1, 0x6882, 0x6b32, 0x6bba }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb240[ 63 ] = { 0x6beb, 0x6bec, 0x6c2b, 0x6d8e, 0x6dbc, 0x6df3, 0x6dd9, 0x6db2, 0x6de1, 0x6dcc, 0x6de4, 0x6dfb, 0x6dfa, 0x6e05, 0x6dc7, 0x6dcb, 0x6daf, 0x6dd1, 0x6dae, 0x6dde, 0x6df9, 0x6db8, 0x6df7, 0x6df5, 0x6dc5, 0x6dd2, 0x6e1a, 0x6db5, 0x6dda, 0x6deb, 0x6dd8, 0x6dea, 0x6df1, 0x6dee, 0x6de8, 0x6dc6, 0x6dc4, 0x6daa, 0x6dec, 0x6dbf, 0x6de6, 0x70f9, 0x7109, 0x710a, 0x70fd, 0x70ef, 0x723d, 0x727d, 0x7281, 0x731c, 0x731b, 0x7316, 0x7313, 0x7319, 0x7387, 0x7405, 0x740a, 0x7403, 0x7406, 0x73fe, 0x740d, 0x74e0, 0x74f6 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb2a1[ 94 ] = { 0x74f7, 0x751c, 0x7522, 0x7565, 0x7566, 0x7562, 0x7570, 0x758f, 0x75d4, 0x75d5, 0x75b5, 0x75ca, 0x75cd, 0x768e, 0x76d4, 0x76d2, 0x76db, 0x7737, 0x773e, 0x773c, 0x7736, 0x7738, 0x773a, 0x786b, 0x7843, 0x784e, 0x7965, 0x7968, 0x796d, 0x79fb, 0x7a92, 0x7a95, 0x7b20, 0x7b28, 0x7b1b, 0x7b2c, 0x7b26, 0x7b19, 0x7b1e, 0x7b2e, 0x7c92, 0x7c97, 0x7c95, 0x7d46, 0x7d43, 0x7d71, 0x7d2e, 0x7d39, 0x7d3c, 0x7d40, 0x7d30, 0x7d33, 0x7d44, 0x7d2f, 0x7d42, 0x7d32, 0x7d31, 0x7f3d, 0x7f9e, 0x7f9a, 0x7fcc, 0x7fce, 0x7fd2, 0x801c, 0x804a, 0x8046, 0x812f, 0x8116, 0x8123, 0x812b, 0x8129, 0x8130, 0x8124, 0x8202, 0x8235, 0x8237, 0x8236, 0x8239, 0x838e, 0x839e, 0x8398, 0x8378, 0x83a2, 0x8396, 0x83bd, 0x83ab, 0x8392, 0x838a, 0x8393, 0x8389, 0x83a0, 0x8377, 0x837b, 0x837c }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb340[ 63 ] = { 0x8386, 0x83a7, 0x8655, 0x5f6a, 0x86c7, 0x86c0, 0x86b6, 0x86c4, 0x86b5, 0x86c6, 0x86cb, 0x86b1, 0x86af, 0x86c9, 0x8853, 0x889e, 0x8888, 0x88ab, 0x8892, 0x8896, 0x888d, 0x888b, 0x8993, 0x898f, 0x8a2a, 0x8a1d, 0x8a23, 0x8a25, 0x8a31, 0x8a2d, 0x8a1f, 0x8a1b, 0x8a22, 0x8c49, 0x8c5a, 0x8ca9, 0x8cac, 0x8cab, 0x8ca8, 0x8caa, 0x8ca7, 0x8d67, 0x8d66, 0x8dbe, 0x8dba, 0x8edb, 0x8edf, 0x9019, 0x900d, 0x901a, 0x9017, 0x9023, 0x901f, 0x901d, 0x9010, 0x9015, 0x901e, 0x9020, 0x900f, 0x9022, 0x9016, 0x901b, 0x9014 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb3a1[ 94 ] = { 0x90e8, 0x90ed, 0x90fd, 0x9157, 0x91ce, 0x91f5, 0x91e6, 0x91e3, 0x91e7, 0x91ed, 0x91e9, 0x9589, 0x966a, 0x9675, 0x9673, 0x9678, 0x9670, 0x9674, 0x9676, 0x9677, 0x966c, 0x96c0, 0x96ea, 0x96e9, 0x7ae0, 0x7adf, 0x9802, 0x9803, 0x9b5a, 0x9ce5, 0x9e75, 0x9e7f, 0x9ea5, 0x9ebb, 0x50a2, 0x508d, 0x5085, 0x5099, 0x5091, 0x5080, 0x5096, 0x5098, 0x509a, 0x6700, 0x51f1, 0x5272, 0x5274, 0x5275, 0x5269, 0x52de, 0x52dd, 0x52db, 0x535a, 0x53a5, 0x557b, 0x5580, 0x55a7, 0x557c, 0x558a, 0x559d, 0x5598, 0x5582, 0x559c, 0x55aa, 0x5594, 0x5587, 0x558b, 0x5583, 0x55b3, 0x55ae, 0x559f, 0x553e, 0x55b2, 0x559a, 0x55bb, 0x55ac, 0x55b1, 0x557e, 0x5589, 0x55ab, 0x5599, 0x570d, 0x582f, 0x582a, 0x5834, 0x5824, 0x5830, 0x5831, 0x5821, 0x581d, 0x5820, 0x58f9, 0x58fa, 0x5960 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb440[ 63 ] = { 0x5a77, 0x5a9a, 0x5a7f, 0x5a92, 0x5a9b, 0x5aa7, 0x5b73, 0x5b71, 0x5bd2, 0x5bcc, 0x5bd3, 0x5bd0, 0x5c0a, 0x5c0b, 0x5c31, 0x5d4c, 0x5d50, 0x5d34, 0x5d47, 0x5dfd, 0x5e45, 0x5e3d, 0x5e40, 0x5e43, 0x5e7e, 0x5eca, 0x5ec1, 0x5ec2, 0x5ec4, 0x5f3c, 0x5f6d, 0x5fa9, 0x5faa, 0x5fa8, 0x60d1, 0x60e1, 0x60b2, 0x60b6, 0x60e0, 0x611c, 0x6123, 0x60fa, 0x6115, 0x60f0, 0x60fb, 0x60f4, 0x6168, 0x60f1, 0x610e, 0x60f6, 0x6109, 0x6100, 0x6112, 0x621f, 0x6249, 0x63a3, 0x638c, 0x63cf, 0x63c0, 0x63e9, 0x63c9, 0x63c6, 0x63cd }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb4a1[ 94 ] = { 0x63d2, 0x63e3, 0x63d0, 0x63e1, 0x63d6, 0x63ed, 0x63ee, 0x6376, 0x63f4, 0x63ea, 0x63db, 0x6452, 0x63da, 0x63f9, 0x655e, 0x6566, 0x6562, 0x6563, 0x6591, 0x6590, 0x65af, 0x666e, 0x6670, 0x6674, 0x6676, 0x666f, 0x6691, 0x667a, 0x667e, 0x6677, 0x66fe, 0x66ff, 0x671f, 0x671d, 0x68fa, 0x68d5, 0x68e0, 0x68d8, 0x68d7, 0x6905, 0x68df, 0x68f5, 0x68ee, 0x68e7, 0x68f9, 0x68d2, 0x68f2, 0x68e3, 0x68cb, 0x68cd, 0x690d, 0x6912, 0x690e, 0x68c9, 0x68da, 0x696e, 0x68fb, 0x6b3e, 0x6b3a, 0x6b3d, 0x6b98, 0x6b96, 0x6bbc, 0x6bef, 0x6c2e, 0x6c2f, 0x6c2c, 0x6e2f, 0x6e38, 0x6e54, 0x6e21, 0x6e32, 0x6e67, 0x6e4a, 0x6e20, 0x6e25, 0x6e23, 0x6e1b, 0x6e5b, 0x6e58, 0x6e24, 0x6e56, 0x6e6e, 0x6e2d, 0x6e26, 0x6e6f, 0x6e34, 0x6e4d, 0x6e3a, 0x6e2c, 0x6e43, 0x6e1d, 0x6e3e, 0x6ecb }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb540[ 63 ] = { 0x6e89, 0x6e19, 0x6e4e, 0x6e63, 0x6e44, 0x6e72, 0x6e69, 0x6e5f, 0x7119, 0x711a, 0x7126, 0x7130, 0x7121, 0x7136, 0x716e, 0x711c, 0x724c, 0x7284, 0x7280, 0x7336, 0x7325, 0x7334, 0x7329, 0x743a, 0x742a, 0x7433, 0x7422, 0x7425, 0x7435, 0x7436, 0x7434, 0x742f, 0x741b, 0x7426, 0x7428, 0x7525, 0x7526, 0x756b, 0x756a, 0x75e2, 0x75db, 0x75e3, 0x75d9, 0x75d8, 0x75de, 0x75e0, 0x767b, 0x767c, 0x7696, 0x7693, 0x76b4, 0x76dc, 0x774f, 0x77ed, 0x785d, 0x786c, 0x786f, 0x7a0d, 0x7a08, 0x7a0b, 0x7a05, 0x7a00, 0x7a98 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb5a1[ 94 ] = { 0x7a97, 0x7a96, 0x7ae5, 0x7ae3, 0x7b49, 0x7b56, 0x7b46, 0x7b50, 0x7b52, 0x7b54, 0x7b4d, 0x7b4b, 0x7b4f, 0x7b51, 0x7c9f, 0x7ca5, 0x7d5e, 0x7d50, 0x7d68, 0x7d55, 0x7d2b, 0x7d6e, 0x7d72, 0x7d61, 0x7d66, 0x7d62, 0x7d70, 0x7d73, 0x5584, 0x7fd4, 0x7fd5, 0x800b, 0x8052, 0x8085, 0x8155, 0x8154, 0x814b, 0x8151, 0x814e, 0x8139, 0x8146, 0x813e, 0x814c, 0x8153, 0x8174, 0x8212, 0x821c, 0x83e9, 0x8403, 0x83f8, 0x840d, 0x83e0, 0x83c5, 0x840b, 0x83c1, 0x83ef, 0x83f1, 0x83f4, 0x8457, 0x840a, 0x83f0, 0x840c, 0x83cc, 0x83fd, 0x83f2, 0x83ca, 0x8438, 0x840e, 0x8404, 0x83dc, 0x8407, 0x83d4, 0x83df, 0x865b, 0x86df, 0x86d9, 0x86ed, 0x86d4, 0x86db, 0x86e4, 0x86d0, 0x86de, 0x8857, 0x88c1, 0x88c2, 0x88b1, 0x8983, 0x8996, 0x8a3b, 0x8a60, 0x8a55, 0x8a5e, 0x8a3c, 0x8a41 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb640[ 63 ] = { 0x8a54, 0x8a5b, 0x8a50, 0x8a46, 0x8a34, 0x8a3a, 0x8a36, 0x8a56, 0x8c61, 0x8c82, 0x8caf, 0x8cbc, 0x8cb3, 0x8cbd, 0x8cc1, 0x8cbb, 0x8cc0, 0x8cb4, 0x8cb7, 0x8cb6, 0x8cbf, 0x8cb8, 0x8d8a, 0x8d85, 0x8d81, 0x8dce, 0x8ddd, 0x8dcb, 0x8dda, 0x8dd1, 0x8dcc, 0x8ddb, 0x8dc6, 0x8efb, 0x8ef8, 0x8efc, 0x8f9c, 0x902e, 0x9035, 0x9031, 0x9038, 0x9032, 0x9036, 0x9102, 0x90f5, 0x9109, 0x90fe, 0x9163, 0x9165, 0x91cf, 0x9214, 0x9215, 0x9223, 0x9209, 0x921e, 0x920d, 0x9210, 0x9207, 0x9211, 0x9594, 0x958f, 0x958b, 0x9591 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb6a1[ 94 ] = { 0x9593, 0x9592, 0x958e, 0x968a, 0x968e, 0x968b, 0x967d, 0x9685, 0x9686, 0x968d, 0x9672, 0x9684, 0x96c1, 0x96c5, 0x96c4, 0x96c6, 0x96c7, 0x96ef, 0x96f2, 0x97cc, 0x9805, 0x9806, 0x9808, 0x98e7, 0x98ea, 0x98ef, 0x98e9, 0x98f2, 0x98ed, 0x99ae, 0x99ad, 0x9ec3, 0x9ecd, 0x9ed1, 0x4e82, 0x50ad, 0x50b5, 0x50b2, 0x50b3, 0x50c5, 0x50be, 0x50ac, 0x50b7, 0x50bb, 0x50af, 0x50c7, 0x527f, 0x5277, 0x527d, 0x52df, 0x52e6, 0x52e4, 0x52e2, 0x52e3, 0x532f, 0x55df, 0x55e8, 0x55d3, 0x55e6, 0x55ce, 0x55dc, 0x55c7, 0x55d1, 0x55e3, 0x55e4, 0x55ef, 0x55da, 0x55e1, 0x55c5, 0x55c6, 0x55e5, 0x55c9, 0x5712, 0x5713, 0x585e, 0x5851, 0x5858, 0x5857, 0x585a, 0x5854, 0x586b, 0x584c, 0x586d, 0x584a, 0x5862, 0x5852, 0x584b, 0x5967, 0x5ac1, 0x5ac9, 0x5acc, 0x5abe, 0x5abd, 0x5abc }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb740[ 63 ] = { 0x5ab3, 0x5ac2, 0x5ab2, 0x5d69, 0x5d6f, 0x5e4c, 0x5e79, 0x5ec9, 0x5ec8, 0x5f12, 0x5f59, 0x5fac, 0x5fae, 0x611a, 0x610f, 0x6148, 0x611f, 0x60f3, 0x611b, 0x60f9, 0x6101, 0x6108, 0x614e, 0x614c, 0x6144, 0x614d, 0x613e, 0x6134, 0x6127, 0x610d, 0x6106, 0x6137, 0x6221, 0x6222, 0x6413, 0x643e, 0x641e, 0x642a, 0x642d, 0x643d, 0x642c, 0x640f, 0x641c, 0x6414, 0x640d, 0x6436, 0x6416, 0x6417, 0x6406, 0x656c, 0x659f, 0x65b0, 0x6697, 0x6689, 0x6687, 0x6688, 0x6696, 0x6684, 0x6698, 0x668d, 0x6703, 0x6994, 0x696d }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb7a1[ 94 ] = { 0x695a, 0x6977, 0x6960, 0x6954, 0x6975, 0x6930, 0x6982, 0x694a, 0x6968, 0x696b, 0x695e, 0x6953, 0x6979, 0x6986, 0x695d, 0x6963, 0x695b, 0x6b47, 0x6b72, 0x6bc0, 0x6bbf, 0x6bd3, 0x6bfd, 0x6ea2, 0x6eaf, 0x6ed3, 0x6eb6, 0x6ec2, 0x6e90, 0x6e9d, 0x6ec7, 0x6ec5, 0x6ea5, 0x6e98, 0x6ebc, 0x6eba, 0x6eab, 0x6ed1, 0x6e96, 0x6e9c, 0x6ec4, 0x6ed4, 0x6eaa, 0x6ea7, 0x6eb4, 0x714e, 0x7159, 0x7169, 0x7164, 0x7149, 0x7167, 0x715c, 0x716c, 0x7166, 0x714c, 0x7165, 0x715e, 0x7146, 0x7168, 0x7156, 0x723a, 0x7252, 0x7337, 0x7345, 0x733f, 0x733e, 0x746f, 0x745a, 0x7455, 0x745f, 0x745e, 0x7441, 0x743f, 0x7459, 0x745b, 0x745c, 0x7576, 0x7578, 0x7600, 0x75f0, 0x7601, 0x75f2, 0x75f1, 0x75fa, 0x75ff, 0x75f4, 0x75f3, 0x76de, 0x76df, 0x775b, 0x776b, 0x7766, 0x775e, 0x7763 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb840[ 63 ] = { 0x7779, 0x776a, 0x776c, 0x775c, 0x7765, 0x7768, 0x7762, 0x77ee, 0x788e, 0x78b0, 0x7897, 0x7898, 0x788c, 0x7889, 0x787c, 0x7891, 0x7893, 0x787f, 0x797a, 0x797f, 0x7981, 0x842c, 0x79bd, 0x7a1c, 0x7a1a, 0x7a20, 0x7a14, 0x7a1f, 0x7a1e, 0x7a9f, 0x7aa0, 0x7b77, 0x7bc0, 0x7b60, 0x7b6e, 0x7b67, 0x7cb1, 0x7cb3, 0x7cb5, 0x7d93, 0x7d79, 0x7d91, 0x7d81, 0x7d8f, 0x7d5b, 0x7f6e, 0x7f69, 0x7f6a, 0x7f72, 0x7fa9, 0x7fa8, 0x7fa4, 0x8056, 0x8058, 0x8086, 0x8084, 0x8171, 0x8170, 0x8178, 0x8165, 0x816e, 0x8173, 0x816b }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb8a1[ 94 ] = { 0x8179, 0x817a, 0x8166, 0x8205, 0x8247, 0x8482, 0x8477, 0x843d, 0x8431, 0x8475, 0x8466, 0x846b, 0x8449, 0x846c, 0x845b, 0x843c, 0x8435, 0x8461, 0x8463, 0x8469, 0x846d, 0x8446, 0x865e, 0x865c, 0x865f, 0x86f9, 0x8713, 0x8708, 0x8707, 0x8700, 0x86fe, 0x86fb, 0x8702, 0x8703, 0x8706, 0x870a, 0x8859, 0x88df, 0x88d4, 0x88d9, 0x88dc, 0x88d8, 0x88dd, 0x88e1, 0x88ca, 0x88d5, 0x88d2, 0x899c, 0x89e3, 0x8a6b, 0x8a72, 0x8a73, 0x8a66, 0x8a69, 0x8a70, 0x8a87, 0x8a7c, 0x8a63, 0x8aa0, 0x8a71, 0x8a85, 0x8a6d, 0x8a62, 0x8a6e, 0x8a6c, 0x8a79, 0x8a7b, 0x8a3e, 0x8a68, 0x8c62, 0x8c8a, 0x8c89, 0x8cca, 0x8cc7, 0x8cc8, 0x8cc4, 0x8cb2, 0x8cc3, 0x8cc2, 0x8cc5, 0x8de1, 0x8ddf, 0x8de8, 0x8def, 0x8df3, 0x8dfa, 0x8dea, 0x8de4, 0x8de6, 0x8eb2, 0x8f03, 0x8f09, 0x8efe, 0x8f0a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb940[ 63 ] = { 0x8f9f, 0x8fb2, 0x904b, 0x904a, 0x9053, 0x9042, 0x9054, 0x903c, 0x9055, 0x9050, 0x9047, 0x904f, 0x904e, 0x904d, 0x9051, 0x903e, 0x9041, 0x9112, 0x9117, 0x916c, 0x916a, 0x9169, 0x91c9, 0x9237, 0x9257, 0x9238, 0x923d, 0x9240, 0x923e, 0x925b, 0x924b, 0x9264, 0x9251, 0x9234, 0x9249, 0x924d, 0x9245, 0x9239, 0x923f, 0x925a, 0x9598, 0x9698, 0x9694, 0x9695, 0x96cd, 0x96cb, 0x96c9, 0x96ca, 0x96f7, 0x96fb, 0x96f9, 0x96f6, 0x9756, 0x9774, 0x9776, 0x9810, 0x9811, 0x9813, 0x980a, 0x9812, 0x980c, 0x98fc, 0x98f4 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb9a1[ 94 ] = { 0x98fd, 0x98fe, 0x99b3, 0x99b1, 0x99b4, 0x9ae1, 0x9ce9, 0x9e82, 0x9f0e, 0x9f13, 0x9f20, 0x50e7, 0x50ee, 0x50e5, 0x50d6, 0x50ed, 0x50da, 0x50d5, 0x50cf, 0x50d1, 0x50f1, 0x50ce, 0x50e9, 0x5162, 0x51f3, 0x5283, 0x5282, 0x5331, 0x53ad, 0x55fe, 0x5600, 0x561b, 0x5617, 0x55fd, 0x5614, 0x5606, 0x5609, 0x560d, 0x560e, 0x55f7, 0x5616, 0x561f, 0x5608, 0x5610, 0x55f6, 0x5718, 0x5716, 0x5875, 0x587e, 0x5883, 0x5893, 0x588a, 0x5879, 0x5885, 0x587d, 0x58fd, 0x5925, 0x5922, 0x5924, 0x596a, 0x5969, 0x5ae1, 0x5ae6, 0x5ae9, 0x5ad7, 0x5ad6, 0x5ad8, 0x5ae3, 0x5b75, 0x5bde, 0x5be7, 0x5be1, 0x5be5, 0x5be6, 0x5be8, 0x5be2, 0x5be4, 0x5bdf, 0x5c0d, 0x5c62, 0x5d84, 0x5d87, 0x5e5b, 0x5e63, 0x5e55, 0x5e57, 0x5e54, 0x5ed3, 0x5ed6, 0x5f0a, 0x5f46, 0x5f70, 0x5fb9, 0x6147 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xba40[ 63 ] = { 0x613f, 0x614b, 0x6177, 0x6162, 0x6163, 0x615f, 0x615a, 0x6158, 0x6175, 0x622a, 0x6487, 0x6458, 0x6454, 0x64a4, 0x6478, 0x645f, 0x647a, 0x6451, 0x6467, 0x6434, 0x646d, 0x647b, 0x6572, 0x65a1, 0x65d7, 0x65d6, 0x66a2, 0x66a8, 0x669d, 0x699c, 0x69a8, 0x6995, 0x69c1, 0x69ae, 0x69d3, 0x69cb, 0x699b, 0x69b7, 0x69bb, 0x69ab, 0x69b4, 0x69d0, 0x69cd, 0x69ad, 0x69cc, 0x69a6, 0x69c3, 0x69a3, 0x6b49, 0x6b4c, 0x6c33, 0x6f33, 0x6f14, 0x6efe, 0x6f13, 0x6ef4, 0x6f29, 0x6f3e, 0x6f20, 0x6f2c, 0x6f0f, 0x6f02, 0x6f22 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbaa1[ 94 ] = { 0x6eff, 0x6eef, 0x6f06, 0x6f31, 0x6f38, 0x6f32, 0x6f23, 0x6f15, 0x6f2b, 0x6f2f, 0x6f88, 0x6f2a, 0x6eec, 0x6f01, 0x6ef2, 0x6ecc, 0x6ef7, 0x7194, 0x7199, 0x717d, 0x718a, 0x7184, 0x7192, 0x723e, 0x7292, 0x7296, 0x7344, 0x7350, 0x7464, 0x7463, 0x746a, 0x7470, 0x746d, 0x7504, 0x7591, 0x7627, 0x760d, 0x760b, 0x7609, 0x7613, 0x76e1, 0x76e3, 0x7784, 0x777d, 0x777f, 0x7761, 0x78c1, 0x789f, 0x78a7, 0x78b3, 0x78a9, 0x78a3, 0x798e, 0x798f, 0x798d, 0x7a2e, 0x7a31, 0x7aaa, 0x7aa9, 0x7aed, 0x7aef, 0x7ba1, 0x7b95, 0x7b8b, 0x7b75, 0x7b97, 0x7b9d, 0x7b94, 0x7b8f, 0x7bb8, 0x7b87, 0x7b84, 0x7cb9, 0x7cbd, 0x7cbe, 0x7dbb, 0x7db0, 0x7d9c, 0x7dbd, 0x7dbe, 0x7da0, 0x7dca, 0x7db4, 0x7db2, 0x7db1, 0x7dba, 0x7da2, 0x7dbf, 0x7db5, 0x7db8, 0x7dad, 0x7dd2, 0x7dc7, 0x7dac }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbb40[ 63 ] = { 0x7f70, 0x7fe0, 0x7fe1, 0x7fdf, 0x805e, 0x805a, 0x8087, 0x8150, 0x8180, 0x818f, 0x8188, 0x818a, 0x817f, 0x8182, 0x81e7, 0x81fa, 0x8207, 0x8214, 0x821e, 0x824b, 0x84c9, 0x84bf, 0x84c6, 0x84c4, 0x8499, 0x849e, 0x84b2, 0x849c, 0x84cb, 0x84b8, 0x84c0, 0x84d3, 0x8490, 0x84bc, 0x84d1, 0x84ca, 0x873f, 0x871c, 0x873b, 0x8722, 0x8725, 0x8734, 0x8718, 0x8755, 0x8737, 0x8729, 0x88f3, 0x8902, 0x88f4, 0x88f9, 0x88f8, 0x88fd, 0x88e8, 0x891a, 0x88ef, 0x8aa6, 0x8a8c, 0x8a9e, 0x8aa3, 0x8a8d, 0x8aa1, 0x8a93, 0x8aa4 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbba1[ 94 ] = { 0x8aaa, 0x8aa5, 0x8aa8, 0x8a98, 0x8a91, 0x8a9a, 0x8aa7, 0x8c6a, 0x8c8d, 0x8c8c, 0x8cd3, 0x8cd1, 0x8cd2, 0x8d6b, 0x8d99, 0x8d95, 0x8dfc, 0x8f14, 0x8f12, 0x8f15, 0x8f13, 0x8fa3, 0x9060, 0x9058, 0x905c, 0x9063, 0x9059, 0x905e, 0x9062, 0x905d, 0x905b, 0x9119, 0x9118, 0x911e, 0x9175, 0x9178, 0x9177, 0x9174, 0x9278, 0x9280, 0x9285, 0x9298, 0x9296, 0x927b, 0x9293, 0x929c, 0x92a8, 0x927c, 0x9291, 0x95a1, 0x95a8, 0x95a9, 0x95a3, 0x95a5, 0x95a4, 0x9699, 0x969c, 0x969b, 0x96cc, 0x96d2, 0x9700, 0x977c, 0x9785, 0x97f6, 0x9817, 0x9818, 0x98af, 0x98b1, 0x9903, 0x9905, 0x990c, 0x9909, 0x99c1, 0x9aaf, 0x9ab0, 0x9ae6, 0x9b41, 0x9b42, 0x9cf4, 0x9cf6, 0x9cf3, 0x9ebc, 0x9f3b, 0x9f4a, 0x5104, 0x5100, 0x50fb, 0x50f5, 0x50f9, 0x5102, 0x5108, 0x5109, 0x5105, 0x51dc }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbc40[ 63 ] = { 0x5287, 0x5288, 0x5289, 0x528d, 0x528a, 0x52f0, 0x53b2, 0x562e, 0x563b, 0x5639, 0x5632, 0x563f, 0x5634, 0x5629, 0x5653, 0x564e, 0x5657, 0x5674, 0x5636, 0x562f, 0x5630, 0x5880, 0x589f, 0x589e, 0x58b3, 0x589c, 0x58ae, 0x58a9, 0x58a6, 0x596d, 0x5b09, 0x5afb, 0x5b0b, 0x5af5, 0x5b0c, 0x5b08, 0x5bee, 0x5bec, 0x5be9, 0x5beb, 0x5c64, 0x5c65, 0x5d9d, 0x5d94, 0x5e62, 0x5e5f, 0x5e61, 0x5ee2, 0x5eda, 0x5edf, 0x5edd, 0x5ee3, 0x5ee0, 0x5f48, 0x5f71, 0x5fb7, 0x5fb5, 0x6176, 0x6167, 0x616e, 0x615d, 0x6155, 0x6182 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbca1[ 94 ] = { 0x617c, 0x6170, 0x616b, 0x617e, 0x61a7, 0x6190, 0x61ab, 0x618e, 0x61ac, 0x619a, 0x61a4, 0x6194, 0x61ae, 0x622e, 0x6469, 0x646f, 0x6479, 0x649e, 0x64b2, 0x6488, 0x6490, 0x64b0, 0x64a5, 0x6493, 0x6495, 0x64a9, 0x6492, 0x64ae, 0x64ad, 0x64ab, 0x649a, 0x64ac, 0x6499, 0x64a2, 0x64b3, 0x6575, 0x6577, 0x6578, 0x66ae, 0x66ab, 0x66b4, 0x66b1, 0x6a23, 0x6a1f, 0x69e8, 0x6a01, 0x6a1e, 0x6a19, 0x69fd, 0x6a21, 0x6a13, 0x6a0a, 0x69f3, 0x6a02, 0x6a05, 0x69ed, 0x6a11, 0x6b50, 0x6b4e, 0x6ba4, 0x6bc5, 0x6bc6, 0x6f3f, 0x6f7c, 0x6f84, 0x6f51, 0x6f66, 0x6f54, 0x6f86, 0x6f6d, 0x6f5b, 0x6f78, 0x6f6e, 0x6f8e, 0x6f7a, 0x6f70, 0x6f64, 0x6f97, 0x6f58, 0x6ed5, 0x6f6f, 0x6f60, 0x6f5f, 0x719f, 0x71ac, 0x71b1, 0x71a8, 0x7256, 0x729b, 0x734e, 0x7357, 0x7469, 0x748b, 0x7483 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbd40[ 63 ] = { 0x747e, 0x7480, 0x757f, 0x7620, 0x7629, 0x761f, 0x7624, 0x7626, 0x7621, 0x7622, 0x769a, 0x76ba, 0x76e4, 0x778e, 0x7787, 0x778c, 0x7791, 0x778b, 0x78cb, 0x78c5, 0x78ba, 0x78ca, 0x78be, 0x78d5, 0x78bc, 0x78d0, 0x7a3f, 0x7a3c, 0x7a40, 0x7a3d, 0x7a37, 0x7a3b, 0x7aaf, 0x7aae, 0x7bad, 0x7bb1, 0x7bc4, 0x7bb4, 0x7bc6, 0x7bc7, 0x7bc1, 0x7ba0, 0x7bcc, 0x7cca, 0x7de0, 0x7df4, 0x7def, 0x7dfb, 0x7dd8, 0x7dec, 0x7ddd, 0x7de8, 0x7de3, 0x7dda, 0x7dde, 0x7de9, 0x7d9e, 0x7dd9, 0x7df2, 0x7df9, 0x7f75, 0x7f77, 0x7faf }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbda1[ 94 ] = { 0x7fe9, 0x8026, 0x819b, 0x819c, 0x819d, 0x81a0, 0x819a, 0x8198, 0x8517, 0x853d, 0x851a, 0x84ee, 0x852c, 0x852d, 0x8513, 0x8511, 0x8523, 0x8521, 0x8514, 0x84ec, 0x8525, 0x84ff, 0x8506, 0x8782, 0x8774, 0x8776, 0x8760, 0x8766, 0x8778, 0x8768, 0x8759, 0x8757, 0x874c, 0x8753, 0x885b, 0x885d, 0x8910, 0x8907, 0x8912, 0x8913, 0x8915, 0x890a, 0x8abc, 0x8ad2, 0x8ac7, 0x8ac4, 0x8a95, 0x8acb, 0x8af8, 0x8ab2, 0x8ac9, 0x8ac2, 0x8abf, 0x8ab0, 0x8ad6, 0x8acd, 0x8ab6, 0x8ab9, 0x8adb, 0x8c4c, 0x8c4e, 0x8c6c, 0x8ce0, 0x8cde, 0x8ce6, 0x8ce4, 0x8cec, 0x8ced, 0x8ce2, 0x8ce3, 0x8cdc, 0x8cea, 0x8ce1, 0x8d6d, 0x8d9f, 0x8da3, 0x8e2b, 0x8e10, 0x8e1d, 0x8e22, 0x8e0f, 0x8e29, 0x8e1f, 0x8e21, 0x8e1e, 0x8eba, 0x8f1d, 0x8f1b, 0x8f1f, 0x8f29, 0x8f26, 0x8f2a, 0x8f1c, 0x8f1e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbe40[ 63 ] = { 0x8f25, 0x9069, 0x906e, 0x9068, 0x906d, 0x9077, 0x9130, 0x912d, 0x9127, 0x9131, 0x9187, 0x9189, 0x918b, 0x9183, 0x92c5, 0x92bb, 0x92b7, 0x92ea, 0x92ac, 0x92e4, 0x92c1, 0x92b3, 0x92bc, 0x92d2, 0x92c7, 0x92f0, 0x92b2, 0x95ad, 0x95b1, 0x9704, 0x9706, 0x9707, 0x9709, 0x9760, 0x978d, 0x978b, 0x978f, 0x9821, 0x982b, 0x981c, 0x98b3, 0x990a, 0x9913, 0x9912, 0x9918, 0x99dd, 0x99d0, 0x99df, 0x99db, 0x99d1, 0x99d5, 0x99d2, 0x99d9, 0x9ab7, 0x9aee, 0x9aef, 0x9b27, 0x9b45, 0x9b44, 0x9b77, 0x9b6f, 0x9d06, 0x9d09 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbea1[ 94 ] = { 0x9d03, 0x9ea9, 0x9ebe, 0x9ece, 0x58a8, 0x9f52, 0x5112, 0x5118, 0x5114, 0x5110, 0x5115, 0x5180, 0x51aa, 0x51dd, 0x5291, 0x5293, 0x52f3, 0x5659, 0x566b, 0x5679, 0x5669, 0x5664, 0x5678, 0x566a, 0x5668, 0x5665, 0x5671, 0x566f, 0x566c, 0x5662, 0x5676, 0x58c1, 0x58be, 0x58c7, 0x58c5, 0x596e, 0x5b1d, 0x5b34, 0x5b78, 0x5bf0, 0x5c0e, 0x5f4a, 0x61b2, 0x6191, 0x61a9, 0x618a, 0x61cd, 0x61b6, 0x61be, 0x61ca, 0x61c8, 0x6230, 0x64c5, 0x64c1, 0x64cb, 0x64bb, 0x64bc, 0x64da, 0x64c4, 0x64c7, 0x64c2, 0x64cd, 0x64bf, 0x64d2, 0x64d4, 0x64be, 0x6574, 0x66c6, 0x66c9, 0x66b9, 0x66c4, 0x66c7, 0x66b8, 0x6a3d, 0x6a38, 0x6a3a, 0x6a59, 0x6a6b, 0x6a58, 0x6a39, 0x6a44, 0x6a62, 0x6a61, 0x6a4b, 0x6a47, 0x6a35, 0x6a5f, 0x6a48, 0x6b59, 0x6b77, 0x6c05, 0x6fc2, 0x6fb1, 0x6fa1 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbf40[ 63 ] = { 0x6fc3, 0x6fa4, 0x6fc1, 0x6fa7, 0x6fb3, 0x6fc0, 0x6fb9, 0x6fb6, 0x6fa6, 0x6fa0, 0x6fb4, 0x71be, 0x71c9, 0x71d0, 0x71d2, 0x71c8, 0x71d5, 0x71b9, 0x71ce, 0x71d9, 0x71dc, 0x71c3, 0x71c4, 0x7368, 0x749c, 0x74a3, 0x7498, 0x749f, 0x749e, 0x74e2, 0x750c, 0x750d, 0x7634, 0x7638, 0x763a, 0x76e7, 0x76e5, 0x77a0, 0x779e, 0x779f, 0x77a5, 0x78e8, 0x78da, 0x78ec, 0x78e7, 0x79a6, 0x7a4d, 0x7a4e, 0x7a46, 0x7a4c, 0x7a4b, 0x7aba, 0x7bd9, 0x7c11, 0x7bc9, 0x7be4, 0x7bdb, 0x7be1, 0x7be9, 0x7be6, 0x7cd5, 0x7cd6, 0x7e0a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbfa1[ 94 ] = { 0x7e11, 0x7e08, 0x7e1b, 0x7e23, 0x7e1e, 0x7e1d, 0x7e09, 0x7e10, 0x7f79, 0x7fb2, 0x7ff0, 0x7ff1, 0x7fee, 0x8028, 0x81b3, 0x81a9, 0x81a8, 0x81fb, 0x8208, 0x8258, 0x8259, 0x854a, 0x8559, 0x8548, 0x8568, 0x8569, 0x8543, 0x8549, 0x856d, 0x856a, 0x855e, 0x8783, 0x879f, 0x879e, 0x87a2, 0x878d, 0x8861, 0x892a, 0x8932, 0x8925, 0x892b, 0x8921, 0x89aa, 0x89a6, 0x8ae6, 0x8afa, 0x8aeb, 0x8af1, 0x8b00, 0x8adc, 0x8ae7, 0x8aee, 0x8afe, 0x8b01, 0x8b02, 0x8af7, 0x8aed, 0x8af3, 0x8af6, 0x8afc, 0x8c6b, 0x8c6d, 0x8c93, 0x8cf4, 0x8e44, 0x8e31, 0x8e34, 0x8e42, 0x8e39, 0x8e35, 0x8f3b, 0x8f2f, 0x8f38, 0x8f33, 0x8fa8, 0x8fa6, 0x9075, 0x9074, 0x9078, 0x9072, 0x907c, 0x907a, 0x9134, 0x9192, 0x9320, 0x9336, 0x92f8, 0x9333, 0x932f, 0x9322, 0x92fc, 0x932b, 0x9304, 0x931a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc040[ 63 ] = { 0x9310, 0x9326, 0x9321, 0x9315, 0x932e, 0x9319, 0x95bb, 0x96a7, 0x96a8, 0x96aa, 0x96d5, 0x970e, 0x9711, 0x9716, 0x970d, 0x9713, 0x970f, 0x975b, 0x975c, 0x9766, 0x9798, 0x9830, 0x9838, 0x983b, 0x9837, 0x982d, 0x9839, 0x9824, 0x9910, 0x9928, 0x991e, 0x991b, 0x9921, 0x991a, 0x99ed, 0x99e2, 0x99f1, 0x9ab8, 0x9abc, 0x9afb, 0x9aed, 0x9b28, 0x9b91, 0x9d15, 0x9d23, 0x9d26, 0x9d28, 0x9d12, 0x9d1b, 0x9ed8, 0x9ed4, 0x9f8d, 0x9f9c, 0x512a, 0x511f, 0x5121, 0x5132, 0x52f5, 0x568e, 0x5680, 0x5690, 0x5685, 0x5687 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc0a1[ 94 ] = { 0x568f, 0x58d5, 0x58d3, 0x58d1, 0x58ce, 0x5b30, 0x5b2a, 0x5b24, 0x5b7a, 0x5c37, 0x5c68, 0x5dbc, 0x5dba, 0x5dbd, 0x5db8, 0x5e6b, 0x5f4c, 0x5fbd, 0x61c9, 0x61c2, 0x61c7, 0x61e6, 0x61cb, 0x6232, 0x6234, 0x64ce, 0x64ca, 0x64d8, 0x64e0, 0x64f0, 0x64e6, 0x64ec, 0x64f1, 0x64e2, 0x64ed, 0x6582, 0x6583, 0x66d9, 0x66d6, 0x6a80, 0x6a94, 0x6a84, 0x6aa2, 0x6a9c, 0x6adb, 0x6aa3, 0x6a7e, 0x6a97, 0x6a90, 0x6aa0, 0x6b5c, 0x6bae, 0x6bda, 0x6c08, 0x6fd8, 0x6ff1, 0x6fdf, 0x6fe0, 0x6fdb, 0x6fe4, 0x6feb, 0x6fef, 0x6f80, 0x6fec, 0x6fe1, 0x6fe9, 0x6fd5, 0x6fee, 0x6ff0, 0x71e7, 0x71df, 0x71ee, 0x71e6, 0x71e5, 0x71ed, 0x71ec, 0x71f4, 0x71e0, 0x7235, 0x7246, 0x7370, 0x7372, 0x74a9, 0x74b0, 0x74a6, 0x74a8, 0x7646, 0x7642, 0x764c, 0x76ea, 0x77b3, 0x77aa, 0x77b0, 0x77ac }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc140[ 63 ] = { 0x77a7, 0x77ad, 0x77ef, 0x78f7, 0x78fa, 0x78f4, 0x78ef, 0x7901, 0x79a7, 0x79aa, 0x7a57, 0x7abf, 0x7c07, 0x7c0d, 0x7bfe, 0x7bf7, 0x7c0c, 0x7be0, 0x7ce0, 0x7cdc, 0x7cde, 0x7ce2, 0x7cdf, 0x7cd9, 0x7cdd, 0x7e2e, 0x7e3e, 0x7e46, 0x7e37, 0x7e32, 0x7e43, 0x7e2b, 0x7e3d, 0x7e31, 0x7e45, 0x7e41, 0x7e34, 0x7e39, 0x7e48, 0x7e35, 0x7e3f, 0x7e2f, 0x7f44, 0x7ff3, 0x7ffc, 0x8071, 0x8072, 0x8070, 0x806f, 0x8073, 0x81c6, 0x81c3, 0x81ba, 0x81c2, 0x81c0, 0x81bf, 0x81bd, 0x81c9, 0x81be, 0x81e8, 0x8209, 0x8271, 0x85aa }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc1a1[ 94 ] = { 0x8584, 0x857e, 0x859c, 0x8591, 0x8594, 0x85af, 0x859b, 0x8587, 0x85a8, 0x858a, 0x8667, 0x87c0, 0x87d1, 0x87b3, 0x87d2, 0x87c6, 0x87ab, 0x87bb, 0x87ba, 0x87c8, 0x87cb, 0x893b, 0x8936, 0x8944, 0x8938, 0x893d, 0x89ac, 0x8b0e, 0x8b17, 0x8b19, 0x8b1b, 0x8b0a, 0x8b20, 0x8b1d, 0x8b04, 0x8b10, 0x8c41, 0x8c3f, 0x8c73, 0x8cfa, 0x8cfd, 0x8cfc, 0x8cf8, 0x8cfb, 0x8da8, 0x8e49, 0x8e4b, 0x8e48, 0x8e4a, 0x8f44, 0x8f3e, 0x8f42, 0x8f45, 0x8f3f, 0x907f, 0x907d, 0x9084, 0x9081, 0x9082, 0x9080, 0x9139, 0x91a3, 0x919e, 0x919c, 0x934d, 0x9382, 0x9328, 0x9375, 0x934a, 0x9365, 0x934b, 0x9318, 0x937e, 0x936c, 0x935b, 0x9370, 0x935a, 0x9354, 0x95ca, 0x95cb, 0x95cc, 0x95c8, 0x95c6, 0x96b1, 0x96b8, 0x96d6, 0x971c, 0x971e, 0x97a0, 0x97d3, 0x9846, 0x98b6, 0x9935, 0x9a01 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc240[ 63 ] = { 0x99ff, 0x9bae, 0x9bab, 0x9baa, 0x9bad, 0x9d3b, 0x9d3f, 0x9e8b, 0x9ecf, 0x9ede, 0x9edc, 0x9edd, 0x9edb, 0x9f3e, 0x9f4b, 0x53e2, 0x5695, 0x56ae, 0x58d9, 0x58d8, 0x5b38, 0x5f5d, 0x61e3, 0x6233, 0x64f4, 0x64f2, 0x64fe, 0x6506, 0x64fa, 0x64fb, 0x64f7, 0x65b7, 0x66dc, 0x6726, 0x6ab3, 0x6aac, 0x6ac3, 0x6abb, 0x6ab8, 0x6ac2, 0x6aae, 0x6aaf, 0x6b5f, 0x6b78, 0x6baf, 0x7009, 0x700b, 0x6ffe, 0x7006, 0x6ffa, 0x7011, 0x700f, 0x71fb, 0x71fc, 0x71fe, 0x71f8, 0x7377, 0x7375, 0x74a7, 0x74bf, 0x7515, 0x7656, 0x7658 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc2a1[ 94 ] = { 0x7652, 0x77bd, 0x77bf, 0x77bb, 0x77bc, 0x790e, 0x79ae, 0x7a61, 0x7a62, 0x7a60, 0x7ac4, 0x7ac5, 0x7c2b, 0x7c27, 0x7c2a, 0x7c1e, 0x7c23, 0x7c21, 0x7ce7, 0x7e54, 0x7e55, 0x7e5e, 0x7e5a, 0x7e61, 0x7e52, 0x7e59, 0x7f48, 0x7ff9, 0x7ffb, 0x8077, 0x8076, 0x81cd, 0x81cf, 0x820a, 0x85cf, 0x85a9, 0x85cd, 0x85d0, 0x85c9, 0x85b0, 0x85ba, 0x85b9, 0x85a6, 0x87ef, 0x87ec, 0x87f2, 0x87e0, 0x8986, 0x89b2, 0x89f4, 0x8b28, 0x8b39, 0x8b2c, 0x8b2b, 0x8c50, 0x8d05, 0x8e59, 0x8e63, 0x8e66, 0x8e64, 0x8e5f, 0x8e55, 0x8ec0, 0x8f49, 0x8f4d, 0x9087, 0x9083, 0x9088, 0x91ab, 0x91ac, 0x91d0, 0x9394, 0x938a, 0x9396, 0x93a2, 0x93b3, 0x93ae, 0x93ac, 0x93b0, 0x9398, 0x939a, 0x9397, 0x95d4, 0x95d6, 0x95d0, 0x95d5, 0x96e2, 0x96dc, 0x96d9, 0x96db, 0x96de, 0x9724, 0x97a3, 0x97a6 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc340[ 63 ] = { 0x97ad, 0x97f9, 0x984d, 0x984f, 0x984c, 0x984e, 0x9853, 0x98ba, 0x993e, 0x993f, 0x993d, 0x992e, 0x99a5, 0x9a0e, 0x9ac1, 0x9b03, 0x9b06, 0x9b4f, 0x9b4e, 0x9b4d, 0x9bca, 0x9bc9, 0x9bfd, 0x9bc8, 0x9bc0, 0x9d51, 0x9d5d, 0x9d60, 0x9ee0, 0x9f15, 0x9f2c, 0x5133, 0x56a5, 0x58de, 0x58df, 0x58e2, 0x5bf5, 0x9f90, 0x5eec, 0x61f2, 0x61f7, 0x61f6, 0x61f5, 0x6500, 0x650f, 0x66e0, 0x66dd, 0x6ae5, 0x6add, 0x6ada, 0x6ad3, 0x701b, 0x701f, 0x7028, 0x701a, 0x701d, 0x7015, 0x7018, 0x7206, 0x720d, 0x7258, 0x72a2, 0x7378 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc3a1[ 94 ] = { 0x737a, 0x74bd, 0x74ca, 0x74e3, 0x7587, 0x7586, 0x765f, 0x7661, 0x77c7, 0x7919, 0x79b1, 0x7a6b, 0x7a69, 0x7c3e, 0x7c3f, 0x7c38, 0x7c3d, 0x7c37, 0x7c40, 0x7e6b, 0x7e6d, 0x7e79, 0x7e69, 0x7e6a, 0x7f85, 0x7e73, 0x7fb6, 0x7fb9, 0x7fb8, 0x81d8, 0x85e9, 0x85dd, 0x85ea, 0x85d5, 0x85e4, 0x85e5, 0x85f7, 0x87fb, 0x8805, 0x880d, 0x87f9, 0x87fe, 0x8960, 0x895f, 0x8956, 0x895e, 0x8b41, 0x8b5c, 0x8b58, 0x8b49, 0x8b5a, 0x8b4e, 0x8b4f, 0x8b46, 0x8b59, 0x8d08, 0x8d0a, 0x8e7c, 0x8e72, 0x8e87, 0x8e76, 0x8e6c, 0x8e7a, 0x8e74, 0x8f54, 0x8f4e, 0x8fad, 0x908a, 0x908b, 0x91b1, 0x91ae, 0x93e1, 0x93d1, 0x93df, 0x93c3, 0x93c8, 0x93dc, 0x93dd, 0x93d6, 0x93e2, 0x93cd, 0x93d8, 0x93e4, 0x93d7, 0x93e8, 0x95dc, 0x96b4, 0x96e3, 0x972a, 0x9727, 0x9761, 0x97dc, 0x97fb, 0x985e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc440[ 63 ] = { 0x9858, 0x985b, 0x98bc, 0x9945, 0x9949, 0x9a16, 0x9a19, 0x9b0d, 0x9be8, 0x9be7, 0x9bd6, 0x9bdb, 0x9d89, 0x9d61, 0x9d72, 0x9d6a, 0x9d6c, 0x9e92, 0x9e97, 0x9e93, 0x9eb4, 0x52f8, 0x56a8, 0x56b7, 0x56b6, 0x56b4, 0x56bc, 0x58e4, 0x5b40, 0x5b43, 0x5b7d, 0x5bf6, 0x5dc9, 0x61f8, 0x61fa, 0x6518, 0x6514, 0x6519, 0x66e6, 0x6727, 0x6aec, 0x703e, 0x7030, 0x7032, 0x7210, 0x737b, 0x74cf, 0x7662, 0x7665, 0x7926, 0x792a, 0x792c, 0x792b, 0x7ac7, 0x7af6, 0x7c4c, 0x7c43, 0x7c4d, 0x7cef, 0x7cf0, 0x8fae, 0x7e7d, 0x7e7c }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc4a1[ 94 ] = { 0x7e82, 0x7f4c, 0x8000, 0x81da, 0x8266, 0x85fb, 0x85f9, 0x8611, 0x85fa, 0x8606, 0x860b, 0x8607, 0x860a, 0x8814, 0x8815, 0x8964, 0x89ba, 0x89f8, 0x8b70, 0x8b6c, 0x8b66, 0x8b6f, 0x8b5f, 0x8b6b, 0x8d0f, 0x8d0d, 0x8e89, 0x8e81, 0x8e85, 0x8e82, 0x91b4, 0x91cb, 0x9418, 0x9403, 0x93fd, 0x95e1, 0x9730, 0x98c4, 0x9952, 0x9951, 0x99a8, 0x9a2b, 0x9a30, 0x9a37, 0x9a35, 0x9c13, 0x9c0d, 0x9e79, 0x9eb5, 0x9ee8, 0x9f2f, 0x9f5f, 0x9f63, 0x9f61, 0x5137, 0x5138, 0x56c1, 0x56c0, 0x56c2, 0x5914, 0x5c6c, 0x5dcd, 0x61fc, 0x61fe, 0x651d, 0x651c, 0x6595, 0x66e9, 0x6afb, 0x6b04, 0x6afa, 0x6bb2, 0x704c, 0x721b, 0x72a7, 0x74d6, 0x74d4, 0x7669, 0x77d3, 0x7c50, 0x7e8f, 0x7e8c, 0x7fbc, 0x8617, 0x862d, 0x861a, 0x8823, 0x8822, 0x8821, 0x881f, 0x896a, 0x896c, 0x89bd, 0x8b74 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc540[ 63 ] = { 0x8b77, 0x8b7d, 0x8d13, 0x8e8a, 0x8e8d, 0x8e8b, 0x8f5f, 0x8faf, 0x91ba, 0x942e, 0x9433, 0x9435, 0x943a, 0x9438, 0x9432, 0x942b, 0x95e2, 0x9738, 0x9739, 0x9732, 0x97ff, 0x9867, 0x9865, 0x9957, 0x9a45, 0x9a43, 0x9a40, 0x9a3e, 0x9acf, 0x9b54, 0x9b51, 0x9c2d, 0x9c25, 0x9daf, 0x9db4, 0x9dc2, 0x9db8, 0x9e9d, 0x9eef, 0x9f19, 0x9f5c, 0x9f66, 0x9f67, 0x513c, 0x513b, 0x56c8, 0x56ca, 0x56c9, 0x5b7f, 0x5dd4, 0x5dd2, 0x5f4e, 0x61ff, 0x6524, 0x6b0a, 0x6b61, 0x7051, 0x7058, 0x7380, 0x74e4, 0x758a, 0x766e, 0x766c }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc5a1[ 94 ] = { 0x79b3, 0x7c60, 0x7c5f, 0x807e, 0x807d, 0x81df, 0x8972, 0x896f, 0x89fc, 0x8b80, 0x8d16, 0x8d17, 0x8e91, 0x8e93, 0x8f61, 0x9148, 0x9444, 0x9451, 0x9452, 0x973d, 0x973e, 0x97c3, 0x97c1, 0x986b, 0x9955, 0x9a55, 0x9a4d, 0x9ad2, 0x9b1a, 0x9c49, 0x9c31, 0x9c3e, 0x9c3b, 0x9dd3, 0x9dd7, 0x9f34, 0x9f6c, 0x9f6a, 0x9f94, 0x56cc, 0x5dd6, 0x6200, 0x6523, 0x652b, 0x652a, 0x66ec, 0x6b10, 0x74da, 0x7aca, 0x7c64, 0x7c63, 0x7c65, 0x7e93, 0x7e96, 0x7e94, 0x81e2, 0x8638, 0x863f, 0x8831, 0x8b8a, 0x9090, 0x908f, 0x9463, 0x9460, 0x9464, 0x9768, 0x986f, 0x995c, 0x9a5a, 0x9a5b, 0x9a57, 0x9ad3, 0x9ad4, 0x9ad1, 0x9c54, 0x9c57, 0x9c56, 0x9de5, 0x9e9f, 0x9ef4, 0x56d1, 0x58e9, 0x652c, 0x705e, 0x7671, 0x7672, 0x77d7, 0x7f50, 0x7f88, 0x8836, 0x8839, 0x8862, 0x8b93, 0x8b92 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc640[ 63 ] = { 0x8b96, 0x8277, 0x8d1b, 0x91c0, 0x946a, 0x9742, 0x9748, 0x9744, 0x97c6, 0x9870, 0x9a5f, 0x9b22, 0x9b58, 0x9c5f, 0x9df9, 0x9dfa, 0x9e7c, 0x9e7d, 0x9f07, 0x9f77, 0x9f72, 0x5ef3, 0x6b16, 0x7063, 0x7c6c, 0x7c6e, 0x883b, 0x89c0, 0x8ea1, 0x91c1, 0x9472, 0x9470, 0x9871, 0x995e, 0x9ad6, 0x9b23, 0x9ecc, 0x7064, 0x77da, 0x8b9a, 0x9477, 0x97c9, 0x9a62, 0x9a65, 0x7e9c, 0x8b9c, 0x8eaa, 0x91c5, 0x947d, 0x947e, 0x947c, 0x9c77, 0x9c78, 0x9ef7, 0x8c54, 0x947f, 0x9e1a, 0x7228, 0x9a6a, 0x9b31, 0x9e1b, 0x9e1e, 0x7c72 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc940[ 63 ] = { 0x4e42, 0x4e5c, 0x51f5, 0x531a, 0x5382, 0x4e07, 0x4e0c, 0x4e47, 0x4e8d, 0x56d7, 0xfa0c, 0x5c6e, 0x5f73, 0x4e0f, 0x5187, 0x4e0e, 0x4e2e, 0x4e93, 0x4ec2, 0x4ec9, 0x4ec8, 0x5198, 0x52fc, 0x536c, 0x53b9, 0x5720, 0x5903, 0x592c, 0x5c10, 0x5dff, 0x65e1, 0x6bb3, 0x6bcc, 0x6c14, 0x723f, 0x4e31, 0x4e3c, 0x4ee8, 0x4edc, 0x4ee9, 0x4ee1, 0x4edd, 0x4eda, 0x520c, 0x531c, 0x534c, 0x5722, 0x5723, 0x5917, 0x592f, 0x5b81, 0x5b84, 0x5c12, 0x5c3b, 0x5c74, 0x5c73, 0x5e04, 0x5e80, 0x5e82, 0x5fc9, 0x6209, 0x6250, 0x6c15 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc9a1[ 94 ] = { 0x6c36, 0x6c43, 0x6c3f, 0x6c3b, 0x72ae, 0x72b0, 0x738a, 0x79b8, 0x808a, 0x961e, 0x4f0e, 0x4f18, 0x4f2c, 0x4ef5, 0x4f14, 0x4ef1, 0x4f00, 0x4ef7, 0x4f08, 0x4f1d, 0x4f02, 0x4f05, 0x4f22, 0x4f13, 0x4f04, 0x4ef4, 0x4f12, 0x51b1, 0x5213, 0x5209, 0x5210, 0x52a6, 0x5322, 0x531f, 0x534d, 0x538a, 0x5407, 0x56e1, 0x56df, 0x572e, 0x572a, 0x5734, 0x593c, 0x5980, 0x597c, 0x5985, 0x597b, 0x597e, 0x5977, 0x597f, 0x5b56, 0x5c15, 0x5c25, 0x5c7c, 0x5c7a, 0x5c7b, 0x5c7e, 0x5ddf, 0x5e75, 0x5e84, 0x5f02, 0x5f1a, 0x5f74, 0x5fd5, 0x5fd4, 0x5fcf, 0x625c, 0x625e, 0x6264, 0x6261, 0x6266, 0x6262, 0x6259, 0x6260, 0x625a, 0x6265, 0x65ef, 0x65ee, 0x673e, 0x6739, 0x6738, 0x673b, 0x673a, 0x673f, 0x673c, 0x6733, 0x6c18, 0x6c46, 0x6c52, 0x6c5c, 0x6c4f, 0x6c4a, 0x6c54, 0x6c4b }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xca40[ 63 ] = { 0x6c4c, 0x7071, 0x725e, 0x72b4, 0x72b5, 0x738e, 0x752a, 0x767f, 0x7a75, 0x7f51, 0x8278, 0x827c, 0x8280, 0x827d, 0x827f, 0x864d, 0x897e, 0x9099, 0x9097, 0x9098, 0x909b, 0x9094, 0x9622, 0x9624, 0x9620, 0x9623, 0x4f56, 0x4f3b, 0x4f62, 0x4f49, 0x4f53, 0x4f64, 0x4f3e, 0x4f67, 0x4f52, 0x4f5f, 0x4f41, 0x4f58, 0x4f2d, 0x4f33, 0x4f3f, 0x4f61, 0x518f, 0x51b9, 0x521c, 0x521e, 0x5221, 0x52ad, 0x52ae, 0x5309, 0x5363, 0x5372, 0x538e, 0x538f, 0x5430, 0x5437, 0x542a, 0x5454, 0x5445, 0x5419, 0x541c, 0x5425, 0x5418 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcaa1[ 94 ] = { 0x543d, 0x544f, 0x5441, 0x5428, 0x5424, 0x5447, 0x56ee, 0x56e7, 0x56e5, 0x5741, 0x5745, 0x574c, 0x5749, 0x574b, 0x5752, 0x5906, 0x5940, 0x59a6, 0x5998, 0x59a0, 0x5997, 0x598e, 0x59a2, 0x5990, 0x598f, 0x59a7, 0x59a1, 0x5b8e, 0x5b92, 0x5c28, 0x5c2a, 0x5c8d, 0x5c8f, 0x5c88, 0x5c8b, 0x5c89, 0x5c92, 0x5c8a, 0x5c86, 0x5c93, 0x5c95, 0x5de0, 0x5e0a, 0x5e0e, 0x5e8b, 0x5e89, 0x5e8c, 0x5e88, 0x5e8d, 0x5f05, 0x5f1d, 0x5f78, 0x5f76, 0x5fd2, 0x5fd1, 0x5fd0, 0x5fed, 0x5fe8, 0x5fee, 0x5ff3, 0x5fe1, 0x5fe4, 0x5fe3, 0x5ffa, 0x5fef, 0x5ff7, 0x5ffb, 0x6000, 0x5ff4, 0x623a, 0x6283, 0x628c, 0x628e, 0x628f, 0x6294, 0x6287, 0x6271, 0x627b, 0x627a, 0x6270, 0x6281, 0x6288, 0x6277, 0x627d, 0x6272, 0x6274, 0x6537, 0x65f0, 0x65f4, 0x65f3, 0x65f2, 0x65f5, 0x6745, 0x6747 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcb40[ 63 ] = { 0x6759, 0x6755, 0x674c, 0x6748, 0x675d, 0x674d, 0x675a, 0x674b, 0x6bd0, 0x6c19, 0x6c1a, 0x6c78, 0x6c67, 0x6c6b, 0x6c84, 0x6c8b, 0x6c8f, 0x6c71, 0x6c6f, 0x6c69, 0x6c9a, 0x6c6d, 0x6c87, 0x6c95, 0x6c9c, 0x6c66, 0x6c73, 0x6c65, 0x6c7b, 0x6c8e, 0x7074, 0x707a, 0x7263, 0x72bf, 0x72bd, 0x72c3, 0x72c6, 0x72c1, 0x72ba, 0x72c5, 0x7395, 0x7397, 0x7393, 0x7394, 0x7392, 0x753a, 0x7539, 0x7594, 0x7595, 0x7681, 0x793d, 0x8034, 0x8095, 0x8099, 0x8090, 0x8092, 0x809c, 0x8290, 0x828f, 0x8285, 0x828e, 0x8291, 0x8293 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcba1[ 94 ] = { 0x828a, 0x8283, 0x8284, 0x8c78, 0x8fc9, 0x8fbf, 0x909f, 0x90a1, 0x90a5, 0x909e, 0x90a7, 0x90a0, 0x9630, 0x9628, 0x962f, 0x962d, 0x4e33, 0x4f98, 0x4f7c, 0x4f85, 0x4f7d, 0x4f80, 0x4f87, 0x4f76, 0x4f74, 0x4f89, 0x4f84, 0x4f77, 0x4f4c, 0x4f97, 0x4f6a, 0x4f9a, 0x4f79, 0x4f81, 0x4f78, 0x4f90, 0x4f9c, 0x4f94, 0x4f9e, 0x4f92, 0x4f82, 0x4f95, 0x4f6b, 0x4f6e, 0x519e, 0x51bc, 0x51be, 0x5235, 0x5232, 0x5233, 0x5246, 0x5231, 0x52bc, 0x530a, 0x530b, 0x533c, 0x5392, 0x5394, 0x5487, 0x547f, 0x5481, 0x5491, 0x5482, 0x5488, 0x546b, 0x547a, 0x547e, 0x5465, 0x546c, 0x5474, 0x5466, 0x548d, 0x546f, 0x5461, 0x5460, 0x5498, 0x5463, 0x5467, 0x5464, 0x56f7, 0x56f9, 0x576f, 0x5772, 0x576d, 0x576b, 0x5771, 0x5770, 0x5776, 0x5780, 0x5775, 0x577b, 0x5773, 0x5774, 0x5762 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcc40[ 63 ] = { 0x5768, 0x577d, 0x590c, 0x5945, 0x59b5, 0x59ba, 0x59cf, 0x59ce, 0x59b2, 0x59cc, 0x59c1, 0x59b6, 0x59bc, 0x59c3, 0x59d6, 0x59b1, 0x59bd, 0x59c0, 0x59c8, 0x59b4, 0x59c7, 0x5b62, 0x5b65, 0x5b93, 0x5b95, 0x5c44, 0x5c47, 0x5cae, 0x5ca4, 0x5ca0, 0x5cb5, 0x5caf, 0x5ca8, 0x5cac, 0x5c9f, 0x5ca3, 0x5cad, 0x5ca2, 0x5caa, 0x5ca7, 0x5c9d, 0x5ca5, 0x5cb6, 0x5cb0, 0x5ca6, 0x5e17, 0x5e14, 0x5e19, 0x5f28, 0x5f22, 0x5f23, 0x5f24, 0x5f54, 0x5f82, 0x5f7e, 0x5f7d, 0x5fde, 0x5fe5, 0x602d, 0x6026, 0x6019, 0x6032, 0x600b }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcca1[ 94 ] = { 0x6034, 0x600a, 0x6017, 0x6033, 0x601a, 0x601e, 0x602c, 0x6022, 0x600d, 0x6010, 0x602e, 0x6013, 0x6011, 0x600c, 0x6009, 0x601c, 0x6214, 0x623d, 0x62ad, 0x62b4, 0x62d1, 0x62be, 0x62aa, 0x62b6, 0x62ca, 0x62ae, 0x62b3, 0x62af, 0x62bb, 0x62a9, 0x62b0, 0x62b8, 0x653d, 0x65a8, 0x65bb, 0x6609, 0x65fc, 0x6604, 0x6612, 0x6608, 0x65fb, 0x6603, 0x660b, 0x660d, 0x6605, 0x65fd, 0x6611, 0x6610, 0x66f6, 0x670a, 0x6785, 0x676c, 0x678e, 0x6792, 0x6776, 0x677b, 0x6798, 0x6786, 0x6784, 0x6774, 0x678d, 0x678c, 0x677a, 0x679f, 0x6791, 0x6799, 0x6783, 0x677d, 0x6781, 0x6778, 0x6779, 0x6794, 0x6b25, 0x6b80, 0x6b7e, 0x6bde, 0x6c1d, 0x6c93, 0x6cec, 0x6ceb, 0x6cee, 0x6cd9, 0x6cb6, 0x6cd4, 0x6cad, 0x6ce7, 0x6cb7, 0x6cd0, 0x6cc2, 0x6cba, 0x6cc3, 0x6cc6, 0x6ced, 0x6cf2 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcd40[ 63 ] = { 0x6cd2, 0x6cdd, 0x6cb4, 0x6c8a, 0x6c9d, 0x6c80, 0x6cde, 0x6cc0, 0x6d30, 0x6ccd, 0x6cc7, 0x6cb0, 0x6cf9, 0x6ccf, 0x6ce9, 0x6cd1, 0x7094, 0x7098, 0x7085, 0x7093, 0x7086, 0x7084, 0x7091, 0x7096, 0x7082, 0x709a, 0x7083, 0x726a, 0x72d6, 0x72cb, 0x72d8, 0x72c9, 0x72dc, 0x72d2, 0x72d4, 0x72da, 0x72cc, 0x72d1, 0x73a4, 0x73a1, 0x73ad, 0x73a6, 0x73a2, 0x73a0, 0x73ac, 0x739d, 0x74dd, 0x74e8, 0x753f, 0x7540, 0x753e, 0x758c, 0x7598, 0x76af, 0x76f3, 0x76f1, 0x76f0, 0x76f5, 0x77f8, 0x77fc, 0x77f9, 0x77fb, 0x77fa }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcda1[ 94 ] = { 0x77f7, 0x7942, 0x793f, 0x79c5, 0x7a78, 0x7a7b, 0x7afb, 0x7c75, 0x7cfd, 0x8035, 0x808f, 0x80ae, 0x80a3, 0x80b8, 0x80b5, 0x80ad, 0x8220, 0x82a0, 0x82c0, 0x82ab, 0x829a, 0x8298, 0x829b, 0x82b5, 0x82a7, 0x82ae, 0x82bc, 0x829e, 0x82ba, 0x82b4, 0x82a8, 0x82a1, 0x82a9, 0x82c2, 0x82a4, 0x82c3, 0x82b6, 0x82a2, 0x8670, 0x866f, 0x866d, 0x866e, 0x8c56, 0x8fd2, 0x8fcb, 0x8fd3, 0x8fcd, 0x8fd6, 0x8fd5, 0x8fd7, 0x90b2, 0x90b4, 0x90af, 0x90b3, 0x90b0, 0x9639, 0x963d, 0x963c, 0x963a, 0x9643, 0x4fcd, 0x4fc5, 0x4fd3, 0x4fb2, 0x4fc9, 0x4fcb, 0x4fc1, 0x4fd4, 0x4fdc, 0x4fd9, 0x4fbb, 0x4fb3, 0x4fdb, 0x4fc7, 0x4fd6, 0x4fba, 0x4fc0, 0x4fb9, 0x4fec, 0x5244, 0x5249, 0x52c0, 0x52c2, 0x533d, 0x537c, 0x5397, 0x5396, 0x5399, 0x5398, 0x54ba, 0x54a1, 0x54ad, 0x54a5, 0x54cf }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xce40[ 63 ] = { 0x54c3, 0x830d, 0x54b7, 0x54ae, 0x54d6, 0x54b6, 0x54c5, 0x54c6, 0x54a0, 0x5470, 0x54bc, 0x54a2, 0x54be, 0x5472, 0x54de, 0x54b0, 0x57b5, 0x579e, 0x579f, 0x57a4, 0x578c, 0x5797, 0x579d, 0x579b, 0x5794, 0x5798, 0x578f, 0x5799, 0x57a5, 0x579a, 0x5795, 0x58f4, 0x590d, 0x5953, 0x59e1, 0x59de, 0x59ee, 0x5a00, 0x59f1, 0x59dd, 0x59fa, 0x59fd, 0x59fc, 0x59f6, 0x59e4, 0x59f2, 0x59f7, 0x59db, 0x59e9, 0x59f3, 0x59f5, 0x59e0, 0x59fe, 0x59f4, 0x59ed, 0x5ba8, 0x5c4c, 0x5cd0, 0x5cd8, 0x5ccc, 0x5cd7, 0x5ccb, 0x5cdb }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcea1[ 94 ] = { 0x5cde, 0x5cda, 0x5cc9, 0x5cc7, 0x5cca, 0x5cd6, 0x5cd3, 0x5cd4, 0x5ccf, 0x5cc8, 0x5cc6, 0x5cce, 0x5cdf, 0x5cf8, 0x5df9, 0x5e21, 0x5e22, 0x5e23, 0x5e20, 0x5e24, 0x5eb0, 0x5ea4, 0x5ea2, 0x5e9b, 0x5ea3, 0x5ea5, 0x5f07, 0x5f2e, 0x5f56, 0x5f86, 0x6037, 0x6039, 0x6054, 0x6072, 0x605e, 0x6045, 0x6053, 0x6047, 0x6049, 0x605b, 0x604c, 0x6040, 0x6042, 0x605f, 0x6024, 0x6044, 0x6058, 0x6066, 0x606e, 0x6242, 0x6243, 0x62cf, 0x630d, 0x630b, 0x62f5, 0x630e, 0x6303, 0x62eb, 0x62f9, 0x630f, 0x630c, 0x62f8, 0x62f6, 0x6300, 0x6313, 0x6314, 0x62fa, 0x6315, 0x62fb, 0x62f0, 0x6541, 0x6543, 0x65aa, 0x65bf, 0x6636, 0x6621, 0x6632, 0x6635, 0x661c, 0x6626, 0x6622, 0x6633, 0x662b, 0x663a, 0x661d, 0x6634, 0x6639, 0x662e, 0x670f, 0x6710, 0x67c1, 0x67f2, 0x67c8, 0x67ba }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcf40[ 63 ] = { 0x67dc, 0x67bb, 0x67f8, 0x67d8, 0x67c0, 0x67b7, 0x67c5, 0x67eb, 0x67e4, 0x67df, 0x67b5, 0x67cd, 0x67b3, 0x67f7, 0x67f6, 0x67ee, 0x67e3, 0x67c2, 0x67b9, 0x67ce, 0x67e7, 0x67f0, 0x67b2, 0x67fc, 0x67c6, 0x67ed, 0x67cc, 0x67ae, 0x67e6, 0x67db, 0x67fa, 0x67c9, 0x67ca, 0x67c3, 0x67ea, 0x67cb, 0x6b28, 0x6b82, 0x6b84, 0x6bb6, 0x6bd6, 0x6bd8, 0x6be0, 0x6c20, 0x6c21, 0x6d28, 0x6d34, 0x6d2d, 0x6d1f, 0x6d3c, 0x6d3f, 0x6d12, 0x6d0a, 0x6cda, 0x6d33, 0x6d04, 0x6d19, 0x6d3a, 0x6d1a, 0x6d11, 0x6d00, 0x6d1d, 0x6d42 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcfa1[ 94 ] = { 0x6d01, 0x6d18, 0x6d37, 0x6d03, 0x6d0f, 0x6d40, 0x6d07, 0x6d20, 0x6d2c, 0x6d08, 0x6d22, 0x6d09, 0x6d10, 0x70b7, 0x709f, 0x70be, 0x70b1, 0x70b0, 0x70a1, 0x70b4, 0x70b5, 0x70a9, 0x7241, 0x7249, 0x724a, 0x726c, 0x7270, 0x7273, 0x726e, 0x72ca, 0x72e4, 0x72e8, 0x72eb, 0x72df, 0x72ea, 0x72e6, 0x72e3, 0x7385, 0x73cc, 0x73c2, 0x73c8, 0x73c5, 0x73b9, 0x73b6, 0x73b5, 0x73b4, 0x73eb, 0x73bf, 0x73c7, 0x73be, 0x73c3, 0x73c6, 0x73b8, 0x73cb, 0x74ec, 0x74ee, 0x752e, 0x7547, 0x7548, 0x75a7, 0x75aa, 0x7679, 0x76c4, 0x7708, 0x7703, 0x7704, 0x7705, 0x770a, 0x76f7, 0x76fb, 0x76fa, 0x77e7, 0x77e8, 0x7806, 0x7811, 0x7812, 0x7805, 0x7810, 0x780f, 0x780e, 0x7809, 0x7803, 0x7813, 0x794a, 0x794c, 0x794b, 0x7945, 0x7944, 0x79d5, 0x79cd, 0x79cf, 0x79d6, 0x79ce, 0x7a80 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd040[ 63 ] = { 0x7a7e, 0x7ad1, 0x7b00, 0x7b01, 0x7c7a, 0x7c78, 0x7c79, 0x7c7f, 0x7c80, 0x7c81, 0x7d03, 0x7d08, 0x7d01, 0x7f58, 0x7f91, 0x7f8d, 0x7fbe, 0x8007, 0x800e, 0x800f, 0x8014, 0x8037, 0x80d8, 0x80c7, 0x80e0, 0x80d1, 0x80c8, 0x80c2, 0x80d0, 0x80c5, 0x80e3, 0x80d9, 0x80dc, 0x80ca, 0x80d5, 0x80c9, 0x80cf, 0x80d7, 0x80e6, 0x80cd, 0x81ff, 0x8221, 0x8294, 0x82d9, 0x82fe, 0x82f9, 0x8307, 0x82e8, 0x8300, 0x82d5, 0x833a, 0x82eb, 0x82d6, 0x82f4, 0x82ec, 0x82e1, 0x82f2, 0x82f5, 0x830c, 0x82fb, 0x82f6, 0x82f0, 0x82ea }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd0a1[ 94 ] = { 0x82e4, 0x82e0, 0x82fa, 0x82f3, 0x82ed, 0x8677, 0x8674, 0x867c, 0x8673, 0x8841, 0x884e, 0x8867, 0x886a, 0x8869, 0x89d3, 0x8a04, 0x8a07, 0x8d72, 0x8fe3, 0x8fe1, 0x8fee, 0x8fe0, 0x90f1, 0x90bd, 0x90bf, 0x90d5, 0x90c5, 0x90be, 0x90c7, 0x90cb, 0x90c8, 0x91d4, 0x91d3, 0x9654, 0x964f, 0x9651, 0x9653, 0x964a, 0x964e, 0x501e, 0x5005, 0x5007, 0x5013, 0x5022, 0x5030, 0x501b, 0x4ff5, 0x4ff4, 0x5033, 0x5037, 0x502c, 0x4ff6, 0x4ff7, 0x5017, 0x501c, 0x5020, 0x5027, 0x5035, 0x502f, 0x5031, 0x500e, 0x515a, 0x5194, 0x5193, 0x51ca, 0x51c4, 0x51c5, 0x51c8, 0x51ce, 0x5261, 0x525a, 0x5252, 0x525e, 0x525f, 0x5255, 0x5262, 0x52cd, 0x530e, 0x539e, 0x5526, 0x54e2, 0x5517, 0x5512, 0x54e7, 0x54f3, 0x54e4, 0x551a, 0x54ff, 0x5504, 0x5508, 0x54eb, 0x5511, 0x5505, 0x54f1 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd140[ 63 ] = { 0x550a, 0x54fb, 0x54f7, 0x54f8, 0x54e0, 0x550e, 0x5503, 0x550b, 0x5701, 0x5702, 0x57cc, 0x5832, 0x57d5, 0x57d2, 0x57ba, 0x57c6, 0x57bd, 0x57bc, 0x57b8, 0x57b6, 0x57bf, 0x57c7, 0x57d0, 0x57b9, 0x57c1, 0x590e, 0x594a, 0x5a19, 0x5a16, 0x5a2d, 0x5a2e, 0x5a15, 0x5a0f, 0x5a17, 0x5a0a, 0x5a1e, 0x5a33, 0x5b6c, 0x5ba7, 0x5bad, 0x5bac, 0x5c03, 0x5c56, 0x5c54, 0x5cec, 0x5cff, 0x5cee, 0x5cf1, 0x5cf7, 0x5d00, 0x5cf9, 0x5e29, 0x5e28, 0x5ea8, 0x5eae, 0x5eaa, 0x5eac, 0x5f33, 0x5f30, 0x5f67, 0x605d, 0x605a, 0x6067 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd1a1[ 94 ] = { 0x6041, 0x60a2, 0x6088, 0x6080, 0x6092, 0x6081, 0x609d, 0x6083, 0x6095, 0x609b, 0x6097, 0x6087, 0x609c, 0x608e, 0x6219, 0x6246, 0x62f2, 0x6310, 0x6356, 0x632c, 0x6344, 0x6345, 0x6336, 0x6343, 0x63e4, 0x6339, 0x634b, 0x634a, 0x633c, 0x6329, 0x6341, 0x6334, 0x6358, 0x6354, 0x6359, 0x632d, 0x6347, 0x6333, 0x635a, 0x6351, 0x6338, 0x6357, 0x6340, 0x6348, 0x654a, 0x6546, 0x65c6, 0x65c3, 0x65c4, 0x65c2, 0x664a, 0x665f, 0x6647, 0x6651, 0x6712, 0x6713, 0x681f, 0x681a, 0x6849, 0x6832, 0x6833, 0x683b, 0x684b, 0x684f, 0x6816, 0x6831, 0x681c, 0x6835, 0x682b, 0x682d, 0x682f, 0x684e, 0x6844, 0x6834, 0x681d, 0x6812, 0x6814, 0x6826, 0x6828, 0x682e, 0x684d, 0x683a, 0x6825, 0x6820, 0x6b2c, 0x6b2f, 0x6b2d, 0x6b31, 0x6b34, 0x6b6d, 0x8082, 0x6b88, 0x6be6, 0x6be4 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd240[ 63 ] = { 0x6be8, 0x6be3, 0x6be2, 0x6be7, 0x6c25, 0x6d7a, 0x6d63, 0x6d64, 0x6d76, 0x6d0d, 0x6d61, 0x6d92, 0x6d58, 0x6d62, 0x6d6d, 0x6d6f, 0x6d91, 0x6d8d, 0x6def, 0x6d7f, 0x6d86, 0x6d5e, 0x6d67, 0x6d60, 0x6d97, 0x6d70, 0x6d7c, 0x6d5f, 0x6d82, 0x6d98, 0x6d2f, 0x6d68, 0x6d8b, 0x6d7e, 0x6d80, 0x6d84, 0x6d16, 0x6d83, 0x6d7b, 0x6d7d, 0x6d75, 0x6d90, 0x70dc, 0x70d3, 0x70d1, 0x70dd, 0x70cb, 0x7f39, 0x70e2, 0x70d7, 0x70d2, 0x70de, 0x70e0, 0x70d4, 0x70cd, 0x70c5, 0x70c6, 0x70c7, 0x70da, 0x70ce, 0x70e1, 0x7242, 0x7278 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd2a1[ 94 ] = { 0x7277, 0x7276, 0x7300, 0x72fa, 0x72f4, 0x72fe, 0x72f6, 0x72f3, 0x72fb, 0x7301, 0x73d3, 0x73d9, 0x73e5, 0x73d6, 0x73bc, 0x73e7, 0x73e3, 0x73e9, 0x73dc, 0x73d2, 0x73db, 0x73d4, 0x73dd, 0x73da, 0x73d7, 0x73d8, 0x73e8, 0x74de, 0x74df, 0x74f4, 0x74f5, 0x7521, 0x755b, 0x755f, 0x75b0, 0x75c1, 0x75bb, 0x75c4, 0x75c0, 0x75bf, 0x75b6, 0x75ba, 0x768a, 0x76c9, 0x771d, 0x771b, 0x7710, 0x7713, 0x7712, 0x7723, 0x7711, 0x7715, 0x7719, 0x771a, 0x7722, 0x7727, 0x7823, 0x782c, 0x7822, 0x7835, 0x782f, 0x7828, 0x782e, 0x782b, 0x7821, 0x7829, 0x7833, 0x782a, 0x7831, 0x7954, 0x795b, 0x794f, 0x795c, 0x7953, 0x7952, 0x7951, 0x79eb, 0x79ec, 0x79e0, 0x79ee, 0x79ed, 0x79ea, 0x79dc, 0x79de, 0x79dd, 0x7a86, 0x7a89, 0x7a85, 0x7a8b, 0x7a8c, 0x7a8a, 0x7a87, 0x7ad8, 0x7b10 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd340[ 63 ] = { 0x7b04, 0x7b13, 0x7b05, 0x7b0f, 0x7b08, 0x7b0a, 0x7b0e, 0x7b09, 0x7b12, 0x7c84, 0x7c91, 0x7c8a, 0x7c8c, 0x7c88, 0x7c8d, 0x7c85, 0x7d1e, 0x7d1d, 0x7d11, 0x7d0e, 0x7d18, 0x7d16, 0x7d13, 0x7d1f, 0x7d12, 0x7d0f, 0x7d0c, 0x7f5c, 0x7f61, 0x7f5e, 0x7f60, 0x7f5d, 0x7f5b, 0x7f96, 0x7f92, 0x7fc3, 0x7fc2, 0x7fc0, 0x8016, 0x803e, 0x8039, 0x80fa, 0x80f2, 0x80f9, 0x80f5, 0x8101, 0x80fb, 0x8100, 0x8201, 0x822f, 0x8225, 0x8333, 0x832d, 0x8344, 0x8319, 0x8351, 0x8325, 0x8356, 0x833f, 0x8341, 0x8326, 0x831c, 0x8322 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd3a1[ 94 ] = { 0x8342, 0x834e, 0x831b, 0x832a, 0x8308, 0x833c, 0x834d, 0x8316, 0x8324, 0x8320, 0x8337, 0x832f, 0x8329, 0x8347, 0x8345, 0x834c, 0x8353, 0x831e, 0x832c, 0x834b, 0x8327, 0x8348, 0x8653, 0x8652, 0x86a2, 0x86a8, 0x8696, 0x868d, 0x8691, 0x869e, 0x8687, 0x8697, 0x8686, 0x868b, 0x869a, 0x8685, 0x86a5, 0x8699, 0x86a1, 0x86a7, 0x8695, 0x8698, 0x868e, 0x869d, 0x8690, 0x8694, 0x8843, 0x8844, 0x886d, 0x8875, 0x8876, 0x8872, 0x8880, 0x8871, 0x887f, 0x886f, 0x8883, 0x887e, 0x8874, 0x887c, 0x8a12, 0x8c47, 0x8c57, 0x8c7b, 0x8ca4, 0x8ca3, 0x8d76, 0x8d78, 0x8db5, 0x8db7, 0x8db6, 0x8ed1, 0x8ed3, 0x8ffe, 0x8ff5, 0x9002, 0x8fff, 0x8ffb, 0x9004, 0x8ffc, 0x8ff6, 0x90d6, 0x90e0, 0x90d9, 0x90da, 0x90e3, 0x90df, 0x90e5, 0x90d8, 0x90db, 0x90d7, 0x90dc, 0x90e4, 0x9150 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd440[ 63 ] = { 0x914e, 0x914f, 0x91d5, 0x91e2, 0x91da, 0x965c, 0x965f, 0x96bc, 0x98e3, 0x9adf, 0x9b2f, 0x4e7f, 0x5070, 0x506a, 0x5061, 0x505e, 0x5060, 0x5053, 0x504b, 0x505d, 0x5072, 0x5048, 0x504d, 0x5041, 0x505b, 0x504a, 0x5062, 0x5015, 0x5045, 0x505f, 0x5069, 0x506b, 0x5063, 0x5064, 0x5046, 0x5040, 0x506e, 0x5073, 0x5057, 0x5051, 0x51d0, 0x526b, 0x526d, 0x526c, 0x526e, 0x52d6, 0x52d3, 0x532d, 0x539c, 0x5575, 0x5576, 0x553c, 0x554d, 0x5550, 0x5534, 0x552a, 0x5551, 0x5562, 0x5536, 0x5535, 0x5530, 0x5552, 0x5545 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd4a1[ 94 ] = { 0x550c, 0x5532, 0x5565, 0x554e, 0x5539, 0x5548, 0x552d, 0x553b, 0x5540, 0x554b, 0x570a, 0x5707, 0x57fb, 0x5814, 0x57e2, 0x57f6, 0x57dc, 0x57f4, 0x5800, 0x57ed, 0x57fd, 0x5808, 0x57f8, 0x580b, 0x57f3, 0x57cf, 0x5807, 0x57ee, 0x57e3, 0x57f2, 0x57e5, 0x57ec, 0x57e1, 0x580e, 0x57fc, 0x5810, 0x57e7, 0x5801, 0x580c, 0x57f1, 0x57e9, 0x57f0, 0x580d, 0x5804, 0x595c, 0x5a60, 0x5a58, 0x5a55, 0x5a67, 0x5a5e, 0x5a38, 0x5a35, 0x5a6d, 0x5a50, 0x5a5f, 0x5a65, 0x5a6c, 0x5a53, 0x5a64, 0x5a57, 0x5a43, 0x5a5d, 0x5a52, 0x5a44, 0x5a5b, 0x5a48, 0x5a8e, 0x5a3e, 0x5a4d, 0x5a39, 0x5a4c, 0x5a70, 0x5a69, 0x5a47, 0x5a51, 0x5a56, 0x5a42, 0x5a5c, 0x5b72, 0x5b6e, 0x5bc1, 0x5bc0, 0x5c59, 0x5d1e, 0x5d0b, 0x5d1d, 0x5d1a, 0x5d20, 0x5d0c, 0x5d28, 0x5d0d, 0x5d26, 0x5d25, 0x5d0f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd540[ 63 ] = { 0x5d30, 0x5d12, 0x5d23, 0x5d1f, 0x5d2e, 0x5e3e, 0x5e34, 0x5eb1, 0x5eb4, 0x5eb9, 0x5eb2, 0x5eb3, 0x5f36, 0x5f38, 0x5f9b, 0x5f96, 0x5f9f, 0x608a, 0x6090, 0x6086, 0x60be, 0x60b0, 0x60ba, 0x60d3, 0x60d4, 0x60cf, 0x60e4, 0x60d9, 0x60dd, 0x60c8, 0x60b1, 0x60db, 0x60b7, 0x60ca, 0x60bf, 0x60c3, 0x60cd, 0x60c0, 0x6332, 0x6365, 0x638a, 0x6382, 0x637d, 0x63bd, 0x639e, 0x63ad, 0x639d, 0x6397, 0x63ab, 0x638e, 0x636f, 0x6387, 0x6390, 0x636e, 0x63af, 0x6375, 0x639c, 0x636d, 0x63ae, 0x637c, 0x63a4, 0x633b, 0x639f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd5a1[ 94 ] = { 0x6378, 0x6385, 0x6381, 0x6391, 0x638d, 0x6370, 0x6553, 0x65cd, 0x6665, 0x6661, 0x665b, 0x6659, 0x665c, 0x6662, 0x6718, 0x6879, 0x6887, 0x6890, 0x689c, 0x686d, 0x686e, 0x68ae, 0x68ab, 0x6956, 0x686f, 0x68a3, 0x68ac, 0x68a9, 0x6875, 0x6874, 0x68b2, 0x688f, 0x6877, 0x6892, 0x687c, 0x686b, 0x6872, 0x68aa, 0x6880, 0x6871, 0x687e, 0x689b, 0x6896, 0x688b, 0x68a0, 0x6889, 0x68a4, 0x6878, 0x687b, 0x6891, 0x688c, 0x688a, 0x687d, 0x6b36, 0x6b33, 0x6b37, 0x6b38, 0x6b91, 0x6b8f, 0x6b8d, 0x6b8e, 0x6b8c, 0x6c2a, 0x6dc0, 0x6dab, 0x6db4, 0x6db3, 0x6e74, 0x6dac, 0x6de9, 0x6de2, 0x6db7, 0x6df6, 0x6dd4, 0x6e00, 0x6dc8, 0x6de0, 0x6ddf, 0x6dd6, 0x6dbe, 0x6de5, 0x6ddc, 0x6ddd, 0x6ddb, 0x6df4, 0x6dca, 0x6dbd, 0x6ded, 0x6df0, 0x6dba, 0x6dd5, 0x6dc2, 0x6dcf, 0x6dc9 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd640[ 63 ] = { 0x6dd0, 0x6df2, 0x6dd3, 0x6dfd, 0x6dd7, 0x6dcd, 0x6de3, 0x6dbb, 0x70fa, 0x710d, 0x70f7, 0x7117, 0x70f4, 0x710c, 0x70f0, 0x7104, 0x70f3, 0x7110, 0x70fc, 0x70ff, 0x7106, 0x7113, 0x7100, 0x70f8, 0x70f6, 0x710b, 0x7102, 0x710e, 0x727e, 0x727b, 0x727c, 0x727f, 0x731d, 0x7317, 0x7307, 0x7311, 0x7318, 0x730a, 0x7308, 0x72ff, 0x730f, 0x731e, 0x7388, 0x73f6, 0x73f8, 0x73f5, 0x7404, 0x7401, 0x73fd, 0x7407, 0x7400, 0x73fa, 0x73fc, 0x73ff, 0x740c, 0x740b, 0x73f4, 0x7408, 0x7564, 0x7563, 0x75ce, 0x75d2, 0x75cf }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd6a1[ 94 ] = { 0x75cb, 0x75cc, 0x75d1, 0x75d0, 0x768f, 0x7689, 0x76d3, 0x7739, 0x772f, 0x772d, 0x7731, 0x7732, 0x7734, 0x7733, 0x773d, 0x7725, 0x773b, 0x7735, 0x7848, 0x7852, 0x7849, 0x784d, 0x784a, 0x784c, 0x7826, 0x7845, 0x7850, 0x7964, 0x7967, 0x7969, 0x796a, 0x7963, 0x796b, 0x7961, 0x79bb, 0x79fa, 0x79f8, 0x79f6, 0x79f7, 0x7a8f, 0x7a94, 0x7a90, 0x7b35, 0x7b47, 0x7b34, 0x7b25, 0x7b30, 0x7b22, 0x7b24, 0x7b33, 0x7b18, 0x7b2a, 0x7b1d, 0x7b31, 0x7b2b, 0x7b2d, 0x7b2f, 0x7b32, 0x7b38, 0x7b1a, 0x7b23, 0x7c94, 0x7c98, 0x7c96, 0x7ca3, 0x7d35, 0x7d3d, 0x7d38, 0x7d36, 0x7d3a, 0x7d45, 0x7d2c, 0x7d29, 0x7d41, 0x7d47, 0x7d3e, 0x7d3f, 0x7d4a, 0x7d3b, 0x7d28, 0x7f63, 0x7f95, 0x7f9c, 0x7f9d, 0x7f9b, 0x7fca, 0x7fcb, 0x7fcd, 0x7fd0, 0x7fd1, 0x7fc7, 0x7fcf, 0x7fc9, 0x801f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd740[ 63 ] = { 0x801e, 0x801b, 0x8047, 0x8043, 0x8048, 0x8118, 0x8125, 0x8119, 0x811b, 0x812d, 0x811f, 0x812c, 0x811e, 0x8121, 0x8115, 0x8127, 0x811d, 0x8122, 0x8211, 0x8238, 0x8233, 0x823a, 0x8234, 0x8232, 0x8274, 0x8390, 0x83a3, 0x83a8, 0x838d, 0x837a, 0x8373, 0x83a4, 0x8374, 0x838f, 0x8381, 0x8395, 0x8399, 0x8375, 0x8394, 0x83a9, 0x837d, 0x8383, 0x838c, 0x839d, 0x839b, 0x83aa, 0x838b, 0x837e, 0x83a5, 0x83af, 0x8388, 0x8397, 0x83b0, 0x837f, 0x83a6, 0x8387, 0x83ae, 0x8376, 0x839a, 0x8659, 0x8656, 0x86bf, 0x86b7 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd7a1[ 94 ] = { 0x86c2, 0x86c1, 0x86c5, 0x86ba, 0x86b0, 0x86c8, 0x86b9, 0x86b3, 0x86b8, 0x86cc, 0x86b4, 0x86bb, 0x86bc, 0x86c3, 0x86bd, 0x86be, 0x8852, 0x8889, 0x8895, 0x88a8, 0x88a2, 0x88aa, 0x889a, 0x8891, 0x88a1, 0x889f, 0x8898, 0x88a7, 0x8899, 0x889b, 0x8897, 0x88a4, 0x88ac, 0x888c, 0x8893, 0x888e, 0x8982, 0x89d6, 0x89d9, 0x89d5, 0x8a30, 0x8a27, 0x8a2c, 0x8a1e, 0x8c39, 0x8c3b, 0x8c5c, 0x8c5d, 0x8c7d, 0x8ca5, 0x8d7d, 0x8d7b, 0x8d79, 0x8dbc, 0x8dc2, 0x8db9, 0x8dbf, 0x8dc1, 0x8ed8, 0x8ede, 0x8edd, 0x8edc, 0x8ed7, 0x8ee0, 0x8ee1, 0x9024, 0x900b, 0x9011, 0x901c, 0x900c, 0x9021, 0x90ef, 0x90ea, 0x90f0, 0x90f4, 0x90f2, 0x90f3, 0x90d4, 0x90eb, 0x90ec, 0x90e9, 0x9156, 0x9158, 0x915a, 0x9153, 0x9155, 0x91ec, 0x91f4, 0x91f1, 0x91f3, 0x91f8, 0x91e4, 0x91f9, 0x91ea }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd840[ 63 ] = { 0x91eb, 0x91f7, 0x91e8, 0x91ee, 0x957a, 0x9586, 0x9588, 0x967c, 0x966d, 0x966b, 0x9671, 0x966f, 0x96bf, 0x976a, 0x9804, 0x98e5, 0x9997, 0x509b, 0x5095, 0x5094, 0x509e, 0x508b, 0x50a3, 0x5083, 0x508c, 0x508e, 0x509d, 0x5068, 0x509c, 0x5092, 0x5082, 0x5087, 0x515f, 0x51d4, 0x5312, 0x5311, 0x53a4, 0x53a7, 0x5591, 0x55a8, 0x55a5, 0x55ad, 0x5577, 0x5645, 0x55a2, 0x5593, 0x5588, 0x558f, 0x55b5, 0x5581, 0x55a3, 0x5592, 0x55a4, 0x557d, 0x558c, 0x55a6, 0x557f, 0x5595, 0x55a1, 0x558e, 0x570c, 0x5829, 0x5837 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd8a1[ 94 ] = { 0x5819, 0x581e, 0x5827, 0x5823, 0x5828, 0x57f5, 0x5848, 0x5825, 0x581c, 0x581b, 0x5833, 0x583f, 0x5836, 0x582e, 0x5839, 0x5838, 0x582d, 0x582c, 0x583b, 0x5961, 0x5aaf, 0x5a94, 0x5a9f, 0x5a7a, 0x5aa2, 0x5a9e, 0x5a78, 0x5aa6, 0x5a7c, 0x5aa5, 0x5aac, 0x5a95, 0x5aae, 0x5a37, 0x5a84, 0x5a8a, 0x5a97, 0x5a83, 0x5a8b, 0x5aa9, 0x5a7b, 0x5a7d, 0x5a8c, 0x5a9c, 0x5a8f, 0x5a93, 0x5a9d, 0x5bea, 0x5bcd, 0x5bcb, 0x5bd4, 0x5bd1, 0x5bca, 0x5bce, 0x5c0c, 0x5c30, 0x5d37, 0x5d43, 0x5d6b, 0x5d41, 0x5d4b, 0x5d3f, 0x5d35, 0x5d51, 0x5d4e, 0x5d55, 0x5d33, 0x5d3a, 0x5d52, 0x5d3d, 0x5d31, 0x5d59, 0x5d42, 0x5d39, 0x5d49, 0x5d38, 0x5d3c, 0x5d32, 0x5d36, 0x5d40, 0x5d45, 0x5e44, 0x5e41, 0x5f58, 0x5fa6, 0x5fa5, 0x5fab, 0x60c9, 0x60b9, 0x60cc, 0x60e2, 0x60ce, 0x60c4, 0x6114 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd940[ 63 ] = { 0x60f2, 0x610a, 0x6116, 0x6105, 0x60f5, 0x6113, 0x60f8, 0x60fc, 0x60fe, 0x60c1, 0x6103, 0x6118, 0x611d, 0x6110, 0x60ff, 0x6104, 0x610b, 0x624a, 0x6394, 0x63b1, 0x63b0, 0x63ce, 0x63e5, 0x63e8, 0x63ef, 0x63c3, 0x649d, 0x63f3, 0x63ca, 0x63e0, 0x63f6, 0x63d5, 0x63f2, 0x63f5, 0x6461, 0x63df, 0x63be, 0x63dd, 0x63dc, 0x63c4, 0x63d8, 0x63d3, 0x63c2, 0x63c7, 0x63cc, 0x63cb, 0x63c8, 0x63f0, 0x63d7, 0x63d9, 0x6532, 0x6567, 0x656a, 0x6564, 0x655c, 0x6568, 0x6565, 0x658c, 0x659d, 0x659e, 0x65ae, 0x65d0, 0x65d2 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd9a1[ 94 ] = { 0x667c, 0x666c, 0x667b, 0x6680, 0x6671, 0x6679, 0x666a, 0x6672, 0x6701, 0x690c, 0x68d3, 0x6904, 0x68dc, 0x692a, 0x68ec, 0x68ea, 0x68f1, 0x690f, 0x68d6, 0x68f7, 0x68eb, 0x68e4, 0x68f6, 0x6913, 0x6910, 0x68f3, 0x68e1, 0x6907, 0x68cc, 0x6908, 0x6970, 0x68b4, 0x6911, 0x68ef, 0x68c6, 0x6914, 0x68f8, 0x68d0, 0x68fd, 0x68fc, 0x68e8, 0x690b, 0x690a, 0x6917, 0x68ce, 0x68c8, 0x68dd, 0x68de, 0x68e6, 0x68f4, 0x68d1, 0x6906, 0x68d4, 0x68e9, 0x6915, 0x6925, 0x68c7, 0x6b39, 0x6b3b, 0x6b3f, 0x6b3c, 0x6b94, 0x6b97, 0x6b99, 0x6b95, 0x6bbd, 0x6bf0, 0x6bf2, 0x6bf3, 0x6c30, 0x6dfc, 0x6e46, 0x6e47, 0x6e1f, 0x6e49, 0x6e88, 0x6e3c, 0x6e3d, 0x6e45, 0x6e62, 0x6e2b, 0x6e3f, 0x6e41, 0x6e5d, 0x6e73, 0x6e1c, 0x6e33, 0x6e4b, 0x6e40, 0x6e51, 0x6e3b, 0x6e03, 0x6e2e, 0x6e5e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xda40[ 63 ] = { 0x6e68, 0x6e5c, 0x6e61, 0x6e31, 0x6e28, 0x6e60, 0x6e71, 0x6e6b, 0x6e39, 0x6e22, 0x6e30, 0x6e53, 0x6e65, 0x6e27, 0x6e78, 0x6e64, 0x6e77, 0x6e55, 0x6e79, 0x6e52, 0x6e66, 0x6e35, 0x6e36, 0x6e5a, 0x7120, 0x711e, 0x712f, 0x70fb, 0x712e, 0x7131, 0x7123, 0x7125, 0x7122, 0x7132, 0x711f, 0x7128, 0x713a, 0x711b, 0x724b, 0x725a, 0x7288, 0x7289, 0x7286, 0x7285, 0x728b, 0x7312, 0x730b, 0x7330, 0x7322, 0x7331, 0x7333, 0x7327, 0x7332, 0x732d, 0x7326, 0x7323, 0x7335, 0x730c, 0x742e, 0x742c, 0x7430, 0x742b, 0x7416 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdaa1[ 94 ] = { 0x741a, 0x7421, 0x742d, 0x7431, 0x7424, 0x7423, 0x741d, 0x7429, 0x7420, 0x7432, 0x74fb, 0x752f, 0x756f, 0x756c, 0x75e7, 0x75da, 0x75e1, 0x75e6, 0x75dd, 0x75df, 0x75e4, 0x75d7, 0x7695, 0x7692, 0x76da, 0x7746, 0x7747, 0x7744, 0x774d, 0x7745, 0x774a, 0x774e, 0x774b, 0x774c, 0x77de, 0x77ec, 0x7860, 0x7864, 0x7865, 0x785c, 0x786d, 0x7871, 0x786a, 0x786e, 0x7870, 0x7869, 0x7868, 0x785e, 0x7862, 0x7974, 0x7973, 0x7972, 0x7970, 0x7a02, 0x7a0a, 0x7a03, 0x7a0c, 0x7a04, 0x7a99, 0x7ae6, 0x7ae4, 0x7b4a, 0x7b3b, 0x7b44, 0x7b48, 0x7b4c, 0x7b4e, 0x7b40, 0x7b58, 0x7b45, 0x7ca2, 0x7c9e, 0x7ca8, 0x7ca1, 0x7d58, 0x7d6f, 0x7d63, 0x7d53, 0x7d56, 0x7d67, 0x7d6a, 0x7d4f, 0x7d6d, 0x7d5c, 0x7d6b, 0x7d52, 0x7d54, 0x7d69, 0x7d51, 0x7d5f, 0x7d4e, 0x7f3e, 0x7f3f, 0x7f65 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdb40[ 63 ] = { 0x7f66, 0x7fa2, 0x7fa0, 0x7fa1, 0x7fd7, 0x8051, 0x804f, 0x8050, 0x80fe, 0x80d4, 0x8143, 0x814a, 0x8152, 0x814f, 0x8147, 0x813d, 0x814d, 0x813a, 0x81e6, 0x81ee, 0x81f7, 0x81f8, 0x81f9, 0x8204, 0x823c, 0x823d, 0x823f, 0x8275, 0x833b, 0x83cf, 0x83f9, 0x8423, 0x83c0, 0x83e8, 0x8412, 0x83e7, 0x83e4, 0x83fc, 0x83f6, 0x8410, 0x83c6, 0x83c8, 0x83eb, 0x83e3, 0x83bf, 0x8401, 0x83dd, 0x83e5, 0x83d8, 0x83ff, 0x83e1, 0x83cb, 0x83ce, 0x83d6, 0x83f5, 0x83c9, 0x8409, 0x840f, 0x83de, 0x8411, 0x8406, 0x83c2, 0x83f3 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdba1[ 94 ] = { 0x83d5, 0x83fa, 0x83c7, 0x83d1, 0x83ea, 0x8413, 0x83c3, 0x83ec, 0x83ee, 0x83c4, 0x83fb, 0x83d7, 0x83e2, 0x841b, 0x83db, 0x83fe, 0x86d8, 0x86e2, 0x86e6, 0x86d3, 0x86e3, 0x86da, 0x86ea, 0x86dd, 0x86eb, 0x86dc, 0x86ec, 0x86e9, 0x86d7, 0x86e8, 0x86d1, 0x8848, 0x8856, 0x8855, 0x88ba, 0x88d7, 0x88b9, 0x88b8, 0x88c0, 0x88be, 0x88b6, 0x88bc, 0x88b7, 0x88bd, 0x88b2, 0x8901, 0x88c9, 0x8995, 0x8998, 0x8997, 0x89dd, 0x89da, 0x89db, 0x8a4e, 0x8a4d, 0x8a39, 0x8a59, 0x8a40, 0x8a57, 0x8a58, 0x8a44, 0x8a45, 0x8a52, 0x8a48, 0x8a51, 0x8a4a, 0x8a4c, 0x8a4f, 0x8c5f, 0x8c81, 0x8c80, 0x8cba, 0x8cbe, 0x8cb0, 0x8cb9, 0x8cb5, 0x8d84, 0x8d80, 0x8d89, 0x8dd8, 0x8dd3, 0x8dcd, 0x8dc7, 0x8dd6, 0x8ddc, 0x8dcf, 0x8dd5, 0x8dd9, 0x8dc8, 0x8dd7, 0x8dc5, 0x8eef, 0x8ef7, 0x8efa }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdc40[ 63 ] = { 0x8ef9, 0x8ee6, 0x8eee, 0x8ee5, 0x8ef5, 0x8ee7, 0x8ee8, 0x8ef6, 0x8eeb, 0x8ef1, 0x8eec, 0x8ef4, 0x8ee9, 0x902d, 0x9034, 0x902f, 0x9106, 0x912c, 0x9104, 0x90ff, 0x90fc, 0x9108, 0x90f9, 0x90fb, 0x9101, 0x9100, 0x9107, 0x9105, 0x9103, 0x9161, 0x9164, 0x915f, 0x9162, 0x9160, 0x9201, 0x920a, 0x9225, 0x9203, 0x921a, 0x9226, 0x920f, 0x920c, 0x9200, 0x9212, 0x91ff, 0x91fd, 0x9206, 0x9204, 0x9227, 0x9202, 0x921c, 0x9224, 0x9219, 0x9217, 0x9205, 0x9216, 0x957b, 0x958d, 0x958c, 0x9590, 0x9687, 0x967e, 0x9688 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdca1[ 94 ] = { 0x9689, 0x9683, 0x9680, 0x96c2, 0x96c8, 0x96c3, 0x96f1, 0x96f0, 0x976c, 0x9770, 0x976e, 0x9807, 0x98a9, 0x98eb, 0x9ce6, 0x9ef9, 0x4e83, 0x4e84, 0x4eb6, 0x50bd, 0x50bf, 0x50c6, 0x50ae, 0x50c4, 0x50ca, 0x50b4, 0x50c8, 0x50c2, 0x50b0, 0x50c1, 0x50ba, 0x50b1, 0x50cb, 0x50c9, 0x50b6, 0x50b8, 0x51d7, 0x527a, 0x5278, 0x527b, 0x527c, 0x55c3, 0x55db, 0x55cc, 0x55d0, 0x55cb, 0x55ca, 0x55dd, 0x55c0, 0x55d4, 0x55c4, 0x55e9, 0x55bf, 0x55d2, 0x558d, 0x55cf, 0x55d5, 0x55e2, 0x55d6, 0x55c8, 0x55f2, 0x55cd, 0x55d9, 0x55c2, 0x5714, 0x5853, 0x5868, 0x5864, 0x584f, 0x584d, 0x5849, 0x586f, 0x5855, 0x584e, 0x585d, 0x5859, 0x5865, 0x585b, 0x583d, 0x5863, 0x5871, 0x58fc, 0x5ac7, 0x5ac4, 0x5acb, 0x5aba, 0x5ab8, 0x5ab1, 0x5ab5, 0x5ab0, 0x5abf, 0x5ac8, 0x5abb, 0x5ac6 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdd40[ 63 ] = { 0x5ab7, 0x5ac0, 0x5aca, 0x5ab4, 0x5ab6, 0x5acd, 0x5ab9, 0x5a90, 0x5bd6, 0x5bd8, 0x5bd9, 0x5c1f, 0x5c33, 0x5d71, 0x5d63, 0x5d4a, 0x5d65, 0x5d72, 0x5d6c, 0x5d5e, 0x5d68, 0x5d67, 0x5d62, 0x5df0, 0x5e4f, 0x5e4e, 0x5e4a, 0x5e4d, 0x5e4b, 0x5ec5, 0x5ecc, 0x5ec6, 0x5ecb, 0x5ec7, 0x5f40, 0x5faf, 0x5fad, 0x60f7, 0x6149, 0x614a, 0x612b, 0x6145, 0x6136, 0x6132, 0x612e, 0x6146, 0x612f, 0x614f, 0x6129, 0x6140, 0x6220, 0x9168, 0x6223, 0x6225, 0x6224, 0x63c5, 0x63f1, 0x63eb, 0x6410, 0x6412, 0x6409, 0x6420, 0x6424 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdda1[ 94 ] = { 0x6433, 0x6443, 0x641f, 0x6415, 0x6418, 0x6439, 0x6437, 0x6422, 0x6423, 0x640c, 0x6426, 0x6430, 0x6428, 0x6441, 0x6435, 0x642f, 0x640a, 0x641a, 0x6440, 0x6425, 0x6427, 0x640b, 0x63e7, 0x641b, 0x642e, 0x6421, 0x640e, 0x656f, 0x6592, 0x65d3, 0x6686, 0x668c, 0x6695, 0x6690, 0x668b, 0x668a, 0x6699, 0x6694, 0x6678, 0x6720, 0x6966, 0x695f, 0x6938, 0x694e, 0x6962, 0x6971, 0x693f, 0x6945, 0x696a, 0x6939, 0x6942, 0x6957, 0x6959, 0x697a, 0x6948, 0x6949, 0x6935, 0x696c, 0x6933, 0x693d, 0x6965, 0x68f0, 0x6978, 0x6934, 0x6969, 0x6940, 0x696f, 0x6944, 0x6976, 0x6958, 0x6941, 0x6974, 0x694c, 0x693b, 0x694b, 0x6937, 0x695c, 0x694f, 0x6951, 0x6932, 0x6952, 0x692f, 0x697b, 0x693c, 0x6b46, 0x6b45, 0x6b43, 0x6b42, 0x6b48, 0x6b41, 0x6b9b, 0xfa0d, 0x6bfb, 0x6bfc }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xde40[ 63 ] = { 0x6bf9, 0x6bf7, 0x6bf8, 0x6e9b, 0x6ed6, 0x6ec8, 0x6e8f, 0x6ec0, 0x6e9f, 0x6e93, 0x6e94, 0x6ea0, 0x6eb1, 0x6eb9, 0x6ec6, 0x6ed2, 0x6ebd, 0x6ec1, 0x6e9e, 0x6ec9, 0x6eb7, 0x6eb0, 0x6ecd, 0x6ea6, 0x6ecf, 0x6eb2, 0x6ebe, 0x6ec3, 0x6edc, 0x6ed8, 0x6e99, 0x6e92, 0x6e8e, 0x6e8d, 0x6ea4, 0x6ea1, 0x6ebf, 0x6eb3, 0x6ed0, 0x6eca, 0x6e97, 0x6eae, 0x6ea3, 0x7147, 0x7154, 0x7152, 0x7163, 0x7160, 0x7141, 0x715d, 0x7162, 0x7172, 0x7178, 0x716a, 0x7161, 0x7142, 0x7158, 0x7143, 0x714b, 0x7170, 0x715f, 0x7150, 0x7153 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdea1[ 94 ] = { 0x7144, 0x714d, 0x715a, 0x724f, 0x728d, 0x728c, 0x7291, 0x7290, 0x728e, 0x733c, 0x7342, 0x733b, 0x733a, 0x7340, 0x734a, 0x7349, 0x7444, 0x744a, 0x744b, 0x7452, 0x7451, 0x7457, 0x7440, 0x744f, 0x7450, 0x744e, 0x7442, 0x7446, 0x744d, 0x7454, 0x74e1, 0x74ff, 0x74fe, 0x74fd, 0x751d, 0x7579, 0x7577, 0x6983, 0x75ef, 0x760f, 0x7603, 0x75f7, 0x75fe, 0x75fc, 0x75f9, 0x75f8, 0x7610, 0x75fb, 0x75f6, 0x75ed, 0x75f5, 0x75fd, 0x7699, 0x76b5, 0x76dd, 0x7755, 0x775f, 0x7760, 0x7752, 0x7756, 0x775a, 0x7769, 0x7767, 0x7754, 0x7759, 0x776d, 0x77e0, 0x7887, 0x789a, 0x7894, 0x788f, 0x7884, 0x7895, 0x7885, 0x7886, 0x78a1, 0x7883, 0x7879, 0x7899, 0x7880, 0x7896, 0x787b, 0x797c, 0x7982, 0x797d, 0x7979, 0x7a11, 0x7a18, 0x7a19, 0x7a12, 0x7a17, 0x7a15, 0x7a22, 0x7a13 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdf40[ 63 ] = { 0x7a1b, 0x7a10, 0x7aa3, 0x7aa2, 0x7a9e, 0x7aeb, 0x7b66, 0x7b64, 0x7b6d, 0x7b74, 0x7b69, 0x7b72, 0x7b65, 0x7b73, 0x7b71, 0x7b70, 0x7b61, 0x7b78, 0x7b76, 0x7b63, 0x7cb2, 0x7cb4, 0x7caf, 0x7d88, 0x7d86, 0x7d80, 0x7d8d, 0x7d7f, 0x7d85, 0x7d7a, 0x7d8e, 0x7d7b, 0x7d83, 0x7d7c, 0x7d8c, 0x7d94, 0x7d84, 0x7d7d, 0x7d92, 0x7f6d, 0x7f6b, 0x7f67, 0x7f68, 0x7f6c, 0x7fa6, 0x7fa5, 0x7fa7, 0x7fdb, 0x7fdc, 0x8021, 0x8164, 0x8160, 0x8177, 0x815c, 0x8169, 0x815b, 0x8162, 0x8172, 0x6721, 0x815e, 0x8176, 0x8167, 0x816f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdfa1[ 94 ] = { 0x8144, 0x8161, 0x821d, 0x8249, 0x8244, 0x8240, 0x8242, 0x8245, 0x84f1, 0x843f, 0x8456, 0x8476, 0x8479, 0x848f, 0x848d, 0x8465, 0x8451, 0x8440, 0x8486, 0x8467, 0x8430, 0x844d, 0x847d, 0x845a, 0x8459, 0x8474, 0x8473, 0x845d, 0x8507, 0x845e, 0x8437, 0x843a, 0x8434, 0x847a, 0x8443, 0x8478, 0x8432, 0x8445, 0x8429, 0x83d9, 0x844b, 0x842f, 0x8442, 0x842d, 0x845f, 0x8470, 0x8439, 0x844e, 0x844c, 0x8452, 0x846f, 0x84c5, 0x848e, 0x843b, 0x8447, 0x8436, 0x8433, 0x8468, 0x847e, 0x8444, 0x842b, 0x8460, 0x8454, 0x846e, 0x8450, 0x870b, 0x8704, 0x86f7, 0x870c, 0x86fa, 0x86d6, 0x86f5, 0x874d, 0x86f8, 0x870e, 0x8709, 0x8701, 0x86f6, 0x870d, 0x8705, 0x88d6, 0x88cb, 0x88cd, 0x88ce, 0x88de, 0x88db, 0x88da, 0x88cc, 0x88d0, 0x8985, 0x899b, 0x89df, 0x89e5, 0x89e4 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe040[ 63 ] = { 0x89e1, 0x89e0, 0x89e2, 0x89dc, 0x89e6, 0x8a76, 0x8a86, 0x8a7f, 0x8a61, 0x8a3f, 0x8a77, 0x8a82, 0x8a84, 0x8a75, 0x8a83, 0x8a81, 0x8a74, 0x8a7a, 0x8c3c, 0x8c4b, 0x8c4a, 0x8c65, 0x8c64, 0x8c66, 0x8c86, 0x8c84, 0x8c85, 0x8ccc, 0x8d68, 0x8d69, 0x8d91, 0x8d8c, 0x8d8e, 0x8d8f, 0x8d8d, 0x8d93, 0x8d94, 0x8d90, 0x8d92, 0x8df0, 0x8de0, 0x8dec, 0x8df1, 0x8dee, 0x8dd0, 0x8de9, 0x8de3, 0x8de2, 0x8de7, 0x8df2, 0x8deb, 0x8df4, 0x8f06, 0x8eff, 0x8f01, 0x8f00, 0x8f05, 0x8f07, 0x8f08, 0x8f02, 0x8f0b, 0x9052, 0x903f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe0a1[ 94 ] = { 0x9044, 0x9049, 0x903d, 0x9110, 0x910d, 0x910f, 0x9111, 0x9116, 0x9114, 0x910b, 0x910e, 0x916e, 0x916f, 0x9248, 0x9252, 0x9230, 0x923a, 0x9266, 0x9233, 0x9265, 0x925e, 0x9283, 0x922e, 0x924a, 0x9246, 0x926d, 0x926c, 0x924f, 0x9260, 0x9267, 0x926f, 0x9236, 0x9261, 0x9270, 0x9231, 0x9254, 0x9263, 0x9250, 0x9272, 0x924e, 0x9253, 0x924c, 0x9256, 0x9232, 0x959f, 0x959c, 0x959e, 0x959b, 0x9692, 0x9693, 0x9691, 0x9697, 0x96ce, 0x96fa, 0x96fd, 0x96f8, 0x96f5, 0x9773, 0x9777, 0x9778, 0x9772, 0x980f, 0x980d, 0x980e, 0x98ac, 0x98f6, 0x98f9, 0x99af, 0x99b2, 0x99b0, 0x99b5, 0x9aad, 0x9aab, 0x9b5b, 0x9cea, 0x9ced, 0x9ce7, 0x9e80, 0x9efd, 0x50e6, 0x50d4, 0x50d7, 0x50e8, 0x50f3, 0x50db, 0x50ea, 0x50dd, 0x50e4, 0x50d3, 0x50ec, 0x50f0, 0x50ef, 0x50e3, 0x50e0 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe140[ 63 ] = { 0x51d8, 0x5280, 0x5281, 0x52e9, 0x52eb, 0x5330, 0x53ac, 0x5627, 0x5615, 0x560c, 0x5612, 0x55fc, 0x560f, 0x561c, 0x5601, 0x5613, 0x5602, 0x55fa, 0x561d, 0x5604, 0x55ff, 0x55f9, 0x5889, 0x587c, 0x5890, 0x5898, 0x5886, 0x5881, 0x587f, 0x5874, 0x588b, 0x587a, 0x5887, 0x5891, 0x588e, 0x5876, 0x5882, 0x5888, 0x587b, 0x5894, 0x588f, 0x58fe, 0x596b, 0x5adc, 0x5aee, 0x5ae5, 0x5ad5, 0x5aea, 0x5ada, 0x5aed, 0x5aeb, 0x5af3, 0x5ae2, 0x5ae0, 0x5adb, 0x5aec, 0x5ade, 0x5add, 0x5ad9, 0x5ae8, 0x5adf, 0x5b77, 0x5be0 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe1a1[ 94 ] = { 0x5be3, 0x5c63, 0x5d82, 0x5d80, 0x5d7d, 0x5d86, 0x5d7a, 0x5d81, 0x5d77, 0x5d8a, 0x5d89, 0x5d88, 0x5d7e, 0x5d7c, 0x5d8d, 0x5d79, 0x5d7f, 0x5e58, 0x5e59, 0x5e53, 0x5ed8, 0x5ed1, 0x5ed7, 0x5ece, 0x5edc, 0x5ed5, 0x5ed9, 0x5ed2, 0x5ed4, 0x5f44, 0x5f43, 0x5f6f, 0x5fb6, 0x612c, 0x6128, 0x6141, 0x615e, 0x6171, 0x6173, 0x6152, 0x6153, 0x6172, 0x616c, 0x6180, 0x6174, 0x6154, 0x617a, 0x615b, 0x6165, 0x613b, 0x616a, 0x6161, 0x6156, 0x6229, 0x6227, 0x622b, 0x642b, 0x644d, 0x645b, 0x645d, 0x6474, 0x6476, 0x6472, 0x6473, 0x647d, 0x6475, 0x6466, 0x64a6, 0x644e, 0x6482, 0x645e, 0x645c, 0x644b, 0x6453, 0x6460, 0x6450, 0x647f, 0x643f, 0x646c, 0x646b, 0x6459, 0x6465, 0x6477, 0x6573, 0x65a0, 0x66a1, 0x66a0, 0x669f, 0x6705, 0x6704, 0x6722, 0x69b1, 0x69b6, 0x69c9 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe240[ 63 ] = { 0x69a0, 0x69ce, 0x6996, 0x69b0, 0x69ac, 0x69bc, 0x6991, 0x6999, 0x698e, 0x69a7, 0x698d, 0x69a9, 0x69be, 0x69af, 0x69bf, 0x69c4, 0x69bd, 0x69a4, 0x69d4, 0x69b9, 0x69ca, 0x699a, 0x69cf, 0x69b3, 0x6993, 0x69aa, 0x69a1, 0x699e, 0x69d9, 0x6997, 0x6990, 0x69c2, 0x69b5, 0x69a5, 0x69c6, 0x6b4a, 0x6b4d, 0x6b4b, 0x6b9e, 0x6b9f, 0x6ba0, 0x6bc3, 0x6bc4, 0x6bfe, 0x6ece, 0x6ef5, 0x6ef1, 0x6f03, 0x6f25, 0x6ef8, 0x6f37, 0x6efb, 0x6f2e, 0x6f09, 0x6f4e, 0x6f19, 0x6f1a, 0x6f27, 0x6f18, 0x6f3b, 0x6f12, 0x6eed, 0x6f0a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe2a1[ 94 ] = { 0x6f36, 0x6f73, 0x6ef9, 0x6eee, 0x6f2d, 0x6f40, 0x6f30, 0x6f3c, 0x6f35, 0x6eeb, 0x6f07, 0x6f0e, 0x6f43, 0x6f05, 0x6efd, 0x6ef6, 0x6f39, 0x6f1c, 0x6efc, 0x6f3a, 0x6f1f, 0x6f0d, 0x6f1e, 0x6f08, 0x6f21, 0x7187, 0x7190, 0x7189, 0x7180, 0x7185, 0x7182, 0x718f, 0x717b, 0x7186, 0x7181, 0x7197, 0x7244, 0x7253, 0x7297, 0x7295, 0x7293, 0x7343, 0x734d, 0x7351, 0x734c, 0x7462, 0x7473, 0x7471, 0x7475, 0x7472, 0x7467, 0x746e, 0x7500, 0x7502, 0x7503, 0x757d, 0x7590, 0x7616, 0x7608, 0x760c, 0x7615, 0x7611, 0x760a, 0x7614, 0x76b8, 0x7781, 0x777c, 0x7785, 0x7782, 0x776e, 0x7780, 0x776f, 0x777e, 0x7783, 0x78b2, 0x78aa, 0x78b4, 0x78ad, 0x78a8, 0x787e, 0x78ab, 0x789e, 0x78a5, 0x78a0, 0x78ac, 0x78a2, 0x78a4, 0x7998, 0x798a, 0x798b, 0x7996, 0x7995, 0x7994, 0x7993 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe340[ 63 ] = { 0x7997, 0x7988, 0x7992, 0x7990, 0x7a2b, 0x7a4a, 0x7a30, 0x7a2f, 0x7a28, 0x7a26, 0x7aa8, 0x7aab, 0x7aac, 0x7aee, 0x7b88, 0x7b9c, 0x7b8a, 0x7b91, 0x7b90, 0x7b96, 0x7b8d, 0x7b8c, 0x7b9b, 0x7b8e, 0x7b85, 0x7b98, 0x5284, 0x7b99, 0x7ba4, 0x7b82, 0x7cbb, 0x7cbf, 0x7cbc, 0x7cba, 0x7da7, 0x7db7, 0x7dc2, 0x7da3, 0x7daa, 0x7dc1, 0x7dc0, 0x7dc5, 0x7d9d, 0x7dce, 0x7dc4, 0x7dc6, 0x7dcb, 0x7dcc, 0x7daf, 0x7db9, 0x7d96, 0x7dbc, 0x7d9f, 0x7da6, 0x7dae, 0x7da9, 0x7da1, 0x7dc9, 0x7f73, 0x7fe2, 0x7fe3, 0x7fe5, 0x7fde }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe3a1[ 94 ] = { 0x8024, 0x805d, 0x805c, 0x8189, 0x8186, 0x8183, 0x8187, 0x818d, 0x818c, 0x818b, 0x8215, 0x8497, 0x84a4, 0x84a1, 0x849f, 0x84ba, 0x84ce, 0x84c2, 0x84ac, 0x84ae, 0x84ab, 0x84b9, 0x84b4, 0x84c1, 0x84cd, 0x84aa, 0x849a, 0x84b1, 0x84d0, 0x849d, 0x84a7, 0x84bb, 0x84a2, 0x8494, 0x84c7, 0x84cc, 0x849b, 0x84a9, 0x84af, 0x84a8, 0x84d6, 0x8498, 0x84b6, 0x84cf, 0x84a0, 0x84d7, 0x84d4, 0x84d2, 0x84db, 0x84b0, 0x8491, 0x8661, 0x8733, 0x8723, 0x8728, 0x876b, 0x8740, 0x872e, 0x871e, 0x8721, 0x8719, 0x871b, 0x8743, 0x872c, 0x8741, 0x873e, 0x8746, 0x8720, 0x8732, 0x872a, 0x872d, 0x873c, 0x8712, 0x873a, 0x8731, 0x8735, 0x8742, 0x8726, 0x8727, 0x8738, 0x8724, 0x871a, 0x8730, 0x8711, 0x88f7, 0x88e7, 0x88f1, 0x88f2, 0x88fa, 0x88fe, 0x88ee, 0x88fc, 0x88f6, 0x88fb }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe440[ 63 ] = { 0x88f0, 0x88ec, 0x88eb, 0x899d, 0x89a1, 0x899f, 0x899e, 0x89e9, 0x89eb, 0x89e8, 0x8aab, 0x8a99, 0x8a8b, 0x8a92, 0x8a8f, 0x8a96, 0x8c3d, 0x8c68, 0x8c69, 0x8cd5, 0x8ccf, 0x8cd7, 0x8d96, 0x8e09, 0x8e02, 0x8dff, 0x8e0d, 0x8dfd, 0x8e0a, 0x8e03, 0x8e07, 0x8e06, 0x8e05, 0x8dfe, 0x8e00, 0x8e04, 0x8f10, 0x8f11, 0x8f0e, 0x8f0d, 0x9123, 0x911c, 0x9120, 0x9122, 0x911f, 0x911d, 0x911a, 0x9124, 0x9121, 0x911b, 0x917a, 0x9172, 0x9179, 0x9173, 0x92a5, 0x92a4, 0x9276, 0x929b, 0x927a, 0x92a0, 0x9294, 0x92aa, 0x928d }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe4a1[ 94 ] = { 0x92a6, 0x929a, 0x92ab, 0x9279, 0x9297, 0x927f, 0x92a3, 0x92ee, 0x928e, 0x9282, 0x9295, 0x92a2, 0x927d, 0x9288, 0x92a1, 0x928a, 0x9286, 0x928c, 0x9299, 0x92a7, 0x927e, 0x9287, 0x92a9, 0x929d, 0x928b, 0x922d, 0x969e, 0x96a1, 0x96ff, 0x9758, 0x977d, 0x977a, 0x977e, 0x9783, 0x9780, 0x9782, 0x977b, 0x9784, 0x9781, 0x977f, 0x97ce, 0x97cd, 0x9816, 0x98ad, 0x98ae, 0x9902, 0x9900, 0x9907, 0x999d, 0x999c, 0x99c3, 0x99b9, 0x99bb, 0x99ba, 0x99c2, 0x99bd, 0x99c7, 0x9ab1, 0x9ae3, 0x9ae7, 0x9b3e, 0x9b3f, 0x9b60, 0x9b61, 0x9b5f, 0x9cf1, 0x9cf2, 0x9cf5, 0x9ea7, 0x50ff, 0x5103, 0x5130, 0x50f8, 0x5106, 0x5107, 0x50f6, 0x50fe, 0x510b, 0x510c, 0x50fd, 0x510a, 0x528b, 0x528c, 0x52f1, 0x52ef, 0x5648, 0x5642, 0x564c, 0x5635, 0x5641, 0x564a, 0x5649, 0x5646, 0x5658 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe540[ 63 ] = { 0x565a, 0x5640, 0x5633, 0x563d, 0x562c, 0x563e, 0x5638, 0x562a, 0x563a, 0x571a, 0x58ab, 0x589d, 0x58b1, 0x58a0, 0x58a3, 0x58af, 0x58ac, 0x58a5, 0x58a1, 0x58ff, 0x5aff, 0x5af4, 0x5afd, 0x5af7, 0x5af6, 0x5b03, 0x5af8, 0x5b02, 0x5af9, 0x5b01, 0x5b07, 0x5b05, 0x5b0f, 0x5c67, 0x5d99, 0x5d97, 0x5d9f, 0x5d92, 0x5da2, 0x5d93, 0x5d95, 0x5da0, 0x5d9c, 0x5da1, 0x5d9a, 0x5d9e, 0x5e69, 0x5e5d, 0x5e60, 0x5e5c, 0x7df3, 0x5edb, 0x5ede, 0x5ee1, 0x5f49, 0x5fb2, 0x618b, 0x6183, 0x6179, 0x61b1, 0x61b0, 0x61a2, 0x6189 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe5a1[ 94 ] = { 0x619b, 0x6193, 0x61af, 0x61ad, 0x619f, 0x6192, 0x61aa, 0x61a1, 0x618d, 0x6166, 0x61b3, 0x622d, 0x646e, 0x6470, 0x6496, 0x64a0, 0x6485, 0x6497, 0x649c, 0x648f, 0x648b, 0x648a, 0x648c, 0x64a3, 0x649f, 0x6468, 0x64b1, 0x6498, 0x6576, 0x657a, 0x6579, 0x657b, 0x65b2, 0x65b3, 0x66b5, 0x66b0, 0x66a9, 0x66b2, 0x66b7, 0x66aa, 0x66af, 0x6a00, 0x6a06, 0x6a17, 0x69e5, 0x69f8, 0x6a15, 0x69f1, 0x69e4, 0x6a20, 0x69ff, 0x69ec, 0x69e2, 0x6a1b, 0x6a1d, 0x69fe, 0x6a27, 0x69f2, 0x69ee, 0x6a14, 0x69f7, 0x69e7, 0x6a40, 0x6a08, 0x69e6, 0x69fb, 0x6a0d, 0x69fc, 0x69eb, 0x6a09, 0x6a04, 0x6a18, 0x6a25, 0x6a0f, 0x69f6, 0x6a26, 0x6a07, 0x69f4, 0x6a16, 0x6b51, 0x6ba5, 0x6ba3, 0x6ba2, 0x6ba6, 0x6c01, 0x6c00, 0x6bff, 0x6c02, 0x6f41, 0x6f26, 0x6f7e, 0x6f87, 0x6fc6, 0x6f92 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe640[ 63 ] = { 0x6f8d, 0x6f89, 0x6f8c, 0x6f62, 0x6f4f, 0x6f85, 0x6f5a, 0x6f96, 0x6f76, 0x6f6c, 0x6f82, 0x6f55, 0x6f72, 0x6f52, 0x6f50, 0x6f57, 0x6f94, 0x6f93, 0x6f5d, 0x6f00, 0x6f61, 0x6f6b, 0x6f7d, 0x6f67, 0x6f90, 0x6f53, 0x6f8b, 0x6f69, 0x6f7f, 0x6f95, 0x6f63, 0x6f77, 0x6f6a, 0x6f7b, 0x71b2, 0x71af, 0x719b, 0x71b0, 0x71a0, 0x719a, 0x71a9, 0x71b5, 0x719d, 0x71a5, 0x719e, 0x71a4, 0x71a1, 0x71aa, 0x719c, 0x71a7, 0x71b3, 0x7298, 0x729a, 0x7358, 0x7352, 0x735e, 0x735f, 0x7360, 0x735d, 0x735b, 0x7361, 0x735a, 0x7359 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe6a1[ 94 ] = { 0x7362, 0x7487, 0x7489, 0x748a, 0x7486, 0x7481, 0x747d, 0x7485, 0x7488, 0x747c, 0x7479, 0x7508, 0x7507, 0x757e, 0x7625, 0x761e, 0x7619, 0x761d, 0x761c, 0x7623, 0x761a, 0x7628, 0x761b, 0x769c, 0x769d, 0x769e, 0x769b, 0x778d, 0x778f, 0x7789, 0x7788, 0x78cd, 0x78bb, 0x78cf, 0x78cc, 0x78d1, 0x78ce, 0x78d4, 0x78c8, 0x78c3, 0x78c4, 0x78c9, 0x799a, 0x79a1, 0x79a0, 0x799c, 0x79a2, 0x799b, 0x6b76, 0x7a39, 0x7ab2, 0x7ab4, 0x7ab3, 0x7bb7, 0x7bcb, 0x7bbe, 0x7bac, 0x7bce, 0x7baf, 0x7bb9, 0x7bca, 0x7bb5, 0x7cc5, 0x7cc8, 0x7ccc, 0x7ccb, 0x7df7, 0x7ddb, 0x7dea, 0x7de7, 0x7dd7, 0x7de1, 0x7e03, 0x7dfa, 0x7de6, 0x7df6, 0x7df1, 0x7df0, 0x7dee, 0x7ddf, 0x7f76, 0x7fac, 0x7fb0, 0x7fad, 0x7fed, 0x7feb, 0x7fea, 0x7fec, 0x7fe6, 0x7fe8, 0x8064, 0x8067, 0x81a3, 0x819f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe740[ 63 ] = { 0x819e, 0x8195, 0x81a2, 0x8199, 0x8197, 0x8216, 0x824f, 0x8253, 0x8252, 0x8250, 0x824e, 0x8251, 0x8524, 0x853b, 0x850f, 0x8500, 0x8529, 0x850e, 0x8509, 0x850d, 0x851f, 0x850a, 0x8527, 0x851c, 0x84fb, 0x852b, 0x84fa, 0x8508, 0x850c, 0x84f4, 0x852a, 0x84f2, 0x8515, 0x84f7, 0x84eb, 0x84f3, 0x84fc, 0x8512, 0x84ea, 0x84e9, 0x8516, 0x84fe, 0x8528, 0x851d, 0x852e, 0x8502, 0x84fd, 0x851e, 0x84f6, 0x8531, 0x8526, 0x84e7, 0x84e8, 0x84f0, 0x84ef, 0x84f9, 0x8518, 0x8520, 0x8530, 0x850b, 0x8519, 0x852f, 0x8662 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe7a1[ 94 ] = { 0x8756, 0x8763, 0x8764, 0x8777, 0x87e1, 0x8773, 0x8758, 0x8754, 0x875b, 0x8752, 0x8761, 0x875a, 0x8751, 0x875e, 0x876d, 0x876a, 0x8750, 0x874e, 0x875f, 0x875d, 0x876f, 0x876c, 0x877a, 0x876e, 0x875c, 0x8765, 0x874f, 0x877b, 0x8775, 0x8762, 0x8767, 0x8769, 0x885a, 0x8905, 0x890c, 0x8914, 0x890b, 0x8917, 0x8918, 0x8919, 0x8906, 0x8916, 0x8911, 0x890e, 0x8909, 0x89a2, 0x89a4, 0x89a3, 0x89ed, 0x89f0, 0x89ec, 0x8acf, 0x8ac6, 0x8ab8, 0x8ad3, 0x8ad1, 0x8ad4, 0x8ad5, 0x8abb, 0x8ad7, 0x8abe, 0x8ac0, 0x8ac5, 0x8ad8, 0x8ac3, 0x8aba, 0x8abd, 0x8ad9, 0x8c3e, 0x8c4d, 0x8c8f, 0x8ce5, 0x8cdf, 0x8cd9, 0x8ce8, 0x8cda, 0x8cdd, 0x8ce7, 0x8da0, 0x8d9c, 0x8da1, 0x8d9b, 0x8e20, 0x8e23, 0x8e25, 0x8e24, 0x8e2e, 0x8e15, 0x8e1b, 0x8e16, 0x8e11, 0x8e19, 0x8e26, 0x8e27 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe840[ 63 ] = { 0x8e14, 0x8e12, 0x8e18, 0x8e13, 0x8e1c, 0x8e17, 0x8e1a, 0x8f2c, 0x8f24, 0x8f18, 0x8f1a, 0x8f20, 0x8f23, 0x8f16, 0x8f17, 0x9073, 0x9070, 0x906f, 0x9067, 0x906b, 0x912f, 0x912b, 0x9129, 0x912a, 0x9132, 0x9126, 0x912e, 0x9185, 0x9186, 0x918a, 0x9181, 0x9182, 0x9184, 0x9180, 0x92d0, 0x92c3, 0x92c4, 0x92c0, 0x92d9, 0x92b6, 0x92cf, 0x92f1, 0x92df, 0x92d8, 0x92e9, 0x92d7, 0x92dd, 0x92cc, 0x92ef, 0x92c2, 0x92e8, 0x92ca, 0x92c8, 0x92ce, 0x92e6, 0x92cd, 0x92d5, 0x92c9, 0x92e0, 0x92de, 0x92e7, 0x92d1, 0x92d3 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe8a1[ 94 ] = { 0x92b5, 0x92e1, 0x92c6, 0x92b4, 0x957c, 0x95ac, 0x95ab, 0x95ae, 0x95b0, 0x96a4, 0x96a2, 0x96d3, 0x9705, 0x9708, 0x9702, 0x975a, 0x978a, 0x978e, 0x9788, 0x97d0, 0x97cf, 0x981e, 0x981d, 0x9826, 0x9829, 0x9828, 0x9820, 0x981b, 0x9827, 0x98b2, 0x9908, 0x98fa, 0x9911, 0x9914, 0x9916, 0x9917, 0x9915, 0x99dc, 0x99cd, 0x99cf, 0x99d3, 0x99d4, 0x99ce, 0x99c9, 0x99d6, 0x99d8, 0x99cb, 0x99d7, 0x99cc, 0x9ab3, 0x9aec, 0x9aeb, 0x9af3, 0x9af2, 0x9af1, 0x9b46, 0x9b43, 0x9b67, 0x9b74, 0x9b71, 0x9b66, 0x9b76, 0x9b75, 0x9b70, 0x9b68, 0x9b64, 0x9b6c, 0x9cfc, 0x9cfa, 0x9cfd, 0x9cff, 0x9cf7, 0x9d07, 0x9d00, 0x9cf9, 0x9cfb, 0x9d08, 0x9d05, 0x9d04, 0x9e83, 0x9ed3, 0x9f0f, 0x9f10, 0x511c, 0x5113, 0x5117, 0x511a, 0x5111, 0x51de, 0x5334, 0x53e1, 0x5670, 0x5660, 0x566e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe940[ 63 ] = { 0x5673, 0x5666, 0x5663, 0x566d, 0x5672, 0x565e, 0x5677, 0x571c, 0x571b, 0x58c8, 0x58bd, 0x58c9, 0x58bf, 0x58ba, 0x58c2, 0x58bc, 0x58c6, 0x5b17, 0x5b19, 0x5b1b, 0x5b21, 0x5b14, 0x5b13, 0x5b10, 0x5b16, 0x5b28, 0x5b1a, 0x5b20, 0x5b1e, 0x5bef, 0x5dac, 0x5db1, 0x5da9, 0x5da7, 0x5db5, 0x5db0, 0x5dae, 0x5daa, 0x5da8, 0x5db2, 0x5dad, 0x5daf, 0x5db4, 0x5e67, 0x5e68, 0x5e66, 0x5e6f, 0x5ee9, 0x5ee7, 0x5ee6, 0x5ee8, 0x5ee5, 0x5f4b, 0x5fbc, 0x619d, 0x61a8, 0x6196, 0x61c5, 0x61b4, 0x61c6, 0x61c1, 0x61cc, 0x61ba }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe9a1[ 94 ] = { 0x61bf, 0x61b8, 0x618c, 0x64d7, 0x64d6, 0x64d0, 0x64cf, 0x64c9, 0x64bd, 0x6489, 0x64c3, 0x64db, 0x64f3, 0x64d9, 0x6533, 0x657f, 0x657c, 0x65a2, 0x66c8, 0x66be, 0x66c0, 0x66ca, 0x66cb, 0x66cf, 0x66bd, 0x66bb, 0x66ba, 0x66cc, 0x6723, 0x6a34, 0x6a66, 0x6a49, 0x6a67, 0x6a32, 0x6a68, 0x6a3e, 0x6a5d, 0x6a6d, 0x6a76, 0x6a5b, 0x6a51, 0x6a28, 0x6a5a, 0x6a3b, 0x6a3f, 0x6a41, 0x6a6a, 0x6a64, 0x6a50, 0x6a4f, 0x6a54, 0x6a6f, 0x6a69, 0x6a60, 0x6a3c, 0x6a5e, 0x6a56, 0x6a55, 0x6a4d, 0x6a4e, 0x6a46, 0x6b55, 0x6b54, 0x6b56, 0x6ba7, 0x6baa, 0x6bab, 0x6bc8, 0x6bc7, 0x6c04, 0x6c03, 0x6c06, 0x6fad, 0x6fcb, 0x6fa3, 0x6fc7, 0x6fbc, 0x6fce, 0x6fc8, 0x6f5e, 0x6fc4, 0x6fbd, 0x6f9e, 0x6fca, 0x6fa8, 0x7004, 0x6fa5, 0x6fae, 0x6fba, 0x6fac, 0x6faa, 0x6fcf, 0x6fbf, 0x6fb8 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xea40[ 63 ] = { 0x6fa2, 0x6fc9, 0x6fab, 0x6fcd, 0x6faf, 0x6fb2, 0x6fb0, 0x71c5, 0x71c2, 0x71bf, 0x71b8, 0x71d6, 0x71c0, 0x71c1, 0x71cb, 0x71d4, 0x71ca, 0x71c7, 0x71cf, 0x71bd, 0x71d8, 0x71bc, 0x71c6, 0x71da, 0x71db, 0x729d, 0x729e, 0x7369, 0x7366, 0x7367, 0x736c, 0x7365, 0x736b, 0x736a, 0x747f, 0x749a, 0x74a0, 0x7494, 0x7492, 0x7495, 0x74a1, 0x750b, 0x7580, 0x762f, 0x762d, 0x7631, 0x763d, 0x7633, 0x763c, 0x7635, 0x7632, 0x7630, 0x76bb, 0x76e6, 0x779a, 0x779d, 0x77a1, 0x779c, 0x779b, 0x77a2, 0x77a3, 0x7795, 0x7799 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeaa1[ 94 ] = { 0x7797, 0x78dd, 0x78e9, 0x78e5, 0x78ea, 0x78de, 0x78e3, 0x78db, 0x78e1, 0x78e2, 0x78ed, 0x78df, 0x78e0, 0x79a4, 0x7a44, 0x7a48, 0x7a47, 0x7ab6, 0x7ab8, 0x7ab5, 0x7ab1, 0x7ab7, 0x7bde, 0x7be3, 0x7be7, 0x7bdd, 0x7bd5, 0x7be5, 0x7bda, 0x7be8, 0x7bf9, 0x7bd4, 0x7bea, 0x7be2, 0x7bdc, 0x7beb, 0x7bd8, 0x7bdf, 0x7cd2, 0x7cd4, 0x7cd7, 0x7cd0, 0x7cd1, 0x7e12, 0x7e21, 0x7e17, 0x7e0c, 0x7e1f, 0x7e20, 0x7e13, 0x7e0e, 0x7e1c, 0x7e15, 0x7e1a, 0x7e22, 0x7e0b, 0x7e0f, 0x7e16, 0x7e0d, 0x7e14, 0x7e25, 0x7e24, 0x7f43, 0x7f7b, 0x7f7c, 0x7f7a, 0x7fb1, 0x7fef, 0x802a, 0x8029, 0x806c, 0x81b1, 0x81a6, 0x81ae, 0x81b9, 0x81b5, 0x81ab, 0x81b0, 0x81ac, 0x81b4, 0x81b2, 0x81b7, 0x81a7, 0x81f2, 0x8255, 0x8256, 0x8257, 0x8556, 0x8545, 0x856b, 0x854d, 0x8553, 0x8561, 0x8558 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeb40[ 63 ] = { 0x8540, 0x8546, 0x8564, 0x8541, 0x8562, 0x8544, 0x8551, 0x8547, 0x8563, 0x853e, 0x855b, 0x8571, 0x854e, 0x856e, 0x8575, 0x8555, 0x8567, 0x8560, 0x858c, 0x8566, 0x855d, 0x8554, 0x8565, 0x856c, 0x8663, 0x8665, 0x8664, 0x879b, 0x878f, 0x8797, 0x8793, 0x8792, 0x8788, 0x8781, 0x8796, 0x8798, 0x8779, 0x8787, 0x87a3, 0x8785, 0x8790, 0x8791, 0x879d, 0x8784, 0x8794, 0x879c, 0x879a, 0x8789, 0x891e, 0x8926, 0x8930, 0x892d, 0x892e, 0x8927, 0x8931, 0x8922, 0x8929, 0x8923, 0x892f, 0x892c, 0x891f, 0x89f1, 0x8ae0 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeba1[ 94 ] = { 0x8ae2, 0x8af2, 0x8af4, 0x8af5, 0x8add, 0x8b14, 0x8ae4, 0x8adf, 0x8af0, 0x8ac8, 0x8ade, 0x8ae1, 0x8ae8, 0x8aff, 0x8aef, 0x8afb, 0x8c91, 0x8c92, 0x8c90, 0x8cf5, 0x8cee, 0x8cf1, 0x8cf0, 0x8cf3, 0x8d6c, 0x8d6e, 0x8da5, 0x8da7, 0x8e33, 0x8e3e, 0x8e38, 0x8e40, 0x8e45, 0x8e36, 0x8e3c, 0x8e3d, 0x8e41, 0x8e30, 0x8e3f, 0x8ebd, 0x8f36, 0x8f2e, 0x8f35, 0x8f32, 0x8f39, 0x8f37, 0x8f34, 0x9076, 0x9079, 0x907b, 0x9086, 0x90fa, 0x9133, 0x9135, 0x9136, 0x9193, 0x9190, 0x9191, 0x918d, 0x918f, 0x9327, 0x931e, 0x9308, 0x931f, 0x9306, 0x930f, 0x937a, 0x9338, 0x933c, 0x931b, 0x9323, 0x9312, 0x9301, 0x9346, 0x932d, 0x930e, 0x930d, 0x92cb, 0x931d, 0x92fa, 0x9325, 0x9313, 0x92f9, 0x92f7, 0x9334, 0x9302, 0x9324, 0x92ff, 0x9329, 0x9339, 0x9335, 0x932a, 0x9314, 0x930c }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xec40[ 63 ] = { 0x930b, 0x92fe, 0x9309, 0x9300, 0x92fb, 0x9316, 0x95bc, 0x95cd, 0x95be, 0x95b9, 0x95ba, 0x95b6, 0x95bf, 0x95b5, 0x95bd, 0x96a9, 0x96d4, 0x970b, 0x9712, 0x9710, 0x9799, 0x9797, 0x9794, 0x97f0, 0x97f8, 0x9835, 0x982f, 0x9832, 0x9924, 0x991f, 0x9927, 0x9929, 0x999e, 0x99ee, 0x99ec, 0x99e5, 0x99e4, 0x99f0, 0x99e3, 0x99ea, 0x99e9, 0x99e7, 0x9ab9, 0x9abf, 0x9ab4, 0x9abb, 0x9af6, 0x9afa, 0x9af9, 0x9af7, 0x9b33, 0x9b80, 0x9b85, 0x9b87, 0x9b7c, 0x9b7e, 0x9b7b, 0x9b82, 0x9b93, 0x9b92, 0x9b90, 0x9b7a, 0x9b95 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeca1[ 94 ] = { 0x9b7d, 0x9b88, 0x9d25, 0x9d17, 0x9d20, 0x9d1e, 0x9d14, 0x9d29, 0x9d1d, 0x9d18, 0x9d22, 0x9d10, 0x9d19, 0x9d1f, 0x9e88, 0x9e86, 0x9e87, 0x9eae, 0x9ead, 0x9ed5, 0x9ed6, 0x9efa, 0x9f12, 0x9f3d, 0x5126, 0x5125, 0x5122, 0x5124, 0x5120, 0x5129, 0x52f4, 0x5693, 0x568c, 0x568d, 0x5686, 0x5684, 0x5683, 0x567e, 0x5682, 0x567f, 0x5681, 0x58d6, 0x58d4, 0x58cf, 0x58d2, 0x5b2d, 0x5b25, 0x5b32, 0x5b23, 0x5b2c, 0x5b27, 0x5b26, 0x5b2f, 0x5b2e, 0x5b7b, 0x5bf1, 0x5bf2, 0x5db7, 0x5e6c, 0x5e6a, 0x5fbe, 0x5fbb, 0x61c3, 0x61b5, 0x61bc, 0x61e7, 0x61e0, 0x61e5, 0x61e4, 0x61e8, 0x61de, 0x64ef, 0x64e9, 0x64e3, 0x64eb, 0x64e4, 0x64e8, 0x6581, 0x6580, 0x65b6, 0x65da, 0x66d2, 0x6a8d, 0x6a96, 0x6a81, 0x6aa5, 0x6a89, 0x6a9f, 0x6a9b, 0x6aa1, 0x6a9e, 0x6a87, 0x6a93, 0x6a8e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xed40[ 63 ] = { 0x6a95, 0x6a83, 0x6aa8, 0x6aa4, 0x6a91, 0x6a7f, 0x6aa6, 0x6a9a, 0x6a85, 0x6a8c, 0x6a92, 0x6b5b, 0x6bad, 0x6c09, 0x6fcc, 0x6fa9, 0x6ff4, 0x6fd4, 0x6fe3, 0x6fdc, 0x6fed, 0x6fe7, 0x6fe6, 0x6fde, 0x6ff2, 0x6fdd, 0x6fe2, 0x6fe8, 0x71e1, 0x71f1, 0x71e8, 0x71f2, 0x71e4, 0x71f0, 0x71e2, 0x7373, 0x736e, 0x736f, 0x7497, 0x74b2, 0x74ab, 0x7490, 0x74aa, 0x74ad, 0x74b1, 0x74a5, 0x74af, 0x7510, 0x7511, 0x7512, 0x750f, 0x7584, 0x7643, 0x7648, 0x7649, 0x7647, 0x76a4, 0x76e9, 0x77b5, 0x77ab, 0x77b2, 0x77b7, 0x77b6 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeda1[ 94 ] = { 0x77b4, 0x77b1, 0x77a8, 0x77f0, 0x78f3, 0x78fd, 0x7902, 0x78fb, 0x78fc, 0x78f2, 0x7905, 0x78f9, 0x78fe, 0x7904, 0x79ab, 0x79a8, 0x7a5c, 0x7a5b, 0x7a56, 0x7a58, 0x7a54, 0x7a5a, 0x7abe, 0x7ac0, 0x7ac1, 0x7c05, 0x7c0f, 0x7bf2, 0x7c00, 0x7bff, 0x7bfb, 0x7c0e, 0x7bf4, 0x7c0b, 0x7bf3, 0x7c02, 0x7c09, 0x7c03, 0x7c01, 0x7bf8, 0x7bfd, 0x7c06, 0x7bf0, 0x7bf1, 0x7c10, 0x7c0a, 0x7ce8, 0x7e2d, 0x7e3c, 0x7e42, 0x7e33, 0x9848, 0x7e38, 0x7e2a, 0x7e49, 0x7e40, 0x7e47, 0x7e29, 0x7e4c, 0x7e30, 0x7e3b, 0x7e36, 0x7e44, 0x7e3a, 0x7f45, 0x7f7f, 0x7f7e, 0x7f7d, 0x7ff4, 0x7ff2, 0x802c, 0x81bb, 0x81c4, 0x81cc, 0x81ca, 0x81c5, 0x81c7, 0x81bc, 0x81e9, 0x825b, 0x825a, 0x825c, 0x8583, 0x8580, 0x858f, 0x85a7, 0x8595, 0x85a0, 0x858b, 0x85a3, 0x857b, 0x85a4, 0x859a, 0x859e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xee40[ 63 ] = { 0x8577, 0x857c, 0x8589, 0x85a1, 0x857a, 0x8578, 0x8557, 0x858e, 0x8596, 0x8586, 0x858d, 0x8599, 0x859d, 0x8581, 0x85a2, 0x8582, 0x8588, 0x8585, 0x8579, 0x8576, 0x8598, 0x8590, 0x859f, 0x8668, 0x87be, 0x87aa, 0x87ad, 0x87c5, 0x87b0, 0x87ac, 0x87b9, 0x87b5, 0x87bc, 0x87ae, 0x87c9, 0x87c3, 0x87c2, 0x87cc, 0x87b7, 0x87af, 0x87c4, 0x87ca, 0x87b4, 0x87b6, 0x87bf, 0x87b8, 0x87bd, 0x87de, 0x87b2, 0x8935, 0x8933, 0x893c, 0x893e, 0x8941, 0x8952, 0x8937, 0x8942, 0x89ad, 0x89af, 0x89ae, 0x89f2, 0x89f3, 0x8b1e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeea1[ 94 ] = { 0x8b18, 0x8b16, 0x8b11, 0x8b05, 0x8b0b, 0x8b22, 0x8b0f, 0x8b12, 0x8b15, 0x8b07, 0x8b0d, 0x8b08, 0x8b06, 0x8b1c, 0x8b13, 0x8b1a, 0x8c4f, 0x8c70, 0x8c72, 0x8c71, 0x8c6f, 0x8c95, 0x8c94, 0x8cf9, 0x8d6f, 0x8e4e, 0x8e4d, 0x8e53, 0x8e50, 0x8e4c, 0x8e47, 0x8f43, 0x8f40, 0x9085, 0x907e, 0x9138, 0x919a, 0x91a2, 0x919b, 0x9199, 0x919f, 0x91a1, 0x919d, 0x91a0, 0x93a1, 0x9383, 0x93af, 0x9364, 0x9356, 0x9347, 0x937c, 0x9358, 0x935c, 0x9376, 0x9349, 0x9350, 0x9351, 0x9360, 0x936d, 0x938f, 0x934c, 0x936a, 0x9379, 0x9357, 0x9355, 0x9352, 0x934f, 0x9371, 0x9377, 0x937b, 0x9361, 0x935e, 0x9363, 0x9367, 0x9380, 0x934e, 0x9359, 0x95c7, 0x95c0, 0x95c9, 0x95c3, 0x95c5, 0x95b7, 0x96ae, 0x96b0, 0x96ac, 0x9720, 0x971f, 0x9718, 0x971d, 0x9719, 0x979a, 0x97a1, 0x979c }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xef40[ 63 ] = { 0x979e, 0x979d, 0x97d5, 0x97d4, 0x97f1, 0x9841, 0x9844, 0x984a, 0x9849, 0x9845, 0x9843, 0x9925, 0x992b, 0x992c, 0x992a, 0x9933, 0x9932, 0x992f, 0x992d, 0x9931, 0x9930, 0x9998, 0x99a3, 0x99a1, 0x9a02, 0x99fa, 0x99f4, 0x99f7, 0x99f9, 0x99f8, 0x99f6, 0x99fb, 0x99fd, 0x99fe, 0x99fc, 0x9a03, 0x9abe, 0x9afe, 0x9afd, 0x9b01, 0x9afc, 0x9b48, 0x9b9a, 0x9ba8, 0x9b9e, 0x9b9b, 0x9ba6, 0x9ba1, 0x9ba5, 0x9ba4, 0x9b86, 0x9ba2, 0x9ba0, 0x9baf, 0x9d33, 0x9d41, 0x9d67, 0x9d36, 0x9d2e, 0x9d2f, 0x9d31, 0x9d38, 0x9d30 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xefa1[ 94 ] = { 0x9d45, 0x9d42, 0x9d43, 0x9d3e, 0x9d37, 0x9d40, 0x9d3d, 0x7ff5, 0x9d2d, 0x9e8a, 0x9e89, 0x9e8d, 0x9eb0, 0x9ec8, 0x9eda, 0x9efb, 0x9eff, 0x9f24, 0x9f23, 0x9f22, 0x9f54, 0x9fa0, 0x5131, 0x512d, 0x512e, 0x5698, 0x569c, 0x5697, 0x569a, 0x569d, 0x5699, 0x5970, 0x5b3c, 0x5c69, 0x5c6a, 0x5dc0, 0x5e6d, 0x5e6e, 0x61d8, 0x61df, 0x61ed, 0x61ee, 0x61f1, 0x61ea, 0x61f0, 0x61eb, 0x61d6, 0x61e9, 0x64ff, 0x6504, 0x64fd, 0x64f8, 0x6501, 0x6503, 0x64fc, 0x6594, 0x65db, 0x66da, 0x66db, 0x66d8, 0x6ac5, 0x6ab9, 0x6abd, 0x6ae1, 0x6ac6, 0x6aba, 0x6ab6, 0x6ab7, 0x6ac7, 0x6ab4, 0x6aad, 0x6b5e, 0x6bc9, 0x6c0b, 0x7007, 0x700c, 0x700d, 0x7001, 0x7005, 0x7014, 0x700e, 0x6fff, 0x7000, 0x6ffb, 0x7026, 0x6ffc, 0x6ff7, 0x700a, 0x7201, 0x71ff, 0x71f9, 0x7203, 0x71fd, 0x7376 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf040[ 63 ] = { 0x74b8, 0x74c0, 0x74b5, 0x74c1, 0x74be, 0x74b6, 0x74bb, 0x74c2, 0x7514, 0x7513, 0x765c, 0x7664, 0x7659, 0x7650, 0x7653, 0x7657, 0x765a, 0x76a6, 0x76bd, 0x76ec, 0x77c2, 0x77ba, 0x78ff, 0x790c, 0x7913, 0x7914, 0x7909, 0x7910, 0x7912, 0x7911, 0x79ad, 0x79ac, 0x7a5f, 0x7c1c, 0x7c29, 0x7c19, 0x7c20, 0x7c1f, 0x7c2d, 0x7c1d, 0x7c26, 0x7c28, 0x7c22, 0x7c25, 0x7c30, 0x7e5c, 0x7e50, 0x7e56, 0x7e63, 0x7e58, 0x7e62, 0x7e5f, 0x7e51, 0x7e60, 0x7e57, 0x7e53, 0x7fb5, 0x7fb3, 0x7ff7, 0x7ff8, 0x8075, 0x81d1, 0x81d2 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf0a1[ 94 ] = { 0x81d0, 0x825f, 0x825e, 0x85b4, 0x85c6, 0x85c0, 0x85c3, 0x85c2, 0x85b3, 0x85b5, 0x85bd, 0x85c7, 0x85c4, 0x85bf, 0x85cb, 0x85ce, 0x85c8, 0x85c5, 0x85b1, 0x85b6, 0x85d2, 0x8624, 0x85b8, 0x85b7, 0x85be, 0x8669, 0x87e7, 0x87e6, 0x87e2, 0x87db, 0x87eb, 0x87ea, 0x87e5, 0x87df, 0x87f3, 0x87e4, 0x87d4, 0x87dc, 0x87d3, 0x87ed, 0x87d8, 0x87e3, 0x87a4, 0x87d7, 0x87d9, 0x8801, 0x87f4, 0x87e8, 0x87dd, 0x8953, 0x894b, 0x894f, 0x894c, 0x8946, 0x8950, 0x8951, 0x8949, 0x8b2a, 0x8b27, 0x8b23, 0x8b33, 0x8b30, 0x8b35, 0x8b47, 0x8b2f, 0x8b3c, 0x8b3e, 0x8b31, 0x8b25, 0x8b37, 0x8b26, 0x8b36, 0x8b2e, 0x8b24, 0x8b3b, 0x8b3d, 0x8b3a, 0x8c42, 0x8c75, 0x8c99, 0x8c98, 0x8c97, 0x8cfe, 0x8d04, 0x8d02, 0x8d00, 0x8e5c, 0x8e62, 0x8e60, 0x8e57, 0x8e56, 0x8e5e, 0x8e65, 0x8e67 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf140[ 63 ] = { 0x8e5b, 0x8e5a, 0x8e61, 0x8e5d, 0x8e69, 0x8e54, 0x8f46, 0x8f47, 0x8f48, 0x8f4b, 0x9128, 0x913a, 0x913b, 0x913e, 0x91a8, 0x91a5, 0x91a7, 0x91af, 0x91aa, 0x93b5, 0x938c, 0x9392, 0x93b7, 0x939b, 0x939d, 0x9389, 0x93a7, 0x938e, 0x93aa, 0x939e, 0x93a6, 0x9395, 0x9388, 0x9399, 0x939f, 0x938d, 0x93b1, 0x9391, 0x93b2, 0x93a4, 0x93a8, 0x93b4, 0x93a3, 0x93a5, 0x95d2, 0x95d3, 0x95d1, 0x96b3, 0x96d7, 0x96da, 0x5dc2, 0x96df, 0x96d8, 0x96dd, 0x9723, 0x9722, 0x9725, 0x97ac, 0x97ae, 0x97a8, 0x97ab, 0x97a4, 0x97aa }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf1a1[ 94 ] = { 0x97a2, 0x97a5, 0x97d7, 0x97d9, 0x97d6, 0x97d8, 0x97fa, 0x9850, 0x9851, 0x9852, 0x98b8, 0x9941, 0x993c, 0x993a, 0x9a0f, 0x9a0b, 0x9a09, 0x9a0d, 0x9a04, 0x9a11, 0x9a0a, 0x9a05, 0x9a07, 0x9a06, 0x9ac0, 0x9adc, 0x9b08, 0x9b04, 0x9b05, 0x9b29, 0x9b35, 0x9b4a, 0x9b4c, 0x9b4b, 0x9bc7, 0x9bc6, 0x9bc3, 0x9bbf, 0x9bc1, 0x9bb5, 0x9bb8, 0x9bd3, 0x9bb6, 0x9bc4, 0x9bb9, 0x9bbd, 0x9d5c, 0x9d53, 0x9d4f, 0x9d4a, 0x9d5b, 0x9d4b, 0x9d59, 0x9d56, 0x9d4c, 0x9d57, 0x9d52, 0x9d54, 0x9d5f, 0x9d58, 0x9d5a, 0x9e8e, 0x9e8c, 0x9edf, 0x9f01, 0x9f00, 0x9f16, 0x9f25, 0x9f2b, 0x9f2a, 0x9f29, 0x9f28, 0x9f4c, 0x9f55, 0x5134, 0x5135, 0x5296, 0x52f7, 0x53b4, 0x56ab, 0x56ad, 0x56a6, 0x56a7, 0x56aa, 0x56ac, 0x58da, 0x58dd, 0x58db, 0x5912, 0x5b3d, 0x5b3e, 0x5b3f, 0x5dc3, 0x5e70 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf240[ 63 ] = { 0x5fbf, 0x61fb, 0x6507, 0x6510, 0x650d, 0x6509, 0x650c, 0x650e, 0x6584, 0x65de, 0x65dd, 0x66de, 0x6ae7, 0x6ae0, 0x6acc, 0x6ad1, 0x6ad9, 0x6acb, 0x6adf, 0x6adc, 0x6ad0, 0x6aeb, 0x6acf, 0x6acd, 0x6ade, 0x6b60, 0x6bb0, 0x6c0c, 0x7019, 0x7027, 0x7020, 0x7016, 0x702b, 0x7021, 0x7022, 0x7023, 0x7029, 0x7017, 0x7024, 0x701c, 0x702a, 0x720c, 0x720a, 0x7207, 0x7202, 0x7205, 0x72a5, 0x72a6, 0x72a4, 0x72a3, 0x72a1, 0x74cb, 0x74c5, 0x74b7, 0x74c3, 0x7516, 0x7660, 0x77c9, 0x77ca, 0x77c4, 0x77f1, 0x791d, 0x791b }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf2a1[ 94 ] = { 0x7921, 0x791c, 0x7917, 0x791e, 0x79b0, 0x7a67, 0x7a68, 0x7c33, 0x7c3c, 0x7c39, 0x7c2c, 0x7c3b, 0x7cec, 0x7cea, 0x7e76, 0x7e75, 0x7e78, 0x7e70, 0x7e77, 0x7e6f, 0x7e7a, 0x7e72, 0x7e74, 0x7e68, 0x7f4b, 0x7f4a, 0x7f83, 0x7f86, 0x7fb7, 0x7ffd, 0x7ffe, 0x8078, 0x81d7, 0x81d5, 0x8264, 0x8261, 0x8263, 0x85eb, 0x85f1, 0x85ed, 0x85d9, 0x85e1, 0x85e8, 0x85da, 0x85d7, 0x85ec, 0x85f2, 0x85f8, 0x85d8, 0x85df, 0x85e3, 0x85dc, 0x85d1, 0x85f0, 0x85e6, 0x85ef, 0x85de, 0x85e2, 0x8800, 0x87fa, 0x8803, 0x87f6, 0x87f7, 0x8809, 0x880c, 0x880b, 0x8806, 0x87fc, 0x8808, 0x87ff, 0x880a, 0x8802, 0x8962, 0x895a, 0x895b, 0x8957, 0x8961, 0x895c, 0x8958, 0x895d, 0x8959, 0x8988, 0x89b7, 0x89b6, 0x89f6, 0x8b50, 0x8b48, 0x8b4a, 0x8b40, 0x8b53, 0x8b56, 0x8b54, 0x8b4b, 0x8b55 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf340[ 63 ] = { 0x8b51, 0x8b42, 0x8b52, 0x8b57, 0x8c43, 0x8c77, 0x8c76, 0x8c9a, 0x8d06, 0x8d07, 0x8d09, 0x8dac, 0x8daa, 0x8dad, 0x8dab, 0x8e6d, 0x8e78, 0x8e73, 0x8e6a, 0x8e6f, 0x8e7b, 0x8ec2, 0x8f52, 0x8f51, 0x8f4f, 0x8f50, 0x8f53, 0x8fb4, 0x9140, 0x913f, 0x91b0, 0x91ad, 0x93de, 0x93c7, 0x93cf, 0x93c2, 0x93da, 0x93d0, 0x93f9, 0x93ec, 0x93cc, 0x93d9, 0x93a9, 0x93e6, 0x93ca, 0x93d4, 0x93ee, 0x93e3, 0x93d5, 0x93c4, 0x93ce, 0x93c0, 0x93d2, 0x93e7, 0x957d, 0x95da, 0x95db, 0x96e1, 0x9729, 0x972b, 0x972c, 0x9728, 0x9726 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf3a1[ 94 ] = { 0x97b3, 0x97b7, 0x97b6, 0x97dd, 0x97de, 0x97df, 0x985c, 0x9859, 0x985d, 0x9857, 0x98bf, 0x98bd, 0x98bb, 0x98be, 0x9948, 0x9947, 0x9943, 0x99a6, 0x99a7, 0x9a1a, 0x9a15, 0x9a25, 0x9a1d, 0x9a24, 0x9a1b, 0x9a22, 0x9a20, 0x9a27, 0x9a23, 0x9a1e, 0x9a1c, 0x9a14, 0x9ac2, 0x9b0b, 0x9b0a, 0x9b0e, 0x9b0c, 0x9b37, 0x9bea, 0x9beb, 0x9be0, 0x9bde, 0x9be4, 0x9be6, 0x9be2, 0x9bf0, 0x9bd4, 0x9bd7, 0x9bec, 0x9bdc, 0x9bd9, 0x9be5, 0x9bd5, 0x9be1, 0x9bda, 0x9d77, 0x9d81, 0x9d8a, 0x9d84, 0x9d88, 0x9d71, 0x9d80, 0x9d78, 0x9d86, 0x9d8b, 0x9d8c, 0x9d7d, 0x9d6b, 0x9d74, 0x9d75, 0x9d70, 0x9d69, 0x9d85, 0x9d73, 0x9d7b, 0x9d82, 0x9d6f, 0x9d79, 0x9d7f, 0x9d87, 0x9d68, 0x9e94, 0x9e91, 0x9ec0, 0x9efc, 0x9f2d, 0x9f40, 0x9f41, 0x9f4d, 0x9f56, 0x9f57, 0x9f58, 0x5337, 0x56b2 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf440[ 63 ] = { 0x56b5, 0x56b3, 0x58e3, 0x5b45, 0x5dc6, 0x5dc7, 0x5eee, 0x5eef, 0x5fc0, 0x5fc1, 0x61f9, 0x6517, 0x6516, 0x6515, 0x6513, 0x65df, 0x66e8, 0x66e3, 0x66e4, 0x6af3, 0x6af0, 0x6aea, 0x6ae8, 0x6af9, 0x6af1, 0x6aee, 0x6aef, 0x703c, 0x7035, 0x702f, 0x7037, 0x7034, 0x7031, 0x7042, 0x7038, 0x703f, 0x703a, 0x7039, 0x7040, 0x703b, 0x7033, 0x7041, 0x7213, 0x7214, 0x72a8, 0x737d, 0x737c, 0x74ba, 0x76ab, 0x76aa, 0x76be, 0x76ed, 0x77cc, 0x77ce, 0x77cf, 0x77cd, 0x77f2, 0x7925, 0x7923, 0x7927, 0x7928, 0x7924, 0x7929 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf4a1[ 94 ] = { 0x79b2, 0x7a6e, 0x7a6c, 0x7a6d, 0x7af7, 0x7c49, 0x7c48, 0x7c4a, 0x7c47, 0x7c45, 0x7cee, 0x7e7b, 0x7e7e, 0x7e81, 0x7e80, 0x7fba, 0x7fff, 0x8079, 0x81db, 0x81d9, 0x820b, 0x8268, 0x8269, 0x8622, 0x85ff, 0x8601, 0x85fe, 0x861b, 0x8600, 0x85f6, 0x8604, 0x8609, 0x8605, 0x860c, 0x85fd, 0x8819, 0x8810, 0x8811, 0x8817, 0x8813, 0x8816, 0x8963, 0x8966, 0x89b9, 0x89f7, 0x8b60, 0x8b6a, 0x8b5d, 0x8b68, 0x8b63, 0x8b65, 0x8b67, 0x8b6d, 0x8dae, 0x8e86, 0x8e88, 0x8e84, 0x8f59, 0x8f56, 0x8f57, 0x8f55, 0x8f58, 0x8f5a, 0x908d, 0x9143, 0x9141, 0x91b7, 0x91b5, 0x91b2, 0x91b3, 0x940b, 0x9413, 0x93fb, 0x9420, 0x940f, 0x9414, 0x93fe, 0x9415, 0x9410, 0x9428, 0x9419, 0x940d, 0x93f5, 0x9400, 0x93f7, 0x9407, 0x940e, 0x9416, 0x9412, 0x93fa, 0x9409, 0x93f8, 0x940a, 0x93ff }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf540[ 63 ] = { 0x93fc, 0x940c, 0x93f6, 0x9411, 0x9406, 0x95de, 0x95e0, 0x95df, 0x972e, 0x972f, 0x97b9, 0x97bb, 0x97fd, 0x97fe, 0x9860, 0x9862, 0x9863, 0x985f, 0x98c1, 0x98c2, 0x9950, 0x994e, 0x9959, 0x994c, 0x994b, 0x9953, 0x9a32, 0x9a34, 0x9a31, 0x9a2c, 0x9a2a, 0x9a36, 0x9a29, 0x9a2e, 0x9a38, 0x9a2d, 0x9ac7, 0x9aca, 0x9ac6, 0x9b10, 0x9b12, 0x9b11, 0x9c0b, 0x9c08, 0x9bf7, 0x9c05, 0x9c12, 0x9bf8, 0x9c40, 0x9c07, 0x9c0e, 0x9c06, 0x9c17, 0x9c14, 0x9c09, 0x9d9f, 0x9d99, 0x9da4, 0x9d9d, 0x9d92, 0x9d98, 0x9d90, 0x9d9b }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf5a1[ 94 ] = { 0x9da0, 0x9d94, 0x9d9c, 0x9daa, 0x9d97, 0x9da1, 0x9d9a, 0x9da2, 0x9da8, 0x9d9e, 0x9da3, 0x9dbf, 0x9da9, 0x9d96, 0x9da6, 0x9da7, 0x9e99, 0x9e9b, 0x9e9a, 0x9ee5, 0x9ee4, 0x9ee7, 0x9ee6, 0x9f30, 0x9f2e, 0x9f5b, 0x9f60, 0x9f5e, 0x9f5d, 0x9f59, 0x9f91, 0x513a, 0x5139, 0x5298, 0x5297, 0x56c3, 0x56bd, 0x56be, 0x5b48, 0x5b47, 0x5dcb, 0x5dcf, 0x5ef1, 0x61fd, 0x651b, 0x6b02, 0x6afc, 0x6b03, 0x6af8, 0x6b00, 0x7043, 0x7044, 0x704a, 0x7048, 0x7049, 0x7045, 0x7046, 0x721d, 0x721a, 0x7219, 0x737e, 0x7517, 0x766a, 0x77d0, 0x792d, 0x7931, 0x792f, 0x7c54, 0x7c53, 0x7cf2, 0x7e8a, 0x7e87, 0x7e88, 0x7e8b, 0x7e86, 0x7e8d, 0x7f4d, 0x7fbb, 0x8030, 0x81dd, 0x8618, 0x862a, 0x8626, 0x861f, 0x8623, 0x861c, 0x8619, 0x8627, 0x862e, 0x8621, 0x8620, 0x8629, 0x861e, 0x8625 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf640[ 63 ] = { 0x8829, 0x881d, 0x881b, 0x8820, 0x8824, 0x881c, 0x882b, 0x884a, 0x896d, 0x8969, 0x896e, 0x896b, 0x89fa, 0x8b79, 0x8b78, 0x8b45, 0x8b7a, 0x8b7b, 0x8d10, 0x8d14, 0x8daf, 0x8e8e, 0x8e8c, 0x8f5e, 0x8f5b, 0x8f5d, 0x9146, 0x9144, 0x9145, 0x91b9, 0x943f, 0x943b, 0x9436, 0x9429, 0x943d, 0x943c, 0x9430, 0x9439, 0x942a, 0x9437, 0x942c, 0x9440, 0x9431, 0x95e5, 0x95e4, 0x95e3, 0x9735, 0x973a, 0x97bf, 0x97e1, 0x9864, 0x98c9, 0x98c6, 0x98c0, 0x9958, 0x9956, 0x9a39, 0x9a3d, 0x9a46, 0x9a44, 0x9a42, 0x9a41, 0x9a3a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf6a1[ 94 ] = { 0x9a3f, 0x9acd, 0x9b15, 0x9b17, 0x9b18, 0x9b16, 0x9b3a, 0x9b52, 0x9c2b, 0x9c1d, 0x9c1c, 0x9c2c, 0x9c23, 0x9c28, 0x9c29, 0x9c24, 0x9c21, 0x9db7, 0x9db6, 0x9dbc, 0x9dc1, 0x9dc7, 0x9dca, 0x9dcf, 0x9dbe, 0x9dc5, 0x9dc3, 0x9dbb, 0x9db5, 0x9dce, 0x9db9, 0x9dba, 0x9dac, 0x9dc8, 0x9db1, 0x9dad, 0x9dcc, 0x9db3, 0x9dcd, 0x9db2, 0x9e7a, 0x9e9c, 0x9eeb, 0x9eee, 0x9eed, 0x9f1b, 0x9f18, 0x9f1a, 0x9f31, 0x9f4e, 0x9f65, 0x9f64, 0x9f92, 0x4eb9, 0x56c6, 0x56c5, 0x56cb, 0x5971, 0x5b4b, 0x5b4c, 0x5dd5, 0x5dd1, 0x5ef2, 0x6521, 0x6520, 0x6526, 0x6522, 0x6b0b, 0x6b08, 0x6b09, 0x6c0d, 0x7055, 0x7056, 0x7057, 0x7052, 0x721e, 0x721f, 0x72a9, 0x737f, 0x74d8, 0x74d5, 0x74d9, 0x74d7, 0x766d, 0x76ad, 0x7935, 0x79b4, 0x7a70, 0x7a71, 0x7c57, 0x7c5c, 0x7c59, 0x7c5b, 0x7c5a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf740[ 63 ] = { 0x7cf4, 0x7cf1, 0x7e91, 0x7f4f, 0x7f87, 0x81de, 0x826b, 0x8634, 0x8635, 0x8633, 0x862c, 0x8632, 0x8636, 0x882c, 0x8828, 0x8826, 0x882a, 0x8825, 0x8971, 0x89bf, 0x89be, 0x89fb, 0x8b7e, 0x8b84, 0x8b82, 0x8b86, 0x8b85, 0x8b7f, 0x8d15, 0x8e95, 0x8e94, 0x8e9a, 0x8e92, 0x8e90, 0x8e96, 0x8e97, 0x8f60, 0x8f62, 0x9147, 0x944c, 0x9450, 0x944a, 0x944b, 0x944f, 0x9447, 0x9445, 0x9448, 0x9449, 0x9446, 0x973f, 0x97e3, 0x986a, 0x9869, 0x98cb, 0x9954, 0x995b, 0x9a4e, 0x9a53, 0x9a54, 0x9a4c, 0x9a4f, 0x9a48, 0x9a4a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf7a1[ 94 ] = { 0x9a49, 0x9a52, 0x9a50, 0x9ad0, 0x9b19, 0x9b2b, 0x9b3b, 0x9b56, 0x9b55, 0x9c46, 0x9c48, 0x9c3f, 0x9c44, 0x9c39, 0x9c33, 0x9c41, 0x9c3c, 0x9c37, 0x9c34, 0x9c32, 0x9c3d, 0x9c36, 0x9ddb, 0x9dd2, 0x9dde, 0x9dda, 0x9dcb, 0x9dd0, 0x9ddc, 0x9dd1, 0x9ddf, 0x9de9, 0x9dd9, 0x9dd8, 0x9dd6, 0x9df5, 0x9dd5, 0x9ddd, 0x9eb6, 0x9ef0, 0x9f35, 0x9f33, 0x9f32, 0x9f42, 0x9f6b, 0x9f95, 0x9fa2, 0x513d, 0x5299, 0x58e8, 0x58e7, 0x5972, 0x5b4d, 0x5dd8, 0x882f, 0x5f4f, 0x6201, 0x6203, 0x6204, 0x6529, 0x6525, 0x6596, 0x66eb, 0x6b11, 0x6b12, 0x6b0f, 0x6bca, 0x705b, 0x705a, 0x7222, 0x7382, 0x7381, 0x7383, 0x7670, 0x77d4, 0x7c67, 0x7c66, 0x7e95, 0x826c, 0x863a, 0x8640, 0x8639, 0x863c, 0x8631, 0x863b, 0x863e, 0x8830, 0x8832, 0x882e, 0x8833, 0x8976, 0x8974, 0x8973, 0x89fe }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf840[ 63 ] = { 0x8b8c, 0x8b8e, 0x8b8b, 0x8b88, 0x8c45, 0x8d19, 0x8e98, 0x8f64, 0x8f63, 0x91bc, 0x9462, 0x9455, 0x945d, 0x9457, 0x945e, 0x97c4, 0x97c5, 0x9800, 0x9a56, 0x9a59, 0x9b1e, 0x9b1f, 0x9b20, 0x9c52, 0x9c58, 0x9c50, 0x9c4a, 0x9c4d, 0x9c4b, 0x9c55, 0x9c59, 0x9c4c, 0x9c4e, 0x9dfb, 0x9df7, 0x9def, 0x9de3, 0x9deb, 0x9df8, 0x9de4, 0x9df6, 0x9de1, 0x9dee, 0x9de6, 0x9df2, 0x9df0, 0x9de2, 0x9dec, 0x9df4, 0x9df3, 0x9de8, 0x9ded, 0x9ec2, 0x9ed0, 0x9ef2, 0x9ef3, 0x9f06, 0x9f1c, 0x9f38, 0x9f37, 0x9f36, 0x9f43, 0x9f4f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf8a1[ 94 ] = { 0x9f71, 0x9f70, 0x9f6e, 0x9f6f, 0x56d3, 0x56cd, 0x5b4e, 0x5c6d, 0x652d, 0x66ed, 0x66ee, 0x6b13, 0x705f, 0x7061, 0x705d, 0x7060, 0x7223, 0x74db, 0x74e5, 0x77d5, 0x7938, 0x79b7, 0x79b6, 0x7c6a, 0x7e97, 0x7f89, 0x826d, 0x8643, 0x8838, 0x8837, 0x8835, 0x884b, 0x8b94, 0x8b95, 0x8e9e, 0x8e9f, 0x8ea0, 0x8e9d, 0x91be, 0x91bd, 0x91c2, 0x946b, 0x9468, 0x9469, 0x96e5, 0x9746, 0x9743, 0x9747, 0x97c7, 0x97e5, 0x9a5e, 0x9ad5, 0x9b59, 0x9c63, 0x9c67, 0x9c66, 0x9c62, 0x9c5e, 0x9c60, 0x9e02, 0x9dfe, 0x9e07, 0x9e03, 0x9e06, 0x9e05, 0x9e00, 0x9e01, 0x9e09, 0x9dff, 0x9dfd, 0x9e04, 0x9ea0, 0x9f1e, 0x9f46, 0x9f74, 0x9f75, 0x9f76, 0x56d4, 0x652e, 0x65b8, 0x6b18, 0x6b19, 0x6b17, 0x6b1a, 0x7062, 0x7226, 0x72aa, 0x77d8, 0x77d9, 0x7939, 0x7c69, 0x7c6b, 0x7cf6, 0x7e9a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf940[ 63 ] = { 0x7e98, 0x7e9b, 0x7e99, 0x81e0, 0x81e1, 0x8646, 0x8647, 0x8648, 0x8979, 0x897a, 0x897c, 0x897b, 0x89ff, 0x8b98, 0x8b99, 0x8ea5, 0x8ea4, 0x8ea3, 0x946e, 0x946d, 0x946f, 0x9471, 0x9473, 0x9749, 0x9872, 0x995f, 0x9c68, 0x9c6e, 0x9c6d, 0x9e0b, 0x9e0d, 0x9e10, 0x9e0f, 0x9e12, 0x9e11, 0x9ea1, 0x9ef5, 0x9f09, 0x9f47, 0x9f78, 0x9f7b, 0x9f7a, 0x9f79, 0x571e, 0x7066, 0x7c6f, 0x883c, 0x8db2, 0x8ea6, 0x91c3, 0x9474, 0x9478, 0x9476, 0x9475, 0x9a60, 0x9c74, 0x9c73, 0x9c71, 0x9c75, 0x9e14, 0x9e13, 0x9ef6, 0x9f0a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf9a1[ 94 ] = { 0x9fa4, 0x7068, 0x7065, 0x7cf7, 0x866a, 0x883e, 0x883d, 0x883f, 0x8b9e, 0x8c9c, 0x8ea9, 0x8ec9, 0x974b, 0x9873, 0x9874, 0x98cc, 0x9961, 0x99ab, 0x9a64, 0x9a66, 0x9a67, 0x9b24, 0x9e15, 0x9e17, 0x9f48, 0x6207, 0x6b1e, 0x7227, 0x864c, 0x8ea8, 0x9482, 0x9480, 0x9481, 0x9a69, 0x9a68, 0x9b2e, 0x9e19, 0x7229, 0x864b, 0x8b9f, 0x9483, 0x9c79, 0x9eb7, 0x7675, 0x9a6b, 0x9c7a, 0x9e1d, 0x7069, 0x706a, 0x9ea4, 0x9f7e, 0x9f49, 0x9f98, 0x7881, 0x92b9, 0x88cf, 0x58bb, 0x6052, 0x7ca7, 0x5afa, 0x2554, 0x2566, 0x2557, 0x2560, 0x256c, 0x2563, 0x255a, 0x2569, 0x255d, 0x2552, 0x2564, 0x2555, 0x255e, 0x256a, 0x2561, 0x2558, 0x2567, 0x255b, 0x2553, 0x2565, 0x2556, 0x255f, 0x256b, 0x2562, 0x2559, 0x2568, 0x255c, 0x2551, 0x2550, 0x256d, 0x256e, 0x2570, 0x256f, 0x2593, }; /* Unicode to ASCII character lookup table for Windows 950 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x0080[ 128 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2a1, 0x58a2, 0xd3a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x02c0[ 320 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbea3, 0x001a, 0xbca3, 0xbda3, 0xbfa3, 0x001a, 0xc5a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbba3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x44a3, 0x45a3, 0x46a3, 0x47a3, 0x48a3, 0x49a3, 0x4aa3, 0x4ba3, 0x4ca3, 0x4da3, 0x4ea3, 0x4fa3, 0x50a3, 0x51a3, 0x52a3, 0x53a3, 0x54a3, 0x001a, 0x55a3, 0x56a3, 0x57a3, 0x58a3, 0x59a3, 0x5aa3, 0x5ba3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ca3, 0x5da3, 0x5ea3, 0x5fa3, 0x60a3, 0x61a3, 0x62a3, 0x63a3, 0x64a3, 0x65a3, 0x66a3, 0x67a3, 0x68a3, 0x69a3, 0x6aa3, 0x6ba3, 0x6ca3, 0x001a, 0x6da3, 0x6ea3, 0x6fa3, 0x70a3, 0x71a3, 0x72a3, 0x73a3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x2000[ 768 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56a1, 0x58a1, 0x001a, 0x001a, 0x001a, 0xa5a1, 0xa6a1, 0x001a, 0x001a, 0xa7a1, 0xa8a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ca1, 0x4ba1, 0x45a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaca1, 0x001a, 0x001a, 0xaba1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1a3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4aa2, 0x001a, 0xc1a1, 0x001a, 0x001a, 0x001a, 0x4ba2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9a2, 0xbaa2, 0xbba2, 0xbca2, 0xbda2, 0xbea2, 0xbfa2, 0xc0a2, 0xc1a2, 0xc2a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6a1, 0xf4a1, 0xf7a1, 0xf5a1, 0x001a, 0x001a, 0xf8a1, 0xf9a1, 0xfba1, 0xfaa1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41a2, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4a1, 0x001a, 0x001a, 0x001a, 0xdba1, 0xe8a1, 0xe7a1, 0x001a, 0x001a, 0xfda1, 0x001a, 0xfca1, 0x001a, 0x001a, 0x001a, 0xe4a1, 0xe5a1, 0xeca1, 0x001a, 0x001a, 0xeda1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefa1, 0xeea1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdca1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaa1, 0xdda1, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8a1, 0xd9a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2a1, 0x001a, 0x001a, 0x001a, 0xf3a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x2500[ 384 ] = { 0x77a2, 0x001a, 0x78a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7aa2, 0x001a, 0x001a, 0x001a, 0x7ba2, 0x001a, 0x001a, 0x001a, 0x7ca2, 0x001a, 0x001a, 0x001a, 0x7da2, 0x001a, 0x001a, 0x001a, 0x75a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x72a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x71a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a2, 0xf8f9, 0xe6f9, 0xeff9, 0xddf9, 0xe8f9, 0xf1f9, 0xdff9, 0xecf9, 0xf5f9, 0xe3f9, 0xeef9, 0xf7f9, 0xe5f9, 0xa5a2, 0xf2f9, 0xe0f9, 0xa7a2, 0xf4f9, 0xe2f9, 0xe7f9, 0xf0f9, 0xdef9, 0xedf9, 0xf6f9, 0xe4f9, 0xa6a2, 0xf3f9, 0xe1f9, 0x7ea2, 0xa1a2, 0xa3a2, 0xa2a2, 0xaca2, 0xada2, 0xaea2, 0x5aa1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62a2, 0x63a2, 0x64a2, 0x65a2, 0x66a2, 0x67a2, 0x68a2, 0x69a2, 0x70a2, 0x6fa2, 0x6ea2, 0x6da2, 0x6ca2, 0x6ba2, 0x6aa2, 0x001a, 0x001a, 0x001a, 0xfef9, 0x76a2, 0x79a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbda1, 0xbca1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6a1, 0xb5a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfa1, 0xbea1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbba1, 0xbaa1, 0x001a, 0x001a, 0x001a, 0xb3a1, 0x001a, 0x001a, 0xb7a1, 0xb4a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8a2, 0xa9a2, 0xaba2, 0xaaa2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9a1, 0xb8a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0a1, 0x001a, 0xf1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x3000[ 1024 ] = { 0x40a1, 0x42a1, 0x43a1, 0xb2a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x71a1, 0x72a1, 0x6da1, 0x6ea1, 0x75a1, 0x76a1, 0x79a1, 0x7aa1, 0x69a1, 0x6aa1, 0x45a2, 0x001a, 0x65a1, 0x66a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9a1, 0xaaa1, 0x001a, 0x001a, 0xc3a2, 0xc4a2, 0xc5a2, 0xc6a2, 0xc7a2, 0xc8a2, 0xc9a2, 0xcaa2, 0xcba2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74a3, 0x75a3, 0x76a3, 0x77a3, 0x78a3, 0x79a3, 0x7aa3, 0x7ba3, 0x7ca3, 0x7da3, 0x7ea3, 0xa1a3, 0xa2a3, 0xa3a3, 0xa4a3, 0xa5a3, 0xa6a3, 0xa7a3, 0xa8a3, 0xa9a3, 0xaaa3, 0xaba3, 0xaca3, 0xada3, 0xaea3, 0xafa3, 0xb0a3, 0xb1a3, 0xb2a3, 0xb3a3, 0xb4a3, 0xb5a3, 0xb6a3, 0xb7a3, 0xb8a3, 0xb9a3, 0xbaa3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x55a2, 0x56a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50a2, 0x51a2, 0x52a2, 0x001a, 0x001a, 0x54a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x57a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x53a2, 0x001a, 0x001a, 0xeba1, 0xeaa1, 0x001a, 0x001a, 0x4fa2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x4e00[ 20928 ] = { 0x40a4, 0x42a4, 0x001a, 0x43a4, 0x001a, 0x001a, 0x001a, 0x45c9, 0x56a4, 0x54a4, 0x57a4, 0x55a4, 0x46c9, 0xa3a4, 0x4fc9, 0x4dc9, 0xa2a4, 0xa1a4, 0x001a, 0x001a, 0x42a5, 0x41a5, 0x40a5, 0x001a, 0x43a5, 0xfea4, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0a5, 0xe1a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x58a4, 0x001a, 0xa4a4, 0x50c9, 0x001a, 0xa5a4, 0x63c9, 0xeaa6, 0xb1cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x59a4, 0xa6a4, 0x001a, 0x44a5, 0x64c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x40c9, 0x44a4, 0x001a, 0x5ba4, 0x001a, 0x47c9, 0x5ca4, 0x001a, 0x001a, 0xa7a4, 0x001a, 0x45a5, 0x47a5, 0x46a5, 0x001a, 0x001a, 0xe2a5, 0xe3a5, 0x001a, 0x001a, 0xc4a8, 0x001a, 0xbcad, 0x41a4, 0x001a, 0x001a, 0x41c9, 0x45a4, 0x5ea4, 0x5da4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaeb0, 0x4bd4, 0x001a, 0x001a, 0xc3b6, 0xb1dc, 0xb2dc, 0x001a, 0x46a4, 0x001a, 0xa9a4, 0x001a, 0x001a, 0xc6a8, 0x47a4, 0x48c9, 0x5fa4, 0x001a, 0x001a, 0xaaa4, 0xaca4, 0x51c9, 0xada4, 0xaba4, 0x001a, 0x001a, 0x001a, 0xe5a5, 0x001a, 0xc7a8, 0x001a, 0x001a, 0xc8a8, 0x45ab, 0x001a, 0x60a4, 0xaea4, 0x001a, 0xe6a5, 0xe8a5, 0xe7a5, 0x001a, 0xeba6, 0x001a, 0x001a, 0xc9a8, 0xcaa8, 0x46ab, 0x47ab, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdad, 0x001a, 0x001a, 0xb3dc, 0x001a, 0x001a, 0xd6f6, 0x48a4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0a4, 0xafa4, 0x52c9, 0xb1a4, 0xb7a4, 0x001a, 0xb2a4, 0xb3a4, 0x54c9, 0x53c9, 0xb5a4, 0xb6a4, 0x001a, 0xb4a4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4aa5, 0x4ba5, 0x4ca5, 0x4da5, 0x49a5, 0x50a5, 0x6ac9, 0x001a, 0x66c9, 0x69c9, 0x51a5, 0x61a5, 0x001a, 0x68c9, 0x001a, 0x4ea5, 0x4fa5, 0x48a5, 0x001a, 0x001a, 0x65c9, 0x67c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5a5, 0xb0c9, 0xf2a5, 0xf6a5, 0xbac9, 0xaec9, 0xf3a5, 0xb2c9, 0x001a, 0x001a, 0x001a, 0xf4a5, 0x001a, 0xf7a5, 0x001a, 0xe9a5, 0xb1c9, 0xf8a5, 0xb5c9, 0x001a, 0xb9c9, 0xb6c9, 0x001a, 0x001a, 0xb3c9, 0xeaa5, 0xeca5, 0xf9a5, 0x001a, 0xeea5, 0xabc9, 0xf1a5, 0xefa5, 0xf0a5, 0xbbc9, 0xb8c9, 0xafc9, 0xeda5, 0x001a, 0x001a, 0xacc9, 0xeba5, 0x001a, 0x001a, 0x001a, 0xb4c9, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadc9, 0x66ca, 0x001a, 0x42a7, 0xf4a6, 0x001a, 0x001a, 0x67ca, 0xf1a6, 0x001a, 0x44a7, 0x001a, 0xf9a6, 0x001a, 0xf8a6, 0x5bca, 0xfca6, 0xf7a6, 0x60ca, 0x68ca, 0x001a, 0x64ca, 0x001a, 0xfaa6, 0x001a, 0x001a, 0xfda6, 0xeea6, 0x47a7, 0x5dca, 0x001a, 0x001a, 0xbdcb, 0xeca6, 0x43a7, 0xeda6, 0xf5a6, 0xf6a6, 0x62ca, 0x5eca, 0xfba6, 0xf3a6, 0x5aca, 0xefa6, 0x65ca, 0x45a7, 0x48a7, 0xf2a6, 0x40a7, 0x46a7, 0xf0a6, 0x63ca, 0x41a7, 0x69ca, 0x5cca, 0xfea6, 0x5fca, 0x001a, 0x001a, 0x61ca, 0x001a, 0xd8a8, 0xbfcb, 0xcbcb, 0xd0a8, 0x001a, 0xcccb, 0xcba8, 0xd5a8, 0x001a, 0x001a, 0xcea8, 0xb9cb, 0xd6a8, 0xb8cb, 0xbccb, 0xc3cb, 0xc1cb, 0xdea8, 0xd9a8, 0xb3cb, 0xb5cb, 0xdba8, 0xcfa8, 0xb6cb, 0xc2cb, 0xc9cb, 0xd4a8, 0xbbcb, 0xb4cb, 0xd3a8, 0xb7cb, 0xd7a8, 0xbacb, 0x001a, 0xd2a8, 0x001a, 0xcda8, 0x001a, 0xdca8, 0xc4cb, 0xdda8, 0xc8cb, 0x001a, 0xc6cb, 0xcacb, 0xdaa8, 0xbecb, 0xb2cb, 0x001a, 0xc0cb, 0xd1a8, 0xc5cb, 0xcca8, 0xc7cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56ab, 0x4aab, 0x001a, 0x001a, 0xe0cd, 0xe8cd, 0x001a, 0x49ab, 0x51ab, 0x5dab, 0x001a, 0xeecd, 0xeccd, 0xe7cd, 0x001a, 0x001a, 0x001a, 0x4bab, 0xedcd, 0xe3cd, 0x59ab, 0x50ab, 0x58ab, 0xdecd, 0x001a, 0xeacd, 0x001a, 0xe1cd, 0x54ab, 0xe2cd, 0x001a, 0xddcd, 0x5bab, 0x4eab, 0x57ab, 0x4dab, 0x001a, 0xdfcd, 0xe4cd, 0x001a, 0xebcd, 0x55ab, 0x52ab, 0xe6cd, 0x5aab, 0xe9cd, 0xe5cd, 0x4fab, 0x5cab, 0x53ab, 0x4cab, 0x48ab, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefcd, 0x001a, 0xd7ad, 0xc1ad, 0x001a, 0xd1ad, 0x001a, 0xd6ad, 0xd0d0, 0xcfd0, 0xd4d0, 0xd5d0, 0xc4ad, 0x001a, 0xcdad, 0x001a, 0x001a, 0x001a, 0xdaad, 0x001a, 0xcead, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9d0, 0xc7ad, 0xcad0, 0x001a, 0xdcad, 0x001a, 0xd3ad, 0xbead, 0xbfad, 0xddd0, 0xbfb0, 0x001a, 0xccad, 0xcbad, 0xcbd0, 0xcfad, 0x5bd4, 0xc6ad, 0xd6d0, 0xd5ad, 0xd4ad, 0xcaad, 0xced0, 0xd7d0, 0x001a, 0xc8d0, 0xc9ad, 0xd8d0, 0xd2ad, 0xccd0, 0xc0ad, 0x001a, 0xc3ad, 0xc2ad, 0xd9d0, 0xd0ad, 0xc5ad, 0xd9ad, 0xdbad, 0xd3d0, 0xd8ad, 0x001a, 0xdbd0, 0xcdd0, 0xdcd0, 0x001a, 0xd1d0, 0x001a, 0xdad0, 0x001a, 0xd2d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ad, 0x001a, 0x001a, 0x001a, 0x63d4, 0x57d4, 0x001a, 0xb3b0, 0x001a, 0x5cd4, 0x62d4, 0xb2b0, 0x55d4, 0xb6b0, 0x59d4, 0x52d4, 0xb4b0, 0x56d4, 0xb9b0, 0xbeb0, 0x001a, 0x67d4, 0x001a, 0x51d4, 0x001a, 0xbab0, 0x001a, 0x66d4, 0x001a, 0x001a, 0xb5b0, 0x58d4, 0xb1b0, 0x53d4, 0x4fd4, 0x5dd4, 0x50d4, 0x4ed4, 0x5ad4, 0x60d4, 0x61d4, 0xb7b0, 0x001a, 0x001a, 0x5bd8, 0x5ed4, 0x4dd4, 0x5fd4, 0x001a, 0xc1b0, 0x64d4, 0xc0b0, 0x4cd4, 0x001a, 0x54d4, 0x65d4, 0xbcb0, 0xbbb0, 0xb8b0, 0xbdb0, 0x001a, 0x001a, 0xafb0, 0x001a, 0x001a, 0xb0b0, 0x001a, 0x001a, 0xc8b3, 0x001a, 0x5ed8, 0x57d8, 0x001a, 0xc5b3, 0x001a, 0x5fd8, 0x001a, 0x001a, 0x001a, 0x55d8, 0x58d8, 0xc4b3, 0x59d8, 0x001a, 0x001a, 0xc7b3, 0x5dd8, 0x001a, 0x53d8, 0x52d8, 0xc9b3, 0x001a, 0xcab3, 0xc6b3, 0xcbb3, 0x51d8, 0x5cd8, 0x5ad8, 0x54d8, 0x001a, 0x001a, 0x001a, 0xc3b3, 0x56d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcab6, 0xc4b6, 0xb7dc, 0xcdb6, 0xbddc, 0xc0dc, 0xc6b6, 0xc7b6, 0xbadc, 0xc5b6, 0xc3dc, 0xcbb6, 0xc4dc, 0x001a, 0xbfdc, 0xccb6, 0x001a, 0xb4dc, 0xc9b6, 0xb5dc, 0x001a, 0xbedc, 0xbcdc, 0x001a, 0xb8dc, 0xc8b6, 0xb6dc, 0xceb6, 0xbbdc, 0xc2dc, 0xb9dc, 0xc1dc, 0x001a, 0x001a, 0xb6b9, 0xb3b9, 0x001a, 0xb4b9, 0x001a, 0xf9e0, 0xf1e0, 0xb2b9, 0xafb9, 0xf2e0, 0x001a, 0x001a, 0xb1b9, 0xf5e0, 0x001a, 0xf7e0, 0x001a, 0x001a, 0xfee0, 0x001a, 0x001a, 0xfde0, 0xf8e0, 0xaeb9, 0xf0e0, 0xacb9, 0xf3e0, 0xb7b9, 0xf6e0, 0x001a, 0xfae0, 0xb0b9, 0xadb9, 0xfce0, 0xfbe0, 0xb5b9, 0x001a, 0xf4e0, 0x001a, 0xf8bb, 0xece4, 0x001a, 0xe9e4, 0xf9bb, 0x001a, 0xf7bb, 0x001a, 0xf0e4, 0xede4, 0xe6e4, 0xf6bb, 0x001a, 0xfabb, 0xe7e4, 0xf5bb, 0xfdbb, 0xeae4, 0xebe4, 0xfbbb, 0xfcbb, 0xf1e4, 0xeee4, 0xefe4, 0x001a, 0x001a, 0x001a, 0xaabe, 0xf8e8, 0xa7be, 0xf5e8, 0xa9be, 0xabbe, 0x001a, 0xf6e8, 0xa8be, 0x001a, 0xf7e8, 0x001a, 0xf4e8, 0x001a, 0x001a, 0x76c0, 0xbdec, 0x77c0, 0xbbec, 0x001a, 0xbcec, 0xbaec, 0xb9ec, 0x001a, 0x001a, 0xbeec, 0x75c0, 0x001a, 0x001a, 0xb8ef, 0xb9ef, 0x001a, 0xe8e4, 0xb7ef, 0x78c0, 0x5fc3, 0xebf1, 0xecf1, 0x001a, 0xd7c4, 0xd8c4, 0xc1f5, 0xc0f5, 0x6cc5, 0x6bc5, 0xd0f7, 0x001a, 0x49a4, 0x61a4, 0xb9a4, 0x001a, 0xb8a4, 0x53a5, 0x52a5, 0xfca5, 0xfba5, 0xfda5, 0xfaa5, 0x001a, 0x4aa7, 0x49a7, 0x4ba7, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0a8, 0x001a, 0xdfa8, 0xe1a8, 0x001a, 0x5eab, 0x001a, 0x59a2, 0xded0, 0x5aa2, 0xc2b0, 0x5ca2, 0x5ba2, 0x60d8, 0x001a, 0x5da2, 0xb8b9, 0x5ea2, 0x001a, 0x4aa4, 0x001a, 0xbaa4, 0xfea5, 0xe2a8, 0x001a, 0x4ba4, 0xbda4, 0xbba4, 0xbca4, 0x001a, 0x001a, 0x40a6, 0x001a, 0x001a, 0x001a, 0x4ca7, 0xe4a8, 0xe3a8, 0xe5a8, 0x001a, 0x001a, 0x001a, 0xddad, 0x001a, 0x001a, 0x001a, 0xacbe, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ec9, 0x001a, 0x54a5, 0x55a5, 0x001a, 0x001a, 0x41a6, 0x001a, 0x6aca, 0x001a, 0x60ab, 0x5fab, 0xe0d0, 0xdfd0, 0xc3b0, 0x001a, 0xbea4, 0x55c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdcb, 0x001a, 0x61ab, 0x001a, 0xe0ad, 0x001a, 0xdead, 0xdfad, 0x001a, 0x001a, 0x001a, 0x001a, 0xadbe, 0x001a, 0x56a5, 0x001a, 0x001a, 0x001a, 0x42a6, 0xbcc9, 0x001a, 0x001a, 0x001a, 0x001a, 0x4da7, 0x4ea7, 0x001a, 0x6bca, 0x001a, 0x001a, 0xcecb, 0xe6a8, 0xcfcb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2d0, 0xe3d0, 0xe3ad, 0x001a, 0xe4d0, 0x001a, 0xe1d0, 0xe4ad, 0xe2ad, 0xe1ad, 0xe5d0, 0x001a, 0x68d4, 0x001a, 0x001a, 0x001a, 0x61d8, 0x001a, 0x001a, 0xc5dc, 0x40e1, 0x001a, 0x001a, 0x001a, 0xfebb, 0xaebe, 0xf9e8, 0x001a, 0x4ca4, 0x5aa4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4b0, 0xcdb3, 0x001a, 0xb9b9, 0x001a, 0x42c9, 0xbfa4, 0x001a, 0x59a5, 0x57a5, 0x58a5, 0x001a, 0x001a, 0xe7a8, 0x001a, 0x001a, 0x4da4, 0x4ea4, 0x001a, 0x62a4, 0x001a, 0x001a, 0xc0a4, 0xc1a4, 0xc2a4, 0xbec9, 0x5aa5, 0x001a, 0x6bc9, 0x001a, 0x46a6, 0x001a, 0xbfc9, 0x44a6, 0x45a6, 0xbdc9, 0x001a, 0x001a, 0x47a6, 0x43a6, 0x001a, 0x001a, 0x001a, 0x001a, 0x6cca, 0xecaa, 0x6dca, 0x001a, 0x001a, 0x6eca, 0x001a, 0x001a, 0x50a7, 0x4fa7, 0x001a, 0x001a, 0x53a7, 0x51a7, 0x52a7, 0x001a, 0x001a, 0x001a, 0xeda8, 0x001a, 0xeca8, 0xd4cb, 0xd1cb, 0xd2cb, 0x001a, 0xd0cb, 0xeea8, 0xeaa8, 0xe9a8, 0x001a, 0xeba8, 0xe8a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefa8, 0x001a, 0x63ab, 0xf0cd, 0x001a, 0xd3cb, 0x68ab, 0x001a, 0xf1cd, 0x64ab, 0x67ab, 0x66ab, 0x65ab, 0x62ab, 0x001a, 0x001a, 0x001a, 0xe8d0, 0x001a, 0xe7ad, 0xebd0, 0xe5ad, 0x001a, 0x001a, 0x001a, 0xe7d0, 0xe8ad, 0xe6ad, 0xe9ad, 0xe9d0, 0xead0, 0x001a, 0xe6d0, 0xecd0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1b3, 0xc5b0, 0x69d4, 0x6bd4, 0x6ad4, 0x6cd4, 0xc6b0, 0x001a, 0x001a, 0xceb3, 0x001a, 0xcfb3, 0xd0b3, 0x001a, 0xd0b6, 0xc7dc, 0x001a, 0xc6dc, 0xc8dc, 0xc9dc, 0xd1b6, 0x001a, 0xcfb6, 0x41e1, 0x42e1, 0xbbb9, 0xbab9, 0x5ae3, 0x001a, 0x001a, 0x40bc, 0x41bc, 0x42bc, 0x44bc, 0xf2e4, 0xf3e4, 0x43bc, 0x001a, 0x001a, 0x001a, 0xafbe, 0x001a, 0xb0be, 0x001a, 0x001a, 0xedf1, 0xc3f5, 0xc2f5, 0xd1f7, 0x001a, 0x4fa4, 0x001a, 0x001a, 0x001a, 0x5ca5, 0x5ba5, 0x001a, 0x001a, 0x48a6, 0x001a, 0x001a, 0xc0c9, 0x001a, 0x001a, 0x55a7, 0x56a7, 0x54a7, 0x57a7, 0x6fca, 0x70ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1a8, 0xd5cb, 0x001a, 0xf0a8, 0x001a, 0xf2cd, 0x6cab, 0xf3cd, 0x6bab, 0x001a, 0x001a, 0x001a, 0x69ab, 0x001a, 0x6aab, 0x001a, 0x001a, 0x001a, 0xedd0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7b0, 0x6ed4, 0x001a, 0xcab0, 0x6dd4, 0xe5b1, 0xc9b0, 0xc8b0, 0x001a, 0xd4b3, 0x001a, 0xd3b3, 0xd2b3, 0xd2b6, 0x001a, 0x001a, 0xd5b6, 0xd6b6, 0xd4b6, 0x001a, 0xd3b6, 0x001a, 0x001a, 0x43e1, 0x001a, 0x44e1, 0x001a, 0x001a, 0x001a, 0xf5e4, 0x45bc, 0xf4e4, 0x001a, 0xb1be, 0xbfec, 0x79c0, 0x001a, 0xeef1, 0x55c4, 0x001a, 0x63a4, 0xc3a4, 0x56c9, 0x001a, 0xc4a4, 0xc5a4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5da5, 0x5ea5, 0x001a, 0x49a6, 0x71ca, 0xd6cb, 0xd7cb, 0x001a, 0x6dab, 0xeed0, 0xccb0, 0xcbb0, 0x63d8, 0x62d8, 0x001a, 0x001a, 0x50a4, 0xc6a4, 0x5fa5, 0x001a, 0xcdb0, 0x43c9, 0x001a, 0x6cc9, 0x60a5, 0x001a, 0xc2c9, 0x4ba6, 0x4aa6, 0xc1c9, 0x58a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeaad, 0x001a, 0x001a, 0x6fd4, 0x001a, 0xd7b6, 0x45e1, 0xbcb9, 0x001a, 0x001a, 0xfae8, 0x001a, 0x001a, 0xfdf3, 0x001a, 0xc7a4, 0x001a, 0x001a, 0xd8cb, 0xf4cd, 0xd0b0, 0xceb0, 0xcfb0, 0xcca2, 0x001a, 0x64a4, 0xcda2, 0xcea2, 0x001a, 0xc9a4, 0xc8a4, 0x63a5, 0x62a5, 0x001a, 0x6dc9, 0xc3c9, 0x001a, 0x001a, 0x001a, 0xf5a8, 0xf2a8, 0xf4a8, 0xf3a8, 0x001a, 0x001a, 0x6eab, 0x001a, 0x001a, 0xd5b3, 0x001a, 0x52a4, 0x001a, 0xcba4, 0x001a, 0x65a5, 0x64a5, 0x001a, 0x72ca, 0x001a, 0x001a, 0xf6a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x57c9, 0x001a, 0x67a5, 0x66a5, 0x4ca6, 0x4da6, 0x73ca, 0x59a7, 0x001a, 0x5aa7, 0x001a, 0xf7a8, 0xf8a8, 0xf9a8, 0x001a, 0x6fab, 0xf5cd, 0x001a, 0x001a, 0xebad, 0x001a, 0x001a, 0x44c9, 0x001a, 0xcca4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4c9, 0x001a, 0x001a, 0x001a, 0x74ca, 0x75ca, 0x001a, 0x001a, 0xd9cb, 0x001a, 0xdacb, 0x001a, 0xf7cd, 0xf6cd, 0xf9cd, 0xf8cd, 0x70ab, 0x001a, 0x70d4, 0xedad, 0xefd0, 0xecad, 0x001a, 0x001a, 0x001a, 0x001a, 0x64d8, 0xd6b3, 0x001a, 0x65d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x46e1, 0xbdb9, 0x001a, 0x001a, 0x001a, 0x001a, 0x46bc, 0x001a, 0xeff1, 0x001a, 0x001a, 0x001a, 0x001a, 0x58c9, 0x001a, 0x68a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1b0, 0x001a, 0x001a, 0x001a, 0x001a, 0x53a4, 0x65a4, 0xcea4, 0xcda4, 0x001a, 0xcfa4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfba8, 0x001a, 0xfaa8, 0xfca8, 0x001a, 0x001a, 0x001a, 0x71ab, 0x001a, 0x001a, 0x001a, 0xeead, 0x001a, 0xfbe8, 0x4fc2, 0x66a4, 0x6aa5, 0x79a5, 0x74a5, 0x001a, 0x6fa5, 0x6ea5, 0x75a5, 0x73a5, 0x6ca5, 0x7aa5, 0x6da5, 0x69a5, 0x78a5, 0x77a5, 0x76a5, 0x6ba5, 0x001a, 0x72a5, 0x001a, 0x001a, 0x71a5, 0x001a, 0x001a, 0x7ba5, 0x70a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x53a6, 0x001a, 0x59a6, 0x55a6, 0x001a, 0x5ba6, 0xc5c9, 0x58a6, 0x4ea6, 0x51a6, 0x54a6, 0x50a6, 0x57a6, 0x5aa6, 0x4fa6, 0x52a6, 0x56a6, 0x5ca6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7eca, 0x7bca, 0x001a, 0x67a7, 0x7cca, 0x5ba7, 0x5da7, 0x75a7, 0x70a7, 0x001a, 0x001a, 0x001a, 0xa5ca, 0x7dca, 0x5fa7, 0x61a7, 0xa4ca, 0x68a7, 0x78ca, 0x74a7, 0x76a7, 0x5ca7, 0x6da7, 0x001a, 0x76ca, 0x73a7, 0x001a, 0x64a7, 0x001a, 0x6ea7, 0x6fa7, 0x77ca, 0x6ca7, 0x6aa7, 0x001a, 0x6ba7, 0x71a7, 0xa1ca, 0x5ea7, 0x001a, 0x72a7, 0xa3ca, 0x66a7, 0x63a7, 0x001a, 0x7aca, 0x62a7, 0xa6ca, 0x65a7, 0x001a, 0x69a7, 0x001a, 0x001a, 0x001a, 0x60a7, 0xa2ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x79ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebcb, 0xeacb, 0x4fa9, 0xedcb, 0xefcb, 0xe4cb, 0xe7cb, 0xeecb, 0x50a9, 0x001a, 0x001a, 0xe1cb, 0xe5cb, 0x001a, 0x001a, 0xe9cb, 0x49ce, 0x4ba9, 0x4dce, 0xfda8, 0xe6cb, 0xfea8, 0x4ca9, 0x45a9, 0x41a9, 0x001a, 0xe2cb, 0x44a9, 0x49a9, 0x52a9, 0xe3cb, 0xdccb, 0x43a9, 0xddcb, 0xdfcb, 0x001a, 0x46a9, 0x001a, 0x48a9, 0xdbcb, 0xe0cb, 0x001a, 0x001a, 0x51a9, 0x4da9, 0xe8cb, 0x53a9, 0x001a, 0x4aa9, 0xdecb, 0x47a9, 0x001a, 0x001a, 0x42a9, 0x40a9, 0x001a, 0xeccb, 0x001a, 0x4ea9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x48ce, 0xfbcd, 0x4bce, 0x001a, 0x001a, 0xfdcd, 0x78ab, 0xa8ab, 0x74ab, 0xa7ab, 0x7dab, 0xa4ab, 0x72ab, 0xfccd, 0x43ce, 0xa3ab, 0x4fce, 0xa5ab, 0x001a, 0x79ab, 0x001a, 0x001a, 0x45ce, 0x42ce, 0x77ab, 0x001a, 0xfacd, 0xa6ab, 0x4ace, 0x7cab, 0x4cce, 0xa9ab, 0x73ab, 0x7eab, 0x7bab, 0x40ce, 0xa1ab, 0x46ce, 0x47ce, 0x7aab, 0xa2ab, 0x76ab, 0x001a, 0x001a, 0x001a, 0x001a, 0x75ab, 0xfecd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x44ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ece, 0x001a, 0x44d1, 0xfbad, 0xf1d0, 0x001a, 0xf6d0, 0xf4ad, 0x40ae, 0xf4d0, 0xefad, 0xf9ad, 0xfead, 0xfbd0, 0x001a, 0xfaad, 0xfdad, 0x001a, 0x001a, 0xfed0, 0xf5ad, 0xf5d0, 0x001a, 0x001a, 0x001a, 0x42d1, 0x43d1, 0x001a, 0xf7ad, 0x41d1, 0xf3ad, 0x43ae, 0x001a, 0xf8d0, 0x001a, 0xf1ad, 0x001a, 0x46d1, 0xf9d0, 0xfdd0, 0xf6ad, 0x42ae, 0xfad0, 0xfcad, 0x40d1, 0x47d1, 0xa1d4, 0x001a, 0x45d1, 0x44ae, 0xf0ad, 0xfcd0, 0xf3d0, 0x001a, 0xf8ad, 0x001a, 0x001a, 0xf2d0, 0x001a, 0x001a, 0xf7d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0d0, 0x41ae, 0x001a, 0x001a, 0x77d4, 0x001a, 0xe4b0, 0xa7d4, 0xe2b0, 0xdfb0, 0x7cd4, 0xdbb0, 0xa2d4, 0xe6b0, 0x76d4, 0x7bd4, 0x7ad4, 0xf2ad, 0xe1b0, 0xa5d4, 0x001a, 0xa8d4, 0x73d4, 0x001a, 0xe8b3, 0x001a, 0xa9d4, 0xe7b0, 0x001a, 0xd9b0, 0xd6b0, 0x7ed4, 0xd3b0, 0x001a, 0xa6d4, 0x001a, 0xdab0, 0xaad4, 0x001a, 0x74d4, 0xa4d4, 0xddb0, 0x75d4, 0x78d4, 0x7dd4, 0x001a, 0x001a, 0xdeb0, 0xdcb0, 0xe8b0, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3b0, 0x001a, 0xd7b0, 0xd2b1, 0x001a, 0xd8b0, 0x79d4, 0xe5b0, 0xe0b0, 0xa3d4, 0xd5b0, 0x001a, 0x001a, 0x001a, 0xd4b0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x71d4, 0x72d4, 0x6ad8, 0x001a, 0x001a, 0x001a, 0xd7b3, 0xdab3, 0x75d8, 0xeeb3, 0x78d8, 0xd8b3, 0x71d8, 0xdeb3, 0xe4b3, 0xbdb5, 0x001a, 0x001a, 0xe2b3, 0x6ed8, 0xefb3, 0xdbb3, 0xe3b3, 0x76d8, 0xd7dc, 0x7bd8, 0x6fd8, 0x001a, 0x66d8, 0x73d8, 0x6dd8, 0xe1b3, 0x79d8, 0x001a, 0x001a, 0xddb3, 0xf1b3, 0xeab3, 0x001a, 0xdfb3, 0xdcb3, 0x001a, 0xe7b3, 0x001a, 0x7ad8, 0x6cd8, 0x72d8, 0x74d8, 0x68d8, 0x77d8, 0xd9b3, 0x67d8, 0x001a, 0xe0b3, 0xf0b3, 0xecb3, 0x69d8, 0xe6b3, 0x001a, 0x001a, 0xedb3, 0xe9b3, 0xe5b3, 0x001a, 0x70d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebb3, 0x001a, 0x001a, 0x001a, 0xd5dc, 0xd1dc, 0x001a, 0xe0dc, 0xcadc, 0xd3dc, 0xe5b6, 0xe6b6, 0xdeb6, 0xdcdc, 0xe8b6, 0xcfdc, 0xcedc, 0xccdc, 0xdedc, 0xdcb6, 0xd8dc, 0xcddc, 0xdfb6, 0xd6dc, 0xdab6, 0xd2dc, 0xd9dc, 0xdbdc, 0x001a, 0x001a, 0xdfdc, 0xe3b6, 0xcbdc, 0xddb6, 0xd0dc, 0x001a, 0xd8b6, 0x001a, 0xe4b6, 0xdadc, 0xe0b6, 0xe1b6, 0xe7b6, 0xdbb6, 0x5fa2, 0xd9b6, 0xd4dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2b6, 0x001a, 0x001a, 0xdddc, 0x001a, 0x001a, 0x001a, 0xcdb9, 0xc8b9, 0x001a, 0x55e1, 0x51e1, 0x001a, 0x4be1, 0xc2b9, 0xbeb9, 0x54e1, 0xbfb9, 0x4ee1, 0x50e1, 0x001a, 0x53e1, 0x001a, 0xc4b9, 0x001a, 0xcbb9, 0xc5b9, 0x001a, 0x001a, 0x49e1, 0xc6b9, 0xc7b9, 0x4ce1, 0xccb9, 0x001a, 0x4ae1, 0x4fe1, 0xc3b9, 0x48e1, 0xc9b9, 0xc1b9, 0x001a, 0x001a, 0x001a, 0xc0b9, 0x4de1, 0x52e1, 0x001a, 0xcab9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x47e1, 0x001a, 0x4dbc, 0x47e5, 0x001a, 0x44e5, 0x001a, 0x47bc, 0x53bc, 0x54bc, 0x001a, 0x4abc, 0x42e5, 0x4cbc, 0xf9e4, 0x52bc, 0x001a, 0x46e5, 0x49bc, 0x48e5, 0x48bc, 0x001a, 0x43e5, 0x45e5, 0x4bbc, 0x41e5, 0xfae4, 0xf7e4, 0x001a, 0x001a, 0x6bd8, 0xfde4, 0x001a, 0xf6e4, 0xfce4, 0xfbe4, 0x001a, 0xf8e4, 0x001a, 0x4fbc, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ebc, 0x001a, 0x001a, 0x001a, 0x50bc, 0xfee4, 0xb2be, 0x40e5, 0x001a, 0x001a, 0x001a, 0x45e9, 0x001a, 0xfde8, 0x001a, 0xbebe, 0x42e9, 0xb6be, 0xbabe, 0x41e9, 0x001a, 0xb9be, 0xb5be, 0xb8be, 0xb3be, 0xbdbe, 0x43e9, 0xfee8, 0xbcbe, 0xfce8, 0xbbbe, 0x44e9, 0x40e9, 0x51bc, 0x001a, 0xbfbe, 0x46e9, 0xb7be, 0xb4be, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6ec, 0xc8ec, 0x7bc0, 0xc9ec, 0xc7ec, 0xc5ec, 0xc4ec, 0x7dc0, 0xc3ec, 0x7ec0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1ec, 0xc2ec, 0x7ac0, 0xa1c0, 0x7cc0, 0x001a, 0x001a, 0xc0ec, 0x001a, 0x50c2, 0x001a, 0xbcef, 0xbaef, 0xbfef, 0xbdef, 0x001a, 0xbbef, 0xbeef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x60c3, 0xf2f1, 0xf3f1, 0x56c4, 0x001a, 0xf4f1, 0xf0f1, 0xf5f1, 0xf1f1, 0x51c2, 0x001a, 0x001a, 0x001a, 0xfef3, 0x41f4, 0x59c4, 0x40f4, 0x58c4, 0x57c4, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ac4, 0xc5f5, 0xc6f5, 0x001a, 0xdac4, 0xd9c4, 0xdbc4, 0xc4f5, 0x001a, 0xd8f6, 0xd7f6, 0x001a, 0x6dc5, 0x6fc5, 0x6ec5, 0xd9f6, 0xc8c5, 0xa6f8, 0x001a, 0x001a, 0x001a, 0xf1c5, 0x001a, 0xa5f8, 0xeef8, 0x001a, 0x001a, 0x49c9, 0x001a, 0x001a, 0x7da5, 0x7ca5, 0x001a, 0x5fa6, 0x5ea6, 0xc7c9, 0x5da6, 0xc6c9, 0x001a, 0x001a, 0x79a7, 0xa9ca, 0x001a, 0xa8ca, 0x001a, 0x001a, 0x77a7, 0x7aa7, 0x001a, 0x001a, 0xa7ca, 0x001a, 0x78a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0cb, 0x001a, 0xf1cb, 0x54a9, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaab, 0x001a, 0x48d1, 0x49d1, 0x45ae, 0x46ae, 0x001a, 0x001a, 0xacd4, 0xe9b0, 0xebb0, 0xabd4, 0xeab0, 0x7cd8, 0xf2b3, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9b6, 0xeab6, 0xe1dc, 0x001a, 0xcfb9, 0x001a, 0xceb9, 0x001a, 0x49e5, 0x48e9, 0x47e9, 0x001a, 0x6bf9, 0x67a4, 0x59c9, 0x001a, 0x6ec9, 0x6fc9, 0x001a, 0x001a, 0x001a, 0x001a, 0x62a6, 0x66a6, 0xc9c9, 0x001a, 0x64a6, 0x63a6, 0xc8c9, 0x65a6, 0x61a6, 0x001a, 0x001a, 0x60a6, 0xcac9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6a7, 0x001a, 0x001a, 0xa3a7, 0x001a, 0x7da7, 0xaaca, 0x001a, 0x001a, 0x001a, 0xabca, 0x001a, 0xa1a7, 0x001a, 0xadca, 0x7ba7, 0xaeca, 0xacca, 0x7ea7, 0xa2a7, 0xa5a7, 0xa4a7, 0x7ca7, 0xafca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x59a9, 0xfecb, 0x001a, 0x5ba9, 0x001a, 0x5aa9, 0x001a, 0x40cc, 0x58a9, 0x57a9, 0xf5cb, 0x001a, 0xf4cb, 0x001a, 0xf2cb, 0xf7cb, 0xf6cb, 0xf3cb, 0xfccb, 0xfdcb, 0xfacb, 0xf8cb, 0x56a9, 0x001a, 0x001a, 0x001a, 0xfbcb, 0x5ca9, 0x41cc, 0x001a, 0x001a, 0xf9cb, 0x001a, 0xabab, 0x55a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacab, 0x54ce, 0x001a, 0x001a, 0x5ace, 0x001a, 0x001a, 0x001a, 0xb2ab, 0x58ce, 0x5ece, 0x001a, 0x55ce, 0x59ce, 0x5bce, 0x5dce, 0x57ce, 0x001a, 0x56ce, 0x51ce, 0x52ce, 0xadab, 0x001a, 0xafab, 0xaeab, 0x53ce, 0x5cce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1ab, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50ce, 0x53d1, 0x001a, 0x52d1, 0x57d1, 0x4ed1, 0x001a, 0x51d1, 0x50d1, 0x001a, 0x54d1, 0x001a, 0x58d1, 0x47ae, 0x4aae, 0x001a, 0x001a, 0x4fd1, 0x55d1, 0x001a, 0x001a, 0x001a, 0x49ae, 0x4ad1, 0x001a, 0xb0ab, 0xbad4, 0x56d1, 0x001a, 0x4dd1, 0x001a, 0x48ae, 0x4cd1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1d4, 0x001a, 0x001a, 0xecb0, 0xf0b0, 0xc1d4, 0xafd4, 0xbdd4, 0xf1b0, 0xbfd4, 0x001a, 0xc5d4, 0x001a, 0xc9d4, 0x001a, 0x001a, 0xc0d4, 0xb4d4, 0xbcd4, 0x001a, 0xcad4, 0xc8d4, 0xbed4, 0xb9d4, 0xb2d4, 0xa6d8, 0xb0d4, 0xf5b0, 0xb7d4, 0xf6b0, 0xf2b0, 0xadd4, 0xc3d4, 0xb5d4, 0x001a, 0x001a, 0xb3d4, 0xc6d4, 0xf3b0, 0x001a, 0xccd4, 0xedb0, 0xefb0, 0xbbd4, 0xb6d4, 0x4bae, 0xeeb0, 0xb8d4, 0xc7d4, 0xcbd4, 0xc2d4, 0x001a, 0xc4d4, 0x001a, 0x001a, 0x001a, 0xaed4, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1d8, 0x001a, 0xaad8, 0xa9d8, 0xfab3, 0xa2d8, 0x001a, 0xfbb3, 0xf9b3, 0x001a, 0xa4d8, 0xf6b3, 0xa8d8, 0x001a, 0xa3d8, 0xa5d8, 0x7dd8, 0xf4b3, 0x001a, 0xb2d8, 0xb1d8, 0xaed8, 0xf3b3, 0xf7b3, 0xf8b3, 0x4bd1, 0xabd8, 0xf5b3, 0xf4b0, 0xadd8, 0x7ed8, 0xb0d8, 0xafd8, 0x001a, 0xb3d8, 0x001a, 0xefdc, 0x001a, 0xacd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7d8, 0xe7dc, 0xf4b6, 0xf7b6, 0xf2b6, 0xe6dc, 0xeadc, 0xe5dc, 0x001a, 0xecb6, 0xf6b6, 0xe2dc, 0xf0b6, 0xe9dc, 0x001a, 0xeeb6, 0xedb6, 0xecdc, 0xefb6, 0xeedc, 0x001a, 0xebdc, 0xebb6, 0x001a, 0x001a, 0x001a, 0xf5b6, 0xf0dc, 0xe4dc, 0xeddc, 0x001a, 0x001a, 0xe3dc, 0x001a, 0x001a, 0xf1b6, 0x001a, 0xf3b6, 0x001a, 0xe8dc, 0x001a, 0xf1dc, 0x001a, 0x001a, 0x5de1, 0xd0b9, 0x63e1, 0x001a, 0x001a, 0xd5b9, 0x5fe1, 0x66e1, 0x57e1, 0xd7b9, 0xd1b9, 0x5ce1, 0x55bc, 0x5be1, 0x64e1, 0xd2b9, 0x001a, 0xd6b9, 0x5ae1, 0x60e1, 0x65e1, 0x56e1, 0xd4b9, 0x5ee1, 0x001a, 0x001a, 0x62e1, 0x68e1, 0x58e1, 0x61e1, 0x001a, 0xd3b9, 0x67e1, 0x001a, 0x001a, 0x001a, 0x59e1, 0x001a, 0x001a, 0x001a, 0x59bc, 0x4be5, 0x57bc, 0x56bc, 0x4de5, 0x52e5, 0x001a, 0x4ee5, 0x001a, 0x51e5, 0x5cbc, 0x001a, 0xa5be, 0x5bbc, 0x001a, 0x4ae5, 0x50e5, 0x001a, 0x5abc, 0x4fe5, 0x001a, 0x4ce5, 0x001a, 0x58bc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4de9, 0xd9f9, 0x4fe9, 0x4ae9, 0xc1be, 0x4ce9, 0x001a, 0xc0be, 0x4ee9, 0x001a, 0x001a, 0xc3be, 0x50e9, 0xc2be, 0x49e9, 0x4be9, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5c0, 0xccec, 0x001a, 0xa4c0, 0xcdec, 0xa3c0, 0xcbec, 0xa2c0, 0xcaec, 0x001a, 0x53c2, 0x52c2, 0xf6f1, 0xf8f1, 0x001a, 0xf7f1, 0x61c3, 0x62c3, 0x001a, 0x001a, 0x63c3, 0x42f4, 0x5bc4, 0x001a, 0x001a, 0xd3f7, 0xd2f7, 0xf2c5, 0x001a, 0x68a4, 0xd0a4, 0x001a, 0x001a, 0xa7a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x5fce, 0x001a, 0x001a, 0x001a, 0x001a, 0xfcb3, 0xfdb3, 0x001a, 0xf2dc, 0xd8b9, 0x69e1, 0x53e5, 0x001a, 0x001a, 0x001a, 0x5ac9, 0x001a, 0x001a, 0xb0ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x42cc, 0x60ce, 0x59d1, 0x4cae, 0x001a, 0x001a, 0xf9f1, 0x001a, 0xdcc4, 0x69a4, 0x7ea5, 0x70c9, 0x001a, 0x67a6, 0x68a6, 0x001a, 0x5da9, 0x001a, 0x001a, 0x001a, 0xf7b0, 0x001a, 0xdab9, 0x001a, 0xdbb9, 0xd9b9, 0x001a, 0x6aa4, 0x001a, 0xd1a4, 0xd3a4, 0xd2a4, 0x5bc9, 0xd4a4, 0xa1a5, 0x71c9, 0x001a, 0xa2a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x69a6, 0x6aa6, 0x001a, 0x001a, 0x001a, 0xcbc9, 0x001a, 0xa8a7, 0x001a, 0xb1ca, 0x001a, 0x001a, 0x001a, 0x61a9, 0x43cc, 0x001a, 0x5fa9, 0x60a9, 0x5ea9, 0x5ad1, 0x001a, 0x001a, 0x001a, 0xb6ab, 0xb5ab, 0xb7ab, 0xb4ab, 0x001a, 0x61ce, 0x62a9, 0xb3ab, 0x001a, 0x4dae, 0x4eae, 0x001a, 0x4fae, 0x001a, 0xcdd4, 0x001a, 0x001a, 0x001a, 0xfeb3, 0xb4d8, 0xf8b0, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8b6, 0x001a, 0xddb9, 0xdcb9, 0x6ae1, 0x001a, 0x5dbc, 0xc4be, 0x001a, 0xc0ef, 0xdaf6, 0xd4f7, 0x6ba4, 0xa3a5, 0x001a, 0xa4a5, 0xd1c9, 0x6ca6, 0x6fa6, 0x001a, 0xcfc9, 0xcdc9, 0x6ea6, 0xd0c9, 0xd2c9, 0xccc9, 0x71a6, 0x70a6, 0x6da6, 0x6ba6, 0xcec9, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3a7, 0x001a, 0x001a, 0xb0a7, 0xb6ca, 0xb9ca, 0xb8ca, 0x001a, 0xaaa7, 0xb2a7, 0x001a, 0x001a, 0xafa7, 0xb5ca, 0xb3ca, 0xaea7, 0x001a, 0x001a, 0x001a, 0xa9a7, 0xaca7, 0x001a, 0xb4ca, 0xbbca, 0xb7ca, 0xada7, 0xb1a7, 0xb4a7, 0xb2ca, 0xbaca, 0xaba7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x67a9, 0x6fa9, 0x001a, 0x4fcc, 0x48cc, 0x70a9, 0x53cc, 0x44cc, 0x4bcc, 0x001a, 0x001a, 0x66a9, 0x45cc, 0x64a9, 0x4ccc, 0x50cc, 0x63a9, 0x001a, 0x51cc, 0x4acc, 0x001a, 0x4dcc, 0x001a, 0x72a9, 0x69a9, 0x54cc, 0x52cc, 0x001a, 0x6ea9, 0x6ca9, 0x49cc, 0x6ba9, 0x47cc, 0x46cc, 0x6aa9, 0x68a9, 0x71a9, 0x6da9, 0x65a9, 0x001a, 0x4ecc, 0x001a, 0xb9ab, 0x001a, 0xc0ab, 0x6fce, 0xb8ab, 0x67ce, 0x63ce, 0x001a, 0x73ce, 0x62ce, 0x001a, 0xbbab, 0x6cce, 0xbeab, 0xc1ab, 0x001a, 0xbcab, 0x70ce, 0xbfab, 0x001a, 0x56ae, 0x76ce, 0x64ce, 0x001a, 0x001a, 0x66ce, 0x6dce, 0x71ce, 0x75ce, 0x72ce, 0x6bce, 0x6ece, 0x001a, 0x001a, 0x68ce, 0xc3ab, 0x6ace, 0x69ce, 0x74ce, 0xbaab, 0x65ce, 0xc2ab, 0x001a, 0xbdab, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5cae, 0x62d1, 0x001a, 0x5bae, 0x001a, 0x001a, 0x60d1, 0x001a, 0x50ae, 0x001a, 0x55ae, 0x001a, 0x5fd1, 0x5cd1, 0x61d1, 0x51ae, 0x5bd1, 0x001a, 0x54ae, 0x52ae, 0x001a, 0x63d1, 0x53ae, 0x57ae, 0x001a, 0x001a, 0x58ae, 0x001a, 0x5aae, 0x001a, 0x001a, 0x001a, 0x59ae, 0x001a, 0x001a, 0x001a, 0x5dd1, 0x5ed1, 0x001a, 0x001a, 0x001a, 0x001a, 0x64d1, 0x001a, 0xd4d4, 0xf9b0, 0xc2d8, 0xd3d4, 0xe6d4, 0x001a, 0x001a, 0x40b1, 0x001a, 0xe4d4, 0x001a, 0xfeb0, 0xfab0, 0xedd4, 0xddd4, 0xe0d4, 0x001a, 0x43b1, 0xead4, 0xe2d4, 0xfbb0, 0x44b1, 0x001a, 0xe7d4, 0xe5d4, 0x001a, 0x001a, 0xd6d4, 0xebd4, 0xdfd4, 0xdad4, 0x001a, 0xd0d4, 0xecd4, 0xdcd4, 0xcfd4, 0x001a, 0x42b1, 0xe1d4, 0xeed4, 0xded4, 0xd2d4, 0xd7d4, 0xced4, 0x001a, 0x41b1, 0x001a, 0xdbd4, 0xd8d4, 0xfcb0, 0xd1d4, 0x001a, 0xe9d4, 0xfdb0, 0x001a, 0xd9d4, 0xd5d4, 0x001a, 0x001a, 0xe8d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x40b4, 0xbbd8, 0x001a, 0xb8d8, 0xc9d8, 0xbdd8, 0xcad8, 0x001a, 0x42b4, 0x001a, 0x001a, 0x001a, 0xc6d8, 0xc3d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4d8, 0xc7d8, 0xcbd8, 0x001a, 0xe3d4, 0xcdd8, 0x47dd, 0x001a, 0x43b4, 0xced8, 0xb6d8, 0xc0d8, 0x001a, 0xc5d8, 0x001a, 0x001a, 0x41b4, 0x44b4, 0xccd8, 0xcfd8, 0xbad8, 0xb7d8, 0x001a, 0x001a, 0xb9d8, 0x001a, 0x001a, 0xbed8, 0xbcd8, 0x45b4, 0x001a, 0xc8d8, 0x001a, 0x001a, 0xbfd8, 0x001a, 0xc1d8, 0xb5d8, 0xfadc, 0xf8dc, 0x42b7, 0x40b7, 0x43dd, 0xf9dc, 0x44dd, 0x40dd, 0xf7dc, 0x46dd, 0xf6dc, 0xfddc, 0xfeb6, 0xfdb6, 0xfcb6, 0xfbdc, 0x41dd, 0xf9b6, 0x41b7, 0x001a, 0xf4dc, 0x001a, 0xfedc, 0xf3dc, 0xfcdc, 0xfab6, 0x42dd, 0xf5dc, 0xfbb6, 0x45dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ee1, 0xe2b9, 0xe1b9, 0xe3b9, 0x7ae1, 0x70e1, 0x76e1, 0x6be1, 0x79e1, 0x78e1, 0x7ce1, 0x75e1, 0xdeb9, 0x74e1, 0xe4b9, 0x001a, 0x6de1, 0xdfb9, 0x001a, 0x7be1, 0xe0b9, 0x6fe1, 0x72e1, 0x77e1, 0x71e1, 0x6ce1, 0x001a, 0x001a, 0x001a, 0x001a, 0x73e1, 0x55e5, 0x61bc, 0x58e5, 0x57e5, 0x5ae5, 0x5ce5, 0xdcf9, 0x5fbc, 0x001a, 0x56e5, 0x001a, 0x54e5, 0x001a, 0x5de5, 0x5be5, 0x59e5, 0x001a, 0x5fe5, 0x001a, 0x5ee5, 0x63bc, 0x5ebc, 0x001a, 0x60bc, 0x62bc, 0x001a, 0x001a, 0x60e5, 0x57e9, 0x001a, 0x001a, 0x56e9, 0x55e9, 0x001a, 0x58e9, 0x51e9, 0x001a, 0x52e9, 0x5ae9, 0x53e9, 0x001a, 0xc5be, 0x5ce9, 0x001a, 0x5be9, 0x54e9, 0x001a, 0xd1ec, 0xa8c0, 0xcfec, 0xd4ec, 0xd3ec, 0x59e9, 0x001a, 0xa7c0, 0x001a, 0xd2ec, 0xceec, 0xd6ec, 0xd5ec, 0xa6c0, 0x001a, 0xd0ec, 0x001a, 0xc6be, 0x001a, 0x001a, 0x001a, 0x54c2, 0x001a, 0x001a, 0x001a, 0xc1ef, 0xfaf1, 0xfbf1, 0xfcf1, 0x5cc4, 0x001a, 0x001a, 0x5dc4, 0x001a, 0x43f4, 0x001a, 0xc8f5, 0xc7f5, 0x001a, 0x001a, 0xdbf6, 0xdcf6, 0xd5f7, 0xa7f8, 0x001a, 0x6ca4, 0x6da4, 0x001a, 0x6ea4, 0xd5a4, 0xa5a5, 0xd3c9, 0x72a6, 0x73a6, 0x001a, 0xb7a7, 0xb8a7, 0xb6a7, 0xb5a7, 0x001a, 0x73a9, 0x001a, 0x001a, 0x55cc, 0x75a9, 0x74a9, 0x56cc, 0x001a, 0x001a, 0x001a, 0xc4ab, 0x001a, 0x5dae, 0x65d1, 0x001a, 0xf0d4, 0x001a, 0x45b1, 0x47b4, 0xefd4, 0x46b4, 0x001a, 0xe5b9, 0x001a, 0x7de1, 0xc7be, 0x001a, 0xa9c0, 0xd7ec, 0x001a, 0x5ec4, 0x001a, 0x70c5, 0x001a, 0x72c9, 0x001a, 0xa6a5, 0x73c9, 0x76a6, 0x001a, 0x74a6, 0x75a6, 0x77a6, 0x001a, 0xbaa7, 0xb9a7, 0x001a, 0xbcca, 0xbba7, 0x001a, 0x001a, 0xbdca, 0x57cc, 0x001a, 0x58cc, 0x001a, 0x76a9, 0x78a9, 0x7aa9, 0x77a9, 0x7ba9, 0x79a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ab, 0xc5ab, 0xc7ab, 0xc9ab, 0xc6ab, 0x66d1, 0x77ce, 0x001a, 0x001a, 0x001a, 0x68d1, 0x67d1, 0x63ae, 0x001a, 0x5fae, 0x001a, 0x001a, 0x60ae, 0x62ae, 0x64ae, 0x61ae, 0x001a, 0x66ae, 0x65ae, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ab1, 0xf2d4, 0xf1d4, 0x49b1, 0x001a, 0x48b1, 0x47b1, 0x4bb1, 0x46b1, 0x001a, 0x001a, 0xd5d8, 0xd2d8, 0x49b4, 0xd1d8, 0xd6d8, 0x001a, 0x4bb4, 0xd4d8, 0x48b4, 0x4ab4, 0xd3d8, 0x001a, 0x48dd, 0x001a, 0x49dd, 0x4add, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6b9, 0xeeb9, 0x7ee1, 0xe8b9, 0xecb9, 0xa1e1, 0xedb9, 0xe9b9, 0xeab9, 0xe7b9, 0xebb9, 0x66bc, 0xd0d8, 0x67bc, 0x65bc, 0x001a, 0x64bc, 0x5de9, 0xc8be, 0xd8ec, 0xd9ec, 0x001a, 0x001a, 0x64c3, 0x5fc4, 0x001a, 0x6fa4, 0x001a, 0x78a6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaab, 0x001a, 0x69d1, 0x67ae, 0x001a, 0x001a, 0x4eb1, 0x4db1, 0x4cb1, 0x4cb4, 0x4db4, 0xd7d8, 0xefb9, 0xc9be, 0x70a4, 0x5cc9, 0xd6a4, 0x74c9, 0x001a, 0x001a, 0xd4c9, 0x79a6, 0x001a, 0x001a, 0x001a, 0x7ca9, 0x001a, 0x001a, 0x001a, 0x001a, 0x4bdd, 0x001a, 0x001a, 0x71a4, 0x001a, 0xd7a4, 0xd5c9, 0x001a, 0x001a, 0xbeca, 0x001a, 0xbfca, 0x001a, 0xbca7, 0x001a, 0x001a, 0x001a, 0xd8d8, 0x4eb4, 0x001a, 0x4cdd, 0x001a, 0x001a, 0x001a, 0xaac0, 0x72a4, 0xa8a4, 0xd8a4, 0x75c9, 0xa7a5, 0x001a, 0xc0a7, 0xbfa7, 0xbda7, 0xbea7, 0x001a, 0x001a, 0x59cc, 0x7ea9, 0xa1a9, 0x5acc, 0x7da9, 0x001a, 0x001a, 0xceab, 0x78ce, 0xcdab, 0xcbab, 0xccab, 0x6aae, 0x68ae, 0x001a, 0x001a, 0x6bd1, 0x69ae, 0x6ad1, 0x001a, 0x5eae, 0xf3d4, 0x001a, 0x001a, 0x50b1, 0x51b1, 0x001a, 0x001a, 0x4fb1, 0x001a, 0xf0b9, 0xa2e1, 0x68bc, 0x69bc, 0x001a, 0x61e5, 0xabc0, 0xc2ef, 0xc3ef, 0x001a, 0xddc4, 0xa8f8, 0x4bc9, 0xd9a4, 0x001a, 0x73a4, 0x001a, 0x77c9, 0x76c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x7aa6, 0xd7c9, 0xd8c9, 0xd6c9, 0x001a, 0xd9c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7ca, 0x001a, 0xc2ca, 0xc4ca, 0xc6ca, 0xc3ca, 0xc4a7, 0xc0ca, 0x001a, 0xc1ca, 0xc1a7, 0xc2a7, 0xc5ca, 0xc8ca, 0xc3a7, 0xc9ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x68cc, 0x001a, 0x62cc, 0x5dcc, 0xa3a9, 0x65cc, 0x63cc, 0x5ccc, 0x69cc, 0x6ccc, 0x67cc, 0x60cc, 0xa5a9, 0x66cc, 0xa6a9, 0x61cc, 0x64cc, 0x5bcc, 0x5fcc, 0x6bcc, 0xa7a9, 0x001a, 0xa8a9, 0x001a, 0x5ecc, 0x6acc, 0xa2a9, 0xa4a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabce, 0xa4ce, 0xaace, 0xa3ce, 0xa5ce, 0x7dce, 0x7bce, 0x001a, 0xacce, 0xa9ce, 0x79ce, 0x001a, 0xd0ab, 0xa7ce, 0xa8ce, 0x001a, 0xa6ce, 0x7cce, 0x7ace, 0xcfab, 0xa2ce, 0x7ece, 0x001a, 0x001a, 0xa1ce, 0xadce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6fae, 0x001a, 0x6eae, 0x001a, 0x6cd1, 0x6bae, 0x6ed1, 0x001a, 0x70ae, 0x6fd1, 0x001a, 0x001a, 0x73ae, 0x001a, 0x71ae, 0x70d1, 0xaece, 0x72d1, 0x001a, 0x6dae, 0x001a, 0x6cae, 0x001a, 0x6dd1, 0x71d1, 0x72ae, 0x001a, 0x001a, 0x001a, 0x001a, 0x53b1, 0x52b1, 0x001a, 0x001a, 0x001a, 0xf5d4, 0xf9d4, 0xfbd4, 0x54b1, 0xfed4, 0x001a, 0x58b1, 0x41d5, 0x001a, 0x5ab1, 0x001a, 0x56b1, 0x5eb1, 0x001a, 0x5bb1, 0xf7d4, 0x55b1, 0x001a, 0xf6d4, 0xf4d4, 0x43d5, 0xf8d4, 0x001a, 0x57b1, 0x42d5, 0x5cb1, 0xfdd4, 0xfcd4, 0x5db1, 0xfad4, 0x59b1, 0x001a, 0x001a, 0x001a, 0x001a, 0x44d5, 0x001a, 0x40d5, 0xe7d8, 0xeed8, 0xe3d8, 0x51b4, 0xdfd8, 0xefd8, 0xd9d8, 0xecd8, 0xead8, 0xe4d8, 0x001a, 0xedd8, 0xe6d8, 0x001a, 0xded8, 0xf0d8, 0xdcd8, 0xe9d8, 0xdad8, 0x001a, 0xf1d8, 0x001a, 0x52b4, 0x001a, 0xebd8, 0x4fdd, 0xddd8, 0x4fb4, 0x001a, 0xe1d8, 0x001a, 0x50b4, 0xe0d8, 0xe5d8, 0x001a, 0x001a, 0xe2d8, 0x001a, 0x001a, 0x001a, 0xe8d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x53dd, 0x001a, 0x001a, 0x001a, 0x56dd, 0x4edd, 0x001a, 0x50dd, 0x001a, 0x55dd, 0x54dd, 0x43b7, 0x001a, 0xdbd8, 0x52dd, 0x001a, 0x001a, 0x44b7, 0x001a, 0x4ddd, 0x51dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9e1, 0x001a, 0xb0e1, 0xa7e1, 0x001a, 0xaee1, 0xa5e1, 0xade1, 0xb1e1, 0xa4e1, 0xa8e1, 0xa3e1, 0x001a, 0xf1b9, 0x001a, 0xa6e1, 0xf2b9, 0xace1, 0xabe1, 0xaae1, 0x001a, 0x001a, 0xafe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x65e5, 0x67e5, 0x6bbc, 0x68e5, 0x001a, 0x63e5, 0x001a, 0x62e5, 0x6ce5, 0x001a, 0x6ae5, 0x6abc, 0x6de5, 0x64e5, 0x69e5, 0x6be5, 0x66e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x61e9, 0x66e9, 0x60e9, 0x65e9, 0x001a, 0x5ee9, 0x68e9, 0x64e9, 0x69e9, 0x63e9, 0x5fe9, 0x67e9, 0x001a, 0x6ae9, 0x62e9, 0x001a, 0xdaec, 0xafc0, 0x001a, 0xadc0, 0x001a, 0xacc0, 0xaec0, 0x001a, 0x001a, 0xc4ef, 0x001a, 0x72f1, 0xfdf1, 0x001a, 0x001a, 0x44f4, 0x45f4, 0x001a, 0x60c4, 0x001a, 0xc9f5, 0x001a, 0xdec4, 0x001a, 0xcaf5, 0x001a, 0xdef6, 0x72c5, 0x001a, 0x71c5, 0xddf6, 0xc9c5, 0x001a, 0xd6f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x74a4, 0x7ba6, 0xdac9, 0xcaca, 0xb5a8, 0x5fb1, 0x001a, 0x001a, 0x75a4, 0xaaa5, 0xa9a5, 0xa8a5, 0x001a, 0x001a, 0xc5a7, 0x001a, 0x001a, 0x74ae, 0x001a, 0x57dd, 0x76a4, 0x77a4, 0x78a4, 0xdaa4, 0x001a, 0x001a, 0xd1ab, 0x001a, 0xafce, 0x001a, 0x001a, 0x001a, 0x53b4, 0x79a4, 0x5dc9, 0x001a, 0x001a, 0xaba5, 0xaca5, 0x78c9, 0x001a, 0x7ca6, 0x001a, 0x001a, 0x001a, 0xcbca, 0x001a, 0xc6a7, 0x001a, 0xccca, 0x001a, 0x001a, 0xaea9, 0x001a, 0x001a, 0x6ecc, 0xaca9, 0xaba9, 0x6dcc, 0xa9a9, 0x6fcc, 0xaaa9, 0xada9, 0x001a, 0xd2ab, 0x001a, 0xd4ab, 0xb3ce, 0xb0ce, 0xb1ce, 0xb2ce, 0xb4ce, 0xd3ab, 0x001a, 0x001a, 0x74d1, 0x73d1, 0x001a, 0x76ae, 0x001a, 0x75ae, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62b1, 0x46d5, 0x001a, 0x61b1, 0x63b1, 0x60b1, 0x001a, 0x001a, 0x001a, 0x001a, 0x55b4, 0x45d5, 0x001a, 0x56b4, 0xf3d8, 0x001a, 0x57b4, 0xf2d8, 0x54b4, 0x001a, 0x001a, 0x001a, 0x001a, 0x5add, 0x5cdd, 0x45b7, 0x5bdd, 0x59dd, 0x58dd, 0x001a, 0x001a, 0x001a, 0xb4e1, 0xf7b9, 0xf5b9, 0x001a, 0xf6b9, 0xb2e1, 0xb3e1, 0x001a, 0xf3b9, 0x71e5, 0x6fe5, 0x001a, 0x6dbc, 0x70e5, 0x6ebc, 0x6cbc, 0xf4b9, 0x001a, 0x001a, 0x6de9, 0x6be9, 0x6ce9, 0x6ee5, 0xdcec, 0xb0c0, 0xdbec, 0xc5ef, 0xc6ef, 0x6ee9, 0xfef1, 0x001a, 0x7aa4, 0xada5, 0x7ea6, 0xdbc9, 0x7da6, 0x001a, 0xafa9, 0x46b7, 0x001a, 0xdba4, 0xaea5, 0xd5ab, 0x58b4, 0x001a, 0x79c9, 0x001a, 0x7ac9, 0x001a, 0xdcc9, 0x001a, 0x001a, 0xc8a7, 0xd0ca, 0xceca, 0xc9a7, 0xcdca, 0xcfca, 0xd1ca, 0x001a, 0xc7a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3a9, 0xb4a9, 0xb1a9, 0x001a, 0x001a, 0xb0a9, 0xb8ce, 0xb2a9, 0x001a, 0x001a, 0x001a, 0xd6ab, 0x001a, 0xb7ce, 0xb9ce, 0xb6ce, 0xbace, 0xd7ab, 0x79ae, 0x75d1, 0x001a, 0x77d1, 0x77ae, 0x78d1, 0x78ae, 0x76d1, 0x001a, 0xb5ce, 0x47d5, 0x4ad5, 0x4bd5, 0x48d5, 0x67b1, 0x66b1, 0x64b1, 0x65b1, 0x49d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x68b1, 0x001a, 0x001a, 0x5ab4, 0x5bb4, 0x001a, 0x5cb4, 0x5ddd, 0x5fdd, 0x61dd, 0x48b7, 0x47b7, 0x59b4, 0x60dd, 0x5edd, 0x001a, 0xb8e1, 0x001a, 0x001a, 0xb6e1, 0xbce1, 0xf8b9, 0xbde1, 0xbae1, 0xf9b9, 0xb7e1, 0xb5e1, 0xbbe1, 0x70bc, 0x73e5, 0xb9e1, 0x72bc, 0x74e5, 0x71bc, 0x74bc, 0x75e5, 0x6fbc, 0x73bc, 0x001a, 0x73e9, 0x71e9, 0x70e9, 0x72e9, 0x6fe9, 0x001a, 0x001a, 0x66c3, 0x001a, 0x46f4, 0x47f4, 0x001a, 0xcbf5, 0xdff6, 0x55c6, 0x001a, 0x001a, 0xb5a9, 0xcaa7, 0x001a, 0x001a, 0xd8ab, 0x001a, 0x001a, 0x001a, 0x7ba4, 0xdca4, 0x001a, 0xafa5, 0xddc9, 0x001a, 0xcba7, 0xd2ca, 0x001a, 0xbbce, 0xd9ab, 0x001a, 0xfab9, 0x7ca4, 0x001a, 0x001a, 0x001a, 0xa1a6, 0x001a, 0x001a, 0x49b7, 0x7da4, 0xdda4, 0xdea4, 0x001a, 0xb1a5, 0xb0a5, 0x001a, 0xdec9, 0xa2a6, 0x001a, 0xd3ca, 0x001a, 0xcca7, 0x001a, 0x001a, 0x71cc, 0x72cc, 0x73cc, 0x001a, 0xb6a9, 0xb7a9, 0x70cc, 0xb8a9, 0x001a, 0x001a, 0x001a, 0xdaab, 0xbcce, 0x001a, 0x7ad1, 0x7aae, 0x001a, 0x79d1, 0x001a, 0x69b1, 0x4cd5, 0x6ab1, 0x4dd5, 0x001a, 0x001a, 0x001a, 0x5db4, 0x001a, 0x001a, 0x001a, 0x62dd, 0x001a, 0x001a, 0xbfe1, 0xbee1, 0x001a, 0xfbb9, 0x001a, 0x75bc, 0x76e5, 0xcabe, 0x74e9, 0xb1c0, 0x001a, 0x73c5, 0xd8f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x74cc, 0x001a, 0xbdce, 0x6bb1, 0xf4d8, 0x4ab7, 0x001a, 0x001a, 0x001a, 0x55c2, 0x001a, 0x001a, 0x001a, 0x001a, 0xcea7, 0x001a, 0xcda7, 0xdbab, 0x001a, 0x7bd1, 0x001a, 0x6db1, 0x43b3, 0x6eb1, 0x6cb1, 0x5eb4, 0x001a, 0xc0e1, 0xfcb9, 0x76bc, 0x001a, 0x4cc9, 0xdfc9, 0x001a, 0xd5ca, 0xcfa7, 0xd4ca, 0xd0a7, 0x001a, 0x001a, 0xbca9, 0x77cc, 0x76cc, 0xbba9, 0xb9a9, 0xbaa9, 0x75cc, 0x001a, 0x001a, 0xddab, 0xbece, 0xe0ab, 0xdcab, 0xe2ab, 0xdeab, 0xdfab, 0xe1ab, 0x001a, 0x001a, 0x001a, 0x7dae, 0x7cae, 0x7bae, 0x001a, 0x001a, 0x001a, 0x4fd5, 0x6fb1, 0x72b1, 0x70b1, 0x001a, 0x4ed5, 0x75b1, 0x001a, 0x71b1, 0x50d5, 0x74b1, 0x73b1, 0x001a, 0x001a, 0x001a, 0xf6d8, 0xf5d8, 0x001a, 0x61b4, 0x5fb4, 0x60b4, 0xf7d8, 0x4bb7, 0x64dd, 0x4cb7, 0x63dd, 0x001a, 0x001a, 0x77e5, 0x001a, 0x001a, 0x78bc, 0xc1e1, 0x77bc, 0x001a, 0xfdb9, 0x001a, 0xdeec, 0x75e9, 0xb2c0, 0xddec, 0x40f2, 0x48f4, 0x49f4, 0x001a, 0xdfa4, 0x001a, 0xb2a5, 0x001a, 0x001a, 0x001a, 0x7bc9, 0x001a, 0x001a, 0xd2a7, 0xd4a7, 0x001a, 0xe2c9, 0xd8ca, 0xd7ca, 0xd6ca, 0x001a, 0xe1c9, 0xe0c9, 0xa4a6, 0xd3a7, 0xd1a7, 0xa3a6, 0x001a, 0x001a, 0x001a, 0xbda9, 0x78cc, 0x001a, 0xbea9, 0xddca, 0x001a, 0xdfca, 0xdeca, 0x79cc, 0x001a, 0x001a, 0xdaca, 0x001a, 0xd8a7, 0xd6a7, 0x001a, 0xd9ca, 0xdbca, 0xe1ca, 0x001a, 0xd5a7, 0x001a, 0xdcca, 0xe5ca, 0xc0a9, 0x001a, 0xe2ca, 0xd7a7, 0x001a, 0xe0ca, 0xe3ca, 0x001a, 0xbfa9, 0x001a, 0xc1a9, 0xe4ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafcc, 0xa2cc, 0x7ecc, 0xaecc, 0xa9cc, 0xe7ab, 0xc2a9, 0xaacc, 0xadcc, 0xe3ab, 0xaccc, 0xc3a9, 0xc8a9, 0xc6a9, 0xa3cc, 0x001a, 0x7ccc, 0xa5cc, 0xcda9, 0xb0cc, 0xe4ab, 0xa6cc, 0x001a, 0xe5ab, 0xc9a9, 0xa8cc, 0x001a, 0xcdce, 0xe6ab, 0x7bcc, 0xcaa9, 0xe8ab, 0xcba9, 0xc7a9, 0xcca9, 0xa7cc, 0x7acc, 0xabcc, 0xc4a9, 0x001a, 0x001a, 0x7dcc, 0xa4cc, 0xa1cc, 0xc5a9, 0x001a, 0xbfce, 0x001a, 0xc0ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcace, 0xa1d1, 0xcbce, 0xeeab, 0xcece, 0xc4ce, 0xedab, 0xc6ce, 0x001a, 0xc7ce, 0x001a, 0x001a, 0xc9ce, 0xe9ab, 0x001a, 0x001a, 0xa3ae, 0x001a, 0xdaf9, 0xc5ce, 0xc1ce, 0xa4ae, 0x001a, 0x001a, 0xcfce, 0x7eae, 0x7dd1, 0xc8ce, 0x001a, 0x7cd1, 0xc3ce, 0xccce, 0x001a, 0x001a, 0xecab, 0xa1ae, 0xf2ab, 0xa2ae, 0xd0ce, 0x7ed1, 0xebab, 0xa6ae, 0xf1ab, 0xf0ab, 0xefab, 0xa5ae, 0xd1ce, 0xa7ae, 0xeaab, 0x001a, 0xc2ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x76b1, 0xa4d1, 0xa6d1, 0x001a, 0xa8d1, 0xa8ae, 0xaeae, 0x53d5, 0xacd1, 0xa3d1, 0x78b1, 0x51d5, 0x001a, 0xadae, 0xabae, 0xaed1, 0x001a, 0x52d5, 0x001a, 0xa5d1, 0x001a, 0xacae, 0xa9d1, 0xafae, 0xabd1, 0x001a, 0x001a, 0xaaae, 0xaad1, 0xadd1, 0xa7d1, 0x001a, 0xa9ae, 0x79b1, 0x001a, 0xa2d1, 0x77b1, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ab1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x55d5, 0x5ed5, 0x64b4, 0x001a, 0x7cb1, 0xa3b1, 0x65b4, 0x60d5, 0xaab1, 0xf9d8, 0x56d5, 0xa2b1, 0xa5b1, 0x7eb1, 0x54d5, 0x62d5, 0x65d5, 0x49d9, 0x001a, 0x63d5, 0xfdd8, 0xa1b1, 0xa8b1, 0xacb1, 0x5dd5, 0xf8d8, 0x61d5, 0x7bb1, 0xfad8, 0x64d5, 0xfcd8, 0x59d5, 0x001a, 0x62b4, 0x001a, 0x57d5, 0x58d5, 0xa7b1, 0x001a, 0x001a, 0xa6b1, 0x5bd5, 0xabb1, 0x5fd5, 0xa4b1, 0x5cd5, 0x001a, 0xa9b1, 0x66b4, 0x63b4, 0xfbd8, 0x001a, 0x5ad5, 0x001a, 0x7db1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6bb4, 0x6fb4, 0x40d9, 0x51b7, 0x6db4, 0x44d9, 0x71b4, 0x65dd, 0x46d9, 0x53b7, 0x69b4, 0x6cb4, 0x47d9, 0x001a, 0x48d9, 0x4ed9, 0x73b4, 0x54b7, 0x001a, 0x4ad9, 0x4fd9, 0x43d9, 0x5eb7, 0x001a, 0x55b7, 0x72b4, 0x41d9, 0x50d9, 0x001a, 0x5db7, 0x70b4, 0x4eb7, 0x4dd9, 0x001a, 0x74b4, 0x45d9, 0xfed8, 0x6ab4, 0x42d9, 0x001a, 0x4bd9, 0x001a, 0x4db7, 0x52b7, 0x67b4, 0x4cd9, 0x001a, 0x50b7, 0x001a, 0x001a, 0x001a, 0x68b4, 0x001a, 0x001a, 0x001a, 0x5cb7, 0xc3e1, 0x70dd, 0x001a, 0x68dd, 0xc2e1, 0x001a, 0x6cdd, 0x6edd, 0x001a, 0x001a, 0x6bdd, 0x001a, 0x5bb7, 0x001a, 0x6add, 0x5fb7, 0x001a, 0x001a, 0x001a, 0xd2e1, 0x001a, 0x001a, 0x5ab7, 0x40ba, 0x71dd, 0xc4e1, 0x001a, 0x001a, 0x58b7, 0x69dd, 0x6ddd, 0xfeb9, 0x4fb7, 0x66dd, 0x67dd, 0x41ba, 0x57b7, 0x59b7, 0x56b7, 0x6fdd, 0x001a, 0x001a, 0xc8e1, 0xc9e1, 0xcee1, 0x7dbc, 0xd5e1, 0x001a, 0x47ba, 0x001a, 0x46ba, 0xd0e1, 0x001a, 0x7cbc, 0xc5e1, 0x45ba, 0x001a, 0xd4e1, 0x43ba, 0x44ba, 0x001a, 0xd1e1, 0xaae5, 0x7abc, 0x6eb4, 0x001a, 0xd3e1, 0xa3bc, 0xcbe1, 0x001a, 0x7bbc, 0x001a, 0xa2bc, 0xc6e1, 0xcae1, 0xc7e1, 0xcde1, 0x48ba, 0x79bc, 0x42ba, 0x001a, 0x7ae5, 0xcfe1, 0x001a, 0xa1bc, 0x001a, 0xa4bc, 0x001a, 0xcce1, 0x001a, 0x7ebc, 0x79e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ee5, 0xcebe, 0x78e5, 0xa3e9, 0xa9e5, 0xa8bc, 0x001a, 0xa6bc, 0xccbe, 0xa6e5, 0xa2e5, 0xacbc, 0x001a, 0x78e9, 0x001a, 0x001a, 0x001a, 0xaabc, 0xa1e5, 0x001a, 0x76e9, 0x001a, 0xa5e5, 0x001a, 0xa8e5, 0x7de5, 0x001a, 0xabbc, 0x001a, 0x001a, 0xa5bc, 0x77e9, 0xcdbe, 0xa7e5, 0xa7bc, 0xa9bc, 0xa4e5, 0xadbc, 0xa3e5, 0x7ce5, 0x7be5, 0xcbbe, 0xabe5, 0x7ae9, 0xe0ec, 0xd0be, 0x001a, 0xa2e9, 0x001a, 0x7ee9, 0x001a, 0xe1ec, 0x001a, 0xd1be, 0xa1e9, 0x001a, 0x7ce9, 0xb4c0, 0xdfec, 0x001a, 0x79e9, 0x7be9, 0xb5c0, 0xd3be, 0xb3c0, 0xd2be, 0xb7c0, 0x7de9, 0xcfbe, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfef, 0x001a, 0xc7ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7ec, 0xc8ef, 0xe3ec, 0x001a, 0x001a, 0x56c2, 0xe5ec, 0xe4ec, 0xb6c0, 0xe2ec, 0xe6ec, 0xd0ef, 0xccef, 0xceef, 0x001a, 0xc9ef, 0xcaef, 0x001a, 0xcdef, 0xcbef, 0x67c3, 0x001a, 0x001a, 0x6ac3, 0x69c3, 0x68c3, 0x61c4, 0x4af4, 0x62c4, 0x41f2, 0xdfc4, 0xccf5, 0xe0c4, 0x74c5, 0xcac5, 0xd9f7, 0x001a, 0xdaf7, 0xdbf7, 0x001a, 0x001a, 0xbaf9, 0xe0a4, 0x7cc9, 0xb3a5, 0x001a, 0xa6a6, 0xa7a6, 0xa5a6, 0x001a, 0xa8a6, 0xdaa7, 0xd9a7, 0x001a, 0xb1cc, 0xcfa9, 0xcea9, 0x001a, 0x001a, 0xafd1, 0xadb1, 0xaeb1, 0x001a, 0x001a, 0x001a, 0x75b4, 0x72dd, 0x60b7, 0x61b7, 0x74dd, 0x76dd, 0x75dd, 0x001a, 0xd7e1, 0x001a, 0xd6e1, 0x49ba, 0xd8e1, 0x001a, 0xace5, 0xaebc, 0x001a, 0xd4be, 0x001a, 0xb8c0, 0x57c2, 0xb9c0, 0x001a, 0xe1a4, 0x001a, 0x001a, 0x001a, 0xe6ca, 0x001a, 0x001a, 0xb2cc, 0xd1a9, 0xd0a9, 0xd2a9, 0xf3ab, 0xd2ce, 0xd3ce, 0x001a, 0x001a, 0xb0d1, 0xb0ae, 0xafb1, 0x76b4, 0x51d9, 0xe2a4, 0x001a, 0x7ea4, 0xe3a4, 0x001a, 0x7dc9, 0xb7a5, 0xb6a5, 0xb4a5, 0xb5a5, 0x001a, 0x001a, 0x001a, 0xaba6, 0xe9c9, 0xebc9, 0xaaa6, 0xe3c9, 0x001a, 0xe4c9, 0x001a, 0xeac9, 0xe6c9, 0xe8c9, 0xa9a6, 0xe5c9, 0xecc9, 0xe7c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1a7, 0xeaa7, 0xe8a7, 0xf0ca, 0xedca, 0xf5ca, 0xe6a7, 0xf6ca, 0x001a, 0xdfa7, 0xf3ca, 0x001a, 0xe5a7, 0xefca, 0xeeca, 0xe3a7, 0xf4ca, 0xe4a7, 0xd3a9, 0xdea7, 0xf1ca, 0x001a, 0xe7ca, 0xdba7, 0x001a, 0xeea7, 0xecca, 0xf2ca, 0xe0a7, 0xe2a7, 0x001a, 0xe8ca, 0x001a, 0xe9ca, 0xeaca, 0x001a, 0xeda7, 0xe7a7, 0xeca7, 0xebca, 0xeba7, 0xdda7, 0xdca7, 0xe9a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1a9, 0xbecc, 0xb7cc, 0xdca9, 0xefa9, 0xb3cc, 0xbacc, 0xbccc, 0xbfcc, 0xeaa9, 0x001a, 0xbbcc, 0xb4cc, 0xe8a9, 0xb8cc, 0x001a, 0xc0cc, 0xd9a9, 0x001a, 0xbdcc, 0xe3a9, 0xe2a9, 0xb6cc, 0xd7a9, 0x001a, 0x001a, 0xd8a9, 0x001a, 0xd6a9, 0x001a, 0xeea9, 0xe6a9, 0xe0a9, 0xd4a9, 0xb9cc, 0xdfa9, 0xd5a9, 0xe7a9, 0xf0a9, 0xd4ce, 0xe4a9, 0xb5cc, 0xdaa9, 0xdda9, 0xdea9, 0x001a, 0xeca9, 0xeda9, 0xeba9, 0xe5a9, 0xe9a9, 0xdba9, 0xf4ab, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdace, 0x41ac, 0xf8ab, 0xfaab, 0x40ac, 0xe6ce, 0xfdab, 0xb1d1, 0xb1ae, 0x43ac, 0xd7ce, 0xdfce, 0xfeab, 0xdece, 0xdbce, 0xe3ce, 0xe5ce, 0xf7ab, 0xfbab, 0x42ac, 0xb3ae, 0xe0ce, 0xf9ab, 0x45ac, 0xd9ce, 0x001a, 0x001a, 0x001a, 0xfcab, 0xb2ae, 0xf6ab, 0x001a, 0xd6ce, 0xddce, 0xd5ce, 0xd8ce, 0xdcce, 0xb2d1, 0x44ac, 0x001a, 0xe1ce, 0xe2ce, 0xe4ce, 0xf5ab, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1ae, 0xbed1, 0xbfae, 0xc0ae, 0xb4d1, 0xc4d1, 0x001a, 0xb6ae, 0x001a, 0x001a, 0x66d5, 0xc6d1, 0xc0d1, 0x001a, 0xb7d1, 0x001a, 0xc9d1, 0xbad1, 0xbcae, 0x7dd5, 0xbdd1, 0xbeae, 0xb5ae, 0x001a, 0xcbd1, 0xbfd1, 0xb8ae, 0xb8d1, 0xb5d1, 0xb6d1, 0xb9ae, 0xc5d1, 0xccd1, 0xbbae, 0xbcd1, 0xbbd1, 0xc3ae, 0xc2ae, 0xb4ae, 0xbaae, 0xbdae, 0xc8d1, 0x001a, 0x001a, 0xc2d1, 0xb7ae, 0xb3d1, 0xcad1, 0xc1d1, 0xc3d1, 0xc7d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x67d5, 0x001a, 0xb7b1, 0xcbb1, 0xcab1, 0x001a, 0xbfb1, 0x001a, 0x79d5, 0x75d5, 0x72d5, 0xa6d5, 0xbab1, 0xb2b1, 0x001a, 0x001a, 0x77d5, 0xa8b4, 0xb6b1, 0xa1d5, 0x001a, 0xccb1, 0xc9b1, 0x7bd5, 0x6ad5, 0x001a, 0x001a, 0xc8b1, 0xa3d5, 0x69d5, 0xbdb1, 0xc1b1, 0xa2d5, 0x001a, 0x73d5, 0xc2b1, 0xbcb1, 0x68d5, 0x001a, 0x78b4, 0xa5d5, 0x71d5, 0xc7b1, 0x74d5, 0xa4d5, 0xc6b1, 0x001a, 0x52d9, 0x001a, 0xb3b1, 0x6fd5, 0xb8b1, 0xc3b1, 0x001a, 0xbeb1, 0x78d5, 0x6ed5, 0x6cd5, 0x7ed5, 0xb0b1, 0xc4b1, 0xb4b1, 0x77b4, 0x7cd5, 0xb5b1, 0x001a, 0xb1b1, 0xc0b1, 0xbbb1, 0xb9b1, 0x70d5, 0xc5b1, 0x6dd5, 0x7ad5, 0x76d5, 0x54d9, 0x53d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6bd5, 0x64d9, 0x001a, 0x7ab4, 0x001a, 0x6ad9, 0x59d9, 0x67d9, 0x77dd, 0x7db4, 0x6bd9, 0x6ed9, 0x7cb4, 0x5cd9, 0x6dd9, 0x6cd9, 0x7eb4, 0x55d9, 0x79b4, 0xa3b4, 0x001a, 0xa1b4, 0x69d9, 0x001a, 0x5fd9, 0xa5b4, 0x70d9, 0x68d9, 0x71d9, 0xadb4, 0xabb4, 0x66d9, 0x65d9, 0x001a, 0x63d9, 0x5dd9, 0xa4b4, 0x001a, 0xa2b4, 0xb9d1, 0x56d9, 0x001a, 0xb7dd, 0x57d9, 0x7bb4, 0xaab4, 0x79dd, 0x001a, 0xa6b4, 0xa7b4, 0x58d9, 0x6fd9, 0x78dd, 0x60d9, 0x5bd9, 0xa9b4, 0x61d9, 0x5ed9, 0x001a, 0x001a, 0xaeb4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x70b7, 0x001a, 0x001a, 0x7cdd, 0xb1dd, 0xb6dd, 0xaadd, 0x6cb7, 0xbbdd, 0x69b7, 0x7add, 0x001a, 0x7bdd, 0x62b7, 0x6bb7, 0xa4dd, 0x6eb7, 0x6fb7, 0xa5dd, 0x001a, 0xb2dd, 0xb8dd, 0x6ab7, 0x001a, 0x64b7, 0xa3dd, 0x7ddd, 0xbadd, 0xa8dd, 0xa9dd, 0x7edd, 0xb4dd, 0xabdd, 0xb5dd, 0xaddd, 0x001a, 0x65b7, 0xd9e1, 0x68b7, 0x66b7, 0xb9dd, 0xb0dd, 0xacdd, 0x001a, 0x001a, 0xa1dd, 0x53ba, 0xafdd, 0x6db7, 0xa7dd, 0x001a, 0xa6dd, 0x001a, 0x001a, 0x001a, 0x67b7, 0x63b7, 0xeee1, 0xb3dd, 0xaedd, 0x001a, 0xa2dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e1, 0x001a, 0xdae1, 0xe5e1, 0x001a, 0xece1, 0x51ba, 0xacb4, 0xeae1, 0x4cba, 0x001a, 0x001a, 0x001a, 0x4bba, 0xf1e1, 0x001a, 0xdbe1, 0xe8e1, 0xdce1, 0xe7e1, 0x4fba, 0xebe1, 0x62d9, 0x001a, 0x001a, 0x001a, 0xf2e1, 0xe3e1, 0x52ba, 0xbae5, 0xafbc, 0x001a, 0xf0e1, 0xefe1, 0x54ba, 0xade5, 0xb0bc, 0xaee5, 0x001a, 0xdfe1, 0xe0e1, 0xdde1, 0xe2e1, 0xdee1, 0xf3e1, 0x4eba, 0xb1bc, 0x50ba, 0x55ba, 0x001a, 0xe1e1, 0x001a, 0xede1, 0x001a, 0x001a, 0xe6e1, 0x001a, 0x001a, 0xb1e5, 0x001a, 0x4aba, 0xb4bc, 0xaae9, 0xb6e5, 0xb5e5, 0xb7e5, 0x001a, 0x001a, 0xb4e5, 0xb5bc, 0x001a, 0xbbbc, 0xb8bc, 0x001a, 0xb9bc, 0xafe5, 0xb2e5, 0xbce5, 0xc1bc, 0xbfbc, 0x001a, 0xb3e5, 0x5ad9, 0xb2bc, 0xb9e5, 0xb0e5, 0x001a, 0xc2bc, 0xb8e5, 0x4dba, 0xb7bc, 0xe4e1, 0x001a, 0x001a, 0xbabc, 0x001a, 0xbebc, 0xc0bc, 0xbdbc, 0xbcbc, 0x001a, 0xb6bc, 0xbbe5, 0xb3bc, 0xc3bc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8be, 0xd9be, 0xa9e9, 0xe2be, 0xdfbe, 0x001a, 0xd6be, 0xddbe, 0xabe9, 0xdbbe, 0xd5be, 0x001a, 0xdcbe, 0x001a, 0xa8e9, 0xbbc0, 0xd7be, 0x001a, 0xdebe, 0xbac0, 0xa7e9, 0xa6e9, 0x001a, 0xe0be, 0x001a, 0xe1be, 0x001a, 0xa5e9, 0xa4e9, 0xbcc0, 0xaee9, 0xdabe, 0xace9, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdc0, 0x001a, 0xc2c0, 0xeaec, 0xecec, 0x001a, 0xbfc0, 0x001a, 0xedec, 0xe9ec, 0x001a, 0xebec, 0xc0c0, 0xc3c0, 0x001a, 0xe8ec, 0xbec0, 0xc1c0, 0x59c2, 0xade9, 0x58c2, 0x001a, 0x001a, 0x5ec2, 0xd4ef, 0x001a, 0x5cc2, 0x5dc2, 0xd7ef, 0xd3ef, 0x5ac2, 0xd1ef, 0x6bc3, 0xd5ef, 0x001a, 0xd6ef, 0xd2ef, 0x001a, 0x5bc2, 0x42f2, 0x001a, 0x45f2, 0x001a, 0x001a, 0x46f2, 0x44f2, 0x47f2, 0x6cc3, 0x43f2, 0x001a, 0x001a, 0x4ef4, 0x64c4, 0x4df4, 0x4cf4, 0x4bf4, 0x63c4, 0x65c4, 0x001a, 0xcdf5, 0xe2c4, 0xe1c4, 0x001a, 0x001a, 0xe1f6, 0xe0f6, 0xe3f6, 0xcbc5, 0x75c5, 0xddf7, 0xe2f6, 0x001a, 0x001a, 0xdcf7, 0xcdc5, 0xccc5, 0xf3c5, 0xa9f8, 0xeff8, 0xe4a4, 0x001a, 0x001a, 0x72d9, 0xafe9, 0x001a, 0x001a, 0xaca6, 0xf7ca, 0xf1a7, 0xefa7, 0x001a, 0xf0a7, 0x001a, 0xc1cc, 0xf1a9, 0x46ac, 0x001a, 0xe7ce, 0x001a, 0xe8ce, 0x001a, 0x47ac, 0xced1, 0x001a, 0xc4ae, 0xc5ae, 0xcdd1, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3b1, 0x001a, 0xcfb1, 0x001a, 0xa7d5, 0xd6b1, 0xd5b1, 0xceb1, 0xd1b1, 0xd4b1, 0xd0b1, 0x001a, 0x001a, 0x76d9, 0xcdb1, 0xafb4, 0x001a, 0x001a, 0x001a, 0xb1b4, 0xb2b4, 0x75d9, 0x78d9, 0xb0b4, 0x73d9, 0x77d9, 0x001a, 0x74d9, 0x001a, 0x71b7, 0x001a, 0x001a, 0xbcdd, 0x001a, 0x001a, 0x56ba, 0xf4e1, 0xe3be, 0xc4bc, 0xbde5, 0xc5bc, 0xc6bc, 0xbfe5, 0xbee5, 0xc0e5, 0xb1e9, 0x001a, 0x001a, 0xb0e9, 0xefec, 0xeeec, 0xc4c0, 0xc5c0, 0x48f2, 0x001a, 0x001a, 0xe5a4, 0x001a, 0x001a, 0x001a, 0x001a, 0x79d9, 0x001a, 0x001a, 0x001a, 0xb4b4, 0xb3b4, 0xbddd, 0x001a, 0xd8ef, 0xe3c4, 0xdef7, 0xe6a4, 0x001a, 0xc6ae, 0x001a, 0xd8b1, 0xd7b1, 0x7ad9, 0x7bd9, 0x72b7, 0xf5e1, 0x57ba, 0xb2e9, 0x001a, 0xe7a4, 0xb8a5, 0x001a, 0xf2a9, 0xc2cc, 0x001a, 0xe9ce, 0x48ac, 0xd9b1, 0x001a, 0x7cd9, 0xb5b4, 0x73b7, 0x001a, 0xc1e5, 0xc2e5, 0x001a, 0x001a, 0xf0ec, 0x5fc2, 0xf0f8, 0xe8a4, 0x001a, 0xc3cc, 0xf3a9, 0x49ac, 0x001a, 0xeace, 0x001a, 0xc7ae, 0xd2d1, 0xd0d1, 0xd1d1, 0xc8ae, 0xcfd1, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbb1, 0xdcb1, 0xa8d5, 0xddb1, 0xdab1, 0x7dd9, 0x001a, 0x7ed9, 0xbedd, 0x001a, 0x001a, 0x59ba, 0x58ba, 0x001a, 0x001a, 0xf1ec, 0xd9ef, 0x001a, 0x4af2, 0x49f2, 0x4ff4, 0x001a, 0x5ec9, 0x4aac, 0x001a, 0x001a, 0xe9a4, 0xb9a5, 0x001a, 0xaea6, 0xada6, 0x001a, 0x001a, 0xafa6, 0xb0a6, 0xeec9, 0xedc9, 0xf8ca, 0xf2a7, 0xfbca, 0xfaca, 0xf9ca, 0xfcca, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4a9, 0xc9cc, 0xc5cc, 0xcecc, 0x001a, 0x001a, 0xfba9, 0x001a, 0xf9a9, 0xcacc, 0xc6cc, 0xcdcc, 0xf8a9, 0x40aa, 0xc8cc, 0xc4cc, 0xfea9, 0xcbcc, 0xf7a9, 0xcccc, 0xfaa9, 0xfca9, 0xd0cc, 0xcfcc, 0xc7cc, 0xf6a9, 0xf5a9, 0xfda9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefce, 0xf5ce, 0x001a, 0x50ac, 0x4dac, 0xecce, 0xf1ce, 0x001a, 0x53ac, 0x4bac, 0xf0ce, 0x4eac, 0x51ac, 0x001a, 0x001a, 0xf3ce, 0x001a, 0x4cac, 0xf8ce, 0x4fac, 0x001a, 0x52ac, 0xedce, 0xf2ce, 0xf6ce, 0xeece, 0xebce, 0x001a, 0x001a, 0xf7ce, 0xf4ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0ae, 0xc9ae, 0xccae, 0x001a, 0xcfae, 0x001a, 0xd5d1, 0x001a, 0xcaae, 0xd3d1, 0x001a, 0xceae, 0x001a, 0x001a, 0xcbae, 0x001a, 0xd6d1, 0xcdae, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacd5, 0xdfb1, 0xabd5, 0xadd5, 0xdeb1, 0xe3b1, 0xd4d1, 0x001a, 0xaad5, 0xaed5, 0x001a, 0xe0b1, 0xa9d5, 0xe2b1, 0x001a, 0xe1b1, 0x001a, 0xa7d9, 0x001a, 0xa2d9, 0x001a, 0xb6b4, 0xbab4, 0xb7b4, 0xa5d9, 0xa8d9, 0x001a, 0xb8b4, 0x001a, 0xb9b4, 0xbeb4, 0xc7dd, 0xa6d9, 0xbcb4, 0xa3d9, 0xa1d9, 0x001a, 0xbdb4, 0x001a, 0xa4d9, 0x001a, 0x001a, 0x001a, 0x79b7, 0x001a, 0xbfdd, 0x76b7, 0x77b7, 0x75b7, 0xc4dd, 0xc3dd, 0xc0dd, 0x7bb7, 0x001a, 0x001a, 0xc2dd, 0xbbb4, 0x001a, 0x001a, 0xc6dd, 0xc1dd, 0x78b7, 0x74b7, 0x7ab7, 0xc5dd, 0x001a, 0x001a, 0x001a, 0x5cba, 0x001a, 0xf8e1, 0xf7e1, 0xf6e1, 0x5aba, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5bba, 0xc5e5, 0xc8e5, 0xc8bc, 0x001a, 0x001a, 0xc7bc, 0xc9e5, 0xc4e5, 0xcabc, 0xc6e5, 0x001a, 0xc9bc, 0xc3e5, 0x001a, 0xc7e5, 0xe9be, 0xe6be, 0xbbe9, 0xbae9, 0x001a, 0xb9e9, 0xb4e9, 0x001a, 0xb5e9, 0x001a, 0x001a, 0x001a, 0xe7be, 0x001a, 0xe4be, 0xe8be, 0xb3e9, 0xe5be, 0xb6e9, 0xb7e9, 0xbce9, 0x001a, 0x001a, 0xb8e9, 0x001a, 0x001a, 0xf2ec, 0x001a, 0x001a, 0x001a, 0xc7c0, 0x001a, 0xdcef, 0xc6c0, 0xdaef, 0xdbef, 0x60c2, 0x6ec3, 0x4bf2, 0x001a, 0x6dc3, 0x001a, 0x001a, 0x51f4, 0x52f4, 0x001a, 0x66c4, 0x001a, 0x50f4, 0xe4c4, 0x001a, 0xdff7, 0xcec5, 0xaaf8, 0xabf8, 0x001a, 0xeaa4, 0x001a, 0xb1a6, 0xb2a6, 0xf3a7, 0x001a, 0xd1cc, 0x54ac, 0xd1ae, 0xe4b1, 0x001a, 0x001a, 0xd2b0, 0x001a, 0xbfb4, 0xc0b4, 0xccb3, 0xa9d9, 0x001a, 0x7cb7, 0xfae1, 0xf9e1, 0x001a, 0x001a, 0xeba4, 0xb3a6, 0xd2cc, 0x42aa, 0x001a, 0x41aa, 0x001a, 0xf9ce, 0xface, 0x001a, 0xd7d1, 0xd8d1, 0xd2ae, 0xd3ae, 0x001a, 0xd4ae, 0xafd5, 0x001a, 0x001a, 0xe6b1, 0x001a, 0xc2b4, 0x001a, 0xc1b4, 0xc8dd, 0x7adf, 0xfbe1, 0xbde9, 0x001a, 0x001a, 0x61c2, 0x67c4, 0xeca4, 0x001a, 0xbca5, 0xbda5, 0xbba5, 0xbea5, 0xbaa5, 0x001a, 0x001a, 0xb6a6, 0x001a, 0xf6c9, 0xb5a6, 0xb7a6, 0x001a, 0x001a, 0xf1c9, 0xf0c9, 0xf3c9, 0xf2c9, 0xf5c9, 0xb4a6, 0xefc9, 0xf4c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdca, 0xfda7, 0xfeca, 0x43cb, 0xfca7, 0x001a, 0x47cb, 0x42cb, 0x45cb, 0xf5a7, 0xf6a7, 0xf7a7, 0xf8a7, 0x001a, 0x40a8, 0x001a, 0x41cb, 0xfaa7, 0x41a8, 0x001a, 0x40cb, 0x46cb, 0x001a, 0xf9a7, 0x44cb, 0xfba7, 0xf4a7, 0xfea7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x57aa, 0x001a, 0xd4cc, 0x43aa, 0x001a, 0x4daa, 0x4eaa, 0x46aa, 0x58aa, 0x48aa, 0xdccc, 0x53aa, 0xd7cc, 0x49aa, 0xe6cc, 0xe7cc, 0xdfcc, 0xd8cc, 0x56aa, 0xe4cc, 0x51aa, 0x4faa, 0x001a, 0xe5cc, 0x001a, 0xe3cc, 0xdbcc, 0xd3cc, 0xdacc, 0x4aaa, 0x001a, 0x50aa, 0x001a, 0x44aa, 0xdecc, 0xddcc, 0xd5cc, 0x001a, 0x52aa, 0xe1cc, 0xd6cc, 0x55aa, 0xe8cc, 0x45aa, 0x001a, 0x4caa, 0xd9cc, 0xe2cc, 0x54aa, 0x001a, 0x47aa, 0x4baa, 0x001a, 0xe0cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5bcf, 0x5cac, 0x69ac, 0x001a, 0x56cf, 0x4ccf, 0x62ac, 0x4acf, 0x5bac, 0x45cf, 0x65ac, 0x52cf, 0xfece, 0x41cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x44cf, 0xfbce, 0x51cf, 0x61cf, 0x60ac, 0x46cf, 0x58cf, 0x001a, 0xfdce, 0x5fcf, 0x60cf, 0x63cf, 0x5acf, 0x4bcf, 0x53cf, 0x66ac, 0x59ac, 0x61ac, 0x6dac, 0x56ac, 0x58ac, 0x001a, 0x001a, 0x001a, 0x43cf, 0x6aac, 0x63ac, 0x5dcf, 0x40cf, 0x6cac, 0x67ac, 0x49cf, 0x001a, 0x001a, 0x6bac, 0x50cf, 0x48cf, 0x64ac, 0x5ccf, 0x54cf, 0x001a, 0x5eac, 0x62cf, 0x47cf, 0x5aac, 0x59cf, 0x4fcf, 0x5fac, 0x55cf, 0x57ac, 0xfcce, 0x68ac, 0xe3ae, 0x5dac, 0x4ecf, 0x4dcf, 0x42cf, 0x001a, 0x5ecf, 0x001a, 0x57cf, 0x001a, 0x001a, 0x55ac, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecd1, 0xeaae, 0xedd1, 0x001a, 0xe1d1, 0xdfae, 0xebae, 0x001a, 0xdad1, 0x001a, 0xe3d1, 0xebd1, 0x001a, 0xd9d1, 0xf4d1, 0xd5ae, 0x001a, 0x001a, 0x001a, 0xf3d1, 0xeed1, 0x001a, 0xefd1, 0xddae, 0xe8ae, 0xe5d1, 0x001a, 0xe6d1, 0xf0d1, 0xe7d1, 0x001a, 0xe2d1, 0xdcd1, 0xddd1, 0xead1, 0xe4d1, 0x001a, 0x001a, 0xd6ae, 0xdaae, 0xf2d1, 0xded1, 0xe6ae, 0xe2ae, 0x001a, 0x001a, 0xe5ae, 0xecae, 0xdbae, 0xe7ae, 0xe9d1, 0xe9ae, 0xd8ae, 0x001a, 0xd7ae, 0xdbd1, 0x001a, 0xdfd1, 0xe0ae, 0xf1d1, 0xe8d1, 0xe0d1, 0xe4ae, 0xe1ae, 0x001a, 0xd9ae, 0xdcae, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4d5, 0x001a, 0xb4d5, 0xb5d5, 0xb9d5, 0x001a, 0xc8d5, 0xc5d5, 0x001a, 0xbed5, 0xbdd5, 0xedb1, 0xc1d5, 0xd0d5, 0xb0d5, 0x001a, 0xd1d5, 0xc3d5, 0xd5d5, 0xc9d5, 0xecb1, 0xc7d5, 0xe7b1, 0xfcb1, 0xf2b1, 0x001a, 0xf6b1, 0xf5b1, 0xb1d5, 0x001a, 0xced5, 0xd4d5, 0xccd5, 0xd3d5, 0x001a, 0x001a, 0xc0d5, 0xb2d5, 0xd2d5, 0xc2d5, 0xeab1, 0xf7b1, 0x001a, 0xcbd5, 0xf0b1, 0x001a, 0x001a, 0x001a, 0xcad5, 0xb3d5, 0xf8b1, 0x001a, 0xfab1, 0xcdd5, 0xfbb1, 0xe9b1, 0xbad5, 0xcfd5, 0x001a, 0x001a, 0xefb1, 0xf9b1, 0xbcd5, 0xc6d5, 0xb7d5, 0xbbd5, 0xf4b1, 0xb6d5, 0xe8b1, 0xf1b1, 0xeeb1, 0xbfd5, 0xdeae, 0xc0d9, 0xebb1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3b1, 0x001a, 0xc3d9, 0xd9d9, 0xced9, 0xd6b4, 0x001a, 0xd1b4, 0xbdd9, 0xd2b4, 0xcdd9, 0x001a, 0xc6d9, 0xd3d9, 0xceb4, 0xabd9, 0xd5d9, 0xc4b4, 0xb3d9, 0xc7b4, 0xc6b4, 0x001a, 0xd7b4, 0x001a, 0xadd9, 0xcfd9, 0xd0d9, 0xc9b4, 0xc5b4, 0xbbd9, 0x001a, 0xd0b4, 0xb6d9, 0x001a, 0xd1d9, 0xccb4, 0xc9d9, 0xd6d9, 0xb0d9, 0xb5d9, 0xafd9, 0x001a, 0xcbb4, 0xc2d9, 0xdedd, 0xb1d9, 0xcfb4, 0xbad9, 0xd2d9, 0xcab4, 0xb7d9, 0xb4d9, 0xc5d9, 0xcdb4, 0xc3b4, 0xd9b4, 0xc8d9, 0xc7d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacd9, 0xc8b4, 0xd4d9, 0xbcd9, 0xbed9, 0x001a, 0xcbd9, 0xcad9, 0xaad9, 0xd3b4, 0xd5b4, 0xb2d9, 0xb9d9, 0xc1d9, 0xd4b4, 0xb8d9, 0xc4d9, 0xd7d9, 0x001a, 0xccd9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8d9, 0x001a, 0x001a, 0x001a, 0x001a, 0xaed9, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2dd, 0xa6b7, 0x001a, 0xf0dd, 0xdbdd, 0xe0dd, 0xd9dd, 0x001a, 0xecdd, 0xcbdd, 0xd2dd, 0x001a, 0xeadd, 0xf4dd, 0xdcdd, 0x001a, 0xcfdd, 0xe2dd, 0xe7dd, 0xd3dd, 0x001a, 0xe4dd, 0xd0dd, 0x001a, 0x001a, 0xd7dd, 0xd8dd, 0xa8b7, 0xebdd, 0xe9dd, 0x001a, 0xccdd, 0xeedd, 0x001a, 0xefdd, 0xf1dd, 0xacb7, 0xa4b7, 0x001a, 0xb8d5, 0xd4dd, 0xe6dd, 0xd5dd, 0xa1b7, 0xb1b7, 0xeddd, 0xafb7, 0xabb7, 0xcadd, 0xa3b7, 0x001a, 0xcddd, 0xb0b7, 0x001a, 0xdddd, 0xc9dd, 0x001a, 0xa9b7, 0xe1dd, 0xd1dd, 0xaab7, 0xdadd, 0x7eb7, 0xd8b4, 0xe3dd, 0xbfd9, 0xcedd, 0x001a, 0x001a, 0xe8dd, 0xa5b7, 0xe5dd, 0xa2b7, 0xdfdd, 0xadb7, 0xd6dd, 0xf3dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7b7, 0xc6de, 0x001a, 0x001a, 0xaeb7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ae2, 0x48e2, 0x001a, 0x5ee2, 0x46e2, 0x001a, 0x58e2, 0x7db7, 0x5fba, 0x42e2, 0x5de2, 0x001a, 0x47e2, 0x55e2, 0x64ba, 0x5dba, 0x001a, 0x5be2, 0x001a, 0x40e2, 0x5ae2, 0x001a, 0x6fba, 0x51e2, 0x61e2, 0x6dba, 0x49e2, 0x5eba, 0x4be2, 0x59e2, 0x67ba, 0x44e2, 0x6bba, 0x61ba, 0x4de2, 0x43e2, 0xfce1, 0x001a, 0x57e2, 0x68ba, 0x60e2, 0xfde1, 0x65ba, 0x001a, 0x53e2, 0x001a, 0x66ba, 0x45e2, 0x50e2, 0x4ce2, 0x4ee2, 0x001a, 0x60ba, 0x5fe2, 0x6eba, 0x4fe2, 0x001a, 0x62e2, 0x001a, 0x001a, 0xfee1, 0x54e2, 0x63ba, 0x6cba, 0x6aba, 0x41e2, 0x56e2, 0x69ba, 0x001a, 0x001a, 0x62ba, 0x52e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ce2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e5, 0x001a, 0xd1e5, 0xcde5, 0xe1e5, 0xdee5, 0xcdbc, 0x001a, 0x001a, 0xe5e5, 0xd4e5, 0xd8bc, 0xdbe5, 0x001a, 0x001a, 0xd0e5, 0xdae5, 0xd5bc, 0xeee5, 0x001a, 0xebe5, 0xdde5, 0xcee5, 0x001a, 0x001a, 0xe2e5, 0xe4e5, 0xd1bc, 0xd8e5, 0xd3e5, 0xcae5, 0xcebc, 0xd6bc, 0x001a, 0xe7e5, 0xd7bc, 0xcbe5, 0xede5, 0xe0e5, 0xe6e5, 0xd4bc, 0x001a, 0x001a, 0xe3e5, 0x001a, 0xeae5, 0x001a, 0xd9bc, 0x001a, 0xd3bc, 0xdce5, 0xcfe5, 0xefe5, 0xcce5, 0xe8e5, 0xd0bc, 0x001a, 0xd6e5, 0x001a, 0xd7e5, 0xcfbc, 0xccbc, 0xd2e5, 0xd2bc, 0x001a, 0xcbbc, 0x001a, 0xe9e5, 0xece5, 0xd9e5, 0xcae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e9, 0x001a, 0xbee9, 0xf6be, 0x001a, 0x001a, 0xebbe, 0xf0be, 0xecbe, 0xcce9, 0xd7e9, 0xeabe, 0xc4e9, 0xcde9, 0xdfe5, 0xcee9, 0x001a, 0x001a, 0xf1be, 0x001a, 0xdde9, 0xf5be, 0xf8be, 0xc0e9, 0x001a, 0xf4be, 0x001a, 0xdbe9, 0xdce9, 0xd2e9, 0xd1e9, 0xc9e9, 0x001a, 0x001a, 0xd3e9, 0xdae9, 0xd9e9, 0x001a, 0xefbe, 0xedbe, 0xcbe9, 0xc8e9, 0x001a, 0xc5e9, 0xd8e9, 0xf7be, 0xd6e9, 0xf3be, 0xf2be, 0x001a, 0xd0e9, 0x001a, 0xbfe9, 0xc1e9, 0xc3e9, 0xd5e9, 0xcfe9, 0xeebe, 0x001a, 0xc6e9, 0x001a, 0xd4e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfc0, 0x45ed, 0xc8c0, 0xf5ec, 0x001a, 0x41ed, 0xcac0, 0x48ed, 0x001a, 0xfcec, 0x001a, 0xf7ec, 0x001a, 0x001a, 0x49ed, 0xf3ec, 0xfeec, 0x001a, 0xd1c0, 0x44ed, 0x4aed, 0xfdec, 0xc9c0, 0x40ed, 0xf4ec, 0xd0c0, 0x001a, 0x001a, 0x47ed, 0xf9ec, 0xccc0, 0x001a, 0xfbec, 0xf8ec, 0xd2c0, 0xfaec, 0xcbc0, 0xcec0, 0x43ed, 0xf6ec, 0x46ed, 0x001a, 0x42ed, 0x001a, 0x001a, 0x001a, 0x63c2, 0xe7ef, 0x68c2, 0x69c2, 0x001a, 0x001a, 0x001a, 0x62c2, 0xe6ef, 0x001a, 0xe3ef, 0xe4ef, 0x66c2, 0xdeef, 0xe2ef, 0x65c2, 0x001a, 0xdfef, 0x001a, 0x001a, 0x001a, 0x001a, 0x67c2, 0x64c2, 0x001a, 0xddef, 0xe1ef, 0xe5ef, 0x001a, 0x001a, 0x001a, 0x51f2, 0x4ef2, 0x57f2, 0x001a, 0x56f2, 0x54f2, 0x4ff2, 0x001a, 0x72c3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50f2, 0x71c3, 0xcdc0, 0x53f2, 0x70c3, 0x58f2, 0x52f2, 0x4df2, 0xe0ef, 0x001a, 0x001a, 0x001a, 0x6fc3, 0x001a, 0x4cf2, 0x56f4, 0x001a, 0x55f4, 0x55f2, 0x68c4, 0x001a, 0x59f4, 0x5af4, 0x54f4, 0x58f4, 0x001a, 0x53f4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1f5, 0x57f4, 0xe7c4, 0xe5c4, 0xcff5, 0x001a, 0x001a, 0x001a, 0xd2f5, 0x001a, 0xcef5, 0xd0f5, 0xe6c4, 0x001a, 0x001a, 0x001a, 0xe5f6, 0xe6f6, 0x76c5, 0xe4f6, 0x001a, 0x001a, 0x001a, 0xe2f7, 0xcfc5, 0xe0f7, 0xe1f7, 0xacf8, 0x001a, 0x001a, 0x56c6, 0xf3f8, 0xf1f8, 0xf2f8, 0xf4f8, 0x001a, 0x001a, 0x001a, 0xbbf9, 0x001a, 0xeda4, 0xb8a6, 0x001a, 0x59aa, 0x001a, 0xe9cc, 0x001a, 0x001a, 0x64cf, 0x001a, 0x001a, 0x001a, 0xf5d1, 0xf7d1, 0x001a, 0xf6d1, 0x001a, 0xf8d1, 0xfdb1, 0xd7d5, 0xf9d1, 0x001a, 0xd6d5, 0xd8d5, 0xd9d5, 0xdad9, 0xdbb4, 0xdbd9, 0xddd9, 0xdcb4, 0xdab4, 0xdcd9, 0x001a, 0xfadd, 0xf8dd, 0xf7dd, 0x001a, 0xf6dd, 0xf5dd, 0xb2b7, 0xf9dd, 0x70ba, 0x63e2, 0x65e2, 0x71ba, 0x64e2, 0xdbbc, 0x001a, 0xdabc, 0xf0e5, 0x001a, 0x001a, 0xdfe9, 0xdee9, 0xe0e9, 0x001a, 0x001a, 0xf9be, 0x001a, 0x4bed, 0xd3c0, 0x001a, 0xe8ef, 0x6ac2, 0x59f2, 0x77c5, 0xeea4, 0xbfa5, 0xb9a6, 0x42a8, 0x5aaa, 0x5baa, 0x001a, 0x001a, 0x6eac, 0x001a, 0x001a, 0xfad1, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3b7, 0x001a, 0x001a, 0x001a, 0xd1e6, 0xfabe, 0x6bc2, 0xefa4, 0x001a, 0xbaa6, 0x001a, 0x001a, 0xebcc, 0x5caa, 0xeacc, 0x001a, 0x65cf, 0x6fac, 0x66cf, 0x001a, 0x70ac, 0x001a, 0xfcd1, 0xeeae, 0xedae, 0x001a, 0xded5, 0xdcd5, 0xddd5, 0xdbd5, 0x001a, 0xdad5, 0x001a, 0x001a, 0xded9, 0xe1d9, 0xdeb4, 0xdfd9, 0xddb4, 0xe0d9, 0x001a, 0xfbdd, 0x001a, 0x001a, 0x66e2, 0x67e2, 0x68e2, 0x001a, 0xf3e5, 0xf2e5, 0xdcbc, 0xf1e5, 0xf4e5, 0xe1e9, 0x001a, 0x001a, 0xe2e9, 0xe3e9, 0x001a, 0x4ced, 0xd4c0, 0x6cc2, 0x5af2, 0x001a, 0xe8c4, 0x5fc9, 0x001a, 0x71ac, 0x67cf, 0xefae, 0x001a, 0x001a, 0xfeb1, 0x001a, 0xdfb4, 0xe2d9, 0x001a, 0xb5b7, 0xb4b7, 0x001a, 0x001a, 0x69e2, 0x6ae2, 0xddbc, 0xdebc, 0xe5e9, 0xe4e9, 0xe9ef, 0xe3f7, 0xf0a4, 0x60c9, 0xc0a5, 0x001a, 0x43a8, 0x48cb, 0x001a, 0x72ac, 0xb6b7, 0xf1a4, 0x001a, 0x68cf, 0x73ac, 0x69cf, 0x001a, 0xd5c0, 0xf2a4, 0x001a, 0x001a, 0xeccc, 0x001a, 0x6acf, 0x001a, 0x42d2, 0x41d2, 0xfed1, 0x001a, 0xfdd1, 0x43d2, 0x40d2, 0x001a, 0x001a, 0x40b2, 0x41b2, 0x001a, 0x001a, 0xe0b4, 0xe3d9, 0x001a, 0xe4d9, 0xe5d9, 0x001a, 0x001a, 0x001a, 0x41de, 0x42de, 0x40de, 0x001a, 0xfddd, 0xfedd, 0xb7b7, 0x6be2, 0xf7e5, 0xf6e5, 0xf5e5, 0xf8e5, 0xe7e9, 0xe6e9, 0xfbbe, 0xe8e9, 0x001a, 0xd6c0, 0x4ded, 0x001a, 0xeaef, 0x5bf2, 0xe7f6, 0x001a, 0xf3a4, 0xc2a5, 0xc1a5, 0x001a, 0x5daa, 0x61c9, 0x7ec9, 0xbba6, 0x001a, 0xf7c9, 0x49cb, 0x4acb, 0x5eaa, 0x001a, 0xedcc, 0x001a, 0x74ac, 0x6bcf, 0x6ccf, 0x001a, 0xf0ae, 0xf4ae, 0x44d2, 0xf3ae, 0xf1ae, 0xf2ae, 0x001a, 0xdfd5, 0x42b2, 0xe3b4, 0x001a, 0xe1b4, 0xe2b4, 0xe6d9, 0x001a, 0x001a, 0x72ba, 0xf4a4, 0x001a, 0xa1c9, 0x001a, 0xc3a5, 0x001a, 0x001a, 0xa4c9, 0x001a, 0x001a, 0xc6a5, 0xa3c9, 0xc5a5, 0xc4a5, 0x44a8, 0xa2c9, 0x001a, 0x001a, 0xf8c9, 0x001a, 0x001a, 0x001a, 0xfcc9, 0xfec9, 0x40ca, 0xc5a6, 0xc6a6, 0xfbc9, 0xc1a6, 0x001a, 0xf9c9, 0x001a, 0xfdc9, 0xc2a6, 0x001a, 0xbda6, 0x001a, 0xbea6, 0x001a, 0xc4a6, 0xfac9, 0xbca6, 0x45a8, 0xbfa6, 0xc0a6, 0xc3a6, 0x001a, 0x001a, 0x001a, 0x5bcb, 0x59cb, 0x4ccb, 0x51a8, 0x53cb, 0x4ca8, 0x4dcb, 0x001a, 0x55cb, 0x001a, 0x52cb, 0x4fa8, 0x51cb, 0x56a8, 0x5acb, 0x58a8, 0x001a, 0x5aa8, 0x001a, 0x4bcb, 0x001a, 0x4da8, 0x5ccb, 0x001a, 0x54a8, 0x57a8, 0x001a, 0x45cd, 0x47a8, 0x5ea8, 0x55a8, 0x4ecb, 0x4aa8, 0x59a8, 0x56cb, 0x48a8, 0x49a8, 0x43cd, 0x4fcb, 0x50a8, 0x5ba8, 0x5dcb, 0x50cb, 0x4ea8, 0x001a, 0x53a8, 0xeecc, 0x5ca8, 0x57cb, 0x52a8, 0x001a, 0x5da8, 0x46a8, 0x54cb, 0x4ba8, 0x58cb, 0x44cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6aaa, 0x7aaa, 0xf5cc, 0x71aa, 0x001a, 0x4bcd, 0x62aa, 0x001a, 0x65aa, 0x42cd, 0x001a, 0xf3cc, 0xf7cc, 0x6daa, 0x6faa, 0xfacc, 0x76aa, 0x68aa, 0x66aa, 0x67aa, 0x75aa, 0x47cd, 0x70aa, 0xf9cc, 0xfbcc, 0x6eaa, 0x73aa, 0xfccc, 0x4acd, 0x001a, 0x75ac, 0x79aa, 0x001a, 0x63aa, 0x49cd, 0x001a, 0x4dcd, 0xf8cc, 0x4fcd, 0x40cd, 0x6caa, 0xf4cc, 0x6baa, 0x7daa, 0x72aa, 0x001a, 0xf2cc, 0x75cf, 0x78aa, 0x7caa, 0x41cd, 0x46cd, 0x001a, 0x7eaa, 0x77aa, 0x69aa, 0x5faa, 0x001a, 0x64aa, 0x001a, 0xf6cc, 0x60aa, 0x4ecd, 0x001a, 0xf0cc, 0xefcc, 0xfdcc, 0xf1cc, 0x7baa, 0xf5ae, 0x74aa, 0xfecc, 0x61aa, 0x001a, 0xa6ac, 0x001a, 0x001a, 0x001a, 0x4ccd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ccf, 0xa1cf, 0x001a, 0xa4cf, 0x77cf, 0x001a, 0x001a, 0xa7cf, 0xaacf, 0xaccf, 0x74cf, 0x76ac, 0x7bac, 0x49d2, 0xadac, 0xa5cf, 0xadcf, 0x7bcf, 0x73cf, 0x001a, 0x001a, 0x001a, 0x64d2, 0x7eac, 0xa2cf, 0x78cf, 0x7acf, 0xa5ac, 0x001a, 0x7dcf, 0x7dac, 0x70cf, 0xa8cf, 0x001a, 0xabcf, 0x001a, 0x001a, 0x7aac, 0x001a, 0xa8ac, 0x6dcf, 0xaaac, 0x78ac, 0xaeac, 0xa9cf, 0x6fcf, 0xabac, 0x5ed2, 0x48cd, 0x7cac, 0x77ac, 0x76cf, 0x6ecf, 0xacac, 0xa4ac, 0xa3cf, 0xa9ac, 0xa7ac, 0x79cf, 0xa1ac, 0x71cf, 0xa2ac, 0xa3ac, 0x72cf, 0xa6cf, 0x79ac, 0x7ecf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4cd2, 0xfdae, 0x43af, 0x001a, 0x001a, 0x001a, 0x55d2, 0x5bd2, 0x57d2, 0x4ad2, 0x4dd2, 0x46d2, 0x47d2, 0x4aaf, 0xfaae, 0x56d2, 0x5fd2, 0x45af, 0xf6ae, 0x001a, 0x40af, 0x4ed2, 0x42af, 0x4fd2, 0x59d2, 0x001a, 0x001a, 0x001a, 0x44af, 0x68d2, 0x48d2, 0xfcae, 0xfbae, 0x48af, 0x45d2, 0x66d2, 0x5ad2, 0x67d2, 0x61d2, 0x53d2, 0x62d2, 0x001a, 0x5cd2, 0x65d2, 0x63d2, 0x49af, 0x54d2, 0xf9ae, 0xf8ae, 0x41af, 0x47af, 0x60d2, 0x46af, 0x51d2, 0x43b2, 0x001a, 0x69d2, 0x50d2, 0x4bd2, 0xfeae, 0x4baf, 0xf7ae, 0x001a, 0x58d2, 0x5dd2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x65b2, 0xe1d5, 0xe5d5, 0x001a, 0x52b2, 0x50b2, 0x001a, 0x001a, 0x47b2, 0xe3d5, 0xe2d5, 0x5bb2, 0x001a, 0xe8d5, 0x55b2, 0x001a, 0xfad5, 0x47d6, 0x44b2, 0xf7d5, 0xf0d5, 0x67b2, 0xe0d5, 0x001a, 0xfcd5, 0x001a, 0x64b2, 0x58b2, 0x63b2, 0x4eb2, 0xecd5, 0xfed5, 0xf6d5, 0x4fb2, 0x49b2, 0x45d6, 0x001a, 0xfdd5, 0x40d6, 0x51b2, 0x59b2, 0x42d6, 0xead5, 0xfbd5, 0xefd5, 0x44d6, 0x5eb2, 0x46b2, 0x5cb2, 0xf4d5, 0xf2d5, 0xf3d5, 0x53b2, 0xeed5, 0xedd5, 0x48b2, 0xe7d5, 0x46d6, 0x4ab2, 0xf1d5, 0x68b2, 0x001a, 0x62b2, 0xe6d5, 0x5fb2, 0x5db2, 0x66b2, 0xf8d5, 0x61b2, 0x52d2, 0xf9d5, 0x60b2, 0x41d6, 0x45b2, 0xf5d5, 0x57b2, 0xe9d5, 0x56b2, 0x001a, 0x54b2, 0x4cb2, 0x4bb2, 0xe7d9, 0x43d6, 0x001a, 0x001a, 0xebd5, 0x001a, 0x001a, 0xfcd9, 0x001a, 0x4db2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41b5, 0x5ab2, 0xeeb4, 0xf6d9, 0xfcb4, 0x001a, 0xead9, 0xebb4, 0xe7b4, 0x49da, 0xedb4, 0xf1b4, 0xecb4, 0xf5b4, 0x4dda, 0x44da, 0x001a, 0x001a, 0xf1d9, 0xfab4, 0xf4b4, 0xfdd9, 0xe4b4, 0x4ada, 0x43da, 0xe8b4, 0xf7d9, 0xf7b4, 0x55da, 0x56da, 0x001a, 0xe5b4, 0x48da, 0xf9b4, 0xfbd9, 0xedd9, 0xeed9, 0xfdb4, 0xf2d9, 0xf9d9, 0xf3d9, 0x001a, 0xfbb4, 0x44b5, 0xefd9, 0xe8d9, 0xe9d9, 0x001a, 0xebd9, 0xeab4, 0xf8d9, 0x001a, 0xf8b4, 0x42b5, 0x001a, 0x001a, 0xfad9, 0x53da, 0x4bda, 0xe6b4, 0x51da, 0xf2b4, 0x001a, 0xf0b4, 0x001a, 0x57da, 0xefb4, 0x41da, 0xf4d9, 0xfed9, 0x47b5, 0x45da, 0x42da, 0xf0d9, 0x43b5, 0x4fda, 0x4cda, 0x54da, 0xe9b4, 0x40da, 0x46b5, 0x001a, 0x47da, 0x001a, 0x001a, 0xf3b4, 0xf6b4, 0x001a, 0x46da, 0x45b5, 0xf5d9, 0xe4d5, 0x001a, 0x001a, 0x50da, 0x4eda, 0x52da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecd9, 0x40b5, 0x001a, 0x001a, 0x001a, 0x61de, 0x60de, 0x46de, 0xbdb7, 0x001a, 0x5fde, 0x49de, 0x4ade, 0x001a, 0xc7b7, 0x68de, 0xc2b7, 0x5ede, 0x001a, 0x43de, 0xc8b7, 0xbeb7, 0x52de, 0x48de, 0x4bde, 0x63de, 0xb8b7, 0x6ade, 0x62de, 0xc1b7, 0x57de, 0xccb7, 0x001a, 0x001a, 0xcbb7, 0xc5b7, 0x001a, 0x001a, 0x69de, 0xb9b7, 0x55de, 0x4cde, 0x59de, 0x65de, 0xcdb7, 0x001a, 0xbbb7, 0x54de, 0x001a, 0x4dde, 0xc4b7, 0x001a, 0xc3b7, 0x50de, 0x5ade, 0x64de, 0x47de, 0x51de, 0xbcb7, 0x5bde, 0xc9b7, 0xc0b7, 0x4ede, 0xbfb7, 0x45de, 0x53de, 0x67de, 0xfeb4, 0xb0ba, 0x56de, 0x6ce2, 0x58de, 0x66de, 0xc6b7, 0x4fde, 0xbab7, 0xcab7, 0xf0bc, 0x44de, 0x001a, 0x5dde, 0x001a, 0x001a, 0x001a, 0x5cde, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaae2, 0xadba, 0x7de2, 0xa4e2, 0xa2ba, 0x001a, 0x6ee2, 0xafba, 0x001a, 0x77ba, 0x6de2, 0xb0e2, 0xb1ba, 0x71e2, 0xa3e2, 0x001a, 0x73e2, 0xb3e2, 0xafe2, 0x75ba, 0xa1ba, 0x53e6, 0xaeba, 0x7dba, 0x6fe2, 0x001a, 0xaee2, 0xa3ba, 0xabe2, 0xb8e2, 0x75e2, 0x7ee2, 0x001a, 0x001a, 0xb6e2, 0xace2, 0x7cba, 0x001a, 0x001a, 0x7ce2, 0x76ba, 0x74ba, 0xa8ba, 0x001a, 0x001a, 0x7ae2, 0x77e2, 0x78e2, 0x001a, 0xb2e2, 0x001a, 0xb7e2, 0xb5e2, 0x7aba, 0xb9e2, 0x7eba, 0xa7ba, 0x001a, 0x70e2, 0xfae5, 0x79e2, 0x001a, 0x78ba, 0xacba, 0xa9ba, 0x7bba, 0xa5e2, 0x74e2, 0xaaba, 0xa7e2, 0xa4ba, 0xa6ba, 0x73ba, 0x001a, 0xa9e2, 0xa1e2, 0x72e2, 0xa5ba, 0xb1e2, 0xb4e2, 0x7be2, 0xa8e2, 0x001a, 0x79ba, 0xdfbc, 0xa6e2, 0xf9e5, 0x001a, 0xade2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x76e2, 0x44e6, 0x4ee6, 0xe2bc, 0x4de6, 0x59e6, 0xe4bc, 0x4be6, 0x001a, 0x4fe6, 0xefbc, 0x001a, 0x46e6, 0xe7bc, 0x001a, 0x52e6, 0xf0e9, 0xf3bc, 0xf2bc, 0x54e6, 0x43e6, 0x5ee6, 0xedbc, 0x001a, 0xe3bc, 0x57e6, 0x001a, 0x5be6, 0x60e6, 0x55e6, 0x49e6, 0xe6bc, 0xe9bc, 0xf1bc, 0xecbc, 0x001a, 0x4ce6, 0xa2e2, 0x001a, 0x001a, 0x48e6, 0x5fe6, 0xe8bc, 0x001a, 0xebbc, 0x61e6, 0xe0bc, 0x56e6, 0xfbe5, 0x5ce6, 0xdfc0, 0x001a, 0x4ae6, 0x001a, 0xe1bc, 0x45e6, 0xe5bc, 0xfce5, 0xabba, 0x41e6, 0x001a, 0x5ae6, 0x42e6, 0x40e6, 0xeabc, 0x001a, 0x58e6, 0x001a, 0xfee5, 0x51e6, 0x50e6, 0x5de6, 0x47e6, 0xeebc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3e9, 0x001a, 0x49bf, 0xfebe, 0x40ea, 0xebe9, 0x41bf, 0xf7e9, 0x48bf, 0x43bf, 0xf5e9, 0x4fed, 0xfbe9, 0x42ea, 0xfae9, 0xe9e9, 0xf8e9, 0x44ea, 0x46ea, 0xfdbe, 0x45ea, 0x44bf, 0x4abf, 0x001a, 0x47bf, 0x001a, 0xfee9, 0x46bf, 0xf9e9, 0x001a, 0xede9, 0xf2e9, 0x001a, 0xfde9, 0x45bf, 0x42bf, 0xfcbe, 0x40bf, 0xf1e9, 0x001a, 0xfde5, 0xece9, 0xefe9, 0x41ea, 0xf4e9, 0xeae9, 0x4eed, 0x43ea, 0xeee9, 0xfce9, 0x001a, 0x001a, 0x001a, 0x001a, 0x51ed, 0xe3c0, 0x001a, 0x001a, 0xd7c0, 0x001a, 0x001a, 0xdbc0, 0x53ed, 0x59ed, 0x57ed, 0xd9c0, 0xdac0, 0xe1c0, 0x5aed, 0x52ed, 0xdcc0, 0x001a, 0x56ed, 0x55ed, 0x5bed, 0xe2c0, 0x001a, 0xddc0, 0xe0c0, 0x54ed, 0xe4c0, 0xdec0, 0xe5c0, 0xd8c0, 0x58ed, 0x001a, 0x50ed, 0x001a, 0x001a, 0xf7ef, 0x001a, 0x001a, 0x71c2, 0xf4ef, 0xf6ef, 0x001a, 0x6fc2, 0xf2ef, 0xf3ef, 0xeeef, 0x001a, 0x001a, 0xf6e9, 0xefef, 0x70c2, 0xebef, 0x001a, 0x6dc2, 0xf8ef, 0x6ec2, 0xecef, 0xedef, 0xf1ef, 0x73c2, 0x001a, 0x72c2, 0x001a, 0x001a, 0xf0ef, 0x78c3, 0x5ff2, 0x65f2, 0x79c3, 0x5cf2, 0x76c3, 0x73c3, 0x67f2, 0x77c3, 0x001a, 0x74c3, 0x5ef2, 0x61f2, 0x62f2, 0x63f2, 0x66f2, 0x001a, 0xf5ef, 0x5df2, 0x75c3, 0x64f2, 0x68f2, 0x60f2, 0x001a, 0x001a, 0x001a, 0x5df4, 0x6ac4, 0x60f4, 0x6bc4, 0x68f4, 0x5ff4, 0x5cf4, 0x001a, 0x5ef4, 0x62f4, 0x65f4, 0x64f4, 0x67f4, 0x5bf4, 0x001a, 0x69c4, 0x63f4, 0x66f4, 0x69f4, 0x61f4, 0xd3f5, 0xd4f5, 0xd8f5, 0xd9f5, 0x001a, 0xd6f5, 0xd7f5, 0xd5f5, 0x001a, 0xe9c4, 0x001a, 0x001a, 0x001a, 0x001a, 0x78c5, 0xebf6, 0x001a, 0x001a, 0xe8f6, 0xe9f6, 0xeaf6, 0x79c5, 0x001a, 0xe5f7, 0xe4f7, 0x001a, 0xaff8, 0xf4c5, 0xadf8, 0xb0f8, 0xaef8, 0xf5f8, 0x57c6, 0x65c6, 0xa3f9, 0x6cf9, 0x001a, 0xa2f9, 0xd0f9, 0xd1f9, 0xf5a4, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7a6, 0x41ca, 0x001a, 0x001a, 0x5ecb, 0x001a, 0x5fa8, 0x001a, 0x62a8, 0x001a, 0x5fcb, 0x001a, 0x60a8, 0x61a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x58cd, 0x5acd, 0x55cd, 0x52cd, 0x54cd, 0x001a, 0x001a, 0x001a, 0xa4aa, 0x001a, 0x001a, 0x001a, 0xa2aa, 0x001a, 0x001a, 0x56cd, 0xa3aa, 0x53cd, 0x50cd, 0xa1aa, 0x57cd, 0x001a, 0x51cd, 0xa5aa, 0x59cd, 0x001a, 0x001a, 0x001a, 0x001a, 0xafcf, 0x001a, 0xb3cf, 0x001a, 0x001a, 0xb7ac, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6cf, 0x001a, 0xafac, 0xb2ac, 0xb4ac, 0xb6ac, 0xb3ac, 0xb2cf, 0xb1cf, 0x001a, 0xb1ac, 0xb4cf, 0xb5cf, 0x001a, 0xaecf, 0xb5ac, 0x001a, 0xb0ac, 0x001a, 0x001a, 0x001a, 0xb0cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x77d2, 0x78d2, 0x79d2, 0x50af, 0x001a, 0x4caf, 0x6ed2, 0x001a, 0x76d2, 0x7bd2, 0x51af, 0x001a, 0x6cd2, 0x72d2, 0x6bd2, 0x75d2, 0x001a, 0x001a, 0x71d2, 0x4daf, 0x4faf, 0x7ad2, 0x001a, 0x6ad2, 0x6dd2, 0x73d2, 0x001a, 0x74d2, 0x7cd2, 0x70d2, 0x001a, 0x4eaf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6db2, 0x4ed6, 0x001a, 0x001a, 0x50d6, 0x4cd6, 0x001a, 0x58d6, 0x4ad6, 0x57d6, 0x69b2, 0x48d6, 0x5bda, 0x52d6, 0x6cb2, 0x001a, 0x53d6, 0x56d6, 0x001a, 0x5ad6, 0x001a, 0x4fd6, 0x001a, 0x54d6, 0x001a, 0x001a, 0x6ab2, 0x6bb2, 0x59d6, 0x4dd6, 0x49d6, 0x5bd6, 0x001a, 0x51d6, 0x001a, 0x001a, 0x55d6, 0x001a, 0x001a, 0x001a, 0x4bd6, 0x001a, 0x48b5, 0x49b5, 0x65da, 0x4fb5, 0x001a, 0x59da, 0x62da, 0x58da, 0x4cb5, 0x60da, 0x5eda, 0x001a, 0x5fda, 0x4ab5, 0x001a, 0x63da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5cda, 0x5ada, 0x4bb5, 0x5dda, 0x61da, 0x001a, 0x001a, 0x001a, 0x4db5, 0x001a, 0x001a, 0x001a, 0x64da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x70de, 0x77de, 0x79de, 0xa1de, 0x001a, 0xdab7, 0x6bde, 0x001a, 0xd2b7, 0x001a, 0x7ade, 0xd7b7, 0xa2de, 0xceb7, 0x001a, 0x7dde, 0x001a, 0x6dde, 0x7ede, 0x6cde, 0x001a, 0xdcb7, 0x001a, 0x78de, 0xcfb7, 0xa3de, 0x001a, 0xd4b7, 0x71de, 0xd9b7, 0x7cde, 0x6fde, 0x76de, 0x72de, 0x6ede, 0xd1b7, 0xd8b7, 0xd6b7, 0xd3b7, 0xdbb7, 0xd0b7, 0x75de, 0x001a, 0xd5b7, 0x001a, 0x4eb5, 0x001a, 0x7bde, 0x001a, 0x73de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74de, 0x001a, 0x001a, 0xc1e2, 0x001a, 0xb4ba, 0x001a, 0x001a, 0xbde2, 0xc3e2, 0xbfe2, 0x001a, 0xb6ba, 0xbee2, 0xc2e2, 0xbae2, 0x001a, 0xbce2, 0xb5ba, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0e2, 0xbbe2, 0x001a, 0xb7ba, 0x001a, 0xb2ba, 0x001a, 0x001a, 0xc4e2, 0x001a, 0xb3ba, 0x67e6, 0x64e6, 0x70e6, 0x6ae6, 0x6ce6, 0xf4bc, 0x66e6, 0x6ee6, 0x001a, 0x001a, 0x6de6, 0x6be6, 0x001a, 0x71e6, 0xf7bc, 0x68e6, 0x6fe6, 0x001a, 0xf5bc, 0x001a, 0x001a, 0x63e6, 0x65e6, 0xf6bc, 0x62e6, 0x72e6, 0x001a, 0x69e6, 0x001a, 0x001a, 0x4aea, 0x51bf, 0x001a, 0x001a, 0x55ea, 0x53ea, 0x4bbf, 0x49ea, 0x4cea, 0x4dea, 0x48ea, 0x55bf, 0x56bf, 0x47ea, 0x56ea, 0x51ea, 0x4fbf, 0x4cbf, 0x50ea, 0x4eea, 0x001a, 0x001a, 0x52bf, 0x52ea, 0x4dbf, 0x001a, 0x4ebf, 0x001a, 0x4fea, 0x50bf, 0x4bea, 0x001a, 0x54ea, 0x53bf, 0x57ea, 0x58ea, 0x54bf, 0x001a, 0x001a, 0xe7c0, 0xeec0, 0x5ced, 0x62ed, 0x001a, 0x60ed, 0xeac0, 0xe9c0, 0xe6c0, 0x5eed, 0x001a, 0x001a, 0x001a, 0xecc0, 0xebc0, 0xe8c0, 0x001a, 0x61ed, 0x5ded, 0x5fed, 0x001a, 0xedc0, 0x001a, 0x001a, 0x001a, 0x77c2, 0xfbef, 0x001a, 0x74c2, 0x75c2, 0xfdef, 0x76c2, 0xfaef, 0x001a, 0xf9ef, 0x6cf2, 0xfcef, 0x001a, 0x6df2, 0x7ac3, 0x6bf2, 0x001a, 0x001a, 0x6af2, 0x001a, 0x69f2, 0x7bc3, 0x001a, 0x001a, 0x6cc4, 0x001a, 0x001a, 0x6af4, 0x6bf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcf5, 0xdbf5, 0xeac4, 0x001a, 0xdaf5, 0xecf6, 0xedf6, 0x001a, 0x001a, 0xe6f7, 0xb1f8, 0x001a, 0x001a, 0xf6f8, 0xbcf9, 0x79c6, 0xc6f9, 0xf6a4, 0x001a, 0xa6aa, 0xa7aa, 0x001a, 0x001a, 0xb8ac, 0x001a, 0x001a, 0x001a, 0x001a, 0xefc0, 0xf7a4, 0x001a, 0xa8aa, 0x52af, 0xddb7, 0xf8a4, 0x001a, 0x6eb2, 0xb8ba, 0x62c9, 0x001a, 0xb7cf, 0x7dd2, 0x001a, 0xc5e2, 0x001a, 0xf0c0, 0xf9a4, 0xa9aa, 0xb8cf, 0xb9cf, 0x66da, 0x50b5, 0x001a, 0x001a, 0xa4de, 0x001a, 0x001a, 0xdeb7, 0xc6e2, 0x001a, 0x001a, 0xf8bc, 0x001a, 0x7cc3, 0xfaa4, 0x67da, 0xfba4, 0x001a, 0xc9a6, 0x42ca, 0xc8a6, 0x65a8, 0x64a8, 0x63a8, 0x60cb, 0x001a, 0x001a, 0x001a, 0xaaaa, 0x001a, 0xabaa, 0x5bcd, 0x001a, 0xbacf, 0x001a, 0xbdcf, 0xbaac, 0xbbcf, 0x001a, 0xb9ac, 0xbccf, 0xbbac, 0x001a, 0xa2d2, 0xa1d2, 0x7ed2, 0x53af, 0x001a, 0x5dd6, 0x5ed6, 0x6fb2, 0x5cd6, 0x5fd6, 0x52b5, 0x70b2, 0x001a, 0x001a, 0x51b5, 0x6bda, 0x6ada, 0x001a, 0x68da, 0x69da, 0x001a, 0x6cda, 0xa6de, 0xa5de, 0xa9de, 0x001a, 0xa8de, 0xa7de, 0xb9ba, 0xc9e2, 0x001a, 0xc8e2, 0xbaba, 0xc7e2, 0x73e6, 0x001a, 0x74e6, 0xf9bc, 0x001a, 0x59ea, 0x5aea, 0x001a, 0x001a, 0x72f2, 0x7dc3, 0x71f2, 0x70f2, 0x6ef2, 0x6ff2, 0xebc4, 0x6cf4, 0xeef6, 0xf7f8, 0x001a, 0xfca4, 0x001a, 0xa5c9, 0xc7a5, 0xa6c9, 0x001a, 0x001a, 0x001a, 0x43ca, 0x44ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x66cb, 0x001a, 0x001a, 0x62cb, 0x001a, 0x61cb, 0xacaa, 0x65cb, 0x67a8, 0x63cb, 0x66a8, 0x67cb, 0x64cb, 0x001a, 0x001a, 0x5fcd, 0xbecf, 0x5dcd, 0x64cd, 0x001a, 0xadaa, 0x001a, 0xb0aa, 0x65cd, 0x61cd, 0x001a, 0x62cd, 0x001a, 0x5ccd, 0xafaa, 0x5ecd, 0xaeaa, 0x63cd, 0x001a, 0x60cd, 0x001a, 0x001a, 0xc2cf, 0xbdac, 0xbeac, 0x001a, 0xc5cf, 0xbfcf, 0x001a, 0xc4cf, 0x001a, 0xc0cf, 0xbcac, 0xc3cf, 0xc1cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8d2, 0xa5d2, 0x001a, 0xa7d2, 0x58af, 0x57af, 0x55af, 0xa4d2, 0xa9d2, 0x54af, 0x56af, 0xa6d2, 0x67d6, 0xa3d2, 0xaad2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62d6, 0x66d6, 0x001a, 0x65d6, 0x6eda, 0x79da, 0x001a, 0x001a, 0x68d6, 0x001a, 0x63d6, 0x6dda, 0x74b2, 0x001a, 0x001a, 0x73b2, 0x61d6, 0x64d6, 0x75b2, 0x001a, 0x72b2, 0x71b2, 0x60d6, 0x69d6, 0x001a, 0x001a, 0x001a, 0x70da, 0x77da, 0x001a, 0x54b5, 0x76da, 0x73da, 0x001a, 0x56b5, 0x001a, 0x001a, 0x001a, 0x75da, 0x001a, 0x001a, 0x6fda, 0x71da, 0x74da, 0x72da, 0x55b5, 0x78da, 0x53b5, 0xdfb7, 0x001a, 0x001a, 0xadde, 0xacde, 0xaade, 0x001a, 0xe2b7, 0xe1b7, 0xaede, 0x001a, 0xabde, 0xcae2, 0xbbba, 0xe0b7, 0x001a, 0x001a, 0x001a, 0xb0de, 0xafde, 0x001a, 0xcde2, 0xcbe2, 0xfabc, 0x001a, 0xbcba, 0xcce2, 0x76e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbbc, 0x75e6, 0x7ee6, 0x7de6, 0x7be6, 0x001a, 0x7ae6, 0x77e6, 0x78e6, 0x79e6, 0x7ce6, 0xa1e6, 0x001a, 0x001a, 0x5fea, 0x5cea, 0x5dea, 0x57bf, 0x5bea, 0x61ea, 0x60ea, 0x5eea, 0x001a, 0x64ed, 0x65ed, 0xf1c0, 0x001a, 0xf2c0, 0x63ed, 0x001a, 0x79c2, 0xfeef, 0x78c2, 0x7ec3, 0x001a, 0xa1c3, 0x6dc4, 0x6ef4, 0x6df4, 0xddf5, 0xeff6, 0x7ac5, 0xe8f7, 0xe7f7, 0xe9f7, 0xc8a5, 0xc6cf, 0x59af, 0x76b2, 0x6ad6, 0xc9a5, 0xa7c9, 0xfda4, 0x001a, 0x001a, 0x45ca, 0x001a, 0x001a, 0x001a, 0x6ccb, 0x6acb, 0x6bcb, 0x68cb, 0x68a8, 0x69cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6dcd, 0x001a, 0xb3aa, 0x6bcd, 0x67cd, 0x6acd, 0x001a, 0x66cd, 0xb5aa, 0x69cd, 0x001a, 0xb2aa, 0xb1aa, 0x001a, 0xb4aa, 0x6ccd, 0x68cd, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2ac, 0xc5ac, 0xcecf, 0xcdcf, 0xcccf, 0xbfac, 0xd5cf, 0xcbcf, 0x001a, 0xc1ac, 0xafd2, 0x001a, 0xd2cf, 0xd0cf, 0xc4ac, 0x001a, 0xc8cf, 0xd3cf, 0x001a, 0xcacf, 0xd4cf, 0xd1cf, 0xc9cf, 0x001a, 0xc0ac, 0xd6cf, 0xc7cf, 0xc3ac, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4d2, 0xabd2, 0xb6d2, 0x001a, 0xaed2, 0xb9d2, 0xbad2, 0xacd2, 0xb8d2, 0xb5d2, 0xb3d2, 0xb7d2, 0x5faf, 0x001a, 0x5daf, 0x001a, 0x001a, 0xb1d2, 0x001a, 0xadd2, 0x001a, 0xb0d2, 0xbbd2, 0xb2d2, 0x5eaf, 0xcfcf, 0x001a, 0x5aaf, 0x5caf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x78d6, 0x6dd6, 0x6bd6, 0x001a, 0x6cd6, 0x001a, 0x73d6, 0x001a, 0x74d6, 0x70d6, 0x7bb2, 0x75d6, 0x72d6, 0x6fd6, 0x001a, 0x79b2, 0x6ed6, 0x77b2, 0x7ab2, 0x71d6, 0x79d6, 0x5baf, 0x78b2, 0x77d6, 0x76d6, 0x7cb2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7eda, 0x001a, 0x001a, 0x001a, 0xa1da, 0x60b5, 0x001a, 0xa7da, 0x001a, 0x001a, 0xa9da, 0xa2da, 0x5ab5, 0xa6da, 0xa5da, 0x5bb5, 0x61b5, 0x001a, 0x62b5, 0xa8da, 0x58b5, 0x7dda, 0x7bda, 0xa3da, 0x7ada, 0x5fb5, 0x7cda, 0xa4da, 0xaada, 0x59b5, 0x5eb5, 0x5cb5, 0x5db5, 0x001a, 0x001a, 0x001a, 0x57b5, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9b7, 0xb7de, 0xe8b7, 0xbbde, 0x001a, 0xb1de, 0x001a, 0xbcde, 0x001a, 0x001a, 0x001a, 0xb2de, 0xb3de, 0x001a, 0xbdde, 0xbade, 0xb8de, 0xb9de, 0xb5de, 0xb4de, 0x001a, 0xbede, 0xe5b7, 0x001a, 0xb6de, 0x001a, 0xeab7, 0xe4b7, 0xebb7, 0xecb7, 0x001a, 0xe7b7, 0xe6b7, 0x001a, 0x001a, 0xcee2, 0xbeba, 0xbdba, 0x001a, 0x001a, 0xd3e2, 0x001a, 0xfcbc, 0xbfba, 0x001a, 0x001a, 0xc1ba, 0xd4e2, 0xe3b7, 0xc0ba, 0xd0e2, 0xd2e2, 0xcfe2, 0x001a, 0xd1e2, 0x001a, 0x001a, 0x001a, 0xabe6, 0x001a, 0x001a, 0xaae6, 0xa7e6, 0x40bd, 0x62ea, 0x41bd, 0xa6e6, 0x001a, 0xfebc, 0x001a, 0xa8e6, 0xa5e6, 0xa2e6, 0xa9e6, 0xa3e6, 0xa4e6, 0xfdbc, 0x001a, 0x001a, 0x001a, 0x001a, 0x69ed, 0x001a, 0x66ea, 0x001a, 0x65ea, 0x67ea, 0x001a, 0x66ed, 0x5abf, 0x001a, 0x63ea, 0x001a, 0x58bf, 0x001a, 0x5cbf, 0x5bbf, 0x64ea, 0x68ea, 0x001a, 0x59bf, 0x001a, 0x6ded, 0xf5c0, 0x7ac2, 0xf6c0, 0xf3c0, 0x6aed, 0x68ed, 0x001a, 0x6bed, 0x001a, 0x6eed, 0xf4c0, 0x6ced, 0x67ed, 0x001a, 0x001a, 0x42f0, 0x45f0, 0x75f2, 0x40f0, 0x001a, 0x6ff4, 0x46f0, 0x001a, 0xa2c3, 0x44f0, 0x7bc2, 0x41f0, 0x43f0, 0x47f0, 0x76f2, 0x001a, 0x74f2, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3c3, 0x73f2, 0x001a, 0x001a, 0x001a, 0x6ec4, 0x001a, 0x001a, 0x001a, 0x001a, 0xedc4, 0xf1f6, 0xecc4, 0xf3f6, 0xf0f6, 0xf2f6, 0xd0c5, 0xb2f8, 0xcaa5, 0x6ecd, 0xbcd2, 0xbdd2, 0x7db2, 0xbfde, 0x5dbf, 0xa4c3, 0x7bc5, 0xb3f8, 0xcba5, 0x001a, 0x6fcd, 0x60a2, 0x001a, 0x001a, 0xd7cf, 0x001a, 0xd8cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbed2, 0xbfd2, 0x7eb2, 0xa1b2, 0x001a, 0x001a, 0x001a, 0xabda, 0x001a, 0xc2de, 0xc1de, 0xc0de, 0xd5e2, 0x001a, 0xd6e2, 0xd7e2, 0xc2ba, 0x001a, 0x001a, 0xade6, 0xace6, 0x001a, 0x001a, 0x69ea, 0x5ebf, 0x5fbf, 0x001a, 0x72ed, 0x6fed, 0x70ed, 0x71ed, 0x49f0, 0x48f0, 0x7cc2, 0x77f2, 0xdef5, 0xcca5, 0x001a, 0xc6ac, 0x001a, 0xa2b2, 0xc3de, 0x001a, 0xcda5, 0x001a, 0xc0d2, 0xa3b2, 0x001a, 0x001a, 0x63b5, 0x64b5, 0x001a, 0xcea5, 0xcfa5, 0x46ca, 0x6aa8, 0x69a8, 0xc7ac, 0xd9cf, 0xacda, 0xd0a5, 0xd1a5, 0xd2a5, 0xd3a5, 0x001a, 0x001a, 0x001a, 0x6ba8, 0x6ca8, 0x6ecb, 0x6dcb, 0x001a, 0x001a, 0xb6aa, 0x72cd, 0x70cd, 0x71cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdacf, 0xdbcf, 0x001a, 0x001a, 0xcbac, 0xc9ac, 0x001a, 0xcaac, 0xc8ac, 0x001a, 0x001a, 0x001a, 0x001a, 0x60af, 0x001a, 0x001a, 0x001a, 0x001a, 0x64af, 0x63af, 0xc1d2, 0x62af, 0x61af, 0x001a, 0xc2d2, 0x001a, 0x001a, 0xa6b2, 0x7bd6, 0x7ad6, 0xa4b2, 0xa5b2, 0x001a, 0x001a, 0x001a, 0x66b5, 0x65b5, 0xaeda, 0x001a, 0x001a, 0xadda, 0xa7b2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedb7, 0xc5de, 0xeeb7, 0xc4de, 0x001a, 0x001a, 0x001a, 0xd8e2, 0xaee6, 0x42bd, 0x6aea, 0x001a, 0x001a, 0x001a, 0x73ed, 0x001a, 0xa6c3, 0xa5c3, 0x001a, 0x001a, 0x7cc5, 0xd4a5, 0x73cd, 0x001a, 0x001a, 0xa8b2, 0xd9e2, 0xc3ba, 0x001a, 0x001a, 0x6fcb, 0x70cb, 0x001a, 0x001a, 0x74cd, 0xb8aa, 0xb9aa, 0x001a, 0x001a, 0xb7aa, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfac, 0xd0ac, 0xcdac, 0xceac, 0x001a, 0xdccf, 0x001a, 0x001a, 0xddcf, 0xccac, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3d2, 0x001a, 0x68af, 0x69af, 0x001a, 0xabb2, 0xc9d2, 0x001a, 0x6eaf, 0x6caf, 0xcad2, 0xc5d2, 0x6baf, 0x6aaf, 0x65af, 0xc8d2, 0xc7d2, 0xc4d2, 0x6daf, 0x001a, 0xc6d2, 0x66af, 0x001a, 0x67af, 0x001a, 0x001a, 0xacb2, 0xa1d6, 0xa2d6, 0xadb2, 0x7cd6, 0x7ed6, 0xa4d6, 0xa3d6, 0x7dd6, 0x001a, 0xa9b2, 0xaab2, 0x001a, 0xb6da, 0x6bb5, 0x6ab5, 0xb0da, 0x68b5, 0x001a, 0xb3da, 0x6cb5, 0xb4da, 0x6db5, 0xb1da, 0x67b5, 0x69b5, 0xb5da, 0x001a, 0xb2da, 0xafda, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2de, 0x001a, 0xc7de, 0xf0b7, 0xf3b7, 0xf2b7, 0xf7b7, 0xf6b7, 0xd3de, 0xd1de, 0xcade, 0xcede, 0xcdde, 0xf4b7, 0xd0de, 0xccde, 0xd4de, 0xcbde, 0xf5b7, 0xefb7, 0xf1b7, 0x001a, 0xc9de, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbe2, 0xc7ba, 0xdfe2, 0xc6ba, 0xdce2, 0xc5ba, 0x001a, 0xc8de, 0xcfde, 0xdee2, 0x001a, 0xc8ba, 0xe0e2, 0xdde2, 0xdae2, 0x001a, 0x001a, 0xb1e6, 0xb5e6, 0xb7e6, 0xb3e6, 0xb2e6, 0xb0e6, 0x45bd, 0x43bd, 0x48bd, 0x49bd, 0xb4e6, 0x46bd, 0xafe6, 0x47bd, 0xc4ba, 0xb6e6, 0x44bd, 0x001a, 0x001a, 0x001a, 0x6cea, 0x001a, 0x6bea, 0x73ea, 0x6dea, 0x72ea, 0x6fea, 0x60bf, 0x71ea, 0x001a, 0x001a, 0x61bf, 0x001a, 0x62bf, 0x001a, 0x70ea, 0x6eea, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8c0, 0x74ed, 0x001a, 0x001a, 0xf7c0, 0x77ed, 0x75ed, 0x76ed, 0x001a, 0x001a, 0xf9c0, 0x001a, 0x001a, 0x001a, 0x4df0, 0x001a, 0xa1c2, 0x4ef0, 0x001a, 0x001a, 0x7dc2, 0x4ff0, 0x7ec2, 0x4cf0, 0x50f0, 0x001a, 0x4af0, 0x001a, 0x001a, 0xa7c3, 0x78f2, 0xa8c3, 0x6fc4, 0x001a, 0x4bf0, 0x70c4, 0x001a, 0x001a, 0x001a, 0xeec4, 0xdff5, 0x001a, 0x7ec5, 0xf4f6, 0x7dc5, 0x001a, 0xeaf7, 0xf5c5, 0xf6c5, 0x001a, 0x001a, 0xccf9, 0x001a, 0x001a, 0xd1ac, 0xdecf, 0x001a, 0x6eb5, 0x6fb5, 0xd5a5, 0xcaa6, 0x47ca, 0x001a, 0x71cb, 0x6da8, 0x001a, 0xbaaa, 0x001a, 0xd2ac, 0xd3ac, 0xd4ac, 0xa6d6, 0xcbd2, 0x6faf, 0x001a, 0x001a, 0xaeb2, 0xa5d6, 0x001a, 0x001a, 0xb8da, 0x71b5, 0x001a, 0xb7da, 0x70b5, 0x001a, 0x001a, 0xd5de, 0x4abd, 0xbbe6, 0xb8e6, 0xb9e6, 0xbae6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x78ed, 0x001a, 0x51f0, 0x001a, 0x001a, 0x001a, 0x71f4, 0x70f4, 0x001a, 0xf5f6, 0xd6a5, 0x75cd, 0x70af, 0x001a, 0x001a, 0x001a, 0x72b5, 0xd6de, 0x001a, 0x001a, 0xe1e2, 0x001a, 0x4bbd, 0x74ea, 0x001a, 0x52f0, 0x72f4, 0xd7a5, 0x001a, 0x001a, 0xbbaa, 0xd7ac, 0xdfcf, 0xd8ac, 0xd6ac, 0x001a, 0xd5ac, 0xccd2, 0x71af, 0x001a, 0x001a, 0x72af, 0x73af, 0x001a, 0x001a, 0x001a, 0xb0b2, 0xa7d6, 0xafb2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9da, 0xb1b2, 0x73b5, 0xd7de, 0xf8b7, 0xf9b7, 0x001a, 0xc9ba, 0x001a, 0xcaba, 0x4cbd, 0x64bf, 0x75ea, 0x63bf, 0x001a, 0x79ed, 0xfac0, 0x001a, 0x53f0, 0x73f4, 0xd8a5, 0x6ea8, 0x78cd, 0x77cd, 0xbcaa, 0x76cd, 0xbdaa, 0x79cd, 0x001a, 0xe5cf, 0xdbac, 0xdaac, 0xe7cf, 0xe6cf, 0xdfac, 0x001a, 0xdeac, 0x001a, 0x001a, 0xd9ac, 0x001a, 0xe1cf, 0xe2cf, 0xe3cf, 0x001a, 0xe0ac, 0xe0cf, 0xdcac, 0xe4cf, 0xddac, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfd2, 0xd3d2, 0xd1d2, 0xd0d2, 0x001a, 0xd4d2, 0x001a, 0x001a, 0x001a, 0xd5d2, 0xd6d2, 0xced2, 0x001a, 0xcdd2, 0x001a, 0x75af, 0x76af, 0x001a, 0xd7d2, 0xd2d2, 0x001a, 0xb0d6, 0x001a, 0xd8d2, 0x77af, 0x74af, 0x001a, 0x001a, 0x001a, 0xaad6, 0x001a, 0xa9d6, 0x001a, 0xabd6, 0xacd6, 0xaed6, 0xadd6, 0xb2d6, 0xb5b2, 0xb2b2, 0xb6b2, 0xa8d6, 0xb7b2, 0xb1d6, 0xb4b2, 0xafd6, 0xb3b2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcda, 0xbeda, 0xbada, 0xbbda, 0x001a, 0x001a, 0xbfda, 0xc1da, 0xc2da, 0xbdda, 0xc0da, 0x74b5, 0x001a, 0x001a, 0xdbde, 0x001a, 0xe0de, 0xd8de, 0xdcde, 0x001a, 0x001a, 0xe1de, 0xddde, 0xfab7, 0x43b8, 0x001a, 0xfdb7, 0xd9de, 0xdade, 0xceba, 0x46b8, 0xfeb7, 0x001a, 0x44b8, 0xfcb7, 0xdfde, 0x45b8, 0xdede, 0x41b8, 0xfbb7, 0x42b8, 0xe2de, 0xe6e2, 0xe8e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x40b8, 0x001a, 0x001a, 0xe3e2, 0xccba, 0xe9e2, 0xcdba, 0xe7e2, 0xe2e2, 0xe5e2, 0xeae2, 0xcbba, 0xe4e2, 0x001a, 0x4ebd, 0xbfe6, 0xbee6, 0x001a, 0x51bd, 0x4fbd, 0xbce6, 0x4dbd, 0xbde6, 0x001a, 0x50bd, 0x001a, 0x001a, 0x001a, 0x7dea, 0x001a, 0xa1ea, 0x001a, 0x7eea, 0x76ea, 0x7aea, 0x79ea, 0x77ea, 0x66bf, 0x67bf, 0x65bf, 0x78ea, 0x7bea, 0x7cea, 0x001a, 0x68bf, 0x001a, 0x40c1, 0xa3ed, 0x001a, 0xfcc0, 0x7bed, 0xfec0, 0x41c1, 0x001a, 0x001a, 0xfdc0, 0xa2ed, 0x7ced, 0xfbc0, 0xa1ed, 0x7aed, 0x7eed, 0x7ded, 0x001a, 0x001a, 0x55f0, 0xa4c2, 0xa5c2, 0xa2c2, 0x001a, 0xa3c2, 0x001a, 0x001a, 0x54f0, 0x001a, 0x7bf2, 0x001a, 0x001a, 0xa9c3, 0x001a, 0x79f2, 0x7af2, 0x001a, 0x74f4, 0x77f4, 0x75f4, 0x76f4, 0xe0f5, 0x001a, 0x001a, 0xefc4, 0xebf7, 0xb4f8, 0x001a, 0xf7c5, 0xf8f8, 0xf9f8, 0x66c6, 0xd9a5, 0xe1ac, 0x001a, 0xc3da, 0x001a, 0xe3de, 0x001a, 0xdaa5, 0x6fa8, 0x001a, 0xbeaa, 0x001a, 0xe8cf, 0xe9cf, 0x78af, 0x001a, 0x001a, 0xc4da, 0x75b5, 0x47b8, 0x42c1, 0xa4ed, 0x7cf2, 0x78f4, 0xdba5, 0x001a, 0x001a, 0x001a, 0xa1cd, 0x7acd, 0x7ccd, 0x7ecd, 0x7dcd, 0x7bcd, 0xbfaa, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2ac, 0xf2cf, 0x001a, 0xedcf, 0xeacf, 0x001a, 0x001a, 0xf1cf, 0x001a, 0x001a, 0xe4ac, 0xe5ac, 0xf0cf, 0xefcf, 0xeecf, 0xebcf, 0xeccf, 0xf3cf, 0xe3ac, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7caf, 0x001a, 0xa4af, 0xa3af, 0xe1d2, 0xdbd2, 0xd9d2, 0x001a, 0xa1af, 0xb9d6, 0x7aaf, 0xded2, 0xe2d2, 0xe4d2, 0xe0d2, 0xdad2, 0xa2af, 0xdfd2, 0xddd2, 0x79af, 0xe5d2, 0xa5af, 0xe3d2, 0x7daf, 0xdcd2, 0x001a, 0x7eaf, 0x7baf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9b2, 0x001a, 0xbad6, 0x001a, 0x001a, 0xb3d6, 0xb5d6, 0xb7d6, 0x001a, 0xb8d6, 0xb6d6, 0xbab2, 0x001a, 0xbbd6, 0x001a, 0xb4d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8da, 0x76b5, 0xd0da, 0x001a, 0xc5da, 0x001a, 0xd1da, 0x001a, 0xc6da, 0xc7da, 0x001a, 0x001a, 0xcfda, 0xceda, 0xcbda, 0xb8b2, 0x77b5, 0xc9da, 0xccda, 0x78b5, 0xcdda, 0xcada, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeede, 0x001a, 0xf2de, 0x4eb8, 0x001a, 0xf0e2, 0x51b8, 0xf0de, 0xd6f9, 0x001a, 0xedde, 0xe8de, 0xeade, 0xebde, 0xe4de, 0x001a, 0x4db8, 0x001a, 0x001a, 0x4cb8, 0x001a, 0x48b8, 0xe7de, 0x001a, 0x4fb8, 0x001a, 0x50b8, 0xe6de, 0xe9de, 0xf1de, 0x4ab8, 0x4bb8, 0xefde, 0xe5de, 0x001a, 0x001a, 0x001a, 0xf2e2, 0xd0ba, 0xf4e2, 0xecde, 0xf6e2, 0xd4ba, 0xf7e2, 0xf3e2, 0x001a, 0xd1ba, 0xefe2, 0xd3ba, 0xece2, 0xf1e2, 0xf5e2, 0xeee2, 0x001a, 0x001a, 0x49b8, 0x001a, 0xebe2, 0xd2ba, 0xede2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x54bd, 0xc1e6, 0x58bd, 0x001a, 0x56bd, 0x001a, 0x001a, 0xcfba, 0x001a, 0xc8e6, 0xc9e6, 0x53bd, 0x001a, 0x001a, 0xc7e6, 0xcae6, 0x55bd, 0x52bd, 0xc3e6, 0xc0e6, 0xc5e6, 0xc2e6, 0x59bd, 0xc4e6, 0x001a, 0x001a, 0xc6e6, 0x57bd, 0x001a, 0x001a, 0x001a, 0x001a, 0x6abf, 0xa8ea, 0x001a, 0xa2ea, 0xa6ea, 0xacea, 0xadea, 0xa9ea, 0xaaea, 0xa7ea, 0x001a, 0xa4ea, 0x001a, 0x6cbf, 0x69bf, 0xa3ea, 0xa5ea, 0x001a, 0x6bbf, 0xabea, 0x001a, 0x46c1, 0x001a, 0x001a, 0xaaed, 0xa5ed, 0x45c1, 0x001a, 0x001a, 0x43c1, 0x001a, 0xaced, 0x44c1, 0xa8ed, 0xa9ed, 0xa6ed, 0xaded, 0x56f0, 0x001a, 0x47c1, 0xa7ed, 0x001a, 0xaeed, 0xabed, 0x001a, 0x001a, 0x001a, 0x5af0, 0x001a, 0x001a, 0x57f0, 0x001a, 0xa6c2, 0x001a, 0x5bf0, 0x5df0, 0x5cf0, 0x58f0, 0x59f0, 0x001a, 0x001a, 0xa3f2, 0x001a, 0xaac3, 0x001a, 0x7ef2, 0xa2f2, 0x7df2, 0xa4f2, 0x001a, 0x001a, 0xa1f2, 0x001a, 0x7af4, 0x7df4, 0x79f4, 0x71c4, 0x7bf4, 0x7cf4, 0x7ef4, 0x72c4, 0x74c4, 0x73c4, 0xe1f5, 0x001a, 0xe3f5, 0x001a, 0xe2f5, 0x001a, 0x001a, 0x001a, 0xf6f6, 0x001a, 0x001a, 0xb5f8, 0xfaf8, 0xdca5, 0x001a, 0x001a, 0x72cb, 0xc0aa, 0xa3cd, 0xc1aa, 0xc2aa, 0xa2cd, 0x001a, 0xf8cf, 0xf7cf, 0xe6ac, 0xe9ac, 0xe8ac, 0xe7ac, 0xf4cf, 0xf6cf, 0xf5cf, 0x001a, 0x001a, 0xe8d2, 0xa7af, 0xecd2, 0xebd2, 0xead2, 0xe6d2, 0xa6af, 0xaaaf, 0xadaf, 0x001a, 0x001a, 0xaeaf, 0xe7d2, 0xe9d2, 0xacaf, 0xabaf, 0xa9af, 0xa8af, 0xc2d6, 0x001a, 0xc0d6, 0xbcd6, 0xbbb2, 0x001a, 0xbdd6, 0xbcb2, 0xbed6, 0xbfd6, 0xc1d6, 0x001a, 0xbdb2, 0x001a, 0x001a, 0xd5da, 0x001a, 0xd4da, 0xd3da, 0xd2da, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6de, 0x52b8, 0x001a, 0xf3de, 0xf5de, 0x001a, 0x53b8, 0x001a, 0x54b8, 0xf4de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41e3, 0x001a, 0xf9e2, 0xfae2, 0x001a, 0xd7ba, 0xd5ba, 0xd6ba, 0x43e3, 0x001a, 0x42e3, 0xfee2, 0xfde2, 0xfce2, 0xfbe2, 0x40e3, 0xf8e2, 0x001a, 0xcbe6, 0xd0e6, 0xcee6, 0x001a, 0x001a, 0x001a, 0xcde6, 0xcce6, 0xcfe6, 0x001a, 0xaeea, 0x001a, 0x6dbf, 0x48c1, 0xb0ed, 0x001a, 0x49c1, 0xafed, 0x5ff0, 0x5ef0, 0xa7c2, 0x001a, 0xa5f2, 0xabc3, 0xa1f4, 0xa1c5, 0xf7f6, 0x001a, 0xb7f8, 0xb6f8, 0xa8c9, 0xeaac, 0xebac, 0xc3d6, 0x001a, 0x56b8, 0xdda5, 0x72a8, 0x71a8, 0x70a8, 0x001a, 0x001a, 0x001a, 0xa4cd, 0x001a, 0x001a, 0xc4aa, 0xc3aa, 0x001a, 0xeeac, 0x001a, 0xfacf, 0xfdcf, 0xfbcf, 0x001a, 0xecac, 0xedac, 0x001a, 0x001a, 0xf9cf, 0xfccf, 0x001a, 0xb5af, 0x001a, 0x001a, 0x001a, 0xf3d2, 0xf5d2, 0xf4d2, 0xb2af, 0xefd2, 0x001a, 0x001a, 0xb0af, 0xafaf, 0x001a, 0xb3af, 0xb1af, 0x001a, 0xb4af, 0xf2d2, 0xedd2, 0xeed2, 0xf1d2, 0xf0d2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6d6, 0xc7d6, 0xc5d6, 0x001a, 0xc4d6, 0xbeb2, 0x001a, 0x001a, 0x001a, 0x001a, 0x7db5, 0x001a, 0xd6da, 0xd8da, 0xdada, 0x7cb5, 0x001a, 0x001a, 0x7ab5, 0x001a, 0xd7da, 0x7bb5, 0xd9da, 0x79b5, 0x001a, 0x001a, 0x41df, 0xf7de, 0xfade, 0xfede, 0x5ab8, 0xfcde, 0x001a, 0xfbde, 0xf8de, 0xf9de, 0x58b8, 0x40df, 0x57b8, 0x001a, 0x5cb8, 0x5bb8, 0x59b8, 0x001a, 0xfdde, 0x001a, 0x001a, 0x001a, 0x49e3, 0x001a, 0x48e3, 0x001a, 0x001a, 0x44e3, 0x001a, 0x001a, 0xd8ba, 0x47e3, 0x46e3, 0xd9ba, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ebd, 0x001a, 0xd2e6, 0x001a, 0x5fbd, 0x5bbd, 0x5dbd, 0x001a, 0x5abd, 0x5cbd, 0x001a, 0x001a, 0x001a, 0xafea, 0x001a, 0x70bf, 0xb1ea, 0xb0ea, 0x001a, 0x45e3, 0x72bf, 0x71bf, 0x6ebf, 0x6fbf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5ed, 0x001a, 0xb3ed, 0x4ac1, 0xb4ed, 0x001a, 0xb6ed, 0xb2ed, 0xb1ed, 0x001a, 0x001a, 0x60f0, 0xaac2, 0xa8c2, 0xa9c2, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f2, 0xa7f2, 0xadc3, 0x001a, 0xacc3, 0xa3f4, 0xa4f4, 0xa2f4, 0x001a, 0xf8f6, 0xf9f6, 0x001a, 0x001a, 0xdea5, 0x48ca, 0x73a8, 0x001a, 0xa5cd, 0xc6aa, 0xc5aa, 0xa6cd, 0x001a, 0x001a, 0x40d0, 0xefac, 0xfecf, 0xf0ac, 0x001a, 0x001a, 0xb6af, 0xf8d2, 0xf6d2, 0xfcd2, 0xb7af, 0xf7d2, 0xfbd2, 0xf9d2, 0xfad2, 0x001a, 0x001a, 0xc8d6, 0xcad6, 0x001a, 0xbfb2, 0x001a, 0xc9d6, 0xc0b2, 0xa2b5, 0xa1b5, 0x7eb5, 0xdbda, 0x001a, 0x001a, 0x001a, 0x001a, 0x44df, 0x5db8, 0x5eb8, 0x001a, 0x43df, 0x42df, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ae3, 0xdbba, 0xdaba, 0x4be3, 0x4ce3, 0x001a, 0x61bd, 0x60bd, 0x001a, 0xb5ea, 0xd3e6, 0xd5e6, 0xd4e6, 0xb4ea, 0xb2ea, 0xb6ea, 0xb3ea, 0x001a, 0x73bf, 0x001a, 0x001a, 0x001a, 0xb7ed, 0x4bc1, 0xb8ed, 0xb9ed, 0x001a, 0x001a, 0xabc2, 0xacc2, 0x001a, 0x75c4, 0x001a, 0x001a, 0xd1c5, 0xdfa5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdd2, 0xb8af, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbab3, 0xb9b3, 0x001a, 0x001a, 0xa4b5, 0xddda, 0xa3b5, 0xdcda, 0x001a, 0x001a, 0x001a, 0x001a, 0x45df, 0x001a, 0xdcba, 0x4de3, 0xddba, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x76c4, 0xa5f4, 0x001a, 0xcba6, 0xc7aa, 0xa7cd, 0x001a, 0xf2ac, 0x001a, 0xf1ac, 0x42d0, 0x43d0, 0x001a, 0x001a, 0x40d3, 0x42d3, 0xb9af, 0x001a, 0x44d3, 0x47d3, 0x45d3, 0x001a, 0x001a, 0x001a, 0x46d3, 0x43d3, 0xfed2, 0xbaaf, 0x48d3, 0x41d3, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3d6, 0xc6b2, 0xdcd6, 0xc3b2, 0x001a, 0xd5d6, 0xc7b2, 0x001a, 0xc1b2, 0x001a, 0xd0d6, 0xddd6, 0xd1d6, 0xced6, 0xc5b2, 0x001a, 0xc2b2, 0x001a, 0xd4d6, 0xd7d6, 0xc4b2, 0xd8d6, 0xc8b2, 0xd9d6, 0xcfd6, 0xd6d6, 0xdad6, 0xd2d6, 0xcdd6, 0xcbd6, 0x001a, 0x001a, 0xdbd6, 0x001a, 0x001a, 0xdfda, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4da, 0x001a, 0x001a, 0x001a, 0xe0da, 0xe6da, 0xa7b5, 0xccd6, 0xe1da, 0xa5b5, 0xdeda, 0xacb5, 0xe2da, 0xabb5, 0xe3da, 0xadb5, 0xa8b5, 0xaeb5, 0xa9b5, 0x001a, 0xaab5, 0x001a, 0xa6b5, 0x001a, 0xe5da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x61b8, 0x50df, 0x001a, 0x53df, 0x47df, 0x4cdf, 0x46df, 0x63b8, 0x001a, 0x4adf, 0x001a, 0x001a, 0x001a, 0x48df, 0x62b8, 0x001a, 0x4fdf, 0x4edf, 0x4bdf, 0x4ddf, 0x49df, 0xe1ba, 0x52df, 0x5fb8, 0x51df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5de3, 0x001a, 0xe8ba, 0x58e3, 0x001a, 0xe7ba, 0x4ee3, 0x001a, 0x50e3, 0xe0ba, 0x55e3, 0x54e3, 0x57e3, 0xe5ba, 0x52e3, 0x51e3, 0x001a, 0x001a, 0xe4ba, 0xdfba, 0x53e3, 0xe2ba, 0x59e3, 0x5be3, 0x001a, 0x56e3, 0x4fe3, 0xe3ba, 0x001a, 0x001a, 0x69bd, 0xdeba, 0x001a, 0x001a, 0x5ce3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e6, 0x62bd, 0x001a, 0xdbe6, 0x001a, 0x63bd, 0x001a, 0x001a, 0x65bd, 0xdee6, 0x001a, 0xd6e6, 0xe6ba, 0xdce6, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e6, 0x001a, 0x60b8, 0x68bd, 0x001a, 0x001a, 0x64bd, 0x001a, 0x66bd, 0x67bd, 0x001a, 0x76bf, 0xdde6, 0xd7e6, 0x6abd, 0x001a, 0xdae6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0ea, 0xbbea, 0x001a, 0x001a, 0xc5ea, 0x74bf, 0xbdea, 0x78bf, 0xc3ea, 0xbaea, 0xb7ea, 0xc6ea, 0x51c1, 0x79bf, 0xc2ea, 0xb8ea, 0x77bf, 0xbcea, 0x7bbf, 0xb9ea, 0xbeea, 0x7abf, 0xc1ea, 0xc4ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbed, 0xcced, 0xbced, 0xc3ed, 0xc1ed, 0x001a, 0x001a, 0x4fc1, 0xc8ed, 0xbfea, 0x001a, 0xbfed, 0x001a, 0xc9ed, 0x4ec1, 0xbeed, 0xbded, 0xc7ed, 0xc4ed, 0xc6ed, 0x001a, 0xbaed, 0xcaed, 0x4cc1, 0x001a, 0xc5ed, 0xceed, 0xc2ed, 0x50c1, 0x4dc1, 0xc0ed, 0xbbed, 0xcded, 0x75bf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x63f0, 0x001a, 0x001a, 0x61f0, 0x67f0, 0xb0c2, 0x65f0, 0x64f0, 0xb2c2, 0x6af0, 0xb1c2, 0x001a, 0x6bf0, 0x68f0, 0xaec2, 0x69f0, 0x62f0, 0xafc2, 0xadc2, 0xabf2, 0x66f0, 0x001a, 0x001a, 0x6cf0, 0x001a, 0x001a, 0xa8f2, 0x001a, 0x001a, 0x001a, 0xb2c3, 0xb0c3, 0xaaf2, 0x001a, 0xacf2, 0xa9f2, 0xb1c3, 0xaec3, 0xafc3, 0xb3c3, 0x001a, 0x001a, 0x78c4, 0x001a, 0xaaf4, 0x001a, 0xa9f4, 0xa7f4, 0xa6f4, 0xa8f4, 0x001a, 0x77c4, 0x79c4, 0x001a, 0x001a, 0xf0c4, 0x001a, 0x001a, 0xe5f5, 0xe4f5, 0x001a, 0x001a, 0xfaf6, 0x001a, 0xfcf6, 0xfef6, 0xfdf6, 0xfbf6, 0x001a, 0x001a, 0xa3c5, 0xa2c5, 0x001a, 0x001a, 0xd3c5, 0xd2c5, 0xd4c5, 0xedf7, 0xecf7, 0x001a, 0xfbf8, 0xb8f8, 0xfcf8, 0x58c6, 0x001a, 0x59c6, 0x6df9, 0x001a, 0x001a, 0x7ec6, 0xcca6, 0x001a, 0xa8cd, 0x001a, 0x001a, 0x45d0, 0x46d0, 0x44d0, 0x001a, 0x001a, 0xf3ac, 0x001a, 0x47d0, 0x48d0, 0x49d0, 0x001a, 0x001a, 0x49d3, 0x4fd3, 0x001a, 0x001a, 0x4dd3, 0xbbaf, 0x4bd3, 0x001a, 0x4cd3, 0x4ed3, 0x001a, 0x001a, 0x001a, 0x4ad3, 0xc9b2, 0x001a, 0xded6, 0xcbb2, 0xe0d6, 0xcab2, 0xdfd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8da, 0xafb5, 0x001a, 0xeada, 0xe7da, 0xe1d6, 0x001a, 0xb0b5, 0x001a, 0xdbf9, 0xe9da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56df, 0x001a, 0x64b8, 0x54df, 0x65b8, 0x55df, 0x66b8, 0x001a, 0x001a, 0x001a, 0xe9ba, 0x61e3, 0x5ee3, 0x60e3, 0xeaba, 0xebba, 0x5fe3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfe6, 0x001a, 0x001a, 0xe0e6, 0x001a, 0x6bbd, 0xe2e6, 0xe1e6, 0x001a, 0x61a2, 0x001a, 0xcaea, 0xcbea, 0xc7ea, 0x001a, 0xc8ea, 0x7cbf, 0x7dbf, 0xc9ea, 0x001a, 0x57c1, 0x001a, 0x001a, 0x53c1, 0x58c1, 0x54c1, 0x56c1, 0x52c1, 0x001a, 0x55c1, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3c2, 0xcfed, 0x001a, 0xaef2, 0x001a, 0xadf2, 0x001a, 0xabf4, 0x7ac4, 0x7bc4, 0x41f7, 0xe6f5, 0x001a, 0x40f7, 0x001a, 0xfdf8, 0xa4f9, 0xcda6, 0x001a, 0x001a, 0x74a8, 0x001a, 0xa9cd, 0xc8aa, 0x001a, 0xf6ac, 0x4cd0, 0xf4ac, 0x4ad0, 0xf9ac, 0xf5ac, 0xfaac, 0xf8ac, 0x4bd0, 0xf7ac, 0xbfaf, 0xbeaf, 0x5ad3, 0xc7af, 0x53d3, 0x59d3, 0xc3af, 0x52d3, 0x58d3, 0x56d3, 0xc2af, 0xc4af, 0x55d3, 0xbdaf, 0x54d3, 0xc8af, 0xc5af, 0xc9af, 0xc6af, 0x51d3, 0x50d3, 0x57d3, 0xc0af, 0xbcaf, 0xc1af, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0d6, 0xe9d6, 0x001a, 0xb5b5, 0xe8d6, 0x001a, 0xcfb2, 0xd6b2, 0xd3b2, 0xd9b2, 0xd8b2, 0xd4b2, 0x001a, 0xe2d6, 0xe5d6, 0x001a, 0xe4d6, 0xd0b2, 0xe6d6, 0xefd6, 0xd1b2, 0xe3d6, 0xecd6, 0xedd6, 0xd2b2, 0xead6, 0xd7b2, 0xcdb2, 0xd5b2, 0xe7d6, 0xccb2, 0xebd6, 0x001a, 0x001a, 0xeed6, 0x001a, 0x001a, 0x001a, 0xfbda, 0xf2da, 0xb2b5, 0xf9da, 0xf6da, 0xeeda, 0xf7da, 0xb4b5, 0xefda, 0x001a, 0xebda, 0x001a, 0x001a, 0x6cb8, 0xf4da, 0x001a, 0xb1b5, 0xfada, 0x001a, 0xb8b5, 0xbab5, 0xedda, 0x001a, 0x001a, 0xb9b5, 0xf0da, 0xb3b5, 0xf8da, 0xf1da, 0xf5da, 0x001a, 0xf3da, 0xb6b5, 0xecda, 0xbbb5, 0xceb2, 0xb7b5, 0xbcb5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x68b8, 0x5ddf, 0x5fdf, 0x61df, 0x65df, 0x001a, 0x5bdf, 0x59df, 0x6ab8, 0x001a, 0x60df, 0x64df, 0x5cdf, 0x58df, 0x001a, 0x57df, 0x001a, 0x001a, 0x001a, 0x62df, 0x5adf, 0x5edf, 0x6bb8, 0x001a, 0x69b8, 0x66df, 0x67b8, 0x63df, 0x001a, 0x72e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeeba, 0x6ae3, 0x78bd, 0x74e3, 0xf1ba, 0x78e3, 0xf7ba, 0x65e3, 0x001a, 0x001a, 0x75e3, 0x62e3, 0x001a, 0x77e3, 0x66e3, 0x001a, 0xfeba, 0xfbba, 0x76e3, 0x70e3, 0xedba, 0xf5ba, 0xf4ba, 0x001a, 0xf3ba, 0xf9ba, 0x001a, 0x63e3, 0xfaba, 0x71e3, 0xf6ba, 0xecba, 0x73e3, 0xefba, 0xf0ba, 0xf8ba, 0x68e3, 0x67e3, 0x64e3, 0x001a, 0x6ce3, 0x69e3, 0x6de3, 0xfdba, 0x001a, 0x79e3, 0xf2ba, 0x6ee3, 0x6fe3, 0x001a, 0x6be3, 0x001a, 0x001a, 0x001a, 0xfcba, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7e6, 0x70bd, 0x79bd, 0x75bd, 0xe4e6, 0x001a, 0x72bd, 0x76bd, 0xf0e6, 0x6cbd, 0xe8e6, 0x001a, 0x74bd, 0x001a, 0x001a, 0xebe6, 0xe6e6, 0x73bd, 0x77bd, 0xe5e6, 0x001a, 0x71bd, 0x001a, 0xefe6, 0x6ebd, 0xeee6, 0xede6, 0x7abd, 0x72e5, 0x6dbd, 0x001a, 0xece6, 0xe3e6, 0x001a, 0x7bbd, 0xeae6, 0x6fbd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2bf, 0xa7bf, 0x7ebf, 0xd8ea, 0xcfea, 0xdbea, 0xd3ea, 0xd9ea, 0xa8bf, 0xa1bf, 0xccea, 0xd2ea, 0xdcea, 0xd5ea, 0xdaea, 0xceea, 0x001a, 0x001a, 0xd6ea, 0xa3bf, 0xd4ea, 0xa6bf, 0xa5bf, 0xd0ea, 0xd1ea, 0xcdea, 0xd7ea, 0xa4bf, 0xdeea, 0xddea, 0x001a, 0x001a, 0x001a, 0xdaed, 0xd6ed, 0x5fc1, 0x001a, 0xd0ed, 0x59c1, 0x69c1, 0xdced, 0x61c1, 0x5dc1, 0xd3ed, 0x64c1, 0x67c1, 0xdeed, 0x5cc1, 0xd5ed, 0x65c1, 0xe0ed, 0xdded, 0xd1ed, 0x60c1, 0x5ac1, 0x68c1, 0xd8ed, 0x63c1, 0xd2ed, 0x5ec1, 0xdfed, 0x62c1, 0x5bc1, 0xd9ed, 0x66c1, 0xd7ed, 0x001a, 0x001a, 0xdbed, 0x001a, 0x001a, 0x001a, 0x6ef0, 0x74f0, 0xb9c2, 0x77f0, 0xb4c2, 0xb5c2, 0x6ff0, 0x76f0, 0x71f0, 0xbac2, 0xb7c2, 0x001a, 0x6df0, 0x001a, 0xb6c2, 0x73f0, 0x75f0, 0xb8c2, 0x72f0, 0x70f0, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8f2, 0xb7c3, 0xb8c3, 0xb4c3, 0x001a, 0xb5c3, 0x001a, 0xb4f2, 0xb2f2, 0x001a, 0xb6f2, 0xbac3, 0xb7f2, 0xb0f2, 0xaff2, 0xb3f2, 0xb1f2, 0xb6c3, 0xb5f2, 0xacf4, 0x7ec4, 0x7dc4, 0xadf4, 0x001a, 0xaff4, 0xaef4, 0xa1c4, 0x001a, 0x001a, 0x001a, 0xebf5, 0xe8f5, 0xe9f5, 0x001a, 0xe7f5, 0xeaf5, 0xf2c4, 0xecf5, 0x001a, 0xf1c4, 0x001a, 0x42f7, 0x001a, 0xd5c5, 0xd7c5, 0xeef7, 0xd6c5, 0xb9f8, 0x40f9, 0x42f9, 0xfef8, 0x41f9, 0x6cc6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcea6, 0x001a, 0xfbac, 0x6fd2, 0xcaaf, 0x001a, 0x001a, 0xdab2, 0xfcda, 0xfdda, 0x001a, 0x001a, 0x001a, 0xdfea, 0x6ac1, 0xe1ed, 0x001a, 0x001a, 0xbbc2, 0x001a, 0xbaf2, 0xb9f2, 0xa2c4, 0xedf5, 0x001a, 0x43f7, 0xf8c5, 0x49ca, 0x001a, 0x001a, 0xc9aa, 0x75a8, 0x001a, 0x001a, 0x4dd0, 0x001a, 0x001a, 0x60d3, 0x5bd3, 0x5fd3, 0x5dd3, 0xcbaf, 0x5ed3, 0x5cd3, 0x001a, 0xf1d6, 0x001a, 0xfeda, 0x40db, 0x69df, 0x6adf, 0x6eb8, 0x6fb8, 0x68df, 0x6bdf, 0x67df, 0x6db8, 0x001a, 0x40bb, 0x001a, 0x70b8, 0x7ae3, 0x001a, 0x7cbd, 0xf1e6, 0x7dbd, 0x001a, 0xa9bf, 0xe2ea, 0xe0ea, 0xe1ea, 0xe4ed, 0xe3ed, 0xe2ed, 0x001a, 0x001a, 0x001a, 0xbbf2, 0x001a, 0xb9c3, 0xbcf2, 0x44f7, 0xf9c5, 0xbaf8, 0xcfa6, 0xcbaa, 0xcaaa, 0x4fd0, 0xfcac, 0x001a, 0x001a, 0x4ed0, 0x62d3, 0x001a, 0xccaf, 0xf2d6, 0x61d3, 0x001a, 0x001a, 0x001a, 0xdcb2, 0xf5d6, 0xf3d6, 0xf4d6, 0xdbb2, 0x001a, 0x42db, 0x43db, 0x41db, 0x001a, 0x73b8, 0x6ddf, 0x6cdf, 0x6edf, 0x72b8, 0x71b8, 0x001a, 0x001a, 0xf2e6, 0xf4e6, 0x001a, 0x7ebd, 0xf3e6, 0xe3ea, 0xaabf, 0x79f0, 0x001a, 0x78f0, 0xbbc3, 0xbdf2, 0xbdc3, 0xbcc3, 0xb0f4, 0xeef5, 0xf3c4, 0xd0a6, 0x50d0, 0xfdac, 0x65d3, 0xceaf, 0x64d3, 0x63d3, 0x001a, 0xcdaf, 0x001a, 0xfbd6, 0x001a, 0xfdd6, 0xf6d6, 0xf7d6, 0xddb2, 0xf8d6, 0xdeb2, 0xfcd6, 0xf9d6, 0xfad6, 0xdfb2, 0x001a, 0xbeb5, 0xbfb5, 0x001a, 0x44db, 0x001a, 0x001a, 0x001a, 0x6fdf, 0x70df, 0x001a, 0x7ee3, 0x43bb, 0x41bb, 0x42bb, 0x7be3, 0x7ce3, 0x001a, 0x7de3, 0xf9e6, 0x001a, 0xfae6, 0xa1bd, 0xf7e6, 0xf6e6, 0xf8e6, 0xf5e6, 0xadbf, 0xe4ea, 0xabbf, 0xacbf, 0xe6ed, 0x6bc1, 0xe5ed, 0xa8ef, 0x001a, 0x7af0, 0x7bf0, 0xbcc2, 0x001a, 0xbdc2, 0x6cc1, 0xbef2, 0xbff2, 0xb1f4, 0xa3c4, 0xd1a6, 0x001a, 0xd2a6, 0xfeac, 0xccaa, 0xcfaf, 0x51d0, 0x001a, 0x001a, 0x001a, 0xc0b5, 0xd3a6, 0x41ad, 0x52d0, 0x53d0, 0x40ad, 0x42ad, 0xd4a6, 0x001a, 0x54d0, 0xd1af, 0x66d3, 0xd3af, 0xd0af, 0xd2af, 0x001a, 0x41d7, 0xe0b2, 0x001a, 0x40d7, 0xfed6, 0x001a, 0x71df, 0x001a, 0x001a, 0xa1e3, 0x001a, 0xa2bd, 0x001a, 0xaebf, 0xe6ea, 0xe5ea, 0x001a, 0xe7ed, 0x001a, 0x001a, 0x001a, 0xeff5, 0x001a, 0x001a, 0xd5a6, 0x73cb, 0xaacd, 0x43ad, 0x55d0, 0x001a, 0x68d3, 0x001a, 0x001a, 0x001a, 0xd4af, 0x67d3, 0xd5af, 0x001a, 0x001a, 0x001a, 0x43d7, 0x001a, 0x001a, 0xe2b2, 0x42d7, 0x44d7, 0x001a, 0xe1b2, 0x001a, 0x001a, 0x001a, 0x001a, 0x46db, 0x47db, 0x45db, 0xc1b5, 0x001a, 0x001a, 0x001a, 0x74b8, 0x001a, 0x75b8, 0x001a, 0x45bb, 0x001a, 0xa3e3, 0xa2e3, 0x44bb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe6, 0x001a, 0x001a, 0xfce6, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7ea, 0x001a, 0x001a, 0x70c1, 0x6fc1, 0x6dc1, 0x6ec1, 0x71c1, 0x001a, 0x7cf0, 0xbfc2, 0xbec2, 0xc0f2, 0xb2f4, 0x001a, 0x001a, 0x001a, 0xa5c5, 0xa4c5, 0xd6a6, 0x001a, 0x001a, 0xfbd1, 0x001a, 0x77b8, 0xc2b5, 0x76b8, 0x46bb, 0x001a, 0xd7a6, 0xa9c9, 0xd8a6, 0xd9a6, 0x001a, 0x001a, 0xabcd, 0x76cb, 0x001a, 0x77cb, 0x77a8, 0x001a, 0x74cb, 0x76a8, 0x001a, 0x79a8, 0x75cb, 0x7ba8, 0x7aa8, 0x78cb, 0x78a8, 0x001a, 0x001a, 0x001a, 0xd1aa, 0xcfaa, 0xadcd, 0x001a, 0xceaa, 0x001a, 0x001a, 0x001a, 0xd3aa, 0xd5aa, 0xd2aa, 0x001a, 0xb0cd, 0xaccd, 0xd6aa, 0x001a, 0xd0aa, 0x7ca8, 0x001a, 0xd4aa, 0xafcd, 0x001a, 0x001a, 0xaecd, 0x001a, 0xcdaa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5bd0, 0x47ad, 0x48ad, 0x5dd0, 0x001a, 0x57d0, 0x5ad0, 0x63d0, 0x61d0, 0x001a, 0x49ad, 0x67d0, 0x4cad, 0x64d0, 0x5cd0, 0x59d0, 0x001a, 0x001a, 0x49db, 0x62d0, 0x44ad, 0x65d0, 0x56d0, 0x5fd0, 0x46ad, 0x4bad, 0x60d0, 0x4fad, 0x4dad, 0x001a, 0x58d0, 0x4aad, 0x001a, 0x5ed0, 0x4ead, 0x45ad, 0x66d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaaf, 0x001a, 0xe3af, 0xd8af, 0xd6af, 0x6ad3, 0xdeaf, 0xdbaf, 0x6cd3, 0x001a, 0x001a, 0xddaf, 0x6bd3, 0x69d3, 0x6ed3, 0xe2af, 0xe0af, 0x48db, 0x001a, 0x6fd3, 0x6dd3, 0xd7af, 0x001a, 0x001a, 0xd9af, 0xdcaf, 0x001a, 0xdfaf, 0x001a, 0xe1af, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ed7, 0xe4b2, 0x001a, 0x45d7, 0x47d7, 0x001a, 0x48d7, 0x001a, 0x50d7, 0x4cd7, 0x4ad7, 0x001a, 0x4dd7, 0x51d7, 0xe5b2, 0xe9b2, 0x46d7, 0x001a, 0x4fd7, 0x001a, 0xe7b2, 0x001a, 0xe6b2, 0x4bd7, 0x49d7, 0x001a, 0xe3b2, 0xe8b2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8b5, 0x51db, 0x001a, 0x001a, 0x4fdb, 0xcab5, 0x001a, 0x001a, 0x001a, 0x001a, 0x4adb, 0xa1df, 0x001a, 0xc9b5, 0x4edb, 0x001a, 0x001a, 0x4bdb, 0xc5b5, 0xcbb5, 0x50db, 0xc7b5, 0x4ddb, 0x47bb, 0xc6b5, 0x4cdb, 0xccb5, 0xc4b5, 0xc3b5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x77df, 0x75df, 0x001a, 0x7bdf, 0x001a, 0x73df, 0xa2df, 0x78df, 0x001a, 0x72df, 0x7bb8, 0xa3b8, 0x7ddf, 0x001a, 0x76df, 0x001a, 0x7eb8, 0x001a, 0x001a, 0x7cb8, 0x7edf, 0x79b8, 0x78b8, 0x79df, 0x7db8, 0xcdb5, 0x001a, 0x7cdf, 0x74df, 0x7ab8, 0xa1b8, 0xa2b8, 0x001a, 0x001a, 0x001a, 0x001a, 0x4cbb, 0x48bb, 0x001a, 0x4dbb, 0xa6e3, 0x001a, 0x001a, 0xa5e3, 0xa7e3, 0x4abb, 0xa4e3, 0x4bbb, 0xaae3, 0xa9e3, 0xa8e3, 0x001a, 0x49bb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41e7, 0x001a, 0x44e7, 0xa8bd, 0x43e7, 0xa7bd, 0xa3bd, 0xa4bd, 0xa5bd, 0x40e7, 0xfee6, 0xa6bd, 0x001a, 0x42e7, 0xfde6, 0x001a, 0x001a, 0xe9ea, 0xf3ea, 0xb1bf, 0xb0bf, 0x001a, 0xedea, 0xefea, 0x001a, 0xeaea, 0x001a, 0xeeea, 0xe8ea, 0xf1ea, 0xafbf, 0xf0ea, 0xecea, 0x001a, 0xf2ea, 0x001a, 0xebea, 0x74c1, 0xe8ed, 0xeeed, 0x78c1, 0x7ac1, 0x77c1, 0x76c1, 0x001a, 0x75c1, 0x73c1, 0xe9ed, 0xeced, 0x72c1, 0xeded, 0x001a, 0x79c1, 0xebed, 0x001a, 0xeaed, 0xc0c2, 0x001a, 0xc1c2, 0xa1f0, 0x7df0, 0x7ef0, 0x001a, 0x001a, 0xc2f2, 0x001a, 0xc1f2, 0xbec3, 0xb4f4, 0xa4c4, 0xb3f4, 0x001a, 0xf0f5, 0x45f7, 0xa6c5, 0x43f9, 0x44f9, 0xd8c5, 0xdaa6, 0x001a, 0xd7aa, 0x52db, 0x4ebb, 0x7bc1, 0xefed, 0xdba6, 0x001a, 0xe5af, 0xe4af, 0x53db, 0x001a, 0x001a, 0x001a, 0xf4ea, 0xdca6, 0x50ad, 0x001a, 0x001a, 0x54db, 0x55db, 0x56db, 0x4fbb, 0xb2bf, 0xdda6, 0x001a, 0xd8aa, 0x68d0, 0xe6af, 0x70d3, 0xeab2, 0x001a, 0x57db, 0xa4b8, 0x001a, 0x50bb, 0xb3bf, 0x7cc1, 0xc2c2, 0xb5f4, 0xdea6, 0xd9aa, 0x001a, 0x001a, 0xe7af, 0x52d7, 0xceb5, 0x001a, 0x51bb, 0xabe3, 0x45e7, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfa6, 0xcfb5, 0xa3df, 0x52bb, 0xe0a6, 0xb1cd, 0x69d0, 0x51ad, 0x001a, 0x001a, 0x72d3, 0x001a, 0x001a, 0xeaaf, 0x001a, 0xe8af, 0xe9af, 0xebaf, 0x001a, 0x001a, 0x71d3, 0x001a, 0x001a, 0x57d7, 0x54d7, 0x56d7, 0xebb2, 0xedb2, 0xecb2, 0x53d7, 0xeeb2, 0x55d7, 0x001a, 0x58db, 0x59db, 0x001a, 0x5adb, 0xa6df, 0x001a, 0xa7df, 0x001a, 0xa5df, 0xa8df, 0x001a, 0xa5b8, 0x001a, 0xa4df, 0x001a, 0x53bb, 0x001a, 0x001a, 0x4ae7, 0x46e7, 0x49e7, 0x4be7, 0x48e7, 0x47e7, 0x001a, 0xf5ea, 0xf6ea, 0xf7ea, 0xb4bf, 0xb5bf, 0xf1ed, 0xf0ed, 0xf2ed, 0x001a, 0xa3f0, 0xa2f0, 0x001a, 0xc4f2, 0x001a, 0xc5f2, 0xc3f2, 0x001a, 0xa5c4, 0x001a, 0xb6f4, 0xb7f4, 0x001a, 0x46f7, 0xeff7, 0xbbf8, 0xe1a6, 0x7da8, 0x001a, 0x7dc1, 0xe2a6, 0x001a, 0x58d7, 0x5bdb, 0x001a, 0x41c6, 0x4aca, 0x001a, 0x001a, 0x001a, 0x4bca, 0x4dca, 0xe3a6, 0x4eca, 0x4cca, 0x001a, 0x001a, 0xa2cb, 0xa3cb, 0x7bcb, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1cb, 0xa1a8, 0x001a, 0xa2a8, 0x7ccb, 0x7acb, 0x79cb, 0x7dcb, 0x7ea8, 0x7ecb, 0x6ad0, 0x001a, 0x001a, 0x001a, 0xb6cd, 0xdcaa, 0xb5cd, 0xb7cd, 0x001a, 0xdbaa, 0xbccd, 0xdfaa, 0xb2cd, 0xc0cd, 0xc6cd, 0xe6aa, 0xc3cd, 0xe3aa, 0x001a, 0xb9cd, 0xbfcd, 0xc1cd, 0x001a, 0xb4cd, 0xe2aa, 0xddaa, 0xbacd, 0xe4aa, 0xe7aa, 0xe1aa, 0x001a, 0xdaaa, 0xbecd, 0xb8cd, 0xc5cd, 0xe9aa, 0xe5aa, 0xe0aa, 0xbdcd, 0xecaf, 0xbbcd, 0xdeaa, 0xe8aa, 0x001a, 0xb3cd, 0x001a, 0xc2cd, 0xc4cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62ad, 0x5cad, 0x64ad, 0x61ad, 0x71d0, 0x74d0, 0x5dad, 0x001a, 0x6bd0, 0x001a, 0x56ad, 0x60ad, 0x001a, 0x63ad, 0x65ad, 0xa2d0, 0x77d0, 0x001a, 0x55ad, 0xa1d0, 0x59ad, 0x57ad, 0x52ad, 0x6fd0, 0x001a, 0x7ed0, 0x73d0, 0x76d0, 0xa5d0, 0x001a, 0x66ad, 0x7dd0, 0x5ead, 0x78d0, 0xa4d0, 0x75d0, 0x79d0, 0x7cd0, 0x001a, 0x001a, 0x6dd0, 0xa3d0, 0x7bd0, 0x001a, 0x001a, 0x6cd0, 0x001a, 0x70d0, 0x5fad, 0x5aad, 0x53ad, 0x58ad, 0x54ad, 0x67ad, 0x6ed0, 0xa5d3, 0x5bad, 0x001a, 0x001a, 0x7ad0, 0x41ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8d3, 0xfaaf, 0x001a, 0x76d3, 0x001a, 0xa3d3, 0x7dd3, 0x001a, 0xb2d3, 0x001a, 0xaad3, 0x001a, 0x7ed3, 0x001a, 0xa9d3, 0x78d3, 0x7cd3, 0xb5d3, 0xfdaf, 0xadd3, 0xa4d3, 0xedaf, 0xb3d3, 0x74d3, 0x001a, 0xacd3, 0x001a, 0xfcaf, 0xf7af, 0x73d3, 0xf5af, 0xf4af, 0xf9af, 0xabd3, 0xf1af, 0xf8af, 0x72d0, 0x5cdb, 0xa6d3, 0x001a, 0x001a, 0x7ad3, 0xfbaf, 0x7bd3, 0xa1d3, 0xfeaf, 0x75d3, 0xafd3, 0x001a, 0xaed3, 0xb6d3, 0xf3af, 0xf0af, 0xb4d3, 0xb0d3, 0xa7d3, 0xa2d3, 0xf6af, 0xf2af, 0x77d3, 0xeeaf, 0xb1d3, 0xefaf, 0x001a, 0x79d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ed7, 0x60d7, 0x65d7, 0x79d7, 0xfcb2, 0xf2b2, 0x001a, 0x5dd7, 0xfdb2, 0xfeb2, 0x68d7, 0x6fd7, 0x75d7, 0x001a, 0x62d7, 0x001a, 0x69d7, 0x001a, 0x001a, 0x40b3, 0x77d7, 0x72d7, 0xfab2, 0xf8b2, 0x6ed7, 0x6ad7, 0x5cd7, 0xefb2, 0x61d7, 0x59d7, 0x001a, 0xf7b2, 0xf9b2, 0x66d7, 0x63d7, 0xf4b2, 0x73d7, 0xf1b2, 0x64d7, 0x7ad7, 0x6cd7, 0x001a, 0x6bd7, 0xf0b2, 0x001a, 0xfbb2, 0x001a, 0xf3b2, 0x5ad7, 0x5fd7, 0x70d7, 0x76d7, 0x41b3, 0x5bd7, 0x67d7, 0x6dd7, 0xf6b2, 0x001a, 0x001a, 0x78d7, 0x71d7, 0x74d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5b2, 0x001a, 0x6cdb, 0x60db, 0xd7b5, 0x7ddb, 0xa7db, 0xaadb, 0xd5b5, 0x68db, 0xa3db, 0x69db, 0x77db, 0xe2b5, 0x73db, 0xdfb5, 0x001a, 0x74db, 0x5ddb, 0x001a, 0xa4db, 0x001a, 0x001a, 0xe8b5, 0xa1db, 0x75db, 0xacdb, 0x70db, 0xc8df, 0x001a, 0xafdb, 0xe6b5, 0x6edb, 0x7adb, 0xe9b5, 0xd4b5, 0x72db, 0xaddb, 0x6bdb, 0x64db, 0x6fdb, 0x001a, 0x63db, 0x61db, 0xd0b5, 0xa5db, 0x6adb, 0xa8db, 0x001a, 0xa9db, 0xd8b5, 0xddb5, 0xd9b5, 0xe1b5, 0x7edb, 0xdab5, 0x76db, 0x66db, 0x001a, 0xd2b5, 0x5edb, 0xa2db, 0xabdb, 0x65db, 0xe0b5, 0xb0db, 0x71db, 0x001a, 0x6ddb, 0x001a, 0xd1b5, 0xe5b5, 0x001a, 0x7cdb, 0xe7b5, 0x001a, 0x78db, 0xdcb5, 0xd6b5, 0xdeb5, 0xd3b5, 0xe4b5, 0x79db, 0x67db, 0x7bdb, 0x62db, 0xa6db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaedb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5fdb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7df, 0x001a, 0xdddf, 0x55b8, 0xccdf, 0x001a, 0xcadf, 0xb5df, 0xa9b8, 0xc5df, 0xd9df, 0xc1df, 0xb1b8, 0xd8df, 0xbfdf, 0xe3b5, 0xcfdf, 0xc0df, 0xd6df, 0xb0b8, 0xa8b8, 0x001a, 0xaadf, 0xb2df, 0x001a, 0xcbdf, 0xc3df, 0xdcdf, 0xc6df, 0xb6b8, 0xd7df, 0x001a, 0xadb8, 0x001a, 0xc9df, 0xd1df, 0xb6df, 0xd0df, 0x001a, 0xe1df, 0xb1df, 0xd2df, 0x001a, 0xdfdf, 0x001a, 0xabdf, 0xdbb5, 0x001a, 0xb9df, 0xb8df, 0xafb8, 0x001a, 0xbcdf, 0xbedf, 0xcddf, 0xdedf, 0xb2b8, 0x001a, 0xb3b8, 0x001a, 0xb0df, 0xabb8, 0xb4df, 0xdadf, 0xb4b8, 0x001a, 0xacb8, 0xaeb8, 0xb5b8, 0xe0df, 0xd3df, 0xcedf, 0x001a, 0x001a, 0xbbdf, 0xbadf, 0xaab8, 0xacdf, 0xa7b8, 0xc4df, 0xaddf, 0xc2df, 0x001a, 0x001a, 0xb7df, 0xdbdf, 0x001a, 0x001a, 0x001a, 0xa6b8, 0x001a, 0x001a, 0x001a, 0xb3df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafdf, 0xd5df, 0xaedf, 0x60bb, 0xd3e3, 0x001a, 0x001a, 0xc2e3, 0x001a, 0x001a, 0xace3, 0xcae3, 0x58bb, 0xbbe3, 0xc5e3, 0x5bbb, 0xbee3, 0x59bb, 0xafe3, 0xcde3, 0xaee3, 0xc1e3, 0x001a, 0xade3, 0x001a, 0x001a, 0xbfe3, 0xc8e3, 0xc6e3, 0xbae3, 0xb5e3, 0xb3e3, 0x001a, 0xb4e3, 0xc7e3, 0xd2e3, 0xbce3, 0x5abb, 0x001a, 0xb7e3, 0x001a, 0xcbe3, 0x001a, 0x5dbb, 0xb6e3, 0xb0e3, 0xc0e3, 0x61bb, 0x001a, 0x001a, 0x55bb, 0x5ebb, 0xb8e3, 0xb2e3, 0x001a, 0x57bb, 0xd4df, 0x56bb, 0xc3e3, 0x001a, 0x54bb, 0x63bb, 0x5cbb, 0xc4e3, 0xb9e3, 0xb1e3, 0xcce3, 0xbde3, 0x62bb, 0xd0e3, 0x5fbb, 0xcfe3, 0x001a, 0xc9e3, 0xcee3, 0x001a, 0x001a, 0x001a, 0xd1e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73e7, 0x74e7, 0x67e7, 0x66e7, 0x62e7, 0xb4bd, 0x001a, 0xacbd, 0x76e7, 0x75e7, 0xa9df, 0x5fe7, 0x63e7, 0x5de7, 0x001a, 0x70e7, 0x61e7, 0x001a, 0x77e7, 0x5ae7, 0x58e7, 0x64e7, 0x6ee7, 0x69e7, 0xb6bd, 0x4fe7, 0x001a, 0x6de7, 0x001a, 0x001a, 0x001a, 0xb7bd, 0xbddf, 0x5be7, 0x52e7, 0x55e7, 0x7be7, 0x5ce7, 0x53e7, 0x51e7, 0x4ee7, 0x001a, 0xb0bd, 0x65e7, 0xafbd, 0xb3bd, 0x60e7, 0x68e7, 0xa9bd, 0x78e7, 0x7ce7, 0xabbd, 0x001a, 0x57e7, 0x6be7, 0x6fe7, 0x54e7, 0x79e7, 0xb2bd, 0x001a, 0xb1bd, 0x4ce7, 0xb5bd, 0x72e7, 0x56e7, 0x6ae7, 0x50e7, 0x5ee7, 0x59e7, 0xadbd, 0xaebd, 0x6ce7, 0x7de7, 0x7ae7, 0x71e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4de7, 0x001a, 0xaabd, 0x49eb, 0x001a, 0x40eb, 0x43eb, 0x001a, 0xbbbf, 0x45eb, 0xf9ea, 0x41eb, 0x47eb, 0xb8bf, 0xbcbf, 0xb6bf, 0x001a, 0x001a, 0xfbea, 0x4ceb, 0x001a, 0x001a, 0x46eb, 0x001a, 0xfcea, 0x55eb, 0x4feb, 0xf8ea, 0x46ee, 0xfeea, 0xb7bf, 0x001a, 0x4aeb, 0x001a, 0x54eb, 0xbfbf, 0x001a, 0x51eb, 0xfdea, 0x44eb, 0x48eb, 0x42eb, 0x56eb, 0x53eb, 0x50eb, 0xb9bf, 0xbabf, 0xbebf, 0xfaea, 0x57eb, 0xbdbf, 0x4deb, 0x001a, 0x001a, 0x4beb, 0x001a, 0x001a, 0x001a, 0x4eeb, 0x53ee, 0x40ee, 0x45ee, 0x52ee, 0x44ee, 0xfbed, 0x41ee, 0x001a, 0xa2c1, 0x001a, 0xf4ed, 0x4dee, 0x4fee, 0xf3ed, 0xa1c1, 0x51ee, 0x49ee, 0xa8c1, 0x50ee, 0x42ee, 0xaac1, 0xf9ed, 0x52eb, 0x4aee, 0x47ee, 0xf5ed, 0x55ee, 0xa4c1, 0x001a, 0x001a, 0xa5c1, 0xf7ed, 0x48ee, 0x001a, 0x54ee, 0x4bee, 0xfded, 0xa7c1, 0xa3c1, 0x4cee, 0xfeed, 0x56ee, 0xf8ed, 0x43ee, 0x4eee, 0xfaed, 0xfced, 0x001a, 0xcbc2, 0xf6ed, 0xa9c1, 0xc4c2, 0x7ec1, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6c1, 0xc8c2, 0xb3f0, 0x001a, 0xa9f0, 0xa4f0, 0xaaf0, 0xb4f0, 0xb8f0, 0xb7f0, 0xcac2, 0xc9c2, 0x001a, 0x001a, 0xabf0, 0xb9f0, 0xaef0, 0xa6f0, 0x001a, 0xa8f0, 0xa7f0, 0xadf0, 0xb2f0, 0xa5f0, 0xacf0, 0xb1f0, 0xc7c2, 0x001a, 0xaff0, 0x001a, 0xc5c2, 0xb0f0, 0xc3c2, 0xc6c2, 0xd5f2, 0xb5f0, 0x001a, 0x001a, 0xc2c3, 0x001a, 0xcdf2, 0xd1f2, 0xc9f2, 0xccf2, 0x001a, 0xd4f2, 0xc0c3, 0xd9f2, 0xd2f2, 0x001a, 0xcaf2, 0xdaf2, 0xd3f2, 0xc3c3, 0xc4c3, 0xd7f2, 0x001a, 0xcbf2, 0xbfc3, 0xc1c3, 0xc6f2, 0xcef2, 0xc8f2, 0x001a, 0xd8f2, 0xd6f2, 0xc7f2, 0xcff2, 0x001a, 0x001a, 0x001a, 0xbef4, 0xc5c3, 0xd0f2, 0xa7c4, 0xa9c4, 0xa6c4, 0x001a, 0xc3f4, 0xbbf4, 0xb9f4, 0xbdf4, 0xbaf4, 0x001a, 0x001a, 0xbff4, 0xc1f4, 0xaac4, 0xacc4, 0x001a, 0xc0f4, 0xadc4, 0xabc4, 0xc2f4, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8c4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4c4, 0xf1f5, 0xf7f5, 0xf6c4, 0xbcf4, 0xf6f5, 0x001a, 0xfdf5, 0xf4f5, 0xfbf5, 0xfaf5, 0xb8f4, 0xf5f5, 0xb6f0, 0xfef5, 0xf3f5, 0xf8f5, 0x001a, 0xfcf5, 0xf2f5, 0x001a, 0x4af7, 0xf5c4, 0xf9f5, 0x001a, 0x001a, 0xf4f7, 0x4bf7, 0x49f7, 0x47f7, 0x48f7, 0x4cf7, 0x001a, 0xd9c5, 0xf2f7, 0xf0f7, 0xf5f7, 0xf3f7, 0x001a, 0xf6f7, 0xdac5, 0xf1f7, 0x001a, 0x001a, 0xbcf8, 0x001a, 0x001a, 0x45f9, 0x46f9, 0x47f9, 0x001a, 0x001a, 0xc7f9, 0xbdf9, 0x4fca, 0xeaaa, 0x001a, 0x68ad, 0x001a, 0xb8d3, 0xb7d3, 0x40b0, 0x42b3, 0x7cd7, 0x001a, 0x001a, 0x7bd7, 0x001a, 0xeab5, 0xb8b8, 0x001a, 0xb7b8, 0xb9b8, 0x001a, 0xd4e3, 0x7ee7, 0x58eb, 0x5aeb, 0x59eb, 0x001a, 0xabc1, 0x57ee, 0xbaf0, 0xa5f9, 0xe4a6, 0x001a, 0xc9cd, 0xcacd, 0xc8cd, 0xc7cd, 0xebaa, 0x001a, 0xa9d0, 0xa7d0, 0x001a, 0x001a, 0xa6d0, 0x001a, 0x69ad, 0x6bad, 0x6aad, 0xa8d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4d3, 0xc1d3, 0xbfd3, 0x001a, 0x001a, 0x41b0, 0xc2d3, 0x46b0, 0xbcd3, 0xcbd3, 0x001a, 0xcdd3, 0xbdd3, 0x001a, 0x43b0, 0xced3, 0xc9d3, 0xbbd3, 0xc0d3, 0xcad3, 0xc6d3, 0xc3d3, 0x001a, 0x48b0, 0xccd3, 0xbed3, 0x001a, 0x001a, 0xc7d3, 0xb9d3, 0x47b0, 0x44b0, 0xc5d3, 0x001a, 0xc8d3, 0xbad3, 0x45b0, 0x42b0, 0x001a, 0x001a, 0x001a, 0x001a, 0x4cb3, 0xa5d7, 0x4bb3, 0x001a, 0xa8d7, 0xabd7, 0x48b3, 0x46b3, 0x7ed7, 0xa9d7, 0xa7d7, 0xa4d7, 0xacd7, 0xadd7, 0xafd7, 0xb0d7, 0x7dd7, 0x45b3, 0xa2d7, 0xa1d7, 0xaed7, 0x47b3, 0xa3d7, 0x49b3, 0x44b3, 0xa6d7, 0x4db3, 0x001a, 0x4ab3, 0xaad7, 0x001a, 0x001a, 0x001a, 0xf1b5, 0xbfdb, 0x001a, 0xb4db, 0xeeb5, 0x001a, 0xe7df, 0xbddb, 0xb1db, 0xecb5, 0xb6db, 0xefb5, 0xbadb, 0xb8db, 0xf2b5, 0xebb5, 0x001a, 0x001a, 0xb2db, 0xb5db, 0xf0b5, 0x001a, 0xb3db, 0x001a, 0xbedb, 0xbcdb, 0xb7db, 0xb9db, 0xbbdb, 0xedb5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8df, 0xeedf, 0xe4df, 0xeadf, 0xbab8, 0xe6df, 0xc0b8, 0x001a, 0x001a, 0xbfb8, 0x001a, 0xbeb8, 0xeddf, 0xc1b8, 0xc2b8, 0xe3df, 0xf0df, 0xc3b8, 0xbdb8, 0xbcb8, 0xecdf, 0xc4b8, 0xe2df, 0xe5df, 0xefdf, 0xebdf, 0x001a, 0x001a, 0xf4e3, 0xe9e3, 0xbbb8, 0x001a, 0x001a, 0x001a, 0x001a, 0x6abb, 0xdde3, 0xf2e3, 0xdee3, 0x65bb, 0x001a, 0xdbe3, 0x001a, 0xe4e3, 0xdce3, 0x67bb, 0xd6e3, 0xf1e3, 0x68bb, 0xeee3, 0xefe3, 0xd7e3, 0x6dbb, 0xe6e3, 0x001a, 0xe0e3, 0xe7e3, 0xdae3, 0x001a, 0xf3e3, 0xebe3, 0xe5e3, 0xd5e3, 0x69bb, 0xece3, 0x001a, 0x6cbb, 0xf0e3, 0x001a, 0xeae3, 0x66bb, 0xe8e3, 0x001a, 0xe2e3, 0x64bb, 0xd9e3, 0xe1e3, 0xede3, 0xdfe3, 0x001a, 0x001a, 0xe3e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1bd, 0xe9df, 0xb2e7, 0xbbe7, 0xb1e7, 0xade7, 0xaae7, 0xc2bd, 0xa8e7, 0x6bbb, 0xa1e7, 0xc0bd, 0xa7e7, 0xbfbd, 0xace7, 0xa9e7, 0xb9e7, 0xb4e7, 0xaee7, 0xb3e7, 0xbbbd, 0xabe7, 0xbee7, 0xa2e7, 0xa3e7, 0xbae7, 0xbcbd, 0xbfe7, 0xbebd, 0xc0e7, 0xb0e7, 0xd8e3, 0xb6e7, 0xafe7, 0xb8e7, 0xb5e7, 0x001a, 0x001a, 0x001a, 0xa6e7, 0xb9bd, 0xbde7, 0xbabd, 0xa4e7, 0xbdbd, 0x64eb, 0xb7e7, 0xbce7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x61eb, 0xb8bd, 0xc0bf, 0x6beb, 0x67eb, 0x001a, 0x65eb, 0x60eb, 0x6feb, 0x001a, 0x001a, 0x001a, 0xc4bf, 0x001a, 0x5ceb, 0x68eb, 0x69eb, 0x5feb, 0x5eeb, 0x6ceb, 0x001a, 0x62eb, 0x5deb, 0x63eb, 0x001a, 0x6eeb, 0x5beb, 0x6deb, 0x6aeb, 0xc2bf, 0xc1bf, 0x001a, 0x001a, 0xc3bf, 0x66eb, 0xcbf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x59ee, 0xb1c1, 0x5dee, 0x5aee, 0x61ee, 0x67ee, 0x5cee, 0x001a, 0x70ee, 0xaec1, 0x6aee, 0x5fee, 0x6bee, 0x66ee, 0x6dee, 0x5eee, 0xb3c1, 0xb2c1, 0x60ee, 0x6eee, 0x58ee, 0x6cee, 0xacc1, 0x001a, 0x64ee, 0x63ee, 0x68ee, 0x5bee, 0xb0c1, 0x001a, 0xb4c1, 0x62ee, 0x69ee, 0xb5c1, 0x65ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xadc1, 0xafc1, 0xc7f0, 0xc5f0, 0x001a, 0x001a, 0xccf0, 0xc9f0, 0xcdf0, 0x001a, 0xbef0, 0xc6f0, 0xd1f0, 0x6fee, 0xc2f0, 0xcfc2, 0xa5e7, 0xbdf0, 0xcaf0, 0xc4f0, 0xc1f0, 0xbcf0, 0xbbf0, 0xd0f0, 0x001a, 0xc0f0, 0xbff0, 0xcdc2, 0xc8f0, 0x001a, 0xccc2, 0x001a, 0x001a, 0xcec2, 0xc3f0, 0xcff0, 0x001a, 0xdef2, 0xdff2, 0x001a, 0xc9c3, 0xdcf2, 0xc6c3, 0xe4f2, 0x001a, 0xcac3, 0xe6f2, 0xdbf2, 0xcef0, 0xe8f2, 0xddf2, 0x001a, 0xc7c3, 0xe3f2, 0x001a, 0xe5f2, 0xe0f2, 0xe7f2, 0xe2f2, 0xe1f2, 0xc8c3, 0x001a, 0x001a, 0xc5f4, 0xc6f4, 0x001a, 0xc8f4, 0xaec4, 0xafc4, 0xc9f4, 0xc7f4, 0x001a, 0xc4f4, 0x001a, 0x42f6, 0x45f6, 0x41f6, 0x001a, 0xfac4, 0x43f6, 0xf9c4, 0xf8c4, 0xf7c4, 0x44f6, 0x51f7, 0x4ff7, 0x001a, 0x4ef7, 0x40f6, 0x50f7, 0x46f6, 0x4df7, 0x001a, 0xf9f7, 0xd7f7, 0xf7f7, 0xdbc5, 0xf8f7, 0xfaf7, 0x001a, 0xbff8, 0xfac5, 0xbef8, 0xbdf8, 0xfbc5, 0x001a, 0x5ac6, 0x6ef9, 0xa7f9, 0xa6f9, 0xa8f9, 0xe5a6, 0xaad0, 0x001a, 0xcfd3, 0xd0d3, 0x001a, 0x001a, 0x001a, 0xc0db, 0x001a, 0x47f6, 0xc0f8, 0xe6a6, 0x6cad, 0xabd0, 0x001a, 0x001a, 0x001a, 0xb1d7, 0x4eb3, 0x001a, 0xc2db, 0xc1db, 0xf3b5, 0x001a, 0xc5b8, 0xc1e7, 0xc3bd, 0x001a, 0xc4bd, 0x001a, 0x001a, 0x001a, 0xc5bf, 0xfcc5, 0xe7a6, 0x001a, 0x001a, 0x001a, 0xacd0, 0xedaa, 0xaed0, 0xadd0, 0x6dad, 0x001a, 0xd1d3, 0x001a, 0xd8d3, 0x49b0, 0xd6d3, 0xd4d3, 0x001a, 0xdbd3, 0xd2d3, 0xd3d3, 0x4ab0, 0x001a, 0x4eb0, 0x001a, 0x001a, 0xdcd3, 0x4db0, 0xdad3, 0xd7d3, 0xd5d3, 0x4bb0, 0x4cb0, 0xd9d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x50b3, 0xb2d7, 0x001a, 0x55b3, 0xc2d7, 0x54b3, 0xc4d7, 0x001a, 0x001a, 0xb8d7, 0x52b3, 0xc3d7, 0x001a, 0xb3d7, 0x53b3, 0xbfd7, 0xbbd7, 0xbdd7, 0xb7d7, 0xbed7, 0x001a, 0x001a, 0x4fb3, 0xbad7, 0x001a, 0xb9d7, 0xb5d7, 0x001a, 0xc0d7, 0x001a, 0x001a, 0xbcd7, 0xb4d7, 0x001a, 0xb6d7, 0x51b3, 0xc1d7, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6b5, 0xcddb, 0x001a, 0x001a, 0x001a, 0xc9db, 0xcbdb, 0xc6db, 0xc5db, 0xc3db, 0x001a, 0xcadb, 0xccdb, 0xc8db, 0x001a, 0xc7db, 0xf4b5, 0xf5b5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfdb, 0xcdb8, 0xf2df, 0xf8df, 0xf3df, 0xf4df, 0xd8f9, 0xf9df, 0x001a, 0xcfb8, 0x001a, 0xc7b8, 0xceb8, 0xf1df, 0xc4db, 0xcab8, 0xc8b8, 0xf7df, 0xf6df, 0xc9b8, 0xcbb8, 0xf5df, 0xc6b8, 0x001a, 0xccb8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6e3, 0x74bb, 0x001a, 0x001a, 0x42e4, 0x41e4, 0x001a, 0xfbe3, 0x76bb, 0x40e4, 0xf7e3, 0xf8e3, 0x6ebb, 0x70bb, 0x001a, 0xfde3, 0xf5e3, 0x72bb, 0x71bb, 0xf9e3, 0xfee3, 0xfce3, 0x73bb, 0xfae3, 0x001a, 0x001a, 0xcedb, 0x6fbb, 0x001a, 0x001a, 0xc2e7, 0xc9e7, 0xc6bd, 0x001a, 0xcde7, 0xcabd, 0xc5e7, 0xc3e7, 0x001a, 0xcce7, 0x001a, 0xc5bd, 0xcbe7, 0xc7bd, 0xc8bd, 0xc4e7, 0xc9bd, 0xcae7, 0xc6e7, 0xc7e7, 0xc8e7, 0x75bb, 0x001a, 0x001a, 0x001a, 0x70eb, 0x7ceb, 0x001a, 0xcabf, 0x77eb, 0x79eb, 0x001a, 0xc8bf, 0x71eb, 0x75eb, 0x001a, 0x78eb, 0xc6bf, 0xc9bf, 0x7beb, 0x73eb, 0x74eb, 0x7aeb, 0x72eb, 0x76eb, 0xc7bf, 0x72ee, 0x001a, 0x71ee, 0xb7c1, 0x77ee, 0xb9c1, 0x001a, 0x001a, 0xb6c1, 0x73ee, 0xbac1, 0x74ee, 0x001a, 0x001a, 0x75ee, 0x78ee, 0x001a, 0xb8c1, 0x001a, 0xd6f0, 0x001a, 0x001a, 0xd9f0, 0x001a, 0xd3f0, 0xd5f0, 0x001a, 0x001a, 0xd4f0, 0xd7f0, 0xd8f0, 0x76ee, 0xd2f0, 0x001a, 0x001a, 0xcdc3, 0xecf2, 0xeff2, 0xf1f2, 0xeaf2, 0xebf2, 0xeef2, 0xf0f2, 0xcec3, 0xccc3, 0xcbc3, 0xedf2, 0xe9f2, 0xcaf4, 0xb0c4, 0x001a, 0xcbf4, 0x001a, 0x001a, 0x49f6, 0xfbc4, 0x4bf6, 0xfcc4, 0x48f6, 0x4af6, 0xa8c5, 0x001a, 0x52f7, 0xa7c5, 0xfdf7, 0xfcf7, 0x001a, 0xfbf7, 0x001a, 0x001a, 0x48f9, 0x49f9, 0x4bf9, 0x4af9, 0x001a, 0x50ca, 0xe8a6, 0x001a, 0x6ead, 0xc5d7, 0xf7b5, 0x001a, 0xfadf, 0xd0c2, 0x001a, 0xf2f2, 0x001a, 0x001a, 0xa3a8, 0x001a, 0x001a, 0x001a, 0x57b3, 0x001a, 0x001a, 0x001a, 0x56b3, 0x001a, 0xd0db, 0xf8b5, 0xd2db, 0xd1db, 0x001a, 0x001a, 0xfbdf, 0xd0b8, 0x43e4, 0x46e4, 0x45e4, 0x001a, 0x44e4, 0xcee7, 0xd0e7, 0xcfe7, 0x001a, 0xccbf, 0x001a, 0x001a, 0x001a, 0xcbbf, 0x001a, 0xbbc1, 0x79ee, 0x7bee, 0x7aee, 0x001a, 0x001a, 0xd1c2, 0x001a, 0x001a, 0x001a, 0xf4f2, 0xf3f2, 0x001a, 0xccf4, 0xb1c4, 0x001a, 0x001a, 0xfdc4, 0x54f7, 0x53f7, 0x5bc6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a8, 0xafd0, 0x6fad, 0xc8d7, 0xc6d7, 0x001a, 0x001a, 0xc7d7, 0xd4db, 0xd5db, 0x43e0, 0xd3db, 0x001a, 0xfcdf, 0x41e0, 0x40e0, 0x42e0, 0xd1b8, 0xfedf, 0xfddf, 0x44e0, 0x001a, 0x49e4, 0x47e4, 0x001a, 0x48e4, 0xd3e7, 0xd1e7, 0x001a, 0x001a, 0xd2e7, 0x7deb, 0x7cee, 0x7dee, 0xd2c2, 0x001a, 0xf5f2, 0xcdf4, 0xb2c4, 0x001a, 0x4cf6, 0x55f7, 0xa9c5, 0x001a, 0xfef7, 0x4cf9, 0xa5a8, 0x001a, 0x71ad, 0x72ad, 0xb0d0, 0x001a, 0x001a, 0xb1d0, 0x70ad, 0x001a, 0x54b0, 0x001a, 0x52b0, 0x001a, 0x51b0, 0x58b0, 0x50b0, 0x59b0, 0xddd3, 0x56b0, 0x001a, 0x53b0, 0x57b0, 0x55b0, 0x4fb0, 0x001a, 0x001a, 0x5fb3, 0x001a, 0x59b3, 0xccd7, 0x5eb3, 0x001a, 0x001a, 0x60b3, 0x5ab3, 0x001a, 0x5bb3, 0x001a, 0xcad7, 0x001a, 0x001a, 0x58b3, 0x001a, 0xcbd7, 0x5db3, 0x001a, 0x001a, 0xc9d7, 0x5cb3, 0x001a, 0x001a, 0x44b6, 0x001a, 0x46b6, 0x001a, 0x001a, 0xd8db, 0x45b6, 0xf9b5, 0xfdb5, 0x001a, 0xe4b8, 0x49e0, 0xdadb, 0xfeb5, 0x001a, 0x001a, 0xdddb, 0xdedb, 0x43b6, 0x001a, 0xe0db, 0x001a, 0xe2db, 0x001a, 0xe3db, 0xd7db, 0xd6db, 0xe4db, 0x42b6, 0xe1db, 0xdfdb, 0x001a, 0x40b6, 0xfbb5, 0x47b6, 0xdbdb, 0xdcdb, 0xd9db, 0x001a, 0x41b6, 0x001a, 0x001a, 0xfcb5, 0x001a, 0xfab5, 0x48e0, 0xdfb8, 0xdab8, 0x001a, 0x001a, 0xd5b8, 0x001a, 0xe5b8, 0xd6b8, 0x001a, 0xd2b8, 0xe1b8, 0xdeb8, 0xe0b8, 0x001a, 0xd7b8, 0xdcb8, 0xd3b8, 0xd4b8, 0x50e0, 0x4de0, 0x45e0, 0x4ae0, 0x001a, 0xe2b8, 0x51e0, 0xe3b8, 0xd9b8, 0x001a, 0x001a, 0x47e0, 0x001a, 0x4fe0, 0x4be0, 0x4ee0, 0x4ce0, 0xddb8, 0x46e0, 0xd8b8, 0x001a, 0x001a, 0x001a, 0x4ce4, 0x78bb, 0x7bbb, 0x001a, 0x4ee4, 0x001a, 0xa5bb, 0x4de4, 0x7dbb, 0x001a, 0xcfbd, 0x4fe4, 0x001a, 0xa4bb, 0x4be4, 0xa6bb, 0x001a, 0x001a, 0x001a, 0x79bb, 0x001a, 0xdbb8, 0x7cbb, 0x001a, 0x7abb, 0x7ebb, 0xa2bb, 0x77bb, 0xa7bb, 0xa3bb, 0x001a, 0xa1bb, 0x4ae4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6bd, 0x001a, 0xd2bd, 0x001a, 0x001a, 0x001a, 0xd9bd, 0x001a, 0xd6e7, 0xdabd, 0xe2e7, 0xdbe7, 0xcbbd, 0xe3e7, 0xdde7, 0xd5bd, 0xdee7, 0x001a, 0xd4bd, 0xe1e7, 0xcebd, 0xdfe7, 0xd5e7, 0xcdbd, 0xaaeb, 0xd3bd, 0x001a, 0xd0bd, 0x001a, 0xd8bd, 0x001a, 0xd4e7, 0x001a, 0xd8e7, 0xccbd, 0xd7e7, 0xd9e7, 0xdae7, 0xd7bd, 0xdce7, 0xe0e7, 0xe4e7, 0x001a, 0xdbbd, 0xd2bf, 0xa5eb, 0xabeb, 0xa8eb, 0x7eeb, 0xaceb, 0xa1eb, 0x001a, 0xa7eb, 0x001a, 0xcdbf, 0xd3bf, 0xadeb, 0x001a, 0x001a, 0xcfbf, 0x001a, 0xd9bf, 0xd4bf, 0xafeb, 0xa9eb, 0xd0bf, 0xa2eb, 0xdabf, 0xa3eb, 0xa4eb, 0xdbbf, 0xd8bf, 0xd1bd, 0x001a, 0xcebf, 0xb0eb, 0xdcbf, 0x001a, 0xd5bf, 0xaeeb, 0xd1bf, 0xd6bf, 0xd7bf, 0x001a, 0xc3c1, 0xa4ee, 0xadee, 0xaaee, 0xacee, 0x001a, 0xc0c1, 0xa5ee, 0x001a, 0xabee, 0xbcc1, 0xa7ee, 0xc4c1, 0xa3ee, 0xa8ee, 0xafee, 0xa6eb, 0xa9ee, 0xa2ee, 0xbdc1, 0xa1ee, 0xbec1, 0xb0ee, 0xbfc1, 0xaeee, 0xc2c1, 0x7eee, 0x001a, 0xc1c1, 0x001a, 0xa6ee, 0xdcf0, 0xeaf0, 0xe5f0, 0xe7f0, 0xdbf0, 0xd3c2, 0x001a, 0xdaf0, 0xd6c2, 0xd5c2, 0x001a, 0xe9f0, 0xe1f0, 0xdef0, 0xe4f0, 0x001a, 0xddf0, 0x001a, 0xdff0, 0xe8f0, 0xe6f0, 0x001a, 0xd4c2, 0xedf0, 0xebf0, 0xe2f0, 0xecf0, 0xe3f0, 0x001a, 0xf9f2, 0xcfc3, 0x41f3, 0x001a, 0x001a, 0x4ff6, 0xd6c3, 0xe0f0, 0xf7f2, 0xd2c3, 0xf8f2, 0xfdf2, 0x001a, 0x001a, 0xd4c3, 0xd5c3, 0xf6f2, 0x40f3, 0x42f3, 0xfaf2, 0xfcf2, 0xfef2, 0xfbf2, 0x43f3, 0xd1c3, 0xd7c3, 0xd3c3, 0x001a, 0xd0c3, 0xd0f4, 0x001a, 0xb7c4, 0xcef4, 0x001a, 0x001a, 0xd2f4, 0x001a, 0xd3f4, 0xb5c4, 0xd4f4, 0xd1f4, 0x001a, 0xcff4, 0xb8c4, 0xb4c4, 0xd5f4, 0x001a, 0xb6c4, 0xb3c4, 0x001a, 0x001a, 0x001a, 0xfec4, 0x001a, 0x001a, 0x40c5, 0x4ef6, 0x4df6, 0x50f6, 0x51f6, 0x001a, 0x41c5, 0x56f7, 0x5bf7, 0xaac5, 0x001a, 0x58f7, 0x001a, 0x57f7, 0x5af7, 0x59f7, 0x001a, 0x43f8, 0x001a, 0xdcc5, 0x42f8, 0x40f8, 0x001a, 0x41f8, 0x001a, 0x001a, 0x001a, 0xfec5, 0xfdc5, 0xc1f8, 0xc2f8, 0x40c6, 0x001a, 0x4df9, 0x4ef9, 0x67c6, 0x001a, 0x6dc6, 0x001a, 0xa9f9, 0xc8f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6a8, 0x001a, 0xcdd7, 0x001a, 0xced7, 0x52e0, 0x50e4, 0xe5e7, 0xc6c1, 0x001a, 0xc5c1, 0xeef0, 0x44f3, 0x001a, 0x44f8, 0xa7a8, 0xded3, 0x5ab0, 0x61b3, 0x54e0, 0x53e0, 0xdcbd, 0xe6e7, 0xddbd, 0xb1ee, 0xd7c2, 0x001a, 0x001a, 0x001a, 0x76c6, 0xa8a8, 0xcbcd, 0xdfd3, 0x001a, 0x001a, 0x62b3, 0x001a, 0xcfd7, 0xd0d7, 0x001a, 0xe5db, 0x001a, 0x48b6, 0xe6b8, 0x001a, 0x56e0, 0x55e0, 0x57e0, 0x001a, 0x51e4, 0x52e4, 0xa8bb, 0xddbf, 0xdebd, 0xdebf, 0x001a, 0xb5ee, 0xb2ee, 0xb4ee, 0xb3ee, 0xc7c1, 0x001a, 0xeff0, 0x46f3, 0x45f3, 0xa4cb, 0x5cb0, 0x5bb0, 0xe0d3, 0x001a, 0xd1d7, 0x001a, 0x001a, 0xe7db, 0xe6db, 0x49b6, 0x001a, 0x59e0, 0x5ae0, 0x58e0, 0x001a, 0x001a, 0xe8b8, 0xe7b8, 0x001a, 0xaabb, 0xa9bb, 0x001a, 0xe7e7, 0xb3eb, 0xb1eb, 0xb2eb, 0xdfbf, 0xb7ee, 0xb6ee, 0x001a, 0xf2f0, 0xf1f0, 0xf0f0, 0x47f3, 0x001a, 0xaaf9, 0xa9a8, 0x73ad, 0x001a, 0x74ad, 0x5db0, 0x5eb0, 0xe2d3, 0xe1d3, 0xd2d7, 0x001a, 0x68b3, 0x66b3, 0x63b3, 0x67b3, 0x65b3, 0x64b3, 0x001a, 0x001a, 0x4ab6, 0xeadb, 0x001a, 0xedb8, 0x4cb6, 0x51b6, 0xecdb, 0x53b6, 0x52b6, 0x55b6, 0xebdb, 0xe8db, 0x4fb6, 0x4bb6, 0x4db6, 0xe9db, 0x54b6, 0x50b6, 0x4eb6, 0xefb8, 0xeeb8, 0xecb8, 0xf0b8, 0x001a, 0xeab8, 0xebb8, 0x001a, 0xe9b8, 0x001a, 0x5be0, 0x001a, 0x001a, 0x54e4, 0x001a, 0xacbb, 0xadbb, 0xabbb, 0x001a, 0x53e4, 0x001a, 0x55e4, 0x001a, 0xeae7, 0xece7, 0x001a, 0xe7bd, 0xede7, 0xe0bd, 0xe9e7, 0xdfbd, 0xe9bd, 0xe5bd, 0xe6bd, 0xe2bd, 0xe8e7, 0xe1bd, 0xeee7, 0xebe7, 0x001a, 0xe8bd, 0x001a, 0xe3bd, 0xe4bd, 0xb5eb, 0x001a, 0xb7eb, 0xb6eb, 0x001a, 0xb8eb, 0xe0bf, 0xb4eb, 0x001a, 0x001a, 0xcbc1, 0xb8ee, 0xc8c1, 0xccc1, 0xcac1, 0xc9c1, 0xf3f0, 0x001a, 0xf6f0, 0x001a, 0xf5f0, 0x001a, 0xf4f0, 0xd8c2, 0x48f3, 0x49f3, 0xd8c3, 0x4af3, 0xd9c3, 0x001a, 0x001a, 0xbac4, 0x001a, 0xb9c4, 0x52f6, 0x001a, 0x001a, 0x42c5, 0x53f6, 0x5cf7, 0xabc5, 0xacc5, 0x001a, 0x45f8, 0x001a, 0x42c6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaa8, 0x001a, 0x6ab3, 0x69b3, 0x5ce0, 0x5de0, 0x001a, 0xaebb, 0xb9eb, 0xeabd, 0xbaeb, 0xb9ee, 0xaba8, 0x001a, 0xb2d0, 0x76ad, 0x75ad, 0x001a, 0xe3d3, 0x5fb0, 0xe4d3, 0xd5d7, 0x001a, 0xd4d7, 0x001a, 0xd3d7, 0x001a, 0x001a, 0xeedb, 0x58b6, 0x001a, 0x001a, 0xeddb, 0x57b6, 0x001a, 0x001a, 0x001a, 0xefdb, 0x56b6, 0x001a, 0x5fe0, 0x62e0, 0x60e0, 0x61e0, 0x65e0, 0x5ee0, 0x66e0, 0x63e0, 0x64e0, 0xb0bb, 0x56e4, 0x001a, 0x001a, 0xafbb, 0x001a, 0xf2e7, 0xf0e7, 0x001a, 0x001a, 0xebbd, 0xefe7, 0xf1e7, 0x001a, 0xecbd, 0x001a, 0xbbeb, 0x001a, 0xbceb, 0xcdc1, 0x001a, 0x4cf3, 0x4ef3, 0x4bf3, 0x4df3, 0xd6f4, 0x54f6, 0x001a, 0x001a, 0x6ff9, 0xaca8, 0x77ad, 0xe5d3, 0xe7d3, 0xe6d3, 0x001a, 0xd8d7, 0x6cb3, 0x001a, 0xd6d7, 0x001a, 0x6bb3, 0xd9d7, 0x001a, 0xdad7, 0xd7d7, 0x001a, 0x001a, 0xfbdb, 0x60b6, 0xf3db, 0xf9db, 0x001a, 0x001a, 0x5bb6, 0x5eb6, 0xf2db, 0x59b6, 0xf6db, 0x6ce0, 0x5db6, 0x001a, 0xf1db, 0x001a, 0xf7db, 0xf4db, 0xfadb, 0xf0db, 0xf8db, 0x5cb6, 0x5fb6, 0xf5db, 0x5ab6, 0x001a, 0xf2b8, 0x68e0, 0xf1b8, 0x6fe0, 0x6ee0, 0xf8b8, 0x001a, 0xf9b8, 0x70e0, 0xf3b8, 0x6de0, 0xf7b8, 0x72e0, 0x69e0, 0x001a, 0x6be0, 0xf4b8, 0x67e0, 0x6ae0, 0x71e0, 0xf5b8, 0x73e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6b8, 0x001a, 0xb1bb, 0x5be4, 0x61e4, 0x59e4, 0x62e4, 0x001a, 0x58e4, 0x5de4, 0x63e4, 0x60e4, 0x5fe4, 0x5ee4, 0x001a, 0x57e4, 0x5ce4, 0x001a, 0x001a, 0x5ae4, 0x001a, 0xf1bd, 0xeebd, 0xfbe7, 0x41e8, 0x43e8, 0x40e8, 0xf8e7, 0xfae7, 0x45e8, 0x42e8, 0xfce7, 0x46e8, 0xf9e7, 0x44e8, 0xefbd, 0xf5bd, 0xf3bd, 0xf3e7, 0xf4bd, 0xf0bd, 0xf4e7, 0xf6e7, 0xf5e7, 0xfde7, 0xfee7, 0x001a, 0xf2bd, 0x001a, 0xedbd, 0x001a, 0x001a, 0xf7e7, 0x001a, 0xc6eb, 0xe2bf, 0x001a, 0xbdeb, 0xe3bf, 0xe6bf, 0xc2eb, 0x001a, 0xbfeb, 0xe5bf, 0x001a, 0x001a, 0xc3eb, 0xc4eb, 0xbeeb, 0xc7eb, 0xc0eb, 0xc5eb, 0xe4bf, 0x001a, 0xe1bf, 0xc1eb, 0x001a, 0xbfee, 0xd0c1, 0xcec1, 0xd1c1, 0xcfc1, 0xbeee, 0xbbee, 0xbaee, 0x001a, 0xbdee, 0x001a, 0x001a, 0xbcee, 0x45f1, 0xdec2, 0xfbf0, 0xfaf0, 0x001a, 0xd9c2, 0x41f1, 0x40f1, 0xf7f0, 0x43f1, 0xfcf0, 0xddc2, 0xf9f0, 0x42f1, 0xf8f0, 0xdac2, 0xdcc2, 0xfdf0, 0xdbc2, 0xfef0, 0x001a, 0x44f1, 0x52f3, 0x001a, 0xdec3, 0x4ff3, 0x001a, 0x53f3, 0x001a, 0x001a, 0xdbc3, 0x51f3, 0xe0c3, 0x001a, 0xddc3, 0x001a, 0x50f3, 0x001a, 0xdfc3, 0x54f3, 0xdac3, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcc4, 0xbec4, 0x001a, 0xd9f4, 0xbdc4, 0xd7f4, 0xdcc3, 0xd8f4, 0xbbc4, 0x43c5, 0x45c5, 0x56f6, 0x44c5, 0x55f6, 0x001a, 0x61f7, 0xadc5, 0x60f7, 0xaec5, 0x5ef7, 0x5df7, 0x62f7, 0x63f7, 0x46f8, 0x001a, 0x5ff7, 0x001a, 0x001a, 0xc6f8, 0xc3f8, 0xc4f8, 0xc5f8, 0x5cc6, 0x001a, 0x51f9, 0x50f9, 0x4ff9, 0x70f9, 0x001a, 0xbef9, 0xabf9, 0x6ec6, 0xada8, 0x60b0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfab8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6bd, 0x001a, 0x001a, 0xc8eb, 0x001a, 0x001a, 0xdfc2, 0x001a, 0x55f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacf9, 0xaea8, 0xeeaa, 0x79ad, 0x78ad, 0x001a, 0x63b0, 0x001a, 0xe8d3, 0x61b0, 0xe9d3, 0x62b0, 0x001a, 0x001a, 0xdfd7, 0xdbd7, 0x001a, 0x001a, 0x6db3, 0xded7, 0xddd7, 0xdcd7, 0x6eb3, 0xe0d7, 0xe1d7, 0x001a, 0x001a, 0x001a, 0x43dc, 0x41dc, 0x45dc, 0x46dc, 0x4cdc, 0x001a, 0x48dc, 0x4adc, 0x001a, 0x42dc, 0xfcdb, 0x001a, 0x49dc, 0x001a, 0x001a, 0x4bdc, 0x44dc, 0x47dc, 0xfddb, 0x62b6, 0x40dc, 0xfedb, 0x61b6, 0x63b6, 0x001a, 0xfdb8, 0x75e0, 0x77e0, 0x76e0, 0x7be0, 0xfbb8, 0x001a, 0x78e0, 0x74e0, 0x79e0, 0x7ae0, 0xfcb8, 0xfeb8, 0x7ce0, 0x001a, 0x67e4, 0x66e4, 0x001a, 0x64e4, 0x65e4, 0xb3bb, 0xb5bb, 0xb2bb, 0xb4bb, 0x4de8, 0x4ee8, 0x49e8, 0x001a, 0x4ae8, 0xf8bd, 0xfdbd, 0xf7bd, 0xfebd, 0xf9bd, 0x4be8, 0x001a, 0x001a, 0x4ce8, 0x48e8, 0x40be, 0xfbbd, 0x001a, 0x001a, 0xfabd, 0xfcbd, 0x001a, 0x47e8, 0x001a, 0xcaeb, 0xe8bf, 0x001a, 0x001a, 0xcceb, 0xeabf, 0xcfeb, 0xcbeb, 0xc9eb, 0xceeb, 0xe9bf, 0xcdeb, 0x001a, 0xe7bf, 0x001a, 0x001a, 0xd3c1, 0xd6c1, 0xc1ee, 0x001a, 0xd4c1, 0xc0ee, 0xd2c1, 0xd5c1, 0x46f1, 0x47f1, 0x48f1, 0xe0c2, 0x001a, 0x49f1, 0x001a, 0xe1c2, 0xe2c3, 0x58f3, 0x59f3, 0x57f3, 0x56f3, 0x5af3, 0xe1c3, 0xddf4, 0xdbf4, 0xdcf4, 0xdef4, 0xdaf4, 0xdff4, 0x58f6, 0x001a, 0x59f6, 0x57f6, 0x46c5, 0x64f7, 0xafc5, 0x65f7, 0x48f8, 0x47f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafa8, 0x64b6, 0x001a, 0x001a, 0x40b9, 0x001a, 0x001a, 0x001a, 0xb6bb, 0x001a, 0x001a, 0xecbf, 0x001a, 0xebbf, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3c3, 0x7cc4, 0x47c5, 0xb0a8, 0x64b0, 0x41b9, 0x001a, 0x5bf3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6cb, 0x001a, 0x001a, 0xb1a8, 0x001a, 0xb4a8, 0xb3a8, 0xb2a8, 0x001a, 0x001a, 0xa5cb, 0x001a, 0xcdcd, 0x001a, 0xcfcd, 0xefaa, 0x001a, 0x001a, 0xf1aa, 0xcccd, 0xcecd, 0xf0aa, 0xd1cd, 0xd0cd, 0xd2cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6d0, 0xb4d0, 0x7cad, 0xb3d0, 0xa3ad, 0x7ead, 0x7bad, 0x001a, 0xa4ad, 0x001a, 0x7dad, 0xa2ad, 0x001a, 0xa1ad, 0xb5d0, 0x001a, 0x7aad, 0x001a, 0x001a, 0x001a, 0x6ab0, 0xebd3, 0xf1d3, 0x67b0, 0x6eb0, 0x001a, 0x69b0, 0xeed3, 0xf0d3, 0x6cb0, 0xead3, 0xedd3, 0x68b0, 0x65b0, 0xecd3, 0x6bb0, 0xefd3, 0x6db0, 0x66b0, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3d7, 0xe6d7, 0x70b3, 0x001a, 0x7ab3, 0x76b3, 0xe4d7, 0x001a, 0x001a, 0x7eb3, 0x77b3, 0x7cb3, 0x72b3, 0x001a, 0x6fb3, 0x71b3, 0x7db3, 0xe5d7, 0x75b3, 0x78b3, 0x74b3, 0x79b3, 0xe7d7, 0x7bb3, 0x73b3, 0xe2d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ddc, 0x65b6, 0x4fdc, 0x001a, 0x67b6, 0x69b6, 0x001a, 0x4edc, 0x66b6, 0x6ab6, 0x001a, 0x68b6, 0x001a, 0x001a, 0x001a, 0x47b9, 0xa3e0, 0x4fb9, 0x7ee0, 0x001a, 0x50b9, 0x45b9, 0x001a, 0xa1e0, 0x001a, 0x001a, 0x4ab9, 0x001a, 0xa2e0, 0x43b9, 0x42b9, 0x001a, 0x4db9, 0x4cb9, 0x4bb9, 0x49b9, 0x4eb9, 0x7de0, 0x44b9, 0x46b9, 0x48b9, 0x001a, 0x001a, 0xb8bb, 0xbbbb, 0x001a, 0xbfbb, 0xb9bb, 0xbebb, 0xbcbb, 0x001a, 0xb7bb, 0x001a, 0xbdbb, 0xbabb, 0x001a, 0x001a, 0x001a, 0x52e8, 0x43be, 0x41be, 0x001a, 0x53e8, 0x001a, 0x44be, 0x42be, 0x51e8, 0x50e8, 0x001a, 0xf0bf, 0x4fe8, 0xeebf, 0xedbf, 0xd0eb, 0x45be, 0xefbf, 0xd1eb, 0xf2bf, 0xd2eb, 0xf1bf, 0xd8c1, 0xc3ee, 0xd7c1, 0xdcc1, 0xdac1, 0xdbc1, 0xe3c2, 0xd9c1, 0xc2ee, 0xd3eb, 0xe2c2, 0xe4c2, 0x001a, 0xe4c3, 0xe5c3, 0x001a, 0xe0f4, 0x001a, 0xdec5, 0xddc5, 0xb6a8, 0x001a, 0x001a, 0x55ca, 0x6fb0, 0x001a, 0x52ca, 0x53ca, 0x51ca, 0x001a, 0x54ca, 0x001a, 0x001a, 0xaacb, 0xa7cb, 0xaccb, 0xa8cb, 0xb7a8, 0xbaa8, 0x001a, 0xa9cb, 0xb9a8, 0xabcb, 0x001a, 0x001a, 0xb8a8, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5cd, 0xd7cd, 0xf4aa, 0xd3cd, 0xd6cd, 0xd4cd, 0xf2aa, 0xf5aa, 0x001a, 0xf3aa, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8d0, 0xbcd0, 0xb9d0, 0x001a, 0xa7ad, 0x001a, 0xa8ad, 0x001a, 0xbbd0, 0x001a, 0xbdd0, 0xbfd0, 0x001a, 0xa5ad, 0xbed0, 0x001a, 0x001a, 0xa6ad, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeed7, 0xbad0, 0xf2d3, 0xfbd3, 0xf9d3, 0xf4d3, 0xf5d3, 0xfad3, 0xfcd3, 0x71b0, 0x001a, 0xf7d3, 0xf3d3, 0x70b0, 0x72b0, 0xf6d3, 0xfdd3, 0xf8d3, 0x001a, 0x001a, 0xa1b3, 0xf1d7, 0xe9d7, 0xefd7, 0xf0d7, 0xa2b3, 0x001a, 0xe8d7, 0xead7, 0xb7d0, 0xecd7, 0xedd7, 0xebd7, 0x6cb6, 0x001a, 0x001a, 0x001a, 0x56dc, 0xd4eb, 0x57dc, 0x54dc, 0xa3b3, 0x6eb6, 0x53dc, 0x59dc, 0x58dc, 0x6bb6, 0x5cdc, 0x52dc, 0x5bdc, 0x50dc, 0x5adc, 0x55dc, 0x6db6, 0x001a, 0xaae0, 0x001a, 0xa5e0, 0xabe0, 0xa6e0, 0xa4e0, 0xa7e0, 0x51b9, 0x001a, 0xa9e0, 0x001a, 0xa8e0, 0x52b9, 0xc1bb, 0xc0bb, 0x6ee4, 0x71e4, 0x69e4, 0x6de4, 0xc2bb, 0x6ce4, 0x6ae4, 0x70e4, 0x6be4, 0x68e4, 0x6fe4, 0x001a, 0x59e8, 0x48be, 0x4af1, 0x56e8, 0x57e8, 0x55e8, 0x51dc, 0x47be, 0x5ae8, 0x54e8, 0x46be, 0x49be, 0x58e8, 0xd5eb, 0xf3bf, 0xd6eb, 0xd7eb, 0x001a, 0xc4ee, 0xddc1, 0x4bf1, 0x4cf1, 0x001a, 0x001a, 0x4df1, 0x5df3, 0x5cf3, 0xe2f4, 0x001a, 0xe1f4, 0x5bf6, 0x5cf6, 0x5af6, 0x66f7, 0xb0c5, 0xbba8, 0xaaad, 0xa9ad, 0x75b0, 0x74b0, 0x40d4, 0x41d4, 0xfed3, 0x001a, 0x73b0, 0xf5d7, 0x001a, 0xf6d7, 0xf2d7, 0xa4b3, 0xf3d7, 0x001a, 0xf4d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x5fdc, 0x61dc, 0x5ddc, 0x60dc, 0x6fb6, 0x5edc, 0x70b6, 0x001a, 0x001a, 0x73dd, 0x55b9, 0x54b9, 0x001a, 0x53b9, 0x001a, 0xace0, 0xade0, 0x001a, 0x001a, 0x73e4, 0x75e4, 0xc6bb, 0xc3bb, 0x001a, 0xc5bb, 0xc4bb, 0x74e4, 0x72e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x61e8, 0x5ee8, 0x5fe8, 0x4dbe, 0x60e8, 0x5be8, 0x5ce8, 0x4abe, 0x001a, 0x4bbe, 0x5de8, 0x4cbe, 0x001a, 0xdbeb, 0x001a, 0xdceb, 0xd9eb, 0xdaeb, 0xf4bf, 0xd8eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ee, 0xc5ee, 0xc7ee, 0xe0c1, 0xcbee, 0xdfc1, 0xc9ee, 0xccee, 0xcaee, 0xc6ee, 0xdec1, 0x001a, 0x4ff1, 0x001a, 0x50f1, 0x4ef1, 0x001a, 0x52f1, 0xe5c2, 0xe6c2, 0x5ff3, 0xe7c3, 0x51f1, 0x5ef3, 0xe6c3, 0xe5f4, 0xe6f4, 0xbfc4, 0xe4f4, 0x001a, 0xe3f4, 0x001a, 0x5df6, 0x48c5, 0x001a, 0x49f8, 0xc8f8, 0xc7f8, 0x001a, 0x43c6, 0x5dc6, 0xc9f8, 0x71f9, 0x001a, 0x6fc6, 0xbca8, 0xf6aa, 0x001a, 0x56b9, 0x001a, 0xc0c4, 0xbda8, 0xabad, 0xa5b3, 0x71b6, 0xe7c2, 0xf7aa, 0x001a, 0xc1d0, 0xc0d0, 0x42d4, 0x001a, 0x78b0, 0x76b0, 0x7ab0, 0x44d4, 0x001a, 0x79b0, 0x77b0, 0x001a, 0x001a, 0x001a, 0x001a, 0x43d4, 0xa8b3, 0xfcd7, 0x001a, 0xa7b3, 0xa9b3, 0x42d8, 0xabb3, 0xfed7, 0x40d8, 0xf7d7, 0xaab3, 0x43d8, 0x001a, 0x001a, 0xf9d7, 0x001a, 0xfad7, 0xf8d7, 0xa6b3, 0x001a, 0x41d8, 0xfbd7, 0xfdd7, 0x001a, 0x001a, 0x001a, 0x6ddc, 0x001a, 0x6cdc, 0x6adc, 0x62dc, 0x71dc, 0x65dc, 0x6fdc, 0x76dc, 0x6edc, 0x79b6, 0x001a, 0x75b6, 0x63dc, 0x001a, 0x69dc, 0x77b6, 0x001a, 0x68dc, 0x78b6, 0x7ab6, 0x6bdc, 0x001a, 0x72b6, 0x73b6, 0x77dc, 0x75dc, 0x001a, 0x74dc, 0x66dc, 0x001a, 0x72dc, 0x001a, 0x76b6, 0x001a, 0x001a, 0x001a, 0x001a, 0x74b6, 0x73dc, 0x64dc, 0x67dc, 0x70dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbae4, 0xb7e0, 0x001a, 0xb0e0, 0xc3e0, 0xcce0, 0xb3e0, 0x61b9, 0x001a, 0xc0e0, 0x57b9, 0x59b9, 0x65b9, 0xb1e0, 0x001a, 0x001a, 0x5ab9, 0x5cb9, 0x66b9, 0x5bb9, 0x001a, 0x001a, 0x001a, 0x001a, 0x64b9, 0xb9e0, 0x001a, 0xaee0, 0x62b9, 0xb8e0, 0x5eb9, 0xcae0, 0x63b9, 0xc8e0, 0xbce0, 0xc6e0, 0x60b9, 0xafe0, 0xc9e0, 0xc4e0, 0x001a, 0xcbe0, 0x58b9, 0x001a, 0x001a, 0x67b9, 0x5db9, 0x001a, 0x001a, 0xb5e0, 0x001a, 0xbde0, 0xc1e0, 0x001a, 0xc5e0, 0x5fb9, 0xb4e0, 0xb2e0, 0xbee0, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbe0, 0xbae0, 0x001a, 0xbfe0, 0xc2e0, 0x001a, 0xc7e0, 0x001a, 0x001a, 0x001a, 0x78e4, 0x001a, 0xc7bb, 0xa4e4, 0x7ae4, 0xccbb, 0xd0bb, 0xade4, 0xb5e4, 0xa6e4, 0xc8bb, 0x001a, 0xaae4, 0xb6e0, 0x001a, 0xc9bb, 0xb1e4, 0xb6e4, 0xaee4, 0x001a, 0xb0e4, 0xb9e4, 0xb2e4, 0x7ee4, 0xa9e4, 0x001a, 0x001a, 0xd1bb, 0x001a, 0xcdbb, 0x7ce4, 0xabe4, 0xcbbb, 0xa5e4, 0xcabb, 0xb3e4, 0xa2e4, 0x79e4, 0xcebb, 0xb8e4, 0x001a, 0x001a, 0x7be4, 0xafe4, 0xace4, 0xa7e4, 0x77e4, 0x76e4, 0xa1e4, 0xb4e4, 0xcfbb, 0xb7e4, 0x7de4, 0xa3e4, 0x52be, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5abe, 0x55be, 0xa4e8, 0xa1e8, 0x67e8, 0x50be, 0x001a, 0xd7f9, 0x001a, 0x4fbe, 0x56be, 0x001a, 0x001a, 0x001a, 0x65e8, 0x54be, 0x71e8, 0x63e8, 0x64e8, 0x4ebe, 0xa3e8, 0x58be, 0x74e8, 0x79e8, 0x73e8, 0xeeeb, 0x6fe8, 0x77e8, 0x75e8, 0x68e8, 0x62e8, 0x7de8, 0x57be, 0x7ee8, 0x001a, 0x78e8, 0x001a, 0x6de8, 0x6be8, 0x66e8, 0x001a, 0x001a, 0x001a, 0x6ee8, 0x7be8, 0x6ae8, 0x7ae8, 0xa2e8, 0x001a, 0x001a, 0x53be, 0x001a, 0x76e8, 0x7ce8, 0x72e8, 0x6ce8, 0x51be, 0x001a, 0x001a, 0x001a, 0xa8e4, 0x70e8, 0x59be, 0x69e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4eb, 0xf7bf, 0xf3eb, 0xf0eb, 0x44ec, 0xfbbf, 0x001a, 0x41ec, 0xf8eb, 0x43ec, 0xe9eb, 0xf6eb, 0x001a, 0xfdbf, 0x001a, 0xe1eb, 0x001a, 0xdfeb, 0x42ec, 0x001a, 0x40ec, 0xfeeb, 0xedeb, 0xeceb, 0xe2eb, 0x40c0, 0x001a, 0xe8eb, 0xf2eb, 0xfdeb, 0x43c0, 0x45ec, 0x001a, 0xe8c1, 0x45c0, 0xfebf, 0xe6eb, 0x001a, 0xefeb, 0xdeeb, 0xe0eb, 0xf5bf, 0x42c0, 0xfabf, 0xe7eb, 0xf7eb, 0xf1eb, 0x41c0, 0xddeb, 0xe3c1, 0xf9eb, 0xfceb, 0xfcbf, 0x001a, 0xebeb, 0x44c0, 0xf9bf, 0x001a, 0x001a, 0x001a, 0xf8bf, 0xf5eb, 0xfbeb, 0xf6bf, 0x001a, 0xe4eb, 0xfaeb, 0x001a, 0x001a, 0xe5eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeaeb, 0xd2ee, 0x001a, 0xd7ee, 0xe5c1, 0xe7c1, 0xddee, 0xe1c1, 0xecee, 0xe3ee, 0xd8ee, 0xd9ee, 0xe2ee, 0x001a, 0xeec1, 0xe1ee, 0xd1ee, 0xe0ee, 0xd4ee, 0xedee, 0xedc1, 0xebc1, 0xd5ee, 0x001a, 0xe8ee, 0x001a, 0xdaee, 0xe7ee, 0x001a, 0xe9ee, 0xd0ee, 0xe6c1, 0x001a, 0xeaee, 0x001a, 0x001a, 0xdeee, 0x001a, 0xeac1, 0xdbee, 0x001a, 0x001a, 0xecc1, 0xe4ee, 0x001a, 0x001a, 0x001a, 0xe4c1, 0xd6ee, 0xe5ee, 0x001a, 0xdfee, 0xe3eb, 0xe6ee, 0xd3ee, 0x001a, 0xe9c1, 0x001a, 0xebee, 0x001a, 0xe2c1, 0xceee, 0x001a, 0x001a, 0x001a, 0x001a, 0x60f1, 0x59f1, 0xe9c2, 0x001a, 0x54f1, 0x63f1, 0x5bf1, 0xdcee, 0x001a, 0x65f1, 0x55f1, 0x001a, 0xe8c2, 0x5ff1, 0xeac2, 0xf2c2, 0xf0c2, 0x61f1, 0xf1c2, 0x57f1, 0x001a, 0x58f1, 0x5df1, 0x62f1, 0x001a, 0xcdee, 0xebc2, 0x6af1, 0x67f1, 0x6bf1, 0x5ef1, 0x5af1, 0x68f1, 0x6af3, 0x5cf1, 0x001a, 0xeec2, 0x001a, 0xedc2, 0xcfee, 0xefc2, 0x64f1, 0x66f1, 0xecc2, 0x69f1, 0x53f1, 0x001a, 0x56f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73f3, 0x001a, 0x63f3, 0xebc3, 0x71f3, 0x001a, 0x001a, 0x61f3, 0xecc3, 0x001a, 0x6cf3, 0x001a, 0x68f3, 0xf1c3, 0x72f3, 0x62f3, 0x65f3, 0xe9c3, 0x74f3, 0x001a, 0x6df3, 0x70f3, 0xefc3, 0xf4c3, 0xf2c3, 0x69f3, 0x64f3, 0x001a, 0xedc3, 0xeec3, 0x60f3, 0xeac3, 0x001a, 0xe8c3, 0xf0c3, 0x6ff3, 0xf3c3, 0x001a, 0x6bf3, 0x75f3, 0xf5c3, 0x001a, 0x001a, 0x001a, 0x67f3, 0x001a, 0x6ef3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3f4, 0x42f5, 0xf5f4, 0xfcf4, 0x66f3, 0xfaf4, 0xe9f4, 0x40f5, 0xc3c4, 0xedf4, 0xfef4, 0xf4f4, 0x001a, 0x001a, 0xc2c4, 0x001a, 0x001a, 0x44f5, 0xf6f4, 0x001a, 0xfbf4, 0xfdf4, 0xe7f4, 0x41f5, 0xf2f4, 0xf7f4, 0xebf4, 0xeff4, 0x43f5, 0xf9f4, 0xe8f4, 0xecf4, 0xeef4, 0xf8f4, 0x001a, 0xc1c4, 0xf1f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeaf4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0f4, 0x61f6, 0x66f6, 0x4fc5, 0x68f6, 0x001a, 0x49c5, 0x001a, 0x64f6, 0x6af6, 0x4ec5, 0x4ac5, 0x001a, 0x4bc5, 0x60f6, 0x67f6, 0x4dc5, 0x65f6, 0x4cc5, 0x5ff6, 0x63f6, 0x62f6, 0x001a, 0x5ef6, 0x69f6, 0x001a, 0x001a, 0x001a, 0xb1c5, 0x6df7, 0x70f7, 0x6cf7, 0x6ef7, 0x6ff7, 0x69f7, 0x6af7, 0x67f7, 0x001a, 0x001a, 0x6bf7, 0x68f7, 0xb2c5, 0xb3c5, 0x001a, 0x001a, 0x4bf8, 0x001a, 0x4df8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4cf8, 0x4ef8, 0x001a, 0xe0c5, 0x001a, 0x4af8, 0xdfc5, 0xe1c5, 0x001a, 0x001a, 0x001a, 0xcbf8, 0xccf8, 0x44c6, 0xcaf8, 0x001a, 0x53f9, 0x52f9, 0x54f9, 0x5fc6, 0x55f9, 0x5ec6, 0x56f9, 0x72f9, 0x75f9, 0x74f9, 0x68c6, 0x73f9, 0x001a, 0x001a, 0x001a, 0x72c6, 0x70c6, 0x71c6, 0x77c6, 0xc0f9, 0xc1f9, 0xbff9, 0xc9f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8aa, 0x001a, 0x001a, 0x44d8, 0x78dc, 0xa5e8, 0x76f3, 0x001a, 0x001a, 0xf9aa, 0x001a, 0xacad, 0x7bb0, 0x001a, 0x001a, 0x45d8, 0x001a, 0x46d8, 0xacb3, 0x001a, 0x7db6, 0x7adc, 0x79dc, 0xa3b6, 0x7cb6, 0x7bdc, 0x7eb6, 0xa2b6, 0xa1b6, 0x7bb6, 0x001a, 0x001a, 0x001a, 0x68b9, 0x001a, 0x001a, 0xd0e0, 0xcee0, 0x001a, 0xcfe0, 0xcde0, 0x001a, 0xd2bb, 0x001a, 0xd5bb, 0xd7bb, 0xd6bb, 0x001a, 0x001a, 0xd3bb, 0xd4bb, 0x001a, 0xa7e8, 0xa6e8, 0x5bbe, 0xa8e8, 0x001a, 0xa9e8, 0x5cbe, 0x001a, 0x001a, 0x001a, 0x4dec, 0x4bec, 0xf3ee, 0x001a, 0x49ec, 0x4aec, 0x46c0, 0x46ec, 0x4eec, 0x48ec, 0x4cec, 0xefee, 0x001a, 0x001a, 0xf1ee, 0x001a, 0xf2ee, 0xf3c1, 0xeeee, 0xf2c1, 0xf0ee, 0xefc1, 0xf0c1, 0xf1c1, 0x47ec, 0x001a, 0x001a, 0xf5c2, 0x6ef1, 0x6cf1, 0x6df1, 0xf3c2, 0xf6c2, 0xf4c2, 0x001a, 0x001a, 0x001a, 0x77f3, 0x78f3, 0xf6c3, 0x001a, 0x45f5, 0x47f5, 0x46f5, 0xc4c4, 0x50c5, 0x6df6, 0x6cf6, 0x6bf6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaaa, 0x001a, 0xaac9, 0x001a, 0x58ca, 0xe9a6, 0x56ca, 0x59ca, 0x57ca, 0x001a, 0x001a, 0x001a, 0xaecb, 0x001a, 0xc1a8, 0x001a, 0xc2a8, 0xb0cb, 0xbfa8, 0xafcb, 0xadcb, 0xc0a8, 0xbea8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8cd, 0xdbcd, 0xfdaa, 0xdacd, 0xd9cd, 0x001a, 0xfcaa, 0xfbaa, 0x001a, 0x40ab, 0xdccd, 0xfeaa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6d0, 0xaead, 0xafad, 0xb0ad, 0xc7d0, 0xc3d0, 0xadad, 0xc4d0, 0x001a, 0xc5d0, 0xc2d0, 0x001a, 0x001a, 0x001a, 0xa4b0, 0x001a, 0x001a, 0xa1b0, 0x45d4, 0xa2b0, 0xa5b0, 0x46d4, 0x001a, 0x7eb0, 0x7cb0, 0x7db0, 0xa3b0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadb3, 0x49d8, 0xb5b3, 0x48d8, 0x001a, 0x4bd8, 0xb1b3, 0x4ad8, 0xabb6, 0xafb3, 0xb2b3, 0xaeb3, 0xb3b3, 0xb4b3, 0xb0b3, 0x001a, 0x001a, 0x001a, 0x47d8, 0xa7b6, 0x7ddc, 0x001a, 0xa3dc, 0x001a, 0x001a, 0xa2dc, 0xacb6, 0xa8b6, 0xa9b6, 0x7cdc, 0x7edc, 0xa1dc, 0xa4b6, 0xa6b6, 0x001a, 0xaab6, 0xa5b6, 0x001a, 0x001a, 0xd3e0, 0xd1e0, 0xd2e0, 0x6ab9, 0x6bb9, 0x001a, 0xd4e0, 0x69b9, 0xd8bb, 0x001a, 0xdabb, 0xd9bb, 0x001a, 0xbbe4, 0x001a, 0x001a, 0xbce4, 0xabe8, 0x001a, 0xaae8, 0x001a, 0x001a, 0x47c0, 0x48c0, 0x4fec, 0x49c0, 0x001a, 0xf6ee, 0x001a, 0xf4ee, 0x001a, 0xf5ee, 0xf4c1, 0x001a, 0x6ff1, 0xf7c3, 0x001a, 0x001a, 0x001a, 0xf5c1, 0x41ab, 0x001a, 0xa6b0, 0x47d4, 0x001a, 0x001a, 0x4cd8, 0xb6b3, 0xadb6, 0xa4dc, 0xa6dc, 0xafb6, 0xaeb6, 0xb0b6, 0xb1b6, 0xa5dc, 0x6eb9, 0x6fb9, 0x6db9, 0xdbbb, 0x6cb9, 0xd5e0, 0x001a, 0x001a, 0x001a, 0xdcbb, 0xace8, 0x50ec, 0x4ac0, 0xf6c1, 0x70f1, 0x74f1, 0xf9c2, 0x71f1, 0xfac2, 0xf8c2, 0x75f1, 0xfbc2, 0x73f1, 0x001a, 0x79f3, 0xf7c2, 0xf8c3, 0x001a, 0xcdf8, 0x001a, 0x001a, 0x42ab, 0xb8b3, 0xb7b3, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2b6, 0xa8dc, 0xa7dc, 0xb3b6, 0x001a, 0x001a, 0xd9e0, 0x73b9, 0x70b9, 0xd8e0, 0x72b9, 0xd6e0, 0x71b9, 0x001a, 0xd7e0, 0x001a, 0xbde4, 0xddbb, 0x001a, 0xafe8, 0x001a, 0x5dbe, 0xade8, 0x5ebe, 0x5fbe, 0xaee8, 0x60be, 0x001a, 0x51ec, 0x001a, 0x4ec0, 0x4bc0, 0x50c0, 0x53ec, 0x4cc0, 0x52ec, 0x4fc0, 0x001a, 0x001a, 0x4dc0, 0x001a, 0xf9ee, 0xfbee, 0x001a, 0x001a, 0xf7c1, 0xfaee, 0xf8c1, 0xf8ee, 0xf7ee, 0x001a, 0x77f1, 0x76f1, 0xfcc2, 0x78f1, 0x7ef3, 0xfac3, 0x7df3, 0x7af3, 0xf9c3, 0x7bf3, 0x7cf3, 0x001a, 0x48f5, 0x49f5, 0xc5c4, 0x001a, 0x53c5, 0x001a, 0x001a, 0x6ef6, 0x001a, 0x001a, 0x51c5, 0x52c5, 0x6ff6, 0x001a, 0x001a, 0xb4c5, 0xb5c5, 0x71f7, 0x001a, 0x001a, 0x45c6, 0xcff8, 0x47c6, 0x001a, 0xcef8, 0xd0f8, 0x46c6, 0x57f9, 0x001a, 0xadf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x43ab, 0x001a, 0x001a, 0x001a, 0x74b9, 0x001a, 0xbee4, 0x001a, 0xb0e8, 0x51c0, 0x52c0, 0x001a, 0x44ab, 0x001a, 0x61be, 0xfbc3, 0xb1ad, 0x001a, 0x001a, 0x001a, 0x53c0, 0x001a, 0xe2c5, 0xb2ad, 0x4dd8, 0x001a, 0xa9dc, 0x001a, 0xabdc, 0x001a, 0xaadc, 0x001a, 0xdde0, 0xdae0, 0x75b9, 0x001a, 0x76b9, 0xdbe0, 0xdce0, 0x001a, 0xc0e4, 0xc5e4, 0xdebb, 0xbfe4, 0xc1e4, 0xc8e4, 0xc3e4, 0xc7e4, 0xc4e4, 0xc2e4, 0xc6e4, 0xdfbb, 0x001a, 0x001a, 0xb3e8, 0x001a, 0xb1e8, 0x63be, 0x001a, 0x62be, 0xb2e8, 0x64be, 0x001a, 0x001a, 0x001a, 0x001a, 0x56ec, 0x001a, 0x001a, 0x55ec, 0x54c0, 0x54ec, 0xfcee, 0x001a, 0xfeee, 0x41ef, 0x40ef, 0x001a, 0xf9c1, 0xfdee, 0xa1f1, 0xfdc2, 0x7df1, 0xa2f1, 0xfec2, 0x001a, 0x7bf1, 0x001a, 0x7ef1, 0x7cf1, 0x79f1, 0x40c3, 0x7af1, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1f3, 0x001a, 0x001a, 0xa3f3, 0xa2f3, 0x001a, 0x4af5, 0x001a, 0x4bf5, 0x001a, 0x001a, 0x001a, 0x70f6, 0x001a, 0xb7c5, 0x001a, 0xb6c5, 0x4ff8, 0x50f8, 0x48c6, 0xd1f8, 0x001a, 0x69c6, 0x001a, 0xb3ad, 0xb4b6, 0xcae4, 0xc9e4, 0xb5e8, 0xb4e8, 0x001a, 0x001a, 0xfac1, 0x43ef, 0x42ef, 0xa5f1, 0xa3f1, 0xa6f1, 0xa4f1, 0x001a, 0x001a, 0xfcc3, 0xa4f3, 0xa5f3, 0xa6f3, 0x001a, 0x71f6, 0x001a, 0x72f7, 0x001a, 0xd2f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4ad, 0x001a, 0x001a, 0x57ec, 0x44ef, 0x001a, 0xb5ad, 0x001a, 0x001a, 0xe0bb, 0x001a, 0x58ec, 0x41c3, 0xa7f1, 0xfdc3, 0x001a, 0x4cf5, 0x4df5, 0x54c5, 0x51f8, 0xb6ad, 0xbbb3, 0xbcb3, 0x4ed8, 0xb5b6, 0xb6b6, 0xacdc, 0xb7b6, 0x001a, 0x7ab9, 0x001a, 0x7cb9, 0xdfe0, 0xe0e0, 0xdee0, 0x77b9, 0x78b9, 0x7bb9, 0x79b9, 0x001a, 0x001a, 0xcbe4, 0xe1bb, 0xe2bb, 0x001a, 0x001a, 0xbce8, 0x67be, 0xb7e8, 0xb6e8, 0x001a, 0xbbe8, 0x65be, 0x001a, 0x001a, 0x5bc0, 0x001a, 0xb8e8, 0xbde8, 0xbae8, 0xb9e8, 0x001a, 0x66be, 0x001a, 0x59c0, 0x001a, 0x5aec, 0x55c0, 0x001a, 0x5bec, 0x001a, 0x001a, 0x59ec, 0x001a, 0x58c0, 0x56c0, 0x5ac0, 0x001a, 0x57c0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x45ef, 0x001a, 0x4aef, 0x46ef, 0x49ef, 0xfbc1, 0x001a, 0xd4ed, 0x48ef, 0x47ef, 0x001a, 0x44c3, 0x42c3, 0x45c3, 0x43c3, 0xa8f1, 0xa9f1, 0xaaf1, 0x46c3, 0x001a, 0x001a, 0x001a, 0xaaf3, 0x40c4, 0xa8f3, 0x001a, 0x41c4, 0xa7f3, 0xa9f3, 0xfec3, 0x51f5, 0x4ef5, 0x001a, 0x4ff5, 0x50f5, 0x72f6, 0x56c5, 0x001a, 0x55c5, 0x001a, 0x74f7, 0x73f7, 0xb8c5, 0x001a, 0x001a, 0x001a, 0xe3c5, 0x49c6, 0x60c6, 0x58f9, 0xaef9, 0xaff9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7ad, 0xaddc, 0x001a, 0x001a, 0xe1e0, 0xcce4, 0xcde4, 0xe3bb, 0x001a, 0xe4bb, 0xbee8, 0x68be, 0x001a, 0x001a, 0xfcc1, 0x001a, 0xabf1, 0x001a, 0x47c3, 0xadf3, 0x42c4, 0xacf3, 0xaef3, 0xabf3, 0x75f6, 0x52f5, 0x53f5, 0x001a, 0xc6c4, 0x001a, 0x74f6, 0x001a, 0x001a, 0x73f6, 0x001a, 0x75f7, 0xb0f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8ad, 0x001a, 0x001a, 0x001a, 0xb9ad, 0x001a, 0x001a, 0xa7b0, 0x48d4, 0x001a, 0x4fd8, 0x001a, 0xb8b6, 0x001a, 0xbbb6, 0xb9b6, 0xaedc, 0x001a, 0xbdb6, 0x001a, 0xbab6, 0x001a, 0x001a, 0xbcb6, 0x001a, 0x7eb9, 0x001a, 0xe2e0, 0x001a, 0x001a, 0xe3e0, 0xc0e8, 0x001a, 0x7db9, 0xa1b9, 0xa2b9, 0x001a, 0xcfe4, 0x001a, 0xcee4, 0xe5bb, 0x001a, 0xe6bb, 0x001a, 0xd0e4, 0xbfe8, 0xe8bb, 0x69be, 0x001a, 0xe7bb, 0x001a, 0x001a, 0x001a, 0x5cc0, 0xc1e8, 0x6bbe, 0x6abe, 0xc2e8, 0xc5e8, 0xc3e8, 0xc4e8, 0x6cbe, 0x001a, 0x61c0, 0x5fc0, 0x001a, 0x001a, 0x5ec0, 0x5dec, 0x001a, 0x60c0, 0x001a, 0x001a, 0x5cec, 0x4bef, 0x001a, 0x5eec, 0x5dc0, 0x5fec, 0x4eef, 0x4cef, 0x4def, 0x52ef, 0x4bc3, 0x51ef, 0x54ef, 0x53ef, 0x50ef, 0x4fef, 0x001a, 0xfdc1, 0x001a, 0x001a, 0x001a, 0x001a, 0xaef1, 0x001a, 0xadf1, 0x4ac3, 0x48c3, 0x49c3, 0x001a, 0xacf1, 0x001a, 0xb1f3, 0x001a, 0x43c4, 0x001a, 0xb0f3, 0xaff3, 0x44c4, 0x001a, 0x58f5, 0x57f5, 0x001a, 0x55f5, 0x001a, 0x54f5, 0xc8c4, 0xc7c4, 0x59f5, 0x76f7, 0xb9c5, 0x77f6, 0x57c5, 0x76f6, 0x56f5, 0x001a, 0x77f7, 0xe4c5, 0x001a, 0x61c6, 0x59f9, 0x001a, 0xb1f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbaad, 0x50d8, 0x55ef, 0xbbad, 0x001a, 0x001a, 0xd2e4, 0xd1e4, 0x60ec, 0x001a, 0x001a, 0x57ef, 0x001a, 0x56ef, 0x001a, 0x4cc3, 0xb2f3, 0xb3f3, 0xc9c4, 0x001a, 0x001a, 0xb2f9, 0xa8b0, 0xbfb6, 0xbeb6, 0xe4e0, 0xe6e0, 0xa4b9, 0xe5e0, 0xa3b9, 0xa5b9, 0xe7e0, 0x001a, 0x001a, 0x001a, 0xd4e4, 0xd6e4, 0xd5e4, 0x001a, 0xd8e4, 0x001a, 0x001a, 0x001a, 0xe9bb, 0xd7e4, 0xd3e4, 0x001a, 0x001a, 0x001a, 0xd9e4, 0x001a, 0xcce8, 0x001a, 0xcfe8, 0xd1e8, 0xc7e8, 0xcbe8, 0xc8e8, 0x6ebe, 0x71be, 0x73be, 0xc9e8, 0xcae8, 0x72be, 0xcde8, 0xd0e8, 0xcee8, 0x74be, 0x001a, 0x70be, 0xc6e8, 0x6dbe, 0x001a, 0x6fbe, 0x001a, 0x001a, 0x63c0, 0x66ec, 0x64ec, 0x63ec, 0x001a, 0x69ec, 0x001a, 0x68ec, 0x67ec, 0x001a, 0x62ec, 0x62c0, 0x61ec, 0x001a, 0x65ec, 0x64c0, 0x001a, 0x001a, 0x5aef, 0x001a, 0x5eef, 0x5bef, 0x5def, 0x5cef, 0x59ef, 0x5fef, 0x62ef, 0x60ef, 0x61ef, 0x40c2, 0x001a, 0xfec1, 0x58ef, 0x63ef, 0xb3f1, 0xb6f1, 0xb8f1, 0xb7f1, 0x001a, 0xb1f1, 0xb5f1, 0xb0f1, 0x001a, 0xb2f1, 0x4dc3, 0xaff1, 0x001a, 0xb4f1, 0x001a, 0x001a, 0xc0f3, 0xb5f3, 0x45c4, 0x001a, 0x001a, 0x46c4, 0xb4f3, 0xb9f3, 0xbff3, 0xb7f3, 0xbef3, 0x001a, 0xbbf3, 0x001a, 0xbaf3, 0xbdf3, 0xb8f3, 0xb6f3, 0x001a, 0xbcf3, 0x001a, 0x60f5, 0x5ef5, 0xcac4, 0x5df5, 0x63f5, 0x61f5, 0x001a, 0xcbc4, 0x5cf5, 0x5af5, 0x001a, 0x5bf5, 0xcdc4, 0x5ff5, 0xccc4, 0x62f5, 0x78f6, 0x7ef6, 0x001a, 0x001a, 0x79f6, 0x5bc5, 0xa1f6, 0x5ac5, 0x7df6, 0x7cf6, 0x59c5, 0x7bf6, 0x58c5, 0x7af6, 0x001a, 0x7df7, 0xa1f7, 0x7ef7, 0x001a, 0x7bf7, 0xbbc5, 0x78f7, 0x7cf7, 0xa3f7, 0x001a, 0xa2f7, 0x79f7, 0x7af7, 0xbac5, 0x52f8, 0xe7c5, 0x001a, 0x53f8, 0xe5c5, 0xe6c5, 0x001a, 0x001a, 0xd3f8, 0x4ac6, 0x76f9, 0x001a, 0x6ac6, 0x001a, 0xb3f9, 0x6bc6, 0xb4f9, 0xb5f9, 0xc3f9, 0xc2f9, 0x7ac6, 0xcdf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9b0, 0x001a, 0x001a, 0xe9e0, 0x001a, 0xe8e0, 0x001a, 0xeabb, 0xebbb, 0xdae4, 0x001a, 0xd2e8, 0x6cec, 0x001a, 0x001a, 0x75be, 0x65c0, 0x6aec, 0x001a, 0x6dec, 0x66c0, 0x001a, 0x64ef, 0x6bec, 0xb9f1, 0x4ec3, 0xc1f3, 0x001a, 0x001a, 0x001a, 0x66f5, 0x64f5, 0x001a, 0x001a, 0x65f5, 0x001a, 0x001a, 0xa2f6, 0x001a, 0x5cc5, 0xa4f7, 0xeac5, 0xbcc5, 0xe8c5, 0xe9c5, 0xd4f8, 0x62c6, 0x001a, 0xaab0, 0x001a, 0x001a, 0x001a, 0xbaf1, 0x001a, 0x001a, 0x49d4, 0x001a, 0xa6b9, 0x001a, 0xdbe4, 0x001a, 0x001a, 0xecbb, 0xdce4, 0x001a, 0x001a, 0x001a, 0xd4e8, 0xd3e8, 0x68c0, 0x76be, 0x77be, 0x001a, 0xd7e8, 0xd6e8, 0xd5e8, 0x001a, 0x001a, 0x6eec, 0x71ec, 0x001a, 0x70ec, 0x6fec, 0x67c0, 0x68ef, 0x66ef, 0x65ef, 0x001a, 0x001a, 0x67ef, 0x001a, 0x4fc3, 0xbcf1, 0xbdf1, 0x50c3, 0x001a, 0xbbf1, 0x001a, 0xc3f3, 0xc2f3, 0xc5f3, 0x47c4, 0xc4f3, 0x001a, 0x67f5, 0x69f5, 0x68f5, 0x001a, 0x001a, 0xa3f6, 0xa6f6, 0xa4f6, 0xa5f6, 0xa5f7, 0xbdc5, 0x001a, 0x001a, 0x001a, 0x54f8, 0x55f8, 0x56f8, 0x001a, 0x4bc6, 0x63c6, 0xb6f9, 0xabb0, 0x001a, 0x78be, 0x69c0, 0xbef1, 0x001a, 0xa6f7, 0x001a, 0x001a, 0xc4f9, 0x4ad4, 0x001a, 0x7bc6, 0xacb0, 0x72ec, 0x001a, 0xbff1, 0x001a, 0xc6f3, 0x001a, 0x001a, 0xa7f6, 0xa7f7, 0xadb0, 0x001a, 0xdde4, 0xdee4, 0x001a, 0xedbb, 0xeebb, 0xd9e8, 0x7abe, 0x79be, 0xd8e8, 0x001a, 0x69ef, 0x001a, 0xc0f1, 0xc2f1, 0xc1f1, 0x53c3, 0x52c3, 0x51c3, 0x001a, 0x5ec5, 0xa8f6, 0x001a, 0x5dc5, 0xa9f7, 0xa8f7, 0x001a, 0x4cc6, 0xd5f8, 0xbdb3, 0xeae0, 0x001a, 0x001a, 0x001a, 0xe1e4, 0xdfe4, 0xe0e4, 0x001a, 0x001a, 0xe2e8, 0x001a, 0xdde8, 0xdae8, 0xe1e8, 0x001a, 0x001a, 0x001a, 0xe3e8, 0x001a, 0x001a, 0x7cbe, 0xe0e8, 0xdce8, 0x001a, 0x001a, 0xdbe8, 0xdfe8, 0xdee8, 0x7bbe, 0x001a, 0x001a, 0x7dec, 0x78ec, 0x76ec, 0xa1ec, 0x77ec, 0x001a, 0x73ec, 0x001a, 0x79ec, 0x001a, 0x001a, 0x74ec, 0x72ef, 0x75ec, 0xa2ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7cec, 0x6ac0, 0x7bec, 0x7aec, 0x001a, 0x7eec, 0x001a, 0x001a, 0x001a, 0x001a, 0x6aef, 0x6def, 0x001a, 0x001a, 0x6cef, 0x001a, 0x74ef, 0x6fef, 0x73ef, 0x001a, 0x71ef, 0x70ef, 0x6eef, 0x001a, 0x6bef, 0x001a, 0x43c2, 0x42c2, 0x001a, 0x44c2, 0x41c2, 0x75ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8f1, 0xcbf1, 0x001a, 0xc9f1, 0xcdf1, 0x001a, 0x001a, 0x001a, 0xcef1, 0x001a, 0xc6f1, 0x58c3, 0xc7f1, 0x001a, 0xc5f1, 0xccf1, 0x001a, 0xc4f1, 0xc3f1, 0x57c3, 0x55c3, 0x54c3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaf1, 0xcff3, 0xd5f3, 0x4ac4, 0xd0f3, 0x001a, 0xd3f3, 0xd7f3, 0x4bc4, 0xd2f3, 0x001a, 0xcaf3, 0x001a, 0xc9f3, 0xd6f3, 0xcdf3, 0x001a, 0xcbf3, 0xd4f3, 0xccf3, 0x49c4, 0x48c4, 0x001a, 0xc7f3, 0xc8f3, 0xd1f3, 0x001a, 0x001a, 0x001a, 0xcef3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6cf5, 0x6ff5, 0x001a, 0x001a, 0x001a, 0x001a, 0x56c3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6df5, 0x73f5, 0x71f5, 0x6bf5, 0x76f5, 0x001a, 0x6af5, 0x001a, 0xcfc4, 0x72f5, 0x001a, 0x001a, 0x001a, 0x6ef5, 0xcec4, 0x75f5, 0x001a, 0x001a, 0x74f5, 0x001a, 0x001a, 0x001a, 0x001a, 0xabf6, 0xaaf6, 0x001a, 0x001a, 0x001a, 0xb1f6, 0x001a, 0xadf6, 0xb0f6, 0x60c5, 0x001a, 0x001a, 0xaef6, 0xaff6, 0x001a, 0xa9f6, 0xacf6, 0x5fc5, 0x001a, 0x001a, 0x001a, 0xbfc5, 0xb4f7, 0xaff7, 0xb3f7, 0x001a, 0xb6f7, 0xb2f7, 0x001a, 0xaef7, 0x001a, 0xc1c5, 0xb1f7, 0xb5f7, 0xc0c5, 0xacf7, 0x70f5, 0xb0f7, 0x001a, 0x001a, 0xadf7, 0x001a, 0xaaf7, 0x001a, 0xabf7, 0xbec5, 0x5af8, 0x5cf8, 0x5ff8, 0x5bf8, 0x60f8, 0x001a, 0x59f8, 0x001a, 0x57f8, 0x001a, 0xebc5, 0x5df8, 0xedc5, 0xecc5, 0x58f8, 0x5ef8, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaf8, 0x4dc6, 0xdbf8, 0x001a, 0xd9f8, 0xd6f8, 0x001a, 0x001a, 0xd8f8, 0xd7f8, 0x5af9, 0x001a, 0x001a, 0x001a, 0x001a, 0x5cf9, 0x5bf9, 0x001a, 0x001a, 0x79f9, 0x001a, 0x78f9, 0x77f9, 0x7af9, 0x001a, 0x73c6, 0x74c6, 0xcaf9, 0xcef9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbeb3, 0xafdc, 0xede0, 0x001a, 0xa7b9, 0xebe0, 0x001a, 0x001a, 0xece0, 0x001a, 0x001a, 0x001a, 0xe2e4, 0xe3e4, 0xf1bb, 0xefbb, 0xe4e4, 0xf0bb, 0xe8e8, 0x001a, 0xebe8, 0xe5e8, 0xece8, 0xe4e8, 0xe6e8, 0x001a, 0xe7e8, 0xeae8, 0x001a, 0x001a, 0xa1be, 0xefe8, 0xeee8, 0x7dbe, 0xe9e8, 0xede8, 0x7ebe, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacec, 0x001a, 0x6fc0, 0x001a, 0xa7ec, 0x6bc0, 0x001a, 0xa4ec, 0xaaec, 0xadec, 0x001a, 0x70c0, 0x001a, 0xa9ec, 0xa6ec, 0xaeec, 0xa5ec, 0x001a, 0xabec, 0x6cc0, 0x001a, 0xa3ec, 0x6dc0, 0x001a, 0x6ec0, 0xa8ec, 0x001a, 0x001a, 0x001a, 0xa9ef, 0x7aef, 0x7bef, 0x7eef, 0x7cef, 0x001a, 0x76ef, 0x001a, 0x001a, 0x79ef, 0xa5ef, 0x7def, 0x001a, 0x001a, 0x45c2, 0x001a, 0xa7ef, 0xa4ef, 0x46c2, 0xa6ef, 0x77ef, 0xa2ef, 0xa3ef, 0x001a, 0xa1ef, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2f1, 0xd4f1, 0xd7f1, 0x001a, 0x001a, 0xd1f1, 0x001a, 0x59c3, 0xd9f1, 0xd0f1, 0xdaf1, 0x001a, 0xd6f1, 0xd8f1, 0xdcf1, 0xd5f1, 0xddf1, 0xd3f1, 0xcff1, 0x5ac3, 0x001a, 0xdbf1, 0x5bc3, 0x4dc4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x78ef, 0xf1f3, 0xe8f3, 0x4fc4, 0xe4f3, 0x50c4, 0x001a, 0x001a, 0xedf3, 0xe7f3, 0xddf3, 0x4ec4, 0xeaf3, 0xe5f3, 0xe6f3, 0x001a, 0xd8f3, 0xdff3, 0xeef3, 0x001a, 0xebf3, 0x001a, 0xe3f3, 0x001a, 0xeff3, 0xdef3, 0xd9f3, 0xecf3, 0x001a, 0xdbf3, 0xe9f3, 0xe0f3, 0xf0f3, 0xdcf3, 0x4cc4, 0xdaf3, 0xe1f3, 0xe2f3, 0x001a, 0x001a, 0x001a, 0x7df5, 0x001a, 0x7bf5, 0x001a, 0xa2f5, 0x001a, 0xaef5, 0xa5f5, 0x7cf5, 0x78f5, 0xa7f5, 0x7ef5, 0xa3f5, 0x7af5, 0xaaf5, 0x77f5, 0xa1f5, 0xa6f5, 0xa8f5, 0xabf5, 0x79f5, 0x001a, 0xaff5, 0xb0f5, 0xa9f5, 0xadf5, 0xa4f5, 0x001a, 0xc1f6, 0xc4f6, 0x001a, 0x61c5, 0x001a, 0xc3f6, 0xc8f6, 0xc6f6, 0x62c5, 0xbdf6, 0xb3f6, 0xb2f6, 0x64c5, 0xbff6, 0xc0f6, 0xbcf6, 0xb4f6, 0x001a, 0xb9f6, 0xacf5, 0x001a, 0xb5f6, 0x63c5, 0xbbf6, 0x001a, 0xbaf6, 0x001a, 0xb6f6, 0xc2f6, 0x001a, 0xb7f6, 0xbbf7, 0xc5f6, 0xc7f6, 0xbef6, 0xb8f6, 0xbcf7, 0xbef7, 0xb8f7, 0xc2c5, 0x001a, 0xc5f7, 0xc3f7, 0xc3c5, 0xc2f7, 0xc1f7, 0xbaf7, 0xb7f7, 0xbdf7, 0xc6f7, 0xb9f7, 0xbff7, 0x001a, 0x69f8, 0x6ef8, 0x64f8, 0x67f8, 0xeec5, 0x6bf8, 0x001a, 0x72f8, 0xc0f7, 0x001a, 0x65f8, 0x6ff8, 0x73f8, 0x6af8, 0x63f8, 0x6df8, 0x001a, 0x6cf8, 0x71f8, 0x70f8, 0xc4f7, 0x68f8, 0x62f8, 0x66f8, 0x4ec6, 0x4fc6, 0x61f8, 0x001a, 0xe6f8, 0xddf8, 0xe5f8, 0xe2f8, 0xe3f8, 0xdcf8, 0xdff8, 0xe7f8, 0xe1f8, 0xe0f8, 0xdef8, 0x001a, 0xe4f8, 0x001a, 0x5df9, 0x001a, 0x5ef9, 0x001a, 0x60f9, 0x5ff9, 0x62f9, 0x61f9, 0x7cf9, 0x7bf9, 0xb7f9, 0x001a, 0xb8f9, 0x001a, 0xc5f9, 0x78c6, 0x7cc6, 0x001a, 0xcff9, 0x7dc6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfb3, 0x001a, 0x001a, 0x001a, 0xd0c4, 0xc9f6, 0x001a, 0x50c6, 0x51c6, 0x001a, 0xc0b3, 0xeee0, 0x001a, 0xa8b9, 0xf0e8, 0x001a, 0x001a, 0xb0ec, 0xb1ec, 0xafec, 0xabef, 0xaaef, 0x47c2, 0xdff1, 0xacef, 0xdef1, 0x001a, 0x001a, 0xf3f3, 0x51c4, 0x53c4, 0xf2f3, 0x001a, 0x001a, 0x52c4, 0x001a, 0xb1f5, 0xb3f5, 0xb2f5, 0xcaf6, 0x65c5, 0x001a, 0xefc5, 0xe8f8, 0x63f9, 0x001a, 0x001a, 0xd2f9, 0xc1b3, 0x001a, 0xe5e4, 0x001a, 0xa2be, 0x001a, 0x001a, 0x001a, 0xb3ec, 0xb2ec, 0x001a, 0xadef, 0x001a, 0x001a, 0x001a, 0x54c4, 0xd1c4, 0xc7f7, 0xcbf9, 0x001a, 0x001a, 0x001a, 0xc2b3, 0xf2bb, 0x001a, 0xa3be, 0x001a, 0xf4f3, 0x001a, 0x74f8, 0xc0b6, 0x001a, 0x001a, 0x001a, 0x001a, 0xaeef, 0x001a, 0x001a, 0x001a, 0x64c6, 0xc1b6, 0xa4be, 0x48c2, 0x75f8, 0xc2b6, 0x001a, 0xf1e8, 0x72c0, 0xb4ec, 0xb5ec, 0x001a, 0x71c0, 0x001a, 0xafef, 0x4cc2, 0x4ac2, 0x4bc2, 0x49c2, 0xe0f1, 0x5cc3, 0x001a, 0x001a, 0x001a, 0xb5f5, 0xb4f5, 0xb7f5, 0xb6f5, 0xd2c4, 0x001a, 0x001a, 0xcbf6, 0x001a, 0xcdf6, 0xccf6, 0x66c5, 0xc8f7, 0x001a, 0x76f8, 0x77f8, 0xf0c5, 0x64f9, 0x7df9, 0x75c6, 0x001a, 0xb0dc, 0xb6ec, 0xb0ef, 0xf5f3, 0xefe0, 0x001a, 0xb1ef, 0xe2f1, 0xe1f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x78f8, 0x52c6, 0x001a, 0x65f9, 0x7ef9, 0x001a, 0x001a, 0x001a, 0xa9b9, 0xf2e8, 0xf3e8, 0x001a, 0xb7ec, 0xaab9, 0x001a, 0x5dc3, 0xe3f1, 0x001a, 0xcff6, 0x67c5, 0xd0f6, 0xcef6, 0x79f8, 0x001a, 0xe9f8, 0x001a, 0xabb9, 0x001a, 0xb4ef, 0xb3ef, 0xb2ef, 0xe4f1, 0x001a, 0x001a, 0xe8f1, 0xe7f1, 0xe6f1, 0xe5f1, 0x5ec3, 0xf6f3, 0xb9f5, 0xd3c4, 0xb8f5, 0xd1f6, 0xcbf7, 0xcaf7, 0xc4c5, 0xc9f7, 0x7cf8, 0x7bf8, 0x7af8, 0x001a, 0x001a, 0xf3bb, 0x001a, 0xb8ec, 0x4dc2, 0x001a, 0xf7f3, 0xf8f3, 0xccf7, 0x7df8, 0x001a, 0x001a, 0xeaf8, 0x66f9, 0xb9f9, 0xd4f9, 0xf4bb, 0x4ec2, 0xe9f1, 0xf9f3, 0xd2f6, 0x7ef8, 0x001a, 0x001a, 0xa6be, 0x001a, 0xb5ef, 0xeaf1, 0xfaf3, 0xfbf3, 0xfcf3, 0xbef5, 0x001a, 0xbaf5, 0x68c5, 0xbdf5, 0xbcf5, 0xd4c4, 0xbbf5, 0xd6c4, 0x001a, 0xd5c4, 0xd4f6, 0xd3f6, 0x69c5, 0x6ac5, 0x001a, 0x001a, 0xc6c5, 0xcdf7, 0xc5c5, 0x001a, 0xa3f8, 0xa4f8, 0xa2f8, 0xa1f8, 0x54c6, 0x001a, 0xebf8, 0xecf8, 0xedf8, 0x53c6, 0x67f9, 0x6af9, 0x69f9, 0x68f9, 0x001a, 0x001a, 0xd3f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73c0, 0x001a, 0x001a, 0x65c3, 0xbff5, 0xd5f6, 0x001a, 0xc7c5, 0xcef7, 0x001a, 0x001a, 0xd5f9, 0x001a, 0x001a, 0x001a, 0x74c0, 0x001a, 0x001a, 0x001a, 0xb6ef, 0x001a, 0xcff7, 0x001a, 0xa1f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfa00[ 64 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ac9, 0xfcdd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfe00[ 512 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4aa1, 0x57a1, 0x001a, 0x59a1, 0x5ba1, 0x5fa1, 0x60a1, 0x63a1, 0x64a1, 0x67a1, 0x68a1, 0x6ba1, 0x6ca1, 0x6fa1, 0x70a1, 0x73a1, 0x74a1, 0x77a1, 0x78a1, 0x7ba1, 0x7ca1, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6a1, 0xc7a1, 0xcaa1, 0xcba1, 0xc8a1, 0xc9a1, 0x5ca1, 0x4da1, 0x4ea1, 0x4fa1, 0x001a, 0x51a1, 0x52a1, 0x53a1, 0x54a1, 0x001a, 0x7da1, 0x7ea1, 0xa1a1, 0xa2a1, 0xa3a1, 0xa4a1, 0xcca1, 0xcda1, 0xcea1, 0xdea1, 0xdfa1, 0xe0a1, 0xe1a1, 0xe2a1, 0x001a, 0x42a2, 0x4ca2, 0x4da2, 0x4ea2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x49a1, 0x001a, 0xada1, 0x43a2, 0x48a2, 0xaea1, 0x001a, 0x5da1, 0x5ea1, 0xafa1, 0xcfa1, 0x41a1, 0xd0a1, 0x44a1, 0xfea1, 0xafa2, 0xb0a2, 0xb1a2, 0xb2a2, 0xb3a2, 0xb4a2, 0xb5a2, 0xb6a2, 0xb7a2, 0xb8a2, 0x47a1, 0x46a1, 0xd5a1, 0xd7a1, 0xd6a1, 0x48a1, 0x49a2, 0xcfa2, 0xd0a2, 0xd1a2, 0xd2a2, 0xd3a2, 0xd4a2, 0xd5a2, 0xd6a2, 0xd7a2, 0xd8a2, 0xd9a2, 0xdaa2, 0xdba2, 0xdca2, 0xdda2, 0xdea2, 0xdfa2, 0xe0a2, 0xe1a2, 0xe2a2, 0xe3a2, 0xe4a2, 0xe5a2, 0xe6a2, 0xe7a2, 0xe8a2, 0x001a, 0x40a2, 0x001a, 0x001a, 0xc4a1, 0x001a, 0xe9a2, 0xeaa2, 0xeba2, 0xeca2, 0xeda2, 0xeea2, 0xefa2, 0xf0a2, 0xf1a2, 0xf2a2, 0xf3a2, 0xf4a2, 0xf5a2, 0xf6a2, 0xf7a2, 0xf8a2, 0xf9a2, 0xfaa2, 0xfba2, 0xfca2, 0xfda2, 0xfea2, 0x40a3, 0x41a3, 0x42a3, 0x43a3, 0x61a1, 0x55a1, 0x62a1, 0xe3a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x46a2, 0x47a2, 0x001a, 0xc3a1, 0x001a, 0x44a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; /* Determines the size of a byte stream character from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_950_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_950_unicode_character_size_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream character size.", function ); return( -1 ); } if( unicode_character < 0x80 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x02c0 ) && ( unicode_character < 0x0400 ) ) { unicode_character -= 0x02c0; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x02c0[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2300 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x2500 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2500; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x2500[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fc0 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xfa00 ) && ( unicode_character < 0xfa40 ) ) { unicode_character -= 0xfa00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfa00[ unicode_character ]; } else if( ( unicode_character >= 0xfe00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xfe00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfe00[ unicode_character ]; } byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_character_size += 2; } else { *byte_stream_character_size += 1; } return( 1 ); } /* Copies a Unicode character from a byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_950_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_950_copy_from_byte_stream"; uint8_t additional_character = 0; uint8_t byte_stream_character = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } byte_stream_character = byte_stream[ *byte_stream_index ]; if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else if( ( *byte_stream_index + 1 ) <= byte_stream_size ) { *byte_stream_index += 1; additional_character = byte_stream[ *byte_stream_index ]; if( ( byte_stream_character >= 0xa1 ) && ( byte_stream_character <= 0xa2 ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xa1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa140[ additional_character ]; break; case 0xa2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa240[ additional_character ]; break; } } else if( ( additional_character >= 0xa1 ) && ( additional_character < 0xff ) ) { additional_character -= 0xa1; switch( byte_stream_character ) { case 0xa1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa1a1[ additional_character ]; break; case 0xa2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa2a1[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa3 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa340[ additional_character ]; } else if( ( additional_character >= 0xa1 ) && ( additional_character < 0xc0 ) ) { additional_character -= 0xa1; *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa3a1[ additional_character ]; } else if( additional_character == 0xe1 ) { *unicode_character = 0x20ac; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xa4 ) && ( byte_stream_character <= 0xc5 ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xa4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa440[ additional_character ]; break; case 0xa5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa540[ additional_character ]; break; case 0xa6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa640[ additional_character ]; break; case 0xa7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa740[ additional_character ]; break; case 0xa8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa840[ additional_character ]; break; case 0xa9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa940[ additional_character ]; break; case 0xaa: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaa40[ additional_character ]; break; case 0xab: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xab40[ additional_character ]; break; case 0xac: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xac40[ additional_character ]; break; case 0xad: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xad40[ additional_character ]; break; case 0xae: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xae40[ additional_character ]; break; case 0xaf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaf40[ additional_character ]; break; case 0xb0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb040[ additional_character ]; break; case 0xb1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb140[ additional_character ]; break; case 0xb2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb240[ additional_character ]; break; case 0xb3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb340[ additional_character ]; break; case 0xb4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb440[ additional_character ]; break; case 0xb5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb540[ additional_character ]; break; case 0xb6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb640[ additional_character ]; break; case 0xb7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb740[ additional_character ]; break; case 0xb8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb840[ additional_character ]; break; case 0xb9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb940[ additional_character ]; break; case 0xba: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xba40[ additional_character ]; break; case 0xbb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbb40[ additional_character ]; break; case 0xbc: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbc40[ additional_character ]; break; case 0xbd: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbd40[ additional_character ]; break; case 0xbe: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbe40[ additional_character ]; break; case 0xbf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbf40[ additional_character ]; break; case 0xc0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc040[ additional_character ]; break; case 0xc1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc140[ additional_character ]; break; case 0xc2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc240[ additional_character ]; break; case 0xc3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc340[ additional_character ]; break; case 0xc4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc440[ additional_character ]; break; case 0xc5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc540[ additional_character ]; break; } } else if( ( additional_character >= 0xa1 ) && ( additional_character < 0xff ) ) { additional_character -= 0xa1; switch( byte_stream_character ) { case 0xa4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa4a1[ additional_character ]; break; case 0xa5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa5a1[ additional_character ]; break; case 0xa6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa6a1[ additional_character ]; break; case 0xa7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa7a1[ additional_character ]; break; case 0xa8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa8a1[ additional_character ]; break; case 0xa9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa9a1[ additional_character ]; break; case 0xaa: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaaa1[ additional_character ]; break; case 0xab: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaba1[ additional_character ]; break; case 0xac: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaca1[ additional_character ]; break; case 0xad: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xada1[ additional_character ]; break; case 0xae: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaea1[ additional_character ]; break; case 0xaf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xafa1[ additional_character ]; break; case 0xb0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb0a1[ additional_character ]; break; case 0xb1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb1a1[ additional_character ]; break; case 0xb2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb2a1[ additional_character ]; break; case 0xb3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb3a1[ additional_character ]; break; case 0xb4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb4a1[ additional_character ]; break; case 0xb5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb5a1[ additional_character ]; break; case 0xb6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb6a1[ additional_character ]; break; case 0xb7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb7a1[ additional_character ]; break; case 0xb8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb8a1[ additional_character ]; break; case 0xb9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb9a1[ additional_character ]; break; case 0xba: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbaa1[ additional_character ]; break; case 0xbb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbba1[ additional_character ]; break; case 0xbc: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbca1[ additional_character ]; break; case 0xbd: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbda1[ additional_character ]; break; case 0xbe: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbea1[ additional_character ]; break; case 0xbf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbfa1[ additional_character ]; break; case 0xc0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc0a1[ additional_character ]; break; case 0xc1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc1a1[ additional_character ]; break; case 0xc2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc2a1[ additional_character ]; break; case 0xc3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc3a1[ additional_character ]; break; case 0xc4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc4a1[ additional_character ]; break; case 0xc5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc5a1[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xc6 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc640[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xc9 ) && ( byte_stream_character <= 0xf9 ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xc9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc940[ additional_character ]; break; case 0xca: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xca40[ additional_character ]; break; case 0xcb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcb40[ additional_character ]; break; case 0xcc: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcc40[ additional_character ]; break; case 0xcd: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcd40[ additional_character ]; break; case 0xce: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xce40[ additional_character ]; break; case 0xcf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcf40[ additional_character ]; break; case 0xd0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd040[ additional_character ]; break; case 0xd1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd140[ additional_character ]; break; case 0xd2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd240[ additional_character ]; break; case 0xd3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd340[ additional_character ]; break; case 0xd4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd440[ additional_character ]; break; case 0xd5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd540[ additional_character ]; break; case 0xd6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd640[ additional_character ]; break; case 0xd7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd740[ additional_character ]; break; case 0xd8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd840[ additional_character ]; break; case 0xd9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd940[ additional_character ]; break; case 0xda: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xda40[ additional_character ]; break; case 0xdb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdb40[ additional_character ]; break; case 0xdc: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdc40[ additional_character ]; break; case 0xdd: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdd40[ additional_character ]; break; case 0xde: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xde40[ additional_character ]; break; case 0xdf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdf40[ additional_character ]; break; case 0xe0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe040[ additional_character ]; break; case 0xe1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe140[ additional_character ]; break; case 0xe2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe240[ additional_character ]; break; case 0xe3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe340[ additional_character ]; break; case 0xe4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe440[ additional_character ]; break; case 0xe5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe540[ additional_character ]; break; case 0xe6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe640[ additional_character ]; break; case 0xe7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe740[ additional_character ]; break; case 0xe8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe840[ additional_character ]; break; case 0xe9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe940[ additional_character ]; break; case 0xea: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xea40[ additional_character ]; break; case 0xeb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeb40[ additional_character ]; break; case 0xec: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xec40[ additional_character ]; break; case 0xed: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xed40[ additional_character ]; break; case 0xee: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xee40[ additional_character ]; break; case 0xef: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xef40[ additional_character ]; break; case 0xf0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf040[ additional_character ]; break; case 0xf1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf140[ additional_character ]; break; case 0xf2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf240[ additional_character ]; break; case 0xf3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf340[ additional_character ]; break; case 0xf4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf440[ additional_character ]; break; case 0xf5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf540[ additional_character ]; break; case 0xf6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf640[ additional_character ]; break; case 0xf7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf740[ additional_character ]; break; case 0xf8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf840[ additional_character ]; break; case 0xf9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf940[ additional_character ]; break; } } else if( ( additional_character >= 0xa1 ) && ( additional_character < 0xff ) ) { additional_character -= 0xa1; switch( byte_stream_character ) { case 0xc9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc9a1[ additional_character ]; break; case 0xca: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcaa1[ additional_character ]; break; case 0xcb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcba1[ additional_character ]; break; case 0xcc: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcca1[ additional_character ]; break; case 0xcd: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcda1[ additional_character ]; break; case 0xce: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcea1[ additional_character ]; break; case 0xcf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcfa1[ additional_character ]; break; case 0xd0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd0a1[ additional_character ]; break; case 0xd1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd1a1[ additional_character ]; break; case 0xd2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd2a1[ additional_character ]; break; case 0xd3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd3a1[ additional_character ]; break; case 0xd4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd4a1[ additional_character ]; break; case 0xd5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd5a1[ additional_character ]; break; case 0xd6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd6a1[ additional_character ]; break; case 0xd7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd7a1[ additional_character ]; break; case 0xd8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd8a1[ additional_character ]; break; case 0xd9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd9a1[ additional_character ]; break; case 0xda: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdaa1[ additional_character ]; break; case 0xdb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdba1[ additional_character ]; break; case 0xdc: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdca1[ additional_character ]; break; case 0xdd: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdda1[ additional_character ]; break; case 0xde: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdea1[ additional_character ]; break; case 0xdf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdfa1[ additional_character ]; break; case 0xe0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe0a1[ additional_character ]; break; case 0xe1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe1a1[ additional_character ]; break; case 0xe2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe2a1[ additional_character ]; break; case 0xe3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe3a1[ additional_character ]; break; case 0xe4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe4a1[ additional_character ]; break; case 0xe5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe5a1[ additional_character ]; break; case 0xe6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe6a1[ additional_character ]; break; case 0xe7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe7a1[ additional_character ]; break; case 0xe8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe8a1[ additional_character ]; break; case 0xe9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe9a1[ additional_character ]; break; case 0xea: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeaa1[ additional_character ]; break; case 0xeb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeba1[ additional_character ]; break; case 0xec: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeca1[ additional_character ]; break; case 0xed: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeda1[ additional_character ]; break; case 0xee: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeea1[ additional_character ]; break; case 0xef: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xefa1[ additional_character ]; break; case 0xf0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf0a1[ additional_character ]; break; case 0xf1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf1a1[ additional_character ]; break; case 0xf2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf2a1[ additional_character ]; break; case 0xf3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf3a1[ additional_character ]; break; case 0xf4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf4a1[ additional_character ]; break; case 0xf5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf5a1[ additional_character ]; break; case 0xf6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf6a1[ additional_character ]; break; case 0xf7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf7a1[ additional_character ]; break; case 0xf8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf8a1[ additional_character ]; break; case 0xf9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf9a1[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } *byte_stream_index += 1; return( 1 ); } /* Copies a Unicode character to a byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_950_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_950_copy_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( unicode_character < 0x80 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x02c0 ) && ( unicode_character < 0x0400 ) ) { unicode_character -= 0x02c0; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x02c0[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2300 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x2500 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2500; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x2500[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fc0 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xfa00 ) && ( unicode_character < 0xfa40 ) ) { unicode_character -= 0xfa00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfa00[ unicode_character ]; } else if( ( unicode_character >= 0xfe00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xfe00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfe00[ unicode_character ]; } byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_index += 1; byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); } *byte_stream_index += 1; return( 1 ); } libevt-20170120/libuna/libuna_utf8_string.h0000664000175000017500000002141013040331677022570 0ustar00lordyestalordyesta00000000000000/* * UTF-8 string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF8_STRING_H ) #define _LIBUNA_UTF8_STRING_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_utf8_string_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, int codepage, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_byte_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_byte_stream is implemented by * libuna_byte_stream_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_byte_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_byte_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_utf7_stream( const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_utf7_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_utf7_stream is implemented by * libuna_utf7_stream_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_utf7_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_utf7_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_utf8_stream( const uint8_t *utf8_stream, size_t utf8_stream_size, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_utf8_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_utf8_stream is implemented by * libuna_utf8_stream_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_utf8_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_utf8_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_utf16( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_utf16 is implemented by * libuna_utf16_string_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_utf16( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_utf16( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_utf16_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_utf16_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_utf16_stream is implemented by * libuna_utf16_stream_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_utf16_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_utf16_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_utf32( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_utf32 is implemented by * libuna_utf32_string_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_utf32( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_utf32( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_utf32_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_utf32_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_utf32_stream is implemented by * libuna_utf32_stream_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_utf32_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_utf32_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_UTF8_STRING_H ) */ libevt-20170120/libuna/libuna_codepage_windows_936.c0000664000175000017500000151071713040331677024247 0ustar00lordyestalordyesta00000000000000/* * Windows 936 codepage (Chinese Simplified) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_936.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for Windows 936 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8140[ 192 ] = { 0x4e02, 0x4e04, 0x4e05, 0x4e06, 0x4e0f, 0x4e12, 0x4e17, 0x4e1f, 0x4e20, 0x4e21, 0x4e23, 0x4e26, 0x4e29, 0x4e2e, 0x4e2f, 0x4e31, 0x4e33, 0x4e35, 0x4e37, 0x4e3c, 0x4e40, 0x4e41, 0x4e42, 0x4e44, 0x4e46, 0x4e4a, 0x4e51, 0x4e55, 0x4e57, 0x4e5a, 0x4e5b, 0x4e62, 0x4e63, 0x4e64, 0x4e65, 0x4e67, 0x4e68, 0x4e6a, 0x4e6b, 0x4e6c, 0x4e6d, 0x4e6e, 0x4e6f, 0x4e72, 0x4e74, 0x4e75, 0x4e76, 0x4e77, 0x4e78, 0x4e79, 0x4e7a, 0x4e7b, 0x4e7c, 0x4e7d, 0x4e7f, 0x4e80, 0x4e81, 0x4e82, 0x4e83, 0x4e84, 0x4e85, 0x4e87, 0x4e8a, 0xfffd, 0x4e90, 0x4e96, 0x4e97, 0x4e99, 0x4e9c, 0x4e9d, 0x4e9e, 0x4ea3, 0x4eaa, 0x4eaf, 0x4eb0, 0x4eb1, 0x4eb4, 0x4eb6, 0x4eb7, 0x4eb8, 0x4eb9, 0x4ebc, 0x4ebd, 0x4ebe, 0x4ec8, 0x4ecc, 0x4ecf, 0x4ed0, 0x4ed2, 0x4eda, 0x4edb, 0x4edc, 0x4ee0, 0x4ee2, 0x4ee6, 0x4ee7, 0x4ee9, 0x4eed, 0x4eee, 0x4eef, 0x4ef1, 0x4ef4, 0x4ef8, 0x4ef9, 0x4efa, 0x4efc, 0x4efe, 0x4f00, 0x4f02, 0x4f03, 0x4f04, 0x4f05, 0x4f06, 0x4f07, 0x4f08, 0x4f0b, 0x4f0c, 0x4f12, 0x4f13, 0x4f14, 0x4f15, 0x4f16, 0x4f1c, 0x4f1d, 0x4f21, 0x4f23, 0x4f28, 0x4f29, 0x4f2c, 0x4f2d, 0x4f2e, 0x4f31, 0x4f33, 0x4f35, 0x4f37, 0x4f39, 0x4f3b, 0x4f3e, 0x4f3f, 0x4f40, 0x4f41, 0x4f42, 0x4f44, 0x4f45, 0x4f47, 0x4f48, 0x4f49, 0x4f4a, 0x4f4b, 0x4f4c, 0x4f52, 0x4f54, 0x4f56, 0x4f61, 0x4f62, 0x4f66, 0x4f68, 0x4f6a, 0x4f6b, 0x4f6d, 0x4f6e, 0x4f71, 0x4f72, 0x4f75, 0x4f77, 0x4f78, 0x4f79, 0x4f7a, 0x4f7d, 0x4f80, 0x4f81, 0x4f82, 0x4f85, 0x4f86, 0x4f87, 0x4f8a, 0x4f8c, 0x4f8e, 0x4f90, 0x4f92, 0x4f93, 0x4f95, 0x4f96, 0x4f98, 0x4f99, 0x4f9a, 0x4f9c, 0x4f9e, 0x4f9f, 0x4fa1, 0x4fa2, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8240[ 192 ] = { 0x4fa4, 0x4fab, 0x4fad, 0x4fb0, 0x4fb1, 0x4fb2, 0x4fb3, 0x4fb4, 0x4fb6, 0x4fb7, 0x4fb8, 0x4fb9, 0x4fba, 0x4fbb, 0x4fbc, 0x4fbd, 0x4fbe, 0x4fc0, 0x4fc1, 0x4fc2, 0x4fc6, 0x4fc7, 0x4fc8, 0x4fc9, 0x4fcb, 0x4fcc, 0x4fcd, 0x4fd2, 0x4fd3, 0x4fd4, 0x4fd5, 0x4fd6, 0x4fd9, 0x4fdb, 0x4fe0, 0x4fe2, 0x4fe4, 0x4fe5, 0x4fe7, 0x4feb, 0x4fec, 0x4ff0, 0x4ff2, 0x4ff4, 0x4ff5, 0x4ff6, 0x4ff7, 0x4ff9, 0x4ffb, 0x4ffc, 0x4ffd, 0x4fff, 0x5000, 0x5001, 0x5002, 0x5003, 0x5004, 0x5005, 0x5006, 0x5007, 0x5008, 0x5009, 0x500a, 0xfffd, 0x500b, 0x500e, 0x5010, 0x5011, 0x5013, 0x5015, 0x5016, 0x5017, 0x501b, 0x501d, 0x501e, 0x5020, 0x5022, 0x5023, 0x5024, 0x5027, 0x502b, 0x502f, 0x5030, 0x5031, 0x5032, 0x5033, 0x5034, 0x5035, 0x5036, 0x5037, 0x5038, 0x5039, 0x503b, 0x503d, 0x503f, 0x5040, 0x5041, 0x5042, 0x5044, 0x5045, 0x5046, 0x5049, 0x504a, 0x504b, 0x504d, 0x5050, 0x5051, 0x5052, 0x5053, 0x5054, 0x5056, 0x5057, 0x5058, 0x5059, 0x505b, 0x505d, 0x505e, 0x505f, 0x5060, 0x5061, 0x5062, 0x5063, 0x5064, 0x5066, 0x5067, 0x5068, 0x5069, 0x506a, 0x506b, 0x506d, 0x506e, 0x506f, 0x5070, 0x5071, 0x5072, 0x5073, 0x5074, 0x5075, 0x5078, 0x5079, 0x507a, 0x507c, 0x507d, 0x5081, 0x5082, 0x5083, 0x5084, 0x5086, 0x5087, 0x5089, 0x508a, 0x508b, 0x508c, 0x508e, 0x508f, 0x5090, 0x5091, 0x5092, 0x5093, 0x5094, 0x5095, 0x5096, 0x5097, 0x5098, 0x5099, 0x509a, 0x509b, 0x509c, 0x509d, 0x509e, 0x509f, 0x50a0, 0x50a1, 0x50a2, 0x50a4, 0x50a6, 0x50aa, 0x50ab, 0x50ad, 0x50ae, 0x50af, 0x50b0, 0x50b1, 0x50b3, 0x50b4, 0x50b5, 0x50b6, 0x50b7, 0x50b8, 0x50b9, 0x50bc, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8340[ 192 ] = { 0x50bd, 0x50be, 0x50bf, 0x50c0, 0x50c1, 0x50c2, 0x50c3, 0x50c4, 0x50c5, 0x50c6, 0x50c7, 0x50c8, 0x50c9, 0x50ca, 0x50cb, 0x50cc, 0x50cd, 0x50ce, 0x50d0, 0x50d1, 0x50d2, 0x50d3, 0x50d4, 0x50d5, 0x50d7, 0x50d8, 0x50d9, 0x50db, 0x50dc, 0x50dd, 0x50de, 0x50df, 0x50e0, 0x50e1, 0x50e2, 0x50e3, 0x50e4, 0x50e5, 0x50e8, 0x50e9, 0x50ea, 0x50eb, 0x50ef, 0x50f0, 0x50f1, 0x50f2, 0x50f4, 0x50f6, 0x50f7, 0x50f8, 0x50f9, 0x50fa, 0x50fc, 0x50fd, 0x50fe, 0x50ff, 0x5100, 0x5101, 0x5102, 0x5103, 0x5104, 0x5105, 0x5108, 0xfffd, 0x5109, 0x510a, 0x510c, 0x510d, 0x510e, 0x510f, 0x5110, 0x5111, 0x5113, 0x5114, 0x5115, 0x5116, 0x5117, 0x5118, 0x5119, 0x511a, 0x511b, 0x511c, 0x511d, 0x511e, 0x511f, 0x5120, 0x5122, 0x5123, 0x5124, 0x5125, 0x5126, 0x5127, 0x5128, 0x5129, 0x512a, 0x512b, 0x512c, 0x512d, 0x512e, 0x512f, 0x5130, 0x5131, 0x5132, 0x5133, 0x5134, 0x5135, 0x5136, 0x5137, 0x5138, 0x5139, 0x513a, 0x513b, 0x513c, 0x513d, 0x513e, 0x5142, 0x5147, 0x514a, 0x514c, 0x514e, 0x514f, 0x5150, 0x5152, 0x5153, 0x5157, 0x5158, 0x5159, 0x515b, 0x515d, 0x515e, 0x515f, 0x5160, 0x5161, 0x5163, 0x5164, 0x5166, 0x5167, 0x5169, 0x516a, 0x516f, 0x5172, 0x517a, 0x517e, 0x517f, 0x5183, 0x5184, 0x5186, 0x5187, 0x518a, 0x518b, 0x518e, 0x518f, 0x5190, 0x5191, 0x5193, 0x5194, 0x5198, 0x519a, 0x519d, 0x519e, 0x519f, 0x51a1, 0x51a3, 0x51a6, 0x51a7, 0x51a8, 0x51a9, 0x51aa, 0x51ad, 0x51ae, 0x51b4, 0x51b8, 0x51b9, 0x51ba, 0x51be, 0x51bf, 0x51c1, 0x51c2, 0x51c3, 0x51c5, 0x51c8, 0x51ca, 0x51cd, 0x51ce, 0x51d0, 0x51d2, 0x51d3, 0x51d4, 0x51d5, 0x51d6, 0x51d7, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8440[ 192 ] = { 0x51d8, 0x51d9, 0x51da, 0x51dc, 0x51de, 0x51df, 0x51e2, 0x51e3, 0x51e5, 0x51e6, 0x51e7, 0x51e8, 0x51e9, 0x51ea, 0x51ec, 0x51ee, 0x51f1, 0x51f2, 0x51f4, 0x51f7, 0x51fe, 0x5204, 0x5205, 0x5209, 0x520b, 0x520c, 0x520f, 0x5210, 0x5213, 0x5214, 0x5215, 0x521c, 0x521e, 0x521f, 0x5221, 0x5222, 0x5223, 0x5225, 0x5226, 0x5227, 0x522a, 0x522c, 0x522f, 0x5231, 0x5232, 0x5234, 0x5235, 0x523c, 0x523e, 0x5244, 0x5245, 0x5246, 0x5247, 0x5248, 0x5249, 0x524b, 0x524e, 0x524f, 0x5252, 0x5253, 0x5255, 0x5257, 0x5258, 0xfffd, 0x5259, 0x525a, 0x525b, 0x525d, 0x525f, 0x5260, 0x5262, 0x5263, 0x5264, 0x5266, 0x5268, 0x526b, 0x526c, 0x526d, 0x526e, 0x5270, 0x5271, 0x5273, 0x5274, 0x5275, 0x5276, 0x5277, 0x5278, 0x5279, 0x527a, 0x527b, 0x527c, 0x527e, 0x5280, 0x5283, 0x5284, 0x5285, 0x5286, 0x5287, 0x5289, 0x528a, 0x528b, 0x528c, 0x528d, 0x528e, 0x528f, 0x5291, 0x5292, 0x5294, 0x5295, 0x5296, 0x5297, 0x5298, 0x5299, 0x529a, 0x529c, 0x52a4, 0x52a5, 0x52a6, 0x52a7, 0x52ae, 0x52af, 0x52b0, 0x52b4, 0x52b5, 0x52b6, 0x52b7, 0x52b8, 0x52b9, 0x52ba, 0x52bb, 0x52bc, 0x52bd, 0x52c0, 0x52c1, 0x52c2, 0x52c4, 0x52c5, 0x52c6, 0x52c8, 0x52ca, 0x52cc, 0x52cd, 0x52ce, 0x52cf, 0x52d1, 0x52d3, 0x52d4, 0x52d5, 0x52d7, 0x52d9, 0x52da, 0x52db, 0x52dc, 0x52dd, 0x52de, 0x52e0, 0x52e1, 0x52e2, 0x52e3, 0x52e5, 0x52e6, 0x52e7, 0x52e8, 0x52e9, 0x52ea, 0x52eb, 0x52ec, 0x52ed, 0x52ee, 0x52ef, 0x52f1, 0x52f2, 0x52f3, 0x52f4, 0x52f5, 0x52f6, 0x52f7, 0x52f8, 0x52fb, 0x52fc, 0x52fd, 0x5301, 0x5302, 0x5303, 0x5304, 0x5307, 0x5309, 0x530a, 0x530b, 0x530c, 0x530e, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8540[ 192 ] = { 0x5311, 0x5312, 0x5313, 0x5314, 0x5318, 0x531b, 0x531c, 0x531e, 0x531f, 0x5322, 0x5324, 0x5325, 0x5327, 0x5328, 0x5329, 0x532b, 0x532c, 0x532d, 0x532f, 0x5330, 0x5331, 0x5332, 0x5333, 0x5334, 0x5335, 0x5336, 0x5337, 0x5338, 0x533c, 0x533d, 0x5340, 0x5342, 0x5344, 0x5346, 0x534b, 0x534c, 0x534d, 0x5350, 0x5354, 0x5358, 0x5359, 0x535b, 0x535d, 0x5365, 0x5368, 0x536a, 0x536c, 0x536d, 0x5372, 0x5376, 0x5379, 0x537b, 0x537c, 0x537d, 0x537e, 0x5380, 0x5381, 0x5383, 0x5387, 0x5388, 0x538a, 0x538e, 0x538f, 0xfffd, 0x5390, 0x5391, 0x5392, 0x5393, 0x5394, 0x5396, 0x5397, 0x5399, 0x539b, 0x539c, 0x539e, 0x53a0, 0x53a1, 0x53a4, 0x53a7, 0x53aa, 0x53ab, 0x53ac, 0x53ad, 0x53af, 0x53b0, 0x53b1, 0x53b2, 0x53b3, 0x53b4, 0x53b5, 0x53b7, 0x53b8, 0x53b9, 0x53ba, 0x53bc, 0x53bd, 0x53be, 0x53c0, 0x53c3, 0x53c4, 0x53c5, 0x53c6, 0x53c7, 0x53ce, 0x53cf, 0x53d0, 0x53d2, 0x53d3, 0x53d5, 0x53da, 0x53dc, 0x53dd, 0x53de, 0x53e1, 0x53e2, 0x53e7, 0x53f4, 0x53fa, 0x53fe, 0x53ff, 0x5400, 0x5402, 0x5405, 0x5407, 0x540b, 0x5414, 0x5418, 0x5419, 0x541a, 0x541c, 0x5422, 0x5424, 0x5425, 0x542a, 0x5430, 0x5433, 0x5436, 0x5437, 0x543a, 0x543d, 0x543f, 0x5441, 0x5442, 0x5444, 0x5445, 0x5447, 0x5449, 0x544c, 0x544d, 0x544e, 0x544f, 0x5451, 0x545a, 0x545d, 0x545e, 0x545f, 0x5460, 0x5461, 0x5463, 0x5465, 0x5467, 0x5469, 0x546a, 0x546b, 0x546c, 0x546d, 0x546e, 0x546f, 0x5470, 0x5474, 0x5479, 0x547a, 0x547e, 0x547f, 0x5481, 0x5483, 0x5485, 0x5487, 0x5488, 0x5489, 0x548a, 0x548d, 0x5491, 0x5493, 0x5497, 0x5498, 0x549c, 0x549e, 0x549f, 0x54a0, 0x54a1, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8640[ 192 ] = { 0x54a2, 0x54a5, 0x54ae, 0x54b0, 0x54b2, 0x54b5, 0x54b6, 0x54b7, 0x54b9, 0x54ba, 0x54bc, 0x54be, 0x54c3, 0x54c5, 0x54ca, 0x54cb, 0x54d6, 0x54d8, 0x54db, 0x54e0, 0x54e1, 0x54e2, 0x54e3, 0x54e4, 0x54eb, 0x54ec, 0x54ef, 0x54f0, 0x54f1, 0x54f4, 0x54f5, 0x54f6, 0x54f7, 0x54f8, 0x54f9, 0x54fb, 0x54fe, 0x5500, 0x5502, 0x5503, 0x5504, 0x5505, 0x5508, 0x550a, 0x550b, 0x550c, 0x550d, 0x550e, 0x5512, 0x5513, 0x5515, 0x5516, 0x5517, 0x5518, 0x5519, 0x551a, 0x551c, 0x551d, 0x551e, 0x551f, 0x5521, 0x5525, 0x5526, 0xfffd, 0x5528, 0x5529, 0x552b, 0x552d, 0x5532, 0x5534, 0x5535, 0x5536, 0x5538, 0x5539, 0x553a, 0x553b, 0x553d, 0x5540, 0x5542, 0x5545, 0x5547, 0x5548, 0x554b, 0x554c, 0x554d, 0x554e, 0x554f, 0x5551, 0x5552, 0x5553, 0x5554, 0x5557, 0x5558, 0x5559, 0x555a, 0x555b, 0x555d, 0x555e, 0x555f, 0x5560, 0x5562, 0x5563, 0x5568, 0x5569, 0x556b, 0x556f, 0x5570, 0x5571, 0x5572, 0x5573, 0x5574, 0x5579, 0x557a, 0x557d, 0x557f, 0x5585, 0x5586, 0x558c, 0x558d, 0x558e, 0x5590, 0x5592, 0x5593, 0x5595, 0x5596, 0x5597, 0x559a, 0x559b, 0x559e, 0x55a0, 0x55a1, 0x55a2, 0x55a3, 0x55a4, 0x55a5, 0x55a6, 0x55a8, 0x55a9, 0x55aa, 0x55ab, 0x55ac, 0x55ad, 0x55ae, 0x55af, 0x55b0, 0x55b2, 0x55b4, 0x55b6, 0x55b8, 0x55ba, 0x55bc, 0x55bf, 0x55c0, 0x55c1, 0x55c2, 0x55c3, 0x55c6, 0x55c7, 0x55c8, 0x55ca, 0x55cb, 0x55ce, 0x55cf, 0x55d0, 0x55d5, 0x55d7, 0x55d8, 0x55d9, 0x55da, 0x55db, 0x55de, 0x55e0, 0x55e2, 0x55e7, 0x55e9, 0x55ed, 0x55ee, 0x55f0, 0x55f1, 0x55f4, 0x55f6, 0x55f8, 0x55f9, 0x55fa, 0x55fb, 0x55fc, 0x55ff, 0x5602, 0x5603, 0x5604, 0x5605, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8740[ 192 ] = { 0x5606, 0x5607, 0x560a, 0x560b, 0x560d, 0x5610, 0x5611, 0x5612, 0x5613, 0x5614, 0x5615, 0x5616, 0x5617, 0x5619, 0x561a, 0x561c, 0x561d, 0x5620, 0x5621, 0x5622, 0x5625, 0x5626, 0x5628, 0x5629, 0x562a, 0x562b, 0x562e, 0x562f, 0x5630, 0x5633, 0x5635, 0x5637, 0x5638, 0x563a, 0x563c, 0x563d, 0x563e, 0x5640, 0x5641, 0x5642, 0x5643, 0x5644, 0x5645, 0x5646, 0x5647, 0x5648, 0x5649, 0x564a, 0x564b, 0x564f, 0x5650, 0x5651, 0x5652, 0x5653, 0x5655, 0x5656, 0x565a, 0x565b, 0x565d, 0x565e, 0x565f, 0x5660, 0x5661, 0xfffd, 0x5663, 0x5665, 0x5666, 0x5667, 0x566d, 0x566e, 0x566f, 0x5670, 0x5672, 0x5673, 0x5674, 0x5675, 0x5677, 0x5678, 0x5679, 0x567a, 0x567d, 0x567e, 0x567f, 0x5680, 0x5681, 0x5682, 0x5683, 0x5684, 0x5687, 0x5688, 0x5689, 0x568a, 0x568b, 0x568c, 0x568d, 0x5690, 0x5691, 0x5692, 0x5694, 0x5695, 0x5696, 0x5697, 0x5698, 0x5699, 0x569a, 0x569b, 0x569c, 0x569d, 0x569e, 0x569f, 0x56a0, 0x56a1, 0x56a2, 0x56a4, 0x56a5, 0x56a6, 0x56a7, 0x56a8, 0x56a9, 0x56aa, 0x56ab, 0x56ac, 0x56ad, 0x56ae, 0x56b0, 0x56b1, 0x56b2, 0x56b3, 0x56b4, 0x56b5, 0x56b6, 0x56b8, 0x56b9, 0x56ba, 0x56bb, 0x56bd, 0x56be, 0x56bf, 0x56c0, 0x56c1, 0x56c2, 0x56c3, 0x56c4, 0x56c5, 0x56c6, 0x56c7, 0x56c8, 0x56c9, 0x56cb, 0x56cc, 0x56cd, 0x56ce, 0x56cf, 0x56d0, 0x56d1, 0x56d2, 0x56d3, 0x56d5, 0x56d6, 0x56d8, 0x56d9, 0x56dc, 0x56e3, 0x56e5, 0x56e6, 0x56e7, 0x56e8, 0x56e9, 0x56ea, 0x56ec, 0x56ee, 0x56ef, 0x56f2, 0x56f3, 0x56f6, 0x56f7, 0x56f8, 0x56fb, 0x56fc, 0x5700, 0x5701, 0x5702, 0x5705, 0x5707, 0x570b, 0x570c, 0x570d, 0x570e, 0x570f, 0x5710, 0x5711, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8840[ 192 ] = { 0x5712, 0x5713, 0x5714, 0x5715, 0x5716, 0x5717, 0x5718, 0x5719, 0x571a, 0x571b, 0x571d, 0x571e, 0x5720, 0x5721, 0x5722, 0x5724, 0x5725, 0x5726, 0x5727, 0x572b, 0x5731, 0x5732, 0x5734, 0x5735, 0x5736, 0x5737, 0x5738, 0x573c, 0x573d, 0x573f, 0x5741, 0x5743, 0x5744, 0x5745, 0x5746, 0x5748, 0x5749, 0x574b, 0x5752, 0x5753, 0x5754, 0x5755, 0x5756, 0x5758, 0x5759, 0x5762, 0x5763, 0x5765, 0x5767, 0x576c, 0x576e, 0x5770, 0x5771, 0x5772, 0x5774, 0x5775, 0x5778, 0x5779, 0x577a, 0x577d, 0x577e, 0x577f, 0x5780, 0xfffd, 0x5781, 0x5787, 0x5788, 0x5789, 0x578a, 0x578d, 0x578e, 0x578f, 0x5790, 0x5791, 0x5794, 0x5795, 0x5796, 0x5797, 0x5798, 0x5799, 0x579a, 0x579c, 0x579d, 0x579e, 0x579f, 0x57a5, 0x57a8, 0x57aa, 0x57ac, 0x57af, 0x57b0, 0x57b1, 0x57b3, 0x57b5, 0x57b6, 0x57b7, 0x57b9, 0x57ba, 0x57bb, 0x57bc, 0x57bd, 0x57be, 0x57bf, 0x57c0, 0x57c1, 0x57c4, 0x57c5, 0x57c6, 0x57c7, 0x57c8, 0x57c9, 0x57ca, 0x57cc, 0x57cd, 0x57d0, 0x57d1, 0x57d3, 0x57d6, 0x57d7, 0x57db, 0x57dc, 0x57de, 0x57e1, 0x57e2, 0x57e3, 0x57e5, 0x57e6, 0x57e7, 0x57e8, 0x57e9, 0x57ea, 0x57eb, 0x57ec, 0x57ee, 0x57f0, 0x57f1, 0x57f2, 0x57f3, 0x57f5, 0x57f6, 0x57f7, 0x57fb, 0x57fc, 0x57fe, 0x57ff, 0x5801, 0x5803, 0x5804, 0x5805, 0x5808, 0x5809, 0x580a, 0x580c, 0x580e, 0x580f, 0x5810, 0x5812, 0x5813, 0x5814, 0x5816, 0x5817, 0x5818, 0x581a, 0x581b, 0x581c, 0x581d, 0x581f, 0x5822, 0x5823, 0x5825, 0x5826, 0x5827, 0x5828, 0x5829, 0x582b, 0x582c, 0x582d, 0x582e, 0x582f, 0x5831, 0x5832, 0x5833, 0x5834, 0x5836, 0x5837, 0x5838, 0x5839, 0x583a, 0x583b, 0x583c, 0x583d, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8940[ 192 ] = { 0x583e, 0x583f, 0x5840, 0x5841, 0x5842, 0x5843, 0x5845, 0x5846, 0x5847, 0x5848, 0x5849, 0x584a, 0x584b, 0x584e, 0x584f, 0x5850, 0x5852, 0x5853, 0x5855, 0x5856, 0x5857, 0x5859, 0x585a, 0x585b, 0x585c, 0x585d, 0x585f, 0x5860, 0x5861, 0x5862, 0x5863, 0x5864, 0x5866, 0x5867, 0x5868, 0x5869, 0x586a, 0x586d, 0x586e, 0x586f, 0x5870, 0x5871, 0x5872, 0x5873, 0x5874, 0x5875, 0x5876, 0x5877, 0x5878, 0x5879, 0x587a, 0x587b, 0x587c, 0x587d, 0x587f, 0x5882, 0x5884, 0x5886, 0x5887, 0x5888, 0x588a, 0x588b, 0x588c, 0xfffd, 0x588d, 0x588e, 0x588f, 0x5890, 0x5891, 0x5894, 0x5895, 0x5896, 0x5897, 0x5898, 0x589b, 0x589c, 0x589d, 0x58a0, 0x58a1, 0x58a2, 0x58a3, 0x58a4, 0x58a5, 0x58a6, 0x58a7, 0x58aa, 0x58ab, 0x58ac, 0x58ad, 0x58ae, 0x58af, 0x58b0, 0x58b1, 0x58b2, 0x58b3, 0x58b4, 0x58b5, 0x58b6, 0x58b7, 0x58b8, 0x58b9, 0x58ba, 0x58bb, 0x58bd, 0x58be, 0x58bf, 0x58c0, 0x58c2, 0x58c3, 0x58c4, 0x58c6, 0x58c7, 0x58c8, 0x58c9, 0x58ca, 0x58cb, 0x58cc, 0x58cd, 0x58ce, 0x58cf, 0x58d0, 0x58d2, 0x58d3, 0x58d4, 0x58d6, 0x58d7, 0x58d8, 0x58d9, 0x58da, 0x58db, 0x58dc, 0x58dd, 0x58de, 0x58df, 0x58e0, 0x58e1, 0x58e2, 0x58e3, 0x58e5, 0x58e6, 0x58e7, 0x58e8, 0x58e9, 0x58ea, 0x58ed, 0x58ef, 0x58f1, 0x58f2, 0x58f4, 0x58f5, 0x58f7, 0x58f8, 0x58fa, 0x58fb, 0x58fc, 0x58fd, 0x58fe, 0x58ff, 0x5900, 0x5901, 0x5903, 0x5905, 0x5906, 0x5908, 0x5909, 0x590a, 0x590b, 0x590c, 0x590e, 0x5910, 0x5911, 0x5912, 0x5913, 0x5917, 0x5918, 0x591b, 0x591d, 0x591e, 0x5920, 0x5921, 0x5922, 0x5923, 0x5926, 0x5928, 0x592c, 0x5930, 0x5932, 0x5933, 0x5935, 0x5936, 0x593b, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8a40[ 192 ] = { 0x593d, 0x593e, 0x593f, 0x5940, 0x5943, 0x5945, 0x5946, 0x594a, 0x594c, 0x594d, 0x5950, 0x5952, 0x5953, 0x5959, 0x595b, 0x595c, 0x595d, 0x595e, 0x595f, 0x5961, 0x5963, 0x5964, 0x5966, 0x5967, 0x5968, 0x5969, 0x596a, 0x596b, 0x596c, 0x596d, 0x596e, 0x596f, 0x5970, 0x5971, 0x5972, 0x5975, 0x5977, 0x597a, 0x597b, 0x597c, 0x597e, 0x597f, 0x5980, 0x5985, 0x5989, 0x598b, 0x598c, 0x598e, 0x598f, 0x5990, 0x5991, 0x5994, 0x5995, 0x5998, 0x599a, 0x599b, 0x599c, 0x599d, 0x599f, 0x59a0, 0x59a1, 0x59a2, 0x59a6, 0xfffd, 0x59a7, 0x59ac, 0x59ad, 0x59b0, 0x59b1, 0x59b3, 0x59b4, 0x59b5, 0x59b6, 0x59b7, 0x59b8, 0x59ba, 0x59bc, 0x59bd, 0x59bf, 0x59c0, 0x59c1, 0x59c2, 0x59c3, 0x59c4, 0x59c5, 0x59c7, 0x59c8, 0x59c9, 0x59cc, 0x59cd, 0x59ce, 0x59cf, 0x59d5, 0x59d6, 0x59d9, 0x59db, 0x59de, 0x59df, 0x59e0, 0x59e1, 0x59e2, 0x59e4, 0x59e6, 0x59e7, 0x59e9, 0x59ea, 0x59eb, 0x59ed, 0x59ee, 0x59ef, 0x59f0, 0x59f1, 0x59f2, 0x59f3, 0x59f4, 0x59f5, 0x59f6, 0x59f7, 0x59f8, 0x59fa, 0x59fc, 0x59fd, 0x59fe, 0x5a00, 0x5a02, 0x5a0a, 0x5a0b, 0x5a0d, 0x5a0e, 0x5a0f, 0x5a10, 0x5a12, 0x5a14, 0x5a15, 0x5a16, 0x5a17, 0x5a19, 0x5a1a, 0x5a1b, 0x5a1d, 0x5a1e, 0x5a21, 0x5a22, 0x5a24, 0x5a26, 0x5a27, 0x5a28, 0x5a2a, 0x5a2b, 0x5a2c, 0x5a2d, 0x5a2e, 0x5a2f, 0x5a30, 0x5a33, 0x5a35, 0x5a37, 0x5a38, 0x5a39, 0x5a3a, 0x5a3b, 0x5a3d, 0x5a3e, 0x5a3f, 0x5a41, 0x5a42, 0x5a43, 0x5a44, 0x5a45, 0x5a47, 0x5a48, 0x5a4b, 0x5a4c, 0x5a4d, 0x5a4e, 0x5a4f, 0x5a50, 0x5a51, 0x5a52, 0x5a53, 0x5a54, 0x5a56, 0x5a57, 0x5a58, 0x5a59, 0x5a5b, 0x5a5c, 0x5a5d, 0x5a5e, 0x5a5f, 0x5a60, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8b40[ 192 ] = { 0x5a61, 0x5a63, 0x5a64, 0x5a65, 0x5a66, 0x5a68, 0x5a69, 0x5a6b, 0x5a6c, 0x5a6d, 0x5a6e, 0x5a6f, 0x5a70, 0x5a71, 0x5a72, 0x5a73, 0x5a78, 0x5a79, 0x5a7b, 0x5a7c, 0x5a7d, 0x5a7e, 0x5a80, 0x5a81, 0x5a82, 0x5a83, 0x5a84, 0x5a85, 0x5a86, 0x5a87, 0x5a88, 0x5a89, 0x5a8a, 0x5a8b, 0x5a8c, 0x5a8d, 0x5a8e, 0x5a8f, 0x5a90, 0x5a91, 0x5a93, 0x5a94, 0x5a95, 0x5a96, 0x5a97, 0x5a98, 0x5a99, 0x5a9c, 0x5a9d, 0x5a9e, 0x5a9f, 0x5aa0, 0x5aa1, 0x5aa2, 0x5aa3, 0x5aa4, 0x5aa5, 0x5aa6, 0x5aa7, 0x5aa8, 0x5aa9, 0x5aab, 0x5aac, 0xfffd, 0x5aad, 0x5aae, 0x5aaf, 0x5ab0, 0x5ab1, 0x5ab4, 0x5ab6, 0x5ab7, 0x5ab9, 0x5aba, 0x5abb, 0x5abc, 0x5abd, 0x5abf, 0x5ac0, 0x5ac3, 0x5ac4, 0x5ac5, 0x5ac6, 0x5ac7, 0x5ac8, 0x5aca, 0x5acb, 0x5acd, 0x5ace, 0x5acf, 0x5ad0, 0x5ad1, 0x5ad3, 0x5ad5, 0x5ad7, 0x5ad9, 0x5ada, 0x5adb, 0x5add, 0x5ade, 0x5adf, 0x5ae2, 0x5ae4, 0x5ae5, 0x5ae7, 0x5ae8, 0x5aea, 0x5aec, 0x5aed, 0x5aee, 0x5aef, 0x5af0, 0x5af2, 0x5af3, 0x5af4, 0x5af5, 0x5af6, 0x5af7, 0x5af8, 0x5af9, 0x5afa, 0x5afb, 0x5afc, 0x5afd, 0x5afe, 0x5aff, 0x5b00, 0x5b01, 0x5b02, 0x5b03, 0x5b04, 0x5b05, 0x5b06, 0x5b07, 0x5b08, 0x5b0a, 0x5b0b, 0x5b0c, 0x5b0d, 0x5b0e, 0x5b0f, 0x5b10, 0x5b11, 0x5b12, 0x5b13, 0x5b14, 0x5b15, 0x5b18, 0x5b19, 0x5b1a, 0x5b1b, 0x5b1c, 0x5b1d, 0x5b1e, 0x5b1f, 0x5b20, 0x5b21, 0x5b22, 0x5b23, 0x5b24, 0x5b25, 0x5b26, 0x5b27, 0x5b28, 0x5b29, 0x5b2a, 0x5b2b, 0x5b2c, 0x5b2d, 0x5b2e, 0x5b2f, 0x5b30, 0x5b31, 0x5b33, 0x5b35, 0x5b36, 0x5b38, 0x5b39, 0x5b3a, 0x5b3b, 0x5b3c, 0x5b3d, 0x5b3e, 0x5b3f, 0x5b41, 0x5b42, 0x5b43, 0x5b44, 0x5b45, 0x5b46, 0x5b47, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8c40[ 192 ] = { 0x5b48, 0x5b49, 0x5b4a, 0x5b4b, 0x5b4c, 0x5b4d, 0x5b4e, 0x5b4f, 0x5b52, 0x5b56, 0x5b5e, 0x5b60, 0x5b61, 0x5b67, 0x5b68, 0x5b6b, 0x5b6d, 0x5b6e, 0x5b6f, 0x5b72, 0x5b74, 0x5b76, 0x5b77, 0x5b78, 0x5b79, 0x5b7b, 0x5b7c, 0x5b7e, 0x5b7f, 0x5b82, 0x5b86, 0x5b8a, 0x5b8d, 0x5b8e, 0x5b90, 0x5b91, 0x5b92, 0x5b94, 0x5b96, 0x5b9f, 0x5ba7, 0x5ba8, 0x5ba9, 0x5bac, 0x5bad, 0x5bae, 0x5baf, 0x5bb1, 0x5bb2, 0x5bb7, 0x5bba, 0x5bbb, 0x5bbc, 0x5bc0, 0x5bc1, 0x5bc3, 0x5bc8, 0x5bc9, 0x5bca, 0x5bcb, 0x5bcd, 0x5bce, 0x5bcf, 0xfffd, 0x5bd1, 0x5bd4, 0x5bd5, 0x5bd6, 0x5bd7, 0x5bd8, 0x5bd9, 0x5bda, 0x5bdb, 0x5bdc, 0x5be0, 0x5be2, 0x5be3, 0x5be6, 0x5be7, 0x5be9, 0x5bea, 0x5beb, 0x5bec, 0x5bed, 0x5bef, 0x5bf1, 0x5bf2, 0x5bf3, 0x5bf4, 0x5bf5, 0x5bf6, 0x5bf7, 0x5bfd, 0x5bfe, 0x5c00, 0x5c02, 0x5c03, 0x5c05, 0x5c07, 0x5c08, 0x5c0b, 0x5c0c, 0x5c0d, 0x5c0e, 0x5c10, 0x5c12, 0x5c13, 0x5c17, 0x5c19, 0x5c1b, 0x5c1e, 0x5c1f, 0x5c20, 0x5c21, 0x5c23, 0x5c26, 0x5c28, 0x5c29, 0x5c2a, 0x5c2b, 0x5c2d, 0x5c2e, 0x5c2f, 0x5c30, 0x5c32, 0x5c33, 0x5c35, 0x5c36, 0x5c37, 0x5c43, 0x5c44, 0x5c46, 0x5c47, 0x5c4c, 0x5c4d, 0x5c52, 0x5c53, 0x5c54, 0x5c56, 0x5c57, 0x5c58, 0x5c5a, 0x5c5b, 0x5c5c, 0x5c5d, 0x5c5f, 0x5c62, 0x5c64, 0x5c67, 0x5c68, 0x5c69, 0x5c6a, 0x5c6b, 0x5c6c, 0x5c6d, 0x5c70, 0x5c72, 0x5c73, 0x5c74, 0x5c75, 0x5c76, 0x5c77, 0x5c78, 0x5c7b, 0x5c7c, 0x5c7d, 0x5c7e, 0x5c80, 0x5c83, 0x5c84, 0x5c85, 0x5c86, 0x5c87, 0x5c89, 0x5c8a, 0x5c8b, 0x5c8e, 0x5c8f, 0x5c92, 0x5c93, 0x5c95, 0x5c9d, 0x5c9e, 0x5c9f, 0x5ca0, 0x5ca1, 0x5ca4, 0x5ca5, 0x5ca6, 0x5ca7, 0x5ca8, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8d40[ 192 ] = { 0x5caa, 0x5cae, 0x5caf, 0x5cb0, 0x5cb2, 0x5cb4, 0x5cb6, 0x5cb9, 0x5cba, 0x5cbb, 0x5cbc, 0x5cbe, 0x5cc0, 0x5cc2, 0x5cc3, 0x5cc5, 0x5cc6, 0x5cc7, 0x5cc8, 0x5cc9, 0x5cca, 0x5ccc, 0x5ccd, 0x5cce, 0x5ccf, 0x5cd0, 0x5cd1, 0x5cd3, 0x5cd4, 0x5cd5, 0x5cd6, 0x5cd7, 0x5cd8, 0x5cda, 0x5cdb, 0x5cdc, 0x5cdd, 0x5cde, 0x5cdf, 0x5ce0, 0x5ce2, 0x5ce3, 0x5ce7, 0x5ce9, 0x5ceb, 0x5cec, 0x5cee, 0x5cef, 0x5cf1, 0x5cf2, 0x5cf3, 0x5cf4, 0x5cf5, 0x5cf6, 0x5cf7, 0x5cf8, 0x5cf9, 0x5cfa, 0x5cfc, 0x5cfd, 0x5cfe, 0x5cff, 0x5d00, 0xfffd, 0x5d01, 0x5d04, 0x5d05, 0x5d08, 0x5d09, 0x5d0a, 0x5d0b, 0x5d0c, 0x5d0d, 0x5d0f, 0x5d10, 0x5d11, 0x5d12, 0x5d13, 0x5d15, 0x5d17, 0x5d18, 0x5d19, 0x5d1a, 0x5d1c, 0x5d1d, 0x5d1f, 0x5d20, 0x5d21, 0x5d22, 0x5d23, 0x5d25, 0x5d28, 0x5d2a, 0x5d2b, 0x5d2c, 0x5d2f, 0x5d30, 0x5d31, 0x5d32, 0x5d33, 0x5d35, 0x5d36, 0x5d37, 0x5d38, 0x5d39, 0x5d3a, 0x5d3b, 0x5d3c, 0x5d3f, 0x5d40, 0x5d41, 0x5d42, 0x5d43, 0x5d44, 0x5d45, 0x5d46, 0x5d48, 0x5d49, 0x5d4d, 0x5d4e, 0x5d4f, 0x5d50, 0x5d51, 0x5d52, 0x5d53, 0x5d54, 0x5d55, 0x5d56, 0x5d57, 0x5d59, 0x5d5a, 0x5d5c, 0x5d5e, 0x5d5f, 0x5d60, 0x5d61, 0x5d62, 0x5d63, 0x5d64, 0x5d65, 0x5d66, 0x5d67, 0x5d68, 0x5d6a, 0x5d6d, 0x5d6e, 0x5d70, 0x5d71, 0x5d72, 0x5d73, 0x5d75, 0x5d76, 0x5d77, 0x5d78, 0x5d79, 0x5d7a, 0x5d7b, 0x5d7c, 0x5d7d, 0x5d7e, 0x5d7f, 0x5d80, 0x5d81, 0x5d83, 0x5d84, 0x5d85, 0x5d86, 0x5d87, 0x5d88, 0x5d89, 0x5d8a, 0x5d8b, 0x5d8c, 0x5d8d, 0x5d8e, 0x5d8f, 0x5d90, 0x5d91, 0x5d92, 0x5d93, 0x5d94, 0x5d95, 0x5d96, 0x5d97, 0x5d98, 0x5d9a, 0x5d9b, 0x5d9c, 0x5d9e, 0x5d9f, 0x5da0, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8e40[ 192 ] = { 0x5da1, 0x5da2, 0x5da3, 0x5da4, 0x5da5, 0x5da6, 0x5da7, 0x5da8, 0x5da9, 0x5daa, 0x5dab, 0x5dac, 0x5dad, 0x5dae, 0x5daf, 0x5db0, 0x5db1, 0x5db2, 0x5db3, 0x5db4, 0x5db5, 0x5db6, 0x5db8, 0x5db9, 0x5dba, 0x5dbb, 0x5dbc, 0x5dbd, 0x5dbe, 0x5dbf, 0x5dc0, 0x5dc1, 0x5dc2, 0x5dc3, 0x5dc4, 0x5dc6, 0x5dc7, 0x5dc8, 0x5dc9, 0x5dca, 0x5dcb, 0x5dcc, 0x5dce, 0x5dcf, 0x5dd0, 0x5dd1, 0x5dd2, 0x5dd3, 0x5dd4, 0x5dd5, 0x5dd6, 0x5dd7, 0x5dd8, 0x5dd9, 0x5dda, 0x5ddc, 0x5ddf, 0x5de0, 0x5de3, 0x5de4, 0x5dea, 0x5dec, 0x5ded, 0xfffd, 0x5df0, 0x5df5, 0x5df6, 0x5df8, 0x5df9, 0x5dfa, 0x5dfb, 0x5dfc, 0x5dff, 0x5e00, 0x5e04, 0x5e07, 0x5e09, 0x5e0a, 0x5e0b, 0x5e0d, 0x5e0e, 0x5e12, 0x5e13, 0x5e17, 0x5e1e, 0x5e1f, 0x5e20, 0x5e21, 0x5e22, 0x5e23, 0x5e24, 0x5e25, 0x5e28, 0x5e29, 0x5e2a, 0x5e2b, 0x5e2c, 0x5e2f, 0x5e30, 0x5e32, 0x5e33, 0x5e34, 0x5e35, 0x5e36, 0x5e39, 0x5e3a, 0x5e3e, 0x5e3f, 0x5e40, 0x5e41, 0x5e43, 0x5e46, 0x5e47, 0x5e48, 0x5e49, 0x5e4a, 0x5e4b, 0x5e4d, 0x5e4e, 0x5e4f, 0x5e50, 0x5e51, 0x5e52, 0x5e53, 0x5e56, 0x5e57, 0x5e58, 0x5e59, 0x5e5a, 0x5e5c, 0x5e5d, 0x5e5f, 0x5e60, 0x5e63, 0x5e64, 0x5e65, 0x5e66, 0x5e67, 0x5e68, 0x5e69, 0x5e6a, 0x5e6b, 0x5e6c, 0x5e6d, 0x5e6e, 0x5e6f, 0x5e70, 0x5e71, 0x5e75, 0x5e77, 0x5e79, 0x5e7e, 0x5e81, 0x5e82, 0x5e83, 0x5e85, 0x5e88, 0x5e89, 0x5e8c, 0x5e8d, 0x5e8e, 0x5e92, 0x5e98, 0x5e9b, 0x5e9d, 0x5ea1, 0x5ea2, 0x5ea3, 0x5ea4, 0x5ea8, 0x5ea9, 0x5eaa, 0x5eab, 0x5eac, 0x5eae, 0x5eaf, 0x5eb0, 0x5eb1, 0x5eb2, 0x5eb4, 0x5eba, 0x5ebb, 0x5ebc, 0x5ebd, 0x5ebf, 0x5ec0, 0x5ec1, 0x5ec2, 0x5ec3, 0x5ec4, 0x5ec5, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8f40[ 192 ] = { 0x5ec6, 0x5ec7, 0x5ec8, 0x5ecb, 0x5ecc, 0x5ecd, 0x5ece, 0x5ecf, 0x5ed0, 0x5ed4, 0x5ed5, 0x5ed7, 0x5ed8, 0x5ed9, 0x5eda, 0x5edc, 0x5edd, 0x5ede, 0x5edf, 0x5ee0, 0x5ee1, 0x5ee2, 0x5ee3, 0x5ee4, 0x5ee5, 0x5ee6, 0x5ee7, 0x5ee9, 0x5eeb, 0x5eec, 0x5eed, 0x5eee, 0x5eef, 0x5ef0, 0x5ef1, 0x5ef2, 0x5ef3, 0x5ef5, 0x5ef8, 0x5ef9, 0x5efb, 0x5efc, 0x5efd, 0x5f05, 0x5f06, 0x5f07, 0x5f09, 0x5f0c, 0x5f0d, 0x5f0e, 0x5f10, 0x5f12, 0x5f14, 0x5f16, 0x5f19, 0x5f1a, 0x5f1c, 0x5f1d, 0x5f1e, 0x5f21, 0x5f22, 0x5f23, 0x5f24, 0xfffd, 0x5f28, 0x5f2b, 0x5f2c, 0x5f2e, 0x5f30, 0x5f32, 0x5f33, 0x5f34, 0x5f35, 0x5f36, 0x5f37, 0x5f38, 0x5f3b, 0x5f3d, 0x5f3e, 0x5f3f, 0x5f41, 0x5f42, 0x5f43, 0x5f44, 0x5f45, 0x5f46, 0x5f47, 0x5f48, 0x5f49, 0x5f4a, 0x5f4b, 0x5f4c, 0x5f4d, 0x5f4e, 0x5f4f, 0x5f51, 0x5f54, 0x5f59, 0x5f5a, 0x5f5b, 0x5f5c, 0x5f5e, 0x5f5f, 0x5f60, 0x5f63, 0x5f65, 0x5f67, 0x5f68, 0x5f6b, 0x5f6e, 0x5f6f, 0x5f72, 0x5f74, 0x5f75, 0x5f76, 0x5f78, 0x5f7a, 0x5f7d, 0x5f7e, 0x5f7f, 0x5f83, 0x5f86, 0x5f8d, 0x5f8e, 0x5f8f, 0x5f91, 0x5f93, 0x5f94, 0x5f96, 0x5f9a, 0x5f9b, 0x5f9d, 0x5f9e, 0x5f9f, 0x5fa0, 0x5fa2, 0x5fa3, 0x5fa4, 0x5fa5, 0x5fa6, 0x5fa7, 0x5fa9, 0x5fab, 0x5fac, 0x5faf, 0x5fb0, 0x5fb1, 0x5fb2, 0x5fb3, 0x5fb4, 0x5fb6, 0x5fb8, 0x5fb9, 0x5fba, 0x5fbb, 0x5fbe, 0x5fbf, 0x5fc0, 0x5fc1, 0x5fc2, 0x5fc7, 0x5fc8, 0x5fca, 0x5fcb, 0x5fce, 0x5fd3, 0x5fd4, 0x5fd5, 0x5fda, 0x5fdb, 0x5fdc, 0x5fde, 0x5fdf, 0x5fe2, 0x5fe3, 0x5fe5, 0x5fe6, 0x5fe8, 0x5fe9, 0x5fec, 0x5fef, 0x5ff0, 0x5ff2, 0x5ff3, 0x5ff4, 0x5ff6, 0x5ff7, 0x5ff9, 0x5ffa, 0x5ffc, 0x6007, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9040[ 192 ] = { 0x6008, 0x6009, 0x600b, 0x600c, 0x6010, 0x6011, 0x6013, 0x6017, 0x6018, 0x601a, 0x601e, 0x601f, 0x6022, 0x6023, 0x6024, 0x602c, 0x602d, 0x602e, 0x6030, 0x6031, 0x6032, 0x6033, 0x6034, 0x6036, 0x6037, 0x6038, 0x6039, 0x603a, 0x603d, 0x603e, 0x6040, 0x6044, 0x6045, 0x6046, 0x6047, 0x6048, 0x6049, 0x604a, 0x604c, 0x604e, 0x604f, 0x6051, 0x6053, 0x6054, 0x6056, 0x6057, 0x6058, 0x605b, 0x605c, 0x605e, 0x605f, 0x6060, 0x6061, 0x6065, 0x6066, 0x606e, 0x6071, 0x6072, 0x6074, 0x6075, 0x6077, 0x607e, 0x6080, 0xfffd, 0x6081, 0x6082, 0x6085, 0x6086, 0x6087, 0x6088, 0x608a, 0x608b, 0x608e, 0x608f, 0x6090, 0x6091, 0x6093, 0x6095, 0x6097, 0x6098, 0x6099, 0x609c, 0x609e, 0x60a1, 0x60a2, 0x60a4, 0x60a5, 0x60a7, 0x60a9, 0x60aa, 0x60ae, 0x60b0, 0x60b3, 0x60b5, 0x60b6, 0x60b7, 0x60b9, 0x60ba, 0x60bd, 0x60be, 0x60bf, 0x60c0, 0x60c1, 0x60c2, 0x60c3, 0x60c4, 0x60c7, 0x60c8, 0x60c9, 0x60cc, 0x60cd, 0x60ce, 0x60cf, 0x60d0, 0x60d2, 0x60d3, 0x60d4, 0x60d6, 0x60d7, 0x60d9, 0x60db, 0x60de, 0x60e1, 0x60e2, 0x60e3, 0x60e4, 0x60e5, 0x60ea, 0x60f1, 0x60f2, 0x60f5, 0x60f7, 0x60f8, 0x60fb, 0x60fc, 0x60fd, 0x60fe, 0x60ff, 0x6102, 0x6103, 0x6104, 0x6105, 0x6107, 0x610a, 0x610b, 0x610c, 0x6110, 0x6111, 0x6112, 0x6113, 0x6114, 0x6116, 0x6117, 0x6118, 0x6119, 0x611b, 0x611c, 0x611d, 0x611e, 0x6121, 0x6122, 0x6125, 0x6128, 0x6129, 0x612a, 0x612c, 0x612d, 0x612e, 0x612f, 0x6130, 0x6131, 0x6132, 0x6133, 0x6134, 0x6135, 0x6136, 0x6137, 0x6138, 0x6139, 0x613a, 0x613b, 0x613c, 0x613d, 0x613e, 0x6140, 0x6141, 0x6142, 0x6143, 0x6144, 0x6145, 0x6146, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9140[ 192 ] = { 0x6147, 0x6149, 0x614b, 0x614d, 0x614f, 0x6150, 0x6152, 0x6153, 0x6154, 0x6156, 0x6157, 0x6158, 0x6159, 0x615a, 0x615b, 0x615c, 0x615e, 0x615f, 0x6160, 0x6161, 0x6163, 0x6164, 0x6165, 0x6166, 0x6169, 0x616a, 0x616b, 0x616c, 0x616d, 0x616e, 0x616f, 0x6171, 0x6172, 0x6173, 0x6174, 0x6176, 0x6178, 0x6179, 0x617a, 0x617b, 0x617c, 0x617d, 0x617e, 0x617f, 0x6180, 0x6181, 0x6182, 0x6183, 0x6184, 0x6185, 0x6186, 0x6187, 0x6188, 0x6189, 0x618a, 0x618c, 0x618d, 0x618f, 0x6190, 0x6191, 0x6192, 0x6193, 0x6195, 0xfffd, 0x6196, 0x6197, 0x6198, 0x6199, 0x619a, 0x619b, 0x619c, 0x619e, 0x619f, 0x61a0, 0x61a1, 0x61a2, 0x61a3, 0x61a4, 0x61a5, 0x61a6, 0x61aa, 0x61ab, 0x61ad, 0x61ae, 0x61af, 0x61b0, 0x61b1, 0x61b2, 0x61b3, 0x61b4, 0x61b5, 0x61b6, 0x61b8, 0x61b9, 0x61ba, 0x61bb, 0x61bc, 0x61bd, 0x61bf, 0x61c0, 0x61c1, 0x61c3, 0x61c4, 0x61c5, 0x61c6, 0x61c7, 0x61c9, 0x61cc, 0x61cd, 0x61ce, 0x61cf, 0x61d0, 0x61d3, 0x61d5, 0x61d6, 0x61d7, 0x61d8, 0x61d9, 0x61da, 0x61db, 0x61dc, 0x61dd, 0x61de, 0x61df, 0x61e0, 0x61e1, 0x61e2, 0x61e3, 0x61e4, 0x61e5, 0x61e7, 0x61e8, 0x61e9, 0x61ea, 0x61eb, 0x61ec, 0x61ed, 0x61ee, 0x61ef, 0x61f0, 0x61f1, 0x61f2, 0x61f3, 0x61f4, 0x61f6, 0x61f7, 0x61f8, 0x61f9, 0x61fa, 0x61fb, 0x61fc, 0x61fd, 0x61fe, 0x6200, 0x6201, 0x6202, 0x6203, 0x6204, 0x6205, 0x6207, 0x6209, 0x6213, 0x6214, 0x6219, 0x621c, 0x621d, 0x621e, 0x6220, 0x6223, 0x6226, 0x6227, 0x6228, 0x6229, 0x622b, 0x622d, 0x622f, 0x6230, 0x6231, 0x6232, 0x6235, 0x6236, 0x6238, 0x6239, 0x623a, 0x623b, 0x623c, 0x6242, 0x6244, 0x6245, 0x6246, 0x624a, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9240[ 192 ] = { 0x624f, 0x6250, 0x6255, 0x6256, 0x6257, 0x6259, 0x625a, 0x625c, 0x625d, 0x625e, 0x625f, 0x6260, 0x6261, 0x6262, 0x6264, 0x6265, 0x6268, 0x6271, 0x6272, 0x6274, 0x6275, 0x6277, 0x6278, 0x627a, 0x627b, 0x627d, 0x6281, 0x6282, 0x6283, 0x6285, 0x6286, 0x6287, 0x6288, 0x628b, 0x628c, 0x628d, 0x628e, 0x628f, 0x6290, 0x6294, 0x6299, 0x629c, 0x629d, 0x629e, 0x62a3, 0x62a6, 0x62a7, 0x62a9, 0x62aa, 0x62ad, 0x62ae, 0x62af, 0x62b0, 0x62b2, 0x62b3, 0x62b4, 0x62b6, 0x62b7, 0x62b8, 0x62ba, 0x62be, 0x62c0, 0x62c1, 0xfffd, 0x62c3, 0x62cb, 0x62cf, 0x62d1, 0x62d5, 0x62dd, 0x62de, 0x62e0, 0x62e1, 0x62e4, 0x62ea, 0x62eb, 0x62f0, 0x62f2, 0x62f5, 0x62f8, 0x62f9, 0x62fa, 0x62fb, 0x6300, 0x6303, 0x6304, 0x6305, 0x6306, 0x630a, 0x630b, 0x630c, 0x630d, 0x630f, 0x6310, 0x6312, 0x6313, 0x6314, 0x6315, 0x6317, 0x6318, 0x6319, 0x631c, 0x6326, 0x6327, 0x6329, 0x632c, 0x632d, 0x632e, 0x6330, 0x6331, 0x6333, 0x6334, 0x6335, 0x6336, 0x6337, 0x6338, 0x633b, 0x633c, 0x633e, 0x633f, 0x6340, 0x6341, 0x6344, 0x6347, 0x6348, 0x634a, 0x6351, 0x6352, 0x6353, 0x6354, 0x6356, 0x6357, 0x6358, 0x6359, 0x635a, 0x635b, 0x635c, 0x635d, 0x6360, 0x6364, 0x6365, 0x6366, 0x6368, 0x636a, 0x636b, 0x636c, 0x636f, 0x6370, 0x6372, 0x6373, 0x6374, 0x6375, 0x6378, 0x6379, 0x637c, 0x637d, 0x637e, 0x637f, 0x6381, 0x6383, 0x6384, 0x6385, 0x6386, 0x638b, 0x638d, 0x6391, 0x6393, 0x6394, 0x6395, 0x6397, 0x6399, 0x639a, 0x639b, 0x639c, 0x639d, 0x639e, 0x639f, 0x63a1, 0x63a4, 0x63a6, 0x63ab, 0x63af, 0x63b1, 0x63b2, 0x63b5, 0x63b6, 0x63b9, 0x63bb, 0x63bd, 0x63bf, 0x63c0, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9340[ 192 ] = { 0x63c1, 0x63c2, 0x63c3, 0x63c5, 0x63c7, 0x63c8, 0x63ca, 0x63cb, 0x63cc, 0x63d1, 0x63d3, 0x63d4, 0x63d5, 0x63d7, 0x63d8, 0x63d9, 0x63da, 0x63db, 0x63dc, 0x63dd, 0x63df, 0x63e2, 0x63e4, 0x63e5, 0x63e6, 0x63e7, 0x63e8, 0x63eb, 0x63ec, 0x63ee, 0x63ef, 0x63f0, 0x63f1, 0x63f3, 0x63f5, 0x63f7, 0x63f9, 0x63fa, 0x63fb, 0x63fc, 0x63fe, 0x6403, 0x6404, 0x6406, 0x6407, 0x6408, 0x6409, 0x640a, 0x640d, 0x640e, 0x6411, 0x6412, 0x6415, 0x6416, 0x6417, 0x6418, 0x6419, 0x641a, 0x641d, 0x641f, 0x6422, 0x6423, 0x6424, 0xfffd, 0x6425, 0x6427, 0x6428, 0x6429, 0x642b, 0x642e, 0x642f, 0x6430, 0x6431, 0x6432, 0x6433, 0x6435, 0x6436, 0x6437, 0x6438, 0x6439, 0x643b, 0x643c, 0x643e, 0x6440, 0x6442, 0x6443, 0x6449, 0x644b, 0x644c, 0x644d, 0x644e, 0x644f, 0x6450, 0x6451, 0x6453, 0x6455, 0x6456, 0x6457, 0x6459, 0x645a, 0x645b, 0x645c, 0x645d, 0x645f, 0x6460, 0x6461, 0x6462, 0x6463, 0x6464, 0x6465, 0x6466, 0x6468, 0x646a, 0x646b, 0x646c, 0x646e, 0x646f, 0x6470, 0x6471, 0x6472, 0x6473, 0x6474, 0x6475, 0x6476, 0x6477, 0x647b, 0x647c, 0x647d, 0x647e, 0x647f, 0x6480, 0x6481, 0x6483, 0x6486, 0x6488, 0x6489, 0x648a, 0x648b, 0x648c, 0x648d, 0x648e, 0x648f, 0x6490, 0x6493, 0x6494, 0x6497, 0x6498, 0x649a, 0x649b, 0x649c, 0x649d, 0x649f, 0x64a0, 0x64a1, 0x64a2, 0x64a3, 0x64a5, 0x64a6, 0x64a7, 0x64a8, 0x64aa, 0x64ab, 0x64af, 0x64b1, 0x64b2, 0x64b3, 0x64b4, 0x64b6, 0x64b9, 0x64bb, 0x64bd, 0x64be, 0x64bf, 0x64c1, 0x64c3, 0x64c4, 0x64c6, 0x64c7, 0x64c8, 0x64c9, 0x64ca, 0x64cb, 0x64cc, 0x64cf, 0x64d1, 0x64d3, 0x64d4, 0x64d5, 0x64d6, 0x64d9, 0x64da, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9440[ 192 ] = { 0x64db, 0x64dc, 0x64dd, 0x64df, 0x64e0, 0x64e1, 0x64e3, 0x64e5, 0x64e7, 0x64e8, 0x64e9, 0x64ea, 0x64eb, 0x64ec, 0x64ed, 0x64ee, 0x64ef, 0x64f0, 0x64f1, 0x64f2, 0x64f3, 0x64f4, 0x64f5, 0x64f6, 0x64f7, 0x64f8, 0x64f9, 0x64fa, 0x64fb, 0x64fc, 0x64fd, 0x64fe, 0x64ff, 0x6501, 0x6502, 0x6503, 0x6504, 0x6505, 0x6506, 0x6507, 0x6508, 0x650a, 0x650b, 0x650c, 0x650d, 0x650e, 0x650f, 0x6510, 0x6511, 0x6513, 0x6514, 0x6515, 0x6516, 0x6517, 0x6519, 0x651a, 0x651b, 0x651c, 0x651d, 0x651e, 0x651f, 0x6520, 0x6521, 0xfffd, 0x6522, 0x6523, 0x6524, 0x6526, 0x6527, 0x6528, 0x6529, 0x652a, 0x652c, 0x652d, 0x6530, 0x6531, 0x6532, 0x6533, 0x6537, 0x653a, 0x653c, 0x653d, 0x6540, 0x6541, 0x6542, 0x6543, 0x6544, 0x6546, 0x6547, 0x654a, 0x654b, 0x654d, 0x654e, 0x6550, 0x6552, 0x6553, 0x6554, 0x6557, 0x6558, 0x655a, 0x655c, 0x655f, 0x6560, 0x6561, 0x6564, 0x6565, 0x6567, 0x6568, 0x6569, 0x656a, 0x656d, 0x656e, 0x656f, 0x6571, 0x6573, 0x6575, 0x6576, 0x6578, 0x6579, 0x657a, 0x657b, 0x657c, 0x657d, 0x657e, 0x657f, 0x6580, 0x6581, 0x6582, 0x6583, 0x6584, 0x6585, 0x6586, 0x6588, 0x6589, 0x658a, 0x658d, 0x658e, 0x658f, 0x6592, 0x6594, 0x6595, 0x6596, 0x6598, 0x659a, 0x659d, 0x659e, 0x65a0, 0x65a2, 0x65a3, 0x65a6, 0x65a8, 0x65aa, 0x65ac, 0x65ae, 0x65b1, 0x65b2, 0x65b3, 0x65b4, 0x65b5, 0x65b6, 0x65b7, 0x65b8, 0x65ba, 0x65bb, 0x65be, 0x65bf, 0x65c0, 0x65c2, 0x65c7, 0x65c8, 0x65c9, 0x65ca, 0x65cd, 0x65d0, 0x65d1, 0x65d3, 0x65d4, 0x65d5, 0x65d8, 0x65d9, 0x65da, 0x65db, 0x65dc, 0x65dd, 0x65de, 0x65df, 0x65e1, 0x65e3, 0x65e4, 0x65ea, 0x65eb, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9540[ 192 ] = { 0x65f2, 0x65f3, 0x65f4, 0x65f5, 0x65f8, 0x65f9, 0x65fb, 0x65fc, 0x65fd, 0x65fe, 0x65ff, 0x6601, 0x6604, 0x6605, 0x6607, 0x6608, 0x6609, 0x660b, 0x660d, 0x6610, 0x6611, 0x6612, 0x6616, 0x6617, 0x6618, 0x661a, 0x661b, 0x661c, 0x661e, 0x6621, 0x6622, 0x6623, 0x6624, 0x6626, 0x6629, 0x662a, 0x662b, 0x662c, 0x662e, 0x6630, 0x6632, 0x6633, 0x6637, 0x6638, 0x6639, 0x663a, 0x663b, 0x663d, 0x663f, 0x6640, 0x6642, 0x6644, 0x6645, 0x6646, 0x6647, 0x6648, 0x6649, 0x664a, 0x664d, 0x664e, 0x6650, 0x6651, 0x6658, 0xfffd, 0x6659, 0x665b, 0x665c, 0x665d, 0x665e, 0x6660, 0x6662, 0x6663, 0x6665, 0x6667, 0x6669, 0x666a, 0x666b, 0x666c, 0x666d, 0x6671, 0x6672, 0x6673, 0x6675, 0x6678, 0x6679, 0x667b, 0x667c, 0x667d, 0x667f, 0x6680, 0x6681, 0x6683, 0x6685, 0x6686, 0x6688, 0x6689, 0x668a, 0x668b, 0x668d, 0x668e, 0x668f, 0x6690, 0x6692, 0x6693, 0x6694, 0x6695, 0x6698, 0x6699, 0x669a, 0x669b, 0x669c, 0x669e, 0x669f, 0x66a0, 0x66a1, 0x66a2, 0x66a3, 0x66a4, 0x66a5, 0x66a6, 0x66a9, 0x66aa, 0x66ab, 0x66ac, 0x66ad, 0x66af, 0x66b0, 0x66b1, 0x66b2, 0x66b3, 0x66b5, 0x66b6, 0x66b7, 0x66b8, 0x66ba, 0x66bb, 0x66bc, 0x66bd, 0x66bf, 0x66c0, 0x66c1, 0x66c2, 0x66c3, 0x66c4, 0x66c5, 0x66c6, 0x66c7, 0x66c8, 0x66c9, 0x66ca, 0x66cb, 0x66cc, 0x66cd, 0x66ce, 0x66cf, 0x66d0, 0x66d1, 0x66d2, 0x66d3, 0x66d4, 0x66d5, 0x66d6, 0x66d7, 0x66d8, 0x66da, 0x66de, 0x66df, 0x66e0, 0x66e1, 0x66e2, 0x66e3, 0x66e4, 0x66e5, 0x66e7, 0x66e8, 0x66ea, 0x66eb, 0x66ec, 0x66ed, 0x66ee, 0x66ef, 0x66f1, 0x66f5, 0x66f6, 0x66f8, 0x66fa, 0x66fb, 0x66fd, 0x6701, 0x6702, 0x6703, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9640[ 192 ] = { 0x6704, 0x6705, 0x6706, 0x6707, 0x670c, 0x670e, 0x670f, 0x6711, 0x6712, 0x6713, 0x6716, 0x6718, 0x6719, 0x671a, 0x671c, 0x671e, 0x6720, 0x6721, 0x6722, 0x6723, 0x6724, 0x6725, 0x6727, 0x6729, 0x672e, 0x6730, 0x6732, 0x6733, 0x6736, 0x6737, 0x6738, 0x6739, 0x673b, 0x673c, 0x673e, 0x673f, 0x6741, 0x6744, 0x6745, 0x6747, 0x674a, 0x674b, 0x674d, 0x6752, 0x6754, 0x6755, 0x6757, 0x6758, 0x6759, 0x675a, 0x675b, 0x675d, 0x6762, 0x6763, 0x6764, 0x6766, 0x6767, 0x676b, 0x676c, 0x676e, 0x6771, 0x6774, 0x6776, 0xfffd, 0x6778, 0x6779, 0x677a, 0x677b, 0x677d, 0x6780, 0x6782, 0x6783, 0x6785, 0x6786, 0x6788, 0x678a, 0x678c, 0x678d, 0x678e, 0x678f, 0x6791, 0x6792, 0x6793, 0x6794, 0x6796, 0x6799, 0x679b, 0x679f, 0x67a0, 0x67a1, 0x67a4, 0x67a6, 0x67a9, 0x67ac, 0x67ae, 0x67b1, 0x67b2, 0x67b4, 0x67b9, 0x67ba, 0x67bb, 0x67bc, 0x67bd, 0x67be, 0x67bf, 0x67c0, 0x67c2, 0x67c5, 0x67c6, 0x67c7, 0x67c8, 0x67c9, 0x67ca, 0x67cb, 0x67cc, 0x67cd, 0x67ce, 0x67d5, 0x67d6, 0x67d7, 0x67db, 0x67df, 0x67e1, 0x67e3, 0x67e4, 0x67e6, 0x67e7, 0x67e8, 0x67ea, 0x67eb, 0x67ed, 0x67ee, 0x67f2, 0x67f5, 0x67f6, 0x67f7, 0x67f8, 0x67f9, 0x67fa, 0x67fb, 0x67fc, 0x67fe, 0x6801, 0x6802, 0x6803, 0x6804, 0x6806, 0x680d, 0x6810, 0x6812, 0x6814, 0x6815, 0x6818, 0x6819, 0x681a, 0x681b, 0x681c, 0x681e, 0x681f, 0x6820, 0x6822, 0x6823, 0x6824, 0x6825, 0x6826, 0x6827, 0x6828, 0x682b, 0x682c, 0x682d, 0x682e, 0x682f, 0x6830, 0x6831, 0x6834, 0x6835, 0x6836, 0x683a, 0x683b, 0x683f, 0x6847, 0x684b, 0x684d, 0x684f, 0x6852, 0x6856, 0x6857, 0x6858, 0x6859, 0x685a, 0x685b, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9740[ 192 ] = { 0x685c, 0x685d, 0x685e, 0x685f, 0x686a, 0x686c, 0x686d, 0x686e, 0x686f, 0x6870, 0x6871, 0x6872, 0x6873, 0x6875, 0x6878, 0x6879, 0x687a, 0x687b, 0x687c, 0x687d, 0x687e, 0x687f, 0x6880, 0x6882, 0x6884, 0x6887, 0x6888, 0x6889, 0x688a, 0x688b, 0x688c, 0x688d, 0x688e, 0x6890, 0x6891, 0x6892, 0x6894, 0x6895, 0x6896, 0x6898, 0x6899, 0x689a, 0x689b, 0x689c, 0x689d, 0x689e, 0x689f, 0x68a0, 0x68a1, 0x68a3, 0x68a4, 0x68a5, 0x68a9, 0x68aa, 0x68ab, 0x68ac, 0x68ae, 0x68b1, 0x68b2, 0x68b4, 0x68b6, 0x68b7, 0x68b8, 0xfffd, 0x68b9, 0x68ba, 0x68bb, 0x68bc, 0x68bd, 0x68be, 0x68bf, 0x68c1, 0x68c3, 0x68c4, 0x68c5, 0x68c6, 0x68c7, 0x68c8, 0x68ca, 0x68cc, 0x68ce, 0x68cf, 0x68d0, 0x68d1, 0x68d3, 0x68d4, 0x68d6, 0x68d7, 0x68d9, 0x68db, 0x68dc, 0x68dd, 0x68de, 0x68df, 0x68e1, 0x68e2, 0x68e4, 0x68e5, 0x68e6, 0x68e7, 0x68e8, 0x68e9, 0x68ea, 0x68eb, 0x68ec, 0x68ed, 0x68ef, 0x68f2, 0x68f3, 0x68f4, 0x68f6, 0x68f7, 0x68f8, 0x68fb, 0x68fd, 0x68fe, 0x68ff, 0x6900, 0x6902, 0x6903, 0x6904, 0x6906, 0x6907, 0x6908, 0x6909, 0x690a, 0x690c, 0x690f, 0x6911, 0x6913, 0x6914, 0x6915, 0x6916, 0x6917, 0x6918, 0x6919, 0x691a, 0x691b, 0x691c, 0x691d, 0x691e, 0x6921, 0x6922, 0x6923, 0x6925, 0x6926, 0x6927, 0x6928, 0x6929, 0x692a, 0x692b, 0x692c, 0x692e, 0x692f, 0x6931, 0x6932, 0x6933, 0x6935, 0x6936, 0x6937, 0x6938, 0x693a, 0x693b, 0x693c, 0x693e, 0x6940, 0x6941, 0x6943, 0x6944, 0x6945, 0x6946, 0x6947, 0x6948, 0x6949, 0x694a, 0x694b, 0x694c, 0x694d, 0x694e, 0x694f, 0x6950, 0x6951, 0x6952, 0x6953, 0x6955, 0x6956, 0x6958, 0x6959, 0x695b, 0x695c, 0x695f, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9840[ 192 ] = { 0x6961, 0x6962, 0x6964, 0x6965, 0x6967, 0x6968, 0x6969, 0x696a, 0x696c, 0x696d, 0x696f, 0x6970, 0x6972, 0x6973, 0x6974, 0x6975, 0x6976, 0x697a, 0x697b, 0x697d, 0x697e, 0x697f, 0x6981, 0x6983, 0x6985, 0x698a, 0x698b, 0x698c, 0x698e, 0x698f, 0x6990, 0x6991, 0x6992, 0x6993, 0x6996, 0x6997, 0x6999, 0x699a, 0x699d, 0x699e, 0x699f, 0x69a0, 0x69a1, 0x69a2, 0x69a3, 0x69a4, 0x69a5, 0x69a6, 0x69a9, 0x69aa, 0x69ac, 0x69ae, 0x69af, 0x69b0, 0x69b2, 0x69b3, 0x69b5, 0x69b6, 0x69b8, 0x69b9, 0x69ba, 0x69bc, 0x69bd, 0xfffd, 0x69be, 0x69bf, 0x69c0, 0x69c2, 0x69c3, 0x69c4, 0x69c5, 0x69c6, 0x69c7, 0x69c8, 0x69c9, 0x69cb, 0x69cd, 0x69cf, 0x69d1, 0x69d2, 0x69d3, 0x69d5, 0x69d6, 0x69d7, 0x69d8, 0x69d9, 0x69da, 0x69dc, 0x69dd, 0x69de, 0x69e1, 0x69e2, 0x69e3, 0x69e4, 0x69e5, 0x69e6, 0x69e7, 0x69e8, 0x69e9, 0x69ea, 0x69eb, 0x69ec, 0x69ee, 0x69ef, 0x69f0, 0x69f1, 0x69f3, 0x69f4, 0x69f5, 0x69f6, 0x69f7, 0x69f8, 0x69f9, 0x69fa, 0x69fb, 0x69fc, 0x69fe, 0x6a00, 0x6a01, 0x6a02, 0x6a03, 0x6a04, 0x6a05, 0x6a06, 0x6a07, 0x6a08, 0x6a09, 0x6a0b, 0x6a0c, 0x6a0d, 0x6a0e, 0x6a0f, 0x6a10, 0x6a11, 0x6a12, 0x6a13, 0x6a14, 0x6a15, 0x6a16, 0x6a19, 0x6a1a, 0x6a1b, 0x6a1c, 0x6a1d, 0x6a1e, 0x6a20, 0x6a22, 0x6a23, 0x6a24, 0x6a25, 0x6a26, 0x6a27, 0x6a29, 0x6a2b, 0x6a2c, 0x6a2d, 0x6a2e, 0x6a30, 0x6a32, 0x6a33, 0x6a34, 0x6a36, 0x6a37, 0x6a38, 0x6a39, 0x6a3a, 0x6a3b, 0x6a3c, 0x6a3f, 0x6a40, 0x6a41, 0x6a42, 0x6a43, 0x6a45, 0x6a46, 0x6a48, 0x6a49, 0x6a4a, 0x6a4b, 0x6a4c, 0x6a4d, 0x6a4e, 0x6a4f, 0x6a51, 0x6a52, 0x6a53, 0x6a54, 0x6a55, 0x6a56, 0x6a57, 0x6a5a, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9940[ 192 ] = { 0x6a5c, 0x6a5d, 0x6a5e, 0x6a5f, 0x6a60, 0x6a62, 0x6a63, 0x6a64, 0x6a66, 0x6a67, 0x6a68, 0x6a69, 0x6a6a, 0x6a6b, 0x6a6c, 0x6a6d, 0x6a6e, 0x6a6f, 0x6a70, 0x6a72, 0x6a73, 0x6a74, 0x6a75, 0x6a76, 0x6a77, 0x6a78, 0x6a7a, 0x6a7b, 0x6a7d, 0x6a7e, 0x6a7f, 0x6a81, 0x6a82, 0x6a83, 0x6a85, 0x6a86, 0x6a87, 0x6a88, 0x6a89, 0x6a8a, 0x6a8b, 0x6a8c, 0x6a8d, 0x6a8f, 0x6a92, 0x6a93, 0x6a94, 0x6a95, 0x6a96, 0x6a98, 0x6a99, 0x6a9a, 0x6a9b, 0x6a9c, 0x6a9d, 0x6a9e, 0x6a9f, 0x6aa1, 0x6aa2, 0x6aa3, 0x6aa4, 0x6aa5, 0x6aa6, 0xfffd, 0x6aa7, 0x6aa8, 0x6aaa, 0x6aad, 0x6aae, 0x6aaf, 0x6ab0, 0x6ab1, 0x6ab2, 0x6ab3, 0x6ab4, 0x6ab5, 0x6ab6, 0x6ab7, 0x6ab8, 0x6ab9, 0x6aba, 0x6abb, 0x6abc, 0x6abd, 0x6abe, 0x6abf, 0x6ac0, 0x6ac1, 0x6ac2, 0x6ac3, 0x6ac4, 0x6ac5, 0x6ac6, 0x6ac7, 0x6ac8, 0x6ac9, 0x6aca, 0x6acb, 0x6acc, 0x6acd, 0x6ace, 0x6acf, 0x6ad0, 0x6ad1, 0x6ad2, 0x6ad3, 0x6ad4, 0x6ad5, 0x6ad6, 0x6ad7, 0x6ad8, 0x6ad9, 0x6ada, 0x6adb, 0x6adc, 0x6add, 0x6ade, 0x6adf, 0x6ae0, 0x6ae1, 0x6ae2, 0x6ae3, 0x6ae4, 0x6ae5, 0x6ae6, 0x6ae7, 0x6ae8, 0x6ae9, 0x6aea, 0x6aeb, 0x6aec, 0x6aed, 0x6aee, 0x6aef, 0x6af0, 0x6af1, 0x6af2, 0x6af3, 0x6af4, 0x6af5, 0x6af6, 0x6af7, 0x6af8, 0x6af9, 0x6afa, 0x6afb, 0x6afc, 0x6afd, 0x6afe, 0x6aff, 0x6b00, 0x6b01, 0x6b02, 0x6b03, 0x6b04, 0x6b05, 0x6b06, 0x6b07, 0x6b08, 0x6b09, 0x6b0a, 0x6b0b, 0x6b0c, 0x6b0d, 0x6b0e, 0x6b0f, 0x6b10, 0x6b11, 0x6b12, 0x6b13, 0x6b14, 0x6b15, 0x6b16, 0x6b17, 0x6b18, 0x6b19, 0x6b1a, 0x6b1b, 0x6b1c, 0x6b1d, 0x6b1e, 0x6b1f, 0x6b25, 0x6b26, 0x6b28, 0x6b29, 0x6b2a, 0x6b2b, 0x6b2c, 0x6b2d, 0x6b2e, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9a40[ 192 ] = { 0x6b2f, 0x6b30, 0x6b31, 0x6b33, 0x6b34, 0x6b35, 0x6b36, 0x6b38, 0x6b3b, 0x6b3c, 0x6b3d, 0x6b3f, 0x6b40, 0x6b41, 0x6b42, 0x6b44, 0x6b45, 0x6b48, 0x6b4a, 0x6b4b, 0x6b4d, 0x6b4e, 0x6b4f, 0x6b50, 0x6b51, 0x6b52, 0x6b53, 0x6b54, 0x6b55, 0x6b56, 0x6b57, 0x6b58, 0x6b5a, 0x6b5b, 0x6b5c, 0x6b5d, 0x6b5e, 0x6b5f, 0x6b60, 0x6b61, 0x6b68, 0x6b69, 0x6b6b, 0x6b6c, 0x6b6d, 0x6b6e, 0x6b6f, 0x6b70, 0x6b71, 0x6b72, 0x6b73, 0x6b74, 0x6b75, 0x6b76, 0x6b77, 0x6b78, 0x6b7a, 0x6b7d, 0x6b7e, 0x6b7f, 0x6b80, 0x6b85, 0x6b88, 0xfffd, 0x6b8c, 0x6b8e, 0x6b8f, 0x6b90, 0x6b91, 0x6b94, 0x6b95, 0x6b97, 0x6b98, 0x6b99, 0x6b9c, 0x6b9d, 0x6b9e, 0x6b9f, 0x6ba0, 0x6ba2, 0x6ba3, 0x6ba4, 0x6ba5, 0x6ba6, 0x6ba7, 0x6ba8, 0x6ba9, 0x6bab, 0x6bac, 0x6bad, 0x6bae, 0x6baf, 0x6bb0, 0x6bb1, 0x6bb2, 0x6bb6, 0x6bb8, 0x6bb9, 0x6bba, 0x6bbb, 0x6bbc, 0x6bbd, 0x6bbe, 0x6bc0, 0x6bc3, 0x6bc4, 0x6bc6, 0x6bc7, 0x6bc8, 0x6bc9, 0x6bca, 0x6bcc, 0x6bce, 0x6bd0, 0x6bd1, 0x6bd8, 0x6bda, 0x6bdc, 0x6bdd, 0x6bde, 0x6bdf, 0x6be0, 0x6be2, 0x6be3, 0x6be4, 0x6be5, 0x6be6, 0x6be7, 0x6be8, 0x6be9, 0x6bec, 0x6bed, 0x6bee, 0x6bf0, 0x6bf1, 0x6bf2, 0x6bf4, 0x6bf6, 0x6bf7, 0x6bf8, 0x6bfa, 0x6bfb, 0x6bfc, 0x6bfe, 0x6bff, 0x6c00, 0x6c01, 0x6c02, 0x6c03, 0x6c04, 0x6c08, 0x6c09, 0x6c0a, 0x6c0b, 0x6c0c, 0x6c0e, 0x6c12, 0x6c17, 0x6c1c, 0x6c1d, 0x6c1e, 0x6c20, 0x6c23, 0x6c25, 0x6c2b, 0x6c2c, 0x6c2d, 0x6c31, 0x6c33, 0x6c36, 0x6c37, 0x6c39, 0x6c3a, 0x6c3b, 0x6c3c, 0x6c3e, 0x6c3f, 0x6c43, 0x6c44, 0x6c45, 0x6c48, 0x6c4b, 0x6c4c, 0x6c4d, 0x6c4e, 0x6c4f, 0x6c51, 0x6c52, 0x6c53, 0x6c56, 0x6c58, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9b40[ 192 ] = { 0x6c59, 0x6c5a, 0x6c62, 0x6c63, 0x6c65, 0x6c66, 0x6c67, 0x6c6b, 0x6c6c, 0x6c6d, 0x6c6e, 0x6c6f, 0x6c71, 0x6c73, 0x6c75, 0x6c77, 0x6c78, 0x6c7a, 0x6c7b, 0x6c7c, 0x6c7f, 0x6c80, 0x6c84, 0x6c87, 0x6c8a, 0x6c8b, 0x6c8d, 0x6c8e, 0x6c91, 0x6c92, 0x6c95, 0x6c96, 0x6c97, 0x6c98, 0x6c9a, 0x6c9c, 0x6c9d, 0x6c9e, 0x6ca0, 0x6ca2, 0x6ca8, 0x6cac, 0x6caf, 0x6cb0, 0x6cb4, 0x6cb5, 0x6cb6, 0x6cb7, 0x6cba, 0x6cc0, 0x6cc1, 0x6cc2, 0x6cc3, 0x6cc6, 0x6cc7, 0x6cc8, 0x6ccb, 0x6ccd, 0x6cce, 0x6ccf, 0x6cd1, 0x6cd2, 0x6cd8, 0xfffd, 0x6cd9, 0x6cda, 0x6cdc, 0x6cdd, 0x6cdf, 0x6ce4, 0x6ce6, 0x6ce7, 0x6ce9, 0x6cec, 0x6ced, 0x6cf2, 0x6cf4, 0x6cf9, 0x6cff, 0x6d00, 0x6d02, 0x6d03, 0x6d05, 0x6d06, 0x6d08, 0x6d09, 0x6d0a, 0x6d0d, 0x6d0f, 0x6d10, 0x6d11, 0x6d13, 0x6d14, 0x6d15, 0x6d16, 0x6d18, 0x6d1c, 0x6d1d, 0x6d1f, 0x6d20, 0x6d21, 0x6d22, 0x6d23, 0x6d24, 0x6d26, 0x6d28, 0x6d29, 0x6d2c, 0x6d2d, 0x6d2f, 0x6d30, 0x6d34, 0x6d36, 0x6d37, 0x6d38, 0x6d3a, 0x6d3f, 0x6d40, 0x6d42, 0x6d44, 0x6d49, 0x6d4c, 0x6d50, 0x6d55, 0x6d56, 0x6d57, 0x6d58, 0x6d5b, 0x6d5d, 0x6d5f, 0x6d61, 0x6d62, 0x6d64, 0x6d65, 0x6d67, 0x6d68, 0x6d6b, 0x6d6c, 0x6d6d, 0x6d70, 0x6d71, 0x6d72, 0x6d73, 0x6d75, 0x6d76, 0x6d79, 0x6d7a, 0x6d7b, 0x6d7d, 0x6d7e, 0x6d7f, 0x6d80, 0x6d81, 0x6d83, 0x6d84, 0x6d86, 0x6d87, 0x6d8a, 0x6d8b, 0x6d8d, 0x6d8f, 0x6d90, 0x6d92, 0x6d96, 0x6d97, 0x6d98, 0x6d99, 0x6d9a, 0x6d9c, 0x6da2, 0x6da5, 0x6dac, 0x6dad, 0x6db0, 0x6db1, 0x6db3, 0x6db4, 0x6db6, 0x6db7, 0x6db9, 0x6dba, 0x6dbb, 0x6dbc, 0x6dbd, 0x6dbe, 0x6dc1, 0x6dc2, 0x6dc3, 0x6dc8, 0x6dc9, 0x6dca, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9c40[ 192 ] = { 0x6dcd, 0x6dce, 0x6dcf, 0x6dd0, 0x6dd2, 0x6dd3, 0x6dd4, 0x6dd5, 0x6dd7, 0x6dda, 0x6ddb, 0x6ddc, 0x6ddf, 0x6de2, 0x6de3, 0x6de5, 0x6de7, 0x6de8, 0x6de9, 0x6dea, 0x6ded, 0x6def, 0x6df0, 0x6df2, 0x6df4, 0x6df5, 0x6df6, 0x6df8, 0x6dfa, 0x6dfd, 0x6dfe, 0x6dff, 0x6e00, 0x6e01, 0x6e02, 0x6e03, 0x6e04, 0x6e06, 0x6e07, 0x6e08, 0x6e09, 0x6e0b, 0x6e0f, 0x6e12, 0x6e13, 0x6e15, 0x6e18, 0x6e19, 0x6e1b, 0x6e1c, 0x6e1e, 0x6e1f, 0x6e22, 0x6e26, 0x6e27, 0x6e28, 0x6e2a, 0x6e2c, 0x6e2e, 0x6e30, 0x6e31, 0x6e33, 0x6e35, 0xfffd, 0x6e36, 0x6e37, 0x6e39, 0x6e3b, 0x6e3c, 0x6e3d, 0x6e3e, 0x6e3f, 0x6e40, 0x6e41, 0x6e42, 0x6e45, 0x6e46, 0x6e47, 0x6e48, 0x6e49, 0x6e4a, 0x6e4b, 0x6e4c, 0x6e4f, 0x6e50, 0x6e51, 0x6e52, 0x6e55, 0x6e57, 0x6e59, 0x6e5a, 0x6e5c, 0x6e5d, 0x6e5e, 0x6e60, 0x6e61, 0x6e62, 0x6e63, 0x6e64, 0x6e65, 0x6e66, 0x6e67, 0x6e68, 0x6e69, 0x6e6a, 0x6e6c, 0x6e6d, 0x6e6f, 0x6e70, 0x6e71, 0x6e72, 0x6e73, 0x6e74, 0x6e75, 0x6e76, 0x6e77, 0x6e78, 0x6e79, 0x6e7a, 0x6e7b, 0x6e7c, 0x6e7d, 0x6e80, 0x6e81, 0x6e82, 0x6e84, 0x6e87, 0x6e88, 0x6e8a, 0x6e8b, 0x6e8c, 0x6e8d, 0x6e8e, 0x6e91, 0x6e92, 0x6e93, 0x6e94, 0x6e95, 0x6e96, 0x6e97, 0x6e99, 0x6e9a, 0x6e9b, 0x6e9d, 0x6e9e, 0x6ea0, 0x6ea1, 0x6ea3, 0x6ea4, 0x6ea6, 0x6ea8, 0x6ea9, 0x6eab, 0x6eac, 0x6ead, 0x6eae, 0x6eb0, 0x6eb3, 0x6eb5, 0x6eb8, 0x6eb9, 0x6ebc, 0x6ebe, 0x6ebf, 0x6ec0, 0x6ec3, 0x6ec4, 0x6ec5, 0x6ec6, 0x6ec8, 0x6ec9, 0x6eca, 0x6ecc, 0x6ecd, 0x6ece, 0x6ed0, 0x6ed2, 0x6ed6, 0x6ed8, 0x6ed9, 0x6edb, 0x6edc, 0x6edd, 0x6ee3, 0x6ee7, 0x6eea, 0x6eeb, 0x6eec, 0x6eed, 0x6eee, 0x6eef, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9d40[ 192 ] = { 0x6ef0, 0x6ef1, 0x6ef2, 0x6ef3, 0x6ef5, 0x6ef6, 0x6ef7, 0x6ef8, 0x6efa, 0x6efb, 0x6efc, 0x6efd, 0x6efe, 0x6eff, 0x6f00, 0x6f01, 0x6f03, 0x6f04, 0x6f05, 0x6f07, 0x6f08, 0x6f0a, 0x6f0b, 0x6f0c, 0x6f0d, 0x6f0e, 0x6f10, 0x6f11, 0x6f12, 0x6f16, 0x6f17, 0x6f18, 0x6f19, 0x6f1a, 0x6f1b, 0x6f1c, 0x6f1d, 0x6f1e, 0x6f1f, 0x6f21, 0x6f22, 0x6f23, 0x6f25, 0x6f26, 0x6f27, 0x6f28, 0x6f2c, 0x6f2e, 0x6f30, 0x6f32, 0x6f34, 0x6f35, 0x6f37, 0x6f38, 0x6f39, 0x6f3a, 0x6f3b, 0x6f3c, 0x6f3d, 0x6f3f, 0x6f40, 0x6f41, 0x6f42, 0xfffd, 0x6f43, 0x6f44, 0x6f45, 0x6f48, 0x6f49, 0x6f4a, 0x6f4c, 0x6f4e, 0x6f4f, 0x6f50, 0x6f51, 0x6f52, 0x6f53, 0x6f54, 0x6f55, 0x6f56, 0x6f57, 0x6f59, 0x6f5a, 0x6f5b, 0x6f5d, 0x6f5f, 0x6f60, 0x6f61, 0x6f63, 0x6f64, 0x6f65, 0x6f67, 0x6f68, 0x6f69, 0x6f6a, 0x6f6b, 0x6f6c, 0x6f6f, 0x6f70, 0x6f71, 0x6f73, 0x6f75, 0x6f76, 0x6f77, 0x6f79, 0x6f7b, 0x6f7d, 0x6f7e, 0x6f7f, 0x6f80, 0x6f81, 0x6f82, 0x6f83, 0x6f85, 0x6f86, 0x6f87, 0x6f8a, 0x6f8b, 0x6f8f, 0x6f90, 0x6f91, 0x6f92, 0x6f93, 0x6f94, 0x6f95, 0x6f96, 0x6f97, 0x6f98, 0x6f99, 0x6f9a, 0x6f9b, 0x6f9d, 0x6f9e, 0x6f9f, 0x6fa0, 0x6fa2, 0x6fa3, 0x6fa4, 0x6fa5, 0x6fa6, 0x6fa8, 0x6fa9, 0x6faa, 0x6fab, 0x6fac, 0x6fad, 0x6fae, 0x6faf, 0x6fb0, 0x6fb1, 0x6fb2, 0x6fb4, 0x6fb5, 0x6fb7, 0x6fb8, 0x6fba, 0x6fbb, 0x6fbc, 0x6fbd, 0x6fbe, 0x6fbf, 0x6fc1, 0x6fc3, 0x6fc4, 0x6fc5, 0x6fc6, 0x6fc7, 0x6fc8, 0x6fca, 0x6fcb, 0x6fcc, 0x6fcd, 0x6fce, 0x6fcf, 0x6fd0, 0x6fd3, 0x6fd4, 0x6fd5, 0x6fd6, 0x6fd7, 0x6fd8, 0x6fd9, 0x6fda, 0x6fdb, 0x6fdc, 0x6fdd, 0x6fdf, 0x6fe2, 0x6fe3, 0x6fe4, 0x6fe5, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9e40[ 192 ] = { 0x6fe6, 0x6fe7, 0x6fe8, 0x6fe9, 0x6fea, 0x6feb, 0x6fec, 0x6fed, 0x6ff0, 0x6ff1, 0x6ff2, 0x6ff3, 0x6ff4, 0x6ff5, 0x6ff6, 0x6ff7, 0x6ff8, 0x6ff9, 0x6ffa, 0x6ffb, 0x6ffc, 0x6ffd, 0x6ffe, 0x6fff, 0x7000, 0x7001, 0x7002, 0x7003, 0x7004, 0x7005, 0x7006, 0x7007, 0x7008, 0x7009, 0x700a, 0x700b, 0x700c, 0x700d, 0x700e, 0x700f, 0x7010, 0x7012, 0x7013, 0x7014, 0x7015, 0x7016, 0x7017, 0x7018, 0x7019, 0x701c, 0x701d, 0x701e, 0x701f, 0x7020, 0x7021, 0x7022, 0x7024, 0x7025, 0x7026, 0x7027, 0x7028, 0x7029, 0x702a, 0xfffd, 0x702b, 0x702c, 0x702d, 0x702e, 0x702f, 0x7030, 0x7031, 0x7032, 0x7033, 0x7034, 0x7036, 0x7037, 0x7038, 0x703a, 0x703b, 0x703c, 0x703d, 0x703e, 0x703f, 0x7040, 0x7041, 0x7042, 0x7043, 0x7044, 0x7045, 0x7046, 0x7047, 0x7048, 0x7049, 0x704a, 0x704b, 0x704d, 0x704e, 0x7050, 0x7051, 0x7052, 0x7053, 0x7054, 0x7055, 0x7056, 0x7057, 0x7058, 0x7059, 0x705a, 0x705b, 0x705c, 0x705d, 0x705f, 0x7060, 0x7061, 0x7062, 0x7063, 0x7064, 0x7065, 0x7066, 0x7067, 0x7068, 0x7069, 0x706a, 0x706e, 0x7071, 0x7072, 0x7073, 0x7074, 0x7077, 0x7079, 0x707a, 0x707b, 0x707d, 0x7081, 0x7082, 0x7083, 0x7084, 0x7086, 0x7087, 0x7088, 0x708b, 0x708c, 0x708d, 0x708f, 0x7090, 0x7091, 0x7093, 0x7097, 0x7098, 0x709a, 0x709b, 0x709e, 0x709f, 0x70a0, 0x70a1, 0x70a2, 0x70a3, 0x70a4, 0x70a5, 0x70a6, 0x70a7, 0x70a8, 0x70a9, 0x70aa, 0x70b0, 0x70b2, 0x70b4, 0x70b5, 0x70b6, 0x70ba, 0x70be, 0x70bf, 0x70c4, 0x70c5, 0x70c6, 0x70c7, 0x70c9, 0x70cb, 0x70cc, 0x70cd, 0x70ce, 0x70cf, 0x70d0, 0x70d1, 0x70d2, 0x70d3, 0x70d4, 0x70d5, 0x70d6, 0x70d7, 0x70da, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9f40[ 192 ] = { 0x70dc, 0x70dd, 0x70de, 0x70e0, 0x70e1, 0x70e2, 0x70e3, 0x70e5, 0x70ea, 0x70ee, 0x70f0, 0x70f1, 0x70f2, 0x70f3, 0x70f4, 0x70f5, 0x70f6, 0x70f8, 0x70fa, 0x70fb, 0x70fc, 0x70fe, 0x70ff, 0x7100, 0x7101, 0x7102, 0x7103, 0x7104, 0x7105, 0x7106, 0x7107, 0x7108, 0x710b, 0x710c, 0x710d, 0x710e, 0x710f, 0x7111, 0x7112, 0x7114, 0x7117, 0x711b, 0x711c, 0x711d, 0x711e, 0x711f, 0x7120, 0x7121, 0x7122, 0x7123, 0x7124, 0x7125, 0x7127, 0x7128, 0x7129, 0x712a, 0x712b, 0x712c, 0x712d, 0x712e, 0x7132, 0x7133, 0x7134, 0xfffd, 0x7135, 0x7137, 0x7138, 0x7139, 0x713a, 0x713b, 0x713c, 0x713d, 0x713e, 0x713f, 0x7140, 0x7141, 0x7142, 0x7143, 0x7144, 0x7146, 0x7147, 0x7148, 0x7149, 0x714b, 0x714d, 0x714f, 0x7150, 0x7151, 0x7152, 0x7153, 0x7154, 0x7155, 0x7156, 0x7157, 0x7158, 0x7159, 0x715a, 0x715b, 0x715d, 0x715f, 0x7160, 0x7161, 0x7162, 0x7163, 0x7165, 0x7169, 0x716a, 0x716b, 0x716c, 0x716d, 0x716f, 0x7170, 0x7171, 0x7174, 0x7175, 0x7176, 0x7177, 0x7179, 0x717b, 0x717c, 0x717e, 0x717f, 0x7180, 0x7181, 0x7182, 0x7183, 0x7185, 0x7186, 0x7187, 0x7188, 0x7189, 0x718b, 0x718c, 0x718d, 0x718e, 0x7190, 0x7191, 0x7192, 0x7193, 0x7195, 0x7196, 0x7197, 0x719a, 0x719b, 0x719c, 0x719d, 0x719e, 0x71a1, 0x71a2, 0x71a3, 0x71a4, 0x71a5, 0x71a6, 0x71a7, 0x71a9, 0x71aa, 0x71ab, 0x71ad, 0x71ae, 0x71af, 0x71b0, 0x71b1, 0x71b2, 0x71b4, 0x71b6, 0x71b7, 0x71b8, 0x71ba, 0x71bb, 0x71bc, 0x71bd, 0x71be, 0x71bf, 0x71c0, 0x71c1, 0x71c2, 0x71c4, 0x71c5, 0x71c6, 0x71c7, 0x71c8, 0x71c9, 0x71ca, 0x71cb, 0x71cc, 0x71cd, 0x71cf, 0x71d0, 0x71d1, 0x71d2, 0x71d3, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa040[ 192 ] = { 0x71d6, 0x71d7, 0x71d8, 0x71d9, 0x71da, 0x71db, 0x71dc, 0x71dd, 0x71de, 0x71df, 0x71e1, 0x71e2, 0x71e3, 0x71e4, 0x71e6, 0x71e8, 0x71e9, 0x71ea, 0x71eb, 0x71ec, 0x71ed, 0x71ef, 0x71f0, 0x71f1, 0x71f2, 0x71f3, 0x71f4, 0x71f5, 0x71f6, 0x71f7, 0x71f8, 0x71fa, 0x71fb, 0x71fc, 0x71fd, 0x71fe, 0x71ff, 0x7200, 0x7201, 0x7202, 0x7203, 0x7204, 0x7205, 0x7207, 0x7208, 0x7209, 0x720a, 0x720b, 0x720c, 0x720d, 0x720e, 0x720f, 0x7210, 0x7211, 0x7212, 0x7213, 0x7214, 0x7215, 0x7216, 0x7217, 0x7218, 0x7219, 0x721a, 0xfffd, 0x721b, 0x721c, 0x721e, 0x721f, 0x7220, 0x7221, 0x7222, 0x7223, 0x7224, 0x7225, 0x7226, 0x7227, 0x7229, 0x722b, 0x722d, 0x722e, 0x722f, 0x7232, 0x7233, 0x7234, 0x723a, 0x723c, 0x723e, 0x7240, 0x7241, 0x7242, 0x7243, 0x7244, 0x7245, 0x7246, 0x7249, 0x724a, 0x724b, 0x724e, 0x724f, 0x7250, 0x7251, 0x7253, 0x7254, 0x7255, 0x7257, 0x7258, 0x725a, 0x725c, 0x725e, 0x7260, 0x7263, 0x7264, 0x7265, 0x7268, 0x726a, 0x726b, 0x726c, 0x726d, 0x7270, 0x7271, 0x7273, 0x7274, 0x7276, 0x7277, 0x7278, 0x727b, 0x727c, 0x727d, 0x7282, 0x7283, 0x7285, 0x7286, 0x7287, 0x7288, 0x7289, 0x728c, 0x728e, 0x7290, 0x7291, 0x7293, 0x7294, 0x7295, 0x7296, 0x7297, 0x7298, 0x7299, 0x729a, 0x729b, 0x729c, 0x729d, 0x729e, 0x72a0, 0x72a1, 0x72a2, 0x72a3, 0x72a4, 0x72a5, 0x72a6, 0x72a7, 0x72a8, 0x72a9, 0x72aa, 0x72ab, 0x72ae, 0x72b1, 0x72b2, 0x72b3, 0x72b5, 0x72ba, 0x72bb, 0x72bc, 0x72bd, 0x72be, 0x72bf, 0x72c0, 0x72c5, 0x72c6, 0x72c7, 0x72c9, 0x72ca, 0x72cb, 0x72cc, 0x72cf, 0x72d1, 0x72d3, 0x72d4, 0x72d5, 0x72d6, 0x72d8, 0x72da, 0x72db, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa1a0[ 96 ] = { 0xfffd, 0x3000, 0x3001, 0x3002, 0x00b7, 0x02c9, 0x02c7, 0x00a8, 0x3003, 0x3005, 0x2014, 0xff5e, 0x2016, 0x2026, 0x2018, 0x2019, 0x201c, 0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e, 0x300f, 0x3016, 0x3017, 0x3010, 0x3011, 0x00b1, 0x00d7, 0x00f7, 0x2236, 0x2227, 0x2228, 0x2211, 0x220f, 0x222a, 0x2229, 0x2208, 0x2237, 0x221a, 0x22a5, 0x2225, 0x2220, 0x2312, 0x2299, 0x222b, 0x222e, 0x2261, 0x224c, 0x2248, 0x223d, 0x221d, 0x2260, 0x226e, 0x226f, 0x2264, 0x2265, 0x221e, 0x2235, 0x2234, 0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xff04, 0x00a4, 0xffe0, 0xffe1, 0x2030, 0x00a7, 0x2116, 0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x203b, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa2a0[ 96 ] = { 0xfffd, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2488, 0x2489, 0x248a, 0x248b, 0x248c, 0x248d, 0x248e, 0x248f, 0x2490, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496, 0x2497, 0x2498, 0x2499, 0x249a, 0x249b, 0x2474, 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d, 0x247e, 0x247f, 0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486, 0x2487, 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0xfffd, 0xfffd, 0x3220, 0x3221, 0x3222, 0x3223, 0x3224, 0x3225, 0x3226, 0x3227, 0x3228, 0x3229, 0xfffd, 0xfffd, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216a, 0x216b, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa3a0[ 96 ] = { 0xfffd, 0xff01, 0xff02, 0xff03, 0xffe5, 0xff05, 0xff06, 0xff07, 0xff08, 0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, 0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, 0xff20, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38, 0xff39, 0xff3a, 0xff3b, 0xff3c, 0xff3d, 0xff3e, 0xff3f, 0xff40, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, 0xff58, 0xff59, 0xff5a, 0xff5b, 0xff5c, 0xff5d, 0xffe3, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa4a0[ 88 ] = { 0xfffd, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068, 0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078, 0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088, 0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090, 0x3091, 0x3092, 0x3093, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa5a0[ 88 ] = { 0xfffd, 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8, 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0, 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8, 0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0, 0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8, 0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0, 0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8, 0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, 0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa6a0[ 88 ] = { 0xfffd, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfe35, 0xfe36, 0xfe39, 0xfe3a, 0xfe3f, 0xfe40, 0xfe3d, 0xfe3e, 0xfe41, 0xfe42, 0xfe43, 0xfe44, 0xfffd, 0xfffd, 0xfe3b, 0xfe3c, 0xfe37, 0xfe38, 0xfe31, 0xfffd, 0xfe33, 0xfe34, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7a0[ 40 ] = { 0xfffd, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7d0[ 40 ] = { 0xfffd, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa840[ 88 ] = { 0x02ca, 0x02cb, 0x02d9, 0x2013, 0x2015, 0x2025, 0x2035, 0x2105, 0x2109, 0x2196, 0x2197, 0x2198, 0x2199, 0x2215, 0x221f, 0x2223, 0x2252, 0x2266, 0x2267, 0x22bf, 0x2550, 0x2551, 0x2552, 0x2553, 0x2554, 0x2555, 0x2556, 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e, 0x255f, 0x2560, 0x2561, 0x2562, 0x2563, 0x2564, 0x2565, 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x256d, 0x256e, 0x256f, 0x2570, 0x2571, 0x2572, 0x2573, 0x2581, 0x2582, 0x2583, 0x2584, 0x2585, 0x2586, 0x2587, 0xfffd, 0x2588, 0x2589, 0x258a, 0x258b, 0x258c, 0x258d, 0x258e, 0x258f, 0x2593, 0x2594, 0x2595, 0x25bc, 0x25bd, 0x25e2, 0x25e3, 0x25e4, 0x25e5, 0x2609, 0x2295, 0x3012, 0x301d, 0x301e, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa8a0[ 80 ] = { 0xfffd, 0x0101, 0x00e1, 0x01ce, 0x00e0, 0x0113, 0x00e9, 0x011b, 0x00e8, 0x012b, 0x00ed, 0x01d0, 0x00ec, 0x014d, 0x00f3, 0x01d2, 0x00f2, 0x016b, 0x00fa, 0x01d4, 0x00f9, 0x01d6, 0x01d8, 0x01da, 0x01dc, 0x00fc, 0x00ea, 0x0251, 0xfffd, 0x0144, 0x0148, 0xfffd, 0x0261, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x3105, 0x3106, 0x3107, 0x3108, 0x3109, 0x310a, 0x310b, 0x310c, 0x310d, 0x310e, 0x310f, 0x3110, 0x3111, 0x3112, 0x3113, 0x3114, 0x3115, 0x3116, 0x3117, 0x3118, 0x3119, 0x311a, 0x311b, 0x311c, 0x311d, 0x311e, 0x311f, 0x3120, 0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127, 0x3128, 0x3129, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa940[ 72 ] = { 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026, 0x3027, 0x3028, 0x3029, 0x32a3, 0x338e, 0x338f, 0x339c, 0x339d, 0x339e, 0x33a1, 0x33c4, 0x33ce, 0x33d1, 0x33d2, 0x33d5, 0xfe30, 0xffe2, 0xffe4, 0xfffd, 0x2121, 0x3231, 0xfffd, 0x2010, 0xfffd, 0xfffd, 0xfffd, 0x30fc, 0x309b, 0x309c, 0x30fd, 0x30fe, 0x3006, 0x309d, 0x309e, 0xfe49, 0xfe4a, 0xfe4b, 0xfe4c, 0xfe4d, 0xfe4e, 0xfe4f, 0xfe50, 0xfe51, 0xfe52, 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xfe59, 0xfe5a, 0xfe5b, 0xfe5c, 0xfe5d, 0xfe5e, 0xfe5f, 0xfe60, 0xfe61, 0xfffd, 0xfe62, 0xfe63, 0xfe64, 0xfe65, 0xfe66, 0xfe68, 0xfe69, 0xfe6a }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa9a0[ 80 ] = { 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2500, 0x2501, 0x2502, 0x2503, 0x2504, 0x2505, 0x2506, 0x2507, 0x2508, 0x2509, 0x250a, 0x250b, 0x250c, 0x250d, 0x250e, 0x250f, 0x2510, 0x2511, 0x2512, 0x2513, 0x2514, 0x2515, 0x2516, 0x2517, 0x2518, 0x2519, 0x251a, 0x251b, 0x251c, 0x251d, 0x251e, 0x251f, 0x2520, 0x2521, 0x2522, 0x2523, 0x2524, 0x2525, 0x2526, 0x2527, 0x2528, 0x2529, 0x252a, 0x252b, 0x252c, 0x252d, 0x252e, 0x252f, 0x2530, 0x2531, 0x2532, 0x2533, 0x2534, 0x2535, 0x2536, 0x2537, 0x2538, 0x2539, 0x253a, 0x253b, 0x253c, 0x253d, 0x253e, 0x253f, 0x2540, 0x2541, 0x2542, 0x2543, 0x2544, 0x2545, 0x2546, 0x2547, 0x2548, 0x2549, 0x254a, 0x254b }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaa40[ 96 ] = { 0x72dc, 0x72dd, 0x72df, 0x72e2, 0x72e3, 0x72e4, 0x72e5, 0x72e6, 0x72e7, 0x72ea, 0x72eb, 0x72f5, 0x72f6, 0x72f9, 0x72fd, 0x72fe, 0x72ff, 0x7300, 0x7302, 0x7304, 0x7305, 0x7306, 0x7307, 0x7308, 0x7309, 0x730b, 0x730c, 0x730d, 0x730f, 0x7310, 0x7311, 0x7312, 0x7314, 0x7318, 0x7319, 0x731a, 0x731f, 0x7320, 0x7323, 0x7324, 0x7326, 0x7327, 0x7328, 0x732d, 0x732f, 0x7330, 0x7332, 0x7333, 0x7335, 0x7336, 0x733a, 0x733b, 0x733c, 0x733d, 0x7340, 0x7341, 0x7342, 0x7343, 0x7344, 0x7345, 0x7346, 0x7347, 0x7348, 0xfffd, 0x7349, 0x734a, 0x734b, 0x734c, 0x734e, 0x734f, 0x7351, 0x7353, 0x7354, 0x7355, 0x7356, 0x7358, 0x7359, 0x735a, 0x735b, 0x735c, 0x735d, 0x735e, 0x735f, 0x7361, 0x7362, 0x7363, 0x7364, 0x7365, 0x7366, 0x7367, 0x7368, 0x7369, 0x736a, 0x736b, 0x736e, 0x7370 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xab40[ 96 ] = { 0x7372, 0x7373, 0x7374, 0x7375, 0x7376, 0x7377, 0x7378, 0x7379, 0x737a, 0x737b, 0x737c, 0x737d, 0x737f, 0x7380, 0x7381, 0x7382, 0x7383, 0x7385, 0x7386, 0x7388, 0x738a, 0x738c, 0x738d, 0x738f, 0x7390, 0x7392, 0x7393, 0x7394, 0x7395, 0x7397, 0x7398, 0x7399, 0x739a, 0x739c, 0x739d, 0x739e, 0x73a0, 0x73a1, 0x73a3, 0x73a4, 0x73a5, 0x73a6, 0x73a7, 0x73a8, 0x73aa, 0x73ac, 0x73ad, 0x73b1, 0x73b4, 0x73b5, 0x73b6, 0x73b8, 0x73b9, 0x73bc, 0x73bd, 0x73be, 0x73bf, 0x73c1, 0x73c3, 0x73c4, 0x73c5, 0x73c6, 0x73c7, 0xfffd, 0x73cb, 0x73cc, 0x73ce, 0x73d2, 0x73d3, 0x73d4, 0x73d5, 0x73d6, 0x73d7, 0x73d8, 0x73da, 0x73db, 0x73dc, 0x73dd, 0x73df, 0x73e1, 0x73e2, 0x73e3, 0x73e4, 0x73e6, 0x73e8, 0x73ea, 0x73eb, 0x73ec, 0x73ee, 0x73ef, 0x73f0, 0x73f1, 0x73f3, 0x73f4, 0x73f5, 0x73f6 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xac40[ 96 ] = { 0x73f8, 0x73f9, 0x73fa, 0x73fb, 0x73fc, 0x73fd, 0x73fe, 0x73ff, 0x7400, 0x7401, 0x7402, 0x7404, 0x7407, 0x7408, 0x740b, 0x740c, 0x740d, 0x740e, 0x7411, 0x7412, 0x7413, 0x7414, 0x7415, 0x7416, 0x7417, 0x7418, 0x7419, 0x741c, 0x741d, 0x741e, 0x741f, 0x7420, 0x7421, 0x7423, 0x7424, 0x7427, 0x7429, 0x742b, 0x742d, 0x742f, 0x7431, 0x7432, 0x7437, 0x7438, 0x7439, 0x743a, 0x743b, 0x743d, 0x743e, 0x743f, 0x7440, 0x7442, 0x7443, 0x7444, 0x7445, 0x7446, 0x7447, 0x7448, 0x7449, 0x744a, 0x744b, 0x744c, 0x744d, 0xfffd, 0x744e, 0x744f, 0x7450, 0x7451, 0x7452, 0x7453, 0x7454, 0x7456, 0x7458, 0x745d, 0x7460, 0x7461, 0x7462, 0x7463, 0x7464, 0x7465, 0x7466, 0x7467, 0x7468, 0x7469, 0x746a, 0x746b, 0x746c, 0x746e, 0x746f, 0x7471, 0x7472, 0x7473, 0x7474, 0x7475, 0x7478, 0x7479 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xad40[ 96 ] = { 0x747b, 0x747c, 0x747d, 0x747f, 0x7482, 0x7484, 0x7485, 0x7486, 0x7488, 0x7489, 0x748a, 0x748c, 0x748d, 0x748f, 0x7491, 0x7492, 0x7493, 0x7494, 0x7495, 0x7496, 0x7497, 0x7498, 0x7499, 0x749a, 0x749b, 0x749d, 0x749f, 0x74a0, 0x74a1, 0x74a2, 0x74a3, 0x74a4, 0x74a5, 0x74a6, 0x74aa, 0x74ab, 0x74ac, 0x74ad, 0x74ae, 0x74af, 0x74b0, 0x74b1, 0x74b2, 0x74b3, 0x74b4, 0x74b5, 0x74b6, 0x74b7, 0x74b8, 0x74b9, 0x74bb, 0x74bc, 0x74bd, 0x74be, 0x74bf, 0x74c0, 0x74c1, 0x74c2, 0x74c3, 0x74c4, 0x74c5, 0x74c6, 0x74c7, 0xfffd, 0x74c8, 0x74c9, 0x74ca, 0x74cb, 0x74cc, 0x74cd, 0x74ce, 0x74cf, 0x74d0, 0x74d1, 0x74d3, 0x74d4, 0x74d5, 0x74d6, 0x74d7, 0x74d8, 0x74d9, 0x74da, 0x74db, 0x74dd, 0x74df, 0x74e1, 0x74e5, 0x74e7, 0x74e8, 0x74e9, 0x74ea, 0x74eb, 0x74ec, 0x74ed, 0x74f0, 0x74f1 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xae40[ 96 ] = { 0x74f3, 0x74f5, 0x74f8, 0x74f9, 0x74fa, 0x74fb, 0x74fc, 0x74fd, 0x74fe, 0x7500, 0x7501, 0x7502, 0x7503, 0x7505, 0x7506, 0x7507, 0x7508, 0x7509, 0x750a, 0x750b, 0x750c, 0x750e, 0x7510, 0x7512, 0x7514, 0x7515, 0x7516, 0x7517, 0x751b, 0x751d, 0x751e, 0x7520, 0x7521, 0x7522, 0x7523, 0x7524, 0x7526, 0x7527, 0x752a, 0x752e, 0x7534, 0x7536, 0x7539, 0x753c, 0x753d, 0x753f, 0x7541, 0x7542, 0x7543, 0x7544, 0x7546, 0x7547, 0x7549, 0x754a, 0x754d, 0x7550, 0x7551, 0x7552, 0x7553, 0x7555, 0x7556, 0x7557, 0x7558, 0xfffd, 0x755d, 0x755e, 0x755f, 0x7560, 0x7561, 0x7562, 0x7563, 0x7564, 0x7567, 0x7568, 0x7569, 0x756b, 0x756c, 0x756d, 0x756e, 0x756f, 0x7570, 0x7571, 0x7573, 0x7575, 0x7576, 0x7577, 0x757a, 0x757b, 0x757c, 0x757d, 0x757e, 0x7580, 0x7581, 0x7582, 0x7584, 0x7585 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaf40[ 96 ] = { 0x7588, 0x7589, 0x758a, 0x758c, 0x758d, 0x758e, 0x7590, 0x7593, 0x7595, 0x7598, 0x759b, 0x759c, 0x759e, 0x75a2, 0x75a6, 0x75a7, 0x75a8, 0x75a9, 0x75aa, 0x75ad, 0x75b6, 0x75b7, 0x75ba, 0x75bb, 0x75bf, 0x75c0, 0x75c1, 0x75c6, 0x75cb, 0x75cc, 0x75ce, 0x75cf, 0x75d0, 0x75d1, 0x75d3, 0x75d7, 0x75d9, 0x75da, 0x75dc, 0x75dd, 0x75df, 0x75e0, 0x75e1, 0x75e5, 0x75e9, 0x75ec, 0x75ed, 0x75ee, 0x75ef, 0x75f2, 0x75f3, 0x75f5, 0x75f6, 0x75f7, 0x75f8, 0x75fa, 0x75fb, 0x75fd, 0x75fe, 0x7602, 0x7604, 0x7606, 0x7607, 0xfffd, 0x7608, 0x7609, 0x760b, 0x760d, 0x760e, 0x760f, 0x7611, 0x7612, 0x7613, 0x7614, 0x7616, 0x761a, 0x761c, 0x761d, 0x761e, 0x7621, 0x7623, 0x7627, 0x7628, 0x762c, 0x762e, 0x762f, 0x7631, 0x7632, 0x7636, 0x7637, 0x7639, 0x763a, 0x763b, 0x763d, 0x7641, 0x7642 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb040[ 192 ] = { 0x7645, 0x7646, 0x7647, 0x7648, 0x7649, 0x764a, 0x764b, 0x764e, 0x764f, 0x7650, 0x7651, 0x7652, 0x7653, 0x7655, 0x7657, 0x7658, 0x7659, 0x765a, 0x765b, 0x765d, 0x765f, 0x7660, 0x7661, 0x7662, 0x7664, 0x7665, 0x7666, 0x7667, 0x7668, 0x7669, 0x766a, 0x766c, 0x766d, 0x766e, 0x7670, 0x7671, 0x7672, 0x7673, 0x7674, 0x7675, 0x7676, 0x7677, 0x7679, 0x767a, 0x767c, 0x767f, 0x7680, 0x7681, 0x7683, 0x7685, 0x7689, 0x768a, 0x768c, 0x768d, 0x768f, 0x7690, 0x7692, 0x7694, 0x7695, 0x7697, 0x7698, 0x769a, 0x769b, 0xfffd, 0x769c, 0x769d, 0x769e, 0x769f, 0x76a0, 0x76a1, 0x76a2, 0x76a3, 0x76a5, 0x76a6, 0x76a7, 0x76a8, 0x76a9, 0x76aa, 0x76ab, 0x76ac, 0x76ad, 0x76af, 0x76b0, 0x76b3, 0x76b5, 0x76b6, 0x76b7, 0x76b8, 0x76b9, 0x76ba, 0x76bb, 0x76bc, 0x76bd, 0x76be, 0x76c0, 0x76c1, 0x76c3, 0x554a, 0x963f, 0x57c3, 0x6328, 0x54ce, 0x5509, 0x54c0, 0x7691, 0x764c, 0x853c, 0x77ee, 0x827e, 0x788d, 0x7231, 0x9698, 0x978d, 0x6c28, 0x5b89, 0x4ffa, 0x6309, 0x6697, 0x5cb8, 0x80fa, 0x6848, 0x80ae, 0x6602, 0x76ce, 0x51f9, 0x6556, 0x71ac, 0x7ff1, 0x8884, 0x50b2, 0x5965, 0x61ca, 0x6fb3, 0x82ad, 0x634c, 0x6252, 0x53ed, 0x5427, 0x7b06, 0x516b, 0x75a4, 0x5df4, 0x62d4, 0x8dcb, 0x9776, 0x628a, 0x8019, 0x575d, 0x9738, 0x7f62, 0x7238, 0x767d, 0x67cf, 0x767e, 0x6446, 0x4f70, 0x8d25, 0x62dc, 0x7a17, 0x6591, 0x73ed, 0x642c, 0x6273, 0x822c, 0x9881, 0x677f, 0x7248, 0x626e, 0x62cc, 0x4f34, 0x74e3, 0x534a, 0x529e, 0x7eca, 0x90a6, 0x5e2e, 0x6886, 0x699c, 0x8180, 0x7ed1, 0x68d2, 0x78c5, 0x868c, 0x9551, 0x508d, 0x8c24, 0x82de, 0x80de, 0x5305, 0x8912, 0x5265, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb140[ 192 ] = { 0x76c4, 0x76c7, 0x76c9, 0x76cb, 0x76cc, 0x76d3, 0x76d5, 0x76d9, 0x76da, 0x76dc, 0x76dd, 0x76de, 0x76e0, 0x76e1, 0x76e2, 0x76e3, 0x76e4, 0x76e6, 0x76e7, 0x76e8, 0x76e9, 0x76ea, 0x76eb, 0x76ec, 0x76ed, 0x76f0, 0x76f3, 0x76f5, 0x76f6, 0x76f7, 0x76fa, 0x76fb, 0x76fd, 0x76ff, 0x7700, 0x7702, 0x7703, 0x7705, 0x7706, 0x770a, 0x770c, 0x770e, 0x770f, 0x7710, 0x7711, 0x7712, 0x7713, 0x7714, 0x7715, 0x7716, 0x7717, 0x7718, 0x771b, 0x771c, 0x771d, 0x771e, 0x7721, 0x7723, 0x7724, 0x7725, 0x7727, 0x772a, 0x772b, 0xfffd, 0x772c, 0x772e, 0x7730, 0x7731, 0x7732, 0x7733, 0x7734, 0x7739, 0x773b, 0x773d, 0x773e, 0x773f, 0x7742, 0x7744, 0x7745, 0x7746, 0x7748, 0x7749, 0x774a, 0x774b, 0x774c, 0x774d, 0x774e, 0x774f, 0x7752, 0x7753, 0x7754, 0x7755, 0x7756, 0x7757, 0x7758, 0x7759, 0x775c, 0x8584, 0x96f9, 0x4fdd, 0x5821, 0x9971, 0x5b9d, 0x62b1, 0x62a5, 0x66b4, 0x8c79, 0x9c8d, 0x7206, 0x676f, 0x7891, 0x60b2, 0x5351, 0x5317, 0x8f88, 0x80cc, 0x8d1d, 0x94a1, 0x500d, 0x72c8, 0x5907, 0x60eb, 0x7119, 0x88ab, 0x5954, 0x82ef, 0x672c, 0x7b28, 0x5d29, 0x7ef7, 0x752d, 0x6cf5, 0x8e66, 0x8ff8, 0x903c, 0x9f3b, 0x6bd4, 0x9119, 0x7b14, 0x5f7c, 0x78a7, 0x84d6, 0x853d, 0x6bd5, 0x6bd9, 0x6bd6, 0x5e01, 0x5e87, 0x75f9, 0x95ed, 0x655d, 0x5f0a, 0x5fc5, 0x8f9f, 0x58c1, 0x81c2, 0x907f, 0x965b, 0x97ad, 0x8fb9, 0x7f16, 0x8d2c, 0x6241, 0x4fbf, 0x53d8, 0x535e, 0x8fa8, 0x8fa9, 0x8fab, 0x904d, 0x6807, 0x5f6a, 0x8198, 0x8868, 0x9cd6, 0x618b, 0x522b, 0x762a, 0x5f6c, 0x658c, 0x6fd2, 0x6ee8, 0x5bbe, 0x6448, 0x5175, 0x51b0, 0x67c4, 0x4e19, 0x79c9, 0x997c, 0x70b3, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb240[ 192 ] = { 0x775d, 0x775e, 0x775f, 0x7760, 0x7764, 0x7767, 0x7769, 0x776a, 0x776d, 0x776e, 0x776f, 0x7770, 0x7771, 0x7772, 0x7773, 0x7774, 0x7775, 0x7776, 0x7777, 0x7778, 0x777a, 0x777b, 0x777c, 0x7781, 0x7782, 0x7783, 0x7786, 0x7787, 0x7788, 0x7789, 0x778a, 0x778b, 0x778f, 0x7790, 0x7793, 0x7794, 0x7795, 0x7796, 0x7797, 0x7798, 0x7799, 0x779a, 0x779b, 0x779c, 0x779d, 0x779e, 0x77a1, 0x77a3, 0x77a4, 0x77a6, 0x77a8, 0x77ab, 0x77ad, 0x77ae, 0x77af, 0x77b1, 0x77b2, 0x77b4, 0x77b6, 0x77b7, 0x77b8, 0x77b9, 0x77ba, 0xfffd, 0x77bc, 0x77be, 0x77c0, 0x77c1, 0x77c2, 0x77c3, 0x77c4, 0x77c5, 0x77c6, 0x77c7, 0x77c8, 0x77c9, 0x77ca, 0x77cb, 0x77cc, 0x77ce, 0x77cf, 0x77d0, 0x77d1, 0x77d2, 0x77d3, 0x77d4, 0x77d5, 0x77d6, 0x77d8, 0x77d9, 0x77da, 0x77dd, 0x77de, 0x77df, 0x77e0, 0x77e1, 0x77e4, 0x75c5, 0x5e76, 0x73bb, 0x83e0, 0x64ad, 0x62e8, 0x94b5, 0x6ce2, 0x535a, 0x52c3, 0x640f, 0x94c2, 0x7b94, 0x4f2f, 0x5e1b, 0x8236, 0x8116, 0x818a, 0x6e24, 0x6cca, 0x9a73, 0x6355, 0x535c, 0x54fa, 0x8865, 0x57e0, 0x4e0d, 0x5e03, 0x6b65, 0x7c3f, 0x90e8, 0x6016, 0x64e6, 0x731c, 0x88c1, 0x6750, 0x624d, 0x8d22, 0x776c, 0x8e29, 0x91c7, 0x5f69, 0x83dc, 0x8521, 0x9910, 0x53c2, 0x8695, 0x6b8b, 0x60ed, 0x60e8, 0x707f, 0x82cd, 0x8231, 0x4ed3, 0x6ca7, 0x85cf, 0x64cd, 0x7cd9, 0x69fd, 0x66f9, 0x8349, 0x5395, 0x7b56, 0x4fa7, 0x518c, 0x6d4b, 0x5c42, 0x8e6d, 0x63d2, 0x53c9, 0x832c, 0x8336, 0x67e5, 0x78b4, 0x643d, 0x5bdf, 0x5c94, 0x5dee, 0x8be7, 0x62c6, 0x67f4, 0x8c7a, 0x6400, 0x63ba, 0x8749, 0x998b, 0x8c17, 0x7f20, 0x94f2, 0x4ea7, 0x9610, 0x98a4, 0x660c, 0x7316, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb340[ 192 ] = { 0x77e6, 0x77e8, 0x77ea, 0x77ef, 0x77f0, 0x77f1, 0x77f2, 0x77f4, 0x77f5, 0x77f7, 0x77f9, 0x77fa, 0x77fb, 0x77fc, 0x7803, 0x7804, 0x7805, 0x7806, 0x7807, 0x7808, 0x780a, 0x780b, 0x780e, 0x780f, 0x7810, 0x7813, 0x7815, 0x7819, 0x781b, 0x781e, 0x7820, 0x7821, 0x7822, 0x7824, 0x7828, 0x782a, 0x782b, 0x782e, 0x782f, 0x7831, 0x7832, 0x7833, 0x7835, 0x7836, 0x783d, 0x783f, 0x7841, 0x7842, 0x7843, 0x7844, 0x7846, 0x7848, 0x7849, 0x784a, 0x784b, 0x784d, 0x784f, 0x7851, 0x7853, 0x7854, 0x7858, 0x7859, 0x785a, 0xfffd, 0x785b, 0x785c, 0x785e, 0x785f, 0x7860, 0x7861, 0x7862, 0x7863, 0x7864, 0x7865, 0x7866, 0x7867, 0x7868, 0x7869, 0x786f, 0x7870, 0x7871, 0x7872, 0x7873, 0x7874, 0x7875, 0x7876, 0x7878, 0x7879, 0x787a, 0x787b, 0x787d, 0x787e, 0x787f, 0x7880, 0x7881, 0x7882, 0x7883, 0x573a, 0x5c1d, 0x5e38, 0x957f, 0x507f, 0x80a0, 0x5382, 0x655e, 0x7545, 0x5531, 0x5021, 0x8d85, 0x6284, 0x949e, 0x671d, 0x5632, 0x6f6e, 0x5de2, 0x5435, 0x7092, 0x8f66, 0x626f, 0x64a4, 0x63a3, 0x5f7b, 0x6f88, 0x90f4, 0x81e3, 0x8fb0, 0x5c18, 0x6668, 0x5ff1, 0x6c89, 0x9648, 0x8d81, 0x886c, 0x6491, 0x79f0, 0x57ce, 0x6a59, 0x6210, 0x5448, 0x4e58, 0x7a0b, 0x60e9, 0x6f84, 0x8bda, 0x627f, 0x901e, 0x9a8b, 0x79e4, 0x5403, 0x75f4, 0x6301, 0x5319, 0x6c60, 0x8fdf, 0x5f1b, 0x9a70, 0x803b, 0x9f7f, 0x4f88, 0x5c3a, 0x8d64, 0x7fc5, 0x65a5, 0x70bd, 0x5145, 0x51b2, 0x866b, 0x5d07, 0x5ba0, 0x62bd, 0x916c, 0x7574, 0x8e0c, 0x7a20, 0x6101, 0x7b79, 0x4ec7, 0x7ef8, 0x7785, 0x4e11, 0x81ed, 0x521d, 0x51fa, 0x6a71, 0x53a8, 0x8e87, 0x9504, 0x96cf, 0x6ec1, 0x9664, 0x695a, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb440[ 192 ] = { 0x7884, 0x7885, 0x7886, 0x7888, 0x788a, 0x788b, 0x788f, 0x7890, 0x7892, 0x7894, 0x7895, 0x7896, 0x7899, 0x789d, 0x789e, 0x78a0, 0x78a2, 0x78a4, 0x78a6, 0x78a8, 0x78a9, 0x78aa, 0x78ab, 0x78ac, 0x78ad, 0x78ae, 0x78af, 0x78b5, 0x78b6, 0x78b7, 0x78b8, 0x78ba, 0x78bb, 0x78bc, 0x78bd, 0x78bf, 0x78c0, 0x78c2, 0x78c3, 0x78c4, 0x78c6, 0x78c7, 0x78c8, 0x78cc, 0x78cd, 0x78ce, 0x78cf, 0x78d1, 0x78d2, 0x78d3, 0x78d6, 0x78d7, 0x78d8, 0x78da, 0x78db, 0x78dc, 0x78dd, 0x78de, 0x78df, 0x78e0, 0x78e1, 0x78e2, 0x78e3, 0xfffd, 0x78e4, 0x78e5, 0x78e6, 0x78e7, 0x78e9, 0x78ea, 0x78eb, 0x78ed, 0x78ee, 0x78ef, 0x78f0, 0x78f1, 0x78f3, 0x78f5, 0x78f6, 0x78f8, 0x78f9, 0x78fb, 0x78fc, 0x78fd, 0x78fe, 0x78ff, 0x7900, 0x7902, 0x7903, 0x7904, 0x7906, 0x7907, 0x7908, 0x7909, 0x790a, 0x790b, 0x790c, 0x7840, 0x50a8, 0x77d7, 0x6410, 0x89e6, 0x5904, 0x63e3, 0x5ddd, 0x7a7f, 0x693d, 0x4f20, 0x8239, 0x5598, 0x4e32, 0x75ae, 0x7a97, 0x5e62, 0x5e8a, 0x95ef, 0x521b, 0x5439, 0x708a, 0x6376, 0x9524, 0x5782, 0x6625, 0x693f, 0x9187, 0x5507, 0x6df3, 0x7eaf, 0x8822, 0x6233, 0x7ef0, 0x75b5, 0x8328, 0x78c1, 0x96cc, 0x8f9e, 0x6148, 0x74f7, 0x8bcd, 0x6b64, 0x523a, 0x8d50, 0x6b21, 0x806a, 0x8471, 0x56f1, 0x5306, 0x4ece, 0x4e1b, 0x51d1, 0x7c97, 0x918b, 0x7c07, 0x4fc3, 0x8e7f, 0x7be1, 0x7a9c, 0x6467, 0x5d14, 0x50ac, 0x8106, 0x7601, 0x7cb9, 0x6dec, 0x7fe0, 0x6751, 0x5b58, 0x5bf8, 0x78cb, 0x64ae, 0x6413, 0x63aa, 0x632b, 0x9519, 0x642d, 0x8fbe, 0x7b54, 0x7629, 0x6253, 0x5927, 0x5446, 0x6b79, 0x50a3, 0x6234, 0x5e26, 0x6b86, 0x4ee3, 0x8d37, 0x888b, 0x5f85, 0x902e, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb540[ 192 ] = { 0x790d, 0x790e, 0x790f, 0x7910, 0x7911, 0x7912, 0x7914, 0x7915, 0x7916, 0x7917, 0x7918, 0x7919, 0x791a, 0x791b, 0x791c, 0x791d, 0x791f, 0x7920, 0x7921, 0x7922, 0x7923, 0x7925, 0x7926, 0x7927, 0x7928, 0x7929, 0x792a, 0x792b, 0x792c, 0x792d, 0x792e, 0x792f, 0x7930, 0x7931, 0x7932, 0x7933, 0x7935, 0x7936, 0x7937, 0x7938, 0x7939, 0x793d, 0x793f, 0x7942, 0x7943, 0x7944, 0x7945, 0x7947, 0x794a, 0x794b, 0x794c, 0x794d, 0x794e, 0x794f, 0x7950, 0x7951, 0x7952, 0x7954, 0x7955, 0x7958, 0x7959, 0x7961, 0x7963, 0xfffd, 0x7964, 0x7966, 0x7969, 0x796a, 0x796b, 0x796c, 0x796e, 0x7970, 0x7971, 0x7972, 0x7973, 0x7974, 0x7975, 0x7976, 0x7979, 0x797b, 0x797c, 0x797d, 0x797e, 0x797f, 0x7982, 0x7983, 0x7986, 0x7987, 0x7988, 0x7989, 0x798b, 0x798c, 0x798d, 0x798e, 0x7990, 0x7991, 0x7992, 0x6020, 0x803d, 0x62c5, 0x4e39, 0x5355, 0x90f8, 0x63b8, 0x80c6, 0x65e6, 0x6c2e, 0x4f46, 0x60ee, 0x6de1, 0x8bde, 0x5f39, 0x86cb, 0x5f53, 0x6321, 0x515a, 0x8361, 0x6863, 0x5200, 0x6363, 0x8e48, 0x5012, 0x5c9b, 0x7977, 0x5bfc, 0x5230, 0x7a3b, 0x60bc, 0x9053, 0x76d7, 0x5fb7, 0x5f97, 0x7684, 0x8e6c, 0x706f, 0x767b, 0x7b49, 0x77aa, 0x51f3, 0x9093, 0x5824, 0x4f4e, 0x6ef4, 0x8fea, 0x654c, 0x7b1b, 0x72c4, 0x6da4, 0x7fdf, 0x5ae1, 0x62b5, 0x5e95, 0x5730, 0x8482, 0x7b2c, 0x5e1d, 0x5f1f, 0x9012, 0x7f14, 0x98a0, 0x6382, 0x6ec7, 0x7898, 0x70b9, 0x5178, 0x975b, 0x57ab, 0x7535, 0x4f43, 0x7538, 0x5e97, 0x60e6, 0x5960, 0x6dc0, 0x6bbf, 0x7889, 0x53fc, 0x96d5, 0x51cb, 0x5201, 0x6389, 0x540a, 0x9493, 0x8c03, 0x8dcc, 0x7239, 0x789f, 0x8776, 0x8fed, 0x8c0d, 0x53e0, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb640[ 192 ] = { 0x7993, 0x7994, 0x7995, 0x7996, 0x7997, 0x7998, 0x7999, 0x799b, 0x799c, 0x799d, 0x799e, 0x799f, 0x79a0, 0x79a1, 0x79a2, 0x79a3, 0x79a4, 0x79a5, 0x79a6, 0x79a8, 0x79a9, 0x79aa, 0x79ab, 0x79ac, 0x79ad, 0x79ae, 0x79af, 0x79b0, 0x79b1, 0x79b2, 0x79b4, 0x79b5, 0x79b6, 0x79b7, 0x79b8, 0x79bc, 0x79bf, 0x79c2, 0x79c4, 0x79c5, 0x79c7, 0x79c8, 0x79ca, 0x79cc, 0x79ce, 0x79cf, 0x79d0, 0x79d3, 0x79d4, 0x79d6, 0x79d7, 0x79d9, 0x79da, 0x79db, 0x79dc, 0x79dd, 0x79de, 0x79e0, 0x79e1, 0x79e2, 0x79e5, 0x79e8, 0x79ea, 0xfffd, 0x79ec, 0x79ee, 0x79f1, 0x79f2, 0x79f3, 0x79f4, 0x79f5, 0x79f6, 0x79f7, 0x79f9, 0x79fa, 0x79fc, 0x79fe, 0x79ff, 0x7a01, 0x7a04, 0x7a05, 0x7a07, 0x7a08, 0x7a09, 0x7a0a, 0x7a0c, 0x7a0f, 0x7a10, 0x7a11, 0x7a12, 0x7a13, 0x7a15, 0x7a16, 0x7a18, 0x7a19, 0x7a1b, 0x7a1c, 0x4e01, 0x76ef, 0x53ee, 0x9489, 0x9876, 0x9f0e, 0x952d, 0x5b9a, 0x8ba2, 0x4e22, 0x4e1c, 0x51ac, 0x8463, 0x61c2, 0x52a8, 0x680b, 0x4f97, 0x606b, 0x51bb, 0x6d1e, 0x515c, 0x6296, 0x6597, 0x9661, 0x8c46, 0x9017, 0x75d8, 0x90fd, 0x7763, 0x6bd2, 0x728a, 0x72ec, 0x8bfb, 0x5835, 0x7779, 0x8d4c, 0x675c, 0x9540, 0x809a, 0x5ea6, 0x6e21, 0x5992, 0x7aef, 0x77ed, 0x953b, 0x6bb5, 0x65ad, 0x7f0e, 0x5806, 0x5151, 0x961f, 0x5bf9, 0x58a9, 0x5428, 0x8e72, 0x6566, 0x987f, 0x56e4, 0x949d, 0x76fe, 0x9041, 0x6387, 0x54c6, 0x591a, 0x593a, 0x579b, 0x8eb2, 0x6735, 0x8dfa, 0x8235, 0x5241, 0x60f0, 0x5815, 0x86fe, 0x5ce8, 0x9e45, 0x4fc4, 0x989d, 0x8bb9, 0x5a25, 0x6076, 0x5384, 0x627c, 0x904f, 0x9102, 0x997f, 0x6069, 0x800c, 0x513f, 0x8033, 0x5c14, 0x9975, 0x6d31, 0x4e8c, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb740[ 192 ] = { 0x7a1d, 0x7a1f, 0x7a21, 0x7a22, 0x7a24, 0x7a25, 0x7a26, 0x7a27, 0x7a28, 0x7a29, 0x7a2a, 0x7a2b, 0x7a2c, 0x7a2d, 0x7a2e, 0x7a2f, 0x7a30, 0x7a31, 0x7a32, 0x7a34, 0x7a35, 0x7a36, 0x7a38, 0x7a3a, 0x7a3e, 0x7a40, 0x7a41, 0x7a42, 0x7a43, 0x7a44, 0x7a45, 0x7a47, 0x7a48, 0x7a49, 0x7a4a, 0x7a4b, 0x7a4c, 0x7a4d, 0x7a4e, 0x7a4f, 0x7a50, 0x7a52, 0x7a53, 0x7a54, 0x7a55, 0x7a56, 0x7a58, 0x7a59, 0x7a5a, 0x7a5b, 0x7a5c, 0x7a5d, 0x7a5e, 0x7a5f, 0x7a60, 0x7a61, 0x7a62, 0x7a63, 0x7a64, 0x7a65, 0x7a66, 0x7a67, 0x7a68, 0xfffd, 0x7a69, 0x7a6a, 0x7a6b, 0x7a6c, 0x7a6d, 0x7a6e, 0x7a6f, 0x7a71, 0x7a72, 0x7a73, 0x7a75, 0x7a7b, 0x7a7c, 0x7a7d, 0x7a7e, 0x7a82, 0x7a85, 0x7a87, 0x7a89, 0x7a8a, 0x7a8b, 0x7a8c, 0x7a8e, 0x7a8f, 0x7a90, 0x7a93, 0x7a94, 0x7a99, 0x7a9a, 0x7a9b, 0x7a9e, 0x7aa1, 0x7aa2, 0x8d30, 0x53d1, 0x7f5a, 0x7b4f, 0x4f10, 0x4e4f, 0x9600, 0x6cd5, 0x73d0, 0x85e9, 0x5e06, 0x756a, 0x7ffb, 0x6a0a, 0x77fe, 0x9492, 0x7e41, 0x51e1, 0x70e6, 0x53cd, 0x8fd4, 0x8303, 0x8d29, 0x72af, 0x996d, 0x6cdb, 0x574a, 0x82b3, 0x65b9, 0x80aa, 0x623f, 0x9632, 0x59a8, 0x4eff, 0x8bbf, 0x7eba, 0x653e, 0x83f2, 0x975e, 0x5561, 0x98de, 0x80a5, 0x532a, 0x8bfd, 0x5420, 0x80ba, 0x5e9f, 0x6cb8, 0x8d39, 0x82ac, 0x915a, 0x5429, 0x6c1b, 0x5206, 0x7eb7, 0x575f, 0x711a, 0x6c7e, 0x7c89, 0x594b, 0x4efd, 0x5fff, 0x6124, 0x7caa, 0x4e30, 0x5c01, 0x67ab, 0x8702, 0x5cf0, 0x950b, 0x98ce, 0x75af, 0x70fd, 0x9022, 0x51af, 0x7f1d, 0x8bbd, 0x5949, 0x51e4, 0x4f5b, 0x5426, 0x592b, 0x6577, 0x80a4, 0x5b75, 0x6276, 0x62c2, 0x8f90, 0x5e45, 0x6c1f, 0x7b26, 0x4f0f, 0x4fd8, 0x670d, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb840[ 192 ] = { 0x7aa3, 0x7aa4, 0x7aa7, 0x7aa9, 0x7aaa, 0x7aab, 0x7aae, 0x7aaf, 0x7ab0, 0x7ab1, 0x7ab2, 0x7ab4, 0x7ab5, 0x7ab6, 0x7ab7, 0x7ab8, 0x7ab9, 0x7aba, 0x7abb, 0x7abc, 0x7abd, 0x7abe, 0x7ac0, 0x7ac1, 0x7ac2, 0x7ac3, 0x7ac4, 0x7ac5, 0x7ac6, 0x7ac7, 0x7ac8, 0x7ac9, 0x7aca, 0x7acc, 0x7acd, 0x7ace, 0x7acf, 0x7ad0, 0x7ad1, 0x7ad2, 0x7ad3, 0x7ad4, 0x7ad5, 0x7ad7, 0x7ad8, 0x7ada, 0x7adb, 0x7adc, 0x7add, 0x7ae1, 0x7ae2, 0x7ae4, 0x7ae7, 0x7ae8, 0x7ae9, 0x7aea, 0x7aeb, 0x7aec, 0x7aee, 0x7af0, 0x7af1, 0x7af2, 0x7af3, 0xfffd, 0x7af4, 0x7af5, 0x7af6, 0x7af7, 0x7af8, 0x7afb, 0x7afc, 0x7afe, 0x7b00, 0x7b01, 0x7b02, 0x7b05, 0x7b07, 0x7b09, 0x7b0c, 0x7b0d, 0x7b0e, 0x7b10, 0x7b12, 0x7b13, 0x7b16, 0x7b17, 0x7b18, 0x7b1a, 0x7b1c, 0x7b1d, 0x7b1f, 0x7b21, 0x7b22, 0x7b23, 0x7b27, 0x7b29, 0x7b2d, 0x6d6e, 0x6daa, 0x798f, 0x88b1, 0x5f17, 0x752b, 0x629a, 0x8f85, 0x4fef, 0x91dc, 0x65a7, 0x812f, 0x8151, 0x5e9c, 0x8150, 0x8d74, 0x526f, 0x8986, 0x8d4b, 0x590d, 0x5085, 0x4ed8, 0x961c, 0x7236, 0x8179, 0x8d1f, 0x5bcc, 0x8ba3, 0x9644, 0x5987, 0x7f1a, 0x5490, 0x5676, 0x560e, 0x8be5, 0x6539, 0x6982, 0x9499, 0x76d6, 0x6e89, 0x5e72, 0x7518, 0x6746, 0x67d1, 0x7aff, 0x809d, 0x8d76, 0x611f, 0x79c6, 0x6562, 0x8d63, 0x5188, 0x521a, 0x94a2, 0x7f38, 0x809b, 0x7eb2, 0x5c97, 0x6e2f, 0x6760, 0x7bd9, 0x768b, 0x9ad8, 0x818f, 0x7f94, 0x7cd5, 0x641e, 0x9550, 0x7a3f, 0x544a, 0x54e5, 0x6b4c, 0x6401, 0x6208, 0x9e3d, 0x80f3, 0x7599, 0x5272, 0x9769, 0x845b, 0x683c, 0x86e4, 0x9601, 0x9694, 0x94ec, 0x4e2a, 0x5404, 0x7ed9, 0x6839, 0x8ddf, 0x8015, 0x66f4, 0x5e9a, 0x7fb9, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb940[ 192 ] = { 0x7b2f, 0x7b30, 0x7b32, 0x7b34, 0x7b35, 0x7b36, 0x7b37, 0x7b39, 0x7b3b, 0x7b3d, 0x7b3f, 0x7b40, 0x7b41, 0x7b42, 0x7b43, 0x7b44, 0x7b46, 0x7b48, 0x7b4a, 0x7b4d, 0x7b4e, 0x7b53, 0x7b55, 0x7b57, 0x7b59, 0x7b5c, 0x7b5e, 0x7b5f, 0x7b61, 0x7b63, 0x7b64, 0x7b65, 0x7b66, 0x7b67, 0x7b68, 0x7b69, 0x7b6a, 0x7b6b, 0x7b6c, 0x7b6d, 0x7b6f, 0x7b70, 0x7b73, 0x7b74, 0x7b76, 0x7b78, 0x7b7a, 0x7b7c, 0x7b7d, 0x7b7f, 0x7b81, 0x7b82, 0x7b83, 0x7b84, 0x7b86, 0x7b87, 0x7b88, 0x7b89, 0x7b8a, 0x7b8b, 0x7b8c, 0x7b8e, 0x7b8f, 0xfffd, 0x7b91, 0x7b92, 0x7b93, 0x7b96, 0x7b98, 0x7b99, 0x7b9a, 0x7b9b, 0x7b9e, 0x7b9f, 0x7ba0, 0x7ba3, 0x7ba4, 0x7ba5, 0x7bae, 0x7baf, 0x7bb0, 0x7bb2, 0x7bb3, 0x7bb5, 0x7bb6, 0x7bb7, 0x7bb9, 0x7bba, 0x7bbb, 0x7bbc, 0x7bbd, 0x7bbe, 0x7bbf, 0x7bc0, 0x7bc2, 0x7bc3, 0x7bc4, 0x57c2, 0x803f, 0x6897, 0x5de5, 0x653b, 0x529f, 0x606d, 0x9f9a, 0x4f9b, 0x8eac, 0x516c, 0x5bab, 0x5f13, 0x5de9, 0x6c5e, 0x62f1, 0x8d21, 0x5171, 0x94a9, 0x52fe, 0x6c9f, 0x82df, 0x72d7, 0x57a2, 0x6784, 0x8d2d, 0x591f, 0x8f9c, 0x83c7, 0x5495, 0x7b8d, 0x4f30, 0x6cbd, 0x5b64, 0x59d1, 0x9f13, 0x53e4, 0x86ca, 0x9aa8, 0x8c37, 0x80a1, 0x6545, 0x987e, 0x56fa, 0x96c7, 0x522e, 0x74dc, 0x5250, 0x5be1, 0x6302, 0x8902, 0x4e56, 0x62d0, 0x602a, 0x68fa, 0x5173, 0x5b98, 0x51a0, 0x89c2, 0x7ba1, 0x9986, 0x7f50, 0x60ef, 0x704c, 0x8d2f, 0x5149, 0x5e7f, 0x901b, 0x7470, 0x89c4, 0x572d, 0x7845, 0x5f52, 0x9f9f, 0x95fa, 0x8f68, 0x9b3c, 0x8be1, 0x7678, 0x6842, 0x67dc, 0x8dea, 0x8d35, 0x523d, 0x8f8a, 0x6eda, 0x68cd, 0x9505, 0x90ed, 0x56fd, 0x679c, 0x88f9, 0x8fc7, 0x54c8, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xba40[ 192 ] = { 0x7bc5, 0x7bc8, 0x7bc9, 0x7bca, 0x7bcb, 0x7bcd, 0x7bce, 0x7bcf, 0x7bd0, 0x7bd2, 0x7bd4, 0x7bd5, 0x7bd6, 0x7bd7, 0x7bd8, 0x7bdb, 0x7bdc, 0x7bde, 0x7bdf, 0x7be0, 0x7be2, 0x7be3, 0x7be4, 0x7be7, 0x7be8, 0x7be9, 0x7beb, 0x7bec, 0x7bed, 0x7bef, 0x7bf0, 0x7bf2, 0x7bf3, 0x7bf4, 0x7bf5, 0x7bf6, 0x7bf8, 0x7bf9, 0x7bfa, 0x7bfb, 0x7bfd, 0x7bff, 0x7c00, 0x7c01, 0x7c02, 0x7c03, 0x7c04, 0x7c05, 0x7c06, 0x7c08, 0x7c09, 0x7c0a, 0x7c0d, 0x7c0e, 0x7c10, 0x7c11, 0x7c12, 0x7c13, 0x7c14, 0x7c15, 0x7c17, 0x7c18, 0x7c19, 0xfffd, 0x7c1a, 0x7c1b, 0x7c1c, 0x7c1d, 0x7c1e, 0x7c20, 0x7c21, 0x7c22, 0x7c23, 0x7c24, 0x7c25, 0x7c28, 0x7c29, 0x7c2b, 0x7c2c, 0x7c2d, 0x7c2e, 0x7c2f, 0x7c30, 0x7c31, 0x7c32, 0x7c33, 0x7c34, 0x7c35, 0x7c36, 0x7c37, 0x7c39, 0x7c3a, 0x7c3b, 0x7c3c, 0x7c3d, 0x7c3e, 0x7c42, 0x9ab8, 0x5b69, 0x6d77, 0x6c26, 0x4ea5, 0x5bb3, 0x9a87, 0x9163, 0x61a8, 0x90af, 0x97e9, 0x542b, 0x6db5, 0x5bd2, 0x51fd, 0x558a, 0x7f55, 0x7ff0, 0x64bc, 0x634d, 0x65f1, 0x61be, 0x608d, 0x710a, 0x6c57, 0x6c49, 0x592f, 0x676d, 0x822a, 0x58d5, 0x568e, 0x8c6a, 0x6beb, 0x90dd, 0x597d, 0x8017, 0x53f7, 0x6d69, 0x5475, 0x559d, 0x8377, 0x83cf, 0x6838, 0x79be, 0x548c, 0x4f55, 0x5408, 0x76d2, 0x8c89, 0x9602, 0x6cb3, 0x6db8, 0x8d6b, 0x8910, 0x9e64, 0x8d3a, 0x563f, 0x9ed1, 0x75d5, 0x5f88, 0x72e0, 0x6068, 0x54fc, 0x4ea8, 0x6a2a, 0x8861, 0x6052, 0x8f70, 0x54c4, 0x70d8, 0x8679, 0x9e3f, 0x6d2a, 0x5b8f, 0x5f18, 0x7ea2, 0x5589, 0x4faf, 0x7334, 0x543c, 0x539a, 0x5019, 0x540e, 0x547c, 0x4e4e, 0x5ffd, 0x745a, 0x58f6, 0x846b, 0x80e1, 0x8774, 0x72d0, 0x7cca, 0x6e56, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbb40[ 192 ] = { 0x7c43, 0x7c44, 0x7c45, 0x7c46, 0x7c47, 0x7c48, 0x7c49, 0x7c4a, 0x7c4b, 0x7c4c, 0x7c4e, 0x7c4f, 0x7c50, 0x7c51, 0x7c52, 0x7c53, 0x7c54, 0x7c55, 0x7c56, 0x7c57, 0x7c58, 0x7c59, 0x7c5a, 0x7c5b, 0x7c5c, 0x7c5d, 0x7c5e, 0x7c5f, 0x7c60, 0x7c61, 0x7c62, 0x7c63, 0x7c64, 0x7c65, 0x7c66, 0x7c67, 0x7c68, 0x7c69, 0x7c6a, 0x7c6b, 0x7c6c, 0x7c6d, 0x7c6e, 0x7c6f, 0x7c70, 0x7c71, 0x7c72, 0x7c75, 0x7c76, 0x7c77, 0x7c78, 0x7c79, 0x7c7a, 0x7c7e, 0x7c7f, 0x7c80, 0x7c81, 0x7c82, 0x7c83, 0x7c84, 0x7c85, 0x7c86, 0x7c87, 0xfffd, 0x7c88, 0x7c8a, 0x7c8b, 0x7c8c, 0x7c8d, 0x7c8e, 0x7c8f, 0x7c90, 0x7c93, 0x7c94, 0x7c96, 0x7c99, 0x7c9a, 0x7c9b, 0x7ca0, 0x7ca1, 0x7ca3, 0x7ca6, 0x7ca7, 0x7ca8, 0x7ca9, 0x7cab, 0x7cac, 0x7cad, 0x7caf, 0x7cb0, 0x7cb4, 0x7cb5, 0x7cb6, 0x7cb7, 0x7cb8, 0x7cba, 0x7cbb, 0x5f27, 0x864e, 0x552c, 0x62a4, 0x4e92, 0x6caa, 0x6237, 0x82b1, 0x54d7, 0x534e, 0x733e, 0x6ed1, 0x753b, 0x5212, 0x5316, 0x8bdd, 0x69d0, 0x5f8a, 0x6000, 0x6dee, 0x574f, 0x6b22, 0x73af, 0x6853, 0x8fd8, 0x7f13, 0x6362, 0x60a3, 0x5524, 0x75ea, 0x8c62, 0x7115, 0x6da3, 0x5ba6, 0x5e7b, 0x8352, 0x614c, 0x9ec4, 0x78fa, 0x8757, 0x7c27, 0x7687, 0x51f0, 0x60f6, 0x714c, 0x6643, 0x5e4c, 0x604d, 0x8c0e, 0x7070, 0x6325, 0x8f89, 0x5fbd, 0x6062, 0x86d4, 0x56de, 0x6bc1, 0x6094, 0x6167, 0x5349, 0x60e0, 0x6666, 0x8d3f, 0x79fd, 0x4f1a, 0x70e9, 0x6c47, 0x8bb3, 0x8bf2, 0x7ed8, 0x8364, 0x660f, 0x5a5a, 0x9b42, 0x6d51, 0x6df7, 0x8c41, 0x6d3b, 0x4f19, 0x706b, 0x83b7, 0x6216, 0x60d1, 0x970d, 0x8d27, 0x7978, 0x51fb, 0x573e, 0x57fa, 0x673a, 0x7578, 0x7a3d, 0x79ef, 0x7b95, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbc40[ 192 ] = { 0x7cbf, 0x7cc0, 0x7cc2, 0x7cc3, 0x7cc4, 0x7cc6, 0x7cc9, 0x7ccb, 0x7cce, 0x7ccf, 0x7cd0, 0x7cd1, 0x7cd2, 0x7cd3, 0x7cd4, 0x7cd8, 0x7cda, 0x7cdb, 0x7cdd, 0x7cde, 0x7ce1, 0x7ce2, 0x7ce3, 0x7ce4, 0x7ce5, 0x7ce6, 0x7ce7, 0x7ce9, 0x7cea, 0x7ceb, 0x7cec, 0x7ced, 0x7cee, 0x7cf0, 0x7cf1, 0x7cf2, 0x7cf3, 0x7cf4, 0x7cf5, 0x7cf6, 0x7cf7, 0x7cf9, 0x7cfa, 0x7cfc, 0x7cfd, 0x7cfe, 0x7cff, 0x7d00, 0x7d01, 0x7d02, 0x7d03, 0x7d04, 0x7d05, 0x7d06, 0x7d07, 0x7d08, 0x7d09, 0x7d0b, 0x7d0c, 0x7d0d, 0x7d0e, 0x7d0f, 0x7d10, 0xfffd, 0x7d11, 0x7d12, 0x7d13, 0x7d14, 0x7d15, 0x7d16, 0x7d17, 0x7d18, 0x7d19, 0x7d1a, 0x7d1b, 0x7d1c, 0x7d1d, 0x7d1e, 0x7d1f, 0x7d21, 0x7d23, 0x7d24, 0x7d25, 0x7d26, 0x7d28, 0x7d29, 0x7d2a, 0x7d2c, 0x7d2d, 0x7d2e, 0x7d30, 0x7d31, 0x7d32, 0x7d33, 0x7d34, 0x7d35, 0x7d36, 0x808c, 0x9965, 0x8ff9, 0x6fc0, 0x8ba5, 0x9e21, 0x59ec, 0x7ee9, 0x7f09, 0x5409, 0x6781, 0x68d8, 0x8f91, 0x7c4d, 0x96c6, 0x53ca, 0x6025, 0x75be, 0x6c72, 0x5373, 0x5ac9, 0x7ea7, 0x6324, 0x51e0, 0x810a, 0x5df1, 0x84df, 0x6280, 0x5180, 0x5b63, 0x4f0e, 0x796d, 0x5242, 0x60b8, 0x6d4e, 0x5bc4, 0x5bc2, 0x8ba1, 0x8bb0, 0x65e2, 0x5fcc, 0x9645, 0x5993, 0x7ee7, 0x7eaa, 0x5609, 0x67b7, 0x5939, 0x4f73, 0x5bb6, 0x52a0, 0x835a, 0x988a, 0x8d3e, 0x7532, 0x94be, 0x5047, 0x7a3c, 0x4ef7, 0x67b6, 0x9a7e, 0x5ac1, 0x6b7c, 0x76d1, 0x575a, 0x5c16, 0x7b3a, 0x95f4, 0x714e, 0x517c, 0x80a9, 0x8270, 0x5978, 0x7f04, 0x8327, 0x68c0, 0x67ec, 0x78b1, 0x7877, 0x62e3, 0x6361, 0x7b80, 0x4fed, 0x526a, 0x51cf, 0x8350, 0x69db, 0x9274, 0x8df5, 0x8d31, 0x89c1, 0x952e, 0x7bad, 0x4ef6, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbd40[ 192 ] = { 0x7d37, 0x7d38, 0x7d39, 0x7d3a, 0x7d3b, 0x7d3c, 0x7d3d, 0x7d3e, 0x7d3f, 0x7d40, 0x7d41, 0x7d42, 0x7d43, 0x7d44, 0x7d45, 0x7d46, 0x7d47, 0x7d48, 0x7d49, 0x7d4a, 0x7d4b, 0x7d4c, 0x7d4d, 0x7d4e, 0x7d4f, 0x7d50, 0x7d51, 0x7d52, 0x7d53, 0x7d54, 0x7d55, 0x7d56, 0x7d57, 0x7d58, 0x7d59, 0x7d5a, 0x7d5b, 0x7d5c, 0x7d5d, 0x7d5e, 0x7d5f, 0x7d60, 0x7d61, 0x7d62, 0x7d63, 0x7d64, 0x7d65, 0x7d66, 0x7d67, 0x7d68, 0x7d69, 0x7d6a, 0x7d6b, 0x7d6c, 0x7d6d, 0x7d6f, 0x7d70, 0x7d71, 0x7d72, 0x7d73, 0x7d74, 0x7d75, 0x7d76, 0xfffd, 0x7d78, 0x7d79, 0x7d7a, 0x7d7b, 0x7d7c, 0x7d7d, 0x7d7e, 0x7d7f, 0x7d80, 0x7d81, 0x7d82, 0x7d83, 0x7d84, 0x7d85, 0x7d86, 0x7d87, 0x7d88, 0x7d89, 0x7d8a, 0x7d8b, 0x7d8c, 0x7d8d, 0x7d8e, 0x7d8f, 0x7d90, 0x7d91, 0x7d92, 0x7d93, 0x7d94, 0x7d95, 0x7d96, 0x7d97, 0x7d98, 0x5065, 0x8230, 0x5251, 0x996f, 0x6e10, 0x6e85, 0x6da7, 0x5efa, 0x50f5, 0x59dc, 0x5c06, 0x6d46, 0x6c5f, 0x7586, 0x848b, 0x6868, 0x5956, 0x8bb2, 0x5320, 0x9171, 0x964d, 0x8549, 0x6912, 0x7901, 0x7126, 0x80f6, 0x4ea4, 0x90ca, 0x6d47, 0x9a84, 0x5a07, 0x56bc, 0x6405, 0x94f0, 0x77eb, 0x4fa5, 0x811a, 0x72e1, 0x89d2, 0x997a, 0x7f34, 0x7ede, 0x527f, 0x6559, 0x9175, 0x8f7f, 0x8f83, 0x53eb, 0x7a96, 0x63ed, 0x63a5, 0x7686, 0x79f8, 0x8857, 0x9636, 0x622a, 0x52ab, 0x8282, 0x6854, 0x6770, 0x6377, 0x776b, 0x7aed, 0x6d01, 0x7ed3, 0x89e3, 0x59d0, 0x6212, 0x85c9, 0x82a5, 0x754c, 0x501f, 0x4ecb, 0x75a5, 0x8beb, 0x5c4a, 0x5dfe, 0x7b4b, 0x65a4, 0x91d1, 0x4eca, 0x6d25, 0x895f, 0x7d27, 0x9526, 0x4ec5, 0x8c28, 0x8fdb, 0x9773, 0x664b, 0x7981, 0x8fd1, 0x70ec, 0x6d78, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbe40[ 192 ] = { 0x7d99, 0x7d9a, 0x7d9b, 0x7d9c, 0x7d9d, 0x7d9e, 0x7d9f, 0x7da0, 0x7da1, 0x7da2, 0x7da3, 0x7da4, 0x7da5, 0x7da7, 0x7da8, 0x7da9, 0x7daa, 0x7dab, 0x7dac, 0x7dad, 0x7daf, 0x7db0, 0x7db1, 0x7db2, 0x7db3, 0x7db4, 0x7db5, 0x7db6, 0x7db7, 0x7db8, 0x7db9, 0x7dba, 0x7dbb, 0x7dbc, 0x7dbd, 0x7dbe, 0x7dbf, 0x7dc0, 0x7dc1, 0x7dc2, 0x7dc3, 0x7dc4, 0x7dc5, 0x7dc6, 0x7dc7, 0x7dc8, 0x7dc9, 0x7dca, 0x7dcb, 0x7dcc, 0x7dcd, 0x7dce, 0x7dcf, 0x7dd0, 0x7dd1, 0x7dd2, 0x7dd3, 0x7dd4, 0x7dd5, 0x7dd6, 0x7dd7, 0x7dd8, 0x7dd9, 0xfffd, 0x7dda, 0x7ddb, 0x7ddc, 0x7ddd, 0x7dde, 0x7ddf, 0x7de0, 0x7de1, 0x7de2, 0x7de3, 0x7de4, 0x7de5, 0x7de6, 0x7de7, 0x7de8, 0x7de9, 0x7dea, 0x7deb, 0x7dec, 0x7ded, 0x7dee, 0x7def, 0x7df0, 0x7df1, 0x7df2, 0x7df3, 0x7df4, 0x7df5, 0x7df6, 0x7df7, 0x7df8, 0x7df9, 0x7dfa, 0x5c3d, 0x52b2, 0x8346, 0x5162, 0x830e, 0x775b, 0x6676, 0x9cb8, 0x4eac, 0x60ca, 0x7cbe, 0x7cb3, 0x7ecf, 0x4e95, 0x8b66, 0x666f, 0x9888, 0x9759, 0x5883, 0x656c, 0x955c, 0x5f84, 0x75c9, 0x9756, 0x7adf, 0x7ade, 0x51c0, 0x70af, 0x7a98, 0x63ea, 0x7a76, 0x7ea0, 0x7396, 0x97ed, 0x4e45, 0x7078, 0x4e5d, 0x9152, 0x53a9, 0x6551, 0x65e7, 0x81fc, 0x8205, 0x548e, 0x5c31, 0x759a, 0x97a0, 0x62d8, 0x72d9, 0x75bd, 0x5c45, 0x9a79, 0x83ca, 0x5c40, 0x5480, 0x77e9, 0x4e3e, 0x6cae, 0x805a, 0x62d2, 0x636e, 0x5de8, 0x5177, 0x8ddd, 0x8e1e, 0x952f, 0x4ff1, 0x53e5, 0x60e7, 0x70ac, 0x5267, 0x6350, 0x9e43, 0x5a1f, 0x5026, 0x7737, 0x5377, 0x7ee2, 0x6485, 0x652b, 0x6289, 0x6398, 0x5014, 0x7235, 0x89c9, 0x51b3, 0x8bc0, 0x7edd, 0x5747, 0x83cc, 0x94a7, 0x519b, 0x541b, 0x5cfb, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbf40[ 192 ] = { 0x7dfb, 0x7dfc, 0x7dfd, 0x7dfe, 0x7dff, 0x7e00, 0x7e01, 0x7e02, 0x7e03, 0x7e04, 0x7e05, 0x7e06, 0x7e07, 0x7e08, 0x7e09, 0x7e0a, 0x7e0b, 0x7e0c, 0x7e0d, 0x7e0e, 0x7e0f, 0x7e10, 0x7e11, 0x7e12, 0x7e13, 0x7e14, 0x7e15, 0x7e16, 0x7e17, 0x7e18, 0x7e19, 0x7e1a, 0x7e1b, 0x7e1c, 0x7e1d, 0x7e1e, 0x7e1f, 0x7e20, 0x7e21, 0x7e22, 0x7e23, 0x7e24, 0x7e25, 0x7e26, 0x7e27, 0x7e28, 0x7e29, 0x7e2a, 0x7e2b, 0x7e2c, 0x7e2d, 0x7e2e, 0x7e2f, 0x7e30, 0x7e31, 0x7e32, 0x7e33, 0x7e34, 0x7e35, 0x7e36, 0x7e37, 0x7e38, 0x7e39, 0xfffd, 0x7e3a, 0x7e3c, 0x7e3d, 0x7e3e, 0x7e3f, 0x7e40, 0x7e42, 0x7e43, 0x7e44, 0x7e45, 0x7e46, 0x7e48, 0x7e49, 0x7e4a, 0x7e4b, 0x7e4c, 0x7e4d, 0x7e4e, 0x7e4f, 0x7e50, 0x7e51, 0x7e52, 0x7e53, 0x7e54, 0x7e55, 0x7e56, 0x7e57, 0x7e58, 0x7e59, 0x7e5a, 0x7e5b, 0x7e5c, 0x7e5d, 0x4fca, 0x7ae3, 0x6d5a, 0x90e1, 0x9a8f, 0x5580, 0x5496, 0x5361, 0x54af, 0x5f00, 0x63e9, 0x6977, 0x51ef, 0x6168, 0x520a, 0x582a, 0x52d8, 0x574e, 0x780d, 0x770b, 0x5eb7, 0x6177, 0x7ce0, 0x625b, 0x6297, 0x4ea2, 0x7095, 0x8003, 0x62f7, 0x70e4, 0x9760, 0x5777, 0x82db, 0x67ef, 0x68f5, 0x78d5, 0x9897, 0x79d1, 0x58f3, 0x54b3, 0x53ef, 0x6e34, 0x514b, 0x523b, 0x5ba2, 0x8bfe, 0x80af, 0x5543, 0x57a6, 0x6073, 0x5751, 0x542d, 0x7a7a, 0x6050, 0x5b54, 0x63a7, 0x62a0, 0x53e3, 0x6263, 0x5bc7, 0x67af, 0x54ed, 0x7a9f, 0x82e6, 0x9177, 0x5e93, 0x88e4, 0x5938, 0x57ae, 0x630e, 0x8de8, 0x80ef, 0x5757, 0x7b77, 0x4fa9, 0x5feb, 0x5bbd, 0x6b3e, 0x5321, 0x7b50, 0x72c2, 0x6846, 0x77ff, 0x7736, 0x65f7, 0x51b5, 0x4e8f, 0x76d4, 0x5cbf, 0x7aa5, 0x8475, 0x594e, 0x9b41, 0x5080, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc040[ 192 ] = { 0x7e5e, 0x7e5f, 0x7e60, 0x7e61, 0x7e62, 0x7e63, 0x7e64, 0x7e65, 0x7e66, 0x7e67, 0x7e68, 0x7e69, 0x7e6a, 0x7e6b, 0x7e6c, 0x7e6d, 0x7e6e, 0x7e6f, 0x7e70, 0x7e71, 0x7e72, 0x7e73, 0x7e74, 0x7e75, 0x7e76, 0x7e77, 0x7e78, 0x7e79, 0x7e7a, 0x7e7b, 0x7e7c, 0x7e7d, 0x7e7e, 0x7e7f, 0x7e80, 0x7e81, 0x7e83, 0x7e84, 0x7e85, 0x7e86, 0x7e87, 0x7e88, 0x7e89, 0x7e8a, 0x7e8b, 0x7e8c, 0x7e8d, 0x7e8e, 0x7e8f, 0x7e90, 0x7e91, 0x7e92, 0x7e93, 0x7e94, 0x7e95, 0x7e96, 0x7e97, 0x7e98, 0x7e99, 0x7e9a, 0x7e9c, 0x7e9d, 0x7e9e, 0xfffd, 0x7eae, 0x7eb4, 0x7ebb, 0x7ebc, 0x7ed6, 0x7ee4, 0x7eec, 0x7ef9, 0x7f0a, 0x7f10, 0x7f1e, 0x7f37, 0x7f39, 0x7f3b, 0x7f3c, 0x7f3d, 0x7f3e, 0x7f3f, 0x7f40, 0x7f41, 0x7f43, 0x7f46, 0x7f47, 0x7f48, 0x7f49, 0x7f4a, 0x7f4b, 0x7f4c, 0x7f4d, 0x7f4e, 0x7f4f, 0x7f52, 0x7f53, 0x9988, 0x6127, 0x6e83, 0x5764, 0x6606, 0x6346, 0x56f0, 0x62ec, 0x6269, 0x5ed3, 0x9614, 0x5783, 0x62c9, 0x5587, 0x8721, 0x814a, 0x8fa3, 0x5566, 0x83b1, 0x6765, 0x8d56, 0x84dd, 0x5a6a, 0x680f, 0x62e6, 0x7bee, 0x9611, 0x5170, 0x6f9c, 0x8c30, 0x63fd, 0x89c8, 0x61d2, 0x7f06, 0x70c2, 0x6ee5, 0x7405, 0x6994, 0x72fc, 0x5eca, 0x90ce, 0x6717, 0x6d6a, 0x635e, 0x52b3, 0x7262, 0x8001, 0x4f6c, 0x59e5, 0x916a, 0x70d9, 0x6d9d, 0x52d2, 0x4e50, 0x96f7, 0x956d, 0x857e, 0x78ca, 0x7d2f, 0x5121, 0x5792, 0x64c2, 0x808b, 0x7c7b, 0x6cea, 0x68f1, 0x695e, 0x51b7, 0x5398, 0x68a8, 0x7281, 0x9ece, 0x7bf1, 0x72f8, 0x79bb, 0x6f13, 0x7406, 0x674e, 0x91cc, 0x9ca4, 0x793c, 0x8389, 0x8354, 0x540f, 0x6817, 0x4e3d, 0x5389, 0x52b1, 0x783e, 0x5386, 0x5229, 0x5088, 0x4f8b, 0x4fd0, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc140[ 192 ] = { 0x7f56, 0x7f59, 0x7f5b, 0x7f5c, 0x7f5d, 0x7f5e, 0x7f60, 0x7f63, 0x7f64, 0x7f65, 0x7f66, 0x7f67, 0x7f6b, 0x7f6c, 0x7f6d, 0x7f6f, 0x7f70, 0x7f73, 0x7f75, 0x7f76, 0x7f77, 0x7f78, 0x7f7a, 0x7f7b, 0x7f7c, 0x7f7d, 0x7f7f, 0x7f80, 0x7f82, 0x7f83, 0x7f84, 0x7f85, 0x7f86, 0x7f87, 0x7f88, 0x7f89, 0x7f8b, 0x7f8d, 0x7f8f, 0x7f90, 0x7f91, 0x7f92, 0x7f93, 0x7f95, 0x7f96, 0x7f97, 0x7f98, 0x7f99, 0x7f9b, 0x7f9c, 0x7fa0, 0x7fa2, 0x7fa3, 0x7fa5, 0x7fa6, 0x7fa8, 0x7fa9, 0x7faa, 0x7fab, 0x7fac, 0x7fad, 0x7fae, 0x7fb1, 0xfffd, 0x7fb3, 0x7fb4, 0x7fb5, 0x7fb6, 0x7fb7, 0x7fba, 0x7fbb, 0x7fbe, 0x7fc0, 0x7fc2, 0x7fc3, 0x7fc4, 0x7fc6, 0x7fc7, 0x7fc8, 0x7fc9, 0x7fcb, 0x7fcd, 0x7fcf, 0x7fd0, 0x7fd1, 0x7fd2, 0x7fd3, 0x7fd6, 0x7fd7, 0x7fd9, 0x7fda, 0x7fdb, 0x7fdc, 0x7fdd, 0x7fde, 0x7fe2, 0x7fe3, 0x75e2, 0x7acb, 0x7c92, 0x6ca5, 0x96b6, 0x529b, 0x7483, 0x54e9, 0x4fe9, 0x8054, 0x83b2, 0x8fde, 0x9570, 0x5ec9, 0x601c, 0x6d9f, 0x5e18, 0x655b, 0x8138, 0x94fe, 0x604b, 0x70bc, 0x7ec3, 0x7cae, 0x51c9, 0x6881, 0x7cb1, 0x826f, 0x4e24, 0x8f86, 0x91cf, 0x667e, 0x4eae, 0x8c05, 0x64a9, 0x804a, 0x50da, 0x7597, 0x71ce, 0x5be5, 0x8fbd, 0x6f66, 0x4e86, 0x6482, 0x9563, 0x5ed6, 0x6599, 0x5217, 0x88c2, 0x70c8, 0x52a3, 0x730e, 0x7433, 0x6797, 0x78f7, 0x9716, 0x4e34, 0x90bb, 0x9cde, 0x6dcb, 0x51db, 0x8d41, 0x541d, 0x62ce, 0x73b2, 0x83f1, 0x96f6, 0x9f84, 0x94c3, 0x4f36, 0x7f9a, 0x51cc, 0x7075, 0x9675, 0x5cad, 0x9886, 0x53e6, 0x4ee4, 0x6e9c, 0x7409, 0x69b4, 0x786b, 0x998f, 0x7559, 0x5218, 0x7624, 0x6d41, 0x67f3, 0x516d, 0x9f99, 0x804b, 0x5499, 0x7b3c, 0x7abf, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc240[ 192 ] = { 0x7fe4, 0x7fe7, 0x7fe8, 0x7fea, 0x7feb, 0x7fec, 0x7fed, 0x7fef, 0x7ff2, 0x7ff4, 0x7ff5, 0x7ff6, 0x7ff7, 0x7ff8, 0x7ff9, 0x7ffa, 0x7ffd, 0x7ffe, 0x7fff, 0x8002, 0x8007, 0x8008, 0x8009, 0x800a, 0x800e, 0x800f, 0x8011, 0x8013, 0x801a, 0x801b, 0x801d, 0x801e, 0x801f, 0x8021, 0x8023, 0x8024, 0x802b, 0x802c, 0x802d, 0x802e, 0x802f, 0x8030, 0x8032, 0x8034, 0x8039, 0x803a, 0x803c, 0x803e, 0x8040, 0x8041, 0x8044, 0x8045, 0x8047, 0x8048, 0x8049, 0x804e, 0x804f, 0x8050, 0x8051, 0x8053, 0x8055, 0x8056, 0x8057, 0xfffd, 0x8059, 0x805b, 0x805c, 0x805d, 0x805e, 0x805f, 0x8060, 0x8061, 0x8062, 0x8063, 0x8064, 0x8065, 0x8066, 0x8067, 0x8068, 0x806b, 0x806c, 0x806d, 0x806e, 0x806f, 0x8070, 0x8072, 0x8073, 0x8074, 0x8075, 0x8076, 0x8077, 0x8078, 0x8079, 0x807a, 0x807b, 0x807c, 0x807d, 0x9686, 0x5784, 0x62e2, 0x9647, 0x697c, 0x5a04, 0x6402, 0x7bd3, 0x6f0f, 0x964b, 0x82a6, 0x5362, 0x9885, 0x5e90, 0x7089, 0x63b3, 0x5364, 0x864f, 0x9c81, 0x9e93, 0x788c, 0x9732, 0x8def, 0x8d42, 0x9e7f, 0x6f5e, 0x7984, 0x5f55, 0x9646, 0x622e, 0x9a74, 0x5415, 0x94dd, 0x4fa3, 0x65c5, 0x5c65, 0x5c61, 0x7f15, 0x8651, 0x6c2f, 0x5f8b, 0x7387, 0x6ee4, 0x7eff, 0x5ce6, 0x631b, 0x5b6a, 0x6ee6, 0x5375, 0x4e71, 0x63a0, 0x7565, 0x62a1, 0x8f6e, 0x4f26, 0x4ed1, 0x6ca6, 0x7eb6, 0x8bba, 0x841d, 0x87ba, 0x7f57, 0x903b, 0x9523, 0x7ba9, 0x9aa1, 0x88f8, 0x843d, 0x6d1b, 0x9a86, 0x7edc, 0x5988, 0x9ebb, 0x739b, 0x7801, 0x8682, 0x9a6c, 0x9a82, 0x561b, 0x5417, 0x57cb, 0x4e70, 0x9ea6, 0x5356, 0x8fc8, 0x8109, 0x7792, 0x9992, 0x86ee, 0x6ee1, 0x8513, 0x66fc, 0x6162, 0x6f2b, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc340[ 192 ] = { 0x807e, 0x8081, 0x8082, 0x8085, 0x8088, 0x808a, 0x808d, 0x808e, 0x808f, 0x8090, 0x8091, 0x8092, 0x8094, 0x8095, 0x8097, 0x8099, 0x809e, 0x80a3, 0x80a6, 0x80a7, 0x80a8, 0x80ac, 0x80b0, 0x80b3, 0x80b5, 0x80b6, 0x80b8, 0x80b9, 0x80bb, 0x80c5, 0x80c7, 0x80c8, 0x80c9, 0x80ca, 0x80cb, 0x80cf, 0x80d0, 0x80d1, 0x80d2, 0x80d3, 0x80d4, 0x80d5, 0x80d8, 0x80df, 0x80e0, 0x80e2, 0x80e3, 0x80e6, 0x80ee, 0x80f5, 0x80f7, 0x80f9, 0x80fb, 0x80fe, 0x80ff, 0x8100, 0x8101, 0x8103, 0x8104, 0x8105, 0x8107, 0x8108, 0x810b, 0xfffd, 0x810c, 0x8115, 0x8117, 0x8119, 0x811b, 0x811c, 0x811d, 0x811f, 0x8120, 0x8121, 0x8122, 0x8123, 0x8124, 0x8125, 0x8126, 0x8127, 0x8128, 0x8129, 0x812a, 0x812b, 0x812d, 0x812e, 0x8130, 0x8133, 0x8134, 0x8135, 0x8137, 0x8139, 0x813a, 0x813b, 0x813c, 0x813d, 0x813f, 0x8c29, 0x8292, 0x832b, 0x76f2, 0x6c13, 0x5fd9, 0x83bd, 0x732b, 0x8305, 0x951a, 0x6bdb, 0x77db, 0x94c6, 0x536f, 0x8302, 0x5192, 0x5e3d, 0x8c8c, 0x8d38, 0x4e48, 0x73ab, 0x679a, 0x6885, 0x9176, 0x9709, 0x7164, 0x6ca1, 0x7709, 0x5a92, 0x9541, 0x6bcf, 0x7f8e, 0x6627, 0x5bd0, 0x59b9, 0x5a9a, 0x95e8, 0x95f7, 0x4eec, 0x840c, 0x8499, 0x6aac, 0x76df, 0x9530, 0x731b, 0x68a6, 0x5b5f, 0x772f, 0x919a, 0x9761, 0x7cdc, 0x8ff7, 0x8c1c, 0x5f25, 0x7c73, 0x79d8, 0x89c5, 0x6ccc, 0x871c, 0x5bc6, 0x5e42, 0x68c9, 0x7720, 0x7ef5, 0x5195, 0x514d, 0x52c9, 0x5a29, 0x7f05, 0x9762, 0x82d7, 0x63cf, 0x7784, 0x85d0, 0x79d2, 0x6e3a, 0x5e99, 0x5999, 0x8511, 0x706d, 0x6c11, 0x62bf, 0x76bf, 0x654f, 0x60af, 0x95fd, 0x660e, 0x879f, 0x9e23, 0x94ed, 0x540d, 0x547d, 0x8c2c, 0x6478, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc440[ 192 ] = { 0x8140, 0x8141, 0x8142, 0x8143, 0x8144, 0x8145, 0x8147, 0x8149, 0x814d, 0x814e, 0x814f, 0x8152, 0x8156, 0x8157, 0x8158, 0x815b, 0x815c, 0x815d, 0x815e, 0x815f, 0x8161, 0x8162, 0x8163, 0x8164, 0x8166, 0x8168, 0x816a, 0x816b, 0x816c, 0x816f, 0x8172, 0x8173, 0x8175, 0x8176, 0x8177, 0x8178, 0x8181, 0x8183, 0x8184, 0x8185, 0x8186, 0x8187, 0x8189, 0x818b, 0x818c, 0x818d, 0x818e, 0x8190, 0x8192, 0x8193, 0x8194, 0x8195, 0x8196, 0x8197, 0x8199, 0x819a, 0x819e, 0x819f, 0x81a0, 0x81a1, 0x81a2, 0x81a4, 0x81a5, 0xfffd, 0x81a7, 0x81a9, 0x81ab, 0x81ac, 0x81ad, 0x81ae, 0x81af, 0x81b0, 0x81b1, 0x81b2, 0x81b4, 0x81b5, 0x81b6, 0x81b7, 0x81b8, 0x81b9, 0x81bc, 0x81bd, 0x81be, 0x81bf, 0x81c4, 0x81c5, 0x81c7, 0x81c8, 0x81c9, 0x81cb, 0x81cd, 0x81ce, 0x81cf, 0x81d0, 0x81d1, 0x81d2, 0x81d3, 0x6479, 0x8611, 0x6a21, 0x819c, 0x78e8, 0x6469, 0x9b54, 0x62b9, 0x672b, 0x83ab, 0x58a8, 0x9ed8, 0x6cab, 0x6f20, 0x5bde, 0x964c, 0x8c0b, 0x725f, 0x67d0, 0x62c7, 0x7261, 0x4ea9, 0x59c6, 0x6bcd, 0x5893, 0x66ae, 0x5e55, 0x52df, 0x6155, 0x6728, 0x76ee, 0x7766, 0x7267, 0x7a46, 0x62ff, 0x54ea, 0x5450, 0x94a0, 0x90a3, 0x5a1c, 0x7eb3, 0x6c16, 0x4e43, 0x5976, 0x8010, 0x5948, 0x5357, 0x7537, 0x96be, 0x56ca, 0x6320, 0x8111, 0x607c, 0x95f9, 0x6dd6, 0x5462, 0x9981, 0x5185, 0x5ae9, 0x80fd, 0x59ae, 0x9713, 0x502a, 0x6ce5, 0x5c3c, 0x62df, 0x4f60, 0x533f, 0x817b, 0x9006, 0x6eba, 0x852b, 0x62c8, 0x5e74, 0x78be, 0x64b5, 0x637b, 0x5ff5, 0x5a18, 0x917f, 0x9e1f, 0x5c3f, 0x634f, 0x8042, 0x5b7d, 0x556e, 0x954a, 0x954d, 0x6d85, 0x60a8, 0x67e0, 0x72de, 0x51dd, 0x5b81, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc540[ 192 ] = { 0x81d4, 0x81d5, 0x81d6, 0x81d7, 0x81d8, 0x81d9, 0x81da, 0x81db, 0x81dc, 0x81dd, 0x81de, 0x81df, 0x81e0, 0x81e1, 0x81e2, 0x81e4, 0x81e5, 0x81e6, 0x81e8, 0x81e9, 0x81eb, 0x81ee, 0x81ef, 0x81f0, 0x81f1, 0x81f2, 0x81f5, 0x81f6, 0x81f7, 0x81f8, 0x81f9, 0x81fa, 0x81fd, 0x81ff, 0x8203, 0x8207, 0x8208, 0x8209, 0x820a, 0x820b, 0x820e, 0x820f, 0x8211, 0x8213, 0x8215, 0x8216, 0x8217, 0x8218, 0x8219, 0x821a, 0x821d, 0x8220, 0x8224, 0x8225, 0x8226, 0x8227, 0x8229, 0x822e, 0x8232, 0x823a, 0x823c, 0x823d, 0x823f, 0xfffd, 0x8240, 0x8241, 0x8242, 0x8243, 0x8245, 0x8246, 0x8248, 0x824a, 0x824c, 0x824d, 0x824e, 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, 0x8255, 0x8256, 0x8257, 0x8259, 0x825b, 0x825c, 0x825d, 0x825e, 0x8260, 0x8261, 0x8262, 0x8263, 0x8264, 0x8265, 0x8266, 0x8267, 0x8269, 0x62e7, 0x6cde, 0x725b, 0x626d, 0x94ae, 0x7ebd, 0x8113, 0x6d53, 0x519c, 0x5f04, 0x5974, 0x52aa, 0x6012, 0x5973, 0x6696, 0x8650, 0x759f, 0x632a, 0x61e6, 0x7cef, 0x8bfa, 0x54e6, 0x6b27, 0x9e25, 0x6bb4, 0x85d5, 0x5455, 0x5076, 0x6ca4, 0x556a, 0x8db4, 0x722c, 0x5e15, 0x6015, 0x7436, 0x62cd, 0x6392, 0x724c, 0x5f98, 0x6e43, 0x6d3e, 0x6500, 0x6f58, 0x76d8, 0x78d0, 0x76fc, 0x7554, 0x5224, 0x53db, 0x4e53, 0x5e9e, 0x65c1, 0x802a, 0x80d6, 0x629b, 0x5486, 0x5228, 0x70ae, 0x888d, 0x8dd1, 0x6ce1, 0x5478, 0x80da, 0x57f9, 0x88f4, 0x8d54, 0x966a, 0x914d, 0x4f69, 0x6c9b, 0x55b7, 0x76c6, 0x7830, 0x62a8, 0x70f9, 0x6f8e, 0x5f6d, 0x84ec, 0x68da, 0x787c, 0x7bf7, 0x81a8, 0x670b, 0x9e4f, 0x6367, 0x78b0, 0x576f, 0x7812, 0x9739, 0x6279, 0x62ab, 0x5288, 0x7435, 0x6bd7, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc640[ 192 ] = { 0x826a, 0x826b, 0x826c, 0x826d, 0x8271, 0x8275, 0x8276, 0x8277, 0x8278, 0x827b, 0x827c, 0x8280, 0x8281, 0x8283, 0x8285, 0x8286, 0x8287, 0x8289, 0x828c, 0x8290, 0x8293, 0x8294, 0x8295, 0x8296, 0x829a, 0x829b, 0x829e, 0x82a0, 0x82a2, 0x82a3, 0x82a7, 0x82b2, 0x82b5, 0x82b6, 0x82ba, 0x82bb, 0x82bc, 0x82bf, 0x82c0, 0x82c2, 0x82c3, 0x82c5, 0x82c6, 0x82c9, 0x82d0, 0x82d6, 0x82d9, 0x82da, 0x82dd, 0x82e2, 0x82e7, 0x82e8, 0x82e9, 0x82ea, 0x82ec, 0x82ed, 0x82ee, 0x82f0, 0x82f2, 0x82f3, 0x82f5, 0x82f6, 0x82f8, 0xfffd, 0x82fa, 0x82fc, 0x82fd, 0x82fe, 0x82ff, 0x8300, 0x830a, 0x830b, 0x830d, 0x8310, 0x8312, 0x8313, 0x8316, 0x8318, 0x8319, 0x831d, 0x831e, 0x831f, 0x8320, 0x8321, 0x8322, 0x8323, 0x8324, 0x8325, 0x8326, 0x8329, 0x832a, 0x832e, 0x8330, 0x8332, 0x8337, 0x833b, 0x833d, 0x5564, 0x813e, 0x75b2, 0x76ae, 0x5339, 0x75de, 0x50fb, 0x5c41, 0x8b6c, 0x7bc7, 0x504f, 0x7247, 0x9a97, 0x98d8, 0x6f02, 0x74e2, 0x7968, 0x6487, 0x77a5, 0x62fc, 0x9891, 0x8d2b, 0x54c1, 0x8058, 0x4e52, 0x576a, 0x82f9, 0x840d, 0x5e73, 0x51ed, 0x74f6, 0x8bc4, 0x5c4f, 0x5761, 0x6cfc, 0x9887, 0x5a46, 0x7834, 0x9b44, 0x8feb, 0x7c95, 0x5256, 0x6251, 0x94fa, 0x4ec6, 0x8386, 0x8461, 0x83e9, 0x84b2, 0x57d4, 0x6734, 0x5703, 0x666e, 0x6d66, 0x8c31, 0x66dd, 0x7011, 0x671f, 0x6b3a, 0x6816, 0x621a, 0x59bb, 0x4e03, 0x51c4, 0x6f06, 0x67d2, 0x6c8f, 0x5176, 0x68cb, 0x5947, 0x6b67, 0x7566, 0x5d0e, 0x8110, 0x9f50, 0x65d7, 0x7948, 0x7941, 0x9a91, 0x8d77, 0x5c82, 0x4e5e, 0x4f01, 0x542f, 0x5951, 0x780c, 0x5668, 0x6c14, 0x8fc4, 0x5f03, 0x6c7d, 0x6ce3, 0x8bab, 0x6390, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc740[ 192 ] = { 0x833e, 0x833f, 0x8341, 0x8342, 0x8344, 0x8345, 0x8348, 0x834a, 0x834b, 0x834c, 0x834d, 0x834e, 0x8353, 0x8355, 0x8356, 0x8357, 0x8358, 0x8359, 0x835d, 0x8362, 0x8370, 0x8371, 0x8372, 0x8373, 0x8374, 0x8375, 0x8376, 0x8379, 0x837a, 0x837e, 0x837f, 0x8380, 0x8381, 0x8382, 0x8383, 0x8384, 0x8387, 0x8388, 0x838a, 0x838b, 0x838c, 0x838d, 0x838f, 0x8390, 0x8391, 0x8394, 0x8395, 0x8396, 0x8397, 0x8399, 0x839a, 0x839d, 0x839f, 0x83a1, 0x83a2, 0x83a3, 0x83a4, 0x83a5, 0x83a6, 0x83a7, 0x83ac, 0x83ad, 0x83ae, 0xfffd, 0x83af, 0x83b5, 0x83bb, 0x83be, 0x83bf, 0x83c2, 0x83c3, 0x83c4, 0x83c6, 0x83c8, 0x83c9, 0x83cb, 0x83cd, 0x83ce, 0x83d0, 0x83d1, 0x83d2, 0x83d3, 0x83d5, 0x83d7, 0x83d9, 0x83da, 0x83db, 0x83de, 0x83e2, 0x83e3, 0x83e4, 0x83e6, 0x83e7, 0x83e8, 0x83eb, 0x83ec, 0x83ed, 0x6070, 0x6d3d, 0x7275, 0x6266, 0x948e, 0x94c5, 0x5343, 0x8fc1, 0x7b7e, 0x4edf, 0x8c26, 0x4e7e, 0x9ed4, 0x94b1, 0x94b3, 0x524d, 0x6f5c, 0x9063, 0x6d45, 0x8c34, 0x5811, 0x5d4c, 0x6b20, 0x6b49, 0x67aa, 0x545b, 0x8154, 0x7f8c, 0x5899, 0x8537, 0x5f3a, 0x62a2, 0x6a47, 0x9539, 0x6572, 0x6084, 0x6865, 0x77a7, 0x4e54, 0x4fa8, 0x5de7, 0x9798, 0x64ac, 0x7fd8, 0x5ced, 0x4fcf, 0x7a8d, 0x5207, 0x8304, 0x4e14, 0x602f, 0x7a83, 0x94a6, 0x4fb5, 0x4eb2, 0x79e6, 0x7434, 0x52e4, 0x82b9, 0x64d2, 0x79bd, 0x5bdd, 0x6c81, 0x9752, 0x8f7b, 0x6c22, 0x503e, 0x537f, 0x6e05, 0x64ce, 0x6674, 0x6c30, 0x60c5, 0x9877, 0x8bf7, 0x5e86, 0x743c, 0x7a77, 0x79cb, 0x4e18, 0x90b1, 0x7403, 0x6c42, 0x56da, 0x914b, 0x6cc5, 0x8d8b, 0x533a, 0x86c6, 0x66f2, 0x8eaf, 0x5c48, 0x9a71, 0x6e20, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc840[ 192 ] = { 0x83ee, 0x83ef, 0x83f3, 0x83f4, 0x83f5, 0x83f6, 0x83f7, 0x83fa, 0x83fb, 0x83fc, 0x83fe, 0x83ff, 0x8400, 0x8402, 0x8405, 0x8407, 0x8408, 0x8409, 0x840a, 0x8410, 0x8412, 0x8413, 0x8414, 0x8415, 0x8416, 0x8417, 0x8419, 0x841a, 0x841b, 0x841e, 0x841f, 0x8420, 0x8421, 0x8422, 0x8423, 0x8429, 0x842a, 0x842b, 0x842c, 0x842d, 0x842e, 0x842f, 0x8430, 0x8432, 0x8433, 0x8434, 0x8435, 0x8436, 0x8437, 0x8439, 0x843a, 0x843b, 0x843e, 0x843f, 0x8440, 0x8441, 0x8442, 0x8443, 0x8444, 0x8445, 0x8447, 0x8448, 0x8449, 0xfffd, 0x844a, 0x844b, 0x844c, 0x844d, 0x844e, 0x844f, 0x8450, 0x8452, 0x8453, 0x8454, 0x8455, 0x8456, 0x8458, 0x845d, 0x845e, 0x845f, 0x8460, 0x8462, 0x8464, 0x8465, 0x8466, 0x8467, 0x8468, 0x846a, 0x846e, 0x846f, 0x8470, 0x8472, 0x8474, 0x8477, 0x8479, 0x847b, 0x847c, 0x53d6, 0x5a36, 0x9f8b, 0x8da3, 0x53bb, 0x5708, 0x98a7, 0x6743, 0x919b, 0x6cc9, 0x5168, 0x75ca, 0x62f3, 0x72ac, 0x5238, 0x529d, 0x7f3a, 0x7094, 0x7638, 0x5374, 0x9e4a, 0x69b7, 0x786e, 0x96c0, 0x88d9, 0x7fa4, 0x7136, 0x71c3, 0x5189, 0x67d3, 0x74e4, 0x58e4, 0x6518, 0x56b7, 0x8ba9, 0x9976, 0x6270, 0x7ed5, 0x60f9, 0x70ed, 0x58ec, 0x4ec1, 0x4eba, 0x5fcd, 0x97e7, 0x4efb, 0x8ba4, 0x5203, 0x598a, 0x7eab, 0x6254, 0x4ecd, 0x65e5, 0x620e, 0x8338, 0x84c9, 0x8363, 0x878d, 0x7194, 0x6eb6, 0x5bb9, 0x7ed2, 0x5197, 0x63c9, 0x67d4, 0x8089, 0x8339, 0x8815, 0x5112, 0x5b7a, 0x5982, 0x8fb1, 0x4e73, 0x6c5d, 0x5165, 0x8925, 0x8f6f, 0x962e, 0x854a, 0x745e, 0x9510, 0x95f0, 0x6da6, 0x82e5, 0x5f31, 0x6492, 0x6d12, 0x8428, 0x816e, 0x9cc3, 0x585e, 0x8d5b, 0x4e09, 0x53c1, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc940[ 192 ] = { 0x847d, 0x847e, 0x847f, 0x8480, 0x8481, 0x8483, 0x8484, 0x8485, 0x8486, 0x848a, 0x848d, 0x848f, 0x8490, 0x8491, 0x8492, 0x8493, 0x8494, 0x8495, 0x8496, 0x8498, 0x849a, 0x849b, 0x849d, 0x849e, 0x849f, 0x84a0, 0x84a2, 0x84a3, 0x84a4, 0x84a5, 0x84a6, 0x84a7, 0x84a8, 0x84a9, 0x84aa, 0x84ab, 0x84ac, 0x84ad, 0x84ae, 0x84b0, 0x84b1, 0x84b3, 0x84b5, 0x84b6, 0x84b7, 0x84bb, 0x84bc, 0x84be, 0x84c0, 0x84c2, 0x84c3, 0x84c5, 0x84c6, 0x84c7, 0x84c8, 0x84cb, 0x84cc, 0x84ce, 0x84cf, 0x84d2, 0x84d4, 0x84d5, 0x84d7, 0xfffd, 0x84d8, 0x84d9, 0x84da, 0x84db, 0x84dc, 0x84de, 0x84e1, 0x84e2, 0x84e4, 0x84e7, 0x84e8, 0x84e9, 0x84ea, 0x84eb, 0x84ed, 0x84ee, 0x84ef, 0x84f1, 0x84f2, 0x84f3, 0x84f4, 0x84f5, 0x84f6, 0x84f7, 0x84f8, 0x84f9, 0x84fa, 0x84fb, 0x84fd, 0x84fe, 0x8500, 0x8501, 0x8502, 0x4f1e, 0x6563, 0x6851, 0x55d3, 0x4e27, 0x6414, 0x9a9a, 0x626b, 0x5ac2, 0x745f, 0x8272, 0x6da9, 0x68ee, 0x50e7, 0x838e, 0x7802, 0x6740, 0x5239, 0x6c99, 0x7eb1, 0x50bb, 0x5565, 0x715e, 0x7b5b, 0x6652, 0x73ca, 0x82eb, 0x6749, 0x5c71, 0x5220, 0x717d, 0x886b, 0x95ea, 0x9655, 0x64c5, 0x8d61, 0x81b3, 0x5584, 0x6c55, 0x6247, 0x7f2e, 0x5892, 0x4f24, 0x5546, 0x8d4f, 0x664c, 0x4e0a, 0x5c1a, 0x88f3, 0x68a2, 0x634e, 0x7a0d, 0x70e7, 0x828d, 0x52fa, 0x97f6, 0x5c11, 0x54e8, 0x90b5, 0x7ecd, 0x5962, 0x8d4a, 0x86c7, 0x820c, 0x820d, 0x8d66, 0x6444, 0x5c04, 0x6151, 0x6d89, 0x793e, 0x8bbe, 0x7837, 0x7533, 0x547b, 0x4f38, 0x8eab, 0x6df1, 0x5a20, 0x7ec5, 0x795e, 0x6c88, 0x5ba1, 0x5a76, 0x751a, 0x80be, 0x614e, 0x6e17, 0x58f0, 0x751f, 0x7525, 0x7272, 0x5347, 0x7ef3, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xca40[ 192 ] = { 0x8503, 0x8504, 0x8505, 0x8506, 0x8507, 0x8508, 0x8509, 0x850a, 0x850b, 0x850d, 0x850e, 0x850f, 0x8510, 0x8512, 0x8514, 0x8515, 0x8516, 0x8518, 0x8519, 0x851b, 0x851c, 0x851d, 0x851e, 0x8520, 0x8522, 0x8523, 0x8524, 0x8525, 0x8526, 0x8527, 0x8528, 0x8529, 0x852a, 0x852d, 0x852e, 0x852f, 0x8530, 0x8531, 0x8532, 0x8533, 0x8534, 0x8535, 0x8536, 0x853e, 0x853f, 0x8540, 0x8541, 0x8542, 0x8544, 0x8545, 0x8546, 0x8547, 0x854b, 0x854c, 0x854d, 0x854e, 0x854f, 0x8550, 0x8551, 0x8552, 0x8553, 0x8554, 0x8555, 0xfffd, 0x8557, 0x8558, 0x855a, 0x855b, 0x855c, 0x855d, 0x855f, 0x8560, 0x8561, 0x8562, 0x8563, 0x8565, 0x8566, 0x8567, 0x8569, 0x856a, 0x856b, 0x856c, 0x856d, 0x856e, 0x856f, 0x8570, 0x8571, 0x8573, 0x8575, 0x8576, 0x8577, 0x8578, 0x857c, 0x857d, 0x857f, 0x8580, 0x8581, 0x7701, 0x76db, 0x5269, 0x80dc, 0x5723, 0x5e08, 0x5931, 0x72ee, 0x65bd, 0x6e7f, 0x8bd7, 0x5c38, 0x8671, 0x5341, 0x77f3, 0x62fe, 0x65f6, 0x4ec0, 0x98df, 0x8680, 0x5b9e, 0x8bc6, 0x53f2, 0x77e2, 0x4f7f, 0x5c4e, 0x9a76, 0x59cb, 0x5f0f, 0x793a, 0x58eb, 0x4e16, 0x67ff, 0x4e8b, 0x62ed, 0x8a93, 0x901d, 0x52bf, 0x662f, 0x55dc, 0x566c, 0x9002, 0x4ed5, 0x4f8d, 0x91ca, 0x9970, 0x6c0f, 0x5e02, 0x6043, 0x5ba4, 0x89c6, 0x8bd5, 0x6536, 0x624b, 0x9996, 0x5b88, 0x5bff, 0x6388, 0x552e, 0x53d7, 0x7626, 0x517d, 0x852c, 0x67a2, 0x68b3, 0x6b8a, 0x6292, 0x8f93, 0x53d4, 0x8212, 0x6dd1, 0x758f, 0x4e66, 0x8d4e, 0x5b70, 0x719f, 0x85af, 0x6691, 0x66d9, 0x7f72, 0x8700, 0x9ecd, 0x9f20, 0x5c5e, 0x672f, 0x8ff0, 0x6811, 0x675f, 0x620d, 0x7ad6, 0x5885, 0x5eb6, 0x6570, 0x6f31, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcb40[ 192 ] = { 0x8582, 0x8583, 0x8586, 0x8588, 0x8589, 0x858a, 0x858b, 0x858c, 0x858d, 0x858e, 0x8590, 0x8591, 0x8592, 0x8593, 0x8594, 0x8595, 0x8596, 0x8597, 0x8598, 0x8599, 0x859a, 0x859d, 0x859e, 0x859f, 0x85a0, 0x85a1, 0x85a2, 0x85a3, 0x85a5, 0x85a6, 0x85a7, 0x85a9, 0x85ab, 0x85ac, 0x85ad, 0x85b1, 0x85b2, 0x85b3, 0x85b4, 0x85b5, 0x85b6, 0x85b8, 0x85ba, 0x85bb, 0x85bc, 0x85bd, 0x85be, 0x85bf, 0x85c0, 0x85c2, 0x85c3, 0x85c4, 0x85c5, 0x85c6, 0x85c7, 0x85c8, 0x85ca, 0x85cb, 0x85cc, 0x85cd, 0x85ce, 0x85d1, 0x85d2, 0xfffd, 0x85d4, 0x85d6, 0x85d7, 0x85d8, 0x85d9, 0x85da, 0x85db, 0x85dd, 0x85de, 0x85df, 0x85e0, 0x85e1, 0x85e2, 0x85e3, 0x85e5, 0x85e6, 0x85e7, 0x85e8, 0x85ea, 0x85eb, 0x85ec, 0x85ed, 0x85ee, 0x85ef, 0x85f0, 0x85f1, 0x85f2, 0x85f3, 0x85f4, 0x85f5, 0x85f6, 0x85f7, 0x85f8, 0x6055, 0x5237, 0x800d, 0x6454, 0x8870, 0x7529, 0x5e05, 0x6813, 0x62f4, 0x971c, 0x53cc, 0x723d, 0x8c01, 0x6c34, 0x7761, 0x7a0e, 0x542e, 0x77ac, 0x987a, 0x821c, 0x8bf4, 0x7855, 0x6714, 0x70c1, 0x65af, 0x6495, 0x5636, 0x601d, 0x79c1, 0x53f8, 0x4e1d, 0x6b7b, 0x8086, 0x5bfa, 0x55e3, 0x56db, 0x4f3a, 0x4f3c, 0x9972, 0x5df3, 0x677e, 0x8038, 0x6002, 0x9882, 0x9001, 0x5b8b, 0x8bbc, 0x8bf5, 0x641c, 0x8258, 0x64de, 0x55fd, 0x82cf, 0x9165, 0x4fd7, 0x7d20, 0x901f, 0x7c9f, 0x50f3, 0x5851, 0x6eaf, 0x5bbf, 0x8bc9, 0x8083, 0x9178, 0x849c, 0x7b97, 0x867d, 0x968b, 0x968f, 0x7ee5, 0x9ad3, 0x788e, 0x5c81, 0x7a57, 0x9042, 0x96a7, 0x795f, 0x5b59, 0x635f, 0x7b0b, 0x84d1, 0x68ad, 0x5506, 0x7f29, 0x7410, 0x7d22, 0x9501, 0x6240, 0x584c, 0x4ed6, 0x5b83, 0x5979, 0x5854, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcc40[ 192 ] = { 0x85f9, 0x85fa, 0x85fc, 0x85fd, 0x85fe, 0x8600, 0x8601, 0x8602, 0x8603, 0x8604, 0x8606, 0x8607, 0x8608, 0x8609, 0x860a, 0x860b, 0x860c, 0x860d, 0x860e, 0x860f, 0x8610, 0x8612, 0x8613, 0x8614, 0x8615, 0x8617, 0x8618, 0x8619, 0x861a, 0x861b, 0x861c, 0x861d, 0x861e, 0x861f, 0x8620, 0x8621, 0x8622, 0x8623, 0x8624, 0x8625, 0x8626, 0x8628, 0x862a, 0x862b, 0x862c, 0x862d, 0x862e, 0x862f, 0x8630, 0x8631, 0x8632, 0x8633, 0x8634, 0x8635, 0x8636, 0x8637, 0x8639, 0x863a, 0x863b, 0x863d, 0x863e, 0x863f, 0x8640, 0xfffd, 0x8641, 0x8642, 0x8643, 0x8644, 0x8645, 0x8646, 0x8647, 0x8648, 0x8649, 0x864a, 0x864b, 0x864c, 0x8652, 0x8653, 0x8655, 0x8656, 0x8657, 0x8658, 0x8659, 0x865b, 0x865c, 0x865d, 0x865f, 0x8660, 0x8661, 0x8663, 0x8664, 0x8665, 0x8666, 0x8667, 0x8668, 0x8669, 0x866a, 0x736d, 0x631e, 0x8e4b, 0x8e0f, 0x80ce, 0x82d4, 0x62ac, 0x53f0, 0x6cf0, 0x915e, 0x592a, 0x6001, 0x6c70, 0x574d, 0x644a, 0x8d2a, 0x762b, 0x6ee9, 0x575b, 0x6a80, 0x75f0, 0x6f6d, 0x8c2d, 0x8c08, 0x5766, 0x6bef, 0x8892, 0x78b3, 0x63a2, 0x53f9, 0x70ad, 0x6c64, 0x5858, 0x642a, 0x5802, 0x68e0, 0x819b, 0x5510, 0x7cd6, 0x5018, 0x8eba, 0x6dcc, 0x8d9f, 0x70eb, 0x638f, 0x6d9b, 0x6ed4, 0x7ee6, 0x8404, 0x6843, 0x9003, 0x6dd8, 0x9676, 0x8ba8, 0x5957, 0x7279, 0x85e4, 0x817e, 0x75bc, 0x8a8a, 0x68af, 0x5254, 0x8e22, 0x9511, 0x63d0, 0x9898, 0x8e44, 0x557c, 0x4f53, 0x66ff, 0x568f, 0x60d5, 0x6d95, 0x5243, 0x5c49, 0x5929, 0x6dfb, 0x586b, 0x7530, 0x751c, 0x606c, 0x8214, 0x8146, 0x6311, 0x6761, 0x8fe2, 0x773a, 0x8df3, 0x8d34, 0x94c1, 0x5e16, 0x5385, 0x542c, 0x70c3, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcd40[ 192 ] = { 0x866d, 0x866f, 0x8670, 0x8672, 0x8673, 0x8674, 0x8675, 0x8676, 0x8677, 0x8678, 0x8683, 0x8684, 0x8685, 0x8686, 0x8687, 0x8688, 0x8689, 0x868e, 0x868f, 0x8690, 0x8691, 0x8692, 0x8694, 0x8696, 0x8697, 0x8698, 0x8699, 0x869a, 0x869b, 0x869e, 0x869f, 0x86a0, 0x86a1, 0x86a2, 0x86a5, 0x86a6, 0x86ab, 0x86ad, 0x86ae, 0x86b2, 0x86b3, 0x86b7, 0x86b8, 0x86b9, 0x86bb, 0x86bc, 0x86bd, 0x86be, 0x86bf, 0x86c1, 0x86c2, 0x86c3, 0x86c5, 0x86c8, 0x86cc, 0x86cd, 0x86d2, 0x86d3, 0x86d5, 0x86d6, 0x86d7, 0x86da, 0x86dc, 0xfffd, 0x86dd, 0x86e0, 0x86e1, 0x86e2, 0x86e3, 0x86e5, 0x86e6, 0x86e7, 0x86e8, 0x86ea, 0x86eb, 0x86ec, 0x86ef, 0x86f5, 0x86f6, 0x86f7, 0x86fa, 0x86fb, 0x86fc, 0x86fd, 0x86ff, 0x8701, 0x8704, 0x8705, 0x8706, 0x870b, 0x870c, 0x870e, 0x870f, 0x8710, 0x8711, 0x8714, 0x8716, 0x6c40, 0x5ef7, 0x505c, 0x4ead, 0x5ead, 0x633a, 0x8247, 0x901a, 0x6850, 0x916e, 0x77b3, 0x540c, 0x94dc, 0x5f64, 0x7ae5, 0x6876, 0x6345, 0x7b52, 0x7edf, 0x75db, 0x5077, 0x6295, 0x5934, 0x900f, 0x51f8, 0x79c3, 0x7a81, 0x56fe, 0x5f92, 0x9014, 0x6d82, 0x5c60, 0x571f, 0x5410, 0x5154, 0x6e4d, 0x56e2, 0x63a8, 0x9893, 0x817f, 0x8715, 0x892a, 0x9000, 0x541e, 0x5c6f, 0x81c0, 0x62d6, 0x6258, 0x8131, 0x9e35, 0x9640, 0x9a6e, 0x9a7c, 0x692d, 0x59a5, 0x62d3, 0x553e, 0x6316, 0x54c7, 0x86d9, 0x6d3c, 0x5a03, 0x74e6, 0x889c, 0x6b6a, 0x5916, 0x8c4c, 0x5f2f, 0x6e7e, 0x73a9, 0x987d, 0x4e38, 0x70f7, 0x5b8c, 0x7897, 0x633d, 0x665a, 0x7696, 0x60cb, 0x5b9b, 0x5a49, 0x4e07, 0x8155, 0x6c6a, 0x738b, 0x4ea1, 0x6789, 0x7f51, 0x5f80, 0x65fa, 0x671b, 0x5fd8, 0x5984, 0x5a01, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xce40[ 192 ] = { 0x8719, 0x871b, 0x871d, 0x871f, 0x8720, 0x8724, 0x8726, 0x8727, 0x8728, 0x872a, 0x872b, 0x872c, 0x872d, 0x872f, 0x8730, 0x8732, 0x8733, 0x8735, 0x8736, 0x8738, 0x8739, 0x873a, 0x873c, 0x873d, 0x8740, 0x8741, 0x8742, 0x8743, 0x8744, 0x8745, 0x8746, 0x874a, 0x874b, 0x874d, 0x874f, 0x8750, 0x8751, 0x8752, 0x8754, 0x8755, 0x8756, 0x8758, 0x875a, 0x875b, 0x875c, 0x875d, 0x875e, 0x875f, 0x8761, 0x8762, 0x8766, 0x8767, 0x8768, 0x8769, 0x876a, 0x876b, 0x876c, 0x876d, 0x876f, 0x8771, 0x8772, 0x8773, 0x8775, 0xfffd, 0x8777, 0x8778, 0x8779, 0x877a, 0x877f, 0x8780, 0x8781, 0x8784, 0x8786, 0x8787, 0x8789, 0x878a, 0x878c, 0x878e, 0x878f, 0x8790, 0x8791, 0x8792, 0x8794, 0x8795, 0x8796, 0x8798, 0x8799, 0x879a, 0x879b, 0x879c, 0x879d, 0x879e, 0x87a0, 0x87a1, 0x87a2, 0x87a3, 0x87a4, 0x5dcd, 0x5fae, 0x5371, 0x97e6, 0x8fdd, 0x6845, 0x56f4, 0x552f, 0x60df, 0x4e3a, 0x6f4d, 0x7ef4, 0x82c7, 0x840e, 0x59d4, 0x4f1f, 0x4f2a, 0x5c3e, 0x7eac, 0x672a, 0x851a, 0x5473, 0x754f, 0x80c3, 0x5582, 0x9b4f, 0x4f4d, 0x6e2d, 0x8c13, 0x5c09, 0x6170, 0x536b, 0x761f, 0x6e29, 0x868a, 0x6587, 0x95fb, 0x7eb9, 0x543b, 0x7a33, 0x7d0a, 0x95ee, 0x55e1, 0x7fc1, 0x74ee, 0x631d, 0x8717, 0x6da1, 0x7a9d, 0x6211, 0x65a1, 0x5367, 0x63e1, 0x6c83, 0x5deb, 0x545c, 0x94a8, 0x4e4c, 0x6c61, 0x8bec, 0x5c4b, 0x65e0, 0x829c, 0x68a7, 0x543e, 0x5434, 0x6bcb, 0x6b66, 0x4e94, 0x6342, 0x5348, 0x821e, 0x4f0d, 0x4fae, 0x575e, 0x620a, 0x96fe, 0x6664, 0x7269, 0x52ff, 0x52a1, 0x609f, 0x8bef, 0x6614, 0x7199, 0x6790, 0x897f, 0x7852, 0x77fd, 0x6670, 0x563b, 0x5438, 0x9521, 0x727a, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcf40[ 192 ] = { 0x87a5, 0x87a6, 0x87a7, 0x87a9, 0x87aa, 0x87ae, 0x87b0, 0x87b1, 0x87b2, 0x87b4, 0x87b6, 0x87b7, 0x87b8, 0x87b9, 0x87bb, 0x87bc, 0x87be, 0x87bf, 0x87c1, 0x87c2, 0x87c3, 0x87c4, 0x87c5, 0x87c7, 0x87c8, 0x87c9, 0x87cc, 0x87cd, 0x87ce, 0x87cf, 0x87d0, 0x87d4, 0x87d5, 0x87d6, 0x87d7, 0x87d8, 0x87d9, 0x87da, 0x87dc, 0x87dd, 0x87de, 0x87df, 0x87e1, 0x87e2, 0x87e3, 0x87e4, 0x87e6, 0x87e7, 0x87e8, 0x87e9, 0x87eb, 0x87ec, 0x87ed, 0x87ef, 0x87f0, 0x87f1, 0x87f2, 0x87f3, 0x87f4, 0x87f5, 0x87f6, 0x87f7, 0x87f8, 0xfffd, 0x87fa, 0x87fb, 0x87fc, 0x87fd, 0x87ff, 0x8800, 0x8801, 0x8802, 0x8804, 0x8805, 0x8806, 0x8807, 0x8808, 0x8809, 0x880b, 0x880c, 0x880d, 0x880e, 0x880f, 0x8810, 0x8811, 0x8812, 0x8814, 0x8817, 0x8818, 0x8819, 0x881a, 0x881c, 0x881d, 0x881e, 0x881f, 0x8820, 0x8823, 0x7a00, 0x606f, 0x5e0c, 0x6089, 0x819d, 0x5915, 0x60dc, 0x7184, 0x70ef, 0x6eaa, 0x6c50, 0x7280, 0x6a84, 0x88ad, 0x5e2d, 0x4e60, 0x5ab3, 0x559c, 0x94e3, 0x6d17, 0x7cfb, 0x9699, 0x620f, 0x7ec6, 0x778e, 0x867e, 0x5323, 0x971e, 0x8f96, 0x6687, 0x5ce1, 0x4fa0, 0x72ed, 0x4e0b, 0x53a6, 0x590f, 0x5413, 0x6380, 0x9528, 0x5148, 0x4ed9, 0x9c9c, 0x7ea4, 0x54b8, 0x8d24, 0x8854, 0x8237, 0x95f2, 0x6d8e, 0x5f26, 0x5acc, 0x663e, 0x9669, 0x73b0, 0x732e, 0x53bf, 0x817a, 0x9985, 0x7fa1, 0x5baa, 0x9677, 0x9650, 0x7ebf, 0x76f8, 0x53a2, 0x9576, 0x9999, 0x7bb1, 0x8944, 0x6e58, 0x4e61, 0x7fd4, 0x7965, 0x8be6, 0x60f3, 0x54cd, 0x4eab, 0x9879, 0x5df7, 0x6a61, 0x50cf, 0x5411, 0x8c61, 0x8427, 0x785d, 0x9704, 0x524a, 0x54ee, 0x56a3, 0x9500, 0x6d88, 0x5bb5, 0x6dc6, 0x6653, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd040[ 192 ] = { 0x8824, 0x8825, 0x8826, 0x8827, 0x8828, 0x8829, 0x882a, 0x882b, 0x882c, 0x882d, 0x882e, 0x882f, 0x8830, 0x8831, 0x8833, 0x8834, 0x8835, 0x8836, 0x8837, 0x8838, 0x883a, 0x883b, 0x883d, 0x883e, 0x883f, 0x8841, 0x8842, 0x8843, 0x8846, 0x8847, 0x8848, 0x8849, 0x884a, 0x884b, 0x884e, 0x884f, 0x8850, 0x8851, 0x8852, 0x8853, 0x8855, 0x8856, 0x8858, 0x885a, 0x885b, 0x885c, 0x885d, 0x885e, 0x885f, 0x8860, 0x8866, 0x8867, 0x886a, 0x886d, 0x886f, 0x8871, 0x8873, 0x8874, 0x8875, 0x8876, 0x8878, 0x8879, 0x887a, 0xfffd, 0x887b, 0x887c, 0x8880, 0x8883, 0x8886, 0x8887, 0x8889, 0x888a, 0x888c, 0x888e, 0x888f, 0x8890, 0x8891, 0x8893, 0x8894, 0x8895, 0x8897, 0x8898, 0x8899, 0x889a, 0x889b, 0x889d, 0x889e, 0x889f, 0x88a0, 0x88a1, 0x88a3, 0x88a5, 0x88a6, 0x88a7, 0x88a8, 0x88a9, 0x88aa, 0x5c0f, 0x5b5d, 0x6821, 0x8096, 0x5578, 0x7b11, 0x6548, 0x6954, 0x4e9b, 0x6b47, 0x874e, 0x978b, 0x534f, 0x631f, 0x643a, 0x90aa, 0x659c, 0x80c1, 0x8c10, 0x5199, 0x68b0, 0x5378, 0x87f9, 0x61c8, 0x6cc4, 0x6cfb, 0x8c22, 0x5c51, 0x85aa, 0x82af, 0x950c, 0x6b23, 0x8f9b, 0x65b0, 0x5ffb, 0x5fc3, 0x4fe1, 0x8845, 0x661f, 0x8165, 0x7329, 0x60fa, 0x5174, 0x5211, 0x578b, 0x5f62, 0x90a2, 0x884c, 0x9192, 0x5e78, 0x674f, 0x6027, 0x59d3, 0x5144, 0x51f6, 0x80f8, 0x5308, 0x6c79, 0x96c4, 0x718a, 0x4f11, 0x4fee, 0x7f9e, 0x673d, 0x55c5, 0x9508, 0x79c0, 0x8896, 0x7ee3, 0x589f, 0x620c, 0x9700, 0x865a, 0x5618, 0x987b, 0x5f90, 0x8bb8, 0x84c4, 0x9157, 0x53d9, 0x65ed, 0x5e8f, 0x755c, 0x6064, 0x7d6e, 0x5a7f, 0x7eea, 0x7eed, 0x8f69, 0x55a7, 0x5ba3, 0x60ac, 0x65cb, 0x7384, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd140[ 192 ] = { 0x88ac, 0x88ae, 0x88af, 0x88b0, 0x88b2, 0x88b3, 0x88b4, 0x88b5, 0x88b6, 0x88b8, 0x88b9, 0x88ba, 0x88bb, 0x88bd, 0x88be, 0x88bf, 0x88c0, 0x88c3, 0x88c4, 0x88c7, 0x88c8, 0x88ca, 0x88cb, 0x88cc, 0x88cd, 0x88cf, 0x88d0, 0x88d1, 0x88d3, 0x88d6, 0x88d7, 0x88da, 0x88db, 0x88dc, 0x88dd, 0x88de, 0x88e0, 0x88e1, 0x88e6, 0x88e7, 0x88e9, 0x88ea, 0x88eb, 0x88ec, 0x88ed, 0x88ee, 0x88ef, 0x88f2, 0x88f5, 0x88f6, 0x88f7, 0x88fa, 0x88fb, 0x88fd, 0x88ff, 0x8900, 0x8901, 0x8903, 0x8904, 0x8905, 0x8906, 0x8907, 0x8908, 0xfffd, 0x8909, 0x890b, 0x890c, 0x890d, 0x890e, 0x890f, 0x8911, 0x8914, 0x8915, 0x8916, 0x8917, 0x8918, 0x891c, 0x891d, 0x891e, 0x891f, 0x8920, 0x8922, 0x8923, 0x8924, 0x8926, 0x8927, 0x8928, 0x8929, 0x892c, 0x892d, 0x892e, 0x892f, 0x8931, 0x8932, 0x8933, 0x8935, 0x8937, 0x9009, 0x7663, 0x7729, 0x7eda, 0x9774, 0x859b, 0x5b66, 0x7a74, 0x96ea, 0x8840, 0x52cb, 0x718f, 0x5faa, 0x65ec, 0x8be2, 0x5bfb, 0x9a6f, 0x5de1, 0x6b89, 0x6c5b, 0x8bad, 0x8baf, 0x900a, 0x8fc5, 0x538b, 0x62bc, 0x9e26, 0x9e2d, 0x5440, 0x4e2b, 0x82bd, 0x7259, 0x869c, 0x5d16, 0x8859, 0x6daf, 0x96c5, 0x54d1, 0x4e9a, 0x8bb6, 0x7109, 0x54bd, 0x9609, 0x70df, 0x6df9, 0x76d0, 0x4e25, 0x7814, 0x8712, 0x5ca9, 0x5ef6, 0x8a00, 0x989c, 0x960e, 0x708e, 0x6cbf, 0x5944, 0x63a9, 0x773c, 0x884d, 0x6f14, 0x8273, 0x5830, 0x71d5, 0x538c, 0x781a, 0x96c1, 0x5501, 0x5f66, 0x7130, 0x5bb4, 0x8c1a, 0x9a8c, 0x6b83, 0x592e, 0x9e2f, 0x79e7, 0x6768, 0x626c, 0x4f6f, 0x75a1, 0x7f8a, 0x6d0b, 0x9633, 0x6c27, 0x4ef0, 0x75d2, 0x517b, 0x6837, 0x6f3e, 0x9080, 0x8170, 0x5996, 0x7476, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd240[ 192 ] = { 0x8938, 0x8939, 0x893a, 0x893b, 0x893c, 0x893d, 0x893e, 0x893f, 0x8940, 0x8942, 0x8943, 0x8945, 0x8946, 0x8947, 0x8948, 0x8949, 0x894a, 0x894b, 0x894c, 0x894d, 0x894e, 0x894f, 0x8950, 0x8951, 0x8952, 0x8953, 0x8954, 0x8955, 0x8956, 0x8957, 0x8958, 0x8959, 0x895a, 0x895b, 0x895c, 0x895d, 0x8960, 0x8961, 0x8962, 0x8963, 0x8964, 0x8965, 0x8967, 0x8968, 0x8969, 0x896a, 0x896b, 0x896c, 0x896d, 0x896e, 0x896f, 0x8970, 0x8971, 0x8972, 0x8973, 0x8974, 0x8975, 0x8976, 0x8977, 0x8978, 0x8979, 0x897a, 0x897c, 0xfffd, 0x897d, 0x897e, 0x8980, 0x8982, 0x8984, 0x8985, 0x8987, 0x8988, 0x8989, 0x898a, 0x898b, 0x898c, 0x898d, 0x898e, 0x898f, 0x8990, 0x8991, 0x8992, 0x8993, 0x8994, 0x8995, 0x8996, 0x8997, 0x8998, 0x8999, 0x899a, 0x899b, 0x899c, 0x899d, 0x899e, 0x899f, 0x89a0, 0x89a1, 0x6447, 0x5c27, 0x9065, 0x7a91, 0x8c23, 0x59da, 0x54ac, 0x8200, 0x836f, 0x8981, 0x8000, 0x6930, 0x564e, 0x8036, 0x7237, 0x91ce, 0x51b6, 0x4e5f, 0x9875, 0x6396, 0x4e1a, 0x53f6, 0x66f3, 0x814b, 0x591c, 0x6db2, 0x4e00, 0x58f9, 0x533b, 0x63d6, 0x94f1, 0x4f9d, 0x4f0a, 0x8863, 0x9890, 0x5937, 0x9057, 0x79fb, 0x4eea, 0x80f0, 0x7591, 0x6c82, 0x5b9c, 0x59e8, 0x5f5d, 0x6905, 0x8681, 0x501a, 0x5df2, 0x4e59, 0x77e3, 0x4ee5, 0x827a, 0x6291, 0x6613, 0x9091, 0x5c79, 0x4ebf, 0x5f79, 0x81c6, 0x9038, 0x8084, 0x75ab, 0x4ea6, 0x88d4, 0x610f, 0x6bc5, 0x5fc6, 0x4e49, 0x76ca, 0x6ea2, 0x8be3, 0x8bae, 0x8c0a, 0x8bd1, 0x5f02, 0x7ffc, 0x7fcc, 0x7ece, 0x8335, 0x836b, 0x56e0, 0x6bb7, 0x97f3, 0x9634, 0x59fb, 0x541f, 0x94f6, 0x6deb, 0x5bc5, 0x996e, 0x5c39, 0x5f15, 0x9690, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd340[ 192 ] = { 0x89a2, 0x89a3, 0x89a4, 0x89a5, 0x89a6, 0x89a7, 0x89a8, 0x89a9, 0x89aa, 0x89ab, 0x89ac, 0x89ad, 0x89ae, 0x89af, 0x89b0, 0x89b1, 0x89b2, 0x89b3, 0x89b4, 0x89b5, 0x89b6, 0x89b7, 0x89b8, 0x89b9, 0x89ba, 0x89bb, 0x89bc, 0x89bd, 0x89be, 0x89bf, 0x89c0, 0x89c3, 0x89cd, 0x89d3, 0x89d4, 0x89d5, 0x89d7, 0x89d8, 0x89d9, 0x89db, 0x89dd, 0x89df, 0x89e0, 0x89e1, 0x89e2, 0x89e4, 0x89e7, 0x89e8, 0x89e9, 0x89ea, 0x89ec, 0x89ed, 0x89ee, 0x89f0, 0x89f1, 0x89f2, 0x89f4, 0x89f5, 0x89f6, 0x89f7, 0x89f8, 0x89f9, 0x89fa, 0xfffd, 0x89fb, 0x89fc, 0x89fd, 0x89fe, 0x89ff, 0x8a01, 0x8a02, 0x8a03, 0x8a04, 0x8a05, 0x8a06, 0x8a08, 0x8a09, 0x8a0a, 0x8a0b, 0x8a0c, 0x8a0d, 0x8a0e, 0x8a0f, 0x8a10, 0x8a11, 0x8a12, 0x8a13, 0x8a14, 0x8a15, 0x8a16, 0x8a17, 0x8a18, 0x8a19, 0x8a1a, 0x8a1b, 0x8a1c, 0x8a1d, 0x5370, 0x82f1, 0x6a31, 0x5a74, 0x9e70, 0x5e94, 0x7f28, 0x83b9, 0x8424, 0x8425, 0x8367, 0x8747, 0x8fce, 0x8d62, 0x76c8, 0x5f71, 0x9896, 0x786c, 0x6620, 0x54df, 0x62e5, 0x4f63, 0x81c3, 0x75c8, 0x5eb8, 0x96cd, 0x8e0a, 0x86f9, 0x548f, 0x6cf3, 0x6d8c, 0x6c38, 0x607f, 0x52c7, 0x7528, 0x5e7d, 0x4f18, 0x60a0, 0x5fe7, 0x5c24, 0x7531, 0x90ae, 0x94c0, 0x72b9, 0x6cb9, 0x6e38, 0x9149, 0x6709, 0x53cb, 0x53f3, 0x4f51, 0x91c9, 0x8bf1, 0x53c8, 0x5e7c, 0x8fc2, 0x6de4, 0x4e8e, 0x76c2, 0x6986, 0x865e, 0x611a, 0x8206, 0x4f59, 0x4fde, 0x903e, 0x9c7c, 0x6109, 0x6e1d, 0x6e14, 0x9685, 0x4e88, 0x5a31, 0x96e8, 0x4e0e, 0x5c7f, 0x79b9, 0x5b87, 0x8bed, 0x7fbd, 0x7389, 0x57df, 0x828b, 0x90c1, 0x5401, 0x9047, 0x55bb, 0x5cea, 0x5fa1, 0x6108, 0x6b32, 0x72f1, 0x80b2, 0x8a89, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd440[ 192 ] = { 0x8a1e, 0x8a1f, 0x8a20, 0x8a21, 0x8a22, 0x8a23, 0x8a24, 0x8a25, 0x8a26, 0x8a27, 0x8a28, 0x8a29, 0x8a2a, 0x8a2b, 0x8a2c, 0x8a2d, 0x8a2e, 0x8a2f, 0x8a30, 0x8a31, 0x8a32, 0x8a33, 0x8a34, 0x8a35, 0x8a36, 0x8a37, 0x8a38, 0x8a39, 0x8a3a, 0x8a3b, 0x8a3c, 0x8a3d, 0x8a3f, 0x8a40, 0x8a41, 0x8a42, 0x8a43, 0x8a44, 0x8a45, 0x8a46, 0x8a47, 0x8a49, 0x8a4a, 0x8a4b, 0x8a4c, 0x8a4d, 0x8a4e, 0x8a4f, 0x8a50, 0x8a51, 0x8a52, 0x8a53, 0x8a54, 0x8a55, 0x8a56, 0x8a57, 0x8a58, 0x8a59, 0x8a5a, 0x8a5b, 0x8a5c, 0x8a5d, 0x8a5e, 0xfffd, 0x8a5f, 0x8a60, 0x8a61, 0x8a62, 0x8a63, 0x8a64, 0x8a65, 0x8a66, 0x8a67, 0x8a68, 0x8a69, 0x8a6a, 0x8a6b, 0x8a6c, 0x8a6d, 0x8a6e, 0x8a6f, 0x8a70, 0x8a71, 0x8a72, 0x8a73, 0x8a74, 0x8a75, 0x8a76, 0x8a77, 0x8a78, 0x8a7a, 0x8a7b, 0x8a7c, 0x8a7d, 0x8a7e, 0x8a7f, 0x8a80, 0x6d74, 0x5bd3, 0x88d5, 0x9884, 0x8c6b, 0x9a6d, 0x9e33, 0x6e0a, 0x51a4, 0x5143, 0x57a3, 0x8881, 0x539f, 0x63f4, 0x8f95, 0x56ed, 0x5458, 0x5706, 0x733f, 0x6e90, 0x7f18, 0x8fdc, 0x82d1, 0x613f, 0x6028, 0x9662, 0x66f0, 0x7ea6, 0x8d8a, 0x8dc3, 0x94a5, 0x5cb3, 0x7ca4, 0x6708, 0x60a6, 0x9605, 0x8018, 0x4e91, 0x90e7, 0x5300, 0x9668, 0x5141, 0x8fd0, 0x8574, 0x915d, 0x6655, 0x97f5, 0x5b55, 0x531d, 0x7838, 0x6742, 0x683d, 0x54c9, 0x707e, 0x5bb0, 0x8f7d, 0x518d, 0x5728, 0x54b1, 0x6512, 0x6682, 0x8d5e, 0x8d43, 0x810f, 0x846c, 0x906d, 0x7cdf, 0x51ff, 0x85fb, 0x67a3, 0x65e9, 0x6fa1, 0x86a4, 0x8e81, 0x566a, 0x9020, 0x7682, 0x7076, 0x71e5, 0x8d23, 0x62e9, 0x5219, 0x6cfd, 0x8d3c, 0x600e, 0x589e, 0x618e, 0x66fe, 0x8d60, 0x624e, 0x55b3, 0x6e23, 0x672d, 0x8f67, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd540[ 192 ] = { 0x8a81, 0x8a82, 0x8a83, 0x8a84, 0x8a85, 0x8a86, 0x8a87, 0x8a88, 0x8a8b, 0x8a8c, 0x8a8d, 0x8a8e, 0x8a8f, 0x8a90, 0x8a91, 0x8a92, 0x8a94, 0x8a95, 0x8a96, 0x8a97, 0x8a98, 0x8a99, 0x8a9a, 0x8a9b, 0x8a9c, 0x8a9d, 0x8a9e, 0x8a9f, 0x8aa0, 0x8aa1, 0x8aa2, 0x8aa3, 0x8aa4, 0x8aa5, 0x8aa6, 0x8aa7, 0x8aa8, 0x8aa9, 0x8aaa, 0x8aab, 0x8aac, 0x8aad, 0x8aae, 0x8aaf, 0x8ab0, 0x8ab1, 0x8ab2, 0x8ab3, 0x8ab4, 0x8ab5, 0x8ab6, 0x8ab7, 0x8ab8, 0x8ab9, 0x8aba, 0x8abb, 0x8abc, 0x8abd, 0x8abe, 0x8abf, 0x8ac0, 0x8ac1, 0x8ac2, 0xfffd, 0x8ac3, 0x8ac4, 0x8ac5, 0x8ac6, 0x8ac7, 0x8ac8, 0x8ac9, 0x8aca, 0x8acb, 0x8acc, 0x8acd, 0x8ace, 0x8acf, 0x8ad0, 0x8ad1, 0x8ad2, 0x8ad3, 0x8ad4, 0x8ad5, 0x8ad6, 0x8ad7, 0x8ad8, 0x8ad9, 0x8ada, 0x8adb, 0x8adc, 0x8add, 0x8ade, 0x8adf, 0x8ae0, 0x8ae1, 0x8ae2, 0x8ae3, 0x94e1, 0x95f8, 0x7728, 0x6805, 0x69a8, 0x548b, 0x4e4d, 0x70b8, 0x8bc8, 0x6458, 0x658b, 0x5b85, 0x7a84, 0x503a, 0x5be8, 0x77bb, 0x6be1, 0x8a79, 0x7c98, 0x6cbe, 0x76cf, 0x65a9, 0x8f97, 0x5d2d, 0x5c55, 0x8638, 0x6808, 0x5360, 0x6218, 0x7ad9, 0x6e5b, 0x7efd, 0x6a1f, 0x7ae0, 0x5f70, 0x6f33, 0x5f20, 0x638c, 0x6da8, 0x6756, 0x4e08, 0x5e10, 0x8d26, 0x4ed7, 0x80c0, 0x7634, 0x969c, 0x62db, 0x662d, 0x627e, 0x6cbc, 0x8d75, 0x7167, 0x7f69, 0x5146, 0x8087, 0x53ec, 0x906e, 0x6298, 0x54f2, 0x86f0, 0x8f99, 0x8005, 0x9517, 0x8517, 0x8fd9, 0x6d59, 0x73cd, 0x659f, 0x771f, 0x7504, 0x7827, 0x81fb, 0x8d1e, 0x9488, 0x4fa6, 0x6795, 0x75b9, 0x8bca, 0x9707, 0x632f, 0x9547, 0x9635, 0x84b8, 0x6323, 0x7741, 0x5f81, 0x72f0, 0x4e89, 0x6014, 0x6574, 0x62ef, 0x6b63, 0x653f, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd640[ 192 ] = { 0x8ae4, 0x8ae5, 0x8ae6, 0x8ae7, 0x8ae8, 0x8ae9, 0x8aea, 0x8aeb, 0x8aec, 0x8aed, 0x8aee, 0x8aef, 0x8af0, 0x8af1, 0x8af2, 0x8af3, 0x8af4, 0x8af5, 0x8af6, 0x8af7, 0x8af8, 0x8af9, 0x8afa, 0x8afb, 0x8afc, 0x8afd, 0x8afe, 0x8aff, 0x8b00, 0x8b01, 0x8b02, 0x8b03, 0x8b04, 0x8b05, 0x8b06, 0x8b08, 0x8b09, 0x8b0a, 0x8b0b, 0x8b0c, 0x8b0d, 0x8b0e, 0x8b0f, 0x8b10, 0x8b11, 0x8b12, 0x8b13, 0x8b14, 0x8b15, 0x8b16, 0x8b17, 0x8b18, 0x8b19, 0x8b1a, 0x8b1b, 0x8b1c, 0x8b1d, 0x8b1e, 0x8b1f, 0x8b20, 0x8b21, 0x8b22, 0x8b23, 0xfffd, 0x8b24, 0x8b25, 0x8b27, 0x8b28, 0x8b29, 0x8b2a, 0x8b2b, 0x8b2c, 0x8b2d, 0x8b2e, 0x8b2f, 0x8b30, 0x8b31, 0x8b32, 0x8b33, 0x8b34, 0x8b35, 0x8b36, 0x8b37, 0x8b38, 0x8b39, 0x8b3a, 0x8b3b, 0x8b3c, 0x8b3d, 0x8b3e, 0x8b3f, 0x8b40, 0x8b41, 0x8b42, 0x8b43, 0x8b44, 0x8b45, 0x5e27, 0x75c7, 0x90d1, 0x8bc1, 0x829d, 0x679d, 0x652f, 0x5431, 0x8718, 0x77e5, 0x80a2, 0x8102, 0x6c41, 0x4e4b, 0x7ec7, 0x804c, 0x76f4, 0x690d, 0x6b96, 0x6267, 0x503c, 0x4f84, 0x5740, 0x6307, 0x6b62, 0x8dbe, 0x53ea, 0x65e8, 0x7eb8, 0x5fd7, 0x631a, 0x63b7, 0x81f3, 0x81f4, 0x7f6e, 0x5e1c, 0x5cd9, 0x5236, 0x667a, 0x79e9, 0x7a1a, 0x8d28, 0x7099, 0x75d4, 0x6ede, 0x6cbb, 0x7a92, 0x4e2d, 0x76c5, 0x5fe0, 0x949f, 0x8877, 0x7ec8, 0x79cd, 0x80bf, 0x91cd, 0x4ef2, 0x4f17, 0x821f, 0x5468, 0x5dde, 0x6d32, 0x8bcc, 0x7ca5, 0x8f74, 0x8098, 0x5e1a, 0x5492, 0x76b1, 0x5b99, 0x663c, 0x9aa4, 0x73e0, 0x682a, 0x86db, 0x6731, 0x732a, 0x8bf8, 0x8bdb, 0x9010, 0x7af9, 0x70db, 0x716e, 0x62c4, 0x77a9, 0x5631, 0x4e3b, 0x8457, 0x67f1, 0x52a9, 0x86c0, 0x8d2e, 0x94f8, 0x7b51, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd740[ 192 ] = { 0x8b46, 0x8b47, 0x8b48, 0x8b49, 0x8b4a, 0x8b4b, 0x8b4c, 0x8b4d, 0x8b4e, 0x8b4f, 0x8b50, 0x8b51, 0x8b52, 0x8b53, 0x8b54, 0x8b55, 0x8b56, 0x8b57, 0x8b58, 0x8b59, 0x8b5a, 0x8b5b, 0x8b5c, 0x8b5d, 0x8b5e, 0x8b5f, 0x8b60, 0x8b61, 0x8b62, 0x8b63, 0x8b64, 0x8b65, 0x8b67, 0x8b68, 0x8b69, 0x8b6a, 0x8b6b, 0x8b6d, 0x8b6e, 0x8b6f, 0x8b70, 0x8b71, 0x8b72, 0x8b73, 0x8b74, 0x8b75, 0x8b76, 0x8b77, 0x8b78, 0x8b79, 0x8b7a, 0x8b7b, 0x8b7c, 0x8b7d, 0x8b7e, 0x8b7f, 0x8b80, 0x8b81, 0x8b82, 0x8b83, 0x8b84, 0x8b85, 0x8b86, 0xfffd, 0x8b87, 0x8b88, 0x8b89, 0x8b8a, 0x8b8b, 0x8b8c, 0x8b8d, 0x8b8e, 0x8b8f, 0x8b90, 0x8b91, 0x8b92, 0x8b93, 0x8b94, 0x8b95, 0x8b96, 0x8b97, 0x8b98, 0x8b99, 0x8b9a, 0x8b9b, 0x8b9c, 0x8b9d, 0x8b9e, 0x8b9f, 0x8bac, 0x8bb1, 0x8bbb, 0x8bc7, 0x8bd0, 0x8bea, 0x8c09, 0x8c1e, 0x4f4f, 0x6ce8, 0x795d, 0x9a7b, 0x6293, 0x722a, 0x62fd, 0x4e13, 0x7816, 0x8f6c, 0x64b0, 0x8d5a, 0x7bc6, 0x6869, 0x5e84, 0x88c5, 0x5986, 0x649e, 0x58ee, 0x72b6, 0x690e, 0x9525, 0x8ffd, 0x8d58, 0x5760, 0x7f00, 0x8c06, 0x51c6, 0x6349, 0x62d9, 0x5353, 0x684c, 0x7422, 0x8301, 0x914c, 0x5544, 0x7740, 0x707c, 0x6d4a, 0x5179, 0x54a8, 0x8d44, 0x59ff, 0x6ecb, 0x6dc4, 0x5b5c, 0x7d2b, 0x4ed4, 0x7c7d, 0x6ed3, 0x5b50, 0x81ea, 0x6e0d, 0x5b57, 0x9b03, 0x68d5, 0x8e2a, 0x5b97, 0x7efc, 0x603b, 0x7eb5, 0x90b9, 0x8d70, 0x594f, 0x63cd, 0x79df, 0x8db3, 0x5352, 0x65cf, 0x7956, 0x8bc5, 0x963b, 0x7ec4, 0x94bb, 0x7e82, 0x5634, 0x9189, 0x6700, 0x7f6a, 0x5c0a, 0x9075, 0x6628, 0x5de6, 0x4f50, 0x67de, 0x505a, 0x4f5c, 0x5750, 0x5ea7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd840[ 192 ] = { 0x8c38, 0x8c39, 0x8c3a, 0x8c3b, 0x8c3c, 0x8c3d, 0x8c3e, 0x8c3f, 0x8c40, 0x8c42, 0x8c43, 0x8c44, 0x8c45, 0x8c48, 0x8c4a, 0x8c4b, 0x8c4d, 0x8c4e, 0x8c4f, 0x8c50, 0x8c51, 0x8c52, 0x8c53, 0x8c54, 0x8c56, 0x8c57, 0x8c58, 0x8c59, 0x8c5b, 0x8c5c, 0x8c5d, 0x8c5e, 0x8c5f, 0x8c60, 0x8c63, 0x8c64, 0x8c65, 0x8c66, 0x8c67, 0x8c68, 0x8c69, 0x8c6c, 0x8c6d, 0x8c6e, 0x8c6f, 0x8c70, 0x8c71, 0x8c72, 0x8c74, 0x8c75, 0x8c76, 0x8c77, 0x8c7b, 0x8c7c, 0x8c7d, 0x8c7e, 0x8c7f, 0x8c80, 0x8c81, 0x8c83, 0x8c84, 0x8c86, 0x8c87, 0xfffd, 0x8c88, 0x8c8b, 0x8c8d, 0x8c8e, 0x8c8f, 0x8c90, 0x8c91, 0x8c92, 0x8c93, 0x8c95, 0x8c96, 0x8c97, 0x8c99, 0x8c9a, 0x8c9b, 0x8c9c, 0x8c9d, 0x8c9e, 0x8c9f, 0x8ca0, 0x8ca1, 0x8ca2, 0x8ca3, 0x8ca4, 0x8ca5, 0x8ca6, 0x8ca7, 0x8ca8, 0x8ca9, 0x8caa, 0x8cab, 0x8cac, 0x8cad, 0x4e8d, 0x4e0c, 0x5140, 0x4e10, 0x5eff, 0x5345, 0x4e15, 0x4e98, 0x4e1e, 0x9b32, 0x5b6c, 0x5669, 0x4e28, 0x79ba, 0x4e3f, 0x5315, 0x4e47, 0x592d, 0x723b, 0x536e, 0x6c10, 0x56df, 0x80e4, 0x9997, 0x6bd3, 0x777e, 0x9f17, 0x4e36, 0x4e9f, 0x9f10, 0x4e5c, 0x4e69, 0x4e93, 0x8288, 0x5b5b, 0x556c, 0x560f, 0x4ec4, 0x538d, 0x539d, 0x53a3, 0x53a5, 0x53ae, 0x9765, 0x8d5d, 0x531a, 0x53f5, 0x5326, 0x532e, 0x533e, 0x8d5c, 0x5366, 0x5363, 0x5202, 0x5208, 0x520e, 0x522d, 0x5233, 0x523f, 0x5240, 0x524c, 0x525e, 0x5261, 0x525c, 0x84af, 0x527d, 0x5282, 0x5281, 0x5290, 0x5293, 0x5182, 0x7f54, 0x4ebb, 0x4ec3, 0x4ec9, 0x4ec2, 0x4ee8, 0x4ee1, 0x4eeb, 0x4ede, 0x4f1b, 0x4ef3, 0x4f22, 0x4f64, 0x4ef5, 0x4f25, 0x4f27, 0x4f09, 0x4f2b, 0x4f5e, 0x4f67, 0x6538, 0x4f5a, 0x4f5d, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd940[ 192 ] = { 0x8cae, 0x8caf, 0x8cb0, 0x8cb1, 0x8cb2, 0x8cb3, 0x8cb4, 0x8cb5, 0x8cb6, 0x8cb7, 0x8cb8, 0x8cb9, 0x8cba, 0x8cbb, 0x8cbc, 0x8cbd, 0x8cbe, 0x8cbf, 0x8cc0, 0x8cc1, 0x8cc2, 0x8cc3, 0x8cc4, 0x8cc5, 0x8cc6, 0x8cc7, 0x8cc8, 0x8cc9, 0x8cca, 0x8ccb, 0x8ccc, 0x8ccd, 0x8cce, 0x8ccf, 0x8cd0, 0x8cd1, 0x8cd2, 0x8cd3, 0x8cd4, 0x8cd5, 0x8cd6, 0x8cd7, 0x8cd8, 0x8cd9, 0x8cda, 0x8cdb, 0x8cdc, 0x8cdd, 0x8cde, 0x8cdf, 0x8ce0, 0x8ce1, 0x8ce2, 0x8ce3, 0x8ce4, 0x8ce5, 0x8ce6, 0x8ce7, 0x8ce8, 0x8ce9, 0x8cea, 0x8ceb, 0x8cec, 0xfffd, 0x8ced, 0x8cee, 0x8cef, 0x8cf0, 0x8cf1, 0x8cf2, 0x8cf3, 0x8cf4, 0x8cf5, 0x8cf6, 0x8cf7, 0x8cf8, 0x8cf9, 0x8cfa, 0x8cfb, 0x8cfc, 0x8cfd, 0x8cfe, 0x8cff, 0x8d00, 0x8d01, 0x8d02, 0x8d03, 0x8d04, 0x8d05, 0x8d06, 0x8d07, 0x8d08, 0x8d09, 0x8d0a, 0x8d0b, 0x8d0c, 0x8d0d, 0x4f5f, 0x4f57, 0x4f32, 0x4f3d, 0x4f76, 0x4f74, 0x4f91, 0x4f89, 0x4f83, 0x4f8f, 0x4f7e, 0x4f7b, 0x4faa, 0x4f7c, 0x4fac, 0x4f94, 0x4fe6, 0x4fe8, 0x4fea, 0x4fc5, 0x4fda, 0x4fe3, 0x4fdc, 0x4fd1, 0x4fdf, 0x4ff8, 0x5029, 0x504c, 0x4ff3, 0x502c, 0x500f, 0x502e, 0x502d, 0x4ffe, 0x501c, 0x500c, 0x5025, 0x5028, 0x507e, 0x5043, 0x5055, 0x5048, 0x504e, 0x506c, 0x507b, 0x50a5, 0x50a7, 0x50a9, 0x50ba, 0x50d6, 0x5106, 0x50ed, 0x50ec, 0x50e6, 0x50ee, 0x5107, 0x510b, 0x4edd, 0x6c3d, 0x4f58, 0x4f65, 0x4fce, 0x9fa0, 0x6c46, 0x7c74, 0x516e, 0x5dfd, 0x9ec9, 0x9998, 0x5181, 0x5914, 0x52f9, 0x530d, 0x8a07, 0x5310, 0x51eb, 0x5919, 0x5155, 0x4ea0, 0x5156, 0x4eb3, 0x886e, 0x88a4, 0x4eb5, 0x8114, 0x88d2, 0x7980, 0x5b34, 0x8803, 0x7fb8, 0x51ab, 0x51b1, 0x51bd, 0x51bc, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xda40[ 192 ] = { 0x8d0e, 0x8d0f, 0x8d10, 0x8d11, 0x8d12, 0x8d13, 0x8d14, 0x8d15, 0x8d16, 0x8d17, 0x8d18, 0x8d19, 0x8d1a, 0x8d1b, 0x8d1c, 0x8d20, 0x8d51, 0x8d52, 0x8d57, 0x8d5f, 0x8d65, 0x8d68, 0x8d69, 0x8d6a, 0x8d6c, 0x8d6e, 0x8d6f, 0x8d71, 0x8d72, 0x8d78, 0x8d79, 0x8d7a, 0x8d7b, 0x8d7c, 0x8d7d, 0x8d7e, 0x8d7f, 0x8d80, 0x8d82, 0x8d83, 0x8d86, 0x8d87, 0x8d88, 0x8d89, 0x8d8c, 0x8d8d, 0x8d8e, 0x8d8f, 0x8d90, 0x8d92, 0x8d93, 0x8d95, 0x8d96, 0x8d97, 0x8d98, 0x8d99, 0x8d9a, 0x8d9b, 0x8d9c, 0x8d9d, 0x8d9e, 0x8da0, 0x8da1, 0xfffd, 0x8da2, 0x8da4, 0x8da5, 0x8da6, 0x8da7, 0x8da8, 0x8da9, 0x8daa, 0x8dab, 0x8dac, 0x8dad, 0x8dae, 0x8daf, 0x8db0, 0x8db2, 0x8db6, 0x8db7, 0x8db9, 0x8dbb, 0x8dbd, 0x8dc0, 0x8dc1, 0x8dc2, 0x8dc5, 0x8dc7, 0x8dc8, 0x8dc9, 0x8dca, 0x8dcd, 0x8dd0, 0x8dd2, 0x8dd3, 0x8dd4, 0x51c7, 0x5196, 0x51a2, 0x51a5, 0x8ba0, 0x8ba6, 0x8ba7, 0x8baa, 0x8bb4, 0x8bb5, 0x8bb7, 0x8bc2, 0x8bc3, 0x8bcb, 0x8bcf, 0x8bce, 0x8bd2, 0x8bd3, 0x8bd4, 0x8bd6, 0x8bd8, 0x8bd9, 0x8bdc, 0x8bdf, 0x8be0, 0x8be4, 0x8be8, 0x8be9, 0x8bee, 0x8bf0, 0x8bf3, 0x8bf6, 0x8bf9, 0x8bfc, 0x8bff, 0x8c00, 0x8c02, 0x8c04, 0x8c07, 0x8c0c, 0x8c0f, 0x8c11, 0x8c12, 0x8c14, 0x8c15, 0x8c16, 0x8c19, 0x8c1b, 0x8c18, 0x8c1d, 0x8c1f, 0x8c20, 0x8c21, 0x8c25, 0x8c27, 0x8c2a, 0x8c2b, 0x8c2e, 0x8c2f, 0x8c32, 0x8c33, 0x8c35, 0x8c36, 0x5369, 0x537a, 0x961d, 0x9622, 0x9621, 0x9631, 0x962a, 0x963d, 0x963c, 0x9642, 0x9649, 0x9654, 0x965f, 0x9667, 0x966c, 0x9672, 0x9674, 0x9688, 0x968d, 0x9697, 0x96b0, 0x9097, 0x909b, 0x909d, 0x9099, 0x90ac, 0x90a1, 0x90b4, 0x90b3, 0x90b6, 0x90ba, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdb40[ 192 ] = { 0x8dd5, 0x8dd8, 0x8dd9, 0x8ddc, 0x8de0, 0x8de1, 0x8de2, 0x8de5, 0x8de6, 0x8de7, 0x8de9, 0x8ded, 0x8dee, 0x8df0, 0x8df1, 0x8df2, 0x8df4, 0x8df6, 0x8dfc, 0x8dfe, 0x8dff, 0x8e00, 0x8e01, 0x8e02, 0x8e03, 0x8e04, 0x8e06, 0x8e07, 0x8e08, 0x8e0b, 0x8e0d, 0x8e0e, 0x8e10, 0x8e11, 0x8e12, 0x8e13, 0x8e15, 0x8e16, 0x8e17, 0x8e18, 0x8e19, 0x8e1a, 0x8e1b, 0x8e1c, 0x8e20, 0x8e21, 0x8e24, 0x8e25, 0x8e26, 0x8e27, 0x8e28, 0x8e2b, 0x8e2d, 0x8e30, 0x8e32, 0x8e33, 0x8e34, 0x8e36, 0x8e37, 0x8e38, 0x8e3b, 0x8e3c, 0x8e3e, 0xfffd, 0x8e3f, 0x8e43, 0x8e45, 0x8e46, 0x8e4c, 0x8e4d, 0x8e4e, 0x8e4f, 0x8e50, 0x8e53, 0x8e54, 0x8e55, 0x8e56, 0x8e57, 0x8e58, 0x8e5a, 0x8e5b, 0x8e5c, 0x8e5d, 0x8e5e, 0x8e5f, 0x8e60, 0x8e61, 0x8e62, 0x8e63, 0x8e64, 0x8e65, 0x8e67, 0x8e68, 0x8e6a, 0x8e6b, 0x8e6e, 0x8e71, 0x90b8, 0x90b0, 0x90cf, 0x90c5, 0x90be, 0x90d0, 0x90c4, 0x90c7, 0x90d3, 0x90e6, 0x90e2, 0x90dc, 0x90d7, 0x90db, 0x90eb, 0x90ef, 0x90fe, 0x9104, 0x9122, 0x911e, 0x9123, 0x9131, 0x912f, 0x9139, 0x9143, 0x9146, 0x520d, 0x5942, 0x52a2, 0x52ac, 0x52ad, 0x52be, 0x54ff, 0x52d0, 0x52d6, 0x52f0, 0x53df, 0x71ee, 0x77cd, 0x5ef4, 0x51f5, 0x51fc, 0x9b2f, 0x53b6, 0x5f01, 0x755a, 0x5def, 0x574c, 0x57a9, 0x57a1, 0x587e, 0x58bc, 0x58c5, 0x58d1, 0x5729, 0x572c, 0x572a, 0x5733, 0x5739, 0x572e, 0x572f, 0x575c, 0x573b, 0x5742, 0x5769, 0x5785, 0x576b, 0x5786, 0x577c, 0x577b, 0x5768, 0x576d, 0x5776, 0x5773, 0x57ad, 0x57a4, 0x578c, 0x57b2, 0x57cf, 0x57a7, 0x57b4, 0x5793, 0x57a0, 0x57d5, 0x57d8, 0x57da, 0x57d9, 0x57d2, 0x57b8, 0x57f4, 0x57ef, 0x57f8, 0x57e4, 0x57dd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdc40[ 192 ] = { 0x8e73, 0x8e75, 0x8e77, 0x8e78, 0x8e79, 0x8e7a, 0x8e7b, 0x8e7d, 0x8e7e, 0x8e80, 0x8e82, 0x8e83, 0x8e84, 0x8e86, 0x8e88, 0x8e89, 0x8e8a, 0x8e8b, 0x8e8c, 0x8e8d, 0x8e8e, 0x8e91, 0x8e92, 0x8e93, 0x8e95, 0x8e96, 0x8e97, 0x8e98, 0x8e99, 0x8e9a, 0x8e9b, 0x8e9d, 0x8e9f, 0x8ea0, 0x8ea1, 0x8ea2, 0x8ea3, 0x8ea4, 0x8ea5, 0x8ea6, 0x8ea7, 0x8ea8, 0x8ea9, 0x8eaa, 0x8ead, 0x8eae, 0x8eb0, 0x8eb1, 0x8eb3, 0x8eb4, 0x8eb5, 0x8eb6, 0x8eb7, 0x8eb8, 0x8eb9, 0x8ebb, 0x8ebc, 0x8ebd, 0x8ebe, 0x8ebf, 0x8ec0, 0x8ec1, 0x8ec2, 0xfffd, 0x8ec3, 0x8ec4, 0x8ec5, 0x8ec6, 0x8ec7, 0x8ec8, 0x8ec9, 0x8eca, 0x8ecb, 0x8ecc, 0x8ecd, 0x8ecf, 0x8ed0, 0x8ed1, 0x8ed2, 0x8ed3, 0x8ed4, 0x8ed5, 0x8ed6, 0x8ed7, 0x8ed8, 0x8ed9, 0x8eda, 0x8edb, 0x8edc, 0x8edd, 0x8ede, 0x8edf, 0x8ee0, 0x8ee1, 0x8ee2, 0x8ee3, 0x8ee4, 0x580b, 0x580d, 0x57fd, 0x57ed, 0x5800, 0x581e, 0x5819, 0x5844, 0x5820, 0x5865, 0x586c, 0x5881, 0x5889, 0x589a, 0x5880, 0x99a8, 0x9f19, 0x61ff, 0x8279, 0x827d, 0x827f, 0x828f, 0x828a, 0x82a8, 0x8284, 0x828e, 0x8291, 0x8297, 0x8299, 0x82ab, 0x82b8, 0x82be, 0x82b0, 0x82c8, 0x82ca, 0x82e3, 0x8298, 0x82b7, 0x82ae, 0x82cb, 0x82cc, 0x82c1, 0x82a9, 0x82b4, 0x82a1, 0x82aa, 0x829f, 0x82c4, 0x82ce, 0x82a4, 0x82e1, 0x8309, 0x82f7, 0x82e4, 0x830f, 0x8307, 0x82dc, 0x82f4, 0x82d2, 0x82d8, 0x830c, 0x82fb, 0x82d3, 0x8311, 0x831a, 0x8306, 0x8314, 0x8315, 0x82e0, 0x82d5, 0x831c, 0x8351, 0x835b, 0x835c, 0x8308, 0x8392, 0x833c, 0x8334, 0x8331, 0x839b, 0x835e, 0x832f, 0x834f, 0x8347, 0x8343, 0x835f, 0x8340, 0x8317, 0x8360, 0x832d, 0x833a, 0x8333, 0x8366, 0x8365, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdd40[ 192 ] = { 0x8ee5, 0x8ee6, 0x8ee7, 0x8ee8, 0x8ee9, 0x8eea, 0x8eeb, 0x8eec, 0x8eed, 0x8eee, 0x8eef, 0x8ef0, 0x8ef1, 0x8ef2, 0x8ef3, 0x8ef4, 0x8ef5, 0x8ef6, 0x8ef7, 0x8ef8, 0x8ef9, 0x8efa, 0x8efb, 0x8efc, 0x8efd, 0x8efe, 0x8eff, 0x8f00, 0x8f01, 0x8f02, 0x8f03, 0x8f04, 0x8f05, 0x8f06, 0x8f07, 0x8f08, 0x8f09, 0x8f0a, 0x8f0b, 0x8f0c, 0x8f0d, 0x8f0e, 0x8f0f, 0x8f10, 0x8f11, 0x8f12, 0x8f13, 0x8f14, 0x8f15, 0x8f16, 0x8f17, 0x8f18, 0x8f19, 0x8f1a, 0x8f1b, 0x8f1c, 0x8f1d, 0x8f1e, 0x8f1f, 0x8f20, 0x8f21, 0x8f22, 0x8f23, 0xfffd, 0x8f24, 0x8f25, 0x8f26, 0x8f27, 0x8f28, 0x8f29, 0x8f2a, 0x8f2b, 0x8f2c, 0x8f2d, 0x8f2e, 0x8f2f, 0x8f30, 0x8f31, 0x8f32, 0x8f33, 0x8f34, 0x8f35, 0x8f36, 0x8f37, 0x8f38, 0x8f39, 0x8f3a, 0x8f3b, 0x8f3c, 0x8f3d, 0x8f3e, 0x8f3f, 0x8f40, 0x8f41, 0x8f42, 0x8f43, 0x8f44, 0x8368, 0x831b, 0x8369, 0x836c, 0x836a, 0x836d, 0x836e, 0x83b0, 0x8378, 0x83b3, 0x83b4, 0x83a0, 0x83aa, 0x8393, 0x839c, 0x8385, 0x837c, 0x83b6, 0x83a9, 0x837d, 0x83b8, 0x837b, 0x8398, 0x839e, 0x83a8, 0x83ba, 0x83bc, 0x83c1, 0x8401, 0x83e5, 0x83d8, 0x5807, 0x8418, 0x840b, 0x83dd, 0x83fd, 0x83d6, 0x841c, 0x8438, 0x8411, 0x8406, 0x83d4, 0x83df, 0x840f, 0x8403, 0x83f8, 0x83f9, 0x83ea, 0x83c5, 0x83c0, 0x8426, 0x83f0, 0x83e1, 0x845c, 0x8451, 0x845a, 0x8459, 0x8473, 0x8487, 0x8488, 0x847a, 0x8489, 0x8478, 0x843c, 0x8446, 0x8469, 0x8476, 0x848c, 0x848e, 0x8431, 0x846d, 0x84c1, 0x84cd, 0x84d0, 0x84e6, 0x84bd, 0x84d3, 0x84ca, 0x84bf, 0x84ba, 0x84e0, 0x84a1, 0x84b9, 0x84b4, 0x8497, 0x84e5, 0x84e3, 0x850c, 0x750d, 0x8538, 0x84f0, 0x8539, 0x851f, 0x853a, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xde40[ 192 ] = { 0x8f45, 0x8f46, 0x8f47, 0x8f48, 0x8f49, 0x8f4a, 0x8f4b, 0x8f4c, 0x8f4d, 0x8f4e, 0x8f4f, 0x8f50, 0x8f51, 0x8f52, 0x8f53, 0x8f54, 0x8f55, 0x8f56, 0x8f57, 0x8f58, 0x8f59, 0x8f5a, 0x8f5b, 0x8f5c, 0x8f5d, 0x8f5e, 0x8f5f, 0x8f60, 0x8f61, 0x8f62, 0x8f63, 0x8f64, 0x8f65, 0x8f6a, 0x8f80, 0x8f8c, 0x8f92, 0x8f9d, 0x8fa0, 0x8fa1, 0x8fa2, 0x8fa4, 0x8fa5, 0x8fa6, 0x8fa7, 0x8faa, 0x8fac, 0x8fad, 0x8fae, 0x8faf, 0x8fb2, 0x8fb3, 0x8fb4, 0x8fb5, 0x8fb7, 0x8fb8, 0x8fba, 0x8fbb, 0x8fbc, 0x8fbf, 0x8fc0, 0x8fc3, 0x8fc6, 0xfffd, 0x8fc9, 0x8fca, 0x8fcb, 0x8fcc, 0x8fcd, 0x8fcf, 0x8fd2, 0x8fd6, 0x8fd7, 0x8fda, 0x8fe0, 0x8fe1, 0x8fe3, 0x8fe7, 0x8fec, 0x8fef, 0x8ff1, 0x8ff2, 0x8ff4, 0x8ff5, 0x8ff6, 0x8ffa, 0x8ffb, 0x8ffc, 0x8ffe, 0x8fff, 0x9007, 0x9008, 0x900c, 0x900e, 0x9013, 0x9015, 0x9018, 0x8556, 0x853b, 0x84ff, 0x84fc, 0x8559, 0x8548, 0x8568, 0x8564, 0x855e, 0x857a, 0x77a2, 0x8543, 0x8572, 0x857b, 0x85a4, 0x85a8, 0x8587, 0x858f, 0x8579, 0x85ae, 0x859c, 0x8585, 0x85b9, 0x85b7, 0x85b0, 0x85d3, 0x85c1, 0x85dc, 0x85ff, 0x8627, 0x8605, 0x8629, 0x8616, 0x863c, 0x5efe, 0x5f08, 0x593c, 0x5941, 0x8037, 0x5955, 0x595a, 0x5958, 0x530f, 0x5c22, 0x5c25, 0x5c2c, 0x5c34, 0x624c, 0x626a, 0x629f, 0x62bb, 0x62ca, 0x62da, 0x62d7, 0x62ee, 0x6322, 0x62f6, 0x6339, 0x634b, 0x6343, 0x63ad, 0x63f6, 0x6371, 0x637a, 0x638e, 0x63b4, 0x636d, 0x63ac, 0x638a, 0x6369, 0x63ae, 0x63bc, 0x63f2, 0x63f8, 0x63e0, 0x63ff, 0x63c4, 0x63de, 0x63ce, 0x6452, 0x63c6, 0x63be, 0x6445, 0x6441, 0x640b, 0x641b, 0x6420, 0x640c, 0x6426, 0x6421, 0x645e, 0x6484, 0x646d, 0x6496, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdf40[ 192 ] = { 0x9019, 0x901c, 0x9023, 0x9024, 0x9025, 0x9027, 0x9028, 0x9029, 0x902a, 0x902b, 0x902c, 0x9030, 0x9031, 0x9032, 0x9033, 0x9034, 0x9037, 0x9039, 0x903a, 0x903d, 0x903f, 0x9040, 0x9043, 0x9045, 0x9046, 0x9048, 0x9049, 0x904a, 0x904b, 0x904c, 0x904e, 0x9054, 0x9055, 0x9056, 0x9059, 0x905a, 0x905c, 0x905d, 0x905e, 0x905f, 0x9060, 0x9061, 0x9064, 0x9066, 0x9067, 0x9069, 0x906a, 0x906b, 0x906c, 0x906f, 0x9070, 0x9071, 0x9072, 0x9073, 0x9076, 0x9077, 0x9078, 0x9079, 0x907a, 0x907b, 0x907c, 0x907e, 0x9081, 0xfffd, 0x9084, 0x9085, 0x9086, 0x9087, 0x9089, 0x908a, 0x908c, 0x908d, 0x908e, 0x908f, 0x9090, 0x9092, 0x9094, 0x9096, 0x9098, 0x909a, 0x909c, 0x909e, 0x909f, 0x90a0, 0x90a4, 0x90a5, 0x90a7, 0x90a8, 0x90a9, 0x90ab, 0x90ad, 0x90b2, 0x90b7, 0x90bc, 0x90bd, 0x90bf, 0x90c0, 0x647a, 0x64b7, 0x64b8, 0x6499, 0x64ba, 0x64c0, 0x64d0, 0x64d7, 0x64e4, 0x64e2, 0x6509, 0x6525, 0x652e, 0x5f0b, 0x5fd2, 0x7519, 0x5f11, 0x535f, 0x53f1, 0x53fd, 0x53e9, 0x53e8, 0x53fb, 0x5412, 0x5416, 0x5406, 0x544b, 0x5452, 0x5453, 0x5454, 0x5456, 0x5443, 0x5421, 0x5457, 0x5459, 0x5423, 0x5432, 0x5482, 0x5494, 0x5477, 0x5471, 0x5464, 0x549a, 0x549b, 0x5484, 0x5476, 0x5466, 0x549d, 0x54d0, 0x54ad, 0x54c2, 0x54b4, 0x54d2, 0x54a7, 0x54a6, 0x54d3, 0x54d4, 0x5472, 0x54a3, 0x54d5, 0x54bb, 0x54bf, 0x54cc, 0x54d9, 0x54da, 0x54dc, 0x54a9, 0x54aa, 0x54a4, 0x54dd, 0x54cf, 0x54de, 0x551b, 0x54e7, 0x5520, 0x54fd, 0x5514, 0x54f3, 0x5522, 0x5523, 0x550f, 0x5511, 0x5527, 0x552a, 0x5567, 0x558f, 0x55b5, 0x5549, 0x556d, 0x5541, 0x5555, 0x553f, 0x5550, 0x553c, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe040[ 192 ] = { 0x90c2, 0x90c3, 0x90c6, 0x90c8, 0x90c9, 0x90cb, 0x90cc, 0x90cd, 0x90d2, 0x90d4, 0x90d5, 0x90d6, 0x90d8, 0x90d9, 0x90da, 0x90de, 0x90df, 0x90e0, 0x90e3, 0x90e4, 0x90e5, 0x90e9, 0x90ea, 0x90ec, 0x90ee, 0x90f0, 0x90f1, 0x90f2, 0x90f3, 0x90f5, 0x90f6, 0x90f7, 0x90f9, 0x90fa, 0x90fb, 0x90fc, 0x90ff, 0x9100, 0x9101, 0x9103, 0x9105, 0x9106, 0x9107, 0x9108, 0x9109, 0x910a, 0x910b, 0x910c, 0x910d, 0x910e, 0x910f, 0x9110, 0x9111, 0x9112, 0x9113, 0x9114, 0x9115, 0x9116, 0x9117, 0x9118, 0x911a, 0x911b, 0x911c, 0xfffd, 0x911d, 0x911f, 0x9120, 0x9121, 0x9124, 0x9125, 0x9126, 0x9127, 0x9128, 0x9129, 0x912a, 0x912b, 0x912c, 0x912d, 0x912e, 0x9130, 0x9132, 0x9133, 0x9134, 0x9135, 0x9136, 0x9137, 0x9138, 0x913a, 0x913b, 0x913c, 0x913d, 0x913e, 0x913f, 0x9140, 0x9141, 0x9142, 0x9144, 0x5537, 0x5556, 0x5575, 0x5576, 0x5577, 0x5533, 0x5530, 0x555c, 0x558b, 0x55d2, 0x5583, 0x55b1, 0x55b9, 0x5588, 0x5581, 0x559f, 0x557e, 0x55d6, 0x5591, 0x557b, 0x55df, 0x55bd, 0x55be, 0x5594, 0x5599, 0x55ea, 0x55f7, 0x55c9, 0x561f, 0x55d1, 0x55eb, 0x55ec, 0x55d4, 0x55e6, 0x55dd, 0x55c4, 0x55ef, 0x55e5, 0x55f2, 0x55f3, 0x55cc, 0x55cd, 0x55e8, 0x55f5, 0x55e4, 0x8f94, 0x561e, 0x5608, 0x560c, 0x5601, 0x5624, 0x5623, 0x55fe, 0x5600, 0x5627, 0x562d, 0x5658, 0x5639, 0x5657, 0x562c, 0x564d, 0x5662, 0x5659, 0x565c, 0x564c, 0x5654, 0x5686, 0x5664, 0x5671, 0x566b, 0x567b, 0x567c, 0x5685, 0x5693, 0x56af, 0x56d4, 0x56d7, 0x56dd, 0x56e1, 0x56f5, 0x56eb, 0x56f9, 0x56ff, 0x5704, 0x570a, 0x5709, 0x571c, 0x5e0f, 0x5e19, 0x5e14, 0x5e11, 0x5e31, 0x5e3b, 0x5e3c, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe140[ 192 ] = { 0x9145, 0x9147, 0x9148, 0x9151, 0x9153, 0x9154, 0x9155, 0x9156, 0x9158, 0x9159, 0x915b, 0x915c, 0x915f, 0x9160, 0x9166, 0x9167, 0x9168, 0x916b, 0x916d, 0x9173, 0x917a, 0x917b, 0x917c, 0x9180, 0x9181, 0x9182, 0x9183, 0x9184, 0x9186, 0x9188, 0x918a, 0x918e, 0x918f, 0x9193, 0x9194, 0x9195, 0x9196, 0x9197, 0x9198, 0x9199, 0x919c, 0x919d, 0x919e, 0x919f, 0x91a0, 0x91a1, 0x91a4, 0x91a5, 0x91a6, 0x91a7, 0x91a8, 0x91a9, 0x91ab, 0x91ac, 0x91b0, 0x91b1, 0x91b2, 0x91b3, 0x91b6, 0x91b7, 0x91b8, 0x91b9, 0x91bb, 0xfffd, 0x91bc, 0x91bd, 0x91be, 0x91bf, 0x91c0, 0x91c1, 0x91c2, 0x91c3, 0x91c4, 0x91c5, 0x91c6, 0x91c8, 0x91cb, 0x91d0, 0x91d2, 0x91d3, 0x91d4, 0x91d5, 0x91d6, 0x91d7, 0x91d8, 0x91d9, 0x91da, 0x91db, 0x91dd, 0x91de, 0x91df, 0x91e0, 0x91e1, 0x91e2, 0x91e3, 0x91e4, 0x91e5, 0x5e37, 0x5e44, 0x5e54, 0x5e5b, 0x5e5e, 0x5e61, 0x5c8c, 0x5c7a, 0x5c8d, 0x5c90, 0x5c96, 0x5c88, 0x5c98, 0x5c99, 0x5c91, 0x5c9a, 0x5c9c, 0x5cb5, 0x5ca2, 0x5cbd, 0x5cac, 0x5cab, 0x5cb1, 0x5ca3, 0x5cc1, 0x5cb7, 0x5cc4, 0x5cd2, 0x5ce4, 0x5ccb, 0x5ce5, 0x5d02, 0x5d03, 0x5d27, 0x5d26, 0x5d2e, 0x5d24, 0x5d1e, 0x5d06, 0x5d1b, 0x5d58, 0x5d3e, 0x5d34, 0x5d3d, 0x5d6c, 0x5d5b, 0x5d6f, 0x5d5d, 0x5d6b, 0x5d4b, 0x5d4a, 0x5d69, 0x5d74, 0x5d82, 0x5d99, 0x5d9d, 0x8c73, 0x5db7, 0x5dc5, 0x5f73, 0x5f77, 0x5f82, 0x5f87, 0x5f89, 0x5f8c, 0x5f95, 0x5f99, 0x5f9c, 0x5fa8, 0x5fad, 0x5fb5, 0x5fbc, 0x8862, 0x5f61, 0x72ad, 0x72b0, 0x72b4, 0x72b7, 0x72b8, 0x72c3, 0x72c1, 0x72ce, 0x72cd, 0x72d2, 0x72e8, 0x72ef, 0x72e9, 0x72f2, 0x72f4, 0x72f7, 0x7301, 0x72f3, 0x7303, 0x72fa, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe240[ 192 ] = { 0x91e6, 0x91e7, 0x91e8, 0x91e9, 0x91ea, 0x91eb, 0x91ec, 0x91ed, 0x91ee, 0x91ef, 0x91f0, 0x91f1, 0x91f2, 0x91f3, 0x91f4, 0x91f5, 0x91f6, 0x91f7, 0x91f8, 0x91f9, 0x91fa, 0x91fb, 0x91fc, 0x91fd, 0x91fe, 0x91ff, 0x9200, 0x9201, 0x9202, 0x9203, 0x9204, 0x9205, 0x9206, 0x9207, 0x9208, 0x9209, 0x920a, 0x920b, 0x920c, 0x920d, 0x920e, 0x920f, 0x9210, 0x9211, 0x9212, 0x9213, 0x9214, 0x9215, 0x9216, 0x9217, 0x9218, 0x9219, 0x921a, 0x921b, 0x921c, 0x921d, 0x921e, 0x921f, 0x9220, 0x9221, 0x9222, 0x9223, 0x9224, 0xfffd, 0x9225, 0x9226, 0x9227, 0x9228, 0x9229, 0x922a, 0x922b, 0x922c, 0x922d, 0x922e, 0x922f, 0x9230, 0x9231, 0x9232, 0x9233, 0x9234, 0x9235, 0x9236, 0x9237, 0x9238, 0x9239, 0x923a, 0x923b, 0x923c, 0x923d, 0x923e, 0x923f, 0x9240, 0x9241, 0x9242, 0x9243, 0x9244, 0x9245, 0x72fb, 0x7317, 0x7313, 0x7321, 0x730a, 0x731e, 0x731d, 0x7315, 0x7322, 0x7339, 0x7325, 0x732c, 0x7338, 0x7331, 0x7350, 0x734d, 0x7357, 0x7360, 0x736c, 0x736f, 0x737e, 0x821b, 0x5925, 0x98e7, 0x5924, 0x5902, 0x9963, 0x9967, 0x9968, 0x9969, 0x996a, 0x996b, 0x996c, 0x9974, 0x9977, 0x997d, 0x9980, 0x9984, 0x9987, 0x998a, 0x998d, 0x9990, 0x9991, 0x9993, 0x9994, 0x9995, 0x5e80, 0x5e91, 0x5e8b, 0x5e96, 0x5ea5, 0x5ea0, 0x5eb9, 0x5eb5, 0x5ebe, 0x5eb3, 0x8d53, 0x5ed2, 0x5ed1, 0x5edb, 0x5ee8, 0x5eea, 0x81ba, 0x5fc4, 0x5fc9, 0x5fd6, 0x5fcf, 0x6003, 0x5fee, 0x6004, 0x5fe1, 0x5fe4, 0x5ffe, 0x6005, 0x6006, 0x5fea, 0x5fed, 0x5ff8, 0x6019, 0x6035, 0x6026, 0x601b, 0x600f, 0x600d, 0x6029, 0x602b, 0x600a, 0x603f, 0x6021, 0x6078, 0x6079, 0x607b, 0x607a, 0x6042, 0xfffd, }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe340[ 192 ] = { 0x9246, 0x9247, 0x9248, 0x9249, 0x924a, 0x924b, 0x924c, 0x924d, 0x924e, 0x924f, 0x9250, 0x9251, 0x9252, 0x9253, 0x9254, 0x9255, 0x9256, 0x9257, 0x9258, 0x9259, 0x925a, 0x925b, 0x925c, 0x925d, 0x925e, 0x925f, 0x9260, 0x9261, 0x9262, 0x9263, 0x9264, 0x9265, 0x9266, 0x9267, 0x9268, 0x9269, 0x926a, 0x926b, 0x926c, 0x926d, 0x926e, 0x926f, 0x9270, 0x9271, 0x9272, 0x9273, 0x9275, 0x9276, 0x9277, 0x9278, 0x9279, 0x927a, 0x927b, 0x927c, 0x927d, 0x927e, 0x927f, 0x9280, 0x9281, 0x9282, 0x9283, 0x9284, 0x9285, 0xfffd, 0x9286, 0x9287, 0x9288, 0x9289, 0x928a, 0x928b, 0x928c, 0x928d, 0x928f, 0x9290, 0x9291, 0x9292, 0x9293, 0x9294, 0x9295, 0x9296, 0x9297, 0x9298, 0x9299, 0x929a, 0x929b, 0x929c, 0x929d, 0x929e, 0x929f, 0x92a0, 0x92a1, 0x92a2, 0x92a3, 0x92a4, 0x92a5, 0x92a6, 0x92a7, 0x606a, 0x607d, 0x6096, 0x609a, 0x60ad, 0x609d, 0x6083, 0x6092, 0x608c, 0x609b, 0x60ec, 0x60bb, 0x60b1, 0x60dd, 0x60d8, 0x60c6, 0x60da, 0x60b4, 0x6120, 0x6126, 0x6115, 0x6123, 0x60f4, 0x6100, 0x610e, 0x612b, 0x614a, 0x6175, 0x61ac, 0x6194, 0x61a7, 0x61b7, 0x61d4, 0x61f5, 0x5fdd, 0x96b3, 0x95e9, 0x95eb, 0x95f1, 0x95f3, 0x95f5, 0x95f6, 0x95fc, 0x95fe, 0x9603, 0x9604, 0x9606, 0x9608, 0x960a, 0x960b, 0x960c, 0x960d, 0x960f, 0x9612, 0x9615, 0x9616, 0x9617, 0x9619, 0x961a, 0x4e2c, 0x723f, 0x6215, 0x6c35, 0x6c54, 0x6c5c, 0x6c4a, 0x6ca3, 0x6c85, 0x6c90, 0x6c94, 0x6c8c, 0x6c68, 0x6c69, 0x6c74, 0x6c76, 0x6c86, 0x6ca9, 0x6cd0, 0x6cd4, 0x6cad, 0x6cf7, 0x6cf8, 0x6cf1, 0x6cd7, 0x6cb2, 0x6ce0, 0x6cd6, 0x6cfa, 0x6ceb, 0x6cee, 0x6cb1, 0x6cd3, 0x6cef, 0x6cfe, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe440[ 192 ] = { 0x92a8, 0x92a9, 0x92aa, 0x92ab, 0x92ac, 0x92ad, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92b3, 0x92b4, 0x92b5, 0x92b6, 0x92b7, 0x92b8, 0x92b9, 0x92ba, 0x92bb, 0x92bc, 0x92bd, 0x92be, 0x92bf, 0x92c0, 0x92c1, 0x92c2, 0x92c3, 0x92c4, 0x92c5, 0x92c6, 0x92c7, 0x92c9, 0x92ca, 0x92cb, 0x92cc, 0x92cd, 0x92ce, 0x92cf, 0x92d0, 0x92d1, 0x92d2, 0x92d3, 0x92d4, 0x92d5, 0x92d6, 0x92d7, 0x92d8, 0x92d9, 0x92da, 0x92db, 0x92dc, 0x92dd, 0x92de, 0x92df, 0x92e0, 0x92e1, 0x92e2, 0x92e3, 0x92e4, 0x92e5, 0x92e6, 0x92e7, 0x92e8, 0xfffd, 0x92e9, 0x92ea, 0x92eb, 0x92ec, 0x92ed, 0x92ee, 0x92ef, 0x92f0, 0x92f1, 0x92f2, 0x92f3, 0x92f4, 0x92f5, 0x92f6, 0x92f7, 0x92f8, 0x92f9, 0x92fa, 0x92fb, 0x92fc, 0x92fd, 0x92fe, 0x92ff, 0x9300, 0x9301, 0x9302, 0x9303, 0x9304, 0x9305, 0x9306, 0x9307, 0x9308, 0x9309, 0x6d39, 0x6d27, 0x6d0c, 0x6d43, 0x6d48, 0x6d07, 0x6d04, 0x6d19, 0x6d0e, 0x6d2b, 0x6d4d, 0x6d2e, 0x6d35, 0x6d1a, 0x6d4f, 0x6d52, 0x6d54, 0x6d33, 0x6d91, 0x6d6f, 0x6d9e, 0x6da0, 0x6d5e, 0x6d93, 0x6d94, 0x6d5c, 0x6d60, 0x6d7c, 0x6d63, 0x6e1a, 0x6dc7, 0x6dc5, 0x6dde, 0x6e0e, 0x6dbf, 0x6de0, 0x6e11, 0x6de6, 0x6ddd, 0x6dd9, 0x6e16, 0x6dab, 0x6e0c, 0x6dae, 0x6e2b, 0x6e6e, 0x6e4e, 0x6e6b, 0x6eb2, 0x6e5f, 0x6e86, 0x6e53, 0x6e54, 0x6e32, 0x6e25, 0x6e44, 0x6edf, 0x6eb1, 0x6e98, 0x6ee0, 0x6f2d, 0x6ee2, 0x6ea5, 0x6ea7, 0x6ebd, 0x6ebb, 0x6eb7, 0x6ed7, 0x6eb4, 0x6ecf, 0x6e8f, 0x6ec2, 0x6e9f, 0x6f62, 0x6f46, 0x6f47, 0x6f24, 0x6f15, 0x6ef9, 0x6f2f, 0x6f36, 0x6f4b, 0x6f74, 0x6f2a, 0x6f09, 0x6f29, 0x6f89, 0x6f8d, 0x6f8c, 0x6f78, 0x6f72, 0x6f7c, 0x6f7a, 0x6fd1, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe540[ 192 ] = { 0x930a, 0x930b, 0x930c, 0x930d, 0x930e, 0x930f, 0x9310, 0x9311, 0x9312, 0x9313, 0x9314, 0x9315, 0x9316, 0x9317, 0x9318, 0x9319, 0x931a, 0x931b, 0x931c, 0x931d, 0x931e, 0x931f, 0x9320, 0x9321, 0x9322, 0x9323, 0x9324, 0x9325, 0x9326, 0x9327, 0x9328, 0x9329, 0x932a, 0x932b, 0x932c, 0x932d, 0x932e, 0x932f, 0x9330, 0x9331, 0x9332, 0x9333, 0x9334, 0x9335, 0x9336, 0x9337, 0x9338, 0x9339, 0x933a, 0x933b, 0x933c, 0x933d, 0x933f, 0x9340, 0x9341, 0x9342, 0x9343, 0x9344, 0x9345, 0x9346, 0x9347, 0x9348, 0x9349, 0xfffd, 0x934a, 0x934b, 0x934c, 0x934d, 0x934e, 0x934f, 0x9350, 0x9351, 0x9352, 0x9353, 0x9354, 0x9355, 0x9356, 0x9357, 0x9358, 0x9359, 0x935a, 0x935b, 0x935c, 0x935d, 0x935e, 0x935f, 0x9360, 0x9361, 0x9362, 0x9363, 0x9364, 0x9365, 0x9366, 0x9367, 0x9368, 0x9369, 0x936b, 0x6fc9, 0x6fa7, 0x6fb9, 0x6fb6, 0x6fc2, 0x6fe1, 0x6fee, 0x6fde, 0x6fe0, 0x6fef, 0x701a, 0x7023, 0x701b, 0x7039, 0x7035, 0x704f, 0x705e, 0x5b80, 0x5b84, 0x5b95, 0x5b93, 0x5ba5, 0x5bb8, 0x752f, 0x9a9e, 0x6434, 0x5be4, 0x5bee, 0x8930, 0x5bf0, 0x8e47, 0x8b07, 0x8fb6, 0x8fd3, 0x8fd5, 0x8fe5, 0x8fee, 0x8fe4, 0x8fe9, 0x8fe6, 0x8ff3, 0x8fe8, 0x9005, 0x9004, 0x900b, 0x9026, 0x9011, 0x900d, 0x9016, 0x9021, 0x9035, 0x9036, 0x902d, 0x902f, 0x9044, 0x9051, 0x9052, 0x9050, 0x9068, 0x9058, 0x9062, 0x905b, 0x66b9, 0x9074, 0x907d, 0x9082, 0x9088, 0x9083, 0x908b, 0x5f50, 0x5f57, 0x5f56, 0x5f58, 0x5c3b, 0x54ab, 0x5c50, 0x5c59, 0x5b71, 0x5c63, 0x5c66, 0x7fbc, 0x5f2a, 0x5f29, 0x5f2d, 0x8274, 0x5f3c, 0x9b3b, 0x5c6e, 0x5981, 0x5983, 0x598d, 0x59a9, 0x59aa, 0x59a3, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe640[ 192 ] = { 0x936c, 0x936d, 0x936e, 0x936f, 0x9370, 0x9371, 0x9372, 0x9373, 0x9374, 0x9375, 0x9376, 0x9377, 0x9378, 0x9379, 0x937a, 0x937b, 0x937c, 0x937d, 0x937e, 0x937f, 0x9380, 0x9381, 0x9382, 0x9383, 0x9384, 0x9385, 0x9386, 0x9387, 0x9388, 0x9389, 0x938a, 0x938b, 0x938c, 0x938d, 0x938e, 0x9390, 0x9391, 0x9392, 0x9393, 0x9394, 0x9395, 0x9396, 0x9397, 0x9398, 0x9399, 0x939a, 0x939b, 0x939c, 0x939d, 0x939e, 0x939f, 0x93a0, 0x93a1, 0x93a2, 0x93a3, 0x93a4, 0x93a5, 0x93a6, 0x93a7, 0x93a8, 0x93a9, 0x93aa, 0x93ab, 0xfffd, 0x93ac, 0x93ad, 0x93ae, 0x93af, 0x93b0, 0x93b1, 0x93b2, 0x93b3, 0x93b4, 0x93b5, 0x93b6, 0x93b7, 0x93b8, 0x93b9, 0x93ba, 0x93bb, 0x93bc, 0x93bd, 0x93be, 0x93bf, 0x93c0, 0x93c1, 0x93c2, 0x93c3, 0x93c4, 0x93c5, 0x93c6, 0x93c7, 0x93c8, 0x93c9, 0x93cb, 0x93cc, 0x93cd, 0x5997, 0x59ca, 0x59ab, 0x599e, 0x59a4, 0x59d2, 0x59b2, 0x59af, 0x59d7, 0x59be, 0x5a05, 0x5a06, 0x59dd, 0x5a08, 0x59e3, 0x59d8, 0x59f9, 0x5a0c, 0x5a09, 0x5a32, 0x5a34, 0x5a11, 0x5a23, 0x5a13, 0x5a40, 0x5a67, 0x5a4a, 0x5a55, 0x5a3c, 0x5a62, 0x5a75, 0x80ec, 0x5aaa, 0x5a9b, 0x5a77, 0x5a7a, 0x5abe, 0x5aeb, 0x5ab2, 0x5ad2, 0x5ad4, 0x5ab8, 0x5ae0, 0x5ae3, 0x5af1, 0x5ad6, 0x5ae6, 0x5ad8, 0x5adc, 0x5b09, 0x5b17, 0x5b16, 0x5b32, 0x5b37, 0x5b40, 0x5c15, 0x5c1c, 0x5b5a, 0x5b65, 0x5b73, 0x5b51, 0x5b53, 0x5b62, 0x9a75, 0x9a77, 0x9a78, 0x9a7a, 0x9a7f, 0x9a7d, 0x9a80, 0x9a81, 0x9a85, 0x9a88, 0x9a8a, 0x9a90, 0x9a92, 0x9a93, 0x9a96, 0x9a98, 0x9a9b, 0x9a9c, 0x9a9d, 0x9a9f, 0x9aa0, 0x9aa2, 0x9aa3, 0x9aa5, 0x9aa7, 0x7e9f, 0x7ea1, 0x7ea3, 0x7ea5, 0x7ea8, 0x7ea9, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe740[ 192 ] = { 0x93ce, 0x93cf, 0x93d0, 0x93d1, 0x93d2, 0x93d3, 0x93d4, 0x93d5, 0x93d7, 0x93d8, 0x93d9, 0x93da, 0x93db, 0x93dc, 0x93dd, 0x93de, 0x93df, 0x93e0, 0x93e1, 0x93e2, 0x93e3, 0x93e4, 0x93e5, 0x93e6, 0x93e7, 0x93e8, 0x93e9, 0x93ea, 0x93eb, 0x93ec, 0x93ed, 0x93ee, 0x93ef, 0x93f0, 0x93f1, 0x93f2, 0x93f3, 0x93f4, 0x93f5, 0x93f6, 0x93f7, 0x93f8, 0x93f9, 0x93fa, 0x93fb, 0x93fc, 0x93fd, 0x93fe, 0x93ff, 0x9400, 0x9401, 0x9402, 0x9403, 0x9404, 0x9405, 0x9406, 0x9407, 0x9408, 0x9409, 0x940a, 0x940b, 0x940c, 0x940d, 0xfffd, 0x940e, 0x940f, 0x9410, 0x9411, 0x9412, 0x9413, 0x9414, 0x9415, 0x9416, 0x9417, 0x9418, 0x9419, 0x941a, 0x941b, 0x941c, 0x941d, 0x941e, 0x941f, 0x9420, 0x9421, 0x9422, 0x9423, 0x9424, 0x9425, 0x9426, 0x9427, 0x9428, 0x9429, 0x942a, 0x942b, 0x942c, 0x942d, 0x942e, 0x7ead, 0x7eb0, 0x7ebe, 0x7ec0, 0x7ec1, 0x7ec2, 0x7ec9, 0x7ecb, 0x7ecc, 0x7ed0, 0x7ed4, 0x7ed7, 0x7edb, 0x7ee0, 0x7ee1, 0x7ee8, 0x7eeb, 0x7eee, 0x7eef, 0x7ef1, 0x7ef2, 0x7f0d, 0x7ef6, 0x7efa, 0x7efb, 0x7efe, 0x7f01, 0x7f02, 0x7f03, 0x7f07, 0x7f08, 0x7f0b, 0x7f0c, 0x7f0f, 0x7f11, 0x7f12, 0x7f17, 0x7f19, 0x7f1c, 0x7f1b, 0x7f1f, 0x7f21, 0x7f22, 0x7f23, 0x7f24, 0x7f25, 0x7f26, 0x7f27, 0x7f2a, 0x7f2b, 0x7f2c, 0x7f2d, 0x7f2f, 0x7f30, 0x7f31, 0x7f32, 0x7f33, 0x7f35, 0x5e7a, 0x757f, 0x5ddb, 0x753e, 0x9095, 0x738e, 0x7391, 0x73ae, 0x73a2, 0x739f, 0x73cf, 0x73c2, 0x73d1, 0x73b7, 0x73b3, 0x73c0, 0x73c9, 0x73c8, 0x73e5, 0x73d9, 0x987c, 0x740a, 0x73e9, 0x73e7, 0x73de, 0x73ba, 0x73f2, 0x740f, 0x742a, 0x745b, 0x7426, 0x7425, 0x7428, 0x7430, 0x742e, 0x742c, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe840[ 192 ] = { 0x942f, 0x9430, 0x9431, 0x9432, 0x9433, 0x9434, 0x9435, 0x9436, 0x9437, 0x9438, 0x9439, 0x943a, 0x943b, 0x943c, 0x943d, 0x943f, 0x9440, 0x9441, 0x9442, 0x9443, 0x9444, 0x9445, 0x9446, 0x9447, 0x9448, 0x9449, 0x944a, 0x944b, 0x944c, 0x944d, 0x944e, 0x944f, 0x9450, 0x9451, 0x9452, 0x9453, 0x9454, 0x9455, 0x9456, 0x9457, 0x9458, 0x9459, 0x945a, 0x945b, 0x945c, 0x945d, 0x945e, 0x945f, 0x9460, 0x9461, 0x9462, 0x9463, 0x9464, 0x9465, 0x9466, 0x9467, 0x9468, 0x9469, 0x946a, 0x946c, 0x946d, 0x946e, 0x946f, 0xfffd, 0x9470, 0x9471, 0x9472, 0x9473, 0x9474, 0x9475, 0x9476, 0x9477, 0x9478, 0x9479, 0x947a, 0x947b, 0x947c, 0x947d, 0x947e, 0x947f, 0x9480, 0x9481, 0x9482, 0x9483, 0x9484, 0x9491, 0x9496, 0x9498, 0x94c7, 0x94cf, 0x94d3, 0x94d4, 0x94da, 0x94e6, 0x94fb, 0x951c, 0x9520, 0x741b, 0x741a, 0x7441, 0x745c, 0x7457, 0x7455, 0x7459, 0x7477, 0x746d, 0x747e, 0x749c, 0x748e, 0x7480, 0x7481, 0x7487, 0x748b, 0x749e, 0x74a8, 0x74a9, 0x7490, 0x74a7, 0x74d2, 0x74ba, 0x97ea, 0x97eb, 0x97ec, 0x674c, 0x6753, 0x675e, 0x6748, 0x6769, 0x67a5, 0x6787, 0x676a, 0x6773, 0x6798, 0x67a7, 0x6775, 0x67a8, 0x679e, 0x67ad, 0x678b, 0x6777, 0x677c, 0x67f0, 0x6809, 0x67d8, 0x680a, 0x67e9, 0x67b0, 0x680c, 0x67d9, 0x67b5, 0x67da, 0x67b3, 0x67dd, 0x6800, 0x67c3, 0x67b8, 0x67e2, 0x680e, 0x67c1, 0x67fd, 0x6832, 0x6833, 0x6860, 0x6861, 0x684e, 0x6862, 0x6844, 0x6864, 0x6883, 0x681d, 0x6855, 0x6866, 0x6841, 0x6867, 0x6840, 0x683e, 0x684a, 0x6849, 0x6829, 0x68b5, 0x688f, 0x6874, 0x6877, 0x6893, 0x686b, 0x68c2, 0x696e, 0x68fc, 0x691f, 0x6920, 0x68f9, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe940[ 192 ] = { 0x9527, 0x9533, 0x953d, 0x9543, 0x9548, 0x954b, 0x9555, 0x955a, 0x9560, 0x956e, 0x9574, 0x9575, 0x9577, 0x9578, 0x9579, 0x957a, 0x957b, 0x957c, 0x957d, 0x957e, 0x9580, 0x9581, 0x9582, 0x9583, 0x9584, 0x9585, 0x9586, 0x9587, 0x9588, 0x9589, 0x958a, 0x958b, 0x958c, 0x958d, 0x958e, 0x958f, 0x9590, 0x9591, 0x9592, 0x9593, 0x9594, 0x9595, 0x9596, 0x9597, 0x9598, 0x9599, 0x959a, 0x959b, 0x959c, 0x959d, 0x959e, 0x959f, 0x95a0, 0x95a1, 0x95a2, 0x95a3, 0x95a4, 0x95a5, 0x95a6, 0x95a7, 0x95a8, 0x95a9, 0x95aa, 0xfffd, 0x95ab, 0x95ac, 0x95ad, 0x95ae, 0x95af, 0x95b0, 0x95b1, 0x95b2, 0x95b3, 0x95b4, 0x95b5, 0x95b6, 0x95b7, 0x95b8, 0x95b9, 0x95ba, 0x95bb, 0x95bc, 0x95bd, 0x95be, 0x95bf, 0x95c0, 0x95c1, 0x95c2, 0x95c3, 0x95c4, 0x95c5, 0x95c6, 0x95c7, 0x95c8, 0x95c9, 0x95ca, 0x95cb, 0x6924, 0x68f0, 0x690b, 0x6901, 0x6957, 0x68e3, 0x6910, 0x6971, 0x6939, 0x6960, 0x6942, 0x695d, 0x6984, 0x696b, 0x6980, 0x6998, 0x6978, 0x6934, 0x69cc, 0x6987, 0x6988, 0x69ce, 0x6989, 0x6966, 0x6963, 0x6979, 0x699b, 0x69a7, 0x69bb, 0x69ab, 0x69ad, 0x69d4, 0x69b1, 0x69c1, 0x69ca, 0x69df, 0x6995, 0x69e0, 0x698d, 0x69ff, 0x6a2f, 0x69ed, 0x6a17, 0x6a18, 0x6a65, 0x69f2, 0x6a44, 0x6a3e, 0x6aa0, 0x6a50, 0x6a5b, 0x6a35, 0x6a8e, 0x6a79, 0x6a3d, 0x6a28, 0x6a58, 0x6a7c, 0x6a91, 0x6a90, 0x6aa9, 0x6a97, 0x6aab, 0x7337, 0x7352, 0x6b81, 0x6b82, 0x6b87, 0x6b84, 0x6b92, 0x6b93, 0x6b8d, 0x6b9a, 0x6b9b, 0x6ba1, 0x6baa, 0x8f6b, 0x8f6d, 0x8f71, 0x8f72, 0x8f73, 0x8f75, 0x8f76, 0x8f78, 0x8f77, 0x8f79, 0x8f7a, 0x8f7c, 0x8f7e, 0x8f81, 0x8f82, 0x8f84, 0x8f87, 0x8f8b, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xea40[ 192 ] = { 0x95cc, 0x95cd, 0x95ce, 0x95cf, 0x95d0, 0x95d1, 0x95d2, 0x95d3, 0x95d4, 0x95d5, 0x95d6, 0x95d7, 0x95d8, 0x95d9, 0x95da, 0x95db, 0x95dc, 0x95dd, 0x95de, 0x95df, 0x95e0, 0x95e1, 0x95e2, 0x95e3, 0x95e4, 0x95e5, 0x95e6, 0x95e7, 0x95ec, 0x95ff, 0x9607, 0x9613, 0x9618, 0x961b, 0x961e, 0x9620, 0x9623, 0x9624, 0x9625, 0x9626, 0x9627, 0x9628, 0x9629, 0x962b, 0x962c, 0x962d, 0x962f, 0x9630, 0x9637, 0x9638, 0x9639, 0x963a, 0x963e, 0x9641, 0x9643, 0x964a, 0x964e, 0x964f, 0x9651, 0x9652, 0x9653, 0x9656, 0x9657, 0xfffd, 0x9658, 0x9659, 0x965a, 0x965c, 0x965d, 0x965e, 0x9660, 0x9663, 0x9665, 0x9666, 0x966b, 0x966d, 0x966e, 0x966f, 0x9670, 0x9671, 0x9673, 0x9678, 0x9679, 0x967a, 0x967b, 0x967c, 0x967d, 0x967e, 0x967f, 0x9680, 0x9681, 0x9682, 0x9683, 0x9684, 0x9687, 0x9689, 0x968a, 0x8f8d, 0x8f8e, 0x8f8f, 0x8f98, 0x8f9a, 0x8ece, 0x620b, 0x6217, 0x621b, 0x621f, 0x6222, 0x6221, 0x6225, 0x6224, 0x622c, 0x81e7, 0x74ef, 0x74f4, 0x74ff, 0x750f, 0x7511, 0x7513, 0x6534, 0x65ee, 0x65ef, 0x65f0, 0x660a, 0x6619, 0x6772, 0x6603, 0x6615, 0x6600, 0x7085, 0x66f7, 0x661d, 0x6634, 0x6631, 0x6636, 0x6635, 0x8006, 0x665f, 0x6654, 0x6641, 0x664f, 0x6656, 0x6661, 0x6657, 0x6677, 0x6684, 0x668c, 0x66a7, 0x669d, 0x66be, 0x66db, 0x66dc, 0x66e6, 0x66e9, 0x8d32, 0x8d33, 0x8d36, 0x8d3b, 0x8d3d, 0x8d40, 0x8d45, 0x8d46, 0x8d48, 0x8d49, 0x8d47, 0x8d4d, 0x8d55, 0x8d59, 0x89c7, 0x89ca, 0x89cb, 0x89cc, 0x89ce, 0x89cf, 0x89d0, 0x89d1, 0x726e, 0x729f, 0x725d, 0x7266, 0x726f, 0x727e, 0x727f, 0x7284, 0x728b, 0x728d, 0x728f, 0x7292, 0x6308, 0x6332, 0x63b0, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xeb40[ 192 ] = { 0x968c, 0x968e, 0x9691, 0x9692, 0x9693, 0x9695, 0x9696, 0x969a, 0x969b, 0x969d, 0x969e, 0x969f, 0x96a0, 0x96a1, 0x96a2, 0x96a3, 0x96a4, 0x96a5, 0x96a6, 0x96a8, 0x96a9, 0x96aa, 0x96ab, 0x96ac, 0x96ad, 0x96ae, 0x96af, 0x96b1, 0x96b2, 0x96b4, 0x96b5, 0x96b7, 0x96b8, 0x96ba, 0x96bb, 0x96bf, 0x96c2, 0x96c3, 0x96c8, 0x96ca, 0x96cb, 0x96d0, 0x96d1, 0x96d3, 0x96d4, 0x96d6, 0x96d7, 0x96d8, 0x96d9, 0x96da, 0x96db, 0x96dc, 0x96dd, 0x96de, 0x96df, 0x96e1, 0x96e2, 0x96e3, 0x96e4, 0x96e5, 0x96e6, 0x96e7, 0x96eb, 0xfffd, 0x96ec, 0x96ed, 0x96ee, 0x96f0, 0x96f1, 0x96f2, 0x96f4, 0x96f5, 0x96f8, 0x96fa, 0x96fb, 0x96fc, 0x96fd, 0x96ff, 0x9702, 0x9703, 0x9705, 0x970a, 0x970b, 0x970c, 0x9710, 0x9711, 0x9712, 0x9714, 0x9715, 0x9717, 0x9718, 0x9719, 0x971a, 0x971b, 0x971d, 0x971f, 0x9720, 0x643f, 0x64d8, 0x8004, 0x6bea, 0x6bf3, 0x6bfd, 0x6bf5, 0x6bf9, 0x6c05, 0x6c07, 0x6c06, 0x6c0d, 0x6c15, 0x6c18, 0x6c19, 0x6c1a, 0x6c21, 0x6c29, 0x6c24, 0x6c2a, 0x6c32, 0x6535, 0x6555, 0x656b, 0x724d, 0x7252, 0x7256, 0x7230, 0x8662, 0x5216, 0x809f, 0x809c, 0x8093, 0x80bc, 0x670a, 0x80bd, 0x80b1, 0x80ab, 0x80ad, 0x80b4, 0x80b7, 0x80e7, 0x80e8, 0x80e9, 0x80ea, 0x80db, 0x80c2, 0x80c4, 0x80d9, 0x80cd, 0x80d7, 0x6710, 0x80dd, 0x80eb, 0x80f1, 0x80f4, 0x80ed, 0x810d, 0x810e, 0x80f2, 0x80fc, 0x6715, 0x8112, 0x8c5a, 0x8136, 0x811e, 0x812c, 0x8118, 0x8132, 0x8148, 0x814c, 0x8153, 0x8174, 0x8159, 0x815a, 0x8171, 0x8160, 0x8169, 0x817c, 0x817d, 0x816d, 0x8167, 0x584d, 0x5ab5, 0x8188, 0x8182, 0x8191, 0x6ed5, 0x81a3, 0x81aa, 0x81cc, 0x6726, 0x81ca, 0x81bb, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xec40[ 192 ] = { 0x9721, 0x9722, 0x9723, 0x9724, 0x9725, 0x9726, 0x9727, 0x9728, 0x9729, 0x972b, 0x972c, 0x972e, 0x972f, 0x9731, 0x9733, 0x9734, 0x9735, 0x9736, 0x9737, 0x973a, 0x973b, 0x973c, 0x973d, 0x973f, 0x9740, 0x9741, 0x9742, 0x9743, 0x9744, 0x9745, 0x9746, 0x9747, 0x9748, 0x9749, 0x974a, 0x974b, 0x974c, 0x974d, 0x974e, 0x974f, 0x9750, 0x9751, 0x9754, 0x9755, 0x9757, 0x9758, 0x975a, 0x975c, 0x975d, 0x975f, 0x9763, 0x9764, 0x9766, 0x9767, 0x9768, 0x976a, 0x976b, 0x976c, 0x976d, 0x976e, 0x976f, 0x9770, 0x9771, 0xfffd, 0x9772, 0x9775, 0x9777, 0x9778, 0x9779, 0x977a, 0x977b, 0x977d, 0x977e, 0x977f, 0x9780, 0x9781, 0x9782, 0x9783, 0x9784, 0x9786, 0x9787, 0x9788, 0x9789, 0x978a, 0x978c, 0x978e, 0x978f, 0x9790, 0x9793, 0x9795, 0x9796, 0x9797, 0x9799, 0x979a, 0x979b, 0x979c, 0x979d, 0x81c1, 0x81a6, 0x6b24, 0x6b37, 0x6b39, 0x6b43, 0x6b46, 0x6b59, 0x98d1, 0x98d2, 0x98d3, 0x98d5, 0x98d9, 0x98da, 0x6bb3, 0x5f40, 0x6bc2, 0x89f3, 0x6590, 0x9f51, 0x6593, 0x65bc, 0x65c6, 0x65c4, 0x65c3, 0x65cc, 0x65ce, 0x65d2, 0x65d6, 0x7080, 0x709c, 0x7096, 0x709d, 0x70bb, 0x70c0, 0x70b7, 0x70ab, 0x70b1, 0x70e8, 0x70ca, 0x7110, 0x7113, 0x7116, 0x712f, 0x7131, 0x7173, 0x715c, 0x7168, 0x7145, 0x7172, 0x714a, 0x7178, 0x717a, 0x7198, 0x71b3, 0x71b5, 0x71a8, 0x71a0, 0x71e0, 0x71d4, 0x71e7, 0x71f9, 0x721d, 0x7228, 0x706c, 0x7118, 0x7166, 0x71b9, 0x623e, 0x623d, 0x6243, 0x6248, 0x6249, 0x793b, 0x7940, 0x7946, 0x7949, 0x795b, 0x795c, 0x7953, 0x795a, 0x7962, 0x7957, 0x7960, 0x796f, 0x7967, 0x797a, 0x7985, 0x798a, 0x799a, 0x79a7, 0x79b3, 0x5fd1, 0x5fd0, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xed40[ 192 ] = { 0x979e, 0x979f, 0x97a1, 0x97a2, 0x97a4, 0x97a5, 0x97a6, 0x97a7, 0x97a8, 0x97a9, 0x97aa, 0x97ac, 0x97ae, 0x97b0, 0x97b1, 0x97b3, 0x97b5, 0x97b6, 0x97b7, 0x97b8, 0x97b9, 0x97ba, 0x97bb, 0x97bc, 0x97bd, 0x97be, 0x97bf, 0x97c0, 0x97c1, 0x97c2, 0x97c3, 0x97c4, 0x97c5, 0x97c6, 0x97c7, 0x97c8, 0x97c9, 0x97ca, 0x97cb, 0x97cc, 0x97cd, 0x97ce, 0x97cf, 0x97d0, 0x97d1, 0x97d2, 0x97d3, 0x97d4, 0x97d5, 0x97d6, 0x97d7, 0x97d8, 0x97d9, 0x97da, 0x97db, 0x97dc, 0x97dd, 0x97de, 0x97df, 0x97e0, 0x97e1, 0x97e2, 0x97e3, 0xfffd, 0x97e4, 0x97e5, 0x97e8, 0x97ee, 0x97ef, 0x97f0, 0x97f1, 0x97f2, 0x97f4, 0x97f7, 0x97f8, 0x97f9, 0x97fa, 0x97fb, 0x97fc, 0x97fd, 0x97fe, 0x97ff, 0x9800, 0x9801, 0x9802, 0x9803, 0x9804, 0x9805, 0x9806, 0x9807, 0x9808, 0x9809, 0x980a, 0x980b, 0x980c, 0x980d, 0x980e, 0x603c, 0x605d, 0x605a, 0x6067, 0x6041, 0x6059, 0x6063, 0x60ab, 0x6106, 0x610d, 0x615d, 0x61a9, 0x619d, 0x61cb, 0x61d1, 0x6206, 0x8080, 0x807f, 0x6c93, 0x6cf6, 0x6dfc, 0x77f6, 0x77f8, 0x7800, 0x7809, 0x7817, 0x7818, 0x7811, 0x65ab, 0x782d, 0x781c, 0x781d, 0x7839, 0x783a, 0x783b, 0x781f, 0x783c, 0x7825, 0x782c, 0x7823, 0x7829, 0x784e, 0x786d, 0x7856, 0x7857, 0x7826, 0x7850, 0x7847, 0x784c, 0x786a, 0x789b, 0x7893, 0x789a, 0x7887, 0x789c, 0x78a1, 0x78a3, 0x78b2, 0x78b9, 0x78a5, 0x78d4, 0x78d9, 0x78c9, 0x78ec, 0x78f2, 0x7905, 0x78f4, 0x7913, 0x7924, 0x791e, 0x7934, 0x9f9b, 0x9ef9, 0x9efb, 0x9efc, 0x76f1, 0x7704, 0x770d, 0x76f9, 0x7707, 0x7708, 0x771a, 0x7722, 0x7719, 0x772d, 0x7726, 0x7735, 0x7738, 0x7750, 0x7751, 0x7747, 0x7743, 0x775a, 0x7768, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xee40[ 192 ] = { 0x980f, 0x9810, 0x9811, 0x9812, 0x9813, 0x9814, 0x9815, 0x9816, 0x9817, 0x9818, 0x9819, 0x981a, 0x981b, 0x981c, 0x981d, 0x981e, 0x981f, 0x9820, 0x9821, 0x9822, 0x9823, 0x9824, 0x9825, 0x9826, 0x9827, 0x9828, 0x9829, 0x982a, 0x982b, 0x982c, 0x982d, 0x982e, 0x982f, 0x9830, 0x9831, 0x9832, 0x9833, 0x9834, 0x9835, 0x9836, 0x9837, 0x9838, 0x9839, 0x983a, 0x983b, 0x983c, 0x983d, 0x983e, 0x983f, 0x9840, 0x9841, 0x9842, 0x9843, 0x9844, 0x9845, 0x9846, 0x9847, 0x9848, 0x9849, 0x984a, 0x984b, 0x984c, 0x984d, 0xfffd, 0x984e, 0x984f, 0x9850, 0x9851, 0x9852, 0x9853, 0x9854, 0x9855, 0x9856, 0x9857, 0x9858, 0x9859, 0x985a, 0x985b, 0x985c, 0x985d, 0x985e, 0x985f, 0x9860, 0x9861, 0x9862, 0x9863, 0x9864, 0x9865, 0x9866, 0x9867, 0x9868, 0x9869, 0x986a, 0x986b, 0x986c, 0x986d, 0x986e, 0x7762, 0x7765, 0x777f, 0x778d, 0x777d, 0x7780, 0x778c, 0x7791, 0x779f, 0x77a0, 0x77b0, 0x77b5, 0x77bd, 0x753a, 0x7540, 0x754e, 0x754b, 0x7548, 0x755b, 0x7572, 0x7579, 0x7583, 0x7f58, 0x7f61, 0x7f5f, 0x8a48, 0x7f68, 0x7f74, 0x7f71, 0x7f79, 0x7f81, 0x7f7e, 0x76cd, 0x76e5, 0x8832, 0x9485, 0x9486, 0x9487, 0x948b, 0x948a, 0x948c, 0x948d, 0x948f, 0x9490, 0x9494, 0x9497, 0x9495, 0x949a, 0x949b, 0x949c, 0x94a3, 0x94a4, 0x94ab, 0x94aa, 0x94ad, 0x94ac, 0x94af, 0x94b0, 0x94b2, 0x94b4, 0x94b6, 0x94b7, 0x94b8, 0x94b9, 0x94ba, 0x94bc, 0x94bd, 0x94bf, 0x94c4, 0x94c8, 0x94c9, 0x94ca, 0x94cb, 0x94cc, 0x94cd, 0x94ce, 0x94d0, 0x94d1, 0x94d2, 0x94d5, 0x94d6, 0x94d7, 0x94d9, 0x94d8, 0x94db, 0x94de, 0x94df, 0x94e0, 0x94e2, 0x94e4, 0x94e5, 0x94e7, 0x94e8, 0x94ea, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xef40[ 192 ] = { 0x986f, 0x9870, 0x9871, 0x9872, 0x9873, 0x9874, 0x988b, 0x988e, 0x9892, 0x9895, 0x9899, 0x98a3, 0x98a8, 0x98a9, 0x98aa, 0x98ab, 0x98ac, 0x98ad, 0x98ae, 0x98af, 0x98b0, 0x98b1, 0x98b2, 0x98b3, 0x98b4, 0x98b5, 0x98b6, 0x98b7, 0x98b8, 0x98b9, 0x98ba, 0x98bb, 0x98bc, 0x98bd, 0x98be, 0x98bf, 0x98c0, 0x98c1, 0x98c2, 0x98c3, 0x98c4, 0x98c5, 0x98c6, 0x98c7, 0x98c8, 0x98c9, 0x98ca, 0x98cb, 0x98cc, 0x98cd, 0x98cf, 0x98d0, 0x98d4, 0x98d6, 0x98d7, 0x98db, 0x98dc, 0x98dd, 0x98e0, 0x98e1, 0x98e2, 0x98e3, 0x98e4, 0xfffd, 0x98e5, 0x98e6, 0x98e9, 0x98ea, 0x98eb, 0x98ec, 0x98ed, 0x98ee, 0x98ef, 0x98f0, 0x98f1, 0x98f2, 0x98f3, 0x98f4, 0x98f5, 0x98f6, 0x98f7, 0x98f8, 0x98f9, 0x98fa, 0x98fb, 0x98fc, 0x98fd, 0x98fe, 0x98ff, 0x9900, 0x9901, 0x9902, 0x9903, 0x9904, 0x9905, 0x9906, 0x9907, 0x94e9, 0x94eb, 0x94ee, 0x94ef, 0x94f3, 0x94f4, 0x94f5, 0x94f7, 0x94f9, 0x94fc, 0x94fd, 0x94ff, 0x9503, 0x9502, 0x9506, 0x9507, 0x9509, 0x950a, 0x950d, 0x950e, 0x950f, 0x9512, 0x9513, 0x9514, 0x9515, 0x9516, 0x9518, 0x951b, 0x951d, 0x951e, 0x951f, 0x9522, 0x952a, 0x952b, 0x9529, 0x952c, 0x9531, 0x9532, 0x9534, 0x9536, 0x9537, 0x9538, 0x953c, 0x953e, 0x953f, 0x9542, 0x9535, 0x9544, 0x9545, 0x9546, 0x9549, 0x954c, 0x954e, 0x954f, 0x9552, 0x9553, 0x9554, 0x9556, 0x9557, 0x9558, 0x9559, 0x955b, 0x955e, 0x955f, 0x955d, 0x9561, 0x9562, 0x9564, 0x9565, 0x9566, 0x9567, 0x9568, 0x9569, 0x956a, 0x956b, 0x956c, 0x956f, 0x9571, 0x9572, 0x9573, 0x953a, 0x77e7, 0x77ec, 0x96c9, 0x79d5, 0x79ed, 0x79e3, 0x79eb, 0x7a06, 0x5d47, 0x7a03, 0x7a02, 0x7a1e, 0x7a14, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf040[ 192 ] = { 0x9908, 0x9909, 0x990a, 0x990b, 0x990c, 0x990e, 0x990f, 0x9911, 0x9912, 0x9913, 0x9914, 0x9915, 0x9916, 0x9917, 0x9918, 0x9919, 0x991a, 0x991b, 0x991c, 0x991d, 0x991e, 0x991f, 0x9920, 0x9921, 0x9922, 0x9923, 0x9924, 0x9925, 0x9926, 0x9927, 0x9928, 0x9929, 0x992a, 0x992b, 0x992c, 0x992d, 0x992f, 0x9930, 0x9931, 0x9932, 0x9933, 0x9934, 0x9935, 0x9936, 0x9937, 0x9938, 0x9939, 0x993a, 0x993b, 0x993c, 0x993d, 0x993e, 0x993f, 0x9940, 0x9941, 0x9942, 0x9943, 0x9944, 0x9945, 0x9946, 0x9947, 0x9948, 0x9949, 0xfffd, 0x994a, 0x994b, 0x994c, 0x994d, 0x994e, 0x994f, 0x9950, 0x9951, 0x9952, 0x9953, 0x9956, 0x9957, 0x9958, 0x9959, 0x995a, 0x995b, 0x995c, 0x995d, 0x995e, 0x995f, 0x9960, 0x9961, 0x9962, 0x9964, 0x9966, 0x9973, 0x9978, 0x9979, 0x997b, 0x997e, 0x9982, 0x9983, 0x9989, 0x7a39, 0x7a37, 0x7a51, 0x9ecf, 0x99a5, 0x7a70, 0x7688, 0x768e, 0x7693, 0x7699, 0x76a4, 0x74de, 0x74e0, 0x752c, 0x9e20, 0x9e22, 0x9e28, 0x9e29, 0x9e2a, 0x9e2b, 0x9e2c, 0x9e32, 0x9e31, 0x9e36, 0x9e38, 0x9e37, 0x9e39, 0x9e3a, 0x9e3e, 0x9e41, 0x9e42, 0x9e44, 0x9e46, 0x9e47, 0x9e48, 0x9e49, 0x9e4b, 0x9e4c, 0x9e4e, 0x9e51, 0x9e55, 0x9e57, 0x9e5a, 0x9e5b, 0x9e5c, 0x9e5e, 0x9e63, 0x9e66, 0x9e67, 0x9e68, 0x9e69, 0x9e6a, 0x9e6b, 0x9e6c, 0x9e71, 0x9e6d, 0x9e73, 0x7592, 0x7594, 0x7596, 0x75a0, 0x759d, 0x75ac, 0x75a3, 0x75b3, 0x75b4, 0x75b8, 0x75c4, 0x75b1, 0x75b0, 0x75c3, 0x75c2, 0x75d6, 0x75cd, 0x75e3, 0x75e8, 0x75e6, 0x75e4, 0x75eb, 0x75e7, 0x7603, 0x75f1, 0x75fc, 0x75ff, 0x7610, 0x7600, 0x7605, 0x760c, 0x7617, 0x760a, 0x7625, 0x7618, 0x7615, 0x7619, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf140[ 192 ] = { 0x998c, 0x998e, 0x999a, 0x999b, 0x999c, 0x999d, 0x999e, 0x999f, 0x99a0, 0x99a1, 0x99a2, 0x99a3, 0x99a4, 0x99a6, 0x99a7, 0x99a9, 0x99aa, 0x99ab, 0x99ac, 0x99ad, 0x99ae, 0x99af, 0x99b0, 0x99b1, 0x99b2, 0x99b3, 0x99b4, 0x99b5, 0x99b6, 0x99b7, 0x99b8, 0x99b9, 0x99ba, 0x99bb, 0x99bc, 0x99bd, 0x99be, 0x99bf, 0x99c0, 0x99c1, 0x99c2, 0x99c3, 0x99c4, 0x99c5, 0x99c6, 0x99c7, 0x99c8, 0x99c9, 0x99ca, 0x99cb, 0x99cc, 0x99cd, 0x99ce, 0x99cf, 0x99d0, 0x99d1, 0x99d2, 0x99d3, 0x99d4, 0x99d5, 0x99d6, 0x99d7, 0x99d8, 0xfffd, 0x99d9, 0x99da, 0x99db, 0x99dc, 0x99dd, 0x99de, 0x99df, 0x99e0, 0x99e1, 0x99e2, 0x99e3, 0x99e4, 0x99e5, 0x99e6, 0x99e7, 0x99e8, 0x99e9, 0x99ea, 0x99eb, 0x99ec, 0x99ed, 0x99ee, 0x99ef, 0x99f0, 0x99f1, 0x99f2, 0x99f3, 0x99f4, 0x99f5, 0x99f6, 0x99f7, 0x99f8, 0x99f9, 0x761b, 0x763c, 0x7622, 0x7620, 0x7640, 0x762d, 0x7630, 0x763f, 0x7635, 0x7643, 0x763e, 0x7633, 0x764d, 0x765e, 0x7654, 0x765c, 0x7656, 0x766b, 0x766f, 0x7fca, 0x7ae6, 0x7a78, 0x7a79, 0x7a80, 0x7a86, 0x7a88, 0x7a95, 0x7aa6, 0x7aa0, 0x7aac, 0x7aa8, 0x7aad, 0x7ab3, 0x8864, 0x8869, 0x8872, 0x887d, 0x887f, 0x8882, 0x88a2, 0x88c6, 0x88b7, 0x88bc, 0x88c9, 0x88e2, 0x88ce, 0x88e3, 0x88e5, 0x88f1, 0x891a, 0x88fc, 0x88e8, 0x88fe, 0x88f0, 0x8921, 0x8919, 0x8913, 0x891b, 0x890a, 0x8934, 0x892b, 0x8936, 0x8941, 0x8966, 0x897b, 0x758b, 0x80e5, 0x76b2, 0x76b4, 0x77dc, 0x8012, 0x8014, 0x8016, 0x801c, 0x8020, 0x8022, 0x8025, 0x8026, 0x8027, 0x8029, 0x8028, 0x8031, 0x800b, 0x8035, 0x8043, 0x8046, 0x804d, 0x8052, 0x8069, 0x8071, 0x8983, 0x9878, 0x9880, 0x9883, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf240[ 192 ] = { 0x99fa, 0x99fb, 0x99fc, 0x99fd, 0x99fe, 0x99ff, 0x9a00, 0x9a01, 0x9a02, 0x9a03, 0x9a04, 0x9a05, 0x9a06, 0x9a07, 0x9a08, 0x9a09, 0x9a0a, 0x9a0b, 0x9a0c, 0x9a0d, 0x9a0e, 0x9a0f, 0x9a10, 0x9a11, 0x9a12, 0x9a13, 0x9a14, 0x9a15, 0x9a16, 0x9a17, 0x9a18, 0x9a19, 0x9a1a, 0x9a1b, 0x9a1c, 0x9a1d, 0x9a1e, 0x9a1f, 0x9a20, 0x9a21, 0x9a22, 0x9a23, 0x9a24, 0x9a25, 0x9a26, 0x9a27, 0x9a28, 0x9a29, 0x9a2a, 0x9a2b, 0x9a2c, 0x9a2d, 0x9a2e, 0x9a2f, 0x9a30, 0x9a31, 0x9a32, 0x9a33, 0x9a34, 0x9a35, 0x9a36, 0x9a37, 0x9a38, 0xfffd, 0x9a39, 0x9a3a, 0x9a3b, 0x9a3c, 0x9a3d, 0x9a3e, 0x9a3f, 0x9a40, 0x9a41, 0x9a42, 0x9a43, 0x9a44, 0x9a45, 0x9a46, 0x9a47, 0x9a48, 0x9a49, 0x9a4a, 0x9a4b, 0x9a4c, 0x9a4d, 0x9a4e, 0x9a4f, 0x9a50, 0x9a51, 0x9a52, 0x9a53, 0x9a54, 0x9a55, 0x9a56, 0x9a57, 0x9a58, 0x9a59, 0x9889, 0x988c, 0x988d, 0x988f, 0x9894, 0x989a, 0x989b, 0x989e, 0x989f, 0x98a1, 0x98a2, 0x98a5, 0x98a6, 0x864d, 0x8654, 0x866c, 0x866e, 0x867f, 0x867a, 0x867c, 0x867b, 0x86a8, 0x868d, 0x868b, 0x86ac, 0x869d, 0x86a7, 0x86a3, 0x86aa, 0x8693, 0x86a9, 0x86b6, 0x86c4, 0x86b5, 0x86ce, 0x86b0, 0x86ba, 0x86b1, 0x86af, 0x86c9, 0x86cf, 0x86b4, 0x86e9, 0x86f1, 0x86f2, 0x86ed, 0x86f3, 0x86d0, 0x8713, 0x86de, 0x86f4, 0x86df, 0x86d8, 0x86d1, 0x8703, 0x8707, 0x86f8, 0x8708, 0x870a, 0x870d, 0x8709, 0x8723, 0x873b, 0x871e, 0x8725, 0x872e, 0x871a, 0x873e, 0x8748, 0x8734, 0x8731, 0x8729, 0x8737, 0x873f, 0x8782, 0x8722, 0x877d, 0x877e, 0x877b, 0x8760, 0x8770, 0x874c, 0x876e, 0x878b, 0x8753, 0x8763, 0x877c, 0x8764, 0x8759, 0x8765, 0x8793, 0x87af, 0x87a8, 0x87d2, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf340[ 192 ] = { 0x9a5a, 0x9a5b, 0x9a5c, 0x9a5d, 0x9a5e, 0x9a5f, 0x9a60, 0x9a61, 0x9a62, 0x9a63, 0x9a64, 0x9a65, 0x9a66, 0x9a67, 0x9a68, 0x9a69, 0x9a6a, 0x9a6b, 0x9a72, 0x9a83, 0x9a89, 0x9a8d, 0x9a8e, 0x9a94, 0x9a95, 0x9a99, 0x9aa6, 0x9aa9, 0x9aaa, 0x9aab, 0x9aac, 0x9aad, 0x9aae, 0x9aaf, 0x9ab2, 0x9ab3, 0x9ab4, 0x9ab5, 0x9ab9, 0x9abb, 0x9abd, 0x9abe, 0x9abf, 0x9ac3, 0x9ac4, 0x9ac6, 0x9ac7, 0x9ac8, 0x9ac9, 0x9aca, 0x9acd, 0x9ace, 0x9acf, 0x9ad0, 0x9ad2, 0x9ad4, 0x9ad5, 0x9ad6, 0x9ad7, 0x9ad9, 0x9ada, 0x9adb, 0x9adc, 0xfffd, 0x9add, 0x9ade, 0x9ae0, 0x9ae2, 0x9ae3, 0x9ae4, 0x9ae5, 0x9ae7, 0x9ae8, 0x9ae9, 0x9aea, 0x9aec, 0x9aee, 0x9af0, 0x9af1, 0x9af2, 0x9af3, 0x9af4, 0x9af5, 0x9af6, 0x9af7, 0x9af8, 0x9afa, 0x9afc, 0x9afd, 0x9afe, 0x9aff, 0x9b00, 0x9b01, 0x9b02, 0x9b04, 0x9b05, 0x9b06, 0x87c6, 0x8788, 0x8785, 0x87ad, 0x8797, 0x8783, 0x87ab, 0x87e5, 0x87ac, 0x87b5, 0x87b3, 0x87cb, 0x87d3, 0x87bd, 0x87d1, 0x87c0, 0x87ca, 0x87db, 0x87ea, 0x87e0, 0x87ee, 0x8816, 0x8813, 0x87fe, 0x880a, 0x881b, 0x8821, 0x8839, 0x883c, 0x7f36, 0x7f42, 0x7f44, 0x7f45, 0x8210, 0x7afa, 0x7afd, 0x7b08, 0x7b03, 0x7b04, 0x7b15, 0x7b0a, 0x7b2b, 0x7b0f, 0x7b47, 0x7b38, 0x7b2a, 0x7b19, 0x7b2e, 0x7b31, 0x7b20, 0x7b25, 0x7b24, 0x7b33, 0x7b3e, 0x7b1e, 0x7b58, 0x7b5a, 0x7b45, 0x7b75, 0x7b4c, 0x7b5d, 0x7b60, 0x7b6e, 0x7b7b, 0x7b62, 0x7b72, 0x7b71, 0x7b90, 0x7ba6, 0x7ba7, 0x7bb8, 0x7bac, 0x7b9d, 0x7ba8, 0x7b85, 0x7baa, 0x7b9c, 0x7ba2, 0x7bab, 0x7bb4, 0x7bd1, 0x7bc1, 0x7bcc, 0x7bdd, 0x7bda, 0x7be5, 0x7be6, 0x7bea, 0x7c0c, 0x7bfe, 0x7bfc, 0x7c0f, 0x7c16, 0x7c0b, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf440[ 192 ] = { 0x9b07, 0x9b09, 0x9b0a, 0x9b0b, 0x9b0c, 0x9b0d, 0x9b0e, 0x9b10, 0x9b11, 0x9b12, 0x9b14, 0x9b15, 0x9b16, 0x9b17, 0x9b18, 0x9b19, 0x9b1a, 0x9b1b, 0x9b1c, 0x9b1d, 0x9b1e, 0x9b20, 0x9b21, 0x9b22, 0x9b24, 0x9b25, 0x9b26, 0x9b27, 0x9b28, 0x9b29, 0x9b2a, 0x9b2b, 0x9b2c, 0x9b2d, 0x9b2e, 0x9b30, 0x9b31, 0x9b33, 0x9b34, 0x9b35, 0x9b36, 0x9b37, 0x9b38, 0x9b39, 0x9b3a, 0x9b3d, 0x9b3e, 0x9b3f, 0x9b40, 0x9b46, 0x9b4a, 0x9b4b, 0x9b4c, 0x9b4e, 0x9b50, 0x9b52, 0x9b53, 0x9b55, 0x9b56, 0x9b57, 0x9b58, 0x9b59, 0x9b5a, 0xfffd, 0x9b5b, 0x9b5c, 0x9b5d, 0x9b5e, 0x9b5f, 0x9b60, 0x9b61, 0x9b62, 0x9b63, 0x9b64, 0x9b65, 0x9b66, 0x9b67, 0x9b68, 0x9b69, 0x9b6a, 0x9b6b, 0x9b6c, 0x9b6d, 0x9b6e, 0x9b6f, 0x9b70, 0x9b71, 0x9b72, 0x9b73, 0x9b74, 0x9b75, 0x9b76, 0x9b77, 0x9b78, 0x9b79, 0x9b7a, 0x9b7b, 0x7c1f, 0x7c2a, 0x7c26, 0x7c38, 0x7c41, 0x7c40, 0x81fe, 0x8201, 0x8202, 0x8204, 0x81ec, 0x8844, 0x8221, 0x8222, 0x8223, 0x822d, 0x822f, 0x8228, 0x822b, 0x8238, 0x823b, 0x8233, 0x8234, 0x823e, 0x8244, 0x8249, 0x824b, 0x824f, 0x825a, 0x825f, 0x8268, 0x887e, 0x8885, 0x8888, 0x88d8, 0x88df, 0x895e, 0x7f9d, 0x7f9f, 0x7fa7, 0x7faf, 0x7fb0, 0x7fb2, 0x7c7c, 0x6549, 0x7c91, 0x7c9d, 0x7c9c, 0x7c9e, 0x7ca2, 0x7cb2, 0x7cbc, 0x7cbd, 0x7cc1, 0x7cc7, 0x7ccc, 0x7ccd, 0x7cc8, 0x7cc5, 0x7cd7, 0x7ce8, 0x826e, 0x66a8, 0x7fbf, 0x7fce, 0x7fd5, 0x7fe5, 0x7fe1, 0x7fe6, 0x7fe9, 0x7fee, 0x7ff3, 0x7cf8, 0x7d77, 0x7da6, 0x7dae, 0x7e47, 0x7e9b, 0x9eb8, 0x9eb4, 0x8d73, 0x8d84, 0x8d94, 0x8d91, 0x8db1, 0x8d67, 0x8d6d, 0x8c47, 0x8c49, 0x914a, 0x9150, 0x914e, 0x914f, 0x9164, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf540[ 192 ] = { 0x9b7c, 0x9b7d, 0x9b7e, 0x9b7f, 0x9b80, 0x9b81, 0x9b82, 0x9b83, 0x9b84, 0x9b85, 0x9b86, 0x9b87, 0x9b88, 0x9b89, 0x9b8a, 0x9b8b, 0x9b8c, 0x9b8d, 0x9b8e, 0x9b8f, 0x9b90, 0x9b91, 0x9b92, 0x9b93, 0x9b94, 0x9b95, 0x9b96, 0x9b97, 0x9b98, 0x9b99, 0x9b9a, 0x9b9b, 0x9b9c, 0x9b9d, 0x9b9e, 0x9b9f, 0x9ba0, 0x9ba1, 0x9ba2, 0x9ba3, 0x9ba4, 0x9ba5, 0x9ba6, 0x9ba7, 0x9ba8, 0x9ba9, 0x9baa, 0x9bab, 0x9bac, 0x9bad, 0x9bae, 0x9baf, 0x9bb0, 0x9bb1, 0x9bb2, 0x9bb3, 0x9bb4, 0x9bb5, 0x9bb6, 0x9bb7, 0x9bb8, 0x9bb9, 0x9bba, 0xfffd, 0x9bbb, 0x9bbc, 0x9bbd, 0x9bbe, 0x9bbf, 0x9bc0, 0x9bc1, 0x9bc2, 0x9bc3, 0x9bc4, 0x9bc5, 0x9bc6, 0x9bc7, 0x9bc8, 0x9bc9, 0x9bca, 0x9bcb, 0x9bcc, 0x9bcd, 0x9bce, 0x9bcf, 0x9bd0, 0x9bd1, 0x9bd2, 0x9bd3, 0x9bd4, 0x9bd5, 0x9bd6, 0x9bd7, 0x9bd8, 0x9bd9, 0x9bda, 0x9bdb, 0x9162, 0x9161, 0x9170, 0x9169, 0x916f, 0x917d, 0x917e, 0x9172, 0x9174, 0x9179, 0x918c, 0x9185, 0x9190, 0x918d, 0x9191, 0x91a2, 0x91a3, 0x91aa, 0x91ad, 0x91ae, 0x91af, 0x91b5, 0x91b4, 0x91ba, 0x8c55, 0x9e7e, 0x8db8, 0x8deb, 0x8e05, 0x8e59, 0x8e69, 0x8db5, 0x8dbf, 0x8dbc, 0x8dba, 0x8dc4, 0x8dd6, 0x8dd7, 0x8dda, 0x8dde, 0x8dce, 0x8dcf, 0x8ddb, 0x8dc6, 0x8dec, 0x8df7, 0x8df8, 0x8de3, 0x8df9, 0x8dfb, 0x8de4, 0x8e09, 0x8dfd, 0x8e14, 0x8e1d, 0x8e1f, 0x8e2c, 0x8e2e, 0x8e23, 0x8e2f, 0x8e3a, 0x8e40, 0x8e39, 0x8e35, 0x8e3d, 0x8e31, 0x8e49, 0x8e41, 0x8e42, 0x8e51, 0x8e52, 0x8e4a, 0x8e70, 0x8e76, 0x8e7c, 0x8e6f, 0x8e74, 0x8e85, 0x8e8f, 0x8e94, 0x8e90, 0x8e9c, 0x8e9e, 0x8c78, 0x8c82, 0x8c8a, 0x8c85, 0x8c98, 0x8c94, 0x659b, 0x89d6, 0x89de, 0x89da, 0x89dc, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf640[ 192 ] = { 0x9bdc, 0x9bdd, 0x9bde, 0x9bdf, 0x9be0, 0x9be1, 0x9be2, 0x9be3, 0x9be4, 0x9be5, 0x9be6, 0x9be7, 0x9be8, 0x9be9, 0x9bea, 0x9beb, 0x9bec, 0x9bed, 0x9bee, 0x9bef, 0x9bf0, 0x9bf1, 0x9bf2, 0x9bf3, 0x9bf4, 0x9bf5, 0x9bf6, 0x9bf7, 0x9bf8, 0x9bf9, 0x9bfa, 0x9bfb, 0x9bfc, 0x9bfd, 0x9bfe, 0x9bff, 0x9c00, 0x9c01, 0x9c02, 0x9c03, 0x9c04, 0x9c05, 0x9c06, 0x9c07, 0x9c08, 0x9c09, 0x9c0a, 0x9c0b, 0x9c0c, 0x9c0d, 0x9c0e, 0x9c0f, 0x9c10, 0x9c11, 0x9c12, 0x9c13, 0x9c14, 0x9c15, 0x9c16, 0x9c17, 0x9c18, 0x9c19, 0x9c1a, 0xfffd, 0x9c1b, 0x9c1c, 0x9c1d, 0x9c1e, 0x9c1f, 0x9c20, 0x9c21, 0x9c22, 0x9c23, 0x9c24, 0x9c25, 0x9c26, 0x9c27, 0x9c28, 0x9c29, 0x9c2a, 0x9c2b, 0x9c2c, 0x9c2d, 0x9c2e, 0x9c2f, 0x9c30, 0x9c31, 0x9c32, 0x9c33, 0x9c34, 0x9c35, 0x9c36, 0x9c37, 0x9c38, 0x9c39, 0x9c3a, 0x9c3b, 0x89e5, 0x89eb, 0x89ef, 0x8a3e, 0x8b26, 0x9753, 0x96e9, 0x96f3, 0x96ef, 0x9706, 0x9701, 0x9708, 0x970f, 0x970e, 0x972a, 0x972d, 0x9730, 0x973e, 0x9f80, 0x9f83, 0x9f85, 0x9f86, 0x9f87, 0x9f88, 0x9f89, 0x9f8a, 0x9f8c, 0x9efe, 0x9f0b, 0x9f0d, 0x96b9, 0x96bc, 0x96bd, 0x96ce, 0x96d2, 0x77bf, 0x96e0, 0x928e, 0x92ae, 0x92c8, 0x933e, 0x936a, 0x93ca, 0x938f, 0x943e, 0x946b, 0x9c7f, 0x9c82, 0x9c85, 0x9c86, 0x9c87, 0x9c88, 0x7a23, 0x9c8b, 0x9c8e, 0x9c90, 0x9c91, 0x9c92, 0x9c94, 0x9c95, 0x9c9a, 0x9c9b, 0x9c9e, 0x9c9f, 0x9ca0, 0x9ca1, 0x9ca2, 0x9ca3, 0x9ca5, 0x9ca6, 0x9ca7, 0x9ca8, 0x9ca9, 0x9cab, 0x9cad, 0x9cae, 0x9cb0, 0x9cb1, 0x9cb2, 0x9cb3, 0x9cb4, 0x9cb5, 0x9cb6, 0x9cb7, 0x9cba, 0x9cbb, 0x9cbc, 0x9cbd, 0x9cc4, 0x9cc5, 0x9cc6, 0x9cc7, 0x9cca, 0x9ccb, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf740[ 192 ] = { 0x9c3c, 0x9c3d, 0x9c3e, 0x9c3f, 0x9c40, 0x9c41, 0x9c42, 0x9c43, 0x9c44, 0x9c45, 0x9c46, 0x9c47, 0x9c48, 0x9c49, 0x9c4a, 0x9c4b, 0x9c4c, 0x9c4d, 0x9c4e, 0x9c4f, 0x9c50, 0x9c51, 0x9c52, 0x9c53, 0x9c54, 0x9c55, 0x9c56, 0x9c57, 0x9c58, 0x9c59, 0x9c5a, 0x9c5b, 0x9c5c, 0x9c5d, 0x9c5e, 0x9c5f, 0x9c60, 0x9c61, 0x9c62, 0x9c63, 0x9c64, 0x9c65, 0x9c66, 0x9c67, 0x9c68, 0x9c69, 0x9c6a, 0x9c6b, 0x9c6c, 0x9c6d, 0x9c6e, 0x9c6f, 0x9c70, 0x9c71, 0x9c72, 0x9c73, 0x9c74, 0x9c75, 0x9c76, 0x9c77, 0x9c78, 0x9c79, 0x9c7a, 0xfffd, 0x9c7b, 0x9c7d, 0x9c7e, 0x9c80, 0x9c83, 0x9c84, 0x9c89, 0x9c8a, 0x9c8c, 0x9c8f, 0x9c93, 0x9c96, 0x9c97, 0x9c98, 0x9c99, 0x9c9d, 0x9caa, 0x9cac, 0x9caf, 0x9cb9, 0x9cbe, 0x9cbf, 0x9cc0, 0x9cc1, 0x9cc2, 0x9cc8, 0x9cc9, 0x9cd1, 0x9cd2, 0x9cda, 0x9cdb, 0x9ce0, 0x9ce1, 0x9ccc, 0x9ccd, 0x9cce, 0x9ccf, 0x9cd0, 0x9cd3, 0x9cd4, 0x9cd5, 0x9cd7, 0x9cd8, 0x9cd9, 0x9cdc, 0x9cdd, 0x9cdf, 0x9ce2, 0x977c, 0x9785, 0x9791, 0x9792, 0x9794, 0x97af, 0x97ab, 0x97a3, 0x97b2, 0x97b4, 0x9ab1, 0x9ab0, 0x9ab7, 0x9e58, 0x9ab6, 0x9aba, 0x9abc, 0x9ac1, 0x9ac0, 0x9ac5, 0x9ac2, 0x9acb, 0x9acc, 0x9ad1, 0x9b45, 0x9b43, 0x9b47, 0x9b49, 0x9b48, 0x9b4d, 0x9b51, 0x98e8, 0x990d, 0x992e, 0x9955, 0x9954, 0x9adf, 0x9ae1, 0x9ae6, 0x9aef, 0x9aeb, 0x9afb, 0x9aed, 0x9af9, 0x9b08, 0x9b0f, 0x9b13, 0x9b1f, 0x9b23, 0x9ebd, 0x9ebe, 0x7e3b, 0x9e82, 0x9e87, 0x9e88, 0x9e8b, 0x9e92, 0x93d6, 0x9e9d, 0x9e9f, 0x9edb, 0x9edc, 0x9edd, 0x9ee0, 0x9edf, 0x9ee2, 0x9ee9, 0x9ee7, 0x9ee5, 0x9eea, 0x9eef, 0x9f22, 0x9f2c, 0x9f2f, 0x9f39, 0x9f37, 0x9f3d, 0x9f3e, 0x9f44, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf840[ 96 ] = { 0x9ce3, 0x9ce4, 0x9ce5, 0x9ce6, 0x9ce7, 0x9ce8, 0x9ce9, 0x9cea, 0x9ceb, 0x9cec, 0x9ced, 0x9cee, 0x9cef, 0x9cf0, 0x9cf1, 0x9cf2, 0x9cf3, 0x9cf4, 0x9cf5, 0x9cf6, 0x9cf7, 0x9cf8, 0x9cf9, 0x9cfa, 0x9cfb, 0x9cfc, 0x9cfd, 0x9cfe, 0x9cff, 0x9d00, 0x9d01, 0x9d02, 0x9d03, 0x9d04, 0x9d05, 0x9d06, 0x9d07, 0x9d08, 0x9d09, 0x9d0a, 0x9d0b, 0x9d0c, 0x9d0d, 0x9d0e, 0x9d0f, 0x9d10, 0x9d11, 0x9d12, 0x9d13, 0x9d14, 0x9d15, 0x9d16, 0x9d17, 0x9d18, 0x9d19, 0x9d1a, 0x9d1b, 0x9d1c, 0x9d1d, 0x9d1e, 0x9d1f, 0x9d20, 0x9d21, 0xfffd, 0x9d22, 0x9d23, 0x9d24, 0x9d25, 0x9d26, 0x9d27, 0x9d28, 0x9d29, 0x9d2a, 0x9d2b, 0x9d2c, 0x9d2d, 0x9d2e, 0x9d2f, 0x9d30, 0x9d31, 0x9d32, 0x9d33, 0x9d34, 0x9d35, 0x9d36, 0x9d37, 0x9d38, 0x9d39, 0x9d3a, 0x9d3b, 0x9d3c, 0x9d3d, 0x9d3e, 0x9d3f, 0x9d40, 0x9d41 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf940[ 96 ] = { 0x9d43, 0x9d44, 0x9d45, 0x9d46, 0x9d47, 0x9d48, 0x9d49, 0x9d4a, 0x9d4b, 0x9d4c, 0x9d4d, 0x9d4e, 0x9d4f, 0x9d50, 0x9d51, 0x9d52, 0x9d53, 0x9d54, 0x9d55, 0x9d56, 0x9d57, 0x9d58, 0x9d59, 0x9d5a, 0x9d5b, 0x9d5c, 0x9d5d, 0x9d5e, 0x9d5f, 0x9d60, 0x9d61, 0x9d62, 0x9d63, 0x9d64, 0x9d65, 0x9d66, 0x9d67, 0x9d68, 0x9d69, 0x9d6a, 0x9d6b, 0x9d6c, 0x9d6d, 0x9d6e, 0x9d6f, 0x9d70, 0x9d71, 0x9d72, 0x9d73, 0x9d74, 0x9d75, 0x9d76, 0x9d77, 0x9d78, 0x9d79, 0x9d7a, 0x9d7b, 0x9d7c, 0x9d7d, 0x9d7e, 0x9d7f, 0x9d80, 0x9d81, 0xfffd, 0x9d82, 0x9d83, 0x9d84, 0x9d85, 0x9d86, 0x9d87, 0x9d88, 0x9d89, 0x9d8a, 0x9d8b, 0x9d8c, 0x9d8d, 0x9d8e, 0x9d8f, 0x9d90, 0x9d91, 0x9d92, 0x9d93, 0x9d94, 0x9d95, 0x9d96, 0x9d97, 0x9d98, 0x9d99, 0x9d9a, 0x9d9b, 0x9d9c, 0x9d9d, 0x9d9e, 0x9d9f, 0x9da0, 0x9da1 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfa40[ 96 ] = { 0x9da3, 0x9da4, 0x9da5, 0x9da6, 0x9da7, 0x9da8, 0x9da9, 0x9daa, 0x9dab, 0x9dac, 0x9dad, 0x9dae, 0x9daf, 0x9db0, 0x9db1, 0x9db2, 0x9db3, 0x9db4, 0x9db5, 0x9db6, 0x9db7, 0x9db8, 0x9db9, 0x9dba, 0x9dbb, 0x9dbc, 0x9dbd, 0x9dbe, 0x9dbf, 0x9dc0, 0x9dc1, 0x9dc2, 0x9dc3, 0x9dc4, 0x9dc5, 0x9dc6, 0x9dc7, 0x9dc8, 0x9dc9, 0x9dca, 0x9dcb, 0x9dcc, 0x9dcd, 0x9dce, 0x9dcf, 0x9dd0, 0x9dd1, 0x9dd2, 0x9dd3, 0x9dd4, 0x9dd5, 0x9dd6, 0x9dd7, 0x9dd8, 0x9dd9, 0x9dda, 0x9ddb, 0x9ddc, 0x9ddd, 0x9dde, 0x9ddf, 0x9de0, 0x9de1, 0xfffd, 0x9de2, 0x9de3, 0x9de4, 0x9de5, 0x9de6, 0x9de7, 0x9de8, 0x9de9, 0x9dea, 0x9deb, 0x9dec, 0x9ded, 0x9dee, 0x9def, 0x9df0, 0x9df1, 0x9df2, 0x9df3, 0x9df4, 0x9df5, 0x9df6, 0x9df7, 0x9df8, 0x9df9, 0x9dfa, 0x9dfb, 0x9dfc, 0x9dfd, 0x9dfe, 0x9dff, 0x9e00, 0x9e01 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfb40[ 96 ] = { 0x9e03, 0x9e04, 0x9e05, 0x9e06, 0x9e07, 0x9e08, 0x9e09, 0x9e0a, 0x9e0b, 0x9e0c, 0x9e0d, 0x9e0e, 0x9e0f, 0x9e10, 0x9e11, 0x9e12, 0x9e13, 0x9e14, 0x9e15, 0x9e16, 0x9e17, 0x9e18, 0x9e19, 0x9e1a, 0x9e1b, 0x9e1c, 0x9e1d, 0x9e1e, 0x9e24, 0x9e27, 0x9e2e, 0x9e30, 0x9e34, 0x9e3b, 0x9e3c, 0x9e40, 0x9e4d, 0x9e50, 0x9e52, 0x9e53, 0x9e54, 0x9e56, 0x9e59, 0x9e5d, 0x9e5f, 0x9e60, 0x9e61, 0x9e62, 0x9e65, 0x9e6e, 0x9e6f, 0x9e72, 0x9e74, 0x9e75, 0x9e76, 0x9e77, 0x9e78, 0x9e79, 0x9e7a, 0x9e7b, 0x9e7c, 0x9e7d, 0x9e80, 0xfffd, 0x9e81, 0x9e83, 0x9e84, 0x9e85, 0x9e86, 0x9e89, 0x9e8a, 0x9e8c, 0x9e8d, 0x9e8e, 0x9e8f, 0x9e90, 0x9e91, 0x9e94, 0x9e95, 0x9e96, 0x9e97, 0x9e98, 0x9e99, 0x9e9a, 0x9e9b, 0x9e9c, 0x9e9e, 0x9ea0, 0x9ea1, 0x9ea2, 0x9ea3, 0x9ea4, 0x9ea5, 0x9ea7, 0x9ea8, 0x9ea9 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfc40[ 96 ] = { 0x9eab, 0x9eac, 0x9ead, 0x9eae, 0x9eaf, 0x9eb0, 0x9eb1, 0x9eb2, 0x9eb3, 0x9eb5, 0x9eb6, 0x9eb7, 0x9eb9, 0x9eba, 0x9ebc, 0x9ebf, 0x9ec0, 0x9ec1, 0x9ec2, 0x9ec3, 0x9ec5, 0x9ec6, 0x9ec7, 0x9ec8, 0x9eca, 0x9ecb, 0x9ecc, 0x9ed0, 0x9ed2, 0x9ed3, 0x9ed5, 0x9ed6, 0x9ed7, 0x9ed9, 0x9eda, 0x9ede, 0x9ee1, 0x9ee3, 0x9ee4, 0x9ee6, 0x9ee8, 0x9eeb, 0x9eec, 0x9eed, 0x9eee, 0x9ef0, 0x9ef1, 0x9ef2, 0x9ef3, 0x9ef4, 0x9ef5, 0x9ef6, 0x9ef7, 0x9ef8, 0x9efa, 0x9efd, 0x9eff, 0x9f00, 0x9f01, 0x9f02, 0x9f03, 0x9f04, 0x9f05, 0xfffd, 0x9f06, 0x9f07, 0x9f08, 0x9f09, 0x9f0a, 0x9f0c, 0x9f0f, 0x9f11, 0x9f12, 0x9f14, 0x9f15, 0x9f16, 0x9f18, 0x9f1a, 0x9f1b, 0x9f1c, 0x9f1d, 0x9f1e, 0x9f1f, 0x9f21, 0x9f23, 0x9f24, 0x9f25, 0x9f26, 0x9f27, 0x9f28, 0x9f29, 0x9f2a, 0x9f2b, 0x9f2d, 0x9f2e, 0x9f30 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfd40[ 96 ] = { 0x9f32, 0x9f33, 0x9f34, 0x9f35, 0x9f36, 0x9f38, 0x9f3a, 0x9f3c, 0x9f3f, 0x9f40, 0x9f41, 0x9f42, 0x9f43, 0x9f45, 0x9f46, 0x9f47, 0x9f48, 0x9f49, 0x9f4a, 0x9f4b, 0x9f4c, 0x9f4d, 0x9f4e, 0x9f4f, 0x9f52, 0x9f53, 0x9f54, 0x9f55, 0x9f56, 0x9f57, 0x9f58, 0x9f59, 0x9f5a, 0x9f5b, 0x9f5c, 0x9f5d, 0x9f5e, 0x9f5f, 0x9f60, 0x9f61, 0x9f62, 0x9f63, 0x9f64, 0x9f65, 0x9f66, 0x9f67, 0x9f68, 0x9f69, 0x9f6a, 0x9f6b, 0x9f6c, 0x9f6d, 0x9f6e, 0x9f6f, 0x9f70, 0x9f71, 0x9f72, 0x9f73, 0x9f74, 0x9f75, 0x9f76, 0x9f77, 0x9f78, 0xfffd, 0x9f79, 0x9f7a, 0x9f7b, 0x9f7c, 0x9f7d, 0x9f7e, 0x9f81, 0x9f82, 0x9f8d, 0x9f8e, 0x9f8f, 0x9f90, 0x9f91, 0x9f92, 0x9f93, 0x9f94, 0x9f95, 0x9f96, 0x9f97, 0x9f98, 0x9f9c, 0x9f9d, 0x9f9e, 0x9fa1, 0x9fa2, 0x9fa3, 0x9fa4, 0x9fa5, 0xf92c, 0xf979, 0xf995, 0xf9e7 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfe40[ 16 ] = { 0xfa0c, 0xfa0d, 0xfa0e, 0xfa0f, 0xfa11, 0xfa13, 0xfa14, 0xfa18, 0xfa1f, 0xfa20, 0xfa21, 0xfa23, 0xfa24, 0xfa27, 0xfa28, 0xfa29 }; /* Unicode to ASCII character lookup table for Windows 936 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0x0080[ 1024 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8a1, 0x001a, 0x001a, 0xeca1, 0xa7a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3a1, 0xc0a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a8, 0xa2a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8a8, 0xa6a8, 0xbaa8, 0x001a, 0xaca8, 0xaaa8, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0a8, 0xaea8, 0x001a, 0x001a, 0x001a, 0xc2a1, 0x001a, 0xb4a8, 0xb2a8, 0x001a, 0xb9a8, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbda8, 0x001a, 0x001a, 0x001a, 0xbea8, 0x001a, 0x001a, 0x001a, 0x001a, 0xada8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3a8, 0x001a, 0xaba8, 0x001a, 0xafa8, 0x001a, 0xb3a8, 0x001a, 0xb5a8, 0x001a, 0xb6a8, 0x001a, 0xb7a8, 0x001a, 0xb8a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbba8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6a1, 0x001a, 0xa5a1, 0x40a8, 0x41a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x42a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a6, 0xa2a6, 0xa3a6, 0xa4a6, 0xa5a6, 0xa6a6, 0xa7a6, 0xa8a6, 0xa9a6, 0xaaa6, 0xaba6, 0xaca6, 0xada6, 0xaea6, 0xafa6, 0xb0a6, 0xb1a6, 0x001a, 0xb2a6, 0xb3a6, 0xb4a6, 0xb5a6, 0xb6a6, 0xb7a6, 0xb8a6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1a6, 0xc2a6, 0xc3a6, 0xc4a6, 0xc5a6, 0xc6a6, 0xc7a6, 0xc8a6, 0xc9a6, 0xcaa6, 0xcba6, 0xcca6, 0xcda6, 0xcea6, 0xcfa6, 0xd0a6, 0xd1a6, 0x001a, 0xd2a6, 0xd3a6, 0xd4a6, 0xd5a6, 0xd6a6, 0xd7a6, 0xd8a6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a7, 0xa2a7, 0xa3a7, 0xa4a7, 0xa5a7, 0xa6a7, 0xa8a7, 0xa9a7, 0xaaa7, 0xaba7, 0xaca7, 0xada7, 0xaea7, 0xafa7, 0xb0a7, 0xb1a7, 0xb2a7, 0xb3a7, 0xb4a7, 0xb5a7, 0xb6a7, 0xb7a7, 0xb8a7, 0xb9a7, 0xbaa7, 0xbba7, 0xbca7, 0xbda7, 0xbea7, 0xbfa7, 0xc0a7, 0xc1a7, 0xd1a7, 0xd2a7, 0xd3a7, 0xd4a7, 0xd5a7, 0xd6a7, 0xd8a7, 0xd9a7, 0xdaa7, 0xdba7, 0xdca7, 0xdda7, 0xdea7, 0xdfa7, 0xe0a7, 0xe1a7, 0xe2a7, 0xe3a7, 0xe4a7, 0xe5a7, 0xe6a7, 0xe7a7, 0xe8a7, 0xe9a7, 0xeaa7, 0xeba7, 0xeca7, 0xeda7, 0xeea7, 0xefa7, 0xf0a7, 0xf1a7, 0x001a, 0xd7a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0x2000[ 832 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ca9, 0x001a, 0x001a, 0x43a8, 0xaaa1, 0x44a8, 0xaca1, 0x001a, 0xaea1, 0xafa1, 0x001a, 0x001a, 0xb0a1, 0xb1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x45a8, 0xada1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeba1, 0x001a, 0xe4a1, 0xe5a1, 0x001a, 0x46a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x0080, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6a1, 0x001a, 0x47a8, 0x001a, 0x001a, 0x001a, 0x48a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeda1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x59a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1a2, 0xf2a2, 0xf3a2, 0xf4a2, 0xf5a2, 0xf6a2, 0xf7a2, 0xf8a2, 0xf9a2, 0xfaa2, 0xfba2, 0xfca2, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a2, 0xa2a2, 0xa3a2, 0xa4a2, 0xa5a2, 0xa6a2, 0xa7a2, 0xa8a2, 0xa9a2, 0xaaa2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfba1, 0xfca1, 0xfaa1, 0xfda1, 0x001a, 0x001a, 0x49a8, 0x4aa8, 0x4ba8, 0x4ca8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaa1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7a1, 0x001a, 0xc6a1, 0x001a, 0x001a, 0x001a, 0x4da8, 0x001a, 0x001a, 0x001a, 0x001a, 0xcca1, 0x001a, 0x001a, 0xd8a1, 0xdea1, 0x4ea8, 0xcfa1, 0x001a, 0x001a, 0x4fa8, 0x001a, 0xcea1, 0x001a, 0xc4a1, 0xc5a1, 0xc9a1, 0xc8a1, 0xd2a1, 0x001a, 0x001a, 0xd3a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0a1, 0xdfa1, 0xc3a1, 0xcba1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6a1, 0x001a, 0x001a, 0x001a, 0xd5a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9a1, 0xd4a1, 0x001a, 0x001a, 0xdca1, 0xdda1, 0x51a8, 0x52a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaa1, 0xdba1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x92a8, 0x001a, 0x001a, 0x001a, 0xd1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcda1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x53a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0x2440[ 576 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9a2, 0xdaa2, 0xdba2, 0xdca2, 0xdda2, 0xdea2, 0xdfa2, 0xe0a2, 0xe1a2, 0xe2a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5a2, 0xc6a2, 0xc7a2, 0xc8a2, 0xc9a2, 0xcaa2, 0xcba2, 0xcca2, 0xcda2, 0xcea2, 0xcfa2, 0xd0a2, 0xd1a2, 0xd2a2, 0xd3a2, 0xd4a2, 0xd5a2, 0xd6a2, 0xd7a2, 0xd8a2, 0xb1a2, 0xb2a2, 0xb3a2, 0xb4a2, 0xb5a2, 0xb6a2, 0xb7a2, 0xb8a2, 0xb9a2, 0xbaa2, 0xbba2, 0xbca2, 0xbda2, 0xbea2, 0xbfa2, 0xc0a2, 0xc1a2, 0xc2a2, 0xc3a2, 0xc4a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a9, 0xa5a9, 0xa6a9, 0xa7a9, 0xa8a9, 0xa9a9, 0xaaa9, 0xaba9, 0xaca9, 0xada9, 0xaea9, 0xafa9, 0xb0a9, 0xb1a9, 0xb2a9, 0xb3a9, 0xb4a9, 0xb5a9, 0xb6a9, 0xb7a9, 0xb8a9, 0xb9a9, 0xbaa9, 0xbba9, 0xbca9, 0xbda9, 0xbea9, 0xbfa9, 0xc0a9, 0xc1a9, 0xc2a9, 0xc3a9, 0xc4a9, 0xc5a9, 0xc6a9, 0xc7a9, 0xc8a9, 0xc9a9, 0xcaa9, 0xcba9, 0xcca9, 0xcda9, 0xcea9, 0xcfa9, 0xd0a9, 0xd1a9, 0xd2a9, 0xd3a9, 0xd4a9, 0xd5a9, 0xd6a9, 0xd7a9, 0xd8a9, 0xd9a9, 0xdaa9, 0xdba9, 0xdca9, 0xdda9, 0xdea9, 0xdfa9, 0xe0a9, 0xe1a9, 0xe2a9, 0xe3a9, 0xe4a9, 0xe5a9, 0xe6a9, 0xe7a9, 0xe8a9, 0xe9a9, 0xeaa9, 0xeba9, 0xeca9, 0xeda9, 0xeea9, 0xefa9, 0x001a, 0x001a, 0x001a, 0x001a, 0x54a8, 0x55a8, 0x56a8, 0x57a8, 0x58a8, 0x59a8, 0x5aa8, 0x5ba8, 0x5ca8, 0x5da8, 0x5ea8, 0x5fa8, 0x60a8, 0x61a8, 0x62a8, 0x63a8, 0x64a8, 0x65a8, 0x66a8, 0x67a8, 0x68a8, 0x69a8, 0x6aa8, 0x6ba8, 0x6ca8, 0x6da8, 0x6ea8, 0x6fa8, 0x70a8, 0x71a8, 0x72a8, 0x73a8, 0x74a8, 0x75a8, 0x76a8, 0x77a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x78a8, 0x79a8, 0x7aa8, 0x7ba8, 0x7ca8, 0x7da8, 0x7ea8, 0x80a8, 0x81a8, 0x82a8, 0x83a8, 0x84a8, 0x85a8, 0x86a8, 0x87a8, 0x001a, 0x001a, 0x001a, 0x88a8, 0x89a8, 0x8aa8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6a1, 0xf5a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8a1, 0xf7a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8ba8, 0x8ca8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4a1, 0xf3a1, 0x001a, 0x001a, 0x001a, 0xf0a1, 0x001a, 0x001a, 0xf2a1, 0xf1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8da8, 0x8ea8, 0x8fa8, 0x90a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefa1, 0xeea1, 0x001a, 0x001a, 0x91a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2a1, 0x001a, 0xe1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0x3000[ 1024 ] = { 0xa1a1, 0xa2a1, 0xa3a1, 0xa8a1, 0x001a, 0xa9a1, 0x65a9, 0x96a9, 0xb4a1, 0xb5a1, 0xb6a1, 0xb7a1, 0xb8a1, 0xb9a1, 0xbaa1, 0xbba1, 0xbea1, 0xbfa1, 0x93a8, 0xfea1, 0xb2a1, 0xb3a1, 0xbca1, 0xbda1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x94a8, 0x95a8, 0x001a, 0x001a, 0x40a9, 0x41a9, 0x42a9, 0x43a9, 0x44a9, 0x45a9, 0x46a9, 0x47a9, 0x48a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a4, 0xa2a4, 0xa3a4, 0xa4a4, 0xa5a4, 0xa6a4, 0xa7a4, 0xa8a4, 0xa9a4, 0xaaa4, 0xaba4, 0xaca4, 0xada4, 0xaea4, 0xafa4, 0xb0a4, 0xb1a4, 0xb2a4, 0xb3a4, 0xb4a4, 0xb5a4, 0xb6a4, 0xb7a4, 0xb8a4, 0xb9a4, 0xbaa4, 0xbba4, 0xbca4, 0xbda4, 0xbea4, 0xbfa4, 0xc0a4, 0xc1a4, 0xc2a4, 0xc3a4, 0xc4a4, 0xc5a4, 0xc6a4, 0xc7a4, 0xc8a4, 0xc9a4, 0xcaa4, 0xcba4, 0xcca4, 0xcda4, 0xcea4, 0xcfa4, 0xd0a4, 0xd1a4, 0xd2a4, 0xd3a4, 0xd4a4, 0xd5a4, 0xd6a4, 0xd7a4, 0xd8a4, 0xd9a4, 0xdaa4, 0xdba4, 0xdca4, 0xdda4, 0xdea4, 0xdfa4, 0xe0a4, 0xe1a4, 0xe2a4, 0xe3a4, 0xe4a4, 0xe5a4, 0xe6a4, 0xe7a4, 0xe8a4, 0xe9a4, 0xeaa4, 0xeba4, 0xeca4, 0xeda4, 0xeea4, 0xefa4, 0xf0a4, 0xf1a4, 0xf2a4, 0xf3a4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x61a9, 0x62a9, 0x66a9, 0x67a9, 0x001a, 0x001a, 0xa1a5, 0xa2a5, 0xa3a5, 0xa4a5, 0xa5a5, 0xa6a5, 0xa7a5, 0xa8a5, 0xa9a5, 0xaaa5, 0xaba5, 0xaca5, 0xada5, 0xaea5, 0xafa5, 0xb0a5, 0xb1a5, 0xb2a5, 0xb3a5, 0xb4a5, 0xb5a5, 0xb6a5, 0xb7a5, 0xb8a5, 0xb9a5, 0xbaa5, 0xbba5, 0xbca5, 0xbda5, 0xbea5, 0xbfa5, 0xc0a5, 0xc1a5, 0xc2a5, 0xc3a5, 0xc4a5, 0xc5a5, 0xc6a5, 0xc7a5, 0xc8a5, 0xc9a5, 0xcaa5, 0xcba5, 0xcca5, 0xcda5, 0xcea5, 0xcfa5, 0xd0a5, 0xd1a5, 0xd2a5, 0xd3a5, 0xd4a5, 0xd5a5, 0xd6a5, 0xd7a5, 0xd8a5, 0xd9a5, 0xdaa5, 0xdba5, 0xdca5, 0xdda5, 0xdea5, 0xdfa5, 0xe0a5, 0xe1a5, 0xe2a5, 0xe3a5, 0xe4a5, 0xe5a5, 0xe6a5, 0xe7a5, 0xe8a5, 0xe9a5, 0xeaa5, 0xeba5, 0xeca5, 0xeda5, 0xeea5, 0xefa5, 0xf0a5, 0xf1a5, 0xf2a5, 0xf3a5, 0xf4a5, 0xf5a5, 0xf6a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x60a9, 0x63a9, 0x64a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5a8, 0xc6a8, 0xc7a8, 0xc8a8, 0xc9a8, 0xcaa8, 0xcba8, 0xcca8, 0xcda8, 0xcea8, 0xcfa8, 0xd0a8, 0xd1a8, 0xd2a8, 0xd3a8, 0xd4a8, 0xd5a8, 0xd6a8, 0xd7a8, 0xd8a8, 0xd9a8, 0xdaa8, 0xdba8, 0xdca8, 0xdda8, 0xdea8, 0xdfa8, 0xe0a8, 0xe1a8, 0xe2a8, 0xe3a8, 0xe4a8, 0xe5a8, 0xe6a8, 0xe7a8, 0xe8a8, 0xe9a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5a2, 0xe6a2, 0xe7a2, 0xe8a2, 0xe9a2, 0xeaa2, 0xeba2, 0xeca2, 0xeda2, 0xeea2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5aa9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x49a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4aa9, 0x4ba9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ca9, 0x4da9, 0x4ea9, 0x001a, 0x001a, 0x4fa9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x51a9, 0x001a, 0x001a, 0x52a9, 0x53a9, 0x001a, 0x001a, 0x54a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0x4e00[ 20902 ] = { 0xbbd2, 0xa1b6, 0x4081, 0xdfc6, 0x4181, 0x4281, 0x4381, 0xf2cd, 0xc9d5, 0xfdc8, 0xcfc9, 0xc2cf, 0xa2d8, 0xbbb2, 0xebd3, 0x4481, 0xa4d8, 0xf3b3, 0x4581, 0xa8d7, 0xd2c7, 0xa7d8, 0xc0ca, 0x4681, 0xf0c7, 0xfbb1, 0xb5d2, 0xd4b4, 0xabb6, 0xbfcb, 0xa9d8, 0x4781, 0x4881, 0x4981, 0xaab6, 0x4a81, 0xbdc1, 0xcfd1, 0x4b81, 0xa5c9, 0xadd8, 0x4c81, 0xf6b8, 0xbed1, 0xdce3, 0xd0d6, 0x4d81, 0x4e81, 0xe1b7, 0x4f81, 0xaeb4, 0x5081, 0xd9c1, 0x5181, 0xbcd8, 0x5281, 0xe8cd, 0xa4b5, 0xaace, 0xf7d6, 0x5381, 0xf6c0, 0xd9be, 0xafd8, 0x5481, 0x5581, 0x5681, 0xcbc4, 0x5781, 0xc3be, 0x5881, 0xb1d8, 0xb4c3, 0xe5d2, 0x5981, 0xaed6, 0xdace, 0xa7d5, 0xf5ba, 0xa6b7, 0xd6c0, 0x5a81, 0xb9c6, 0xd2c5, 0xc7c7, 0x5b81, 0xd4b9, 0x5c81, 0xcbb3, 0xd2d2, 0x5d81, 0x5e81, 0xbfd8, 0xc5be, 0xf2c6, 0xb2d2, 0xb0cf, 0xe7cf, 0x5f81, 0x6081, 0x6181, 0x6281, 0xe9ca, 0x6381, 0x6481, 0xc0d8, 0x6581, 0x6681, 0x6781, 0x6881, 0x6981, 0x6a81, 0xf2c2, 0xd2c2, 0x6b81, 0xe9c8, 0x6c81, 0x6d81, 0x6e81, 0x6f81, 0x7081, 0x7181, 0x7281, 0x7381, 0x7481, 0x7581, 0xacc7, 0x7681, 0x7781, 0x7881, 0x7981, 0x7a81, 0x7b81, 0x7c81, 0xcbc1, 0x7d81, 0xe8d3, 0xf9d5, 0x7e81, 0xc2ca, 0xfeb6, 0xa1d8, 0xdad3, 0xf7bf, 0x8081, 0xc6d4, 0xa5bb, 0xc1d8, 0xe5ce, 0xaebe, 0x8181, 0x8281, 0xa8d8, 0x8381, 0xc7d1, 0xa9d0, 0x8481, 0x8581, 0x8681, 0xbdd8, 0xefd9, 0xf6cd, 0xbabf, 0x8781, 0xbbbd, 0xa5ba, 0xe0d2, 0xfab2, 0xe0ba, 0xb6c4, 0x8881, 0xedcf, 0xa9be, 0xa4cd, 0xc1c1, 0x8981, 0x8a81, 0x8b81, 0xd7c7, 0xf1d9, 0x8c81, 0xf4d9, 0x8d81, 0x8e81, 0x8f81, 0x9081, 0xcbc8, 0xe9d8, 0x9181, 0x9281, 0x9381, 0xdad2, 0xb2ca, 0xcac8, 0xecd8, 0xead8, 0xc6d8, 0xf6bd, 0xcdc6, 0xf0b3, 0x9481, 0xebd8, 0xf1bd, 0xe9bd, 0x9581, 0xd4c8, 0xd3b4, 0x9681, 0x9781, 0xd8c2, 0x9881, 0xd6b2, 0xd0d7, 0xcbca, 0xfbcb, 0xccd5, 0xb6b8, 0xc9cf, 0x9981, 0x9a81, 0x9b81, 0xdad9, 0xf0d8, 0xaac7, 0x9c81, 0xeed8, 0x9d81, 0xfab4, 0xeec1, 0xd4d2, 0x9e81, 0x9f81, 0xedd8, 0xa081, 0xc7d2, 0xefd8, 0xc7c3, 0xa181, 0xa281, 0xa381, 0xf6d1, 0xa481, 0xd9d6, 0xf2d8, 0xa581, 0xf5d8, 0xfebc, 0xdbbc, 0xa681, 0xa781, 0xa881, 0xcec8, 0xa981, 0xddb7, 0xaa81, 0xc2b7, 0xab81, 0xf3c6, 0xac81, 0xad81, 0xae81, 0xaf81, 0xb081, 0xb181, 0xb281, 0xf8d8, 0xc1d2, 0xb381, 0xb481, 0xe9ce, 0xbfbc, 0xfcb7, 0xa5b7, 0xddd0, 0xb581, 0xb681, 0xb781, 0xb881, 0xb981, 0xdad6, 0xc5d3, 0xefbb, 0xe1bb, 0xf1d8, 0xba81, 0xbb81, 0xa1c9, 0xb0ce, 0xabb4, 0xbc81, 0xf3d8, 0xbd81, 0xcbc9, 0xf6d8, 0xd7c2, 0xf7d8, 0xbe81, 0xbf81, 0xb1ce, 0xf9d8, 0xc081, 0xc181, 0xc281, 0xaeb2, 0xc0b9, 0xc381, 0xa3d9, 0xc481, 0xe9b0, 0xc581, 0xe6c1, 0xc681, 0xecc9, 0xc781, 0xc5cb, 0xc881, 0xc6cb, 0xa4d9, 0xc981, 0xca81, 0xcb81, 0xcc81, 0xcd81, 0xe8b5, 0xce81, 0xcf81, 0xabb5, 0xd081, 0xd181, 0xd281, 0xd381, 0xd481, 0xd581, 0xbbce, 0xcdb5, 0xa1d7, 0xf4d7, 0xd3d3, 0xd681, 0xe5cc, 0xd781, 0xceba, 0xd881, 0xa2d9, 0xdcd9, 0xe0d3, 0xfdd8, 0xf0b7, 0xf7d7, 0xfed8, 0xfad8, 0xa1d9, 0xe3c4, 0xd981, 0xda81, 0xb6d3, 0xf4d8, 0xddd9, 0xdb81, 0xfbd8, 0xdc81, 0xe5c5, 0xdd81, 0xde81, 0xd0c0, 0xdf81, 0xe081, 0xf0d1, 0xdbb0, 0xe181, 0xe281, 0xd1bc, 0xa6d9, 0xe381, 0xa5d9, 0xe481, 0xe581, 0xe681, 0xe781, 0xacd9, 0xaed9, 0xe881, 0xabd9, 0xb9ca, 0xe981, 0xea81, 0xeb81, 0xa9d9, 0xb6d6, 0xec81, 0xed81, 0xee81, 0xdeb3, 0xa8d9, 0xef81, 0xfdc0, 0xf081, 0xccca, 0xf181, 0xaad9, 0xf281, 0xa7d9, 0xf381, 0xf481, 0xb0d9, 0xf581, 0xf681, 0xb1b6, 0xf781, 0xf881, 0xf981, 0xa9b9, 0xfa81, 0xc0d2, 0xfb81, 0xfc81, 0xc0cf, 0xfd81, 0xfe81, 0xc2c2, 0x4082, 0xc4bd, 0xecd5, 0xe0b2, 0xc8c7, 0xebbf, 0xadd9, 0x4182, 0xafd9, 0x4282, 0xeace, 0xeeba, 0x4382, 0x4482, 0x4582, 0x4682, 0x4782, 0xd6c7, 0x4882, 0x4982, 0x4a82, 0x4b82, 0x4c82, 0x4d82, 0x4e82, 0x4f82, 0x5082, 0xe3b1, 0x5182, 0x5282, 0x5382, 0xd9b4, 0xedb6, 0xb4d9, 0x5482, 0x5582, 0x5682, 0x5782, 0xa1bf, 0x5882, 0x5982, 0x5a82, 0xded9, 0xcec7, 0xfec0, 0xb8d9, 0x5b82, 0x5c82, 0x5d82, 0x5e82, 0x5f82, 0xd7cb, 0xfdb7, 0x6082, 0xb5d9, 0x6182, 0xb7d9, 0xa3b1, 0xe1d3, 0xb9d9, 0x6282, 0xc5d0, 0x6382, 0xb6d9, 0x6482, 0x6582, 0xb1d9, 0x6682, 0xb2d9, 0xa9c1, 0xb3d9, 0x6782, 0x6882, 0xf3bc, 0xded0, 0xa9b8, 0x6982, 0xe3be, 0x6a82, 0xbdd9, 0x6b82, 0x6c82, 0x6d82, 0x6e82, 0xbad9, 0x6f82, 0xb3b0, 0x7082, 0x7182, 0x7282, 0xc2d9, 0x7382, 0x7482, 0x7582, 0x7682, 0x7782, 0x7882, 0x7982, 0x7a82, 0x7b82, 0x7c82, 0x7d82, 0x7e82, 0x8082, 0xc4d9, 0xb6b1, 0x8182, 0xbfd9, 0x8282, 0x8382, 0xb9b5, 0x8482, 0xf3be, 0x8582, 0x8682, 0x8782, 0xc8cc, 0xf2ba, 0xd0d2, 0x8882, 0xc3d9, 0x8982, 0x8a82, 0xe8bd, 0x8b82, 0xabb3, 0x8c82, 0x8d82, 0x8e82, 0xc5d9, 0xebbe, 0x8f82, 0xc6d9, 0xbbd9, 0xdfc4, 0x9082, 0xbed9, 0xc1d9, 0xc0d9, 0x9182, 0x9282, 0x9382, 0x9482, 0x9582, 0x9682, 0x9782, 0x9882, 0x9982, 0x9a82, 0x9b82, 0xaed5, 0x9c82, 0xb5d6, 0x9d82, 0xe3c7, 0x9e82, 0x9f82, 0xa082, 0xa182, 0xc8d9, 0xa282, 0xa382, 0xa482, 0xd9bc, 0xcad9, 0xa582, 0xa682, 0xa782, 0xbcd9, 0xa882, 0xcbd9, 0xabc6, 0xa982, 0xaa82, 0xab82, 0xac82, 0xad82, 0xc9d9, 0xae82, 0xaf82, 0xb082, 0xb182, 0xf6d7, 0xb282, 0xa3cd, 0xb382, 0xb482, 0xb582, 0xb682, 0xb782, 0xb882, 0xb982, 0xba82, 0xa1bd, 0xbb82, 0xbc82, 0xbd82, 0xbe82, 0xbf82, 0xc082, 0xccd9, 0xc182, 0xc282, 0xc382, 0xc482, 0xc582, 0xc682, 0xc782, 0xc882, 0xc982, 0xbcc5, 0xb5cd, 0xca82, 0xcb82, 0xcc82, 0xcdd9, 0xcd82, 0xce82, 0xc7d9, 0xa5b3, 0xfebf, 0xcf82, 0xd082, 0xd182, 0xd282, 0xb5b8, 0xd382, 0xd482, 0xfcc0, 0xd582, 0xd682, 0xd782, 0xd882, 0xf8b0, 0xd982, 0xda82, 0xdb82, 0xdc82, 0xdd82, 0xde82, 0xdf82, 0xe082, 0xe182, 0xe282, 0xe382, 0xe482, 0xe582, 0xe682, 0xe782, 0xe882, 0xe982, 0xea82, 0xeb82, 0xec82, 0xed82, 0xf6b4, 0xee82, 0xced9, 0xef82, 0xcfd9, 0xa2b4, 0xd0d9, 0xf082, 0xf182, 0xdfb4, 0xf282, 0xf382, 0xf482, 0xf582, 0xf682, 0xc1b0, 0xf782, 0xf882, 0xf982, 0xfa82, 0xfb82, 0xfc82, 0xfd82, 0xd1d9, 0xb5c9, 0xfe82, 0x4083, 0x4183, 0x4283, 0x4383, 0x4483, 0x4583, 0x4683, 0x4783, 0x4883, 0x4983, 0x4a83, 0x4b83, 0x4c83, 0x4d83, 0x4e83, 0x4f83, 0x5083, 0x5183, 0xf1cf, 0x5283, 0x5383, 0x5483, 0x5583, 0x5683, 0x5783, 0xd2d9, 0x5883, 0x5983, 0x5a83, 0xc5c1, 0x5b83, 0x5c83, 0x5d83, 0x5e83, 0x5f83, 0x6083, 0x6183, 0x6283, 0x6383, 0x6483, 0x6583, 0xd6d9, 0xaec9, 0x6683, 0x6783, 0x6883, 0x6983, 0xd5d9, 0xd4d9, 0xd7d9, 0x6a83, 0x6b83, 0x6c83, 0x6d83, 0xdbcb, 0x6e83, 0xa9bd, 0x6f83, 0x7083, 0x7183, 0x7283, 0x7383, 0xa7c6, 0x7483, 0x7583, 0x7683, 0x7783, 0x7883, 0x7983, 0x7a83, 0x7b83, 0x7c83, 0x7d83, 0xd3d9, 0xd8d9, 0x7e83, 0x8083, 0x8183, 0xd9d9, 0x8283, 0x8383, 0x8483, 0x8583, 0x8683, 0x8783, 0xe5c8, 0x8883, 0x8983, 0x8a83, 0x8b83, 0x8c83, 0x8d83, 0x8e83, 0x8f83, 0x9083, 0x9183, 0x9283, 0x9383, 0x9483, 0x9583, 0xdcc0, 0x9683, 0x9783, 0x9883, 0x9983, 0x9a83, 0x9b83, 0x9c83, 0x9d83, 0x9e83, 0x9f83, 0xa083, 0xa183, 0xa283, 0xa383, 0xa483, 0xa583, 0xa683, 0xa783, 0xa883, 0xa983, 0xaa83, 0xab83, 0xac83, 0xad83, 0xae83, 0xaf83, 0xb083, 0xb183, 0xb283, 0xf9b6, 0xa3d8, 0xcad4, 0xb383, 0xaad4, 0xd6d0, 0xe4b3, 0xd7d5, 0xb483, 0xc8cf, 0xe2b9, 0xb583, 0xcbbf, 0xb683, 0xe2c3, 0xb783, 0xb883, 0xb983, 0xd2b6, 0xba83, 0xbb83, 0xc3cd, 0xeed9, 0xf0d9, 0xbc83, 0xbd83, 0xbe83, 0xb3b5, 0xbf83, 0xb5b6, 0xc083, 0xc183, 0xc283, 0xc383, 0xc483, 0xa4be, 0xc583, 0xc683, 0xebc8, 0xc783, 0xc883, 0xabc8, 0xc983, 0xca83, 0xcbb0, 0xabb9, 0xf9c1, 0xe2d9, 0xcb83, 0xbcc0, 0xb2b9, 0xcc83, 0xd8b9, 0xcbd0, 0xf8b1, 0xe4c6, 0xdfbe, 0xe4b5, 0xc8d7, 0xcd83, 0xf8d1, 0xe6bc, 0xdeca, 0xce83, 0xcf83, 0xbdbc, 0xe6d9, 0xe7d8, 0xd083, 0xd183, 0xdac4, 0xd283, 0xd383, 0xd4b8, 0xbdc8, 0xd483, 0xd583, 0xe1b2, 0xd9d4, 0xd683, 0xd783, 0xd883, 0xd983, 0xb0c3, 0xda83, 0xdb83, 0xe1c3, 0xa2da, 0xdfc8, 0xdc83, 0xb4d0, 0xdd83, 0xfcbe, 0xa9c5, 0xde83, 0xdf83, 0xe083, 0xdab9, 0xe183, 0xa3da, 0xe283, 0xa9d4, 0xa4da, 0xe383, 0xe483, 0xe583, 0xe683, 0xe783, 0xfbd9, 0xacb6, 0xe883, 0xe983, 0xebb7, 0xf9b1, 0xfcd9, 0xe5b3, 0xf6be, 0xea83, 0xf6bf, 0xb1d2, 0xe4c0, 0xeb83, 0xec83, 0xed83, 0xb3b6, 0xfed9, 0xfdd9, 0xee83, 0xef83, 0xbbbe, 0xf083, 0xf183, 0xf283, 0xe0c6, 0xf383, 0xbcd7, 0xa1da, 0xf483, 0xb9c1, 0xf583, 0xf2b5, 0xe8c1, 0xf683, 0xf783, 0xf5bc, 0xf883, 0xd5b4, 0xf983, 0xfa83, 0xfb83, 0xfc83, 0xfd83, 0xfe83, 0x4084, 0x4184, 0x4284, 0xddc1, 0x4384, 0xfdc4, 0x4484, 0x4584, 0xb8bc, 0xb2b7, 0x4684, 0x4784, 0xefb7, 0x4884, 0x4984, 0x4a84, 0x4b84, 0x4c84, 0x4d84, 0xecd9, 0x4e84, 0xbec6, 0x4f84, 0xadbf, 0xcbbb, 0x5084, 0x5184, 0xcab5, 0x5284, 0xc9db, 0xd7d0, 0x5384, 0xb9cd, 0xbcb0, 0xf6b3, 0xf7bb, 0xcadb, 0xafba, 0x5484, 0xe4d4, 0xb6b5, 0xf3b5, 0xd6d8, 0xd0c8, 0x5584, 0x5684, 0xd6b7, 0xd0c7, 0xd7d8, 0x5784, 0xafbf, 0x5884, 0x5984, 0xbbdb, 0xd8d8, 0x5a84, 0x5b84, 0xccd0, 0xaebb, 0x5c84, 0x5d84, 0x5e84, 0xbeeb, 0xd0c1, 0xf5c1, 0xf2d4, 0xd5b8, 0xb4b4, 0x5f84, 0xf5b3, 0x6084, 0x6184, 0xbec9, 0x6284, 0x6384, 0x6484, 0xd0c5, 0x6584, 0x6684, 0x6784, 0xd9c5, 0xfbc0, 0x6884, 0xf0b1, 0x6984, 0xd9d8, 0xceb9, 0x6a84, 0xbdb5, 0x6b84, 0x6c84, 0xdad8, 0x6d84, 0x6e84, 0xc6d6, 0xa2cb, 0xafc8, 0xb2c9, 0xccb4, 0xccbf, 0x6f84, 0xf4b9, 0x7084, 0xdbd8, 0xdcd8, 0xe7b6, 0xc1bc, 0xeacc, 0x7184, 0x7284, 0x7384, 0x7484, 0x7584, 0x7684, 0xf7cf, 0x7784, 0xddd8, 0xb0c7, 0x7884, 0x7984, 0xd0b9, 0xa3bd, 0x7a84, 0x7b84, 0xdecc, 0x7c84, 0xcac6, 0x7d84, 0x7e84, 0x8084, 0x8184, 0x8284, 0xe0d8, 0x8384, 0xded8, 0x8484, 0x8584, 0xdfd8, 0x8684, 0x8784, 0x8884, 0xfeb0, 0x8984, 0xe7be, 0x8a84, 0xa3ca, 0xf4bc, 0x8b84, 0x8c84, 0x8d84, 0x8e84, 0xb1b8, 0x8f84, 0x9084, 0xeeb8, 0x9184, 0x9284, 0x9384, 0x9484, 0x9584, 0x9684, 0x9784, 0x9884, 0x9984, 0x9a84, 0xe2d8, 0x9b84, 0xcbbd, 0x9c84, 0xe4d8, 0xe3d8, 0x9d84, 0x9e84, 0x9f84, 0xa084, 0xa184, 0xfcc5, 0xa284, 0xa384, 0xa484, 0xa584, 0xa684, 0xa784, 0xa884, 0xe5d8, 0xa984, 0xaa84, 0xe6d8, 0xab84, 0xac84, 0xad84, 0xae84, 0xaf84, 0xb084, 0xb184, 0xa6c1, 0xb284, 0xb0c8, 0xecb0, 0xa6b9, 0xd3bc, 0xf1ce, 0xbddb, 0xd3c1, 0xb384, 0xb484, 0xb584, 0xb684, 0xafb6, 0xfad6, 0xacc5, 0xd9bd, 0xbedb, 0xbfdb, 0xb784, 0xb884, 0xb984, 0xf8c0, 0xa2be, 0xcdc0, 0xba84, 0xbb84, 0xbc84, 0xbd84, 0xbe84, 0xbf84, 0xc084, 0xc184, 0xc284, 0xc384, 0xc0db, 0xc6ca, 0xc484, 0xc584, 0xc684, 0xaab2, 0xc784, 0xc884, 0xc984, 0xc2d3, 0xca84, 0xe3c3, 0xcb84, 0xabd1, 0xcc84, 0xcd84, 0xce84, 0xcf84, 0xc2db, 0xd084, 0xd5c0, 0xd184, 0xd284, 0xd384, 0xc3db, 0xd484, 0xb1bf, 0xd584, 0xd684, 0xd784, 0xd884, 0xd984, 0xda84, 0xbcc4, 0xdb84, 0xdc84, 0xdd84, 0xde84, 0xdac7, 0xdf84, 0xe084, 0xe184, 0xe284, 0xe384, 0xe484, 0xe584, 0xe684, 0xe784, 0xe884, 0xe984, 0xc4db, 0xea84, 0xeb84, 0xec84, 0xed84, 0xee84, 0xef84, 0xf084, 0xf184, 0xe8d9, 0xd7c9, 0xf284, 0xf384, 0xf484, 0xb4b9, 0xf0ce, 0xc8d4, 0xf584, 0xf684, 0xf784, 0xf884, 0xfcb0, 0xd2b4, 0xf984, 0xd9d0, 0xfa84, 0xfb84, 0xfc84, 0xfd84, 0xe9d9, 0xfe84, 0xcbde, 0xebd9, 0x4085, 0x4185, 0x4285, 0x4385, 0xb0d8, 0xafbb, 0xb1b1, 0x4485, 0xd7b3, 0xced8, 0x4585, 0x4685, 0xd1d4, 0x4785, 0x4885, 0xb3bd, 0xefbf, 0x4985, 0xbbcf, 0x4a85, 0x4b85, 0xd0d8, 0x4c85, 0x4d85, 0x4e85, 0xcbb7, 0x4f85, 0x5085, 0x5185, 0xd1d8, 0x5285, 0x5385, 0x5485, 0x5585, 0x5685, 0x5785, 0x5885, 0x5985, 0x5a85, 0x5b85, 0xa5c6, 0xf8c7, 0xbdd2, 0x5c85, 0x5d85, 0xd2d8, 0xe4c4, 0x5e85, 0xaeca, 0x5f85, 0xa7c7, 0x6085, 0xa6d8, 0x6185, 0xfdc9, 0xe7ce, 0xdcbb, 0xebb0, 0x6285, 0x6385, 0x6485, 0xaabb, 0xadd0, 0x6585, 0xb0b1, 0xe4d7, 0xbfd7, 0x6685, 0xa5b5, 0xf4c2, 0xcfc4, 0x6785, 0x6885, 0xa9b2, 0x6985, 0xb7b2, 0x6a85, 0xe5b1, 0xb2df, 0xbcd5, 0xa8bf, 0xacc2, 0xd5d8, 0xb1c2, 0x6b85, 0xd4d8, 0xd4ce, 0x6c85, 0xe0da, 0x6d85, 0xc0ce, 0x6e85, 0x6f85, 0xb4d8, 0xaec3, 0xa1d3, 0xa3ce, 0x7085, 0xb4bc, 0xb4c8, 0xd1c2, 0x7185, 0xedbe, 0xb6d0, 0x7285, 0xe1da, 0x7385, 0x7485, 0x7585, 0x7685, 0xe4c7, 0x7785, 0x7885, 0xa7b3, 0x7985, 0xf2b6, 0xfccc, 0xfac0, 0x7a85, 0x7b85, 0xf7c0, 0x7c85, 0xb9d1, 0xe1d1, 0xc7d8, 0x7d85, 0x7e85, 0x8085, 0x8185, 0x8285, 0x8385, 0x8485, 0xdeb2, 0x8585, 0x8685, 0xe5c0, 0x8785, 0xf1ba, 0x8885, 0x8985, 0xc8d8, 0x8a85, 0xadd4, 0x8b85, 0x8c85, 0xe1cf, 0xc9d8, 0x8d85, 0xcad8, 0xc3cf, 0x8e85, 0xf8b3, 0xc7be, 0x8f85, 0x9085, 0x9185, 0x9285, 0xcbd8, 0x9385, 0x9485, 0x9585, 0x9685, 0x9785, 0x9885, 0x9985, 0xccdb, 0x9a85, 0x9b85, 0x9c85, 0x9d85, 0xa5c8, 0x9e85, 0x9f85, 0xa085, 0xd8cf, 0xa185, 0xfec8, 0xceb2, 0xa285, 0xa385, 0xa485, 0xa585, 0xa685, 0xd6d3, 0xe6b2, 0xb0bc, 0xd1d3, 0xabcb, 0xb4b7, 0xa785, 0xa885, 0xa985, 0xa2b7, 0xaa85, 0xab85, 0xe5ca, 0xac85, 0xa1c8, 0xdcca, 0xe4b1, 0xf0d0, 0xad85, 0xd1c5, 0xae85, 0xaf85, 0xb085, 0xc5db, 0xfeb5, 0xb185, 0xb285, 0xdabf, 0xc5b9, 0xe4be, 0xedc1, 0xb385, 0xb6df, 0xb5df, 0xbbd6, 0xd0bd, 0xd9d5, 0xc8b0, 0xa3b6, 0xc9bf, 0xa8cc, 0xb3df, 0xb7ca, 0xd2d3, 0xb485, 0xcfd8, 0xb6d2, 0xc5ba, 0xbecb, 0xbecc, 0xb585, 0xb7df, 0xf0b5, 0xb4df, 0xb685, 0xb785, 0xb885, 0xf5d3, 0xb985, 0xd4b3, 0xf7b8, 0xba85, 0xbadf, 0xbb85, 0xcfba, 0xaabc, 0xf5b5, 0xbc85, 0xaccd, 0xfbc3, 0xf3ba, 0xf4c0, 0xc2cd, 0xf2cf, 0xb8df, 0xc5cf, 0xbd85, 0xc0c2, 0xb9df, 0xf0c2, 0xbe85, 0xbf85, 0xc085, 0xfdbe, 0xc185, 0xdfc1, 0xcccd, 0xf7d2, 0xcdb7, 0xc1df, 0xc285, 0xc4df, 0xc385, 0xc485, 0xf1b7, 0xc9b0, 0xd6b6, 0xd4b7, 0xc585, 0xacba, 0xfdcc, 0xd4bf, 0xb1cb, 0xf4c6, 0xc685, 0xa8d6, 0xc5df, 0xc785, 0xe2ce, 0xb3b3, 0xc885, 0xc985, 0xfcce, 0xb5b4, 0xca85, 0xc7ce, 0xf0ba, 0xcb85, 0xe1ce, 0xcc85, 0xbdd1, 0xcd85, 0xce85, 0xc0df, 0xcf85, 0xd085, 0xf4b4, 0xd185, 0xcab3, 0xd285, 0xe6b8, 0xbbdf, 0xd385, 0xd485, 0xd585, 0xd685, 0xc5c4, 0xd785, 0xbcdf, 0xbddf, 0xbedf, 0xbbc5, 0xbfdf, 0xc2df, 0xb1d4, 0xc3df, 0xd885, 0xbac7, 0xd8ce, 0xd985, 0xda85, 0xdb85, 0xdc85, 0xdd85, 0xd8c4, 0xde85, 0xcadf, 0xdf85, 0xcfdf, 0xe085, 0xdcd6, 0xe185, 0xe285, 0xe385, 0xe485, 0xe585, 0xe685, 0xe785, 0xe885, 0xc9df, 0xdadf, 0xb6ce, 0xe985, 0xc7ba, 0xcedf, 0xc8df, 0xdec5, 0xea85, 0xeb85, 0xebc9, 0xf4ba, 0xfcc3, 0xec85, 0xed85, 0xd7be, 0xee85, 0xc6df, 0xef85, 0xcddf, 0xf085, 0xd8c5, 0xf185, 0xf285, 0xf385, 0xf485, 0xa6d5, 0xcdba, 0xf585, 0xccbe, 0xbdd3, 0xc0b8, 0xf685, 0xe4d6, 0xf785, 0xc7df, 0xbeb9, 0xa7bf, 0xf885, 0xf985, 0xfcc1, 0xcbdf, 0xccdf, 0xfa85, 0xd0df, 0xfb85, 0xfc85, 0xfd85, 0xfe85, 0x4086, 0xdbdf, 0xe5df, 0x4186, 0xd7df, 0xd6df, 0xc9d7, 0xe3df, 0xe4df, 0xebe5, 0xa7d2, 0xd2df, 0x4286, 0xa9bf, 0x4386, 0xdbd4, 0x4486, 0xc8bf, 0xd4df, 0x4586, 0x4686, 0x4786, 0xcccf, 0x4886, 0x4986, 0xdddf, 0x4a86, 0xcad1, 0x4b86, 0xdedf, 0xa7b0, 0xb7c6, 0xd3df, 0x4c86, 0xe5ba, 0x4d86, 0xdfb6, 0xdbcd, 0xfeb9, 0xd5d4, 0x4e86, 0x4f86, 0xdfdf, 0xeccf, 0xa5b0, 0xe7df, 0xd1df, 0xc6d1, 0xd5df, 0xd8df, 0xd9df, 0xdcdf, 0x5086, 0xa9bb, 0x5186, 0xe0df, 0xe1df, 0x5286, 0xe2df, 0xe6df, 0xe8df, 0xb4d3, 0x5386, 0x5486, 0x5586, 0x5686, 0x5786, 0xe7b8, 0xb6c5, 0xeadf, 0xdac9, 0xa8c1, 0xc4c4, 0x5886, 0x5986, 0xdebf, 0xf8cf, 0x5a86, 0x5b86, 0x5c86, 0xdcd5, 0xeedf, 0x5d86, 0x5e86, 0x5f86, 0x6086, 0x6186, 0x6286, 0xb8b2, 0x6386, 0xdfba, 0xecdf, 0x6486, 0xc1db, 0x6586, 0xe4d1, 0x6686, 0x6786, 0x6886, 0x6986, 0xf4cb, 0xbdb4, 0x6a86, 0xa6b0, 0x6b86, 0x6c86, 0x6d86, 0x6e86, 0x6f86, 0xf1df, 0xc6cc, 0xf2df, 0x7086, 0x7186, 0xeddf, 0x7286, 0x7386, 0x7486, 0x7586, 0x7686, 0x7786, 0xe9df, 0x7886, 0x7986, 0x7a86, 0x7b86, 0xebdf, 0x7c86, 0xefdf, 0xf0df, 0xbdbb, 0x7d86, 0x7e86, 0xf3df, 0x8086, 0x8186, 0xf4df, 0x8286, 0xa3bb, 0x8386, 0xdbca, 0xa8ce, 0xa7e0, 0xaab3, 0x8486, 0xa6e0, 0x8586, 0x8686, 0x8786, 0xa1e0, 0x8886, 0x8986, 0x8a86, 0x8b86, 0xfedf, 0x8c86, 0xd9cd, 0xfcdf, 0x8d86, 0xfadf, 0x8e86, 0xd0bf, 0xc4d7, 0x8f86, 0xccc9, 0x9086, 0x9186, 0xf8df, 0xa1b0, 0x9286, 0x9386, 0x9486, 0x9586, 0x9686, 0xfddf, 0x9786, 0x9886, 0x9986, 0x9a86, 0xfbdf, 0xa2e0, 0x9b86, 0x9c86, 0x9d86, 0x9e86, 0x9f86, 0xa8e0, 0xa086, 0xa186, 0xa286, 0xa386, 0xc8b7, 0xa486, 0xa586, 0xa1c6, 0xb6c9, 0xb2c0, 0xf5df, 0xa686, 0xa786, 0xbec5, 0xa886, 0xc4d8, 0xf9df, 0xf6c4, 0xa986, 0xaa86, 0xab86, 0xac86, 0xad86, 0xae86, 0xa3e0, 0xa4e0, 0xa5e0, 0xa5d0, 0xaf86, 0xb086, 0xb4e0, 0xe4cc, 0xb186, 0xb1e0, 0xb286, 0xa6bf, 0xafe0, 0xb9ce, 0xabe0, 0xc6c9, 0xb386, 0xb486, 0xaec0, 0xaee0, 0xedba, 0xb0ba, 0xa9e0, 0xb586, 0xb686, 0xb786, 0xf6df, 0xb886, 0xb3e0, 0xb986, 0xba86, 0xb8e0, 0xbb86, 0xbc86, 0xbd86, 0xadb4, 0xb9e0, 0xbe86, 0xbf86, 0xb2cf, 0xc8ba, 0xc086, 0xb0e0, 0xc186, 0xc286, 0xc386, 0xc486, 0xc586, 0xc686, 0xc786, 0xfad0, 0xc886, 0xc986, 0xca86, 0xcb86, 0xcc86, 0xcd86, 0xce86, 0xcf86, 0xd086, 0xace0, 0xd186, 0xfbd4, 0xd286, 0xf7df, 0xd386, 0xe7c5, 0xd486, 0xade0, 0xd586, 0xf7d3, 0xd686, 0xb6e0, 0xb7e0, 0xd786, 0xd886, 0xd986, 0xda86, 0xdb86, 0xc4e0, 0xe1d0, 0xdc86, 0xdd86, 0xde86, 0xbce0, 0xdf86, 0xe086, 0xc9e0, 0xcae0, 0xe186, 0xe286, 0xe386, 0xbee0, 0xaae0, 0xa4c9, 0xc1e0, 0xe486, 0xb2e0, 0xe586, 0xe686, 0xe786, 0xe886, 0xe986, 0xc8ca, 0xc3e0, 0xea86, 0xb5e0, 0xeb86, 0xcbce, 0xec86, 0xc3cb, 0xcde0, 0xc6e0, 0xc2e0, 0xed86, 0xcbe0, 0xee86, 0xbae0, 0xbfe0, 0xc0e0, 0xef86, 0xf086, 0xc5e0, 0xf186, 0xf286, 0xc7e0, 0xc8e0, 0xf386, 0xcce0, 0xf486, 0xbbe0, 0xf586, 0xf686, 0xf786, 0xf886, 0xf986, 0xd4cb, 0xd5e0, 0xfa86, 0xd6e0, 0xd2e0, 0xfb86, 0xfc86, 0xfd86, 0xfe86, 0x4087, 0x4187, 0xd0e0, 0xcebc, 0x4287, 0x4387, 0xd1e0, 0x4487, 0xc2b8, 0xc5d8, 0x4587, 0x4687, 0x4787, 0x4887, 0x4987, 0x4a87, 0x4b87, 0x4c87, 0xead0, 0x4d87, 0x4e87, 0xefc2, 0x4f87, 0x5087, 0xcfe0, 0xbde0, 0x5187, 0x5287, 0x5387, 0xd4e0, 0xd3e0, 0x5487, 0x5587, 0xd7e0, 0x5687, 0x5787, 0x5887, 0x5987, 0xdce0, 0xd8e0, 0x5a87, 0x5b87, 0x5c87, 0xf6d6, 0xb0b3, 0x5d87, 0xecd7, 0x5e87, 0xbbcb, 0x5f87, 0x6087, 0xdae0, 0x6187, 0xfbce, 0x6287, 0x6387, 0x6487, 0xd9ba, 0x6587, 0x6687, 0x6787, 0x6887, 0x6987, 0x6a87, 0x6b87, 0x6c87, 0x6d87, 0x6e87, 0x6f87, 0x7087, 0xe1e0, 0xdde0, 0xadd2, 0x7187, 0x7287, 0x7387, 0x7487, 0x7587, 0xe2e0, 0x7687, 0x7787, 0xdbe0, 0xd9e0, 0xdfe0, 0x7887, 0x7987, 0xe0e0, 0x7a87, 0x7b87, 0x7c87, 0x7d87, 0x7e87, 0xdee0, 0x8087, 0xe4e0, 0x8187, 0x8287, 0x8387, 0xf7c6, 0xacd8, 0xebd4, 0xe6e0, 0xc9ca, 0x8487, 0x8587, 0x8687, 0x8787, 0xe5e0, 0x8887, 0x8987, 0x8a87, 0x8b87, 0xc1b8, 0x8c87, 0x8d87, 0x8e87, 0x8f87, 0xe7e0, 0xe8e0, 0x9087, 0x9187, 0x9287, 0x9387, 0x9487, 0x9587, 0x9687, 0x9787, 0xe9e0, 0xe3e0, 0x9887, 0x9987, 0x9a87, 0x9b87, 0x9c87, 0x9d87, 0x9e87, 0xbfba, 0xe7cc, 0x9f87, 0xa087, 0xa187, 0xeae0, 0xa287, 0xa387, 0xa487, 0xa587, 0xa687, 0xa787, 0xa887, 0xa987, 0xaa87, 0xab87, 0xac87, 0xad87, 0xae87, 0xaf87, 0xb087, 0xf9cf, 0xb187, 0xb287, 0xb387, 0xb487, 0xb587, 0xb687, 0xb787, 0xb887, 0xb987, 0xba87, 0xbb87, 0xebe0, 0xbc87, 0xbd87, 0xbe87, 0xbf87, 0xc087, 0xc187, 0xc287, 0xc2c8, 0xc387, 0xc487, 0xc587, 0xc687, 0xc0bd, 0xc787, 0xc887, 0xc987, 0xca87, 0xcb87, 0xcc87, 0xcd87, 0xce87, 0xcf87, 0xd087, 0xd187, 0xd287, 0xd387, 0xd2c4, 0xd487, 0xd587, 0xd687, 0xd787, 0xd887, 0xd987, 0xda87, 0xdb87, 0xdc87, 0xece0, 0xdd87, 0xde87, 0xede0, 0xdf87, 0xe087, 0xf4c7, 0xc4cb, 0xe187, 0xeee0, 0xd8bb, 0xb6d8, 0xf2d2, 0xefe0, 0xc5cd, 0xe287, 0xdab6, 0xe387, 0xe487, 0xe587, 0xe687, 0xe787, 0xe887, 0xf1e0, 0xe987, 0xb0d4, 0xea87, 0xeb87, 0xa7c0, 0xd1b4, 0xec87, 0xed87, 0xa7ce, 0xf0e0, 0xee87, 0xef87, 0xf087, 0xf2e0, 0xccb9, 0xf187, 0xf287, 0xfab9, 0xbccd, 0xf3e0, 0xf387, 0xf487, 0xf587, 0xd4c6, 0xf4e0, 0xf687, 0xb2d4, 0xf787, 0xa6c8, 0xf6e0, 0xf5e0, 0xf887, 0xf987, 0xfa87, 0xfb87, 0xfc87, 0xfd87, 0xfe87, 0x4088, 0x4188, 0x4288, 0x4388, 0x4488, 0x4588, 0x4688, 0x4788, 0x4888, 0x4988, 0xf7e0, 0x4a88, 0x4b88, 0xc1cd, 0x4c88, 0x4d88, 0x4e88, 0xa5ca, 0x4f88, 0x5088, 0x5188, 0x5288, 0xdad4, 0xd7db, 0xd9db, 0x5388, 0xd8db, 0xe7b9, 0xdcdb, 0xdddb, 0xd8b5, 0x5488, 0x5588, 0xdadb, 0x5688, 0x5788, 0x5888, 0x5988, 0x5a88, 0xdbdb, 0xa1b3, 0xdfdb, 0x5b88, 0x5c88, 0xf8bb, 0x5d88, 0xb7d6, 0x5e88, 0xe0db, 0x5f88, 0x6088, 0x6188, 0x6288, 0xf9be, 0x6388, 0x6488, 0xbbb7, 0x6588, 0xd0db, 0xaecc, 0xb2bf, 0xb5bb, 0xf8d7, 0xd3bf, 0x6688, 0x6788, 0x6888, 0x6988, 0x6a88, 0xe9bf, 0x6b88, 0x6c88, 0xe1bc, 0xb3cc, 0xdedb, 0xd3b0, 0xebce, 0xd8b7, 0xb9d7, 0xc2c6, 0x6d88, 0x6e88, 0xa4c0, 0x6f88, 0xb9cc, 0x7088, 0xe7db, 0xe1db, 0xbac6, 0xe3db, 0x7188, 0xe8db, 0x7288, 0xf7c5, 0x7388, 0x7488, 0x7588, 0xeadb, 0x7688, 0x7788, 0xe9db, 0xc0bf, 0x7888, 0x7988, 0x7a88, 0xe6db, 0xe5db, 0x7b88, 0x7c88, 0x7d88, 0x7e88, 0x8088, 0xb9b4, 0xacc0, 0xa2c2, 0xe2db, 0xe4db, 0x8188, 0x8288, 0x8388, 0x8488, 0xcdd0, 0xeddb, 0x8588, 0x8688, 0x8788, 0x8888, 0x8988, 0xddc0, 0xf2db, 0x8a88, 0x8b88, 0x8c88, 0x8d88, 0x8e88, 0x8f88, 0x9088, 0xe2b6, 0x9188, 0x9288, 0x9388, 0x9488, 0xf3db, 0xd2db, 0xb8b9, 0xabd4, 0xecdb, 0x9588, 0xd1bf, 0xf0db, 0x9688, 0xd1db, 0x9788, 0xe6b5, 0x9888, 0xebdb, 0xe5bf, 0x9988, 0x9a88, 0x9b88, 0xeedb, 0x9c88, 0xf1db, 0x9d88, 0x9e88, 0x9f88, 0xf9db, 0xa088, 0xa188, 0xa288, 0xa388, 0xa488, 0xa588, 0xa688, 0xa788, 0xa888, 0xa1b9, 0xa3b0, 0xa988, 0xaa88, 0xab88, 0xac88, 0xad88, 0xae88, 0xaf88, 0xf1c2, 0xb088, 0xb188, 0xc7b3, 0xefdb, 0xb288, 0xb388, 0xf8db, 0xb488, 0xd2c6, 0xf4db, 0xb588, 0xb688, 0xf5db, 0xf7db, 0xf6db, 0xb788, 0xb888, 0xfedb, 0xb988, 0xf2d3, 0xbab2, 0xba88, 0xbb88, 0xbc88, 0xfddb, 0xbd88, 0xbe88, 0xbf88, 0xc088, 0xc188, 0xc288, 0xc388, 0xc488, 0xa4dc, 0xc588, 0xfbdb, 0xc688, 0xc788, 0xc888, 0xc988, 0xfadb, 0xca88, 0xcb88, 0xcc88, 0xfcdb, 0xe0c5, 0xf9bb, 0xcd88, 0xce88, 0xa3dc, 0xcf88, 0xd088, 0xa5dc, 0xd188, 0xc3cc, 0xd288, 0xd388, 0xd488, 0xd1b6, 0xc0dd, 0xd588, 0xd688, 0xd788, 0xa1dc, 0xd888, 0xa2dc, 0xd988, 0xda88, 0xdb88, 0xb5c7, 0xdc88, 0xdd88, 0xde88, 0xe9b6, 0xdf88, 0xe088, 0xe188, 0xa7dc, 0xe288, 0xe388, 0xe488, 0xe588, 0xa6dc, 0xe688, 0xa9dc, 0xa4b1, 0xe788, 0xe888, 0xccb5, 0xe988, 0xea88, 0xeb88, 0xec88, 0xed88, 0xb0bf, 0xee88, 0xef88, 0xf088, 0xf188, 0xf288, 0xdfd1, 0xf388, 0xf488, 0xf588, 0xf688, 0xc2b6, 0xf788, 0xf888, 0xf988, 0xfa88, 0xfb88, 0xfc88, 0xfd88, 0xfe88, 0x4089, 0x4189, 0x4289, 0x4389, 0x4489, 0x4589, 0xa8dc, 0x4689, 0x4789, 0x4889, 0x4989, 0x4a89, 0x4b89, 0x4c89, 0xfacb, 0xf3eb, 0x4d89, 0x4e89, 0x4f89, 0xdccb, 0x5089, 0x5189, 0xfecb, 0x5289, 0x5389, 0x5489, 0xc1cc, 0x5589, 0x5689, 0x5789, 0x5889, 0x5989, 0xfbc8, 0x5a89, 0x5b89, 0x5c89, 0x5d89, 0x5e89, 0x5f89, 0xaadc, 0x6089, 0x6189, 0x6289, 0x6389, 0x6489, 0xeecc, 0xabdc, 0x6589, 0x6689, 0x6789, 0x6889, 0x6989, 0x6a89, 0x6b89, 0x6c89, 0x6d89, 0x6e89, 0x6f89, 0x7089, 0x7189, 0x7289, 0x7389, 0x7489, 0x7589, 0xd3db, 0x7689, 0xafdc, 0xacdc, 0x7789, 0xb3be, 0x7889, 0xfbca, 0x7989, 0x7a89, 0x7b89, 0xaddc, 0x7c89, 0x7d89, 0x7e89, 0x8089, 0x8189, 0x8289, 0x8389, 0x8489, 0xcac9, 0xb9c4, 0x8589, 0x8689, 0x8789, 0x8889, 0x8989, 0xbdc7, 0xaedc, 0x8a89, 0x8b89, 0x8c89, 0xf6d4, 0xe6d0, 0x8d89, 0x8e89, 0x8f89, 0x9089, 0x9189, 0x9289, 0x9389, 0x9489, 0xabc4, 0xd5b6, 0x9589, 0x9689, 0x9789, 0x9889, 0x9989, 0x9a89, 0x9b89, 0x9c89, 0x9d89, 0x9e89, 0x9f89, 0xa089, 0xa189, 0xa289, 0xa389, 0xa489, 0xa589, 0xa689, 0xd4db, 0xa789, 0xa889, 0xa989, 0xaa89, 0xdab1, 0xab89, 0xac89, 0xad89, 0xd5db, 0xae89, 0xaf89, 0xb089, 0xb189, 0xb289, 0xb389, 0xb489, 0xb589, 0xb689, 0xb789, 0xb889, 0xd6db, 0xb989, 0xba89, 0xbb89, 0xbeba, 0xbc89, 0xbd89, 0xbe89, 0xbf89, 0xc089, 0xc189, 0xc289, 0xc389, 0xc489, 0xc589, 0xc689, 0xc789, 0xc889, 0xc989, 0xc0c8, 0xca89, 0xcb89, 0xcc89, 0xcd89, 0xce89, 0xcf89, 0xbfca, 0xc9c8, 0xd089, 0xb3d7, 0xd189, 0xf9c9, 0xd289, 0xd389, 0xc7bf, 0xd489, 0xd589, 0xf8ba, 0xd689, 0xd789, 0xbcd2, 0xd889, 0xd989, 0xda89, 0xdb89, 0xdc89, 0xdd89, 0xde89, 0xdf89, 0xbae2, 0xe089, 0xa6b4, 0xe189, 0xe289, 0xb8b1, 0xe389, 0xe489, 0xe589, 0xe689, 0xe789, 0xb4b8, 0xe889, 0xc4cf, 0xe989, 0xea89, 0xeb89, 0xec89, 0xe7d9, 0xa6cf, 0xe2cd, 0xed89, 0xee89, 0xedd9, 0xe0b6, 0xef89, 0xb9d2, 0xf089, 0xf189, 0xbbb9, 0xf289, 0xf389, 0xf489, 0xf589, 0xb9e2, 0xb7e2, 0xf689, 0xf3b4, 0xf789, 0xeccc, 0xabcc, 0xf2b7, 0xf889, 0xb2d8, 0xebd1, 0xbbba, 0xf989, 0xa7ca, 0xfa89, 0xfb89, 0xb7cd, 0xfc89, 0xfd89, 0xc4d2, 0xe4bf, 0xd0bc, 0xe1b6, 0xfe89, 0xc5de, 0x408a, 0x418a, 0x428a, 0x438a, 0xc6de, 0xbcdb, 0x448a, 0xd9d1, 0x458a, 0x468a, 0xe6c6, 0xcec4, 0xeeb7, 0x478a, 0xdcb7, 0x488a, 0x498a, 0xfcbf, 0xe0d7, 0x4a8a, 0xf5c6, 0x4b8a, 0x4c8a, 0xbcb1, 0xc8de, 0xb1bd, 0xd7cc, 0xcade, 0x4d8a, 0xc9de, 0x4e8a, 0x4f8a, 0x508a, 0x518a, 0x528a, 0xecb5, 0x538a, 0xddc9, 0x548a, 0x558a, 0xc2b0, 0x568a, 0x578a, 0x588a, 0x598a, 0x5a8a, 0x5b8a, 0x5c8a, 0x5d8a, 0x5e8a, 0x5f8a, 0x608a, 0x618a, 0x628a, 0xaec5, 0xabc5, 0x638a, 0xccc4, 0x648a, 0xe9bc, 0xfdcb, 0x658a, 0x668a, 0x678a, 0xc3ba, 0x688a, 0x698a, 0x6a8a, 0xf9e5, 0xe7c8, 0xfae5, 0xfdcd, 0x6b8a, 0xb1d7, 0xbeb8, 0xe8c2, 0x6c8a, 0xd1c8, 0x6d8a, 0x6e8a, 0xfbe5, 0x6f8a, 0x708a, 0x718a, 0x728a, 0xcab6, 0xcbbc, 0x738a, 0x748a, 0xfdd1, 0xa1e6, 0x758a, 0xeec3, 0x768a, 0x778a, 0x788a, 0x798a, 0xa4e6, 0x7a8a, 0x7b8a, 0x7c8a, 0x7d8a, 0xfee5, 0xa5e6, 0xd7cd, 0x7e8a, 0x808a, 0xc1b7, 0xfce5, 0xfde5, 0xa3e6, 0x818a, 0x828a, 0xddc4, 0xa8e6, 0x838a, 0x848a, 0xa7e6, 0x858a, 0x868a, 0x878a, 0x888a, 0x898a, 0x8a8a, 0xc3c3, 0x8b8a, 0xdec6, 0x8c8a, 0x8d8a, 0xaae6, 0x8e8a, 0x8f8a, 0x908a, 0x918a, 0x928a, 0x938a, 0x948a, 0xb7c4, 0x958a, 0x968a, 0x978a, 0xa2e6, 0xbcca, 0x988a, 0x998a, 0x9a8a, 0x9b8a, 0xe3bd, 0xc3b9, 0xa6e6, 0xd5d0, 0xafce, 0x9c8a, 0x9d8a, 0xa9e6, 0xb0e6, 0x9e8a, 0xa6d2, 0x9f8a, 0xaabd, 0xade6, 0xa08a, 0xa18a, 0xa28a, 0xa38a, 0xa48a, 0xafe6, 0xa58a, 0xd1c0, 0xa68a, 0xa78a, 0xccd2, 0xa88a, 0xa98a, 0xaa8a, 0xa7bc, 0xab8a, 0xac8a, 0xad8a, 0xae8a, 0xaf8a, 0xb08a, 0xb18a, 0xb28a, 0xb38a, 0xb48a, 0xb58a, 0xb68a, 0xb1e6, 0xb78a, 0xf6d2, 0xb88a, 0xb98a, 0xba8a, 0xcbd7, 0xbb8a, 0xfecd, 0xbc8a, 0xdecd, 0xa6c2, 0xabe6, 0xace6, 0xbfbd, 0xaee6, 0xb3e6, 0xbd8a, 0xbe8a, 0xb2e6, 0xbf8a, 0xc08a, 0xc18a, 0xc28a, 0xb6e6, 0xc38a, 0xb8e6, 0xc48a, 0xc58a, 0xc68a, 0xc78a, 0xefc4, 0xc88a, 0xc98a, 0xca8a, 0xc8c4, 0xcb8a, 0xcc8a, 0xeabe, 0xefc9, 0xcd8a, 0xce8a, 0xb7e6, 0xcf8a, 0xf0b6, 0xd08a, 0xd18a, 0xd28a, 0xe4c3, 0xd38a, 0xd48a, 0xd58a, 0xd68a, 0xd78a, 0xd88a, 0xd98a, 0xe9d3, 0xb4e6, 0xda8a, 0xb5e6, 0xdb8a, 0xa2c8, 0xdc8a, 0xdd8a, 0xde8a, 0xdf8a, 0xe08a, 0xbde6, 0xe18a, 0xe28a, 0xe38a, 0xb9e6, 0xe48a, 0xe58a, 0xe68a, 0xe78a, 0xe88a, 0xc5c6, 0xe98a, 0xea8a, 0xf1cd, 0xbbe6, 0xeb8a, 0xec8a, 0xed8a, 0xee8a, 0xef8a, 0xf08a, 0xf18a, 0xf28a, 0xf38a, 0xf48a, 0xbce6, 0xf58a, 0xf68a, 0xf78a, 0xf88a, 0xe9bb, 0xf98a, 0xfa8a, 0xfb8a, 0xfc8a, 0xfd8a, 0xfe8a, 0x408b, 0xbee6, 0x418b, 0x428b, 0x438b, 0x448b, 0xbae6, 0x458b, 0x468b, 0xb7c0, 0x478b, 0x488b, 0x498b, 0x4a8b, 0x4b8b, 0x4c8b, 0x4d8b, 0x4e8b, 0x4f8b, 0xa4d3, 0xbfe6, 0xf4c9, 0xc3e6, 0x508b, 0x518b, 0xc4e6, 0x528b, 0x538b, 0x548b, 0x558b, 0xf6d0, 0x568b, 0x578b, 0x588b, 0x598b, 0x5a8b, 0x5b8b, 0x5c8b, 0x5d8b, 0x5e8b, 0x5f8b, 0x608b, 0x618b, 0x628b, 0x638b, 0x648b, 0x658b, 0x668b, 0x678b, 0xbdc3, 0x688b, 0x698b, 0x6a8b, 0x6b8b, 0x6c8b, 0x6d8b, 0x6e8b, 0xc4c3, 0xc2e6, 0x6f8b, 0x708b, 0x718b, 0x728b, 0x738b, 0x748b, 0x758b, 0x768b, 0x778b, 0x788b, 0x798b, 0x7a8b, 0x7b8b, 0x7c8b, 0xc1e6, 0x7d8b, 0x7e8b, 0x808b, 0x818b, 0x828b, 0x838b, 0x848b, 0xc7e6, 0xb1cf, 0x858b, 0xf4eb, 0x868b, 0x878b, 0xcae6, 0x888b, 0x898b, 0x8a8b, 0x8b8b, 0x8c8b, 0xc5e6, 0x8d8b, 0x8e8b, 0xdebc, 0xa9c9, 0x8f8b, 0x908b, 0x918b, 0x928b, 0x938b, 0x948b, 0xb5bc, 0x958b, 0x968b, 0xd3cf, 0x978b, 0x988b, 0x998b, 0x9a8b, 0x9b8b, 0xc8e6, 0x9c8b, 0xc9e6, 0x9d8b, 0xcee6, 0x9e8b, 0xd0e6, 0x9f8b, 0xa08b, 0xa18b, 0xd1e6, 0xa28b, 0xa38b, 0xa48b, 0xcbe6, 0xd5b5, 0xa58b, 0xcce6, 0xa68b, 0xa78b, 0xcfe6, 0xa88b, 0xa98b, 0xdbc4, 0xaa8b, 0xc6e6, 0xab8b, 0xac8b, 0xad8b, 0xae8b, 0xaf8b, 0xcde6, 0xb08b, 0xb18b, 0xb28b, 0xb38b, 0xb48b, 0xb58b, 0xb68b, 0xb78b, 0xb88b, 0xb98b, 0xba8b, 0xbb8b, 0xbc8b, 0xbd8b, 0xbe8b, 0xbf8b, 0xc08b, 0xc18b, 0xc28b, 0xc38b, 0xc48b, 0xc58b, 0xc68b, 0xd2e6, 0xc78b, 0xc88b, 0xc98b, 0xca8b, 0xcb8b, 0xcc8b, 0xcd8b, 0xce8b, 0xcf8b, 0xd08b, 0xd18b, 0xd28b, 0xd4e6, 0xd3e6, 0xd38b, 0xd48b, 0xd58b, 0xd68b, 0xd78b, 0xd88b, 0xd98b, 0xda8b, 0xdb8b, 0xdc8b, 0xdd8b, 0xde8b, 0xdf8b, 0xe08b, 0xe18b, 0xe28b, 0xe38b, 0xe48b, 0xe58b, 0xe68b, 0xe78b, 0xe88b, 0xe98b, 0xea8b, 0xeb8b, 0xec8b, 0xd5e6, 0xed8b, 0xf8d9, 0xee8b, 0xef8b, 0xd6e6, 0xf08b, 0xf18b, 0xf28b, 0xf38b, 0xf48b, 0xf58b, 0xf68b, 0xf78b, 0xd7e6, 0xf88b, 0xf98b, 0xfa8b, 0xfb8b, 0xfc8b, 0xfd8b, 0xfe8b, 0x408c, 0x418c, 0x428c, 0x438c, 0x448c, 0x458c, 0x468c, 0x478c, 0xd3d7, 0xdde6, 0x488c, 0xdee6, 0xd7bf, 0xd0d4, 0x498c, 0xd6d7, 0xe6b4, 0xefcb, 0xdae6, 0xc3d8, 0xced7, 0xa2d0, 0x4a8c, 0xcfc3, 0x4b8c, 0x4c8c, 0xdfe6, 0xbebc, 0xc2b9, 0xdbe6, 0xa7d1, 0x4d8c, 0x4e8c, 0xa2ba, 0xcfc2, 0x4f8c, 0xabd8, 0x508c, 0x518c, 0x528c, 0xebca, 0xeee5, 0x538c, 0xdce6, 0x548c, 0xf5b7, 0x558c, 0x568c, 0x578c, 0x588c, 0xe6c8, 0x598c, 0x5a8c, 0xf5c4, 0x5b8c, 0x5c8c, 0xb2e5, 0xfec4, 0x5d8c, 0xfccb, 0xb3e5, 0xacd5, 0x5e8c, 0xeed3, 0xd8ca, 0xb2b0, 0x5f8c, 0xcecb, 0xeacd, 0x608c, 0x618c, 0xeaba, 0x628c, 0x638c, 0x648c, 0xb5e5, 0x658c, 0xb4e5, 0x668c, 0xdad7, 0xd9b9, 0xe6d6, 0xa8b6, 0xf0cd, 0xcbd2, 0xa6b1, 0xb5ca, 0x678c, 0xe8b3, 0xf3c9, 0xcdbf, 0xfbd0, 0xd2ca, 0xb6e5, 0xc2bb, 0x688c, 0x698c, 0x6a8c, 0xdccf, 0xacb9, 0x6b8c, 0x6c8c, 0x6d8c, 0x6e8c, 0xd7d4, 0x6f8c, 0x708c, 0xa6ba, 0xe7d1, 0xfccf, 0xd2bc, 0x718c, 0xb7e5, 0xddc8, 0x728c, 0x738c, 0x748c, 0xedbf, 0xf6b1, 0xdecb, 0x758c, 0x768c, 0xc5bc, 0x778c, 0xc4bc, 0xfad2, 0xdcc3, 0xdcbf, 0x788c, 0x798c, 0x7a8c, 0x7b8c, 0xbbb8, 0x7c8c, 0x7d8c, 0x7e8c, 0xc2c3, 0x808c, 0xaeba, 0xa2d4, 0x818c, 0x828c, 0x838c, 0x848c, 0x858c, 0x868c, 0x878c, 0x888c, 0x898c, 0xdec7, 0xafc4, 0xecb2, 0x8a8c, 0xd1b9, 0x8b8c, 0x8c8c, 0xbbe5, 0xc8c1, 0x8d8c, 0x8e8c, 0xafd5, 0x8f8c, 0x908c, 0x918c, 0x928c, 0x938c, 0xbce5, 0x948c, 0xbee5, 0x958c, 0x968c, 0x978c, 0x988c, 0x998c, 0x9a8c, 0x9b8c, 0xe7b4, 0xd4b6, 0xc2cb, 0xb0d1, 0xbcb5, 0x9c8c, 0x9d8c, 0xd9ca, 0x9e8c, 0xe2b7, 0x9f8c, 0xa08c, 0xe4c9, 0xa18c, 0xabbd, 0xa28c, 0xa38c, 0xbece, 0xf0d7, 0xa48c, 0xa58c, 0xa68c, 0xa78c, 0xa1d0, 0xa88c, 0xd9c9, 0xa98c, 0xaa8c, 0xfbb6, 0xd8e6, 0xe2bc, 0xab8c, 0xbeb3, 0xac8c, 0xd0c9, 0xad8c, 0xd9e6, 0xa2b3, 0xae8c, 0xaf8c, 0xb08c, 0xb18c, 0xccde, 0xb28c, 0xc8d3, 0xcdde, 0xb38c, 0xa2d2, 0xb48c, 0xb58c, 0xb68c, 0xb78c, 0xcede, 0xb88c, 0xb98c, 0xba8c, 0xbb8c, 0xcdbe, 0xbc8c, 0xbd8c, 0xcfde, 0xbe8c, 0xbf8c, 0xc08c, 0xacca, 0xfcd2, 0xdfb3, 0xeae5, 0xe1c4, 0xa1be, 0xb2ce, 0xf2c4, 0xd6be, 0xa8c6, 0xe3b2, 0xc18c, 0xc28c, 0xd3be, 0xc38c, 0xc48c, 0xfcc7, 0xebcc, 0xecbd, 0xddce, 0xc58c, 0xc68c, 0xbaca, 0xc1c6, 0xece5, 0xbcd0, 0xc78c, 0xc88c, 0xc98c, 0xb9d5, 0xca8c, 0xcb8c, 0xcc8c, 0xede5, 0xcd8c, 0xce8c, 0xcf8c, 0xd08c, 0xf4ca, 0xd18c, 0xc0cd, 0xc5c2, 0xd28c, 0xefe5, 0xd38c, 0xc4c2, 0xf0e5, 0xd48c, 0xd58c, 0xd68c, 0xd78c, 0xd88c, 0xd98c, 0xda8c, 0xf8e5, 0xcdcd, 0xdb8c, 0xbdc9, 0xdc8c, 0xdd8c, 0xde8c, 0xdf8c, 0xe08c, 0xe18c, 0xe28c, 0xd9d2, 0xa8e1, 0xe38c, 0xe48c, 0xe58c, 0xe68c, 0xecd3, 0xe78c, 0xeacb, 0xf1c6, 0xe88c, 0xe98c, 0xea8c, 0xeb8c, 0xec8c, 0xace1, 0xed8c, 0xee8c, 0xef8c, 0xa7e1, 0xa9e1, 0xf08c, 0xf18c, 0xaae1, 0xafe1, 0xf28c, 0xf38c, 0xedb2, 0xf48c, 0xabe1, 0xdab8, 0xade1, 0xaee1, 0xb0e1, 0xbab5, 0xb1e1, 0xf58c, 0xf68c, 0xf78c, 0xf88c, 0xf98c, 0xb3e1, 0xb8e1, 0xfa8c, 0xfb8c, 0xfc8c, 0xfd8c, 0xfe8c, 0xd2d1, 0x408d, 0xb6e1, 0xb5e1, 0xebc1, 0x418d, 0x428d, 0x438d, 0xb7e1, 0x448d, 0xc0d4, 0x458d, 0xb2e1, 0x468d, 0xbae1, 0xb6b0, 0x478d, 0x488d, 0x498d, 0x4a8d, 0xb4e1, 0x4b8d, 0xf9bf, 0x4c8d, 0xb9e1, 0x4d8d, 0x4e8d, 0xbbe1, 0x4f8d, 0x508d, 0x518d, 0x528d, 0x538d, 0x548d, 0xbee1, 0x558d, 0x568d, 0x578d, 0x588d, 0x598d, 0x5a8d, 0xbce1, 0x5b8d, 0x5c8d, 0x5d8d, 0x5e8d, 0x5f8d, 0x608d, 0xc5d6, 0x618d, 0x628d, 0x638d, 0x648d, 0x658d, 0x668d, 0x678d, 0xbfcf, 0x688d, 0x698d, 0xbde1, 0xbfe1, 0xcdc2, 0x6a8d, 0xebb6, 0x6b8d, 0xf8d3, 0x6c8d, 0x6d8d, 0xcdc7, 0x6e8d, 0x6f8d, 0xe5b7, 0x708d, 0x718d, 0x728d, 0x738d, 0x748d, 0x758d, 0x768d, 0x778d, 0x788d, 0x798d, 0xfebe, 0x7a8d, 0x7b8d, 0x7c8d, 0x7d8d, 0x7e8d, 0x808d, 0xc0e1, 0xc1e1, 0x818d, 0x828d, 0xc7e1, 0xe7b3, 0x838d, 0x848d, 0x858d, 0x868d, 0x878d, 0x888d, 0xe9c6, 0x898d, 0x8a8d, 0x8b8d, 0x8c8d, 0x8d8d, 0xdeb4, 0x8e8d, 0xc2d1, 0x8f8d, 0x908d, 0x918d, 0x928d, 0xc8e1, 0x938d, 0x948d, 0xc6e1, 0x958d, 0x968d, 0x978d, 0x988d, 0x998d, 0xc5e1, 0x9a8d, 0xc3e1, 0xc2e1, 0x9b8d, 0xc0b1, 0x9c8d, 0x9d8d, 0x9e8d, 0xb8d5, 0xc4e1, 0x9f8d, 0xa08d, 0xa18d, 0xa28d, 0xa38d, 0xcbe1, 0xa48d, 0xa58d, 0xa68d, 0xa78d, 0xa88d, 0xa98d, 0xaa8d, 0xab8d, 0xcce1, 0xcae1, 0xac8d, 0xad8d, 0xae8d, 0xaf8d, 0xb08d, 0xb18d, 0xb28d, 0xb38d, 0xfaef, 0xb48d, 0xb58d, 0xd3e1, 0xd2e1, 0xb6c7, 0xb68d, 0xb78d, 0xb88d, 0xb98d, 0xba8d, 0xbb8d, 0xbc8d, 0xbd8d, 0xbe8d, 0xbf8d, 0xc08d, 0xc9e1, 0xc18d, 0xc28d, 0xcee1, 0xc38d, 0xd0e1, 0xc48d, 0xc58d, 0xc68d, 0xc78d, 0xc88d, 0xc98d, 0xca8d, 0xcb8d, 0xcc8d, 0xcd8d, 0xce8d, 0xd4e1, 0xcf8d, 0xd1e1, 0xcde1, 0xd08d, 0xd18d, 0xcfe1, 0xd28d, 0xd38d, 0xd48d, 0xd58d, 0xd5e1, 0xd68d, 0xd78d, 0xd88d, 0xd98d, 0xda8d, 0xdb8d, 0xdc8d, 0xdd8d, 0xde8d, 0xdf8d, 0xe08d, 0xe18d, 0xe28d, 0xd6e1, 0xe38d, 0xe48d, 0xe58d, 0xe68d, 0xe78d, 0xe88d, 0xe98d, 0xea8d, 0xeb8d, 0xec8d, 0xed8d, 0xee8d, 0xef8d, 0xf08d, 0xf18d, 0xf28d, 0xf38d, 0xf48d, 0xf58d, 0xf68d, 0xf78d, 0xf88d, 0xd7e1, 0xf98d, 0xfa8d, 0xfb8d, 0xd8e1, 0xfc8d, 0xfd8d, 0xfe8d, 0x408e, 0x418e, 0x428e, 0x438e, 0x448e, 0x458e, 0x468e, 0x478e, 0x488e, 0x498e, 0x4a8e, 0x4b8e, 0x4c8e, 0x4d8e, 0x4e8e, 0x4f8e, 0x508e, 0x518e, 0x528e, 0x538e, 0x548e, 0x558e, 0xdae1, 0x568e, 0x578e, 0x588e, 0x598e, 0x5a8e, 0x5b8e, 0x5c8e, 0x5d8e, 0x5e8e, 0x5f8e, 0x608e, 0x618e, 0x628e, 0xdbe1, 0x638e, 0x648e, 0x658e, 0x668e, 0x678e, 0x688e, 0x698e, 0xa1ce, 0x6a8e, 0x6b8e, 0x6c8e, 0x6d8e, 0x6e8e, 0x6f8e, 0x708e, 0x718e, 0x728e, 0x738e, 0x748e, 0x758e, 0x768e, 0xdde7, 0x778e, 0xa8b4, 0xddd6, 0x788e, 0x798e, 0xb2d1, 0xb2b3, 0x7a8e, 0x7b8e, 0xa4b9, 0xf3d7, 0xc9c7, 0xdebe, 0xaeb9, 0x7c8e, 0xd7ce, 0x7d8e, 0x7e8e, 0xeeb2, 0xcfdb, 0x808e, 0xbabc, 0xd1d2, 0xc8cb, 0xcdb0, 0x818e, 0x828e, 0xefcf, 0x838e, 0x848e, 0x858e, 0x868e, 0x878e, 0xe3d9, 0xedbd, 0x888e, 0x898e, 0xd2b1, 0xd0ca, 0xbcb2, 0x8a8e, 0xa7cb, 0xabb7, 0x8b8e, 0xa6ca, 0x8c8e, 0x8d8e, 0x8e8e, 0xa3cf, 0x8f8e, 0x908e, 0xf8e0, 0xcad5, 0xfbe0, 0x918e, 0x928e, 0xfae0, 0xc1c5, 0xfbcc, 0x938e, 0xb1c1, 0xf9e0, 0xe3d6, 0xafb2, 0xc4d6, 0xdbb5, 0x948e, 0x958e, 0x968e, 0x978e, 0x988e, 0x998e, 0x9a8e, 0x9b8e, 0xf8b4, 0xa1d6, 0x9c8e, 0x9d8e, 0x9e8e, 0x9f8e, 0xa08e, 0xafcf, 0xefb0, 0xa18e, 0xa28e, 0xfce0, 0xa38e, 0xa48e, 0xa58e, 0xa68e, 0xa78e, 0xa1e1, 0xa3b3, 0xa88e, 0xa98e, 0xfde0, 0xfee0, 0xb1c3, 0xaa8e, 0xab8e, 0xac8e, 0xad8e, 0xddc3, 0xae8e, 0xa2e1, 0xf9b7, 0xaf8e, 0xb08e, 0xb18e, 0xb28e, 0xb38e, 0xb48e, 0xcfbb, 0xb58e, 0xb68e, 0xb78e, 0xb88e, 0xb98e, 0xba8e, 0xbb8e, 0xa3e1, 0xbbc4, 0xbc8e, 0xbd8e, 0xbe8e, 0xbf8e, 0xc08e, 0xa4e1, 0xc18e, 0xc28e, 0xa5e1, 0xc38e, 0xc48e, 0xa6e1, 0xb1b4, 0xc58e, 0xc68e, 0xc78e, 0xc88e, 0xc98e, 0xca8e, 0xcb8e, 0xcc8e, 0xcd8e, 0xce8e, 0xcf8e, 0xd08e, 0xd18e, 0xd28e, 0xd38e, 0xc9b8, 0xbdc6, 0xeac4, 0xd48e, 0xa2b2, 0xd58e, 0xd2d0, 0xd68e, 0xdbe7, 0xc3bb, 0xd7d3, 0xc4d3, 0xd78e, 0xe3b9, 0xcfe2, 0xd88e, 0xd98e, 0xda8e, 0xafd7, 0xdb8e, 0xecc7, 0xd3b1, 0xdc8e, 0xdd8e, 0xb2b4, 0xd1e2, 0xde8e, 0xdf8e, 0xe08e, 0xf2d0, 0xaec2, 0xd0e2, 0xe18e, 0xe2bf, 0xa6d3, 0xd7b5, 0xd2e2, 0xeab5, 0xe28e, 0xedc3, 0xfdb8, 0xe38e, 0xaeb8, 0xe48e, 0xd3c5, 0xcfb7, 0xd4e2, 0xe58e, 0xe68e, 0xe78e, 0xe88e, 0xd3e2, 0xc8b6, 0xf9d7, 0xe98e, 0xea8e, 0xeb8e, 0xec8e, 0xed8e, 0xa5cd, 0xee8e, 0xef8e, 0xf08e, 0xf18e, 0xf28e, 0xd8e2, 0xf38e, 0xd6e2, 0xfcca, 0xb5bf, 0xb9d3, 0xd5e2, 0xf48e, 0xf58e, 0xf68e, 0xf78e, 0xd7e2, 0xf88e, 0xf98e, 0xfa8e, 0xfb8e, 0xfc8e, 0xfd8e, 0xfe8e, 0x408f, 0x418f, 0x428f, 0xaec1, 0xc8c0, 0x438f, 0x448f, 0x458f, 0x468f, 0x478f, 0x488f, 0xdbe2, 0xdae2, 0xaac0, 0x498f, 0x4a8f, 0xcec1, 0x4b8f, 0x4c8f, 0x4d8f, 0x4e8f, 0xdce2, 0x4f8f, 0x508f, 0x518f, 0x528f, 0x538f, 0x548f, 0x558f, 0x568f, 0x578f, 0x588f, 0x598f, 0x5a8f, 0xdde2, 0x5b8f, 0xdee2, 0x5c8f, 0x5d8f, 0x5e8f, 0x5f8f, 0x608f, 0x618f, 0x628f, 0x638f, 0x648f, 0xc8db, 0x658f, 0xd3d1, 0xa2cd, 0x668f, 0x678f, 0xa8bd, 0x688f, 0x698f, 0x6a8f, 0xc3de, 0xa5d8, 0xaabf, 0xcddb, 0xecd2, 0xfac6, 0xaac5, 0x6b8f, 0x6c8f, 0x6d8f, 0xc4de, 0x6e8f, 0xd7b1, 0xaedf, 0x6f8f, 0x708f, 0x718f, 0xbdca, 0x728f, 0xb1df, 0x738f, 0xadb9, 0x748f, 0xfdd2, 0x758f, 0xa5b8, 0xebba, 0x768f, 0x778f, 0xdab3, 0x788f, 0x798f, 0x7a8f, 0xdcb5, 0xc5d5, 0x7b8f, 0x7c8f, 0x7d8f, 0x7e8f, 0xd6c3, 0xd2cf, 0xa1bb, 0x808f, 0xf3e5, 0xf2e5, 0x818f, 0x828f, 0xf4e5, 0x838f, 0xe4cd, 0x848f, 0xf5c8, 0x858f, 0x868f, 0x878f, 0x888f, 0x898f, 0x8a8f, 0x8b8f, 0xafb5, 0xbfc7, 0x8c8f, 0xf6e5, 0x8d8f, 0x8e8f, 0x8f8f, 0xb0ec, 0x908f, 0x918f, 0x928f, 0x938f, 0x948f, 0x958f, 0x968f, 0x978f, 0x988f, 0x998f, 0x9a8f, 0x9b8f, 0x9c8f, 0x9d8f, 0x9e8f, 0xe6e5, 0x9f8f, 0xe9b9, 0xb1b5, 0xa08f, 0xbcc2, 0xe8e5, 0xe7e5, 0xe9e5, 0xa18f, 0xa28f, 0xa38f, 0xa48f, 0xcdd2, 0xa58f, 0xa68f, 0xa78f, 0xeae1, 0xced0, 0xa88f, 0xaecd, 0xa98f, 0xe5d1, 0xaa8f, 0xab8f, 0xcab2, 0xebb1, 0xac8f, 0xf2b1, 0xedc5, 0xad8f, 0xae8f, 0xc3d5, 0xb0d3, 0xaf8f, 0xdce1, 0xb08f, 0xb18f, 0xb28f, 0xdde1, 0xb38f, 0xdbd2, 0xb48f, 0xb9b3, 0xcbb1, 0xb58f, 0xb68f, 0xb78f, 0xf9cd, 0xf7d5, 0xdee1, 0xb88f, 0xb6be, 0xfdb4, 0xb98f, 0xdfe1, 0xdcba, 0xe0e1, 0xb2bb, 0xc9c2, 0xe1e1, 0xba8f, 0xbb8f, 0xbc8f, 0xecd0, 0xbd8f, 0xbdcd, 0xbe8f, 0xbf8f, 0xe2e1, 0xc08f, 0xc3b5, 0xc7c5, 0xe3e1, 0xc18f, 0xc28f, 0xe4e1, 0xc38f, 0xc48f, 0xc58f, 0xc68f, 0xf9d3, 0xc78f, 0xc88f, 0xc98f, 0xca8f, 0xcb8f, 0xcc8f, 0xe5e1, 0xcd8f, 0xadd1, 0xce8f, 0xcf8f, 0xe6e1, 0xa2ce, 0xd08f, 0xd18f, 0xd28f, 0xd38f, 0xd48f, 0xd58f, 0xe7e1, 0xd68f, 0xc2b5, 0xd78f, 0xd88f, 0xd98f, 0xda8f, 0xe8e1, 0xd5bb, 0xdb8f, 0xdc8f, 0xdd8f, 0xde8f, 0xdf8f, 0xc4d0, 0xe0e2, 0xd8b1, 0xe4d2, 0xe08f, 0xe18f, 0xe1e2, 0xe28f, 0xe38f, 0xc9bc, 0xccc8, 0xe48f, 0xe3e2, 0xfeec, 0xfdec, 0xafdf, 0xe58f, 0xe68f, 0xe78f, 0xe2e2, 0xbed6, 0xfccd, 0xa6c3, 0xe88f, 0xe98f, 0xea8f, 0xc3e3, 0xeb8f, 0xec8f, 0xd2d6, 0xe7e2, 0xed8f, 0xee8f, 0xe8e2, 0xef8f, 0xf08f, 0xc7d3, 0xf18f, 0xf28f, 0xece2, 0xecbf, 0xf38f, 0xede2, 0xe5e2, 0xf48f, 0xf58f, 0xc0b3, 0xf68f, 0xf78f, 0xf88f, 0xeec4, 0xf98f, 0xfa8f, 0xeee2, 0xfb8f, 0xfc8f, 0xc3d0, 0xfd8f, 0xf6ba, 0xe9e2, 0xdeb7, 0xb3bb, 0xaccc, 0xcbcb, 0xe4e2, 0xe6e2, 0xeae2, 0xebe2, 0xfe8f, 0x4090, 0x4190, 0xf7e2, 0x4290, 0x4390, 0xf4e2, 0xf5d4, 0xf3e2, 0x4490, 0x4590, 0xadc5, 0x4690, 0xfad5, 0xc2c5, 0xc0b2, 0x4790, 0x4890, 0xefe2, 0x4990, 0xf2e2, 0xafc1, 0xbccb, 0x4a90, 0x4b90, 0xa1b5, 0xf9e2, 0x4c90, 0x4d90, 0x4e90, 0xb1bc, 0xf1e2, 0xd4d0, 0xb9d4, 0xf5e2, 0xd6b9, 0xf6e2, 0x4f90, 0x5090, 0x5190, 0xd3c7, 0x5290, 0x5390, 0x5490, 0x5590, 0x5690, 0xf0e2, 0x5790, 0x5890, 0x5990, 0x5a90, 0x5b90, 0xdcd7, 0xa1ed, 0x5c90, 0x5d90, 0xf8e2, 0x5e90, 0xa5ed, 0xfee2, 0xd1ca, 0x5f90, 0x6090, 0x6190, 0x6290, 0x6390, 0x6490, 0x6590, 0xb5c1, 0x6690, 0xd0bb, 0x6790, 0x6890, 0xd6bf, 0x6990, 0xe3ba, 0x6a90, 0x6b90, 0xa1cb, 0x6c90, 0x6d90, 0x6e90, 0xa6ed, 0xa3ed, 0x6f90, 0x7090, 0xa2ed, 0x7190, 0x7290, 0x7390, 0x7490, 0xd6bb, 0xa7ed, 0xf4d0, 0x7590, 0x7690, 0xa4ed, 0xdeba, 0xf7b6, 0xa1e3, 0xb2b6, 0xf1cc, 0xa7b9, 0x7790, 0xa2cf, 0xa1c7, 0x7890, 0x7990, 0xd2bf, 0x7a90, 0x7b90, 0xf1b6, 0x7c90, 0xfae2, 0xfbe2, 0xfde2, 0xfce2, 0xd5c4, 0xa2e3, 0x7d90, 0xc1d3, 0x7e90, 0x8090, 0x8190, 0xa7e3, 0xc4c7, 0x8290, 0x8390, 0x8490, 0x8590, 0xa4cf, 0x8690, 0x8790, 0xa9e3, 0xb7ba, 0x8890, 0x8990, 0x8a90, 0x8b90, 0xa8e3, 0x8c90, 0xdabb, 0x8d90, 0xa3e3, 0x8e90, 0x8f90, 0x9090, 0xa4e3, 0xaae3, 0x9190, 0xa6e3, 0x9290, 0xf2ce, 0xc6d3, 0x9390, 0x9490, 0xbcbb, 0x9590, 0x9690, 0xc3d4, 0x9790, 0xfac4, 0x9890, 0x9990, 0xa8ed, 0xfcd0, 0xa5e3, 0x9a90, 0xf5c3, 0x9b90, 0xade3, 0xafb1, 0x9c90, 0xb2e3, 0x9d90, 0x9e90, 0x9f90, 0xc2bc, 0xa090, 0xa190, 0xace3, 0xbfb5, 0xa290, 0xa390, 0xa490, 0xa590, 0xa690, 0xa790, 0xa890, 0xa990, 0xe9c7, 0xb0e3, 0xaa90, 0xab90, 0xac90, 0xaabe, 0xefcd, 0xad90, 0xae90, 0xaf90, 0xb090, 0xb190, 0xf3bb, 0xb290, 0xb390, 0xb490, 0xe8cc, 0xb590, 0xb690, 0xafe3, 0xb790, 0xb1e3, 0xb890, 0xa7cf, 0xaee3, 0xb990, 0xa9ce, 0xddbb, 0xba90, 0xbb90, 0xbc90, 0xbd90, 0xbe90, 0xebb5, 0xe5be, 0xd2b2, 0xcdb3, 0xbf90, 0xb9b1, 0xabe3, 0xd1b2, 0xacb5, 0xdfb9, 0xe8b6, 0xc090, 0xc190, 0xebcf, 0xb7e3, 0xc290, 0xccbb, 0xc390, 0xc490, 0xc7c8, 0xcad0, 0xc590, 0xc690, 0xc790, 0xc890, 0xc990, 0xb8e3, 0xeeb3, 0xca90, 0xcb90, 0xcc90, 0xcd90, 0xa9ed, 0xce90, 0xfad3, 0xe4d3, 0xcf90, 0xd090, 0xd190, 0xaaed, 0xb9e3, 0xe2d2, 0xd290, 0xd390, 0xd490, 0xd590, 0xd690, 0xb5e3, 0xd790, 0xd890, 0xd990, 0xda90, 0xded3, 0xdb90, 0xdc90, 0xdd90, 0xde90, 0xd0b8, 0xb3e3, 0xdf90, 0xe090, 0xb6e3, 0xdfb7, 0xe190, 0xb4e3, 0xa2c0, 0xe290, 0xe390, 0xe490, 0xbae3, 0xe590, 0xe690, 0xe790, 0xe890, 0xe990, 0xea90, 0xeb90, 0xec90, 0xed90, 0xee90, 0xef90, 0xf090, 0xf190, 0xf290, 0xf390, 0xf490, 0xf590, 0xf690, 0xf790, 0xb8d4, 0xf890, 0xf990, 0xfa90, 0xfb90, 0xfc90, 0xfd90, 0xfe90, 0x4091, 0xc8b4, 0x4191, 0xbbe3, 0x4291, 0xc5bb, 0x4391, 0xf7c9, 0x4491, 0x4591, 0xe5c9, 0x4691, 0x4791, 0x4891, 0xbdc4, 0x4991, 0x4a91, 0x4b91, 0x4c91, 0x4d91, 0x4e91, 0x4f91, 0xabed, 0x5091, 0x5191, 0x5291, 0x5391, 0xfdc2, 0x5491, 0x5591, 0x5691, 0x5791, 0xdbbb, 0xaebf, 0x5891, 0x5991, 0x5a91, 0x5b91, 0x5c91, 0x5d91, 0x5e91, 0xbfce, 0x5f91, 0x6091, 0x6191, 0x6291, 0xbce3, 0x6391, 0xb6bf, 0x6491, 0x6591, 0x6691, 0x6791, 0x6891, 0x6991, 0x6a91, 0x6b91, 0x6c91, 0x6d91, 0x6e91, 0x6f91, 0x7091, 0x7191, 0x7291, 0x7391, 0x7491, 0x7591, 0x7691, 0xefb1, 0x7791, 0x7891, 0xf7d4, 0x7991, 0x7a91, 0x7b91, 0x7c91, 0x7d91, 0xbee3, 0x7e91, 0x8091, 0x8191, 0x8291, 0x8391, 0x8491, 0x8591, 0x8691, 0xaded, 0x8791, 0x8891, 0x8991, 0x8a91, 0x8b91, 0x8c91, 0x8d91, 0x8e91, 0x8f91, 0xbfe3, 0xa9ba, 0xaced, 0x9091, 0x9191, 0xbde3, 0x9291, 0x9391, 0x9491, 0x9591, 0x9691, 0x9791, 0x9891, 0x9991, 0x9a91, 0x9b91, 0xc0e3, 0x9c91, 0x9d91, 0x9e91, 0x9f91, 0xa091, 0xa191, 0xb6ba, 0xa291, 0xa391, 0xa491, 0xaeb6, 0xa591, 0xa691, 0xa791, 0xa891, 0xa991, 0xb8d0, 0xaa91, 0xc3b0, 0xaeed, 0xab91, 0xac91, 0xad91, 0xae91, 0xaf91, 0xafed, 0xc1c0, 0xb091, 0xc1e3, 0xb191, 0xb291, 0xb391, 0xb491, 0xb591, 0xb691, 0xb791, 0xb891, 0xb991, 0xba91, 0xbb91, 0xbc91, 0xbd91, 0xbe91, 0xbf91, 0xc091, 0xc191, 0xb3c5, 0xc291, 0xc391, 0xc491, 0xc591, 0xc691, 0xc791, 0xc891, 0xc991, 0xca91, 0xcb91, 0xcc91, 0xcd91, 0xce91, 0xcf91, 0xc2e3, 0xd091, 0xd191, 0xd291, 0xd391, 0xd491, 0xd591, 0xd691, 0xd791, 0xd891, 0xb2dc, 0xd991, 0xda91, 0xdb91, 0xdc91, 0xdd91, 0xde91, 0xb0ed, 0xdf91, 0xeab8, 0xe091, 0xecce, 0xa7ea, 0xe7d0, 0xf9ca, 0xd6c8, 0xb7cf, 0xc9b3, 0xd2ce, 0xe4bd, 0xe191, 0xe291, 0xdee3, 0xf2bb, 0xa8ea, 0xbdd5, 0xe391, 0xddc6, 0xa9ea, 0xe491, 0xe591, 0xe691, 0xaaea, 0xe791, 0xacea, 0xabea, 0xe891, 0xaeea, 0xadea, 0xe991, 0xea91, 0xeb91, 0xec91, 0xd8bd, 0xed91, 0xafea, 0xee91, 0xbec2, 0xef91, 0xf091, 0xf191, 0xf291, 0xc1b4, 0xf7b4, 0xf391, 0xf491, 0xa7bb, 0xf591, 0xf691, 0xf791, 0xf891, 0xf991, 0xe6ec, 0xe5ec, 0xbfb7, 0xf9cb, 0xe2b1, 0xfa91, 0xe7ec, 0xfb91, 0xfc91, 0xfd91, 0xc8c9, 0xe8ec, 0xe9ec, 0xfe91, 0xd6ca, 0xd0de, 0xc5b2, 0xfad4, 0x4092, 0x4192, 0xcbc6, 0xc7b0, 0xf2b4, 0xd3c8, 0x4292, 0x4392, 0x4492, 0xd0cd, 0x4592, 0x4692, 0xb8bf, 0x4792, 0x4892, 0x4992, 0x4a92, 0x4b92, 0x4c92, 0x4d92, 0xdbbf, 0x4e92, 0x4f92, 0xa4c7, 0xb4d6, 0x5092, 0xa9c0, 0xd1de, 0xa8c9, 0xefd1, 0xa4c5, 0xe7b0, 0xb6b3, 0xc5c8, 0x5192, 0x5292, 0xe2b0, 0x5392, 0x5492, 0xf6b7, 0x5592, 0x5692, 0xfac5, 0x5792, 0x5892, 0xf3b6, 0x5992, 0xd2d5, 0xd0b3, 0xbcbc, 0x5a92, 0x5b92, 0x5c92, 0xadb3, 0x5d92, 0x5e92, 0x5f92, 0x6092, 0xf1be, 0xd1b0, 0x6192, 0x6292, 0x6392, 0x6492, 0x6592, 0x6692, 0xd6d2, 0xe3ca, 0xa5d7, 0x6792, 0xb6cd, 0xb6b6, 0xb9bf, 0xdbd5, 0x6892, 0xa7b8, 0xd7c5, 0x6992, 0x6a92, 0x6b92, 0xd2de, 0xd9bf, 0xd5c2, 0xc0c7, 0x6c92, 0xa4bb, 0xa8b1, 0x6d92, 0x6e92, 0xeac5, 0x6f92, 0x7092, 0xfbc5, 0xa7cc, 0x7192, 0x7292, 0x7392, 0x7492, 0xa7b1, 0x7592, 0x7692, 0x7792, 0xd6b5, 0x7892, 0x7992, 0x7a92, 0xa8c4, 0x7b92, 0xd3de, 0xbad1, 0xe9b3, 0x7c92, 0xf2c3, 0x7d92, 0x7e92, 0xf7b7, 0x8092, 0xf4d6, 0xa3b5, 0xf0b2, 0xb4c4, 0xe9c4, 0xadc0, 0xd4de, 0x8192, 0xe8b0, 0xc4c5, 0xe0c1, 0x8292, 0xd5b9, 0x8392, 0xdcbe, 0xd8cd, 0xceb0, 0x8492, 0xcfcd, 0xd6de, 0xd0be, 0xbed7, 0xd5de, 0xd0d5, 0xddb0, 0x8592, 0x8692, 0xe2c4, 0x8792, 0x8892, 0xa3c2, 0xf0bc, 0x8992, 0xb5d3, 0xb9c0, 0xa1c5, 0xa6b2, 0xf1d4, 0x8a92, 0x8b92, 0xa8c0, 0xc3ca, 0xd7de, 0xfcd5, 0x8c92, 0xb0b9, 0x8d92, 0xadc8, 0xa9cb, 0x8e92, 0xd9de, 0xbdbf, 0x8f92, 0x9092, 0x9192, 0x9292, 0xb4c6, 0xa7d7, 0xb0ca, 0xc3c4, 0x9392, 0xd6b3, 0xd2b9, 0x9492, 0x9592, 0x9692, 0x9792, 0xb8d6, 0xfcea, 0xb4b0, 0x9892, 0x9992, 0x9a92, 0x9b92, 0xe6bf, 0x9c92, 0x9d92, 0xf4cc, 0x9e92, 0x9f92, 0xa092, 0xa192, 0xdacd, 0xa292, 0xa392, 0xa492, 0xbfd6, 0xcec2, 0xa592, 0xcece, 0xa2cc, 0xaed0, 0xd3c4, 0xb2b5, 0xd8de, 0xf5d5, 0xb7bc, 0xd3bb, 0xa692, 0xa792, 0xa4b0, 0xa892, 0xb2c5, 0xecb4, 0xa992, 0xaa92, 0xab92, 0xf1d5, 0xac92, 0xad92, 0xfdea, 0xae92, 0xaf92, 0xb092, 0xb192, 0xb292, 0xb392, 0xdade, 0xa6cd, 0xb492, 0xb592, 0xeccd, 0xb692, 0xb792, 0xb892, 0xb992, 0xe6ce, 0xdcde, 0xba92, 0xb1cd, 0xa6c0, 0xbb92, 0xbc92, 0xbdd7, 0xbd92, 0xdbde, 0xc6b0, 0xb4ba, 0xd3c9, 0xf3c4, 0xe8be, 0xbe92, 0xbf92, 0xc092, 0xc192, 0xb6b2, 0xc292, 0xc392, 0xc492, 0xc592, 0xc692, 0xc792, 0xc892, 0xc992, 0xccc0, 0xf0cb, 0xca92, 0xf1bc, 0xbbbb, 0xb7b5, 0xcb92, 0xcc92, 0xcd92, 0xf5c5, 0xce92, 0xe6de, 0xcf92, 0xd092, 0xd192, 0xe3de, 0xddbe, 0xd292, 0xd392, 0xdfde, 0xd492, 0xd592, 0xd692, 0xd792, 0xb7b4, 0xddbd, 0xd892, 0xd992, 0xe0de, 0xedc4, 0xda92, 0xdb92, 0xdc92, 0xdd92, 0xc6cf, 0xde92, 0xe0b5, 0xdf92, 0xe092, 0xe192, 0xe292, 0xdeb6, 0xdaca, 0xf4b5, 0xe5de, 0xe392, 0xc6d5, 0xe492, 0xe1de, 0xcdcc, 0xfec6, 0xe592, 0xc5c5, 0xe692, 0xe792, 0xe892, 0xb4d2, 0xe992, 0xf2be, 0xea92, 0xeb92, 0xec92, 0xed92, 0xee92, 0xef92, 0xf092, 0xd3c2, 0xf192, 0xbdcc, 0xb8b3, 0xf292, 0xd3bd, 0xf392, 0xd8bf, 0xc6cd, 0xdad1, 0xebb4, 0xf492, 0xe4de, 0xddde, 0xe7de, 0xf592, 0xfeea, 0xf692, 0xf792, 0xb0c2, 0xe2de, 0xf892, 0xf992, 0xc0d6, 0xa7b5, 0xfa92, 0xf4b2, 0xfb92, 0xe8de, 0xfc92, 0xf2de, 0xfd92, 0xfe92, 0x4093, 0x4193, 0x4293, 0xedde, 0x4393, 0xf1de, 0x4493, 0x4593, 0xe0c8, 0x4693, 0x4793, 0x4893, 0xe1d7, 0xefde, 0xe8c3, 0xe1cc, 0x4993, 0xe5b2, 0x4a93, 0x4b93, 0x4c93, 0xbed2, 0x4d93, 0x4e93, 0x4f93, 0x5093, 0x5193, 0x5293, 0x5393, 0xeede, 0x5493, 0xebde, 0xd5ce, 0x5593, 0xa7b4, 0x5693, 0x5793, 0x5893, 0x5993, 0x5a93, 0xabbf, 0xbebe, 0x5b93, 0x5c93, 0xd2bd, 0x5d93, 0x5e93, 0x5f93, 0x6093, 0xe9de, 0x6193, 0xaed4, 0x6293, 0xdede, 0x6393, 0xeade, 0x6493, 0x6593, 0x6693, 0x6793, 0xbfc0, 0x6893, 0xecde, 0xf3b2, 0xe9b8, 0xa7c2, 0x6993, 0x6a93, 0xc1bd, 0x6b93, 0x6c93, 0x6d93, 0x6e93, 0x6f93, 0xf5de, 0xf8de, 0x7093, 0x7193, 0xabb2, 0xa4b4, 0x7293, 0x7393, 0xeab4, 0xa6c9, 0x7493, 0x7593, 0x7693, 0x7793, 0x7893, 0x7993, 0xf6de, 0xd1cb, 0x7a93, 0xe3b8, 0x7b93, 0xf7de, 0xfade, 0x7c93, 0x7d93, 0x7e93, 0x8093, 0xf9de, 0x8193, 0x8293, 0x8393, 0xc2cc, 0x8493, 0xe1b0, 0xeeb4, 0x8593, 0x8693, 0x8793, 0x8893, 0x8993, 0x8a93, 0xbae5, 0x8b93, 0x8c93, 0x8d93, 0x8e93, 0x8f93, 0xafd0, 0x9093, 0x9193, 0xebb2, 0x9293, 0xa1eb, 0x9393, 0xf4de, 0x9493, 0x9593, 0xe3c9, 0xf3de, 0xdab0, 0xa1d2, 0xf7b1, 0x9693, 0xafcc, 0x9793, 0x9893, 0x9993, 0x9a93, 0x9b93, 0x9c93, 0x9d93, 0xf0de, 0x9e93, 0xa4cb, 0x9f93, 0xa093, 0xa193, 0xaad5, 0xa293, 0xa393, 0xa493, 0xa593, 0xa693, 0xfbde, 0xa793, 0xa893, 0xa993, 0xaa93, 0xab93, 0xac93, 0xad93, 0xae93, 0xddb4, 0xaf93, 0xa6c4, 0xb093, 0xb193, 0xb293, 0xfdde, 0xb393, 0xb493, 0xb593, 0xb693, 0xb793, 0xb893, 0xb993, 0xba93, 0xbb93, 0xbc93, 0xfec3, 0xa1c4, 0xa1df, 0xbd93, 0xbe93, 0xbf93, 0xc093, 0xc193, 0xc293, 0xc393, 0xccc1, 0xc493, 0xfcde, 0xefbe, 0xc593, 0xb2c6, 0xc693, 0xc793, 0xc893, 0xc993, 0xca93, 0xcb93, 0xcc93, 0xcd93, 0xce93, 0xc5b3, 0xf6c8, 0xcf93, 0xd093, 0xbacb, 0xfede, 0xd193, 0xd293, 0xa4df, 0xd393, 0xd493, 0xd593, 0xd693, 0xb2d7, 0xd793, 0xd893, 0xd993, 0xda93, 0xdb93, 0xb7b3, 0xdc93, 0xdd93, 0xde93, 0xdf93, 0xc3c1, 0xe093, 0xe193, 0xcbc7, 0xa5b2, 0xe9b4, 0xe293, 0xabd7, 0xe393, 0xe493, 0xe593, 0xe693, 0xecc4, 0xe793, 0xa2df, 0xa3df, 0xe893, 0xa5df, 0xe993, 0xb3ba, 0xea93, 0xeb93, 0xec93, 0xa6df, 0xed93, 0xdec0, 0xee93, 0xef93, 0xc3c9, 0xf093, 0xf193, 0xf293, 0xf393, 0xf493, 0xf593, 0xf693, 0xd9b2, 0xe6c7, 0xf793, 0xa7df, 0xf893, 0xdcc7, 0xf993, 0xfa93, 0xfb93, 0xfc93, 0xa8df, 0xa2eb, 0xfd93, 0xfe93, 0x4094, 0x4194, 0x4294, 0xd3cb, 0x4394, 0x4494, 0x4594, 0xaadf, 0x4694, 0xa9df, 0x4794, 0xc1b2, 0x4894, 0x4994, 0x4a94, 0x4b94, 0x4c94, 0x4d94, 0x4e94, 0x4f94, 0x5094, 0x5194, 0x5294, 0x5394, 0x5494, 0x5594, 0x5694, 0x5794, 0x5894, 0x5994, 0x5a94, 0x5b94, 0x5c94, 0x5d94, 0x5e94, 0x5f94, 0x6094, 0xcac5, 0x6194, 0x6294, 0x6394, 0x6494, 0x6594, 0x6694, 0x6794, 0x6894, 0xabdf, 0x6994, 0x6a94, 0x6b94, 0x6c94, 0x6d94, 0x6e94, 0x6f94, 0x7094, 0xdcd4, 0x7194, 0x7294, 0x7394, 0x7494, 0x7594, 0xc1c8, 0x7694, 0x7794, 0x7894, 0x7994, 0x7a94, 0x7b94, 0x7c94, 0x7d94, 0x7e94, 0x8094, 0x8194, 0x8294, 0xacdf, 0x8394, 0x8494, 0x8594, 0x8694, 0x8794, 0xf0be, 0x8894, 0x8994, 0xaddf, 0xa7d6, 0x8a94, 0x8b94, 0x8c94, 0x8d94, 0xb7ea, 0xb6eb, 0xd5ca, 0x8e94, 0xfcd8, 0xc4b8, 0x8f94, 0xa5b9, 0x9094, 0x9194, 0xc5b7, 0xfed5, 0x9294, 0x9394, 0x9494, 0x9594, 0x9694, 0xcab9, 0x9794, 0x9894, 0xa7d0, 0xcdf4, 0x9994, 0x9a94, 0xd0b5, 0x9b94, 0x9c94, 0xf4c3, 0x9d94, 0xc8be, 0x9e94, 0x9f94, 0xa094, 0xb7eb, 0xbdb0, 0xa194, 0xa294, 0xccbd, 0xa394, 0xb2c1, 0xa494, 0xd6b1, 0xa8b3, 0xa594, 0xa694, 0xa794, 0xd2b8, 0xa2c9, 0xa894, 0xa994, 0xd8b6, 0xaa94, 0xab94, 0xac94, 0xad94, 0xb8eb, 0xb4be, 0xae94, 0xaf94, 0xb094, 0xfdca, 0xb194, 0xc3c7, 0xb294, 0xfbd5, 0xb394, 0xb494, 0xf3b7, 0xb594, 0xb694, 0xb794, 0xb894, 0xb994, 0xba94, 0xbb94, 0xbc94, 0xbd94, 0xbe94, 0xbf94, 0xc094, 0xc194, 0xc294, 0xc394, 0xc4ce, 0xc494, 0xc594, 0xc694, 0xabd5, 0xf3b1, 0xc794, 0xc894, 0xc994, 0xb3ec, 0xdfb0, 0xca94, 0xb5ec, 0xcb94, 0xcc94, 0xcd94, 0xb7b6, 0xce94, 0xcfc1, 0xcf94, 0xfaf5, 0xb1d0, 0xd094, 0xd194, 0xe5d5, 0xd294, 0xd3ce, 0xd394, 0xd494, 0xefbd, 0xe2b3, 0xd594, 0xabb8, 0xd694, 0xb6d5, 0xd794, 0xbded, 0xd894, 0xcfb6, 0xd994, 0xb9cb, 0xc2d0, 0xda94, 0xdb94, 0xdc94, 0xdd94, 0xde94, 0xdf94, 0xe094, 0xe194, 0xbdb7, 0xe294, 0xe394, 0xb6ec, 0xa9ca, 0xe494, 0xe594, 0xe694, 0xd4c5, 0xe794, 0xb9ec, 0xb8ec, 0xc3c2, 0xb7ec, 0xe894, 0xe994, 0xea94, 0xeb94, 0xfdd0, 0xbaec, 0xec94, 0xbbec, 0xe5d7, 0xed94, 0xee94, 0xbcec, 0xef94, 0xf094, 0xf194, 0xbdec, 0xecc6, 0xf294, 0xf394, 0xf494, 0xf594, 0xf694, 0xf794, 0xf894, 0xf994, 0xdece, 0xfa94, 0xc8bc, 0xfb94, 0xfc94, 0xd5c8, 0xa9b5, 0xc9be, 0xbcd6, 0xe7d4, 0xfd94, 0xfe94, 0xaed1, 0xf1d0, 0xb8ea, 0xb9ea, 0xbaea, 0xb5ba, 0x4095, 0x4195, 0x4295, 0x4395, 0xb1ca, 0xf5bf, 0x4495, 0x4595, 0xfacd, 0x4695, 0x4795, 0x4895, 0x4995, 0x4a95, 0xc0ea, 0x4b95, 0xbab0, 0xbeea, 0x4c95, 0x4d95, 0xa5c0, 0x4e95, 0x4f95, 0x5095, 0xbbea, 0x5195, 0xfdb2, 0x5295, 0xf7c3, 0xe8bb, 0x5395, 0x5495, 0x5595, 0xd7d2, 0xf4ce, 0xbfea, 0x5695, 0x5795, 0x5895, 0xbcea, 0x5995, 0x5a95, 0x5b95, 0xc3ea, 0x5c95, 0xc7d0, 0xb3d3, 0x5d95, 0x5e95, 0x5f95, 0x6095, 0xbab4, 0x6195, 0xc1c3, 0xf2d7, 0x6295, 0x6395, 0x6495, 0x6595, 0xd1d5, 0x6695, 0xc7ca, 0x6795, 0xc5ea, 0x6895, 0x6995, 0xc4ea, 0xc7ea, 0xc6ea, 0x6a95, 0x6b95, 0x6c95, 0x6d95, 0x6e95, 0xe7d6, 0x6f95, 0xd4cf, 0x7095, 0x7195, 0xcbea, 0x7295, 0xcebb, 0x7395, 0x7495, 0x7595, 0x7695, 0x7795, 0x7895, 0x7995, 0xfabd, 0xcec9, 0x7a95, 0x7b95, 0xccea, 0x7c95, 0x7d95, 0xb9c9, 0xfecf, 0xcaea, 0xced4, 0xcdea, 0xcfea, 0x7e95, 0x8095, 0xedcd, 0x8195, 0x8295, 0x8395, 0x8495, 0xc9ea, 0x8595, 0xceea, 0x8695, 0x8795, 0xeece, 0x8895, 0xdebb, 0x8995, 0xbfb3, 0x8a95, 0x8b95, 0x8c95, 0x8d95, 0x8e95, 0xd5c6, 0xb0be, 0xface, 0x8f95, 0x9095, 0x9195, 0xe7c7, 0x9295, 0xa7be, 0xd0ea, 0x9395, 0x9495, 0xc7d6, 0x9595, 0x9695, 0x9795, 0xc0c1, 0x9895, 0x9995, 0x9a95, 0xddd4, 0x9b95, 0xd1ea, 0x9c95, 0x9d95, 0xbecf, 0x9e95, 0x9f95, 0xa095, 0xa195, 0xd2ea, 0xa295, 0xa395, 0xa495, 0xa595, 0xeeca, 0xa695, 0xa795, 0xa895, 0xa995, 0xafc5, 0xb5b0, 0xaa95, 0xab95, 0xac95, 0xad95, 0xae95, 0xd4ea, 0xaf95, 0xb095, 0xb195, 0xb295, 0xb395, 0xb495, 0xb595, 0xb695, 0xb795, 0xd3ea, 0xdff4, 0xb895, 0xb995, 0xba95, 0xbb95, 0xbc95, 0xbac4, 0xbd95, 0xbe95, 0xbf95, 0xc095, 0xc195, 0xa9b1, 0xc295, 0xc395, 0xc495, 0xc595, 0xdfe5, 0xc695, 0xc795, 0xc895, 0xc995, 0xd5ea, 0xca95, 0xcb95, 0xcc95, 0xcd95, 0xce95, 0xcf95, 0xd095, 0xd195, 0xd295, 0xd395, 0xd495, 0xd595, 0xd695, 0xd795, 0xd895, 0xd995, 0xda95, 0xdb95, 0xdc95, 0xdd95, 0xde95, 0xdf95, 0xe095, 0xe195, 0xe295, 0xe395, 0xefca, 0xe495, 0xd6ea, 0xd7ea, 0xd8c6, 0xe595, 0xe695, 0xe795, 0xe895, 0xe995, 0xea95, 0xeb95, 0xec95, 0xd8ea, 0xed95, 0xee95, 0xd9ea, 0xef95, 0xf095, 0xf195, 0xf295, 0xf395, 0xf495, 0xbbd4, 0xf595, 0xfac7, 0xb7d2, 0xfcb8, 0xf695, 0xf795, 0xc2ea, 0xf895, 0xdcb2, 0xf995, 0xfa95, 0xfcc2, 0xfb95, 0xf8d4, 0xe6cc, 0xeed7, 0xfc95, 0xfd95, 0xfe95, 0x4096, 0x4196, 0x4296, 0x4396, 0xc2d4, 0xd0d3, 0xc3eb, 0xf3c5, 0x4496, 0xfeb7, 0x4596, 0x4696, 0xd4eb, 0x4796, 0x4896, 0x4996, 0xb7cb, 0xdeeb, 0x4a96, 0xcac0, 0x4b96, 0x4c96, 0x4d96, 0xfbcd, 0x4e96, 0xafb3, 0x4f96, 0xdac6, 0x5096, 0x5196, 0x5296, 0x5396, 0x5496, 0x5596, 0xfceb, 0x5696, 0xbec4, 0x5796, 0xb4ce, 0xa9c4, 0xbeb1, 0xfdd4, 0x5896, 0xf5ca, 0x5996, 0xecd6, 0x5a96, 0x5b96, 0xd3c6, 0xe4b6, 0x5c96, 0x5d96, 0x5e96, 0x5f96, 0xfabb, 0x6096, 0x6196, 0xe0d0, 0x6296, 0x6396, 0xb1c9, 0x6496, 0xd3d4, 0xa8c8, 0x6596, 0x6696, 0xcbb8, 0x6796, 0xbee8, 0xbcc9, 0x6896, 0x6996, 0xbbe8, 0x6a96, 0xeec0, 0xd3d0, 0xc4b2, 0xe5b4, 0x6b96, 0xbce8, 0x6c96, 0x6d96, 0xc8d5, 0x6e96, 0x6f96, 0x7096, 0x7196, 0x7296, 0xc5b6, 0x7396, 0xbde8, 0xf8ca, 0xdcb8, 0xf5cc, 0x7496, 0x7596, 0x7696, 0xb4c0, 0x7796, 0x7896, 0xeed1, 0xbfe8, 0xc2e8, 0x7996, 0x7a96, 0xbcba, 0x7b96, 0xadb1, 0xdcbd, 0x7c96, 0xbdea, 0xc3e8, 0x7d96, 0xc6e8, 0x7e96, 0xcbe8, 0x8096, 0x8196, 0x8296, 0x8396, 0xcce8, 0x8496, 0xc9cb, 0xe5b0, 0x8596, 0xabbc, 0x8696, 0x8796, 0xb9b9, 0x8896, 0x8996, 0xc1e8, 0x8a96, 0xf7cd, 0x8b96, 0xcae8, 0x8c96, 0x8d96, 0x8e96, 0x8f96, 0xf6ce, 0x9096, 0x9196, 0x9296, 0x9396, 0xedd5, 0x9496, 0xd6c1, 0xc4e8, 0x9596, 0xb6c3, 0x9696, 0xfbb9, 0xa6d6, 0xc8e8, 0x9796, 0x9896, 0x9996, 0xe0ca, 0xe6d4, 0x9a96, 0xc0e8, 0x9b96, 0xc5e8, 0xc7e8, 0x9c96, 0xb9c7, 0xe3b7, 0x9d96, 0xc9e8, 0x9e96, 0xddbf, 0xd2e8, 0x9f96, 0xa096, 0xd7e8, 0xa196, 0xd5e8, 0xdcbc, 0xcfbc, 0xdbe8, 0xa296, 0xa396, 0xa496, 0xa596, 0xa696, 0xa796, 0xa896, 0xa996, 0xdee8, 0xaa96, 0xdae8, 0xfab1, 0xab96, 0xac96, 0xad96, 0xae96, 0xaf96, 0xb096, 0xb196, 0xb296, 0xb396, 0xb496, 0xd8b0, 0xb3c4, 0xccb8, 0xe2c6, 0xbec8, 0xe1c8, 0xb596, 0xb696, 0xb796, 0xcfe8, 0xd4e8, 0xd6e8, 0xb896, 0xf1b9, 0xd8e8, 0xf5d7, 0xb996, 0xfbc4, 0xba96, 0xdce8, 0xbb96, 0xbc96, 0xe9b2, 0xbd96, 0xbe96, 0xbf96, 0xd1e8, 0xc096, 0xc196, 0xedbc, 0xc296, 0xc396, 0xc2bf, 0xcde8, 0xf9d6, 0xc496, 0xf8c1, 0xf1b2, 0xc596, 0xc696, 0xc796, 0xc896, 0xc996, 0xca96, 0xcb96, 0xcc96, 0xdfe8, 0xcd96, 0xc1ca, 0xd9e8, 0xce96, 0xcf96, 0xd096, 0xd196, 0xa4d5, 0xd296, 0xeab1, 0xbbd5, 0xcee8, 0xd0e8, 0xb0b6, 0xd3e8, 0xd396, 0xdde8, 0xb8c0, 0xd496, 0xf7ca, 0xd596, 0xa8cb, 0xd696, 0xd796, 0xdcc6, 0xf5c0, 0xd896, 0xd996, 0xda96, 0xdb96, 0xdc96, 0xe9e8, 0xdd96, 0xde96, 0xdf96, 0xa3d0, 0xe096, 0xe196, 0xe296, 0xe396, 0xe496, 0xe596, 0xe696, 0xf2e8, 0xead6, 0xe796, 0xe896, 0xe996, 0xea96, 0xeb96, 0xec96, 0xed96, 0xe0e8, 0xe1e8, 0xee96, 0xef96, 0xf096, 0xf9d1, 0xcbba, 0xf9b8, 0xf196, 0xf296, 0xf1b8, 0xd4d4, 0xefe8, 0xf396, 0xeee8, 0xece8, 0xf0b9, 0xd2cc, 0xe6e8, 0xa6ce, 0xf2bf, 0xf496, 0xb8b0, 0xf1e8, 0xf0e8, 0xf596, 0xc0d7, 0xf696, 0xe4e8, 0xf796, 0xa9cd, 0xa3c9, 0xf896, 0xb8bb, 0xdbbd, 0xeae8, 0xf996, 0xfa96, 0xfb96, 0xfc96, 0xfd96, 0xfe96, 0x4097, 0x4197, 0x4297, 0x4397, 0xe2e8, 0xe3e8, 0xe5e8, 0xb5b5, 0xe7e8, 0xc5c7, 0xebe8, 0xede8, 0xb0bd, 0xaed7, 0x4497, 0xf8e8, 0x4597, 0x4697, 0x4797, 0x4897, 0x4997, 0x4a97, 0x4b97, 0x4c97, 0xf5e8, 0x4d97, 0xb0cd, 0xf6e8, 0x4e97, 0x4f97, 0x5097, 0x5197, 0x5297, 0x5397, 0x5497, 0x5597, 0x5697, 0xbac1, 0x5797, 0xe8e8, 0x5897, 0xb7c3, 0xf0b0, 0x5997, 0x5a97, 0x5b97, 0x5c97, 0x5d97, 0x5e97, 0x5f97, 0x6097, 0xf4e8, 0x6197, 0x6297, 0x6397, 0xf7e8, 0x6497, 0x6597, 0x6697, 0xa3b9, 0x6797, 0x6897, 0x6997, 0x6a97, 0x6b97, 0x6c97, 0x6d97, 0x6e97, 0x6f97, 0x7097, 0xd2c9, 0x7197, 0x7297, 0x7397, 0xcec3, 0xe0ce, 0xe6c0, 0x7497, 0x7597, 0x7697, 0x7797, 0xf3cb, 0x7897, 0xddcc, 0xb5d0, 0x7997, 0x7a97, 0xe1ca, 0x7b97, 0xf3e8, 0x7c97, 0x7d97, 0x7e97, 0x8097, 0x8197, 0x8297, 0x8397, 0x8497, 0x8597, 0x8697, 0xecbc, 0x8797, 0xf9e8, 0x8897, 0x8997, 0x8a97, 0x8b97, 0x8c97, 0x8d97, 0xdec3, 0x8e97, 0xe5c6, 0x8f97, 0xf7b9, 0x9097, 0x9197, 0x9297, 0x9397, 0xf4b0, 0x9497, 0x9597, 0xd8d7, 0x9697, 0x9797, 0xacbc, 0x9897, 0xefc5, 0x9997, 0x9a97, 0x9b97, 0x9c97, 0x9d97, 0xc4cc, 0x9e97, 0x9f97, 0xa6e9, 0xa097, 0xa197, 0xa297, 0xa397, 0xa497, 0xa597, 0xa697, 0xa797, 0xa897, 0xa997, 0xadc9, 0xaa97, 0xa2e9, 0xe2c0, 0xab97, 0xac97, 0xad97, 0xc3bf, 0xae97, 0xaf97, 0xb097, 0xfee8, 0xd7b9, 0xb197, 0xfbe8, 0xb297, 0xb397, 0xb497, 0xb597, 0xa4e9, 0xb697, 0xb797, 0xb897, 0xced2, 0xb997, 0xba97, 0xbb97, 0xbc97, 0xbd97, 0xa3e9, 0xbe97, 0xb2d6, 0xb5d7, 0xbf97, 0xa7e9, 0xc097, 0xb7bd, 0xc197, 0xc297, 0xc397, 0xc497, 0xc597, 0xc697, 0xc797, 0xc897, 0xc997, 0xca97, 0xcb97, 0xcc97, 0xfce8, 0xfde8, 0xcd97, 0xce97, 0xcf97, 0xa1e9, 0xd097, 0xd197, 0xd297, 0xd397, 0xd497, 0xd597, 0xd697, 0xd797, 0xd6cd, 0xd897, 0xd997, 0xacd2, 0xda97, 0xdb97, 0xdc97, 0xb2e9, 0xdd97, 0xde97, 0xdf97, 0xe097, 0xa9e9, 0xe197, 0xe297, 0xe397, 0xaab4, 0xe497, 0xbbb4, 0xe597, 0xe697, 0xabe9, 0xe797, 0xe897, 0xe997, 0xea97, 0xeb97, 0xec97, 0xed97, 0xee97, 0xef97, 0xf097, 0xf197, 0xf297, 0xf397, 0xf497, 0xf597, 0xf697, 0xf797, 0xa8d0, 0xf897, 0xf997, 0xa5e9, 0xfa97, 0xfb97, 0xfeb3, 0xfc97, 0xfd97, 0xace9, 0xe3c0, 0xfe97, 0xaae9, 0x4098, 0x4198, 0xb9e9, 0x4298, 0x4398, 0xb8e9, 0x4498, 0x4598, 0x4698, 0x4798, 0xaee9, 0x4898, 0x4998, 0xfae8, 0x4a98, 0x4b98, 0xa8e9, 0x4c98, 0x4d98, 0x4e98, 0x4f98, 0x5098, 0xacbf, 0xb1e9, 0xbae9, 0x5198, 0x5298, 0xa5c2, 0x5398, 0x5498, 0x5598, 0xafe9, 0x5698, 0xc5b8, 0x5798, 0xade9, 0x5898, 0xdcd3, 0xb4e9, 0xb5e9, 0xb7e9, 0x5998, 0x5a98, 0x5b98, 0xc7e9, 0x5c98, 0x5d98, 0x5e98, 0x5f98, 0x6098, 0x6198, 0xc6c0, 0xc5e9, 0x6298, 0x6398, 0xb0e9, 0x6498, 0x6598, 0xbbe9, 0xf1b0, 0x6698, 0x6798, 0x6898, 0x6998, 0x6a98, 0x6b98, 0x6c98, 0x6d98, 0x6e98, 0x6f98, 0xbce9, 0xa5d5, 0x7098, 0x7198, 0xbee9, 0x7298, 0xbfe9, 0x7398, 0x7498, 0x7598, 0xc1e9, 0x7698, 0x7798, 0xf1c1, 0x7898, 0x7998, 0xb6c8, 0x7a98, 0x7b98, 0x7c98, 0xbde9, 0x7d98, 0x7e98, 0x8098, 0x8198, 0x8298, 0xc2e9, 0x8398, 0x8498, 0x8598, 0x8698, 0x8798, 0x8898, 0x8998, 0x8a98, 0xc3e9, 0x8b98, 0xb3e9, 0x8c98, 0xb6e9, 0x8d98, 0xb1bb, 0x8e98, 0x8f98, 0x9098, 0xc0e9, 0x9198, 0x9298, 0x9398, 0x9498, 0x9598, 0x9698, 0xf7bc, 0x9798, 0x9898, 0x9998, 0xc4e9, 0xc6e9, 0x9a98, 0x9b98, 0x9c98, 0x9d98, 0x9e98, 0x9f98, 0xa098, 0xa198, 0xa298, 0xa398, 0xa498, 0xa598, 0xcae9, 0xa698, 0xa798, 0xa898, 0xa998, 0xcee9, 0xaa98, 0xab98, 0xac98, 0xad98, 0xae98, 0xaf98, 0xb098, 0xb198, 0xb298, 0xb398, 0xdbb2, 0xb498, 0xc8e9, 0xb598, 0xb698, 0xb798, 0xb898, 0xb998, 0xba98, 0xbb98, 0xbc98, 0xbd98, 0xbe98, 0xaeb7, 0xbf98, 0xc098, 0xc198, 0xc298, 0xc398, 0xc498, 0xc598, 0xc698, 0xc798, 0xc898, 0xc998, 0xca98, 0xcbe9, 0xcce9, 0xcb98, 0xcc98, 0xcd98, 0xce98, 0xcf98, 0xd098, 0xc1d5, 0xd198, 0xa3c4, 0xd298, 0xd398, 0xd498, 0xd598, 0xd698, 0xd798, 0xd8e9, 0xd898, 0xe1ba, 0xd998, 0xda98, 0xdb98, 0xdc98, 0xc9e9, 0xdd98, 0xa3d3, 0xde98, 0xdf98, 0xe098, 0xd4e9, 0xe198, 0xe298, 0xe398, 0xe498, 0xe598, 0xe698, 0xe798, 0xd7e9, 0xd0e9, 0xe898, 0xe998, 0xea98, 0xeb98, 0xec98, 0xcfe9, 0xed98, 0xee98, 0xc1c7, 0xef98, 0xf098, 0xf198, 0xf298, 0xf398, 0xf498, 0xf598, 0xf698, 0xd2e9, 0xf798, 0xf898, 0xf998, 0xfa98, 0xfb98, 0xfc98, 0xfd98, 0xd9e9, 0xc8b3, 0xfe98, 0xd3e9, 0x4099, 0x4199, 0x4299, 0x4399, 0x4499, 0xf0cf, 0x4599, 0x4699, 0x4799, 0xcde9, 0x4899, 0x4999, 0x4a99, 0x4b99, 0x4c99, 0x4d99, 0x4e99, 0x4f99, 0x5099, 0x5199, 0x5299, 0xf7b3, 0x5399, 0x5499, 0x5599, 0x5699, 0x5799, 0x5899, 0x5999, 0xd6e9, 0x5a99, 0x5b99, 0xdae9, 0x5c99, 0x5d99, 0x5e99, 0xb4cc, 0x5f99, 0x6099, 0x6199, 0xadcf, 0x6299, 0x6399, 0x6499, 0x6599, 0x6699, 0x6799, 0x6899, 0x6999, 0x6a99, 0xd5e9, 0x6b99, 0xdce9, 0xdbe9, 0x6c99, 0x6d99, 0x6e99, 0x6f99, 0x7099, 0xdee9, 0x7199, 0x7299, 0x7399, 0x7499, 0x7599, 0x7699, 0x7799, 0x7899, 0xd1e9, 0x7999, 0x7a99, 0x7b99, 0x7c99, 0x7d99, 0x7e99, 0x8099, 0x8199, 0xdde9, 0x8299, 0xdfe9, 0xcac3, 0x8399, 0x8499, 0x8599, 0x8699, 0x8799, 0x8899, 0x8999, 0x8a99, 0x8b99, 0x8c99, 0x8d99, 0x8e99, 0x8f99, 0x9099, 0x9199, 0x9299, 0x9399, 0x9499, 0x9599, 0x9699, 0x9799, 0x9899, 0x9999, 0x9a99, 0x9b99, 0x9c99, 0x9d99, 0x9e99, 0x9f99, 0xa099, 0xa199, 0xa299, 0xa399, 0xa499, 0xa599, 0xa699, 0xa799, 0xa899, 0xa999, 0xaa99, 0xab99, 0xac99, 0xad99, 0xae99, 0xaf99, 0xb099, 0xb199, 0xb299, 0xb399, 0xb499, 0xb599, 0xb699, 0xb799, 0xb899, 0xb999, 0xba99, 0xbb99, 0xbc99, 0xbd99, 0xbe99, 0xbf99, 0xc099, 0xc199, 0xc299, 0xc399, 0xc499, 0xc599, 0xc699, 0xc799, 0xc899, 0xc999, 0xca99, 0xcb99, 0xcc99, 0xcd99, 0xce99, 0xcf99, 0xd099, 0xd199, 0xd299, 0xd399, 0xd499, 0xd599, 0xd699, 0xd799, 0xd899, 0xd999, 0xda99, 0xdb99, 0xdc99, 0xdd99, 0xde99, 0xdf99, 0xe099, 0xe199, 0xe299, 0xe399, 0xe499, 0xe599, 0xe699, 0xe799, 0xe899, 0xe999, 0xea99, 0xeb99, 0xec99, 0xed99, 0xee99, 0xef99, 0xf099, 0xf199, 0xf299, 0xf399, 0xf499, 0xf599, 0xb7c7, 0xceb4, 0xb6bb, 0xc0d0, 0xa3ec, 0xf699, 0xf799, 0xb7c5, 0xf899, 0xf999, 0xfa99, 0xfb99, 0xfc99, 0xfd99, 0xfe99, 0x409a, 0x419a, 0x429a, 0xfbd3, 0x439a, 0x449a, 0x459a, 0x469a, 0xa4ec, 0x479a, 0xa5ec, 0xdbc6, 0x489a, 0x499a, 0x4a9a, 0xeebf, 0x4b9a, 0x4c9a, 0x4d9a, 0x4e9a, 0xa6ec, 0x4f9a, 0x509a, 0xa7ec, 0xaad0, 0x519a, 0xb8c7, 0x529a, 0x539a, 0xe8b8, 0x549a, 0x559a, 0x569a, 0x579a, 0x589a, 0x599a, 0x5a9a, 0x5b9a, 0x5c9a, 0x5d9a, 0x5e9a, 0x5f9a, 0xa8ec, 0x609a, 0x619a, 0x629a, 0x639a, 0x649a, 0x659a, 0x669a, 0x679a, 0xb9d6, 0xfdd5, 0xcbb4, 0xbdb2, 0xe4ce, 0xe7c6, 0x689a, 0x699a, 0xe1cd, 0x6a9a, 0x6b9a, 0x6c9a, 0x6d9a, 0x6e9a, 0x6f9a, 0x709a, 0x719a, 0x729a, 0x739a, 0x749a, 0x759a, 0x769a, 0x779a, 0xf5b4, 0x789a, 0xc0cb, 0xdfbc, 0x799a, 0x7a9a, 0x7b9a, 0x7c9a, 0xe2e9, 0xe3e9, 0xead1, 0xe5e9, 0x7d9a, 0xf9b4, 0xe4e9, 0x7e9a, 0xb3d1, 0xe2ca, 0xd0b2, 0x809a, 0xe8e9, 0x819a, 0x829a, 0x839a, 0x849a, 0xe6e9, 0xe7e9, 0x859a, 0x869a, 0xb3d6, 0x879a, 0x889a, 0x899a, 0xe9e9, 0xeae9, 0x8a9a, 0x8b9a, 0x8c9a, 0x8d9a, 0x8e9a, 0xebe9, 0x8f9a, 0x909a, 0x919a, 0x929a, 0x939a, 0x949a, 0x959a, 0x969a, 0xece9, 0x979a, 0x989a, 0x999a, 0x9a9a, 0x9b9a, 0x9c9a, 0x9d9a, 0x9e9a, 0xafec, 0xb9c5, 0xceb6, 0x9f9a, 0xf3d2, 0xa09a, 0xa19a, 0xa29a, 0xa39a, 0xa49a, 0xa59a, 0xa69a, 0xeeb5, 0xa79a, 0xd9bb, 0xb1ec, 0xa89a, 0xa99a, 0xe3d2, 0xaa9a, 0xab9a, 0xac9a, 0xad9a, 0xae9a, 0xe3ce, 0xaf9a, 0xb8c4, 0xb09a, 0xbfc3, 0xb19a, 0xb29a, 0xbeb6, 0xb9d8, 0xc8b1, 0xcfb1, 0xd1b1, 0xfec5, 0xb39a, 0xd0b1, 0xb49a, 0xabc3, 0xb59a, 0xb69a, 0xb79a, 0xb89a, 0xb99a, 0xb1d5, 0xba9a, 0xbb9a, 0xbc9a, 0xbd9a, 0xbe9a, 0xbf9a, 0xc09a, 0xc19a, 0xa4eb, 0xc1ba, 0xc29a, 0xc39a, 0xc49a, 0xbacc, 0xc59a, 0xc69a, 0xc79a, 0xa5eb, 0xc89a, 0xa7eb, 0xc99a, 0xca9a, 0xcb9a, 0xa8eb, 0xcc9a, 0xcd9a, 0xce9a, 0xa6eb, 0xcf9a, 0xd09a, 0xd19a, 0xd29a, 0xd39a, 0xd49a, 0xd59a, 0xa9eb, 0xabeb, 0xaaeb, 0xd69a, 0xd79a, 0xd89a, 0xd99a, 0xda9a, 0xaceb, 0xdb9a, 0xcfca, 0xb5d8, 0xf1c3, 0xdc9a, 0xa5c3, 0xf8c6, 0xadeb, 0xcac4, 0xdd9a, 0xaeeb, 0xafeb, 0xb0eb, 0xd5b7, 0xde9a, 0xdf9a, 0xe09a, 0xfab7, 0xe19a, 0xb1eb, 0xe2c7, 0xe29a, 0xb3eb, 0xe39a, 0xa4ba, 0xf5d1, 0xb1b0, 0xb2eb, 0xb4eb, 0xe49a, 0xe59a, 0xe69a, 0xaab5, 0xc8c2, 0xe8c7, 0xe79a, 0xb5eb, 0xe89a, 0xaecb, 0xdfe3, 0xe99a, 0xea9a, 0xc0d3, 0xeb9a, 0xec9a, 0xed9a, 0xee9a, 0xdbd9, 0xef9a, 0xf09a, 0xa1cd, 0xadd6, 0xf3c7, 0xf19a, 0xf29a, 0xf39a, 0xe0d9, 0xe3bb, 0xf49a, 0xbaba, 0xe2e3, 0xf59a, 0xf69a, 0xf79a, 0xf89a, 0xf99a, 0xabcf, 0xfa9a, 0xfb9a, 0xfc9a, 0xe0e3, 0xc7c9, 0xfd9a, 0xb9ba, 0xfe9a, 0x409b, 0x419b, 0xb4d1, 0xe1e3, 0xeac8, 0xafb9, 0xadbd, 0xd8b3, 0xdbce, 0x429b, 0x439b, 0xc0cc, 0x449b, 0x459b, 0x469b, 0xe8e3, 0xe9e3, 0xf4cd, 0x479b, 0x489b, 0x499b, 0x4a9b, 0x4b9b, 0xadcc, 0x4c9b, 0xb3bc, 0x4d9b, 0xeae3, 0x4e9b, 0xebe3, 0x4f9b, 0x509b, 0xdad0, 0x519b, 0x529b, 0x539b, 0xfbc6, 0xdab7, 0x549b, 0x559b, 0xdfc7, 0xcad2, 0xd6ce, 0x569b, 0xe4e3, 0xece3, 0x579b, 0xf2c9, 0xc1b3, 0x589b, 0x599b, 0xe7e3, 0x5a9b, 0x5b9b, 0xe3c6, 0xe5e3, 0x5c9b, 0x5d9b, 0xb3ed, 0xe6e3, 0x5e9b, 0x5f9b, 0x609b, 0x619b, 0xb3c9, 0x629b, 0xe6c5, 0x639b, 0x649b, 0x659b, 0xb5b9, 0x669b, 0xbbc3, 0x679b, 0xe3e3, 0xbdc5, 0xa4c1, 0xd9c2, 0xd7b2, 0x689b, 0xede3, 0xa6bb, 0xadc4, 0x699b, 0xf0e3, 0xdabe, 0x6a9b, 0x6b9b, 0xfbe3, 0xf5e3, 0xd3ba, 0x6c9b, 0x6d9b, 0x6e9b, 0x6f9b, 0xd0b7, 0xcdd3, 0x709b, 0xced6, 0xd3d5, 0xc1b9, 0xb4d5, 0xd8d1, 0x719b, 0x729b, 0x739b, 0x749b, 0xb9d0, 0xf6c7, 0x759b, 0x769b, 0x779b, 0xaac8, 0xb4b2, 0x789b, 0xdac3, 0x799b, 0x7a9b, 0x7b9b, 0xeee3, 0x7c9b, 0x7d9b, 0xfce3, 0xefe3, 0xa8b7, 0xf7e3, 0xf4e3, 0x7e9b, 0x809b, 0x819b, 0xbab7, 0x829b, 0x839b, 0xa2c5, 0x849b, 0xf6e3, 0xddc5, 0xa8b2, 0xfcc6, 0x859b, 0xe0c4, 0x869b, 0x879b, 0xa2d7, 0x889b, 0xe1c0, 0xf9e3, 0x899b, 0x8a9b, 0xfae3, 0xfde3, 0xa9cc, 0xf3e3, 0x8b9b, 0xbed3, 0x8c9b, 0xc3b1, 0xb4ed, 0xf1e3, 0xf2e3, 0x8d9b, 0xf8e3, 0xbad0, 0xc3c6, 0xf3d4, 0xfee3, 0x8e9b, 0x8f9b, 0xe0bd, 0x909b, 0x919b, 0xa7e4, 0x929b, 0x939b, 0xa6e4, 0x949b, 0x959b, 0x969b, 0xf3d1, 0xa3e4, 0x979b, 0xa9e4, 0x989b, 0x999b, 0x9a9b, 0xf7c8, 0x9b9b, 0x9c9b, 0x9d9b, 0x9e9b, 0xb4cf, 0x9f9b, 0xa8e4, 0xaee4, 0xe5c2, 0xa09b, 0xa19b, 0xb4b6, 0xa29b, 0xa39b, 0xa49b, 0xa59b, 0xa69b, 0xa79b, 0xf2bd, 0xa89b, 0xa2e4, 0xa99b, 0xaa9b, 0xe9ba, 0xaae4, 0xab9b, 0xac9b, 0xace4, 0xad9b, 0xae9b, 0xfdb6, 0xded6, 0xb2e4, 0xaf9b, 0xade4, 0xb09b, 0xb19b, 0xb29b, 0xa1e4, 0xb39b, 0xeebb, 0xddcd, 0xa2c7, 0xc9c5, 0xb49b, 0xb59b, 0xf7c1, 0xb69b, 0xa4e4, 0xb79b, 0xb3c7, 0xacbd, 0xbdbd, 0xa5e4, 0xb89b, 0xc7d7, 0xe2b2, 0xb99b, 0xabe4, 0xc3bc, 0xafe4, 0xba9b, 0xebbb, 0xb0e4, 0xa8c5, 0xb1e4, 0xbb9b, 0xbc9b, 0xbd9b, 0xbe9b, 0xe3d5, 0xa3bf, 0xbf9b, 0xbae4, 0xc09b, 0xb7e4, 0xc19b, 0xbbe4, 0xc29b, 0xc39b, 0xbde4, 0xc49b, 0xc59b, 0xd6c6, 0xc69b, 0xc79b, 0xc6ba, 0xcbc0, 0xc89b, 0xc99b, 0xca9b, 0xa1b8, 0xb4e4, 0xcb9b, 0xcc9b, 0xcd9b, 0xce9b, 0xa1d4, 0xcf9b, 0xd09b, 0xa3ba, 0xfebd, 0xd19b, 0xd29b, 0xd39b, 0xbce4, 0xd49b, 0xd59b, 0xd69b, 0xd79b, 0xd89b, 0xbfcd, 0xd99b, 0xda9b, 0xf9c4, 0xdb9b, 0xdc9b, 0xfbcf, 0xe6c9, 0xdd9b, 0xde9b, 0xbfd3, 0xdf9b, 0xd1cf, 0xe09b, 0xe19b, 0xb3e4, 0xe29b, 0xb8e4, 0xb9e4, 0xe9cc, 0xe39b, 0xe49b, 0xe59b, 0xe69b, 0xe79b, 0xcecc, 0xe89b, 0xd4c0, 0xb5e4, 0xb0c1, 0xb6e4, 0xd0ce, 0xe99b, 0xc1bb, 0xd3b5, 0xea9b, 0xf3c8, 0xa7bd, 0xc7d5, 0xacc9, 0xa2b8, 0xcae4, 0xeb9b, 0xec9b, 0xcce4, 0xc4d1, 0xed9b, 0xee9b, 0xbad2, 0xef9b, 0xf09b, 0xadba, 0xf19b, 0xf29b, 0xd4ba, 0xf39b, 0xf49b, 0xf59b, 0xf69b, 0xf79b, 0xf89b, 0xc3e4, 0xedb5, 0xf99b, 0xfa9b, 0xfb9b, 0xcdd7, 0xc0e4, 0xfdcf, 0xbfe4, 0xfc9b, 0xfd9b, 0xfe9b, 0xdcc1, 0xcacc, 0x409c, 0x419c, 0x429c, 0x439c, 0xe7ca, 0x449c, 0x459c, 0x469c, 0x479c, 0xd7c4, 0x489c, 0xd4cc, 0xc8e4, 0x499c, 0x4a9c, 0x4b9c, 0xc7e4, 0xc1e4, 0x4c9c, 0xc4e4, 0xadb5, 0x4d9c, 0x4e9c, 0xd9d3, 0x4f9c, 0xc6e4, 0x509c, 0x519c, 0x529c, 0x539c, 0xf9d2, 0xe3b4, 0x549c, 0xb4bb, 0x559c, 0x569c, 0xeec9, 0x579c, 0xbeb4, 0x589c, 0x599c, 0x5a9c, 0xecbb, 0x5b9c, 0xcdd1, 0x5c9c, 0xedcc, 0xb5ed, 0x5d9c, 0x5e9c, 0x5f9c, 0x609c, 0x619c, 0x629c, 0x639c, 0x649c, 0xe5c7, 0x659c, 0x669c, 0x679c, 0x689c, 0xa8d4, 0x699c, 0xcbe4, 0xd5d7, 0xc2e4, 0x6a9c, 0xa5bd, 0xc5e4, 0x6b9c, 0x6c9c, 0xe6d3, 0x6d9c, 0xc9e4, 0xf8c9, 0x6e9c, 0x6f9c, 0xbee4, 0x709c, 0x719c, 0xe5d3, 0x729c, 0x739c, 0xfec7, 0xc9b6, 0x749c, 0xfcd4, 0xb3b2, 0xd7e4, 0x759c, 0x769c, 0x779c, 0xc2ce, 0x789c, 0xcde4, 0x799c, 0xbcce, 0x7a9c, 0xdbb8, 0x7b9c, 0x7c9c, 0xd6e4, 0x7d9c, 0xcabf, 0x7e9c, 0x809c, 0x819c, 0xced3, 0x829c, 0xecc3, 0x839c, 0x849c, 0x859c, 0x869c, 0x879c, 0x889c, 0x899c, 0x8a9c, 0xc8c5, 0xd8e4, 0x8b9c, 0x8c9c, 0x8d9c, 0x8e9c, 0x8f9c, 0x909c, 0x919c, 0x929c, 0xc4cd, 0xcfe4, 0x939c, 0x949c, 0x959c, 0x969c, 0xd4e4, 0xd5e4, 0x979c, 0xfeba, 0x989c, 0xe6cf, 0x999c, 0x9a9c, 0xbfd5, 0x9b9c, 0x9c9c, 0x9d9c, 0xd2e4, 0x9e9c, 0x9f9c, 0xa09c, 0xa19c, 0xa29c, 0xa39c, 0xa49c, 0xa59c, 0xa69c, 0xa79c, 0xa89c, 0xd0e4, 0xa99c, 0xaa9c, 0xcee4, 0xab9c, 0xac9c, 0xad9c, 0xae9c, 0xaf9c, 0xb09c, 0xb19c, 0xb29c, 0xb39c, 0xb49c, 0xb59c, 0xb69c, 0xb79c, 0xb89c, 0xb99c, 0xe5cd, 0xaaca, 0xba9c, 0xbb9c, 0xbc9c, 0xa3c0, 0xbd9c, 0xa6bd, 0xd3e4, 0xbe9c, 0xbf9c, 0xc8b8, 0xc09c, 0xc19c, 0xc29c, 0xc39c, 0xc49c, 0xe7e4, 0xb4d4, 0xc59c, 0xc69c, 0xc79c, 0xc89c, 0xc99c, 0xca9c, 0xcb9c, 0xdbe4, 0xcc9c, 0xcd9c, 0xce9c, 0xefc1, 0xcf9c, 0xd09c, 0xe9e4, 0xd19c, 0xd29c, 0xe7d2, 0xd39c, 0xd49c, 0xdfe4, 0xd59c, 0xe0e4, 0xd69c, 0xd79c, 0xaacf, 0xd89c, 0xd99c, 0xda9c, 0xdb9c, 0xddcb, 0xdc9c, 0xdae4, 0xd1e4, 0xdd9c, 0xe5e4, 0xde9c, 0xdcc8, 0xe3e4, 0xdf9c, 0xe09c, 0xe7c4, 0xe2e4, 0xe19c, 0xe1e4, 0xe29c, 0xe39c, 0xe49c, 0xfcb3, 0xe8e4, 0xe59c, 0xe69c, 0xe79c, 0xe89c, 0xe1b5, 0xe99c, 0xea9c, 0xeb9c, 0xccd7, 0xec9c, 0xed9c, 0xee9c, 0xe6e4, 0xef9c, 0xacbb, 0xf09c, 0xd2d7, 0xcfcc, 0xf8eb, 0xf19c, 0xe4e4, 0xf29c, 0xf39c, 0xf6b9, 0xf49c, 0xf59c, 0xf69c, 0xcdd6, 0xd9e4, 0xdce4, 0xfac2, 0xdee4, 0xf79c, 0xcbc2, 0xc4c0, 0xd0c2, 0xf89c, 0xf5b1, 0xb2cc, 0xf99c, 0xfa9c, 0xfb9c, 0xfc9c, 0xfd9c, 0xfe9c, 0x409d, 0x419d, 0x429d, 0x439d, 0xceb5, 0x449d, 0x459d, 0x469d, 0x479d, 0xefe4, 0x489d, 0x499d, 0x4a9d, 0x4b9d, 0x4c9d, 0x4d9d, 0x4e9d, 0x4f9d, 0xafc6, 0x509d, 0x519d, 0x529d, 0xe1c6, 0x539d, 0x549d, 0xf5e4, 0x559d, 0x569d, 0x579d, 0x589d, 0x599d, 0xa9c2, 0x5a9d, 0x5b9d, 0x5c9d, 0xecc0, 0xddd1, 0xeee4, 0x5d9d, 0x5e9d, 0x5f9d, 0x609d, 0x619d, 0x629d, 0x639d, 0x649d, 0x659d, 0x669d, 0xaec4, 0x679d, 0x689d, 0x699d, 0xede4, 0x6a9d, 0x6b9d, 0x6c9d, 0x6d9d, 0xf6e4, 0xf4e4, 0xfec2, 0x6e9d, 0xdde4, 0x6f9d, 0xf0e4, 0x709d, 0xfeca, 0x719d, 0xc4d5, 0x729d, 0x739d, 0xf1e4, 0x749d, 0x759d, 0x769d, 0x779d, 0x789d, 0x799d, 0x7a9d, 0xfad1, 0x7b9d, 0x7c9d, 0x7d9d, 0x7e9d, 0x809d, 0x819d, 0x829d, 0xebe4, 0xece4, 0x839d, 0x849d, 0x859d, 0xf2e4, 0x869d, 0xabce, 0x879d, 0x889d, 0x899d, 0x8a9d, 0x8b9d, 0x8c9d, 0x8d9d, 0x8e9d, 0x8f9d, 0x909d, 0xcbc5, 0x919d, 0x929d, 0x939d, 0xb1c7, 0x949d, 0xbac2, 0x959d, 0x969d, 0x979d, 0xeae4, 0x989d, 0x999d, 0x9a9d, 0xcac1, 0x9b9d, 0x9c9d, 0x9d9d, 0x9e9d, 0x9f9d, 0xa09d, 0xb6cc, 0xb1b3, 0xa19d, 0xa29d, 0xa39d, 0xfbe4, 0xa49d, 0xf3e4, 0xa59d, 0xa69d, 0xa79d, 0xfae4, 0xa89d, 0xfde4, 0xa99d, 0xfce4, 0xaa9d, 0xab9d, 0xac9d, 0xad9d, 0xae9d, 0xaf9d, 0xb09d, 0xceb3, 0xb19d, 0xb29d, 0xb39d, 0xbab3, 0xf7e4, 0xb49d, 0xb59d, 0xf9e4, 0xf8e4, 0xecc5, 0xb69d, 0xb79d, 0xb89d, 0xb99d, 0xba9d, 0xbb9d, 0xbc9d, 0xbd9d, 0xbe9d, 0xbf9d, 0xc09d, 0xc19d, 0xc29d, 0xbdc0, 0xc39d, 0xc49d, 0xc59d, 0xc69d, 0xe8d4, 0xc79d, 0xc89d, 0xc99d, 0xca9d, 0xcb9d, 0xa2e5, 0xcc9d, 0xcd9d, 0xce9d, 0xcf9d, 0xd09d, 0xd19d, 0xd29d, 0xd39d, 0xd49d, 0xd59d, 0xd69d, 0xc4b0, 0xd79d, 0xd89d, 0xa4e5, 0xd99d, 0xda9d, 0xa3e5, 0xdb9d, 0xdc9d, 0xdd9d, 0xde9d, 0xdf9d, 0xe09d, 0xa4bc, 0xe19d, 0xa5e5, 0xe29d, 0xe39d, 0xe49d, 0xe59d, 0xe69d, 0xe79d, 0xa1e5, 0xe89d, 0xe99d, 0xea9d, 0xeb9d, 0xec9d, 0xed9d, 0xee9d, 0xfee4, 0xf4b1, 0xef9d, 0xf09d, 0xf19d, 0xf29d, 0xf39d, 0xf49d, 0xf59d, 0xf69d, 0xf79d, 0xf89d, 0xf99d, 0xa8e5, 0xfa9d, 0xa9e5, 0xa6e5, 0xfb9d, 0xfc9d, 0xfd9d, 0xfe9d, 0x409e, 0x419e, 0x429e, 0x439e, 0x449e, 0x459e, 0x469e, 0x479e, 0xa7e5, 0xaae5, 0x489e, 0x499e, 0x4a9e, 0x4b9e, 0x4c9e, 0x4d9e, 0x4e9e, 0x4f9e, 0x509e, 0x519e, 0x529e, 0x539e, 0x549e, 0x559e, 0x569e, 0x579e, 0x589e, 0x599e, 0x5a9e, 0x5b9e, 0x5c9e, 0x5d9e, 0x5e9e, 0x5f9e, 0x609e, 0x619e, 0x629e, 0x639e, 0x649e, 0x659e, 0x669e, 0x679e, 0x689e, 0xd9c6, 0x699e, 0x6a9e, 0x6b9e, 0x6c9e, 0x6d9e, 0x6e9e, 0x6f9e, 0x709e, 0xabe5, 0xade5, 0x719e, 0x729e, 0x739e, 0x749e, 0x759e, 0x769e, 0x779e, 0xace5, 0x789e, 0x799e, 0x7a9e, 0x7b9e, 0x7c9e, 0x7d9e, 0x7e9e, 0x809e, 0x819e, 0x829e, 0x839e, 0x849e, 0x859e, 0x869e, 0x879e, 0x889e, 0x899e, 0xafe5, 0x8a9e, 0x8b9e, 0x8c9e, 0xaee5, 0x8d9e, 0x8e9e, 0x8f9e, 0x909e, 0x919e, 0x929e, 0x939e, 0x949e, 0x959e, 0x969e, 0x979e, 0x989e, 0x999e, 0x9a9e, 0x9b9e, 0x9c9e, 0x9d9e, 0x9e9e, 0xe0b9, 0x9f9e, 0xa09e, 0xb0e5, 0xa19e, 0xa29e, 0xa39e, 0xa49e, 0xa59e, 0xa69e, 0xa79e, 0xa89e, 0xa99e, 0xaa9e, 0xab9e, 0xac9e, 0xad9e, 0xae9e, 0xb1e5, 0xaf9e, 0xb09e, 0xb19e, 0xb29e, 0xb39e, 0xb49e, 0xb59e, 0xb69e, 0xb79e, 0xb89e, 0xb99e, 0xba9e, 0xf0bb, 0xe1ec, 0xf0c3, 0xbb9e, 0xc6b5, 0xd2bb, 0xbc9e, 0xbd9e, 0xbe9e, 0xbf9e, 0xe9c1, 0xeed4, 0xc09e, 0xc4be, 0xc19e, 0xc29e, 0xc39e, 0xc6d7, 0xc49e, 0xd6d4, 0xd3b2, 0xbeec, 0xc59e, 0xc69e, 0xc79e, 0xc89e, 0xc1ea, 0xc99e, 0xca9e, 0xcb9e, 0xafc2, 0xb6b4, 0xcc9e, 0xcd9e, 0xce9e, 0xd7d1, 0xcf9e, 0xd09e, 0xd19e, 0xb4b3, 0xd29e, 0xb2c8, 0xbbbf, 0xc0ec, 0xd39e, 0xd49e, 0xcbd6, 0xd59e, 0xd69e, 0xbfec, 0xc1ec, 0xd79e, 0xd89e, 0xd99e, 0xda9e, 0xdb9e, 0xdc9e, 0xdd9e, 0xde9e, 0xdf9e, 0xe09e, 0xe19e, 0xe29e, 0xe39e, 0xc5ec, 0xe6be, 0xbfcc, 0xdac5, 0xbcbe, 0xe49e, 0xc6ec, 0xe59e, 0xfeb1, 0xe69e, 0xe79e, 0xe89e, 0xc4ec, 0xa8d5, 0xe3b5, 0xe99e, 0xc2ec, 0xb6c1, 0xe3b3, 0xea9e, 0xeb9e, 0xc3ec, 0xb8cb, 0xc3c0, 0xfecc, 0xec9e, 0xed9e, 0xee9e, 0xef9e, 0xd2c1, 0xf09e, 0xc8ec, 0xf19e, 0xf29e, 0xf39e, 0xf49e, 0xf59e, 0xf69e, 0xf79e, 0xf89e, 0xf99e, 0xfa9e, 0xfb9e, 0xfc9e, 0xfd9e, 0xe6ba, 0xd3c0, 0xfe9e, 0xf2d6, 0x409f, 0x419f, 0x429f, 0xccd1, 0x439f, 0x449f, 0x459f, 0x469f, 0xbebf, 0x479f, 0xb3b7, 0xd5c9, 0xc7ec, 0xe2bb, 0x489f, 0xcccc, 0xfdbd, 0xc8c8, 0x499f, 0xa9cf, 0x4a9f, 0x4b9f, 0x4c9f, 0x4d9f, 0x4e9f, 0x4f9f, 0x509f, 0xe9cd, 0x519f, 0xebc5, 0x529f, 0x539f, 0x549f, 0xe9b7, 0x559f, 0x569f, 0x579f, 0x589f, 0x599f, 0x5a9f, 0x5b9f, 0x5c9f, 0x5d9f, 0x5e9f, 0x5f9f, 0xc9d1, 0xb8ba, 0x609f, 0x619f, 0x629f, 0x639f, 0x649f, 0xc9ec, 0x659f, 0x669f, 0xcaec, 0x679f, 0xc0bb, 0xcbec, 0x689f, 0xe2ec, 0xbab1, 0xd9b7, 0x699f, 0x6a9f, 0x6b9f, 0x6c9f, 0x6d9f, 0x6e9f, 0x6f9f, 0x709f, 0x719f, 0x729f, 0x739f, 0xb9bd, 0x749f, 0x759f, 0x769f, 0x779f, 0x789f, 0x799f, 0x7a9f, 0x7b9f, 0xccec, 0xe6d1, 0xcdec, 0x7c9f, 0x7d9f, 0x7e9f, 0x809f, 0xbbc8, 0x819f, 0x829f, 0x839f, 0x849f, 0x859f, 0x869f, 0x879f, 0x889f, 0x899f, 0x8a9f, 0x8b9f, 0x8c9f, 0x8d9f, 0x8e9f, 0xd1ec, 0x8f9f, 0x909f, 0x919f, 0x929f, 0xd3ec, 0x939f, 0xcdbb, 0x949f, 0xe5bc, 0x959f, 0x969f, 0x979f, 0x989f, 0x999f, 0x9a9f, 0x9b9f, 0x9c9f, 0x9d9f, 0x9e9f, 0x9f9f, 0xa09f, 0xa19f, 0xcfec, 0xa29f, 0xb7c9, 0xa39f, 0xa49f, 0xa59f, 0xa69f, 0xa79f, 0xbac3, 0xa89f, 0xe3ec, 0xd5d5, 0xd0ec, 0xa99f, 0xaa9f, 0xab9f, 0xac9f, 0xad9f, 0xf3d6, 0xae9f, 0xaf9f, 0xb09f, 0xd2ec, 0xceec, 0xb19f, 0xb29f, 0xb39f, 0xb49f, 0xd4ec, 0xb59f, 0xd5ec, 0xb69f, 0xb79f, 0xbfc9, 0xb89f, 0xb99f, 0xba9f, 0xbb9f, 0xbc9f, 0xbd9f, 0xa8cf, 0xbe9f, 0xbf9f, 0xc09f, 0xc19f, 0xc29f, 0xdcd0, 0xc39f, 0xc49f, 0xc59f, 0xc69f, 0xacd1, 0xc79f, 0xc89f, 0xc99f, 0xca9f, 0xdbc8, 0xcb9f, 0xcc9f, 0xcd9f, 0xd6ec, 0xf5ce, 0xce9f, 0xcf9f, 0xd09f, 0xd19f, 0xd29f, 0xecca, 0xdaec, 0xd39f, 0xd49f, 0xd59f, 0xd69f, 0xd79f, 0xd89f, 0xd99f, 0xd9ec, 0xda9f, 0xdb9f, 0xdc9f, 0xbeb0, 0xdd9f, 0xde9f, 0xdf9f, 0xe09f, 0xe19f, 0xe29f, 0xd7ec, 0xe39f, 0xd8ec, 0xe49f, 0xe59f, 0xe69f, 0xe4ec, 0xe79f, 0xe89f, 0xe99f, 0xea9f, 0xeb9f, 0xec9f, 0xed9f, 0xee9f, 0xef9f, 0xbcc8, 0xf09f, 0xf19f, 0xf29f, 0xf39f, 0xf49f, 0xf59f, 0xf69f, 0xf79f, 0xf89f, 0xf99f, 0xc7c1, 0xfa9f, 0xfb9f, 0xfc9f, 0xfd9f, 0xfe9f, 0xdcec, 0xe0d1, 0x40a0, 0x41a0, 0x42a0, 0x43a0, 0x44a0, 0x45a0, 0x46a0, 0x47a0, 0x48a0, 0x49a0, 0xdbec, 0x4aa0, 0x4ba0, 0x4ca0, 0x4da0, 0xefd4, 0x4ea0, 0xddec, 0x4fa0, 0x50a0, 0x51a0, 0x52a0, 0x53a0, 0x54a0, 0xc6db, 0x55a0, 0x56a0, 0x57a0, 0x58a0, 0x59a0, 0x5aa0, 0x5ba0, 0x5ca0, 0x5da0, 0x5ea0, 0xdeec, 0x5fa0, 0x60a0, 0x61a0, 0x62a0, 0x63a0, 0x64a0, 0x65a0, 0x66a0, 0x67a0, 0x68a0, 0x69a0, 0x6aa0, 0xacb1, 0x6ba0, 0x6ca0, 0x6da0, 0x6ea0, 0x6fa0, 0x70a0, 0x71a0, 0x72a0, 0x73a0, 0x74a0, 0x75a0, 0x76a0, 0x77a0, 0x78a0, 0x79a0, 0x7aa0, 0x7ba0, 0x7ca0, 0x7da0, 0x7ea0, 0x80a0, 0x81a0, 0xdfec, 0x82a0, 0x83a0, 0x84a0, 0x85a0, 0x86a0, 0x87a0, 0x88a0, 0x89a0, 0x8aa0, 0x8ba0, 0xe0ec, 0x8ca0, 0xa6d7, 0x8da0, 0xc0c5, 0x8ea0, 0x8fa0, 0x90a0, 0xbceb, 0xaeb0, 0x91a0, 0x92a0, 0x93a0, 0xf4be, 0xb8b8, 0xafd2, 0xd6b0, 0xf9b5, 0x94a0, 0xb3d8, 0x95a0, 0xaccb, 0x96a0, 0xdde3, 0x97a0, 0x98a0, 0x99a0, 0x9aa0, 0x9ba0, 0x9ca0, 0x9da0, 0xacc6, 0xe6b0, 0x9ea0, 0x9fa0, 0xa0a0, 0xc6c5, 0xb9eb, 0xa1a0, 0xa2a0, 0xa3a0, 0xa4a0, 0xbaeb, 0xa5a0, 0xa6a0, 0xa7a0, 0xbbeb, 0xa8a0, 0xa9a0, 0xc0d1, 0xaaa0, 0xa3c5, 0xaba0, 0xf2ea, 0xaca0, 0xb2c4, 0xada0, 0xb5c4, 0xcec0, 0xaea0, 0xafa0, 0xb0a0, 0xf3ea, 0xc1c4, 0xb1a0, 0xefce, 0xb2a0, 0xb3a0, 0xb4a0, 0xb5a0, 0xf0ea, 0xf4ea, 0xb6a0, 0xb7a0, 0xfcc9, 0xb8a0, 0xb9a0, 0xa3c7, 0xbaa0, 0xbba0, 0xbca0, 0xd8cc, 0xfece, 0xbda0, 0xbea0, 0xbfa0, 0xf5ea, 0xf6ea, 0xaccf, 0xe7c0, 0xc0a0, 0xc1a0, 0xf7ea, 0xc2a0, 0xc3a0, 0xc4a0, 0xc5a0, 0xc6a0, 0xbfb6, 0xf8ea, 0xc7a0, 0xf9ea, 0xc8a0, 0xfaea, 0xc9a0, 0xcaa0, 0xfbea, 0xcba0, 0xcca0, 0xcda0, 0xcea0, 0xcfa0, 0xd0a0, 0xd1a0, 0xd2a0, 0xd3a0, 0xd4a0, 0xd5a0, 0xd6a0, 0xf1ea, 0xd7a0, 0xd8a0, 0xd9a0, 0xdaa0, 0xdba0, 0xdca0, 0xdda0, 0xdea0, 0xdfa0, 0xe0a0, 0xe1a0, 0xe2a0, 0xaec8, 0xebe1, 0xe3a0, 0xb8b7, 0xece1, 0xe4a0, 0xe5a0, 0xe6a0, 0xede1, 0xe7a0, 0xb4d7, 0xeee1, 0xefe1, 0xccd3, 0xe8a0, 0xe9a0, 0xeaa0, 0xeba0, 0xeca0, 0xeda0, 0xeea0, 0xf1e1, 0xf1bf, 0xf0e1, 0xd2b5, 0xefa0, 0xf0a0, 0xf1a0, 0xb7b1, 0xf2a0, 0xf3a0, 0xf4a0, 0xf5a0, 0xf3e1, 0xf2e1, 0xf6a0, 0xfcba, 0xf7a0, 0xf4e1, 0xf8a0, 0xf9a0, 0xfaa0, 0xfba0, 0xb7b9, 0xfca0, 0xd1be, 0xfda0, 0xfea0, 0x40aa, 0x41aa, 0xfcc4, 0x42aa, 0xddba, 0xc6bd, 0x43aa, 0x44aa, 0x45aa, 0x46aa, 0x47aa, 0x48aa, 0xf5e1, 0xf7e1, 0x49aa, 0x4aaa, 0xc0b6, 0xc1cf, 0xa8ca, 0xf6e1, 0xf8d5, 0xfcd3, 0xf8e1, 0xfce1, 0xf9e1, 0x4baa, 0x4caa, 0xfae1, 0xeac0, 0x4daa, 0xfee1, 0xa1e2, 0xc7c0, 0x4eaa, 0x4faa, 0x50aa, 0x51aa, 0xfbe1, 0x52aa, 0xfde1, 0x53aa, 0x54aa, 0x55aa, 0x56aa, 0x57aa, 0x58aa, 0xa5e2, 0x59aa, 0x5aaa, 0x5baa, 0xd4c1, 0x5caa, 0x5daa, 0x5eaa, 0x5faa, 0xa3e2, 0x60aa, 0xa8e2, 0xfeb2, 0xa2e2, 0x61aa, 0x62aa, 0x63aa, 0xcdc3, 0xc2b2, 0xa7e2, 0xa6e2, 0x64aa, 0x65aa, 0xa4e2, 0xa9e2, 0x66aa, 0x67aa, 0xabe2, 0x68aa, 0x69aa, 0x6aaa, 0xc9d0, 0xedd6, 0xa8c3, 0xace2, 0x6baa, 0xd7cf, 0x6caa, 0x6daa, 0xaee2, 0x6eaa, 0x6faa, 0xefba, 0x70aa, 0x71aa, 0xe0e9, 0xade2, 0xaae2, 0x72aa, 0x73aa, 0x74aa, 0x75aa, 0xabbb, 0xb3d4, 0x76aa, 0x77aa, 0x78aa, 0x79aa, 0x7aaa, 0x7baa, 0x7caa, 0x7daa, 0x7eaa, 0x80aa, 0x81aa, 0x82aa, 0x83aa, 0xb0e2, 0x84aa, 0x85aa, 0xafe2, 0x86aa, 0xe1e9, 0x87aa, 0x88aa, 0x89aa, 0x8aaa, 0xb1e2, 0x8baa, 0x8caa, 0x8daa, 0x8eaa, 0x8faa, 0x90aa, 0x91aa, 0x92aa, 0xb2e2, 0x93aa, 0x94aa, 0x95aa, 0x96aa, 0x97aa, 0x98aa, 0x99aa, 0x9aaa, 0x9baa, 0x9caa, 0x9daa, 0xb3e2, 0xa1cc, 0x9eaa, 0xb4e2, 0x9faa, 0xa0aa, 0x40ab, 0x41ab, 0x42ab, 0x43ab, 0x44ab, 0x45ab, 0x46ab, 0x47ab, 0x48ab, 0x49ab, 0x4aab, 0x4bab, 0xb5e2, 0x4cab, 0x4dab, 0x4eab, 0x4fab, 0x50ab, 0xfed0, 0x51ab, 0x52ab, 0xcac2, 0x53ab, 0xf1d3, 0x54ab, 0xf5cd, 0x55ab, 0x56ab, 0xe0e7, 0x57ab, 0x58ab, 0xe1e7, 0x59ab, 0x5aab, 0x5bab, 0x5cab, 0xc1be, 0x5dab, 0x5eab, 0x5fab, 0x60ab, 0xeac2, 0x61ab, 0x62ab, 0x63ab, 0xe4e7, 0x64ab, 0x65ab, 0xe3e7, 0x66ab, 0x67ab, 0x68ab, 0x69ab, 0x6aab, 0x6bab, 0xe6cd, 0x6cab, 0xb5c3, 0x6dab, 0x6eab, 0xe2e7, 0xb7bb, 0xd6cf, 0x6fab, 0xe1c1, 0xe9e7, 0x70ab, 0x71ab, 0x72ab, 0xe8e7, 0x73ab, 0x74ab, 0xf4e7, 0xa3b2, 0x75ab, 0x76ab, 0x77ab, 0x78ab, 0xeae7, 0x79ab, 0xe6e7, 0x7aab, 0x7bab, 0x7cab, 0x7dab, 0x7eab, 0xece7, 0xebe7, 0xbac9, 0x80ab, 0x81ab, 0xe4d5, 0x82ab, 0xe5e7, 0xa9b7, 0xe7e7, 0x83ab, 0x84ab, 0x85ab, 0x86ab, 0x87ab, 0x88ab, 0x89ab, 0xeee7, 0x8aab, 0x8bab, 0x8cab, 0x8dab, 0xf3e7, 0x8eab, 0xe9d6, 0x8fab, 0x90ab, 0x91ab, 0x92ab, 0xede7, 0x93ab, 0xf2e7, 0x94ab, 0xf1e7, 0x95ab, 0x96ab, 0x97ab, 0xe0b0, 0x98ab, 0x99ab, 0x9aab, 0x9bab, 0xf5e7, 0x9cab, 0x9dab, 0x9eab, 0x9fab, 0xa0ab, 0x40ac, 0x41ac, 0x42ac, 0x43ac, 0x44ac, 0x45ac, 0x46ac, 0x47ac, 0x48ac, 0x49ac, 0x4aac, 0xf2c7, 0x4bac, 0xc5c0, 0xedc0, 0x4cac, 0x4dac, 0xf0c1, 0xf0e7, 0x4eac, 0x4fac, 0x50ac, 0x51ac, 0xf6e7, 0xf6cb, 0x52ac, 0x53ac, 0x54ac, 0x55ac, 0x56ac, 0x57ac, 0x58ac, 0x59ac, 0x5aac, 0xa2e8, 0xa1e8, 0x5bac, 0x5cac, 0x5dac, 0x5eac, 0x5fac, 0x60ac, 0xc1d7, 0x61ac, 0x62ac, 0xfae7, 0xf9e7, 0x63ac, 0xfbe7, 0x64ac, 0xf7e7, 0x65ac, 0xfee7, 0x66ac, 0xfde7, 0x67ac, 0xfce7, 0x68ac, 0x69ac, 0xd5c1, 0xd9c7, 0xfdc5, 0xc3c5, 0x6aac, 0x6bac, 0x6cac, 0x6dac, 0x6eac, 0xedc7, 0x6fac, 0x70ac, 0x71ac, 0x72ac, 0xa3e8, 0x73ac, 0x74ac, 0x75ac, 0x76ac, 0x77ac, 0x78ac, 0x79ac, 0x7aac, 0x7bac, 0x7cac, 0x7dac, 0x7eac, 0x80ac, 0x81ac, 0x82ac, 0x83ac, 0x84ac, 0x85ac, 0x86ac, 0xa6e8, 0x87ac, 0xa5e8, 0x88ac, 0xa7e8, 0xf7ba, 0xf8e7, 0xa4e8, 0x89ac, 0xf0c8, 0xaac9, 0x8aac, 0x8bac, 0x8cac, 0x8dac, 0x8eac, 0x8fac, 0x90ac, 0x91ac, 0x92ac, 0x93ac, 0x94ac, 0x95ac, 0x96ac, 0xa9e8, 0x97ac, 0x98ac, 0xe5b9, 0x99ac, 0x9aac, 0x9bac, 0x9cac, 0x9dac, 0xfed1, 0xa8e8, 0x9eac, 0x9fac, 0xa0ac, 0x40ad, 0x41ad, 0x42ad, 0xaae8, 0x43ad, 0xade8, 0xaee8, 0x44ad, 0xa7c1, 0x45ad, 0x46ad, 0x47ad, 0xafe8, 0x48ad, 0x49ad, 0x4aad, 0xb0e8, 0x4bad, 0x4cad, 0xace8, 0x4dad, 0xb4e8, 0x4ead, 0x4fad, 0x50ad, 0x51ad, 0x52ad, 0x53ad, 0x54ad, 0x55ad, 0x56ad, 0x57ad, 0x58ad, 0xabe8, 0x59ad, 0xb1e8, 0x5aad, 0x5bad, 0x5cad, 0x5dad, 0x5ead, 0x5fad, 0x60ad, 0x61ad, 0xb5e8, 0xb2e8, 0xb3e8, 0x62ad, 0x63ad, 0x64ad, 0x65ad, 0x66ad, 0x67ad, 0x68ad, 0x69ad, 0x6aad, 0x6bad, 0x6cad, 0x6dad, 0x6ead, 0x6fad, 0x70ad, 0x71ad, 0xb7e8, 0x72ad, 0x73ad, 0x74ad, 0x75ad, 0x76ad, 0x77ad, 0x78ad, 0x79ad, 0x7aad, 0x7bad, 0x7cad, 0x7dad, 0x7ead, 0x80ad, 0x81ad, 0x82ad, 0x83ad, 0x84ad, 0x85ad, 0x86ad, 0x87ad, 0x88ad, 0x89ad, 0xb6e8, 0x8aad, 0x8bad, 0x8cad, 0x8dad, 0x8ead, 0x8fad, 0x90ad, 0x91ad, 0x92ad, 0xcfb9, 0x93ad, 0xacf0, 0x94ad, 0xadf0, 0x95ad, 0xb0c6, 0xeab0, 0xbfc8, 0x96ad, 0xdfcd, 0x97ad, 0x98ad, 0x99ad, 0x9aad, 0x9bad, 0x9cad, 0x9dad, 0xcdce, 0xb1ea, 0x9ead, 0x9fad, 0xa0ad, 0x40ae, 0xb2ea, 0x41ae, 0xbfc6, 0xc9b4, 0x42ae, 0x43ae, 0x44ae, 0x45ae, 0x46ae, 0x47ae, 0x48ae, 0xb3ea, 0x49ae, 0x4aae, 0x4bae, 0x4cae, 0xe7d5, 0x4dae, 0x4eae, 0x4fae, 0x50ae, 0x51ae, 0x52ae, 0x53ae, 0x54ae, 0xf9dd, 0x55ae, 0xb4ea, 0x56ae, 0xb5ea, 0x57ae, 0xb6ea, 0x58ae, 0x59ae, 0x5aae, 0x5bae, 0xcab8, 0xb0df, 0xf5c9, 0x5cae, 0xf0cc, 0x5dae, 0x5eae, 0xfac9, 0x5fae, 0x60ae, 0x61ae, 0x62ae, 0x63ae, 0xfbc9, 0x64ae, 0x65ae, 0xc3d3, 0xa6cb, 0x66ae, 0xa6b8, 0xaef0, 0xc2b1, 0x67ae, 0xb8e5, 0xefcc, 0xc9d3, 0xd7bc, 0xeac9, 0x68ae, 0xe7b5, 0x69ae, 0xd0c4, 0xe9b5, 0x6aae, 0xaeee, 0xadbb, 0x6bae, 0x6cae, 0xdee7, 0x6dae, 0xafee, 0x6eae, 0x6fae, 0x70ae, 0x71ae, 0xa9b3, 0x72ae, 0x73ae, 0xb2ee, 0x74ae, 0x75ae, 0xb1ee, 0xe7bd, 0x76ae, 0xb0ee, 0xb7ce, 0x77ae, 0x78ae, 0x79ae, 0x7aae, 0xcfc5, 0x7bae, 0x7cae, 0x7dae, 0x7eae, 0xf4c1, 0xcedb, 0xb3ee, 0xf3d0, 0x80ae, 0x81ae, 0x82ae, 0x83ae, 0x84ae, 0x85ae, 0x86ae, 0x87ae, 0xd4c2, 0xe8c6, 0x88ae, 0x89ae, 0x8aae, 0xacb7, 0x8bae, 0x8cae, 0x8dae, 0x8eae, 0x8fae, 0x90ae, 0x91ae, 0xb4ee, 0x92ae, 0xebb3, 0x93ae, 0x94ae, 0x95ae, 0xfbbb, 0xb5ee, 0x96ae, 0x97ae, 0x98ae, 0x99ae, 0x9aae, 0xdce7, 0x9bae, 0x9cae, 0x9dae, 0xb6ee, 0x9eae, 0x9fae, 0xaebd, 0xa0ae, 0x40af, 0x41af, 0x42af, 0xe2f1, 0x43af, 0x44af, 0x45af, 0xe8ca, 0x46af, 0xc9d2, 0xdaf0, 0x47af, 0xdbf0, 0x48af, 0xdcf0, 0xc6c1, 0x49af, 0xedb8, 0xcebe, 0x4aaf, 0x4baf, 0xdef0, 0x4caf, 0xb1c5, 0xddf0, 0xf1d1, 0x4daf, 0xe0f0, 0xccb0, 0xeabd, 0x4eaf, 0x4faf, 0x50af, 0x51af, 0x52af, 0xdfd2, 0xdff0, 0x53af, 0xafb4, 0xe8b7, 0xe6f0, 0xe5f0, 0xa3c6, 0xe1f0, 0xe2f0, 0xc3b4, 0x54af, 0x55af, 0xe3f0, 0xeed5, 0x56af, 0x57af, 0xdbcc, 0xd2be, 0xb2bc, 0x58af, 0x59af, 0x5aaf, 0xe8f0, 0xe7f0, 0xe4f0, 0xa1b2, 0x5baf, 0xa2d6, 0xb8d3, 0xb7be, 0xacc8, 0x5caf, 0x5daf, 0xeaf0, 0x5eaf, 0x5faf, 0x60af, 0x61af, 0xf7d1, 0x62af, 0xccd6, 0xdbba, 0xe9f0, 0x63af, 0xbbb6, 0x64af, 0x65af, 0xb4cd, 0x66af, 0x67af, 0xa6c6, 0x68af, 0x69af, 0x6aaf, 0xa1c1, 0xebf0, 0xeef0, 0x6baf, 0xedf0, 0xf0f0, 0xecf0, 0x6caf, 0xbebb, 0xeff0, 0x6daf, 0x6eaf, 0x6faf, 0x70af, 0xb5cc, 0xf2f0, 0x71af, 0x72af, 0xd5b3, 0x73af, 0x74af, 0x75af, 0x76af, 0xd4b1, 0x77af, 0x78af, 0xf3f0, 0x79af, 0x7aaf, 0xf4f0, 0xf6f0, 0xe1b4, 0x7baf, 0xf1f0, 0x7caf, 0xf7f0, 0x7daf, 0x7eaf, 0x80af, 0x81af, 0xfaf0, 0x82af, 0xf8f0, 0x83af, 0x84af, 0x85af, 0xf5f0, 0x86af, 0x87af, 0x88af, 0x89af, 0xfdf0, 0x8aaf, 0xf9f0, 0xfcf0, 0xfef0, 0x8baf, 0xa1f1, 0x8caf, 0x8daf, 0x8eaf, 0xc1ce, 0xa4f1, 0x8faf, 0xa3f1, 0x90af, 0xf6c1, 0xfbf0, 0xddca, 0x91af, 0x92af, 0xf1b4, 0xf1b1, 0xb1cc, 0x93af, 0xa6f1, 0x94af, 0x95af, 0xa7f1, 0x96af, 0x97af, 0xacf1, 0xced5, 0xa9f1, 0x98af, 0x99af, 0xb3c8, 0x9aaf, 0x9baf, 0x9caf, 0xa2f1, 0x9daf, 0xabf1, 0xa8f1, 0xa5f1, 0x9eaf, 0x9faf, 0xaaf1, 0xa0af, 0x40b0, 0x41b0, 0x42b0, 0x43b0, 0x44b0, 0x45b0, 0x46b0, 0xa9b0, 0xadf1, 0x47b0, 0x48b0, 0x49b0, 0x4ab0, 0x4bb0, 0x4cb0, 0xaff1, 0x4db0, 0xb1f1, 0x4eb0, 0x4fb0, 0x50b0, 0x51b0, 0x52b0, 0xb0f1, 0x53b0, 0xaef1, 0x54b0, 0x55b0, 0x56b0, 0x57b0, 0xa2d1, 0x58b0, 0x59b0, 0x5ab0, 0x5bb0, 0x5cb0, 0x5db0, 0x5eb0, 0xb2f1, 0x5fb0, 0x60b0, 0x61b0, 0xb3f1, 0x62b0, 0x63b0, 0x64b0, 0x65b0, 0x66b0, 0x67b0, 0x68b0, 0x69b0, 0xefb9, 0x6ab0, 0x6bb0, 0xc7b5, 0x6cb0, 0xd7b0, 0xd9b0, 0x6db0, 0x6eb0, 0x6fb0, 0xedd4, 0x70b0, 0xc4b5, 0x71b0, 0xd4bd, 0xcabb, 0xa7f0, 0x72b0, 0x73b0, 0xdeb8, 0x74b0, 0x75b0, 0xa8f0, 0x76b0, 0x77b0, 0xa8b0, 0x78b0, 0xa9f0, 0x79b0, 0x7ab0, 0xeecd, 0x7bb0, 0x7cb0, 0xaaf0, 0x7db0, 0x7eb0, 0x80b0, 0x81b0, 0x82b0, 0x83b0, 0x84b0, 0x85b0, 0x86b0, 0x87b0, 0xabf0, 0x88b0, 0x89b0, 0x8ab0, 0x8bb0, 0x8cb0, 0x8db0, 0x8eb0, 0x8fb0, 0x90b0, 0xa4c6, 0x91b0, 0x92b0, 0xe5d6, 0xe4f1, 0x93b0, 0xe5f1, 0x94b0, 0x95b0, 0x96b0, 0x97b0, 0x98b0, 0x99b0, 0x9ab0, 0x9bb0, 0x9cb0, 0x9db0, 0xf3c3, 0x9eb0, 0x9fb0, 0xdbd3, 0xa0b0, 0x40b1, 0xd1d6, 0xe8c5, 0x41b1, 0xafd3, 0x42b1, 0xe6d2, 0x43b1, 0x44b1, 0xc1ee, 0xbbb0, 0xb5d5, 0xced1, 0xe0bc, 0xd0ba, 0x45b1, 0xf8bf, 0x46b1, 0xc7b8, 0xc1b5, 0xccc5, 0x47b1, 0x48b1, 0xa2ca, 0x49b1, 0x4ab1, 0x4bb1, 0xcbc3, 0x4cb1, 0x4db1, 0x4eb1, 0x4fb1, 0x50b1, 0xc2ee, 0x51b1, 0x52b1, 0x53b1, 0x54b1, 0x55b1, 0x56b1, 0x57b1, 0x58b1, 0xbfc4, 0xa2b6, 0x59b1, 0xeced, 0xa4c3, 0x5ab1, 0xb1d6, 0x5bb1, 0x5cb1, 0x5db1, 0xe0cf, 0xefed, 0x5eb1, 0x5fb1, 0xcec5, 0x60b1, 0xdcb6, 0x61b1, 0x62b1, 0xa1ca, 0x63b1, 0x64b1, 0xeded, 0x65b1, 0x66b1, 0xf0ed, 0xf1ed, 0xbcc3, 0x67b1, 0xb4bf, 0x68b1, 0xeeed, 0x69b1, 0x6ab1, 0x6bb1, 0x6cb1, 0x6db1, 0x6eb1, 0x6fb1, 0x70b1, 0x71b1, 0x72b1, 0x73b1, 0xf4ed, 0xf2ed, 0x74b1, 0x75b1, 0x76b1, 0x77b1, 0xe6d5, 0xdfc3, 0x78b1, 0xf3ed, 0x79b1, 0x7ab1, 0x7bb1, 0xf6ed, 0x7cb1, 0xa3d5, 0xa3d1, 0x7db1, 0x7eb1, 0x80b1, 0xf5ed, 0x81b1, 0xd0c3, 0x82b1, 0x83b1, 0x84b1, 0x85b1, 0x86b1, 0xf7ed, 0xf4bf, 0xecbe, 0xf8ed, 0x87b1, 0xf7cc, 0x88b1, 0xdbd1, 0x89b1, 0x8ab1, 0x8bb1, 0xc5d7, 0xf6d5, 0x8cb1, 0xfced, 0x8db1, 0x8eb1, 0x8fb1, 0xfbed, 0x90b1, 0x91b1, 0x92b1, 0x93b1, 0x94b1, 0x95b1, 0x96b1, 0x97b1, 0xf9ed, 0xfaed, 0x98b1, 0x99b1, 0x9ab1, 0x9bb1, 0x9cb1, 0x9db1, 0x9eb1, 0x9fb1, 0xfded, 0xa6be, 0xa0b1, 0x40b2, 0x41b2, 0x42b2, 0x43b2, 0xafcb, 0xa1ee, 0xbdb6, 0x44b2, 0xa2ee, 0xc0c4, 0x45b2, 0xfeed, 0x46b2, 0x47b2, 0xdebd, 0xc7b2, 0x48b2, 0x49b2, 0x4ab2, 0x4bb2, 0x4cb2, 0x4db2, 0x4eb2, 0x4fb2, 0x50b2, 0x51b2, 0x52b2, 0x53b2, 0xc3b6, 0x54b2, 0x55b2, 0x56b2, 0xa5ee, 0xbad8, 0xa3ee, 0xa6ee, 0x57b2, 0x58b2, 0x59b2, 0xe9c3, 0xf2b3, 0x5ab2, 0x5bb2, 0x5cb2, 0x5db2, 0x5eb2, 0x5fb2, 0xa7ee, 0xa4ee, 0xb9cf, 0x60b2, 0x61b2, 0xa8ee, 0xf7c2, 0x62b2, 0x63b2, 0x64b2, 0x65b2, 0x66b2, 0x67b2, 0x68b2, 0x69b2, 0x6ab2, 0x6bb2, 0x6cb2, 0x6db2, 0xa9ee, 0xaaee, 0x6eb2, 0xabde, 0x6fb2, 0x70b2, 0xb3c6, 0x71b2, 0xc6c7, 0x72b2, 0xf5d6, 0xc9b5, 0x73b2, 0xb2cb, 0x74b2, 0x75b2, 0x76b2, 0xabee, 0x77b2, 0x78b2, 0xabcd, 0x79b2, 0xacee, 0x7ab2, 0x7bb2, 0x7cb2, 0x7db2, 0x7eb2, 0xb0d5, 0x80b2, 0xadee, 0x81b2, 0xc4f6, 0x82b2, 0x83b2, 0x84b2, 0x85b2, 0x86b2, 0x87b2, 0x88b2, 0x89b2, 0x8ab2, 0x8bb2, 0x8cb2, 0x8db2, 0x8eb2, 0xc7db, 0x8fb2, 0x90b2, 0x91b2, 0x92b2, 0x93b2, 0x94b2, 0x95b2, 0x96b2, 0x97b2, 0xa3b4, 0x98b2, 0x99b2, 0x9ab2, 0xacc3, 0xe6f1, 0x9bb2, 0x9cb2, 0x9db2, 0x9eb2, 0x9fb2, 0xb8ca, 0xd3d2, 0xa0b2, 0xaad6, 0x40b3, 0xf2ef, 0x41b3, 0xd8be, 0x42b3, 0xc3bd, 0xf3ef, 0xccb6, 0xabb0, 0x43b3, 0x44b3, 0x45b3, 0x46b3, 0xafca, 0x47b3, 0x48b3, 0xb6ed, 0x49b3, 0xb7ed, 0x4ab3, 0x4bb3, 0x4cb3, 0x4db3, 0xf9ce, 0xafb7, 0xf3bf, 0xb8ed, 0xebc2, 0xb0c9, 0x4eb3, 0x4fb3, 0x50b3, 0x51b3, 0x52b3, 0x53b3, 0xb9ed, 0x54b3, 0x55b3, 0xf6c6, 0xb3bf, 0x56b3, 0x57b3, 0x58b3, 0xbced, 0xf8c5, 0x59b3, 0xd0d1, 0x5ab3, 0xa9d7, 0xbaed, 0xbbed, 0x5bb3, 0xe2d1, 0x5cb3, 0xbfed, 0xc0ed, 0x5db3, 0xc4ed, 0x5eb3, 0x5fb3, 0x60b3, 0xc8ed, 0x61b3, 0xc6ed, 0xceed, 0xe8d5, 0x62b3, 0xc9ed, 0x63b3, 0x64b3, 0xc7ed, 0xbeed, 0x65b3, 0x66b3, 0xe9c5, 0x67b3, 0x68b3, 0x69b3, 0xc6c6, 0x6ab3, 0x6bb3, 0xe9c9, 0xd2d4, 0xc1ed, 0xc2ed, 0xc3ed, 0xc5ed, 0x6cb3, 0xf9c0, 0x6db3, 0xa1b4, 0x6eb3, 0x6fb3, 0x70b3, 0x71b3, 0xe8b9, 0x72b3, 0xd0ed, 0x73b3, 0x74b3, 0x75b3, 0x76b3, 0xd1ed, 0x77b3, 0xcaed, 0x78b3, 0xcfed, 0x79b3, 0xf8ce, 0x7ab3, 0x7bb3, 0xb6cb, 0xcced, 0xcded, 0x7cb3, 0x7db3, 0x7eb3, 0x80b3, 0x81b3, 0xf5cf, 0x82b3, 0x83b3, 0x84b3, 0x85b3, 0x86b3, 0x87b3, 0x88b3, 0x89b3, 0x8ab3, 0x8bb3, 0x8cb3, 0x8db3, 0xd2ed, 0xf2c1, 0xb2d3, 0xcbed, 0xb7c8, 0x8eb3, 0x8fb3, 0x90b3, 0x91b3, 0x92b3, 0x93b3, 0x94b3, 0x95b3, 0xefbc, 0x96b3, 0x97b3, 0x98b3, 0x99b3, 0xf0c5, 0x9ab3, 0x9bb3, 0x9cb3, 0x9db3, 0x9eb3, 0x9fb3, 0xa0b3, 0x40b4, 0x41b4, 0x42b4, 0xd6ed, 0x43b4, 0xefb5, 0x44b4, 0x45b4, 0xb5c2, 0xadb0, 0xe9cb, 0x46b4, 0x47b4, 0xaeb1, 0x48b4, 0xd4ed, 0x49b4, 0x4ab4, 0x4bb4, 0xebcd, 0xe2b5, 0x4cb4, 0xd5ed, 0xd3ed, 0xd7ed, 0x4db4, 0x4eb4, 0xfab5, 0x4fb4, 0xd8ed, 0x50b4, 0xd9ed, 0x51b4, 0xdced, 0x52b4, 0xccb1, 0x53b4, 0x54b4, 0x55b4, 0x56b4, 0x57b4, 0x58b4, 0x59b4, 0x5ab4, 0xf6c5, 0xeebc, 0xdaed, 0xbccc, 0xeab2, 0x5bb4, 0x5cb4, 0x5db4, 0x5eb4, 0xdbed, 0x5fb4, 0x60b4, 0x61b4, 0x62b4, 0xebc4, 0x63b4, 0x64b4, 0xc5b4, 0x65b4, 0x66b4, 0x67b4, 0xf5b0, 0x68b4, 0x69b4, 0x6ab4, 0xdfed, 0xdac0, 0xe8b4, 0x6bb4, 0x6cb4, 0x6db4, 0x6eb4, 0xcdc5, 0x6fb4, 0x70b4, 0x71b4, 0xdded, 0xc4bf, 0x72b4, 0x73b4, 0x74b4, 0xdeed, 0x75b4, 0x76b4, 0x77b4, 0x78b4, 0x79b4, 0x7ab4, 0x7bb4, 0x7cb4, 0x7db4, 0x7eb4, 0x80b4, 0x81b4, 0x82b4, 0x83b4, 0xa5c4, 0x84b4, 0x85b4, 0x86b4, 0xe0ed, 0x87b4, 0x88b4, 0x89b4, 0x8ab4, 0x8bb4, 0xe1ed, 0x8cb4, 0xe3ed, 0x8db4, 0x8eb4, 0xd7c1, 0x8fb4, 0x90b4, 0xc7bb, 0x91b4, 0x92b4, 0x93b4, 0x94b4, 0x95b4, 0x96b4, 0xb8bd, 0x97b4, 0x98b4, 0x99b4, 0xe2ed, 0x9ab4, 0x9bb4, 0x9cb4, 0x9db4, 0x9eb4, 0x9fb4, 0xa0b4, 0x40b5, 0x41b5, 0x42b5, 0x43b5, 0x44b5, 0x45b5, 0xe4ed, 0x46b5, 0x47b5, 0x48b5, 0x49b5, 0x4ab5, 0x4bb5, 0x4cb5, 0x4db5, 0x4eb5, 0x4fb5, 0xe6ed, 0x50b5, 0x51b5, 0x52b5, 0x53b5, 0x54b5, 0xe5ed, 0x55b5, 0x56b5, 0x57b5, 0x58b5, 0x59b5, 0x5ab5, 0x5bb5, 0x5cb5, 0x5db5, 0x5eb5, 0x5fb5, 0x60b5, 0x61b5, 0x62b5, 0x63b5, 0xe7ed, 0x64b5, 0x65b5, 0x66b5, 0x67b5, 0x68b5, 0xbeca, 0xeaec, 0xf1c0, 0x69b5, 0xe7c9, 0x6ab5, 0xebec, 0xeec6, 0x6bb5, 0x6cb5, 0x6db5, 0x6eb5, 0xecec, 0x6fb5, 0xedc6, 0xedec, 0x70b5, 0x71b5, 0x72b5, 0x73b5, 0x74b5, 0x75b5, 0x76b5, 0x77b5, 0x78b5, 0xf0ec, 0x79b5, 0x7ab5, 0xe6d7, 0xf3ec, 0x7bb5, 0x7cb5, 0xf1ec, 0xeeec, 0xefec, 0xa3d7, 0xf1c9, 0xeecb, 0xf4ec, 0x7db5, 0xf2ec, 0x7eb5, 0x80b5, 0xe9cf, 0x81b5, 0xf6ec, 0xb1c6, 0x82b5, 0x83b5, 0x84b5, 0x85b5, 0xc0bc, 0x86b5, 0xf5ec, 0x87b5, 0x88b5, 0x89b5, 0x8ab5, 0x8bb5, 0x8cb5, 0x8db5, 0xbbb5, 0xf6bb, 0x8eb5, 0xf7ec, 0x8fb5, 0x90b5, 0x91b5, 0x92b5, 0x93b5, 0xf7d9, 0xfbbd, 0x94b5, 0x95b5, 0xbbc2, 0xf8ec, 0x96b5, 0x97b5, 0x98b5, 0x99b5, 0xf9ec, 0x9ab5, 0x9bb5, 0x9cb5, 0x9db5, 0xa3b8, 0x9eb5, 0x9fb5, 0xa0b5, 0x40b6, 0x41b6, 0x42b6, 0x43b6, 0x44b6, 0x45b6, 0x46b6, 0xfaec, 0x47b6, 0x48b6, 0x49b6, 0x4ab6, 0x4bb6, 0x4cb6, 0x4db6, 0x4eb6, 0x4fb6, 0x50b6, 0x51b6, 0x52b6, 0xfbec, 0x53b6, 0x54b6, 0x55b6, 0x56b6, 0x57b6, 0x58b6, 0x59b6, 0x5ab6, 0x5bb6, 0x5cb6, 0x5db6, 0xfcec, 0x5eb6, 0x5fb6, 0x60b6, 0x61b6, 0x62b6, 0xedd3, 0xaed8, 0xebc0, 0x63b6, 0xddc7, 0xccba, 0x64b6, 0xe3d0, 0xbdcb, 0x65b6, 0xbacd, 0x66b6, 0x67b6, 0xd1b8, 0x68b6, 0x69b6, 0xfcb1, 0x6ab6, 0xefc7, 0x6bb6, 0xd6d6, 0x6cb6, 0x6db6, 0x6eb6, 0xc6bf, 0xebc3, 0x6fb6, 0x70b6, 0xf5ef, 0x71b6, 0x72b6, 0xd8c3, 0x73b6, 0x74b6, 0x75b6, 0x76b6, 0x77b6, 0x78b6, 0xe2d7, 0x79b6, 0x7ab6, 0x7bb6, 0xf7ef, 0xd3b3, 0x7cb6, 0xd8c7, 0xedd1, 0x7db6, 0xc8d6, 0x7eb6, 0xf8ef, 0x80b6, 0xf6ef, 0x81b6, 0xfdbb, 0xc6b3, 0x82b6, 0x83b6, 0x84b6, 0x85b6, 0x86b6, 0x87b6, 0x88b6, 0xd5bd, 0x89b6, 0x8ab6, 0xc6d2, 0x8bb6, 0xe0bb, 0x8cb6, 0x8db6, 0xa1cf, 0x8eb6, 0xfcef, 0xfbef, 0x8fb6, 0x90b6, 0xf9ef, 0x91b6, 0x92b6, 0x93b6, 0x94b6, 0xccb3, 0x95b6, 0xd4c9, 0xb0cb, 0x96b6, 0x97b6, 0x98b6, 0x99b6, 0x9ab6, 0xfeef, 0x9bb6, 0x9cb6, 0xdeb0, 0x9db6, 0x9eb6, 0xc9d6, 0x9fb6, 0xa0b6, 0x40b7, 0xfdef, 0x41b7, 0xedb3, 0x42b7, 0x43b7, 0xd5f6, 0x44b7, 0x45b7, 0x46b7, 0x47b7, 0x48b7, 0x49b7, 0x4ab7, 0x4bb7, 0x4cb7, 0x4db7, 0x4eb7, 0x4fb7, 0x50b7, 0x51b7, 0x52b7, 0xc8ce, 0x53b7, 0x54b7, 0x55b7, 0xa2f0, 0x56b7, 0xa1f0, 0x57b7, 0xbeb5, 0xdabc, 0xfcbb, 0x58b7, 0xe5b8, 0x59b7, 0x5ab7, 0x5bb7, 0x5cb7, 0x5db7, 0x5eb7, 0xc2c4, 0x5fb7, 0x60b7, 0x61b7, 0x62b7, 0x63b7, 0x64b7, 0x65b7, 0x66b7, 0x67b7, 0x68b7, 0xa3f0, 0x69b7, 0x6ab7, 0x6bb7, 0x6cb7, 0x6db7, 0xebcb, 0x6eb7, 0x6fb7, 0x70b7, 0x71b7, 0x72b7, 0x73b7, 0x74b7, 0x75b7, 0x76b7, 0x77b7, 0x78b7, 0x79b7, 0x7ab7, 0x7bb7, 0x7cb7, 0x7db7, 0x7eb7, 0x80b7, 0x81b7, 0x82b7, 0x83b7, 0x84b7, 0x85b7, 0x86b7, 0xa6f0, 0x87b7, 0x88b7, 0x89b7, 0xa8d1, 0x8ab7, 0xbfbe, 0xeec7, 0xb6f1, 0xb7f1, 0xd5bf, 0x8bb7, 0x8cb7, 0x8db7, 0x8eb7, 0xa9b4, 0xb8f1, 0xbbcd, 0x8fb7, 0xd4c7, 0xadd5, 0x90b7, 0xb9f1, 0x91b7, 0xbaf1, 0x92b7, 0x93b7, 0x94b7, 0x95b7, 0xcfc7, 0x96b7, 0x97b7, 0x98b7, 0xa4d2, 0xcfd6, 0x99b7, 0x9ab7, 0xbbf1, 0xd1bd, 0xb0b4, 0xbdbe, 0x9bb7, 0x9cb7, 0x9db7, 0xdcb4, 0xd1ce, 0x9eb7, 0xdfbf, 0xbdf1, 0x9fb7, 0xa0b7, 0x40b8, 0x41b8, 0xfabf, 0xbcf1, 0x42b8, 0xbff1, 0x43b8, 0x44b8, 0x45b8, 0xbef1, 0xc0f1, 0x46b8, 0x47b8, 0x48b8, 0x49b8, 0x4ab8, 0xc1f1, 0x4bb8, 0x4cb8, 0x4db8, 0x4eb8, 0x4fb8, 0x50b8, 0x51b8, 0x52b8, 0x53b8, 0x54b8, 0x55b8, 0xfec1, 0x56b8, 0x57b8, 0x58b8, 0x59b8, 0x5ab8, 0x5bb8, 0x5cb8, 0x5db8, 0x5eb8, 0x5fb8, 0x60b8, 0xa2c1, 0x61b8, 0x62b8, 0x63b8, 0x64b8, 0x65b8, 0x66b8, 0x67b8, 0x68b8, 0x69b8, 0x6ab8, 0xfaca, 0x6bb8, 0x6cb8, 0xbed5, 0x6db8, 0x6eb8, 0x6fb8, 0x70b8, 0xbabe, 0xb9be, 0xc2d5, 0x71b8, 0x72b8, 0xa2bf, 0x73b8, 0xafcd, 0xb5f1, 0x74b8, 0x75b8, 0x76b8, 0x77b8, 0x78b8, 0x79b8, 0xdfbd, 0x7ab8, 0xcbb6, 0x7bb8, 0x7cb8, 0x7db8, 0x7eb8, 0x80b8, 0x81b8, 0x82b8, 0x83b8, 0x84b8, 0xf1d6, 0xc3f3, 0x85b8, 0x86b8, 0xc4f3, 0x87b8, 0xcdb8, 0x88b8, 0x89b8, 0x8ab8, 0xc6f3, 0xc7f3, 0x8bb8, 0xcab0, 0x8cb8, 0xc5f3, 0x8db8, 0xc9f3, 0xf1cb, 0x8eb8, 0x8fb8, 0x90b8, 0xcbf3, 0x91b8, 0xa6d0, 0x92b8, 0x93b8, 0xcab1, 0xc8f3, 0x94b8, 0x95b8, 0x96b8, 0xcff3, 0x97b8, 0xd1b5, 0x98b8, 0x99b8, 0xd7f3, 0x9ab8, 0xd2f3, 0x9bb8, 0x9cb8, 0x9db8, 0xd4f3, 0xd3f3, 0xfbb7, 0x9eb8, 0xbfb1, 0x9fb8, 0xcef3, 0xcaf3, 0xdab5, 0xa0b8, 0xd0f3, 0x40b9, 0x41b9, 0xd1f3, 0x42b9, 0xd5f3, 0x43b9, 0x44b9, 0x45b9, 0x46b9, 0xcdf3, 0x47b9, 0xe3bc, 0x48b9, 0xfdc1, 0x49b9, 0xd6f3, 0x4ab9, 0x4bb9, 0x4cb9, 0x4db9, 0x4eb9, 0x4fb9, 0xdaf3, 0x50b9, 0xccf3, 0x51b9, 0xc8b5, 0x52b9, 0xeebd, 0xdcf3, 0x53b9, 0x54b9, 0xa4b7, 0xf0bf, 0xfed6, 0xb2cd, 0x55b9, 0xf0b4, 0x56b9, 0xdfb2, 0x57b9, 0xd8f3, 0x58b9, 0xd9f3, 0xb8c9, 0x59b9, 0xddf3, 0x5ab9, 0x5bb9, 0xdef3, 0x5cb9, 0xe1f3, 0x5db9, 0x5eb9, 0x5fb9, 0x60b9, 0x61b9, 0x62b9, 0x63b9, 0x64b9, 0x65b9, 0x66b9, 0x67b9, 0xdff3, 0x68b9, 0x69b9, 0xe3f3, 0xe2f3, 0x6ab9, 0x6bb9, 0xdbf3, 0x6cb9, 0xeabf, 0x6db9, 0xefb3, 0x6eb9, 0xe0f3, 0x6fb9, 0x70b9, 0xa9c7, 0x71b9, 0xf2bc, 0x72b9, 0x73b9, 0x74b9, 0x75b9, 0xebf3, 0x76b9, 0x77b9, 0x78b9, 0x79b9, 0x7ab9, 0x7bb9, 0x7cb9, 0xbfb9, 0x7db9, 0x7eb9, 0xe4f3, 0x80b9, 0x81b9, 0x82b9, 0xadb2, 0xfebb, 0x83b9, 0xe3cb, 0x84b9, 0x85b9, 0x86b9, 0x87b9, 0xedf3, 0xe9f3, 0x88b9, 0x89b9, 0x8ab9, 0xdcb9, 0xeef3, 0x8bb9, 0x8cb9, 0x8db9, 0xe5f3, 0xe6f3, 0xeaf3, 0xe1c2, 0xecf3, 0xeff3, 0xe8f3, 0xfdbc, 0x8eb9, 0x8fb9, 0x90b9, 0xe4cf, 0x91b9, 0x92b9, 0xf0f3, 0x93b9, 0x94b9, 0x95b9, 0xe7f3, 0x96b9, 0x97b9, 0x98b9, 0x99b9, 0x9ab9, 0x9bb9, 0x9cb9, 0x9db9, 0xf2f3, 0x9eb9, 0x9fb9, 0xa0b9, 0x40ba, 0xadd7, 0xaac6, 0x41ba, 0x42ba, 0x43ba, 0x44ba, 0xf3f3, 0x45ba, 0x46ba, 0x47ba, 0x48ba, 0xf1f3, 0x49ba, 0xa8c2, 0x4aba, 0x4bba, 0x4cba, 0x4dba, 0x4eba, 0xddb8, 0xf5f3, 0x4fba, 0x50ba, 0xf4f3, 0x51ba, 0x52ba, 0x53ba, 0xdbb4, 0x54ba, 0x55ba, 0x56ba, 0xf6f3, 0xf7f3, 0x57ba, 0x58ba, 0x59ba, 0xf8f3, 0x5aba, 0x5bba, 0x5cba, 0xbac0, 0x5dba, 0x5eba, 0xe9c0, 0x5fba, 0x60ba, 0x61ba, 0x62ba, 0x63ba, 0xf1c5, 0x64ba, 0x65ba, 0x66ba, 0x67ba, 0xfbf3, 0x68ba, 0xfaf3, 0x69ba, 0x6aba, 0x6bba, 0x6cba, 0x6dba, 0x6eba, 0x6fba, 0x70ba, 0xd8b4, 0x71ba, 0x72ba, 0x73ba, 0xfef3, 0xf9f3, 0x74ba, 0x75ba, 0xfcf3, 0x76ba, 0x77ba, 0x78ba, 0x79ba, 0x7aba, 0x7bba, 0xfdf3, 0x7cba, 0x7dba, 0x7eba, 0x80ba, 0x81ba, 0x82ba, 0x83ba, 0x84ba, 0xa1f4, 0x85ba, 0x86ba, 0x87ba, 0x88ba, 0x89ba, 0x8aba, 0xa3f4, 0xc9bb, 0x8bba, 0x8cba, 0xa2f4, 0x8dba, 0x8eba, 0x8fba, 0x90ba, 0x91ba, 0x92ba, 0x93ba, 0x94ba, 0x95ba, 0x96ba, 0x97ba, 0x98ba, 0x99ba, 0xa4f4, 0x9aba, 0x9bba, 0x9cba, 0x9dba, 0x9eba, 0x9fba, 0xbeb2, 0xa6f4, 0xa5f4, 0xa0ba, 0x40bb, 0x41bb, 0x42bb, 0x43bb, 0x44bb, 0x45bb, 0x46bb, 0x47bb, 0x48bb, 0x49bb, 0xaebc, 0x4abb, 0x4bbb, 0x4cbb, 0x4dbb, 0x4ebb, 0x4fbb, 0x50bb, 0x51bb, 0x52bb, 0x53bb, 0x54bb, 0x55bb, 0x56bb, 0x57bb, 0x58bb, 0x59bb, 0x5abb, 0x5bbb, 0x5cbb, 0x5dbb, 0x5ebb, 0x5fbb, 0x60bb, 0x61bb, 0x62bb, 0x63bb, 0x64bb, 0x65bb, 0x66bb, 0x67bb, 0x68bb, 0x69bb, 0x6abb, 0x6bbb, 0x6cbb, 0x6dbb, 0x6ebb, 0xd7c3, 0xe1d9, 0x6fbb, 0x70bb, 0x71bb, 0x72bb, 0x73bb, 0x74bb, 0xe0c0, 0xccf4, 0xd1d7, 0x75bb, 0x76bb, 0x77bb, 0x78bb, 0x79bb, 0x7abb, 0x7bbb, 0x7cbb, 0x7dbb, 0x7ebb, 0x80bb, 0xdbb7, 0x81bb, 0x82bb, 0x83bb, 0x84bb, 0x85bb, 0x86bb, 0x87bb, 0xcef4, 0xa3c1, 0x88bb, 0x89bb, 0xc9c6, 0x8abb, 0xd6b4, 0xb3d5, 0x8bbb, 0x8cbb, 0x8dbb, 0xd0f4, 0xcff4, 0xd1f4, 0xdacb, 0x8ebb, 0x8fbb, 0xd2f4, 0x90bb, 0xc1d4, 0xe0d6, 0x91bb, 0x92bb, 0x93bb, 0x94bb, 0xe0b7, 0x95bb, 0x96bb, 0x97bb, 0xb8c1, 0x98bb, 0x99bb, 0xbbc1, 0xd3f4, 0xacbe, 0x9abb, 0x9bbb, 0x9cbb, 0x9dbb, 0x9ebb, 0xe2b4, 0x9fbb, 0xa0bb, 0xd4f4, 0xd5f4, 0xabbe, 0x40bc, 0x41bc, 0xd6f4, 0x42bc, 0x43bc, 0x44bc, 0xdbf4, 0x45bc, 0xd7f4, 0xdaf4, 0x46bc, 0xfdba, 0x47bc, 0xd8f4, 0xd9f4, 0x48bc, 0x49bc, 0x4abc, 0x4bbc, 0x4cbc, 0x4dbc, 0x4ebc, 0xe2b8, 0xc7cc, 0xdcf4, 0x4fbc, 0xdab2, 0x50bc, 0x51bc, 0xd3c3, 0x52bc, 0x53bc, 0xe3d4, 0xb7bf, 0x54bc, 0x55bc, 0x56bc, 0x57bc, 0x58bc, 0x59bc, 0x5abc, 0xddf4, 0x5bbc, 0x5cbc, 0x5dbc, 0x5ebc, 0x5fbc, 0x60bc, 0xb4c5, 0x61bc, 0x62bc, 0x63bc, 0x64bc, 0x65bc, 0x66bc, 0x67bc, 0x68bc, 0xe9f4, 0x69bc, 0x6abc, 0xb5cf, 0x6bbc, 0x6cbc, 0x6dbc, 0x6ebc, 0x6fbc, 0x70bc, 0x71bc, 0x72bc, 0x73bc, 0x74bc, 0x75bc, 0x76bc, 0x77bc, 0x78bc, 0xc9ce, 0x79bc, 0x7abc, 0x7bbc, 0x7cbc, 0x7dbc, 0x7ebc, 0x80bc, 0x81bc, 0x82bc, 0x83bc, 0x84bc, 0x85bc, 0x86bc, 0x87bc, 0x88bc, 0x89bc, 0x8abc, 0x8bbc, 0x8cbc, 0x8dbc, 0x8ebc, 0xd8cb, 0x8fbc, 0xf7cb, 0x90bc, 0x91bc, 0x92bc, 0x93bc, 0xf4bd, 0x94bc, 0x95bc, 0x96bc, 0xcfd7, 0x97bc, 0x98bc, 0x99bc, 0xdbc0, 0x9abc, 0x9bbc, 0x9cbc, 0x9dbc, 0x9ebc, 0x9fbc, 0xa0bc, 0x40bd, 0x41bd, 0x42bd, 0x43bd, 0x44bd, 0x45bd, 0x46bd, 0x47bd, 0x48bd, 0x49bd, 0x4abd, 0x4bbd, 0x4cbd, 0x4dbd, 0x4ebd, 0x4fbd, 0x50bd, 0x51bd, 0x52bd, 0x53bd, 0x54bd, 0x55bd, 0x56bd, 0x57bd, 0x58bd, 0x59bd, 0x5abd, 0x5bbd, 0x5cbd, 0x5dbd, 0x5ebd, 0x5fbd, 0x60bd, 0x61bd, 0x62bd, 0x63bd, 0x64bd, 0x65bd, 0x66bd, 0x67bd, 0x68bd, 0x69bd, 0x6abd, 0x6bbd, 0x6cbd, 0x6dbd, 0x6ebd, 0x6fbd, 0x70bd, 0x71bd, 0x72bd, 0x73bd, 0x74bd, 0x75bd, 0x76bd, 0xf5d0, 0x77bd, 0x78bd, 0x79bd, 0x7abd, 0x7bbd, 0x7cbd, 0x7dbd, 0x7ebd, 0xeaf4, 0x80bd, 0x81bd, 0x82bd, 0x83bd, 0x84bd, 0x85bd, 0x86bd, 0x87bd, 0x88bd, 0x89bd, 0x8abd, 0x8bbd, 0x8cbd, 0x8dbd, 0x8ebd, 0x8fbd, 0x90bd, 0x91bd, 0x92bd, 0x93bd, 0x94bd, 0x95bd, 0x96bd, 0x97bd, 0x98bd, 0x99bd, 0x9abd, 0x9bbd, 0x9cbd, 0x9dbd, 0x9ebd, 0x9fbd, 0xa0bd, 0x40be, 0x41be, 0x42be, 0x43be, 0x44be, 0x45be, 0x46be, 0x47be, 0x48be, 0x49be, 0x4abe, 0x4bbe, 0x4cbe, 0xebf4, 0x4dbe, 0x4ebe, 0x4fbe, 0x50be, 0x51be, 0x52be, 0x53be, 0xecf4, 0x54be, 0x55be, 0x56be, 0x57be, 0x58be, 0x59be, 0x5abe, 0x5bbe, 0x5cbe, 0x5dbe, 0x5ebe, 0x5fbe, 0x60be, 0x61be, 0x62be, 0x63be, 0x64be, 0x65be, 0x66be, 0x67be, 0x68be, 0x69be, 0x6abe, 0x6bbe, 0x6cbe, 0x6dbe, 0x6ebe, 0x6fbe, 0x70be, 0x71be, 0x72be, 0x73be, 0x74be, 0x75be, 0x76be, 0x77be, 0x78be, 0x79be, 0x7abe, 0x7bbe, 0x7cbe, 0x7dbe, 0x7ebe, 0x80be, 0x81be, 0x82be, 0x83be, 0x84be, 0x85be, 0x86be, 0x87be, 0x88be, 0x89be, 0x8abe, 0x8bbe, 0x8cbe, 0x8dbe, 0x8ebe, 0x8fbe, 0x90be, 0x91be, 0x92be, 0x93be, 0x94be, 0x95be, 0x96be, 0x97be, 0x98be, 0x99be, 0x9abe, 0x9bbe, 0x9cbe, 0x9dbe, 0x9ebe, 0x9fbe, 0xa0be, 0x40bf, 0x41bf, 0x42bf, 0x43bf, 0x44bf, 0x45bf, 0x46bf, 0x47bf, 0x48bf, 0x49bf, 0x4abf, 0x4bbf, 0x4cbf, 0x4dbf, 0x4ebf, 0x4fbf, 0x50bf, 0x51bf, 0x52bf, 0x53bf, 0x54bf, 0x55bf, 0x56bf, 0x57bf, 0x58bf, 0x59bf, 0x5abf, 0x5bbf, 0x5cbf, 0x5dbf, 0x5ebf, 0x5fbf, 0x60bf, 0x61bf, 0x62bf, 0x63bf, 0x64bf, 0x65bf, 0x66bf, 0x67bf, 0x68bf, 0x69bf, 0x6abf, 0x6bbf, 0x6cbf, 0x6dbf, 0x6ebf, 0x6fbf, 0x70bf, 0x71bf, 0x72bf, 0x73bf, 0x74bf, 0x75bf, 0x76bf, 0x77bf, 0x78bf, 0x79bf, 0x7abf, 0x7bbf, 0x7cbf, 0x7dbf, 0x7ebf, 0x80bf, 0xe3f7, 0x81bf, 0x82bf, 0x83bf, 0x84bf, 0x85bf, 0xb1b7, 0x86bf, 0x87bf, 0x88bf, 0x89bf, 0x8abf, 0xedf4, 0x8bbf, 0x8cbf, 0x8dbf, 0x8ebf, 0x8fbf, 0x90bf, 0x91bf, 0x92bf, 0x93bf, 0x94bf, 0x95bf, 0x96bf, 0x97bf, 0x98bf, 0x99bf, 0x9abf, 0x9bbf, 0x9cbf, 0x9dbf, 0x9ebf, 0x9fbf, 0xa0bf, 0x40c0, 0x41c0, 0x42c0, 0x43c0, 0x44c0, 0x45c0, 0x46c0, 0x47c0, 0x48c0, 0x49c0, 0x4ac0, 0x4bc0, 0x4cc0, 0x4dc0, 0x4ec0, 0x4fc0, 0x50c0, 0x51c0, 0x52c0, 0x53c0, 0x54c0, 0x55c0, 0x56c0, 0x57c0, 0x58c0, 0x59c0, 0x5ac0, 0x5bc0, 0x5cc0, 0x5dc0, 0x5ec0, 0x5fc0, 0x60c0, 0x61c0, 0x62c0, 0x63c0, 0xebd7, 0x64c0, 0x65c0, 0x66c0, 0x67c0, 0x68c0, 0x69c0, 0x6ac0, 0x6bc0, 0x6cc0, 0x6dc0, 0x6ec0, 0x6fc0, 0x70c0, 0x71c0, 0x72c0, 0x73c0, 0x74c0, 0x75c0, 0x76c0, 0x77c0, 0x78c0, 0x79c0, 0x7ac0, 0x7bc0, 0xeef4, 0x7cc0, 0x7dc0, 0x7ec0, 0xf9e6, 0xc0be, 0xfae6, 0xecba, 0xfbe6, 0xcbcf, 0xfce6, 0xbcd4, 0xb6bc, 0xfde6, 0xfee6, 0xcdbc, 0xd2c8, 0xb3ce, 0xa1e7, 0x80c0, 0xbfb4, 0xa2e7, 0xb4c9, 0xd9b8, 0xc9c4, 0x81c0, 0xddd7, 0xdac2, 0xd7b7, 0xbdd6, 0xc6ce, 0xc4b7, 0x82c0, 0x83c0, 0xa6c5, 0xa3e7, 0xdfcf, 0xa4e7, 0xa5e7, 0xa6e7, 0xb7c1, 0xe9d7, 0xf0c9, 0xb8cf, 0xafd6, 0xd5d6, 0xa7e7, 0xedb0, 0xa8e7, 0xa9e7, 0xdcc9, 0xefd2, 0xadbe, 0xaae7, 0xf3b0, 0xdec8, 0xe1bd, 0xabe7, 0xc6c8, 0x84c0, 0xace7, 0xe6bb, 0xf8b8, 0xa4d1, 0xade7, 0xe7c2, 0xf8be, 0xcabd, 0xb3cd, 0xaee7, 0xafe7, 0xeebe, 0xe5d0, 0x85c0, 0xe7cb, 0xd0cc, 0xccbc, 0xb0e7, 0xa8bc, 0xf7d0, 0xb1e7, 0x86c0, 0xf8d0, 0xb2e7, 0xb3e7, 0xc2b4, 0xb4e7, 0xb5e7, 0xfec9, 0xacce, 0xe0c3, 0xb7e7, 0xc1b1, 0xf1b3, 0x87c0, 0xb8e7, 0xb9e7, 0xdbd7, 0xc0d5, 0xbae7, 0xccc2, 0xbad7, 0xbbe7, 0xbce7, 0xbde7, 0xeabc, 0xe5c3, 0xc2c0, 0xbee7, 0xbfe7, 0xa9bc, 0x88c0, 0xc0e7, 0xc1e7, 0xb6e7, 0xd0b6, 0xc2e7, 0x89c0, 0xc3e7, 0xc4e7, 0xbabb, 0xdeb5, 0xc6c2, 0xe0b1, 0xc5e7, 0xb5d4, 0xc6e7, 0xbfb8, 0xc8e7, 0xc7e7, 0xecb7, 0x8ac0, 0xc9e7, 0xf8b2, 0xcae7, 0xcbe7, 0xcce7, 0xcde7, 0xcee7, 0xcfe7, 0xd0e7, 0xa7d3, 0xf5cb, 0xd1e7, 0xd2e7, 0xd3e7, 0xd4e7, 0xc9c9, 0xd5e7, 0xd6e7, 0xd7e7, 0xd8e7, 0xd9e7, 0xc9bd, 0xdae7, 0xbef3, 0x8bc0, 0xd7b8, 0x8cc0, 0xb1c8, 0x8dc0, 0x8ec0, 0x8fc0, 0x90c0, 0x91c0, 0x92c0, 0x93c0, 0xbff3, 0x94c0, 0xc0f3, 0xc1f3, 0x95c0, 0x96c0, 0x97c0, 0x98c0, 0x99c0, 0x9ac0, 0x9bc0, 0x9cc0, 0x9dc0, 0x9ec0, 0xdeb9, 0xf8cd, 0x9fc0, 0xa0c0, 0xe8d8, 0xb1ba, 0x40c1, 0xdec2, 0xb7ee, 0x41c1, 0xa3b7, 0x42c1, 0x43c1, 0x44c1, 0x45c1, 0xb9ee, 0x46c1, 0xb8ee, 0xd5b0, 0x47c1, 0x48c1, 0x49c1, 0x4ac1, 0x4bc1, 0xbbee, 0xd6d5, 0xefd7, 0x4cc1, 0x4dc1, 0x4ec1, 0xc3d6, 0x4fc1, 0x50c1, 0xbdee, 0xf0ca, 0x51c1, 0xbcee, 0x52c1, 0x53c1, 0x54c1, 0x55c1, 0xbeee, 0x56c1, 0x57c1, 0x58c1, 0x59c1, 0xc0ee, 0x5ac1, 0x5bc1, 0xbfee, 0x5cc1, 0x5dc1, 0x5ec1, 0x5fc1, 0x60c1, 0x61c1, 0x62c1, 0x63c1, 0xf2d1, 0x64c1, 0xbcc7, 0x65c1, 0xc0c3, 0x66c1, 0x67c1, 0x68c1, 0x69c1, 0x6ac1, 0xe1b8, 0x6bc1, 0x6cc1, 0x6dc1, 0x6ec1, 0x6fc1, 0xe7c1, 0x70c1, 0x71c1, 0xc6f4, 0xdfd0, 0xc7f4, 0x72c1, 0xdbcf, 0x73c1, 0x74c1, 0xbac8, 0x75c1, 0x76c1, 0xc8f4, 0x77c1, 0x78c1, 0x79c1, 0x7ac1, 0x7bc1, 0x7cc1, 0x7dc1, 0xc9f4, 0xcaf4, 0x7ec1, 0xcbf4, 0x80c1, 0x81c1, 0x82c1, 0x83c1, 0x84c1, 0xfad9, 0xfeb8, 0x85c1, 0x86c1, 0xf1e5, 0xf0d3, 0x87c1, 0xe0f4, 0x88c1, 0xccce, 0x89c1, 0x8ac1, 0x8bc1, 0xe1b3, 0x8cc1, 0x8dc1, 0x8ec1, 0x8fc1, 0xb4f1, 0x90c1, 0xeed2, 0x91c1, 0xe1f4, 0x92c1, 0x93c1, 0x94c1, 0x95c1, 0x96c1, 0xe8cf, 0xe2f4, 0x97c1, 0x98c1, 0xccc7, 0x99c1, 0x9ac1, 0x9bc1, 0x9cc1, 0x9dc1, 0x9ec1, 0xd4b5, 0xe4b4, 0xe4f4, 0x9fc1, 0xa0c1, 0x40c2, 0xe3f4, 0xe5f4, 0x41c2, 0x42c2, 0xe6f4, 0x43c2, 0x44c2, 0x45c2, 0x46c2, 0xe7f4, 0x47c2, 0xb2ba, 0xbfb0, 0x48c2, 0xe8f4, 0x49c2, 0x4ac2, 0x4bc2, 0x4cc2, 0x4dc2, 0x4ec2, 0x4fc2, 0xadb7, 0xedd2, 0x50c2, 0x51c2, 0x52c2, 0xabd2, 0xcfc0, 0x53c2, 0xbcbf, 0xa3eb, 0xdfd5, 0xc8ea, 0x54c2, 0x55c2, 0x56c2, 0x57c2, 0xf3f1, 0xf8b6, 0xa3cb, 0x58c2, 0x59c2, 0xcdc4, 0x5ac2, 0xe7f1, 0x5bc2, 0xe8f1, 0xfbb8, 0xe9f1, 0xc4ba, 0xc5d4, 0xd2b0, 0x5cc2, 0x5dc2, 0xeaf1, 0x5ec2, 0x5fc2, 0x60c2, 0xebf1, 0x61c2, 0xecf1, 0x62c2, 0x63c2, 0xedf1, 0xeef1, 0xeff1, 0xf1f1, 0xf0f1, 0xd5c5, 0x64c2, 0x65c2, 0x66c2, 0x67c2, 0x68c2, 0x69c2, 0xf2f1, 0x6ac2, 0xfab6, 0x6bc2, 0xf4f1, 0xaed2, 0xc7de, 0xcacb, 0x6cc2, 0x6dc2, 0xdcb3, 0x6ec2, 0xa2b5, 0x6fc2, 0xa2b9, 0x70c2, 0x71c2, 0xf4c4, 0xf5f1, 0x72c2, 0x73c2, 0xf6f1, 0x74c2, 0x75c2, 0x76c2, 0xc4c1, 0xfbc1, 0xb0d6, 0xf7f1, 0x77c2, 0x78c2, 0x79c2, 0x7ac2, 0xf8f1, 0x7bc2, 0xaac1, 0x7cc2, 0x7dc2, 0x7ec2, 0xb8c6, 0x80c2, 0xdbbe, 0x81c2, 0x82c2, 0x83c2, 0x84c2, 0x85c2, 0x86c2, 0x87c2, 0x88c2, 0x89c2, 0x8ac2, 0x8bc2, 0x8cc2, 0x8dc2, 0x8ec2, 0xf9f1, 0xcfb4, 0x8fc2, 0x90c2, 0x91c2, 0x92c2, 0x93c2, 0x94c2, 0xfaf1, 0x95c2, 0x96c2, 0x97c2, 0x98c2, 0x99c2, 0x9ac2, 0x9bc2, 0x9cc2, 0x9dc2, 0x9ec2, 0x9fc2, 0xa0c2, 0x40c3, 0xb2ed, 0xb1ed, 0x41c3, 0x42c3, 0xe0cb, 0xded2, 0x43c3, 0xc1cb, 0xd8d5, 0x44c3, 0xe2c8, 0x45c3, 0xdfc0, 0xa1bc, 0x46c3, 0x47c3, 0x48c3, 0x49c3, 0x4ac3, 0x4bc3, 0xc1eb, 0x4cc3, 0x4dc3, 0xa4d0, 0x4ec3, 0xe2d6, 0x4fc3, 0xc7b6, 0xd8b8, 0xc0eb, 0xceb8, 0x50c3, 0xbfeb, 0xa6b3, 0xc9b9, 0xabd6, 0x51c3, 0xf4b7, 0xcab7, 0x52c3, 0x53c3, 0x54c3, 0xe7bc, 0xbeb7, 0xc6eb, 0x55c3, 0xc7eb, 0xb9b0, 0xcfbf, 0x56c3, 0xc5eb, 0xfdd3, 0x57c3, 0xc8eb, 0x58c3, 0x59c3, 0xc9eb, 0x5ac3, 0x5bc3, 0xceb7, 0x5cc3, 0xc2eb, 0xc4eb, 0xf6c9, 0xd7d6, 0xcdd5, 0xb2d0, 0xcfeb, 0xb8ce, 0xd0eb, 0x5dc3, 0xa8b5, 0x5ec3, 0x5fc3, 0x60c3, 0x61c3, 0x62c3, 0xb3b1, 0xd2eb, 0xa5cc, 0x63c3, 0x64c3, 0x65c3, 0x66c3, 0x67c3, 0x68c3, 0x69c3, 0xd6c5, 0xd3eb, 0x6ac3, 0xd1eb, 0xdfc5, 0xceeb, 0xa4ca, 0xd5eb, 0xfbb0, 0x6bc3, 0x6cc3, 0xfaba, 0x6dc3, 0x6ec3, 0xb7d8, 0xe3f1, 0x6fc3, 0xcaeb, 0xcbeb, 0xcceb, 0xcdeb, 0xd6eb, 0xc0e6, 0xd9eb, 0x70c3, 0xe8bf, 0xc8d2, 0xd7eb, 0xdceb, 0xecb8, 0xd8eb, 0x71c3, 0xbabd, 0x72c3, 0xd8d0, 0x73c3, 0xb7b0, 0x74c3, 0xddeb, 0xdcc4, 0x75c3, 0x76c3, 0x77c3, 0x78c3, 0xacd6, 0x79c3, 0x7ac3, 0x7bc3, 0xe0b4, 0x7cc3, 0x7dc3, 0xf6c2, 0xb9bc, 0x7ec3, 0x80c3, 0xdaeb, 0xdbeb, 0xe0d4, 0xeac6, 0xd4c4, 0xdfeb, 0xa7c5, 0xf5d9, 0x81c3, 0xb1b2, 0x82c3, 0xe4eb, 0x83c3, 0xc5bd, 0x84c3, 0x85c3, 0x86c3, 0xe2eb, 0x87c3, 0x88c3, 0x89c3, 0x8ac3, 0x8bc3, 0x8cc3, 0x8dc3, 0x8ec3, 0x8fc3, 0x90c3, 0x91c3, 0x92c3, 0x93c3, 0xe3eb, 0x94c3, 0x95c3, 0xacb8, 0x96c3, 0xd1cd, 0xe5eb, 0x97c3, 0x98c3, 0x99c3, 0xe1eb, 0x9ac3, 0xb3c1, 0x9bc3, 0x9cc3, 0x9dc3, 0x9ec3, 0x9fc3, 0xa2c6, 0xa0c3, 0x40c4, 0x41c4, 0x42c4, 0x43c4, 0x44c4, 0x45c4, 0xf3cc, 0x46c4, 0xe6eb, 0x47c4, 0xb0c0, 0xb8d2, 0xe7eb, 0x48c4, 0x49c4, 0x4ac4, 0xafb8, 0xadb8, 0x4bc4, 0xe8eb, 0xbbc7, 0xf3cd, 0x4cc4, 0x4dc4, 0x4ec4, 0xeaeb, 0xebeb, 0x4fc4, 0x50c4, 0x51c4, 0x52c4, 0x53c4, 0xedeb, 0x54c4, 0x55c4, 0x56c4, 0x57c4, 0xc8d0, 0x58c4, 0xf2eb, 0x59c4, 0xeeeb, 0x5ac4, 0x5bc4, 0x5cc4, 0xf1eb, 0xf9c8, 0x5dc4, 0xfcd1, 0xeceb, 0x5ec4, 0x5fc4, 0xe9eb, 0x60c4, 0x61c4, 0x62c4, 0x63c4, 0xb9b8, 0xd9cf, 0xe5c4, 0xefeb, 0xf0eb, 0xdacc, 0xc8cd, 0xf2b0, 0x64c4, 0xf6eb, 0x65c4, 0x66c4, 0x67c4, 0x68c4, 0x69c4, 0xf5eb, 0x6ac4, 0xb2b2, 0x6bc4, 0x6cc4, 0x6dc4, 0x6ec4, 0xe0b8, 0x6fc4, 0xf7eb, 0x70c4, 0x71c4, 0x72c4, 0x73c4, 0x74c4, 0x75c4, 0xecb1, 0x76c4, 0x77c4, 0xc5cc, 0xa4c4, 0xa5cf, 0x78c4, 0x79c4, 0x7ac4, 0x7bc4, 0x7cc4, 0xf9eb, 0x7dc4, 0x7ec4, 0xa2ec, 0x80c4, 0xf2c5, 0x81c4, 0xfaeb, 0x82c4, 0x83c4, 0x84c4, 0x85c4, 0x86c4, 0x87c4, 0x88c4, 0x89c4, 0xc5c9, 0x8ac4, 0x8bc4, 0x8cc4, 0x8dc4, 0x8ec4, 0x8fc4, 0xdfe2, 0xfeeb, 0x90c4, 0x91c4, 0x92c4, 0x93c4, 0xcecd, 0xa1ec, 0xdbb1, 0xb7d3, 0x94c4, 0x95c4, 0xdcd2, 0x96c4, 0x97c4, 0x98c4, 0xfdeb, 0x99c4, 0xfbeb, 0x9ac4, 0x9bc4, 0x9cc4, 0x9dc4, 0x9ec4, 0x9fc4, 0xa0c4, 0x40c5, 0x41c5, 0x42c5, 0x43c5, 0x44c5, 0x45c5, 0x46c5, 0x47c5, 0x48c5, 0x49c5, 0x4ac5, 0x4bc5, 0x4cc5, 0x4dc5, 0x4ec5, 0xbcb3, 0x4fc5, 0x50c5, 0x51c5, 0xb0ea, 0x52c5, 0x53c5, 0xd4d7, 0x54c5, 0xabf4, 0xf4b3, 0x55c5, 0x56c5, 0x57c5, 0x58c5, 0x59c5, 0xc1d6, 0xc2d6, 0x5ac5, 0x5bc5, 0x5cc5, 0x5dc5, 0x5ec5, 0x5fc5, 0xe9d5, 0xcabe, 0x60c5, 0xa7f4, 0x61c5, 0xa8d2, 0xa8f4, 0xa9f4, 0x62c5, 0xaaf4, 0xcbbe, 0xdfd3, 0x63c5, 0x64c5, 0x65c5, 0x66c5, 0x67c5, 0xe0c9, 0xe1c9, 0x68c5, 0x69c5, 0xc2f3, 0x6ac5, 0xe6ca, 0x6bc5, 0xf2cc, 0x6cc5, 0x6dc5, 0x6ec5, 0x6fc5, 0x70c5, 0x71c5, 0xb6e2, 0xb4cb, 0x72c5, 0xe8ce, 0xdbd6, 0x73c5, 0xadf4, 0xaef4, 0xaff4, 0x74c5, 0x75c5, 0x76c5, 0x77c5, 0xb2f4, 0x78c5, 0xbdba, 0xb3f4, 0xe3b0, 0xb0f4, 0x79c5, 0xb1f4, 0xa2bd, 0xd5b2, 0x7ac5, 0xb6f4, 0xb7f4, 0xe6b6, 0xb0b2, 0xcfcf, 0xb4f4, 0xacb4, 0x7bc5, 0xb5f4, 0x7cc5, 0x7dc5, 0xb8f4, 0x7ec5, 0x80c5, 0x81c5, 0x82c5, 0x83c5, 0xb9f4, 0x84c5, 0x85c5, 0xa7cd, 0x86c5, 0xbaf4, 0x87c5, 0xbbf4, 0x88c5, 0x89c5, 0x8ac5, 0xbcf4, 0x8bc5, 0x8cc5, 0x8dc5, 0x8ec5, 0x8fc5, 0x90c5, 0x91c5, 0x92c5, 0xd2cb, 0x93c5, 0xbdf4, 0x94c5, 0x95c5, 0x96c5, 0x97c5, 0xbef4, 0x98c5, 0x99c5, 0x9ac5, 0x9bc5, 0x9cc5, 0x9dc5, 0x9ec5, 0x9fc5, 0xbff4, 0xa0c5, 0x40c6, 0x41c6, 0x42c6, 0x43c6, 0xdef4, 0xbcc1, 0xe8bc, 0x44c6, 0xabc9, 0xded1, 0xf5e5, 0x45c6, 0x46c6, 0x47c6, 0x48c6, 0xb3dc, 0xd5d2, 0x49c6, 0x4ac6, 0xb4dc, 0xacb0, 0xb5dc, 0x4bc6, 0x4cc6, 0xdabd, 0x4dc6, 0xb9dc, 0x4ec6, 0x4fc6, 0x50c6, 0xc2d8, 0x51c6, 0xb7dc, 0xf3d3, 0x52c6, 0xd6c9, 0xbadc, 0xb6dc, 0x53c6, 0xbbdc, 0xa2c3, 0x54c6, 0x55c6, 0x56c6, 0x57c6, 0xbcdc, 0xc5dc, 0xbddc, 0x58c6, 0x59c6, 0xdfce, 0xa5d6, 0x5ac6, 0xcfdc, 0x5bc6, 0xcddc, 0x5cc6, 0x5dc6, 0xd2dc, 0xe6bd, 0xabc2, 0x5ec6, 0xb8dc, 0xcbdc, 0xcedc, 0xbedc, 0xd2b7, 0xc5b0, 0xc7dc, 0xbed0, 0xc1dc, 0xa8bb, 0x5fc6, 0xbcb7, 0xccdc, 0x60c6, 0x61c6, 0xc6dc, 0xbfdc, 0xdbc7, 0x62c6, 0x63c6, 0x64c6, 0xbfd1, 0xc0dc, 0x65c6, 0x66c6, 0xcadc, 0x67c6, 0x68c6, 0xd0dc, 0x69c6, 0x6ac6, 0xadce, 0xc2dc, 0x6bc6, 0xc3dc, 0xc8dc, 0xc9dc, 0xd4b2, 0xd1dc, 0xd5cb, 0x6cc6, 0xb7d4, 0xdbdc, 0xdfdc, 0xa6cc, 0xe6dc, 0x6dc6, 0xe7c3, 0xdcdc, 0x6ec6, 0x6fc6, 0xc1bf, 0xd9dc, 0x70c6, 0xfab0, 0xb6b9, 0xe5dc, 0xd3dc, 0x71c6, 0xc4dc, 0xd6dc, 0xf4c8, 0xe0bf, 0x72c6, 0x73c6, 0x74c6, 0x75c6, 0xbbc9, 0x76c6, 0x77c6, 0x78c6, 0xbdb1, 0x79c6, 0xa2d3, 0x7ac6, 0x7bc6, 0xdadc, 0x7cc6, 0x7dc6, 0xd5dc, 0x7ec6, 0xbbc6, 0x80c6, 0xdedc, 0x81c6, 0x82c6, 0x83c6, 0x84c6, 0x85c6, 0xc2d7, 0xafc3, 0xb6b7, 0xd1c7, 0xa9c3, 0xe2dc, 0xd8dc, 0xebdc, 0xd4dc, 0x86c6, 0x87c6, 0xdddc, 0x88c6, 0xa5be, 0xd7dc, 0x89c6, 0xe0dc, 0x8ac6, 0x8bc6, 0xe3dc, 0xe4dc, 0x8cc6, 0xf8dc, 0x8dc6, 0x8ec6, 0xe1dc, 0xa2dd, 0xe7dc, 0x8fc6, 0x90c6, 0x91c6, 0x92c6, 0x93c6, 0x94c6, 0x95c6, 0x96c6, 0x97c6, 0x98c6, 0xebbc, 0xc4b4, 0x99c6, 0x9ac6, 0xa3c3, 0xe7b2, 0xfadc, 0x9bc6, 0xf2dc, 0x9cc6, 0xefdc, 0x9dc6, 0xfcdc, 0xeedc, 0xf0d2, 0xe8b2, 0x9ec6, 0xd7c8, 0xe3c8, 0xfbdc, 0x9fc6, 0xeddc, 0xa0c6, 0x40c7, 0x41c7, 0xf7dc, 0x42c7, 0x43c7, 0xf5dc, 0x44c7, 0x45c7, 0xa3be, 0xf4dc, 0x46c7, 0xddb2, 0x47c7, 0x48c7, 0x49c7, 0x4ac7, 0x4bc7, 0xf3dc, 0xf6bc, 0xe8dc, 0xc4bb, 0x4cc7, 0xf3c0, 0x4dc7, 0x4ec7, 0x4fc7, 0x50c7, 0x51c7, 0xd4bc, 0xe9dc, 0xeadc, 0x52c7, 0xf1dc, 0xf6dc, 0xf9dc, 0xb4b5, 0x53c7, 0xd9c8, 0xe7bb, 0xfedc, 0xfddc, 0xabd3, 0xa1dd, 0xa3dd, 0xa5dd, 0xf1d2, 0xa4dd, 0xa6dd, 0xa7dd, 0xa9d2, 0x54c7, 0x55c7, 0x56c7, 0x57c7, 0x58c7, 0x59c7, 0x5ac7, 0xc9ba, 0xa9dd, 0x5bc7, 0x5cc7, 0xb6dd, 0xb1dd, 0xb4dd, 0x5dc7, 0x5ec7, 0x5fc7, 0x60c7, 0x61c7, 0x62c7, 0x63c7, 0xb0dd, 0xcec6, 0x64c7, 0x65c7, 0xf2c0, 0x66c7, 0x67c7, 0x68c7, 0x69c7, 0xafc9, 0x6ac7, 0x6bc7, 0x6cc7, 0xecdc, 0xaedd, 0x6dc7, 0x6ec7, 0x6fc7, 0x70c7, 0xb7dd, 0x71c7, 0x72c7, 0xf0dc, 0xafdd, 0x73c7, 0xb8dd, 0x74c7, 0xacdd, 0x75c7, 0x76c7, 0x77c7, 0x78c7, 0x79c7, 0x7ac7, 0x7bc7, 0xb9dd, 0xb3dd, 0xaddd, 0xaac4, 0x7cc7, 0x7dc7, 0x7ec7, 0x80c7, 0xa8dd, 0xb3c0, 0xabc1, 0xaadd, 0xabdd, 0x81c7, 0xb2dd, 0xf1bb, 0xb5dd, 0xa8d3, 0xbadd, 0x82c7, 0xbbdd, 0xa7c3, 0x83c7, 0x84c7, 0xd2dd, 0xbcdd, 0x85c7, 0x86c7, 0x87c7, 0xd1dd, 0x88c7, 0xbdb9, 0x89c7, 0x8ac7, 0xd5be, 0x8bc7, 0xfabe, 0x8cc7, 0x8dc7, 0xcaba, 0x8ec7, 0x8fc7, 0x90c7, 0x91c7, 0xcadd, 0x92c7, 0xc5dd, 0x93c7, 0xbfdd, 0x94c7, 0x95c7, 0x96c7, 0xcbb2, 0xc3dd, 0x97c7, 0xcbdd, 0xa4b2, 0xd5dd, 0x98c7, 0x99c7, 0x9ac7, 0xbedd, 0x9bc7, 0x9cc7, 0x9dc7, 0xd0c6, 0xd0dd, 0x9ec7, 0x9fc7, 0xa0c7, 0x40c8, 0x41c8, 0xd4dd, 0xe2c1, 0xc6b7, 0x42c8, 0x43c8, 0x44c8, 0x45c8, 0x46c8, 0xcedd, 0xcfdd, 0x47c8, 0x48c8, 0x49c8, 0xc4dd, 0x4ac8, 0x4bc8, 0x4cc8, 0xbddd, 0x4dc8, 0xcddd, 0xd1cc, 0x4ec8, 0xc9dd, 0x4fc8, 0x50c8, 0x51c8, 0x52c8, 0xc2dd, 0xc8c3, 0xbcc6, 0xaece, 0xccdd, 0x53c8, 0xc8dd, 0x54c8, 0x55c8, 0x56c8, 0x57c8, 0x58c8, 0x59c8, 0xc1dd, 0x5ac8, 0x5bc8, 0x5cc8, 0xc6dd, 0xdcc2, 0x5dc8, 0x5ec8, 0x5fc8, 0x60c8, 0x61c8, 0x62c8, 0xa9d3, 0xaad3, 0xd3dd, 0xf4cf, 0xf8c8, 0x63c8, 0x64c8, 0x65c8, 0x66c8, 0x67c8, 0x68c8, 0x69c8, 0x6ac8, 0xe6dd, 0x6bc8, 0x6cc8, 0x6dc8, 0x6ec8, 0x6fc8, 0x70c8, 0xc7dd, 0x71c8, 0x72c8, 0x73c8, 0xe0dd, 0xe4c2, 0x74c8, 0x75c8, 0x76c8, 0x77c8, 0x78c8, 0x79c8, 0x7ac8, 0x7bc8, 0xe1dd, 0x7cc8, 0x7dc8, 0x7ec8, 0x80c8, 0x81c8, 0x82c8, 0x83c8, 0x84c8, 0x85c8, 0x86c8, 0xd7dd, 0x87c8, 0x88c8, 0x89c8, 0x8ac8, 0x8bc8, 0xf8d6, 0x8cc8, 0xd9dd, 0xd8dd, 0xf0b8, 0xd6dd, 0x8dc8, 0x8ec8, 0x8fc8, 0x90c8, 0xcfc6, 0x91c8, 0xadb6, 0x92c8, 0x93c8, 0x94c8, 0x95c8, 0x96c8, 0xe2dd, 0x97c8, 0xf9ba, 0xe1d4, 0xe7dd, 0x98c8, 0x99c8, 0x9ac8, 0xd0b4, 0x9bc8, 0xdadd, 0x9cc8, 0xfbbf, 0xe3dd, 0x9dc8, 0xdfdd, 0x9ec8, 0xdddd, 0x9fc8, 0xa0c8, 0x40c9, 0x41c9, 0x42c9, 0x43c9, 0x44c9, 0xd9b5, 0x45c9, 0x46c9, 0x47c9, 0x48c9, 0xdbdd, 0xdcdd, 0xdedd, 0x49c9, 0xafbd, 0xe4dd, 0x4ac9, 0xe5dd, 0x4bc9, 0x4cc9, 0x4dc9, 0x4ec9, 0x4fc9, 0x50c9, 0x51c9, 0x52c9, 0xf5dd, 0x53c9, 0xc9c3, 0x54c9, 0x55c9, 0xe2cb, 0x56c9, 0x57c9, 0x58c9, 0x59c9, 0xf2dd, 0x5ac9, 0x5bc9, 0x5cc9, 0x5dc9, 0x5ec9, 0x5fc9, 0x60c9, 0x61c9, 0x62c9, 0x63c9, 0x64c9, 0x65c9, 0x66c9, 0xe1d8, 0x67c9, 0x68c9, 0xd1c6, 0x69c9, 0xf4dd, 0x6ac9, 0x6bc9, 0x6cc9, 0xf4d5, 0xf3dd, 0xf0dd, 0x6dc9, 0x6ec9, 0xecdd, 0x6fc9, 0xefdd, 0x70c9, 0xe8dd, 0x71c9, 0x72c9, 0xeed0, 0x73c9, 0x74c9, 0x75c9, 0x76c9, 0xd8c8, 0xeedd, 0x77c9, 0x78c9, 0xe9dd, 0x79c9, 0x7ac9, 0xeadd, 0xf2cb, 0x7bc9, 0xeddd, 0x7cc9, 0x7dc9, 0xcdb1, 0x7ec9, 0x80c9, 0x81c9, 0x82c9, 0x83c9, 0x84c9, 0xb6c0, 0x85c9, 0xbbbc, 0xf1dd, 0x86c9, 0x87c9, 0xf7dd, 0x88c9, 0xf6dd, 0xebdd, 0x89c9, 0x8ac9, 0x8bc9, 0x8cc9, 0x8dc9, 0xeec5, 0x8ec9, 0x8fc9, 0x90c9, 0xfbdd, 0x91c9, 0x92c9, 0x93c9, 0x94c9, 0x95c9, 0x96c9, 0x97c9, 0x98c9, 0x99c9, 0x9ac9, 0x9bc9, 0xa4de, 0x9cc9, 0x9dc9, 0xa3de, 0x9ec9, 0x9fc9, 0xa0c9, 0x40ca, 0x41ca, 0x42ca, 0x43ca, 0x44ca, 0x45ca, 0x46ca, 0x47ca, 0x48ca, 0xf8dd, 0x49ca, 0x4aca, 0x4bca, 0x4cca, 0xefc3, 0x4dca, 0xfbc2, 0x4eca, 0x4fca, 0x50ca, 0xe1d5, 0x51ca, 0x52ca, 0xb5ce, 0x53ca, 0x54ca, 0x55ca, 0x56ca, 0xfddd, 0x57ca, 0xccb2, 0x58ca, 0x59ca, 0x5aca, 0x5bca, 0x5cca, 0x5dca, 0x5eca, 0x5fca, 0x60ca, 0xe8c4, 0xdfca, 0x61ca, 0x62ca, 0x63ca, 0x64ca, 0x65ca, 0x66ca, 0x67ca, 0x68ca, 0x69ca, 0x6aca, 0xbec7, 0xfadd, 0xfcdd, 0xfedd, 0xa2de, 0xaab0, 0xceb1, 0x6bca, 0x6cca, 0x6dca, 0x6eca, 0x6fca, 0xacde, 0x70ca, 0x71ca, 0x72ca, 0x73ca, 0xa6de, 0xb6bd, 0xefc8, 0x74ca, 0x75ca, 0x76ca, 0x77ca, 0x78ca, 0x79ca, 0x7aca, 0x7bca, 0x7cca, 0x7dca, 0x7eca, 0xa1de, 0x80ca, 0x81ca, 0xa5de, 0x82ca, 0x83ca, 0x84ca, 0x85ca, 0xa9de, 0x86ca, 0x87ca, 0x88ca, 0x89ca, 0x8aca, 0xa8de, 0x8bca, 0x8cca, 0x8dca, 0xa7de, 0x8eca, 0x8fca, 0x90ca, 0x91ca, 0x92ca, 0x93ca, 0x94ca, 0x95ca, 0x96ca, 0xadde, 0x97ca, 0xccd4, 0x98ca, 0x99ca, 0x9aca, 0x9bca, 0xb3de, 0xaade, 0xaede, 0x9cca, 0x9dca, 0xd9c0, 0x9eca, 0x9fca, 0xa0ca, 0x40cb, 0x41cb, 0xa1b1, 0xb6de, 0x42cb, 0xb1de, 0x43cb, 0x44cb, 0x45cb, 0x46cb, 0x47cb, 0x48cb, 0x49cb, 0xb2de, 0x4acb, 0x4bcb, 0x4ccb, 0x4dcb, 0x4ecb, 0x4fcb, 0x50cb, 0x51cb, 0x52cb, 0x53cb, 0x54cb, 0xa6d1, 0xb5de, 0x55cb, 0x56cb, 0x57cb, 0x58cb, 0x59cb, 0x5acb, 0x5bcb, 0xafde, 0x5ccb, 0x5dcb, 0x5ecb, 0xb0de, 0x5fcb, 0xbdd0, 0x60cb, 0x61cb, 0x62cb, 0xb4de, 0xedca, 0xb9de, 0x63cb, 0x64cb, 0x65cb, 0x66cb, 0x67cb, 0x68cb, 0xb8de, 0x69cb, 0xb7de, 0x6acb, 0x6bcb, 0x6ccb, 0x6dcb, 0x6ecb, 0x6fcb, 0x70cb, 0xbbde, 0x71cb, 0x72cb, 0x73cb, 0x74cb, 0x75cb, 0x76cb, 0x77cb, 0xe5bd, 0x78cb, 0x79cb, 0x7acb, 0x7bcb, 0x7ccb, 0xd8b2, 0xeac3, 0x7dcb, 0x7ecb, 0xbade, 0x80cb, 0xbac5, 0x81cb, 0x82cb, 0x83cb, 0x84cb, 0x85cb, 0x86cb, 0xbcde, 0x87cb, 0x88cb, 0x89cb, 0x8acb, 0x8bcb, 0x8ccb, 0x8dcb, 0xd9cc, 0x8ecb, 0x8fcb, 0x90cb, 0x91cb, 0xaab7, 0x92cb, 0x93cb, 0x94cb, 0x95cb, 0x96cb, 0x97cb, 0x98cb, 0x99cb, 0x9acb, 0x9bcb, 0x9ccb, 0x9dcb, 0x9ecb, 0x9fcb, 0xa0cb, 0x40cc, 0x41cc, 0xe5d4, 0x42cc, 0x43cc, 0x44cc, 0xbdde, 0x45cc, 0x46cc, 0x47cc, 0x48cc, 0x49cc, 0xbfde, 0x4acc, 0x4bcc, 0x4ccc, 0x4dcc, 0x4ecc, 0x4fcc, 0x50cc, 0x51cc, 0x52cc, 0x53cc, 0x54cc, 0xa2c4, 0x55cc, 0x56cc, 0x57cc, 0x58cc, 0xc1de, 0x59cc, 0x5acc, 0x5bcc, 0x5ccc, 0x5dcc, 0x5ecc, 0x5fcc, 0x60cc, 0x61cc, 0x62cc, 0x63cc, 0x64cc, 0x65cc, 0x66cc, 0x67cc, 0x68cc, 0xbede, 0x69cc, 0xc0de, 0x6acc, 0x6bcc, 0x6ccc, 0x6dcc, 0x6ecc, 0x6fcc, 0x70cc, 0x71cc, 0x72cc, 0x73cc, 0x74cc, 0x75cc, 0x76cc, 0x77cc, 0xbad5, 0x78cc, 0x79cc, 0x7acc, 0xc2de, 0x7bcc, 0x7ccc, 0x7dcc, 0x7ecc, 0x80cc, 0x81cc, 0x82cc, 0x83cc, 0x84cc, 0x85cc, 0x86cc, 0x87cc, 0x88cc, 0x89cc, 0x8acc, 0x8bcc, 0xaef2, 0xa2bb, 0xb2c2, 0xb0c5, 0xc7c2, 0x8ccc, 0x8dcc, 0xaff2, 0x8ecc, 0x8fcc, 0x90cc, 0x91cc, 0x92cc, 0xe9d0, 0x93cc, 0x94cc, 0x95cc, 0xddd3, 0x96cc, 0x97cc, 0x98cc, 0xbdeb, 0x99cc, 0x9acc, 0x9bcc, 0x9ccc, 0x9dcc, 0x9ecc, 0x9fcc, 0xa0cc, 0xe6b3, 0xb0f2, 0x40cd, 0xb1f2, 0x41cd, 0x42cd, 0xadca, 0x43cd, 0x44cd, 0x45cd, 0x46cd, 0x47cd, 0x48cd, 0x49cd, 0xe7ba, 0xb3f2, 0xb5f2, 0xb4f2, 0xe4cb, 0xbacf, 0xb2f2, 0xb4ca, 0xcfd2, 0xecc2, 0x4acd, 0x4bcd, 0x4ccd, 0x4dcd, 0x4ecd, 0x4fcd, 0x50cd, 0xc3ce, 0xb8f2, 0xf6b0, 0xb7f2, 0x51cd, 0x52cd, 0x53cd, 0x54cd, 0x55cd, 0xbef2, 0x56cd, 0xcfb2, 0x57cd, 0x58cd, 0x59cd, 0x5acd, 0x5bcd, 0x5ccd, 0xc1d1, 0xbaf2, 0x5dcd, 0x5ecd, 0x5fcd, 0x60cd, 0x61cd, 0xbcf2, 0xe9d4, 0x62cd, 0x63cd, 0xbbf2, 0xb6f2, 0xbff2, 0xbdf2, 0x64cd, 0xb9f2, 0x65cd, 0x66cd, 0xc7f2, 0xc4f2, 0xc6f2, 0x67cd, 0x68cd, 0xcaf2, 0xc2f2, 0xc0f2, 0x69cd, 0x6acd, 0x6bcd, 0xc5f2, 0x6ccd, 0x6dcd, 0x6ecd, 0x6fcd, 0x70cd, 0xfbd6, 0x71cd, 0x72cd, 0x73cd, 0xc1f2, 0x74cd, 0xf9c7, 0xdfc9, 0x75cd, 0xc8f2, 0xc6b9, 0xb0b5, 0x76cd, 0x77cd, 0xc3f2, 0xc9f2, 0xd0f2, 0xd6f2, 0x78cd, 0x79cd, 0xd7bb, 0x7acd, 0x7bcd, 0x7ccd, 0xd5f2, 0xdccd, 0x7dcd, 0xebd6, 0x7ecd, 0x80cd, 0xd2f2, 0xd4f2, 0x81cd, 0x82cd, 0x83cd, 0x84cd, 0xf2b8, 0x85cd, 0x86cd, 0x87cd, 0x88cd, 0xcbf2, 0x89cd, 0x8acd, 0x8bcd, 0xcef2, 0xf9c2, 0x8ccd, 0xddd5, 0xccf2, 0xcdf2, 0xcff2, 0xd3f2, 0x8dcd, 0x8ecd, 0x8fcd, 0xd9f2, 0xbcd3, 0x90cd, 0x91cd, 0x92cd, 0x93cd, 0xeab6, 0x94cd, 0xf1ca, 0x95cd, 0xe4b7, 0xd7f2, 0x96cd, 0x97cd, 0x98cd, 0xd8f2, 0xdaf2, 0xddf2, 0xdbf2, 0x99cd, 0x9acd, 0xdcf2, 0x9bcd, 0x9ccd, 0x9dcd, 0x9ecd, 0xd1d1, 0xd1f2, 0x9fcd, 0xc9cd, 0xa0cd, 0xcfce, 0xa9d6, 0x40ce, 0xe3f2, 0x41ce, 0xdbc3, 0x42ce, 0xe0f2, 0x43ce, 0x44ce, 0xafc0, 0xecf2, 0xdef2, 0x45ce, 0xe1f2, 0x46ce, 0x47ce, 0x48ce, 0xe8f2, 0x49ce, 0x4ace, 0x4bce, 0x4cce, 0xe2f2, 0x4dce, 0x4ece, 0xe7f2, 0x4fce, 0x50ce, 0xe6f2, 0x51ce, 0x52ce, 0xe9f2, 0x53ce, 0x54ce, 0x55ce, 0xdff2, 0x56ce, 0x57ce, 0xe4f2, 0xeaf2, 0x58ce, 0x59ce, 0x5ace, 0x5bce, 0x5cce, 0x5dce, 0x5ece, 0xacd3, 0xe5f2, 0xf5b2, 0x5fce, 0x60ce, 0xf2f2, 0x61ce, 0xabd0, 0x62ce, 0x63ce, 0x64ce, 0x65ce, 0xf5f2, 0x66ce, 0x67ce, 0x68ce, 0xc8bb, 0x69ce, 0xf9f2, 0x6ace, 0x6bce, 0x6cce, 0x6dce, 0x6ece, 0x6fce, 0xf0f2, 0x70ce, 0x71ce, 0xf6f2, 0xf8f2, 0xfaf2, 0x72ce, 0x73ce, 0x74ce, 0x75ce, 0x76ce, 0x77ce, 0x78ce, 0x79ce, 0xf3f2, 0x7ace, 0xf1f2, 0x7bce, 0x7cce, 0x7dce, 0xfbba, 0x7ece, 0xfbb5, 0x80ce, 0x81ce, 0x82ce, 0x83ce, 0xeff2, 0xf7f2, 0xedf2, 0xeef2, 0x84ce, 0x85ce, 0x86ce, 0xebf2, 0xa6f3, 0x87ce, 0xa3f3, 0x88ce, 0x89ce, 0xa2f3, 0x8ace, 0x8bce, 0xf4f2, 0x8cce, 0xdac8, 0x8dce, 0x8ece, 0x8fce, 0x90ce, 0x91ce, 0xfbf2, 0x92ce, 0x93ce, 0x94ce, 0xa5f3, 0x95ce, 0x96ce, 0x97ce, 0x98ce, 0x99ce, 0x9ace, 0x9bce, 0xf8c3, 0x9cce, 0x9dce, 0x9ece, 0x9fce, 0xa0ce, 0x40cf, 0x41cf, 0x42cf, 0xfdf2, 0x43cf, 0x44cf, 0xa7f3, 0xa9f3, 0xa4f3, 0x45cf, 0xfcf2, 0x46cf, 0x47cf, 0x48cf, 0xabf3, 0x49cf, 0xaaf3, 0x4acf, 0x4bcf, 0x4ccf, 0x4dcf, 0xddc2, 0x4ecf, 0x4fcf, 0xaef3, 0x50cf, 0x51cf, 0xb0f3, 0x52cf, 0x53cf, 0x54cf, 0x55cf, 0x56cf, 0xa1f3, 0x57cf, 0x58cf, 0x59cf, 0xb1f3, 0xacf3, 0x5acf, 0x5bcf, 0x5ccf, 0x5dcf, 0x5ecf, 0xaff3, 0xfef2, 0xadf3, 0x5fcf, 0x60cf, 0x61cf, 0x62cf, 0x63cf, 0x64cf, 0x65cf, 0xb2f3, 0x66cf, 0x67cf, 0x68cf, 0x69cf, 0xb4f3, 0x6acf, 0x6bcf, 0x6ccf, 0x6dcf, 0xa8f3, 0x6ecf, 0x6fcf, 0x70cf, 0x71cf, 0xb3f3, 0x72cf, 0x73cf, 0x74cf, 0xb5f3, 0x75cf, 0x76cf, 0x77cf, 0x78cf, 0x79cf, 0x7acf, 0x7bcf, 0x7ccf, 0x7dcf, 0x7ecf, 0xb7d0, 0x80cf, 0x81cf, 0x82cf, 0x83cf, 0xb8f3, 0x84cf, 0x85cf, 0x86cf, 0x87cf, 0xf9d9, 0x88cf, 0x89cf, 0x8acf, 0x8bcf, 0x8ccf, 0x8dcf, 0xb9f3, 0x8ecf, 0x8fcf, 0x90cf, 0x91cf, 0x92cf, 0x93cf, 0x94cf, 0x95cf, 0xb7f3, 0x96cf, 0xe4c8, 0xb6f3, 0x97cf, 0x98cf, 0x99cf, 0x9acf, 0xbaf3, 0x9bcf, 0x9ccf, 0x9dcf, 0x9ecf, 0x9fcf, 0xbbf3, 0xc0b4, 0xa0cf, 0x40d0, 0x41d0, 0x42d0, 0x43d0, 0x44d0, 0x45d0, 0x46d0, 0x47d0, 0x48d0, 0x49d0, 0x4ad0, 0x4bd0, 0x4cd0, 0x4dd0, 0xc3ee, 0x4ed0, 0x4fd0, 0x50d0, 0x51d0, 0x52d0, 0x53d0, 0xbcf3, 0x54d0, 0x55d0, 0xbdf3, 0x56d0, 0x57d0, 0x58d0, 0xaad1, 0x59d0, 0x5ad0, 0x5bd0, 0xacf4, 0xc6d0, 0x5cd0, 0x5dd0, 0x5ed0, 0x5fd0, 0x60d0, 0x61d0, 0xd0d0, 0xdcd1, 0x62d0, 0x63d0, 0x64d0, 0x65d0, 0x66d0, 0x67d0, 0xcecf, 0x68d0, 0x69d0, 0xd6bd, 0x6ad0, 0xc3d1, 0x6bd0, 0x6cd0, 0x6dd0, 0x6ed0, 0x6fd0, 0x70d0, 0x71d0, 0xe2ba, 0xe9e1, 0xc2d2, 0xc2f1, 0xb9b2, 0x72d0, 0x73d0, 0xedb1, 0xc3f1, 0x74d0, 0xc0c9, 0xc4b3, 0x75d0, 0xf2d9, 0x76d0, 0xa5cb, 0x77d0, 0xc4f1, 0x78d0, 0x79d0, 0x7ad0, 0x7bd0, 0xd4d6, 0x7cd0, 0x7dd0, 0x7ed0, 0x80d0, 0x81d0, 0xc5f1, 0xc0f4, 0xc6f1, 0x82d0, 0xacd4, 0xc7f1, 0x83d0, 0xc0b0, 0xc1f4, 0x84d0, 0x85d0, 0xc2f4, 0x86d0, 0x87d0, 0xfcb4, 0x88d0, 0xdbc5, 0x89d0, 0x8ad0, 0x8bd0, 0x8cd0, 0xbbcc, 0x8dd0, 0x8ed0, 0x8fd0, 0xe4d0, 0x90d0, 0x91d0, 0x92d0, 0x93d0, 0x94d0, 0xe0cd, 0x95d0, 0x96d0, 0x97d0, 0x98d0, 0x99d0, 0xc8f1, 0x9ad0, 0xf3d9, 0x9bd0, 0x9cd0, 0x9dd0, 0x9ed0, 0x9fd0, 0xa0d0, 0xbbb1, 0x40d1, 0xaecf, 0x41d1, 0x42d1, 0x43d1, 0xa4b8, 0x44d1, 0x45d1, 0x46d1, 0x47d1, 0x48d1, 0xcaf1, 0x49d1, 0x4ad1, 0x4bd1, 0x4cd1, 0xcbf1, 0x4dd1, 0x4ed1, 0x4fd1, 0x50d1, 0xc3b2, 0xd1c1, 0x51d1, 0x52d1, 0xb0d7, 0xc9f1, 0x53d1, 0x54d1, 0xccf1, 0x55d1, 0x56d1, 0x57d1, 0x58d1, 0xcef1, 0x59d1, 0x5ad1, 0x5bd1, 0xf6d9, 0x5cd1, 0xe1d2, 0xa3d4, 0x5dd1, 0x5ed1, 0xc3f4, 0xb9c8, 0x5fd1, 0x60d1, 0x61d1, 0x62d1, 0x63d1, 0xc4f4, 0x64d1, 0x65d1, 0xcdf1, 0xcff1, 0xe3bf, 0xd0f1, 0x66d1, 0x67d1, 0xd4f1, 0x68d1, 0x69d1, 0x6ad1, 0x6bd1, 0x6cd1, 0x6dd1, 0x6ed1, 0xd6f1, 0xd1f1, 0x6fd1, 0xd1c9, 0xe1c5, 0x70d1, 0x71d1, 0x72d1, 0xe3c2, 0xfcb9, 0x73d1, 0x74d1, 0xd3f1, 0x75d1, 0xd5f1, 0x76d1, 0x77d1, 0x78d1, 0xd3b9, 0x79d1, 0x7ad1, 0x7bd1, 0x7cd1, 0x7dd1, 0x7ed1, 0x80d1, 0xdbf1, 0x81d1, 0x82d1, 0x83d1, 0x84d1, 0x85d1, 0xd6ba, 0x86d1, 0xfdb0, 0xd9f1, 0x87d1, 0x88d1, 0x89d1, 0x8ad1, 0x8bd1, 0xd8f1, 0xd2f1, 0xdaf1, 0x8cd1, 0x8dd1, 0x8ed1, 0x8fd1, 0x90d1, 0xd7f1, 0x91d1, 0x92d1, 0x93d1, 0xecc8, 0x94d1, 0x95d1, 0x96d1, 0x97d1, 0xcacd, 0xddf1, 0x98d1, 0x99d1, 0x9ad1, 0x9bd1, 0xbde5, 0x9cd1, 0x9dd1, 0x9ed1, 0xdcf1, 0x9fd1, 0xdef1, 0xa0d1, 0x40d2, 0x41d2, 0x42d2, 0x43d2, 0x44d2, 0x45d2, 0x46d2, 0x47d2, 0x48d2, 0xdff1, 0x49d2, 0x4ad2, 0xe5cf, 0x4bd2, 0x4cd2, 0x4dd2, 0x4ed2, 0x4fd2, 0x50d2, 0x51d2, 0x52d2, 0x53d2, 0x54d2, 0x55d2, 0x56d2, 0x57d2, 0x58d2, 0x59d2, 0x5ad2, 0x5bd2, 0x5cd2, 0x5dd2, 0x5ed2, 0x5fd2, 0x60d2, 0x61d2, 0x62d2, 0x63d2, 0xc5f4, 0xf3bd, 0x64d2, 0x65d2, 0x66d2, 0x67d2, 0x68d2, 0x69d2, 0xe0f1, 0x6ad2, 0x6bd2, 0x6cd2, 0x6dd2, 0x6ed2, 0x6fd2, 0x70d2, 0x71d2, 0x72d2, 0x73d2, 0x74d2, 0x75d2, 0x76d2, 0x77d2, 0x78d2, 0x79d2, 0x7ad2, 0x7bd2, 0x7cd2, 0x7dd2, 0xe1f1, 0x7ed2, 0x80d2, 0x81d2, 0xf7ce, 0x82d2, 0xaad2, 0x83d2, 0xfbf1, 0x84d2, 0x85d2, 0xb2b8, 0x86d2, 0x87d2, 0x88d2, 0x89d2, 0x8ad2, 0x8bd2, 0x8cd2, 0x8dd2, 0x8ed2, 0x8fd2, 0x90d2, 0x91d2, 0x92d2, 0x93d2, 0x94d2, 0x95d2, 0x96d2, 0x97d2, 0x98d2, 0x99d2, 0x9ad2, 0x9bd2, 0x9cd2, 0x9dd2, 0x9ed2, 0x9fd2, 0xa0d2, 0x40d3, 0x41d3, 0x42d3, 0x43d3, 0x44d3, 0x45d3, 0x46d3, 0x47d3, 0x48d3, 0x49d3, 0x4ad3, 0x4bd3, 0x4cd3, 0x4dd3, 0x4ed3, 0x4fd3, 0x50d3, 0x51d3, 0x52d3, 0x53d3, 0x54d3, 0x55d3, 0x56d3, 0x57d3, 0x58d3, 0x59d3, 0x5ad3, 0x5bd3, 0x5cd3, 0x5dd3, 0x5ed3, 0xfbbc, 0xdbb9, 0x5fd3, 0xe6b9, 0xd9c3, 0xd3ca, 0xe8ea, 0xc0c0, 0xf5be, 0xe9ea, 0xeaea, 0xebea, 0x60d3, 0xecea, 0xedea, 0xeeea, 0xefea, 0xc7bd, 0x61d3, 0x62d3, 0x63d3, 0xfbf5, 0x64d3, 0x65d3, 0x66d3, 0xfdf5, 0x67d3, 0xfef5, 0x68d3, 0xfcf5, 0x69d3, 0x6ad3, 0x6bd3, 0x6cd3, 0xe2bd, 0x6dd3, 0xa1f6, 0xa5b4, 0x6ed3, 0x6fd3, 0x70d3, 0x71d3, 0xa2f6, 0x72d3, 0x73d3, 0x74d3, 0xa3f6, 0x75d3, 0x76d3, 0x77d3, 0xb2ec, 0x78d3, 0x79d3, 0x7ad3, 0x7bd3, 0x7cd3, 0x7dd3, 0x7ed3, 0x80d3, 0x81d3, 0x82d3, 0x83d3, 0x84d3, 0xd4d1, 0x85d3, 0x86d3, 0x87d3, 0x88d3, 0x89d3, 0x8ad3, 0xead9, 0x8bd3, 0x8cd3, 0x8dd3, 0x8ed3, 0x8fd3, 0x90d3, 0x91d3, 0x92d3, 0x93d3, 0x94d3, 0x95d3, 0x96d3, 0x97d3, 0x98d3, 0x99d3, 0x9ad3, 0x9bd3, 0x9cd3, 0x9dd3, 0x9ed3, 0x9fd3, 0xa0d3, 0x40d4, 0x41d4, 0x42d4, 0x43d4, 0x44d4, 0x45d4, 0x46d4, 0x47d4, 0x48d4, 0x49d4, 0x4ad4, 0x4bd4, 0x4cd4, 0x4dd4, 0x4ed4, 0x4fd4, 0x50d4, 0x51d4, 0x52d4, 0x53d4, 0x54d4, 0x55d4, 0x56d4, 0x57d4, 0x58d4, 0x59d4, 0x5ad4, 0x5bd4, 0x5cd4, 0x5dd4, 0x5ed4, 0x5fd4, 0xa4f6, 0x60d4, 0x61d4, 0x62d4, 0x63d4, 0x64d4, 0x65d4, 0x66d4, 0x67d4, 0x68d4, 0xbaee, 0x69d4, 0x6ad4, 0x6bd4, 0x6cd4, 0x6dd4, 0x6ed4, 0x6fd4, 0x70d4, 0x71d4, 0x72d4, 0x73d4, 0x74d4, 0x75d4, 0x76d4, 0x77d4, 0x78d4, 0x79d4, 0x7ad4, 0x7bd4, 0x7cd4, 0x7dd4, 0x7ed4, 0x80d4, 0x81d4, 0x82d4, 0x83d4, 0x84d4, 0x85d4, 0x86d4, 0x87d4, 0x88d4, 0x89d4, 0x8ad4, 0x8bd4, 0x8cd4, 0x8dd4, 0x8ed4, 0x8fd4, 0x90d4, 0x91d4, 0x92d4, 0x93d4, 0x94d4, 0x95d4, 0x96d4, 0x97d4, 0x98d4, 0x99d4, 0xb2d5, 0x9ad4, 0x9bd4, 0x9cd4, 0x9dd4, 0x9ed4, 0x9fd4, 0xa0d4, 0x40d5, 0x41d5, 0x42d5, 0x43d5, 0x44d5, 0x45d5, 0x46d5, 0x47d5, 0xfed3, 0xdccc, 0x48d5, 0x49d5, 0x4ad5, 0x4bd5, 0x4cd5, 0x4dd5, 0x4ed5, 0x4fd5, 0xc4ca, 0x50d5, 0x51d5, 0x52d5, 0x53d5, 0x54d5, 0x55d5, 0x56d5, 0x57d5, 0x58d5, 0x59d5, 0x5ad5, 0x5bd5, 0x5cd5, 0x5dd5, 0x5ed5, 0x5fd5, 0x60d5, 0x61d5, 0x62d5, 0x63d5, 0x64d5, 0x65d5, 0x66d5, 0x67d5, 0x68d5, 0x69d5, 0x6ad5, 0x6bd5, 0x6cd5, 0x6dd5, 0x6ed5, 0x6fd5, 0x70d5, 0x71d5, 0x72d5, 0x73d5, 0x74d5, 0x75d5, 0x76d5, 0x77d5, 0x78d5, 0x79d5, 0x7ad5, 0x7bd5, 0x7cd5, 0x7dd5, 0x7ed5, 0x80d5, 0x81d5, 0x82d5, 0x83d5, 0x84d5, 0x85d5, 0x86d5, 0x87d5, 0x88d5, 0x89d5, 0x8ad5, 0x8bd5, 0x8cd5, 0x8dd5, 0x8ed5, 0x8fd5, 0x90d5, 0x91d5, 0x92d5, 0x93d5, 0x94d5, 0x95d5, 0x96d5, 0x97d5, 0x98d5, 0x99d5, 0x9ad5, 0x9bd5, 0x9cd5, 0x9dd5, 0x9ed5, 0x9fd5, 0xa0d5, 0x40d6, 0x41d6, 0x42d6, 0x43d6, 0x44d6, 0x45d6, 0x46d6, 0x47d6, 0x48d6, 0x49d6, 0x4ad6, 0x4bd6, 0x4cd6, 0x4dd6, 0x4ed6, 0x4fd6, 0x50d6, 0x51d6, 0x52d6, 0x53d6, 0x54d6, 0x55d6, 0x56d6, 0x57d6, 0x58d6, 0x59d6, 0x5ad6, 0x5bd6, 0x5cd6, 0x5dd6, 0x5ed6, 0x5fd6, 0x60d6, 0x61d6, 0x62d6, 0xc0e5, 0x63d6, 0x64d6, 0x65d6, 0x66d6, 0x67d6, 0x68d6, 0x69d6, 0x6ad6, 0x6bd6, 0x6cd6, 0x6dd6, 0x6ed6, 0x6fd6, 0x70d6, 0x71d6, 0x72d6, 0x73d6, 0x74d6, 0x75d6, 0x76d6, 0x77d6, 0x78d6, 0x79d6, 0x7ad6, 0x7bd6, 0x7cd6, 0x7dd6, 0x7ed6, 0x80d6, 0x81d6, 0xa5f6, 0x82d6, 0x83d6, 0x84d6, 0x85d6, 0x86d6, 0x87d6, 0x88d6, 0x89d6, 0x8ad6, 0x8bd6, 0x8cd6, 0x8dd6, 0x8ed6, 0x8fd6, 0x90d6, 0x91d6, 0x92d6, 0x93d6, 0x94d6, 0x95d6, 0x96d6, 0x97d6, 0x98d6, 0x99d6, 0x9ad6, 0x9bd6, 0x9cd6, 0x9dd6, 0x9ed6, 0x9fd6, 0xa0d6, 0x40d7, 0x41d7, 0x42d7, 0x43d7, 0x44d7, 0x45d7, 0x46d7, 0x47d7, 0x48d7, 0x49d7, 0x4ad7, 0x4bd7, 0x4cd7, 0x4dd7, 0x4ed7, 0x4fd7, 0x50d7, 0x51d7, 0x52d7, 0x53d7, 0x54d7, 0x55d7, 0x56d7, 0x57d7, 0x58d7, 0x59d7, 0x5ad7, 0x5bd7, 0x5cd7, 0x5dd7, 0x5ed7, 0x5fd7, 0xafbe, 0x60d7, 0x61d7, 0x62d7, 0x63d7, 0x64d7, 0xa9c6, 0x65d7, 0x66d7, 0x67d7, 0x68d7, 0x69d7, 0x6ad7, 0x6bd7, 0x6cd7, 0x6dd7, 0x6ed7, 0x6fd7, 0x70d7, 0x71d7, 0x72d7, 0x73d7, 0x74d7, 0x75d7, 0x76d7, 0x77d7, 0x78d7, 0x79d7, 0x7ad7, 0x7bd7, 0x7cd7, 0x7dd7, 0x7ed7, 0x80d7, 0x81d7, 0x82d7, 0x83d7, 0x84d7, 0x85d7, 0x86d7, 0x87d7, 0x88d7, 0x89d7, 0x8ad7, 0x8bd7, 0x8cd7, 0x8dd7, 0x8ed7, 0x8fd7, 0x90d7, 0x91d7, 0x92d7, 0x93d7, 0x94d7, 0x95d7, 0x96d7, 0x97d7, 0x98d7, 0xa5da, 0xc6bc, 0xa9b6, 0xbcb8, 0xcfc8, 0xa5bc, 0xa6da, 0xa7da, 0xd6cc, 0xc3c8, 0xa8da, 0xfdc6, 0x99d7, 0xb5d1, 0xe9d2, 0xb6d1, 0xc7bc, 0x9ad7, 0xb2bd, 0xe4bb, 0xa9da, 0xaada, 0xc8d1, 0xabda, 0xedd0, 0xefb6, 0xdbc2, 0x9bd7, 0xcfcb, 0xedb7, 0xe8c9, 0xc3b7, 0xf7be, 0xa4d6, 0xacda, 0xadda, 0xc0c6, 0xe7d7, 0xb6ca, 0x9cd7, 0xa9d5, 0xdfcb, 0xefd5, 0xaeda, 0xdfd6, 0xcab4, 0xb0da, 0xafda, 0x9dd7, 0xebd2, 0xb1da, 0xb2da, 0xb3da, 0xd4ca, 0xb4da, 0xabca, 0xb5da, 0xb6da, 0xcfb3, 0xefd6, 0xb7da, 0xb0bb, 0xaeb5, 0xb8da, 0xb9da, 0xeeb9, 0xafd1, 0xe8d2, 0xbada, 0xc3b8, 0xeacf, 0xefb2, 0xbbda, 0xbcda, 0x9ed7, 0xebbd, 0xdcce, 0xefd3, 0xbdda, 0xf3ce, 0xbeda, 0xd5d3, 0xe5bb, 0xbfda, 0xb5cb, 0xd0cb, 0xc0da, 0xebc7, 0xeed6, 0xc1da, 0xb5c5, 0xc1b6, 0xc2da, 0xccb7, 0xcebf, 0xc3da, 0xc4da, 0xadcb, 0xc5da, 0xf7b5, 0xc6da, 0xc2c1, 0xbbd7, 0xc7da, 0xb8cc, 0x9fd7, 0xead2, 0xb1c4, 0xc8da, 0xfdb5, 0xd1bb, 0xc9da, 0xb3d0, 0xcada, 0xcbda, 0xbdce, 0xccda, 0xcdda, 0xceda, 0xf7b2, 0xd1da, 0xcfda, 0xe8d1, 0xd0da, 0xd5c3, 0xd2da, 0xa0d7, 0xd3da, 0xd4da, 0xd5da, 0xbbd0, 0xa5d2, 0xf9b0, 0xd6da, 0xabc7, 0xd7da, 0xf7bd, 0xa1c3, 0xd8da, 0xd9da, 0xfdc3, 0xb7cc, 0xdada, 0xdbda, 0xbec0, 0xd7c6, 0xdcda, 0xddda, 0xb4c7, 0xdeda, 0xdfda, 0xc8b9, 0x40d8, 0x41d8, 0x42d8, 0x43d8, 0x44d8, 0x45d8, 0x46d8, 0x47d8, 0x48d8, 0xedbb, 0x49d8, 0x4ad8, 0x4bd8, 0x4cd8, 0xb9b6, 0xf8f4, 0x4dd8, 0xf9f4, 0x4ed8, 0x4fd8, 0xe3cd, 0x50d8, 0x51d8, 0x52d8, 0x53d8, 0x54d8, 0x55d8, 0x56d8, 0x57d8, 0xb9f5, 0x58d8, 0x59d8, 0x5ad8, 0x5bd8, 0xe0eb, 0x5cd8, 0x5dd8, 0x5ed8, 0x5fd8, 0x60d8, 0x61d8, 0xf3cf, 0xbfbb, 0x62d8, 0x63d8, 0x64d8, 0x65d8, 0x66d8, 0x67d8, 0x68d8, 0xc0ba, 0xa5d4, 0x69d8, 0x6ad8, 0x6bd8, 0x6cd8, 0x6dd8, 0x6ed8, 0x6fd8, 0xd9e1, 0x70d8, 0x71d8, 0x72d8, 0x73d8, 0xf4f5, 0xaab1, 0xf2b2, 0x74d8, 0x75d8, 0x76d8, 0x77d8, 0x78d8, 0x79d8, 0x7ad8, 0xf5f5, 0x7bd8, 0x7cd8, 0xf7f5, 0x7dd8, 0x7ed8, 0x80d8, 0xd1ba, 0xf6f5, 0x81d8, 0xb2c3, 0x82d8, 0x83d8, 0x84d8, 0x85d8, 0x86d8, 0x87d8, 0x88d8, 0xf9f5, 0x89d8, 0x8ad8, 0x8bd8, 0xf8f5, 0x8cd8, 0x8dd8, 0x8ed8, 0x8fd8, 0x90d8, 0x91d8, 0x92d8, 0x93d8, 0x94d8, 0x95d8, 0x96d8, 0x97d8, 0x98d8, 0x99d8, 0x9ad8, 0x9bd8, 0x9cd8, 0x9dd8, 0x9ed8, 0x9fd8, 0xa0d8, 0x40d9, 0x41d9, 0x42d9, 0x43d9, 0x44d9, 0x45d9, 0x46d9, 0x47d9, 0x48d9, 0x49d9, 0x4ad9, 0x4bd9, 0x4cd9, 0x4dd9, 0x4ed9, 0x4fd9, 0x50d9, 0x51d9, 0x52d9, 0x53d9, 0x54d9, 0x55d9, 0x56d9, 0x57d9, 0x58d9, 0x59d9, 0x5ad9, 0x5bd9, 0x5cd9, 0x5dd9, 0x5ed9, 0x5fd9, 0x60d9, 0x61d9, 0x62d9, 0x63d9, 0x64d9, 0x65d9, 0x66d9, 0x67d9, 0x68d9, 0x69d9, 0x6ad9, 0x6bd9, 0x6cd9, 0x6dd9, 0x6ed9, 0x6fd9, 0x70d9, 0x71d9, 0x72d9, 0x73d9, 0x74d9, 0x75d9, 0x76d9, 0x77d9, 0x78d9, 0x79d9, 0x7ad9, 0x7bd9, 0x7cd9, 0x7dd9, 0x7ed9, 0x80d9, 0x81d9, 0x82d9, 0x83d9, 0x84d9, 0x85d9, 0x86d9, 0x87d9, 0x88d9, 0x89d9, 0x8ad9, 0x8bd9, 0x8cd9, 0x8dd9, 0x8ed9, 0x8fd9, 0x90d9, 0x91d9, 0x92d9, 0x93d9, 0x94d9, 0x95d9, 0x96d9, 0x97d9, 0x98d9, 0x99d9, 0x9ad9, 0x9bd9, 0x9cd9, 0x9dd9, 0x9ed9, 0x9fd9, 0xa0d9, 0x40da, 0x41da, 0x42da, 0x43da, 0x44da, 0x45da, 0x46da, 0x47da, 0x48da, 0x49da, 0x4ada, 0x4bda, 0x4cda, 0x4dda, 0x4eda, 0xb4b1, 0xead5, 0xbab8, 0x4fda, 0xb1b9, 0xc6b2, 0xf0d4, 0xcdcf, 0xdcb0, 0xcbd5, 0xf5bb, 0xcad6, 0xb7b7, 0xb0cc, 0xb6c6, 0xe1b1, 0xbab9, 0xfcd6, 0xe1b9, 0xa1b7, 0xfabc, 0xdaea, 0xdbea, 0xf9cc, 0xf3b9, 0xdcea, 0xfbb4, 0xb3c3, 0xd1b7, 0xd8ba, 0xddea, 0xf4d4, 0xdeea, 0xd6bc, 0xdfbb, 0xdfea, 0xdec1, 0xb8c2, 0xdfd4, 0xcad7, 0xe0ea, 0xe1ea, 0xe4ea, 0xe2ea, 0xe3ea, 0xdec9, 0xb3b8, 0xc4b6, 0xe5ea, 0xeaca, 0xcdc9, 0xcdb4, 0x50da, 0x51da, 0xd9e2, 0xe2c5, 0xe6ea, 0xb5c0, 0x52da, 0xb8d7, 0xe7ea, 0xacd7, 0xfcc8, 0xd3d8, 0xcdd8, 0xded4, 0x53da, 0xf9d4, 0xc4c9, 0xaed3, 0xd3b8, 0xe0b3, 0x54da, 0xe2c9, 0xf6f4, 0x55da, 0x56da, 0x57da, 0xd5ba, 0x58da, 0xf7f4, 0x59da, 0x5ada, 0xdfd7, 0x5bda, 0x5cda, 0xf1f4, 0xb0b8, 0xd4d5, 0xcfb8, 0xf0c6, 0x5dda, 0x5eda, 0x5fda, 0x60da, 0x61da, 0x62da, 0x63da, 0x64da, 0x65da, 0xc3b3, 0x66da, 0x67da, 0xf2f4, 0xacb3, 0x68da, 0x69da, 0x6ada, 0x6bda, 0xbdd4, 0xf7c7, 0x6cda, 0x6dda, 0x6eda, 0x6fda, 0x70da, 0xf4f4, 0x71da, 0x72da, 0xf3f4, 0x73da, 0x74da, 0x75da, 0x76da, 0x77da, 0x78da, 0x79da, 0x7ada, 0x7bda, 0x7cda, 0xcbcc, 0x7dda, 0x7eda, 0x80da, 0xa4c8, 0x81da, 0x82da, 0x83da, 0x84da, 0x85da, 0x86da, 0x87da, 0x88da, 0x89da, 0x8ada, 0x8bda, 0x8cda, 0x8dda, 0xf5f4, 0x8eda, 0xe3d7, 0xbfc5, 0xc0f5, 0x8fda, 0x90da, 0xbbf5, 0x91da, 0xc3f5, 0x92da, 0xc2f5, 0x93da, 0xbad6, 0xc1f5, 0x94da, 0x95da, 0x96da, 0xbed4, 0xc4f5, 0x97da, 0xccf5, 0x98da, 0x99da, 0x9ada, 0x9bda, 0xcfb0, 0xf8b5, 0x9cda, 0xc9f5, 0xcaf5, 0x9dda, 0xdcc5, 0x9eda, 0x9fda, 0xa0da, 0x40db, 0xc5f5, 0xc6f5, 0x41db, 0x42db, 0xc7f5, 0xcbf5, 0x43db, 0xe0be, 0xc8f5, 0xfab8, 0x44db, 0x45db, 0x46db, 0xd0f5, 0xd3f5, 0x47db, 0x48db, 0x49db, 0xe7bf, 0x4adb, 0xf2b9, 0xbcf5, 0xcdf5, 0x4bdb, 0x4cdb, 0xb7c2, 0x4ddb, 0x4edb, 0x4fdb, 0xf8cc, 0x50db, 0xf9bc, 0x51db, 0xcef5, 0xcff5, 0xd1f5, 0xe5b6, 0xd2f5, 0x52db, 0xd5f5, 0x53db, 0x54db, 0x55db, 0x56db, 0x57db, 0x58db, 0x59db, 0xbdf5, 0x5adb, 0x5bdb, 0x5cdb, 0xd4f5, 0xbbd3, 0x5ddb, 0xecb3, 0x5edb, 0x5fdb, 0xa4cc, 0x60db, 0x61db, 0x62db, 0x63db, 0xd6f5, 0x64db, 0x65db, 0x66db, 0x67db, 0x68db, 0x69db, 0x6adb, 0x6bdb, 0xd7f5, 0xe1be, 0xd8f5, 0x6cdb, 0x6ddb, 0xdfcc, 0xdbf5, 0x6edb, 0x6fdb, 0x70db, 0x71db, 0x72db, 0xc8b2, 0xd9d7, 0x73db, 0xd9f5, 0x74db, 0xdaf5, 0xdcf5, 0x75db, 0xe2f5, 0x76db, 0x77db, 0x78db, 0xe0f5, 0x79db, 0x7adb, 0x7bdb, 0xdff5, 0xddf5, 0x7cdb, 0x7ddb, 0xe1f5, 0x7edb, 0x80db, 0xdef5, 0xe4f5, 0xe5f5, 0x81db, 0xe3cc, 0x82db, 0x83db, 0xbfe5, 0xb8b5, 0xe3f5, 0xe8f5, 0xa3cc, 0x84db, 0x85db, 0x86db, 0x87db, 0x88db, 0xe6f5, 0xe7f5, 0x89db, 0x8adb, 0x8bdb, 0x8cdb, 0x8ddb, 0x8edb, 0xbef5, 0x8fdb, 0x90db, 0x91db, 0x92db, 0x93db, 0x94db, 0x95db, 0x96db, 0x97db, 0x98db, 0x99db, 0x9adb, 0xc4b1, 0x9bdb, 0x9cdb, 0xbff5, 0x9ddb, 0x9edb, 0xc5b5, 0xe4b2, 0x9fdb, 0xecf5, 0xe9f5, 0xa0db, 0xd7b6, 0x40dc, 0xedf5, 0x41dc, 0xeaf5, 0x42dc, 0x43dc, 0x44dc, 0x45dc, 0x46dc, 0xebf5, 0x47dc, 0x48dc, 0xdab4, 0x49dc, 0xead4, 0x4adc, 0x4bdc, 0x4cdc, 0xeef5, 0x4ddc, 0xf9b3, 0x4edc, 0x4fdc, 0x50dc, 0x51dc, 0x52dc, 0x53dc, 0x54dc, 0xeff5, 0xf1f5, 0x55dc, 0x56dc, 0x57dc, 0xf0f5, 0x58dc, 0x59dc, 0x5adc, 0x5bdc, 0x5cdc, 0x5ddc, 0x5edc, 0xf2f5, 0x5fdc, 0xf3f5, 0x60dc, 0x61dc, 0x62dc, 0x63dc, 0x64dc, 0x65dc, 0x66dc, 0x67dc, 0x68dc, 0x69dc, 0x6adc, 0x6bdc, 0xedc9, 0xaab9, 0x6cdc, 0x6ddc, 0xfbc7, 0x6edc, 0x6fdc, 0xe3b6, 0x70dc, 0x71dc, 0x72dc, 0x73dc, 0x74dc, 0x75dc, 0x76dc, 0xc9cc, 0x77dc, 0x78dc, 0x79dc, 0x7adc, 0x7bdc, 0x7cdc, 0x7ddc, 0x7edc, 0x80dc, 0x81dc, 0x82dc, 0x83dc, 0x84dc, 0x85dc, 0x86dc, 0x87dc, 0x88dc, 0x89dc, 0x8adc, 0xa6ea, 0x8bdc, 0x8cdc, 0x8ddc, 0x8edc, 0x8fdc, 0x90dc, 0x91dc, 0x92dc, 0x93dc, 0x94dc, 0x95dc, 0x96dc, 0x97dc, 0x98dc, 0x99dc, 0x9adc, 0x9bdc, 0x9cdc, 0x9ddc, 0x9edc, 0x9fdc, 0xa0dc, 0x40dd, 0x41dd, 0x42dd, 0x43dd, 0x44dd, 0x45dd, 0x46dd, 0x47dd, 0x48dd, 0x49dd, 0x4add, 0x4bdd, 0x4cdd, 0x4ddd, 0x4edd, 0x4fdd, 0x50dd, 0x51dd, 0x52dd, 0x53dd, 0x54dd, 0x55dd, 0x56dd, 0x57dd, 0x58dd, 0x59dd, 0x5add, 0x5bdd, 0x5cdd, 0x5ddd, 0x5edd, 0x5fdd, 0x60dd, 0x61dd, 0x62dd, 0x63dd, 0x64dd, 0x65dd, 0x66dd, 0x67dd, 0x68dd, 0x69dd, 0x6add, 0x6bdd, 0x6cdd, 0x6ddd, 0x6edd, 0x6fdd, 0x70dd, 0x71dd, 0x72dd, 0x73dd, 0x74dd, 0x75dd, 0x76dd, 0x77dd, 0x78dd, 0x79dd, 0x7add, 0x7bdd, 0x7cdd, 0x7ddd, 0x7edd, 0x80dd, 0x81dd, 0x82dd, 0x83dd, 0x84dd, 0x85dd, 0x86dd, 0x87dd, 0x88dd, 0x89dd, 0x8add, 0x8bdd, 0x8cdd, 0x8ddd, 0x8edd, 0x8fdd, 0x90dd, 0x91dd, 0x92dd, 0x93dd, 0x94dd, 0x95dd, 0x96dd, 0x97dd, 0x98dd, 0x99dd, 0x9add, 0x9bdd, 0x9cdd, 0x9ddd, 0x9edd, 0x9fdd, 0xa0dd, 0x40de, 0x41de, 0x42de, 0x43de, 0x44de, 0x45de, 0x46de, 0x47de, 0x48de, 0x49de, 0x4ade, 0x4bde, 0x4cde, 0x4dde, 0x4ede, 0x4fde, 0x50de, 0x51de, 0x52de, 0x53de, 0x54de, 0x55de, 0x56de, 0x57de, 0x58de, 0x59de, 0x5ade, 0x5bde, 0x5cde, 0x5dde, 0x5ede, 0x5fde, 0x60de, 0xb5b3, 0xfed4, 0xecb9, 0xf9d0, 0x61de, 0xede9, 0xaad7, 0xeee9, 0xd6c2, 0xedc8, 0xe4ba, 0xefe9, 0xf0e9, 0xf1e9, 0xe1d6, 0xf2e9, 0xf3e9, 0xf5e9, 0xf4e9, 0xf6e9, 0xf7e9, 0xe1c7, 0xf8e9, 0xd8d4, 0xf9e9, 0xcebd, 0x62de, 0xfae9, 0xfbe9, 0xcfbd, 0xfce9, 0xa8b8, 0xbec1, 0xfde9, 0xb2b1, 0xd4bb, 0xf5b9, 0xfee9, 0x63de, 0xa1ea, 0xa2ea, 0xa3ea, 0xf8b7, 0xadbc, 0x64de, 0xe4ca, 0xcee0, 0xafd4, 0xbdcf, 0xb7d5, 0xa4ea, 0xded5, 0xa5ea, 0xc1d0, 0xbcb9, 0x65de, 0xc7b4, 0xd9b1, 0x66de, 0x67de, 0x68de, 0xb1c0, 0x69de, 0x6ade, 0x6bde, 0x6cde, 0xe6b1, 0xe7b1, 0x6dde, 0xe8b1, 0x6ede, 0x6fde, 0x70de, 0x71de, 0xbdb3, 0xe8c8, 0x72de, 0x73de, 0x74de, 0x75de, 0xc1e5, 0x76de, 0x77de, 0xdfb1, 0x78de, 0x79de, 0x7ade, 0xc9c1, 0xefb4, 0x7bde, 0x7cde, 0xa8c7, 0xd8d3, 0x7dde, 0xf9c6, 0xb8d1, 0x7ede, 0xfdb9, 0xf5c2, 0x80de, 0x81de, 0x82de, 0x83de, 0x84de, 0xadd3, 0x85de, 0xcbd4, 0xfcbd, 0x86de, 0xc2e5, 0xb5b7, 0xc3e5, 0x87de, 0x88de, 0xb9bb, 0xe2d5, 0x89de, 0xf8bd, 0xb6d4, 0xa5ce, 0xacc1, 0xd9b3, 0x8ade, 0x8bde, 0xf6cc, 0x8cde, 0xc6e5, 0xc4e5, 0xc8e5, 0x8dde, 0xcae5, 0xc7e5, 0xcfb5, 0xc8c6, 0x8ede, 0xfcb5, 0xc5e5, 0x8fde, 0xf6ca, 0x90de, 0x91de, 0xc9e5, 0x92de, 0x93de, 0x94de, 0xd4c3, 0xc5b1, 0xa3bc, 0x95de, 0x96de, 0x97de, 0xb7d7, 0x98de, 0x99de, 0xcbcd, 0xcdcb, 0xcaca, 0xd3cc, 0xcce5, 0xcbe5, 0xe6c4, 0x9ade, 0x9bde, 0xa1d1, 0xb7d1, 0xcde5, 0x9cde, 0xd0e5, 0x9dde, 0xb8cd, 0xf0d6, 0xcfe5, 0xddb5, 0x9ede, 0xbecd, 0x9fde, 0xd1e5, 0xbab6, 0xa0de, 0x40df, 0xa8cd, 0xe4b9, 0x41df, 0xc5ca, 0xd1b3, 0xd9cb, 0xecd4, 0xd2e5, 0xeab7, 0x42df, 0x43df, 0x44df, 0xcee5, 0x45df, 0x46df, 0x47df, 0x48df, 0x49df, 0x4adf, 0xd5e5, 0xfeb4, 0xd6e5, 0x4bdf, 0x4cdf, 0x4ddf, 0x4edf, 0x4fdf, 0xd3e5, 0xd4e5, 0x50df, 0xddd2, 0x51df, 0x52df, 0xdfc2, 0xc6b1, 0x53df, 0xe2d3, 0x54df, 0x55df, 0xddb6, 0xeccb, 0x56df, 0xd7e5, 0x57df, 0x58df, 0xf6d3, 0x59df, 0x5adf, 0x5bdf, 0x5cdf, 0x5ddf, 0xe9b1, 0x5edf, 0xf4b6, 0xdae5, 0xd8e5, 0xd9e5, 0xc0b5, 0x5fdf, 0x60df, 0x61df, 0xc5d2, 0xdce5, 0x62df, 0x63df, 0xdee5, 0x64df, 0x65df, 0x66df, 0x67df, 0x68df, 0x69df, 0xdde5, 0xb2c7, 0x6adf, 0xa3d2, 0x6bdf, 0x6cdf, 0xdbe5, 0x6ddf, 0x6edf, 0x6fdf, 0x70df, 0xe2d4, 0xdad5, 0x71df, 0x72df, 0x73df, 0x74df, 0x75df, 0xe0e5, 0xf1d7, 0x76df, 0x77df, 0x78df, 0x79df, 0x7adf, 0x7bdf, 0x7cdf, 0xe1e5, 0x7ddf, 0xdcb1, 0xfbd1, 0x7edf, 0xe2e5, 0xe4e5, 0x80df, 0x81df, 0x82df, 0x83df, 0xe3e5, 0x84df, 0x85df, 0xe5e5, 0x86df, 0x87df, 0x88df, 0x89df, 0x8adf, 0xd8d2, 0x8bdf, 0xcbb5, 0x8cdf, 0xdfe7, 0x8ddf, 0xf5da, 0x8edf, 0xf8da, 0x8fdf, 0xf6da, 0x90df, 0xf7da, 0x91df, 0x92df, 0x93df, 0xfada, 0xcfd0, 0xc7c4, 0x94df, 0x95df, 0xeeb0, 0x96df, 0x97df, 0x98df, 0xb0d0, 0x99df, 0xf9da, 0x9adf, 0xcad3, 0xaaba, 0xa2db, 0xf1c7, 0x9bdf, 0xfcda, 0xfbda, 0xdbc9, 0xfdda, 0x9cdf, 0xa1db, 0xded7, 0xfeda, 0xdac1, 0x9ddf, 0x9edf, 0xa5db, 0x9fdf, 0xa0df, 0xf4d3, 0x40e0, 0x41e0, 0xa7db, 0xa4db, 0x42e0, 0xa8db, 0x43e0, 0x44e0, 0xbcbd, 0x45e0, 0x46e0, 0x47e0, 0xc9c0, 0xa3db, 0xa6db, 0xa3d6, 0x48e0, 0xa9db, 0x49e0, 0x4ae0, 0x4be0, 0xaddb, 0x4ce0, 0x4de0, 0x4ee0, 0xaedb, 0xacdb, 0xc2ba, 0x4fe0, 0x50e0, 0x51e0, 0xa4bf, 0xabdb, 0x52e0, 0x53e0, 0x54e0, 0xaadb, 0xc7d4, 0xbfb2, 0x55e0, 0x56e0, 0xafdb, 0x57e0, 0xf9b9, 0x58e0, 0xb0db, 0x59e0, 0x5ae0, 0x5be0, 0x5ce0, 0xbbb3, 0x5de0, 0x5ee0, 0x5fe0, 0xa6b5, 0x60e0, 0x61e0, 0x62e0, 0x63e0, 0xbcb6, 0xb1db, 0x64e0, 0x65e0, 0x66e0, 0xf5b6, 0x67e0, 0xb2db, 0x68e0, 0x69e0, 0x6ae0, 0x6be0, 0x6ce0, 0x6de0, 0x6ee0, 0x6fe0, 0x70e0, 0x71e0, 0x72e0, 0x73e0, 0x74e0, 0x75e0, 0x76e0, 0x77e0, 0x78e0, 0x79e0, 0x7ae0, 0x7be0, 0xc9b1, 0x7ce0, 0x7de0, 0x7ee0, 0x80e0, 0xb4db, 0x81e0, 0x82e0, 0x83e0, 0xb3db, 0xb5db, 0x84e0, 0x85e0, 0x86e0, 0x87e0, 0x88e0, 0x89e0, 0x8ae0, 0x8be0, 0x8ce0, 0x8de0, 0x8ee0, 0xb7db, 0x8fe0, 0xb6db, 0x90e0, 0x91e0, 0x92e0, 0x93e0, 0x94e0, 0x95e0, 0x96e0, 0xb8db, 0x97e0, 0x98e0, 0x99e0, 0x9ae0, 0x9be0, 0x9ce0, 0x9de0, 0x9ee0, 0x9fe0, 0xb9db, 0xa0e0, 0x40e1, 0xbadb, 0x41e1, 0x42e1, 0xcfd3, 0xfaf4, 0xf5c7, 0xc3d7, 0xe4c5, 0xfcf4, 0xfdf4, 0xfbf4, 0x43e1, 0xc6be, 0x44e1, 0x45e1, 0x46e1, 0x47e1, 0xefd0, 0x48e1, 0x49e1, 0xd3b7, 0x4ae1, 0x4be1, 0xcdd4, 0xaacc, 0x4ce1, 0x4de1, 0xa2f5, 0xa1f5, 0xa8ba, 0xfef4, 0xd6cb, 0x4ee1, 0x4fe1, 0x50e1, 0xa4f5, 0xd2c0, 0x51e1, 0xeab3, 0x52e1, 0xaacd, 0xa5f5, 0xa3f5, 0xb4bd, 0xa8f5, 0x53e1, 0xa9f5, 0xcdbd, 0xb8c3, 0xe1bf, 0xe1cb, 0xaaf5, 0x54e1, 0x55e1, 0x56e1, 0xa6f5, 0xa7f5, 0xf0c4, 0x57e1, 0x58e1, 0x59e1, 0x5ae1, 0x5be1, 0xacf5, 0x5ce1, 0xbcb4, 0x5de1, 0xedd7, 0x5ee1, 0xd7b4, 0xabf5, 0xaef5, 0x5fe1, 0x60e1, 0xadf5, 0xaff5, 0xd1d0, 0x61e1, 0x62e1, 0x63e1, 0x64e1, 0x65e1, 0x66e1, 0x67e1, 0xd1c3, 0xa9c8, 0x68e1, 0x69e1, 0x6ae1, 0x6be1, 0x6ce1, 0x6de1, 0xb0f5, 0xb1f5, 0x6ee1, 0x6fe1, 0x70e1, 0x71e1, 0x72e1, 0x73e1, 0xb2f5, 0x74e1, 0x75e1, 0xb3f5, 0xb4f5, 0xb5f5, 0x76e1, 0x77e1, 0x78e1, 0x79e1, 0xb7f5, 0xb6f5, 0x7ae1, 0x7be1, 0x7ce1, 0x7de1, 0xb8f5, 0x7ee1, 0x80e1, 0x81e1, 0x82e1, 0x83e1, 0x84e1, 0x85e1, 0x86e1, 0x87e1, 0x88e1, 0x89e1, 0x8ae1, 0xc9b2, 0x8be1, 0xd4d3, 0xcdca, 0x8ce1, 0xefc0, 0xd8d6, 0xb0d2, 0xbfc1, 0x8de1, 0xf0bd, 0x8ee1, 0x8fe1, 0x90e1, 0x91e1, 0x92e1, 0x93e1, 0x94e1, 0x95e1, 0x96e1, 0x97e1, 0xaab8, 0x98e1, 0x99e1, 0x9ae1, 0x9be1, 0x9ce1, 0x9de1, 0x9ee1, 0x9fe1, 0xa0e1, 0x40e2, 0x41e2, 0x42e2, 0x43e2, 0x44e2, 0x45e2, 0x46e2, 0x47e2, 0x48e2, 0x49e2, 0x4ae2, 0x4be2, 0x4ce2, 0x4de2, 0x4ee2, 0x4fe2, 0x50e2, 0x51e2, 0x52e2, 0x53e2, 0x54e2, 0x55e2, 0x56e2, 0x57e2, 0x58e2, 0x59e2, 0x5ae2, 0x5be2, 0x5ce2, 0x5de2, 0x5ee2, 0x5fe2, 0x60e2, 0x61e2, 0x62e2, 0x63e2, 0x64e2, 0x65e2, 0x66e2, 0x67e2, 0x68e2, 0x69e2, 0x6ae2, 0x6be2, 0x6ce2, 0x6de2, 0x6ee2, 0x6fe2, 0x70e2, 0x71e2, 0x72e2, 0x73e2, 0x74e2, 0x75e2, 0x76e2, 0x77e2, 0x78e2, 0x79e2, 0x7ae2, 0x7be2, 0x7ce2, 0x7de2, 0x7ee2, 0x80e2, 0x81e2, 0x82e2, 0x83e2, 0x84e2, 0x85e2, 0x86e2, 0x87e2, 0x88e2, 0x89e2, 0x8ae2, 0x8be2, 0x8ce2, 0x8de2, 0x8ee2, 0x8fe2, 0x90e2, 0x91e2, 0x92e2, 0x93e2, 0x94e2, 0x95e2, 0x96e2, 0x97e2, 0x98e2, 0x99e2, 0x9ae2, 0x9be2, 0x9ce2, 0x9de2, 0x9ee2, 0x9fe2, 0xa0e2, 0x40e3, 0x41e3, 0x42e3, 0x43e3, 0x44e3, 0x45e3, 0x46e3, 0x47e3, 0x48e3, 0x49e3, 0x4ae3, 0x4be3, 0x4ce3, 0x4de3, 0x4ee3, 0x4fe3, 0x50e3, 0x51e3, 0x52e3, 0x53e3, 0x54e3, 0x55e3, 0x56e3, 0x57e3, 0x58e3, 0x59e3, 0x5ae3, 0x5be3, 0x5ce3, 0x5de3, 0x5ee3, 0x5fe3, 0x60e3, 0x61e3, 0x62e3, 0x63e3, 0x64e3, 0x65e3, 0x66e3, 0x67e3, 0x68e3, 0x69e3, 0x6ae3, 0x6be3, 0x6ce3, 0x6de3, 0xf8bc, 0x6ee3, 0x6fe3, 0x70e3, 0x71e3, 0x72e3, 0x73e3, 0x74e3, 0x75e3, 0x76e3, 0x77e3, 0x78e3, 0x79e3, 0x7ae3, 0x7be3, 0x7ce3, 0x7de3, 0x7ee3, 0x80e3, 0x81e3, 0x82e3, 0x83e3, 0x84e3, 0x85e3, 0x86e3, 0x87e3, 0xc6f6, 0x88e3, 0x89e3, 0x8ae3, 0x8be3, 0x8ce3, 0x8de3, 0x8ee3, 0x8fe3, 0x90e3, 0x91e3, 0x92e3, 0x93e3, 0x94e3, 0x95e3, 0x96e3, 0x97e3, 0x98e3, 0x99e3, 0x9ae3, 0x9be3, 0x9ce3, 0x9de3, 0x9ee3, 0x9fe3, 0xa0e3, 0x40e4, 0x41e4, 0x42e4, 0x43e4, 0x44e4, 0x45e4, 0xc7f6, 0x46e4, 0x47e4, 0x48e4, 0x49e4, 0x4ae4, 0x4be4, 0x4ce4, 0x4de4, 0x4ee4, 0x4fe4, 0x50e4, 0x51e4, 0x52e4, 0x53e4, 0x54e4, 0x55e4, 0x56e4, 0x57e4, 0x58e4, 0x59e4, 0x5ae4, 0x5be4, 0x5ce4, 0x5de4, 0x5ee4, 0xc8f6, 0x5fe4, 0x60e4, 0x61e4, 0x62e4, 0x63e4, 0x64e4, 0x65e4, 0x66e4, 0x67e4, 0x68e4, 0x69e4, 0x6ae4, 0x6be4, 0x6ce4, 0x6de4, 0x6ee4, 0x6fe4, 0x70e4, 0x71e4, 0x72e4, 0x73e4, 0x74e4, 0x75e4, 0x76e4, 0x77e4, 0x78e4, 0x79e4, 0x7ae4, 0x7be4, 0x7ce4, 0x7de4, 0x7ee4, 0x80e4, 0x81e4, 0x82e4, 0x83e4, 0x84e4, 0x85e4, 0x86e4, 0x87e4, 0x88e4, 0x89e4, 0x8ae4, 0x8be4, 0x8ce4, 0x8de4, 0x8ee4, 0x8fe4, 0x90e4, 0x91e4, 0x92e4, 0x93e4, 0x94e4, 0x95e4, 0x96e4, 0x97e4, 0x98e4, 0x99e4, 0x9ae4, 0x9be4, 0x9ce4, 0x9de4, 0x9ee4, 0x9fe4, 0xa0e4, 0x40e5, 0x41e5, 0x42e5, 0x43e5, 0x44e5, 0x45e5, 0x46e5, 0x47e5, 0x48e5, 0x49e5, 0x4ae5, 0x4be5, 0x4ce5, 0x4de5, 0x4ee5, 0x4fe5, 0x50e5, 0x51e5, 0x52e5, 0x53e5, 0x54e5, 0x55e5, 0x56e5, 0x57e5, 0x58e5, 0x59e5, 0x5ae5, 0x5be5, 0x5ce5, 0x5de5, 0x5ee5, 0x5fe5, 0x60e5, 0x61e5, 0x62e5, 0x63e5, 0x64e5, 0x65e5, 0x66e5, 0x67e5, 0x68e5, 0x69e5, 0x6ae5, 0x6be5, 0x6ce5, 0x6de5, 0x6ee5, 0x6fe5, 0x70e5, 0x71e5, 0x72e5, 0x73e5, 0xc9f6, 0x74e5, 0x75e5, 0x76e5, 0x77e5, 0x78e5, 0x79e5, 0x7ae5, 0x7be5, 0x7ce5, 0x7de5, 0x7ee5, 0x80e5, 0x81e5, 0x82e5, 0x83e5, 0x84e5, 0x85e5, 0x86e5, 0x87e5, 0x88e5, 0x89e5, 0x8ae5, 0x8be5, 0x8ce5, 0x8de5, 0x8ee5, 0x8fe5, 0x90e5, 0x91e5, 0x92e5, 0x93e5, 0x94e5, 0x95e5, 0x96e5, 0x97e5, 0x98e5, 0x99e5, 0x9ae5, 0x9be5, 0x9ce5, 0x9de5, 0x9ee5, 0x9fe5, 0xcaf6, 0xa0e5, 0x40e6, 0x41e6, 0x42e6, 0x43e6, 0x44e6, 0x45e6, 0x46e6, 0x47e6, 0x48e6, 0x49e6, 0x4ae6, 0x4be6, 0x4ce6, 0x4de6, 0x4ee6, 0x4fe6, 0x50e6, 0x51e6, 0x52e6, 0x53e6, 0x54e6, 0x55e6, 0x56e6, 0x57e6, 0x58e6, 0x59e6, 0x5ae6, 0x5be6, 0x5ce6, 0x5de6, 0x5ee6, 0x5fe6, 0x60e6, 0x61e6, 0x62e6, 0xccf6, 0x63e6, 0x64e6, 0x65e6, 0x66e6, 0x67e6, 0x68e6, 0x69e6, 0x6ae6, 0x6be6, 0x6ce6, 0x6de6, 0x6ee6, 0x6fe6, 0x70e6, 0x71e6, 0x72e6, 0x73e6, 0x74e6, 0x75e6, 0x76e6, 0x77e6, 0x78e6, 0x79e6, 0x7ae6, 0x7be6, 0x7ce6, 0x7de6, 0x7ee6, 0x80e6, 0x81e6, 0x82e6, 0x83e6, 0x84e6, 0x85e6, 0x86e6, 0x87e6, 0x88e6, 0x89e6, 0x8ae6, 0x8be6, 0x8ce6, 0x8de6, 0x8ee6, 0x8fe6, 0x90e6, 0x91e6, 0x92e6, 0x93e6, 0x94e6, 0x95e6, 0x96e6, 0x97e6, 0x98e6, 0x99e6, 0x9ae6, 0x9be6, 0x9ce6, 0x9de6, 0xcbf6, 0x9ee6, 0x9fe6, 0xa0e6, 0x40e7, 0x41e7, 0x42e7, 0x43e7, 0x44e7, 0x45e7, 0x46e7, 0x47e7, 0xe9f7, 0x48e7, 0x49e7, 0x4ae7, 0x4be7, 0x4ce7, 0x4de7, 0x4ee7, 0x4fe7, 0x50e7, 0x51e7, 0x52e7, 0x53e7, 0x54e7, 0x55e7, 0x56e7, 0x57e7, 0x58e7, 0x59e7, 0x5ae7, 0x5be7, 0x5ce7, 0x5de7, 0x5ee7, 0x5fe7, 0x60e7, 0x61e7, 0x62e7, 0x63e7, 0x64e7, 0x65e7, 0x66e7, 0x67e7, 0x68e7, 0x69e7, 0x6ae7, 0x6be7, 0x6ce7, 0x6de7, 0x6ee7, 0x6fe7, 0x70e7, 0x71e7, 0x72e7, 0x73e7, 0x74e7, 0x75e7, 0x76e7, 0x77e7, 0x78e7, 0x79e7, 0x7ae7, 0x7be7, 0x7ce7, 0x7de7, 0x7ee7, 0x80e7, 0x81e7, 0x82e7, 0x83e7, 0x84e7, 0x85e7, 0x86e7, 0x87e7, 0x88e7, 0x89e7, 0x8ae7, 0x8be7, 0x8ce7, 0x8de7, 0x8ee7, 0x8fe7, 0x90e7, 0x91e7, 0x92e7, 0x93e7, 0x94e7, 0x95e7, 0x96e7, 0x97e7, 0x98e7, 0x99e7, 0x9ae7, 0x9be7, 0x9ce7, 0x9de7, 0x9ee7, 0x9fe7, 0xa0e7, 0x40e8, 0x41e8, 0x42e8, 0x43e8, 0x44e8, 0x45e8, 0x46e8, 0x47e8, 0x48e8, 0x49e8, 0x4ae8, 0x4be8, 0x4ce8, 0x4de8, 0x4ee8, 0xcdf6, 0x4fe8, 0x50e8, 0x51e8, 0x52e8, 0x53e8, 0x54e8, 0x55e8, 0x56e8, 0x57e8, 0x58e8, 0x59e8, 0x5ae8, 0x5be8, 0x5ce8, 0x5de8, 0x5ee8, 0x5fe8, 0x60e8, 0x61e8, 0x62e8, 0x63e8, 0x64e8, 0x65e8, 0x66e8, 0x67e8, 0x68e8, 0x69e8, 0x6ae8, 0x6be8, 0x6ce8, 0x6de8, 0x6ee8, 0x6fe8, 0x70e8, 0x71e8, 0x72e8, 0x73e8, 0x74e8, 0x75e8, 0x76e8, 0x77e8, 0x78e8, 0x79e8, 0x7ae8, 0xcef6, 0x7be8, 0x7ce8, 0x7de8, 0x7ee8, 0x80e8, 0x81e8, 0x82e8, 0x83e8, 0x84e8, 0x85e8, 0x86e8, 0x87e8, 0x88e8, 0x89e8, 0x8ae8, 0x8be8, 0x8ce8, 0x8de8, 0x8ee8, 0x8fe8, 0x90e8, 0x91e8, 0x92e8, 0x93e8, 0x94e8, 0xc4ee, 0xc5ee, 0xc6ee, 0xebd5, 0xa4b6, 0xc8ee, 0xc7ee, 0xc9ee, 0xcaee, 0xa5c7, 0xcbee, 0xccee, 0x95e8, 0xb0b7, 0xf6b5, 0xcdee, 0xcfee, 0x96e8, 0xceee, 0x97e8, 0xc6b8, 0xd0ee, 0xd1ee, 0xd2ee, 0xdbb6, 0xaeb3, 0xd3d6, 0xc6c4, 0xb5b1, 0xd6b8, 0xd3ee, 0xd4ee, 0xbfd4, 0xd5c7, 0xfbbe, 0xd9ce, 0xb3b9, 0xd6ee, 0xd5ee, 0xd8ee, 0xd7ee, 0xa5c5, 0xd9ee, 0xdaee, 0xaec7, 0xdbee, 0xafc7, 0xdcee, 0xa7b2, 0xddee, 0xdeee, 0xdfee, 0xe0ee, 0xe1ee, 0xead7, 0xe2ee, 0xe3ee, 0xd8bc, 0xe4ee, 0xcbd3, 0xfacc, 0xacb2, 0xe5c1, 0xe5ee, 0xa6c7, 0xadc3, 0x98e8, 0xe6ee, 0xe7ee, 0xe8ee, 0xe9ee, 0xeaee, 0xebee, 0xecee, 0x99e8, 0xedee, 0xeeee, 0xefee, 0x9ae8, 0x9be8, 0xf0ee, 0xf1ee, 0xf2ee, 0xf4ee, 0xf3ee, 0x9ce8, 0xf5ee, 0xadcd, 0xc1c2, 0xf6ee, 0xf7ee, 0xf8ee, 0xa1d5, 0xf9ee, 0xb3cf, 0xfaee, 0xfbee, 0x9de8, 0xfcee, 0xfdee, 0xa1ef, 0xfeee, 0xa2ef, 0xf5b8, 0xfac3, 0xa3ef, 0xa4ef, 0xc2bd, 0xbfd2, 0xf9b2, 0xa5ef, 0xa6ef, 0xa7ef, 0xf8d2, 0xa8ef, 0xfdd6, 0xa9ef, 0xccc6, 0x9ee8, 0xaaef, 0xabef, 0xb4c1, 0xacef, 0xfacf, 0xf8cb, 0xaeef, 0xadef, 0xfab3, 0xf8b9, 0xafef, 0xb0ef, 0xe2d0, 0xb1ef, 0xb2ef, 0xe6b7, 0xbfd0, 0xb3ef, 0xb4ef, 0xb5ef, 0xf1c8, 0xe0cc, 0xb6ef, 0xb7ef, 0xb8ef, 0xb9ef, 0xbaef, 0xe0d5, 0xbbef, 0xedb4, 0xaac3, 0xbcef, 0x9fe8, 0xbdef, 0xbeef, 0xbfef, 0xa0e8, 0xfdce, 0xc0ef, 0xe0c2, 0xb8b4, 0xb6d7, 0xf5bd, 0x40e9, 0xc7cf, 0xc3ef, 0xc1ef, 0xc2ef, 0xc4ef, 0xa7b6, 0xfcbc, 0xe2be, 0xccc3, 0xc5ef, 0xc6ef, 0x41e9, 0xc7ef, 0xcfef, 0xc8ef, 0xc9ef, 0xcaef, 0xc2c7, 0xf1ef, 0xcdb6, 0xcbef, 0x42e9, 0xccef, 0xcdef, 0xc6b6, 0xbec3, 0xceef, 0x43e9, 0xd0ef, 0xd1ef, 0xd2ef, 0xf2d5, 0x44e9, 0xd3ef, 0xf7c4, 0x45e9, 0xd4ef, 0xf8c4, 0xd5ef, 0xd6ef, 0xe4b8, 0xf7b0, 0xd7ef, 0xd8ef, 0xd9ef, 0x46e9, 0xdaef, 0xdbef, 0xdcef, 0xddef, 0x47e9, 0xdeef, 0xb5be, 0xe1ef, 0xdfef, 0xe0ef, 0x48e9, 0xe2ef, 0xe3ef, 0xcdc1, 0xe4ef, 0xe5ef, 0xe6ef, 0xe7ef, 0xe8ef, 0xe9ef, 0xeaef, 0xebef, 0xecef, 0xd8c0, 0x49e9, 0xedef, 0xadc1, 0xeeef, 0xefef, 0xf0ef, 0x4ae9, 0x4be9, 0xe2cf, 0x4ce9, 0x4de9, 0x4ee9, 0x4fe9, 0x50e9, 0x51e9, 0x52e9, 0x53e9, 0xa4b3, 0x54e9, 0x55e9, 0x56e9, 0x57e9, 0x58e9, 0x59e9, 0x5ae9, 0x5be9, 0x5ce9, 0x5de9, 0x5ee9, 0x5fe9, 0x60e9, 0x61e9, 0x62e9, 0x63e9, 0x64e9, 0x65e9, 0x66e9, 0x67e9, 0x68e9, 0x69e9, 0x6ae9, 0x6be9, 0x6ce9, 0x6de9, 0x6ee9, 0x6fe9, 0x70e9, 0x71e9, 0x72e9, 0x73e9, 0x74e9, 0x75e9, 0x76e9, 0x77e9, 0x78e9, 0x79e9, 0x7ae9, 0x7be9, 0x7ce9, 0x7de9, 0x7ee9, 0x80e9, 0x81e9, 0x82e9, 0x83e9, 0x84e9, 0x85e9, 0x86e9, 0x87e9, 0x88e9, 0x89e9, 0x8ae9, 0x8be9, 0x8ce9, 0x8de9, 0x8ee9, 0x8fe9, 0x90e9, 0x91e9, 0x92e9, 0x93e9, 0x94e9, 0x95e9, 0x96e9, 0x97e9, 0x98e9, 0x99e9, 0x9ae9, 0x9be9, 0x9ce9, 0x9de9, 0x9ee9, 0x9fe9, 0xa0e9, 0x40ea, 0x41ea, 0x42ea, 0x43ea, 0x44ea, 0x45ea, 0x46ea, 0x47ea, 0x48ea, 0x49ea, 0x4aea, 0x4bea, 0x4cea, 0x4dea, 0x4eea, 0x4fea, 0x50ea, 0x51ea, 0x52ea, 0x53ea, 0x54ea, 0x55ea, 0x56ea, 0x57ea, 0x58ea, 0x59ea, 0x5aea, 0x5bea, 0xc5c3, 0xc5e3, 0xc1c9, 0xc6e3, 0x5cea, 0xd5b1, 0xcace, 0xb3b4, 0xf2c8, 0xc7e3, 0xd0cf, 0xc8e3, 0xe4bc, 0xc9e3, 0xcae3, 0xc6c3, 0xa2d5, 0xd6c4, 0xebb9, 0xc5ce, 0xcbe3, 0xf6c3, 0xcce3, 0x5dea, 0xa7b7, 0xf3b8, 0xd2ba, 0xcde3, 0xcee3, 0xc4d4, 0xcfe3, 0x5eea, 0xd0e3, 0xcbd1, 0xd1e3, 0xd2e3, 0xd3e3, 0xd4e3, 0xd6d1, 0xd5e3, 0xfbb2, 0xbbc0, 0xd6e3, 0x5fea, 0xabc0, 0xd7e3, 0xd8e3, 0xd9e3, 0x60ea, 0xdae3, 0xdbe3, 0x61ea, 0xb7b8, 0xe2da, 0x62ea, 0xd3b6, 0x63ea, 0xe4da, 0xe3da, 0x64ea, 0x65ea, 0x66ea, 0x67ea, 0x68ea, 0x69ea, 0x6aea, 0xe6da, 0x6bea, 0x6cea, 0x6dea, 0xeec8, 0x6eea, 0x6fea, 0xe5da, 0xc0b7, 0xf4d1, 0xf5d2, 0xf3d5, 0xd7bd, 0x70ea, 0x71ea, 0x72ea, 0x73ea, 0xe8d7, 0xe8da, 0xe7da, 0x74ea, 0xa2b0, 0xd3cd, 0x75ea, 0xe9da, 0x76ea, 0xbdb8, 0xcabc, 0xbdc2, 0xa4c2, 0xc2b3, 0xeada, 0x77ea, 0xaac2, 0xb0c4, 0xb5bd, 0x78ea, 0x79ea, 0xdecf, 0x7aea, 0x7bea, 0x7cea, 0xebda, 0xc2c9, 0x7dea, 0x7eea, 0x80ea, 0x81ea, 0x82ea, 0xddb1, 0x83ea, 0x84ea, 0x85ea, 0xecda, 0x86ea, 0xb8b6, 0xbad4, 0x87ea, 0xfdb3, 0x88ea, 0x89ea, 0xedda, 0xc9d4, 0xd5cf, 0xe3c5, 0x8aea, 0xeeda, 0x8bea, 0x8cea, 0x8dea, 0x8eea, 0x8fea, 0xefda, 0x90ea, 0xf0da, 0xeac1, 0xd5cc, 0xddcf, 0x91ea, 0x92ea, 0x93ea, 0x94ea, 0x95ea, 0x96ea, 0x97ea, 0x98ea, 0x99ea, 0x9aea, 0x9bea, 0x9cea, 0x9dea, 0xe7d3, 0xa1c2, 0x9eea, 0xf1da, 0x9fea, 0xa0ea, 0xe5cb, 0x40eb, 0xf2da, 0x41eb, 0xe6cb, 0xfed2, 0x42eb, 0x43eb, 0x44eb, 0xf4b8, 0x45eb, 0x46eb, 0xf3da, 0xafb0, 0xb6cf, 0x47eb, 0x48eb, 0xcfd5, 0x49eb, 0x4aeb, 0x4beb, 0x4ceb, 0x4deb, 0x4eeb, 0x4feb, 0x50eb, 0x51eb, 0x52eb, 0xedcb, 0x53eb, 0x54eb, 0x55eb, 0x56eb, 0x57eb, 0x58eb, 0x59eb, 0x5aeb, 0xf4da, 0x5beb, 0x5ceb, 0xc4e3, 0x5deb, 0x5eeb, 0xa5c1, 0x5feb, 0x60eb, 0xbff6, 0x61eb, 0x62eb, 0xc0f6, 0xc1f6, 0xd1c4, 0x63eb, 0xb8c8, 0xe3d1, 0x64eb, 0x65eb, 0xdbd0, 0xc5d1, 0xafbc, 0xcdb9, 0x66eb, 0xf4ef, 0x67eb, 0x68eb, 0xc6b4, 0xbad3, 0xc2f6, 0xfbb3, 0x69eb, 0x6aeb, 0xc3f6, 0x6beb, 0x6ceb, 0xf1b5, 0x6deb, 0x6eeb, 0x6feb, 0x70eb, 0x71eb, 0x72eb, 0x73eb, 0x74eb, 0x75eb, 0x76eb, 0xc5f6, 0x77eb, 0x78eb, 0x79eb, 0x7aeb, 0x7beb, 0x7ceb, 0x7deb, 0xead3, 0xa7f6, 0xa9d1, 0x7eeb, 0x80eb, 0x81eb, 0x82eb, 0xa9f6, 0x83eb, 0x84eb, 0x85eb, 0xa8f6, 0x86eb, 0x87eb, 0xe3c1, 0xd7c0, 0x88eb, 0xa2b1, 0x89eb, 0x8aeb, 0x8beb, 0x8ceb, 0xedce, 0x8deb, 0xe8d0, 0xabf6, 0x8eeb, 0x8feb, 0xf6cf, 0x90eb, 0xaaf6, 0xf0d5, 0xacf6, 0xb9c3, 0x91eb, 0x92eb, 0x93eb, 0xf4bb, 0xaef6, 0xadf6, 0x94eb, 0x95eb, 0x96eb, 0xdec4, 0x97eb, 0x98eb, 0xd8c1, 0x99eb, 0x9aeb, 0x9beb, 0x9ceb, 0x9deb, 0xaacb, 0x9eeb, 0xbccf, 0x9feb, 0xa0eb, 0x40ec, 0x41ec, 0x42ec, 0x43ec, 0x44ec, 0x45ec, 0x46ec, 0x47ec, 0x48ec, 0xaff6, 0x49ec, 0x4aec, 0xb0f6, 0x4bec, 0x4cec, 0xb1f6, 0x4dec, 0xb6c2, 0x4eec, 0x4fec, 0x50ec, 0x51ec, 0x52ec, 0xd4b0, 0xf9c5, 0x53ec, 0x54ec, 0x55ec, 0x56ec, 0xb2f6, 0x57ec, 0x58ec, 0x59ec, 0x5aec, 0x5bec, 0x5cec, 0x5dec, 0x5eec, 0x5fec, 0x60ec, 0x61ec, 0x62ec, 0x63ec, 0x64ec, 0x65ec, 0x66ec, 0x67ec, 0x68ec, 0x69ec, 0xe0c7, 0xa6f6, 0x6aec, 0x6bec, 0xb8be, 0x6cec, 0x6dec, 0xb2be, 0x6eec, 0xe5b5, 0x6fec, 0x70ec, 0xc7b7, 0x71ec, 0xbfbf, 0xd2c3, 0xe6c3, 0x72ec, 0x73ec, 0xccd8, 0x74ec, 0x75ec, 0x76ec, 0xefb8, 0x77ec, 0x78ec, 0x79ec, 0x7aec, 0x7bec, 0x7cec, 0x7dec, 0x7eec, 0x80ec, 0xf9bd, 0xa5d1, 0x81ec, 0xd0b0, 0x82ec, 0x83ec, 0x84ec, 0x85ec, 0x86ec, 0xb0f7, 0x87ec, 0x88ec, 0x89ec, 0x8aec, 0x8bec, 0x8cec, 0x8dec, 0x8eec, 0xb1f7, 0x8fec, 0x90ec, 0x91ec, 0x92ec, 0x93ec, 0xacd0, 0x94ec, 0xb0b0, 0x95ec, 0x96ec, 0x97ec, 0xb2f7, 0xb3f7, 0x98ec, 0xb4f7, 0x99ec, 0x9aec, 0x9bec, 0xcac7, 0x9cec, 0x9dec, 0x9eec, 0x9fec, 0xa0ec, 0x40ed, 0x41ed, 0xcfbe, 0x42ed, 0x43ed, 0xb7f7, 0x44ed, 0x45ed, 0x46ed, 0x47ed, 0x48ed, 0x49ed, 0x4aed, 0xb6f7, 0x4bed, 0xdeb1, 0x4ced, 0xb5f7, 0x4ded, 0x4eed, 0xb8f7, 0x4fed, 0xb9f7, 0x50ed, 0x51ed, 0x52ed, 0x53ed, 0x54ed, 0x55ed, 0x56ed, 0x57ed, 0x58ed, 0x59ed, 0x5aed, 0x5bed, 0x5ced, 0x5ded, 0x5eed, 0x5fed, 0x60ed, 0x61ed, 0x62ed, 0x63ed, 0x64ed, 0x65ed, 0x66ed, 0x67ed, 0x68ed, 0x69ed, 0x6aed, 0x6bed, 0x6ced, 0x6ded, 0x6eed, 0x6fed, 0x70ed, 0x71ed, 0x72ed, 0x73ed, 0x74ed, 0x75ed, 0x76ed, 0x77ed, 0x78ed, 0x79ed, 0x7aed, 0x7bed, 0x7ced, 0x7ded, 0x7eed, 0x80ed, 0x81ed, 0xa4ce, 0xcdc8, 0x82ed, 0xabba, 0xb8e8, 0xb9e8, 0xbae8, 0xc2be, 0x83ed, 0x84ed, 0x85ed, 0x86ed, 0x87ed, 0xf4d2, 0x88ed, 0xcfd4, 0xd8c9, 0x89ed, 0x8aed, 0x8bed, 0x8ced, 0x8ded, 0x8eed, 0x8fed, 0x90ed, 0x91ed, 0x92ed, 0x93ed, 0x94ed, 0x95ed, 0x96ed, 0x97ed, 0x98ed, 0x99ed, 0x9aed, 0x9bed, 0x9ced, 0x9ded, 0x9eed, 0x9fed, 0xa0ed, 0x40ee, 0x41ee, 0x42ee, 0x43ee, 0x44ee, 0x45ee, 0x46ee, 0x47ee, 0x48ee, 0x49ee, 0x4aee, 0x4bee, 0x4cee, 0x4dee, 0x4eee, 0x4fee, 0x50ee, 0x51ee, 0x52ee, 0x53ee, 0x54ee, 0x55ee, 0x56ee, 0x57ee, 0x58ee, 0x59ee, 0x5aee, 0x5bee, 0x5cee, 0x5dee, 0x5eee, 0x5fee, 0x60ee, 0x61ee, 0x62ee, 0x63ee, 0x64ee, 0x65ee, 0x66ee, 0x67ee, 0x68ee, 0x69ee, 0x6aee, 0x6bee, 0x6cee, 0x6dee, 0x6eee, 0x6fee, 0x70ee, 0x71ee, 0x72ee, 0x73ee, 0x74ee, 0x75ee, 0x76ee, 0x77ee, 0x78ee, 0x79ee, 0x7aee, 0x7bee, 0x7cee, 0x7dee, 0x7eee, 0x80ee, 0x81ee, 0x82ee, 0x83ee, 0x84ee, 0x85ee, 0x86ee, 0x87ee, 0x88ee, 0x89ee, 0x8aee, 0x8bee, 0x8cee, 0x8dee, 0x8eee, 0x8fee, 0x90ee, 0x91ee, 0x92ee, 0x93ee, 0x94ee, 0x95ee, 0x96ee, 0x97ee, 0x98ee, 0x99ee, 0x9aee, 0x9bee, 0x9cee, 0x9dee, 0x9eee, 0x9fee, 0xa0ee, 0x40ef, 0x41ef, 0x42ef, 0x43ef, 0x44ef, 0x45ef, 0xb3d2, 0xa5b6, 0xeac7, 0xfcf1, 0xeecf, 0xb3cb, 0xebd0, 0xefe7, 0xe7cd, 0xcbb9, 0xd9b6, 0xfdf1, 0xe4b0, 0xcccb, 0xfef1, 0xa4d4, 0xadc2, 0xecc1, 0xc4c6, 0xb1be, 0xa1f2, 0xd5bc, 0x46ef, 0xa2f2, 0xa3f2, 0x47ef, 0xa4f2, 0xc3d2, 0xb5c6, 0x48ef, 0xc7cd, 0xa5f2, 0x49ef, 0xb1d3, 0xc5bf, 0xe2cc, 0x4aef, 0xa6f2, 0xa7f2, 0xd5d1, 0xeeb6, 0xa8f2, 0xa9f2, 0xdfb5, 0xaaf2, 0xabf2, 0x4bef, 0xfcb2, 0xacf2, 0xadf2, 0xa7c8, 0x4cef, 0x4def, 0x4eef, 0x4fef, 0x50ef, 0x51ef, 0x52ef, 0x53ef, 0x54ef, 0x55ef, 0x56ef, 0x57ef, 0x58ef, 0x59ef, 0x5aef, 0x5bef, 0x5cef, 0x5def, 0x5eef, 0x5fef, 0x60ef, 0x61ef, 0x62ef, 0x63ef, 0x64ef, 0x65ef, 0x66ef, 0x67ef, 0x68ef, 0x69ef, 0x6aef, 0x6bef, 0x6cef, 0x6def, 0x6eef, 0x6fef, 0x70ef, 0x71ef, 0xe7b7, 0x72ef, 0x73ef, 0xa9ec, 0xaaec, 0xabec, 0x74ef, 0xacec, 0x75ef, 0x76ef, 0xaec6, 0xadec, 0xaeec, 0x77ef, 0x78ef, 0x79ef, 0xc9b7, 0xb3ca, 0x7aef, 0x7bef, 0x7cef, 0x7def, 0x7eef, 0x80ef, 0x81ef, 0xb8e2, 0xcff7, 0x82ef, 0x83ef, 0x84ef, 0x85ef, 0x86ef, 0x87ef, 0x88ef, 0x89ef, 0x8aef, 0x8bef, 0x8cef, 0x8def, 0x8eef, 0x8fef, 0x90ef, 0x91ef, 0x92ef, 0x93ef, 0x94ef, 0x95ef, 0x96ef, 0x97ef, 0x98ef, 0x99ef, 0x9aef, 0x9bef, 0x9cef, 0x9def, 0x9eef, 0x9fef, 0xa0ef, 0x40f0, 0x41f0, 0x42f0, 0x43f0, 0x44f0, 0xd0f7, 0x45f0, 0x46f0, 0xcdb2, 0x47f0, 0x48f0, 0x49f0, 0x4af0, 0x4bf0, 0x4cf0, 0x4df0, 0x4ef0, 0x4ff0, 0x50f0, 0x51f0, 0x52f0, 0x53f0, 0x54f0, 0x55f0, 0x56f0, 0x57f0, 0x58f0, 0x59f0, 0x5af0, 0x5bf0, 0x5cf0, 0x5df0, 0x5ef0, 0x5ff0, 0x60f0, 0x61f0, 0x62f0, 0x63f0, 0xd1f7, 0x64f0, 0x65f0, 0x66f0, 0x67f0, 0x68f0, 0x69f0, 0x6af0, 0x6bf0, 0x6cf0, 0x6df0, 0x6ef0, 0x6ff0, 0x70f0, 0x71f0, 0x72f0, 0x73f0, 0x74f0, 0x75f0, 0x76f0, 0x77f0, 0x78f0, 0x79f0, 0x7af0, 0x7bf0, 0x7cf0, 0x7df0, 0x7ef0, 0x80f0, 0x81f0, 0x82f0, 0x83f0, 0x84f0, 0x85f0, 0x86f0, 0x87f0, 0x88f0, 0x89f0, 0xd3f7, 0xd2f7, 0x8af0, 0x8bf0, 0x8cf0, 0x8df0, 0x8ef0, 0x8ff0, 0x90f0, 0x91f0, 0x92f0, 0x93f0, 0x94f0, 0x95f0, 0x96f0, 0xbbe2, 0x97f0, 0xa2bc, 0x98f0, 0xbce2, 0xbde2, 0xbee2, 0xbfe2, 0xc0e2, 0xc1e2, 0xb9b7, 0xfbd2, 0xa4bd, 0xceca, 0xa5b1, 0xc7cb, 0x99f0, 0xc2e2, 0xfcb6, 0xc4c8, 0xc3e2, 0x9af0, 0x9bf0, 0xc8bd, 0x9cf0, 0xfdb1, 0xc4e2, 0x9df0, 0xf6b6, 0xc5e2, 0xd9c4, 0x9ef0, 0x9ff0, 0xc6e2, 0xdacf, 0xddb9, 0xc7e2, 0xa1c0, 0xa0f0, 0xc8e2, 0xf6b2, 0x40f1, 0xc9e2, 0x41f1, 0xf3c1, 0xcae2, 0xcbe2, 0xf8c2, 0xcce2, 0xcde2, 0xcee2, 0xd7ca, 0xb8d8, 0xe5d9, 0xe3cf, 0x42f1, 0x43f1, 0x44f1, 0x45f1, 0x46f1, 0x47f1, 0x48f1, 0x49f1, 0x4af1, 0x4bf1, 0x4cf1, 0xa5f0, 0x4df1, 0x4ef1, 0xb0dc, 0x4ff1, 0x50f1, 0x51f1, 0x52f1, 0x53f1, 0x54f1, 0x55f1, 0x56f1, 0x57f1, 0x58f1, 0x59f1, 0x5af1, 0x5bf1, 0x5cf1, 0x5df1, 0x5ef1, 0x5ff1, 0x60f1, 0x61f1, 0x62f1, 0x63f1, 0x64f1, 0x65f1, 0x66f1, 0x67f1, 0x68f1, 0x69f1, 0x6af1, 0x6bf1, 0x6cf1, 0x6df1, 0x6ef1, 0x6ff1, 0x70f1, 0x71f1, 0x72f1, 0x73f1, 0x74f1, 0x75f1, 0x76f1, 0x77f1, 0x78f1, 0x79f1, 0x7af1, 0x7bf1, 0x7cf1, 0x7df1, 0x7ef1, 0x80f1, 0x81f1, 0x82f1, 0x83f1, 0x84f1, 0x85f1, 0x86f1, 0x87f1, 0x88f1, 0x89f1, 0x8af1, 0x8bf1, 0x8cf1, 0x8df1, 0x8ef1, 0x8ff1, 0x90f1, 0x91f1, 0x92f1, 0x93f1, 0x94f1, 0x95f1, 0x96f1, 0x97f1, 0x98f1, 0x99f1, 0x9af1, 0x9bf1, 0x9cf1, 0x9df1, 0x9ef1, 0x9ff1, 0xa0f1, 0x40f2, 0x41f2, 0x42f2, 0x43f2, 0x44f2, 0x45f2, 0x46f2, 0x47f2, 0x48f2, 0x49f2, 0x4af2, 0x4bf2, 0x4cf2, 0x4df2, 0x4ef2, 0x4ff2, 0x50f2, 0x51f2, 0x52f2, 0x53f2, 0x54f2, 0x55f2, 0x56f2, 0x57f2, 0x58f2, 0x59f2, 0x5af2, 0x5bf2, 0x5cf2, 0x5df2, 0x5ef2, 0x5ff2, 0x60f2, 0x61f2, 0x62f2, 0x63f2, 0x64f2, 0x65f2, 0x66f2, 0x67f2, 0x68f2, 0x69f2, 0x6af2, 0x6bf2, 0x6cf2, 0x6df2, 0x6ef2, 0x6ff2, 0x70f2, 0x71f2, 0x72f2, 0x73f2, 0x74f2, 0x75f2, 0x76f2, 0x77f2, 0x78f2, 0x79f2, 0x7af2, 0x7bf2, 0x7cf2, 0x7df2, 0x7ef2, 0x80f2, 0x81f2, 0x82f2, 0x83f2, 0x84f2, 0x85f2, 0x86f2, 0x87f2, 0x88f2, 0x89f2, 0x8af2, 0x8bf2, 0x8cf2, 0x8df2, 0x8ef2, 0x8ff2, 0x90f2, 0x91f2, 0x92f2, 0x93f2, 0x94f2, 0x95f2, 0x96f2, 0x97f2, 0x98f2, 0x99f2, 0x9af2, 0x9bf2, 0x9cf2, 0x9df2, 0x9ef2, 0x9ff2, 0xa0f2, 0x40f3, 0x41f3, 0x42f3, 0x43f3, 0x44f3, 0x45f3, 0x46f3, 0x47f3, 0x48f3, 0x49f3, 0x4af3, 0x4bf3, 0x4cf3, 0x4df3, 0x4ef3, 0x4ff3, 0x50f3, 0x51f3, 0xedc2, 0xa6d4, 0xd4cd, 0xb1d1, 0xdbb3, 0xfdc7, 0x52f3, 0xb5b2, 0xbfc2, 0xe0e6, 0xbbca, 0xe1e6, 0xe2e6, 0xd4be, 0xe3e6, 0xa4d7, 0xd5cd, 0xe5e6, 0xddbc, 0xe4e6, 0xe6e6, 0xe7e6, 0xeec2, 0x53f3, 0xbebd, 0xe8e6, 0xe6c2, 0xa7ba, 0xe9e6, 0x54f3, 0xeae6, 0xd2b3, 0xe9d1, 0x55f3, 0x56f3, 0xa5bf, 0xebe6, 0xefc6, 0xece6, 0xede6, 0x57f3, 0x58f3, 0xeee6, 0xadc6, 0xefe6, 0x59f3, 0xa7c9, 0xf0e6, 0xf1e6, 0xf2e6, 0xb9e5, 0xf3e6, 0xf4e6, 0xe2c2, 0xf5e6, 0xf6e6, 0xe8d6, 0xf7e6, 0x5af3, 0xf8e6, 0xc7b9, 0x5bf3, 0x5cf3, 0x5df3, 0x5ef3, 0x5ff3, 0x60f3, 0x61f3, 0xbbf7, 0xbaf7, 0x62f3, 0x63f3, 0x64f3, 0x65f3, 0xbef7, 0xbcf7, 0xa1ba, 0x66f3, 0xbff7, 0x67f3, 0xc0f7, 0x68f3, 0x69f3, 0x6af3, 0xc2f7, 0xc1f7, 0xc4f7, 0x6bf3, 0x6cf3, 0xc3f7, 0x6df3, 0x6ef3, 0x6ff3, 0x70f3, 0x71f3, 0xc5f7, 0xc6f7, 0x72f3, 0x73f3, 0x74f3, 0x75f3, 0xc7f7, 0x76f3, 0xe8cb, 0x77f3, 0x78f3, 0x79f3, 0x7af3, 0xdfb8, 0x7bf3, 0x7cf3, 0x7df3, 0x7ef3, 0x80f3, 0x81f3, 0xd4f7, 0x82f3, 0xd5f7, 0x83f3, 0x84f3, 0x85f3, 0x86f3, 0xd6f7, 0x87f3, 0x88f3, 0x89f3, 0x8af3, 0xd8f7, 0x8bf3, 0xdaf7, 0x8cf3, 0xd7f7, 0x8df3, 0x8ef3, 0x8ff3, 0x90f3, 0x91f3, 0x92f3, 0x93f3, 0x94f3, 0x95f3, 0xdbf7, 0x96f3, 0xd9f7, 0x97f3, 0x98f3, 0x99f3, 0x9af3, 0x9bf3, 0x9cf3, 0x9df3, 0xd7d7, 0x9ef3, 0x9ff3, 0xa0f3, 0x40f4, 0xdcf7, 0x41f4, 0x42f4, 0x43f4, 0x44f4, 0x45f4, 0x46f4, 0xddf7, 0x47f4, 0x48f4, 0x49f4, 0xdef7, 0x4af4, 0x4bf4, 0x4cf4, 0x4df4, 0x4ef4, 0x4ff4, 0x50f4, 0x51f4, 0x52f4, 0x53f4, 0x54f4, 0xdff7, 0x55f4, 0x56f4, 0x57f4, 0xe0f7, 0x58f4, 0x59f4, 0x5af4, 0x5bf4, 0x5cf4, 0x5df4, 0x5ef4, 0x5ff4, 0x60f4, 0x61f4, 0x62f4, 0xcbdb, 0x63f4, 0x64f4, 0xaad8, 0x65f4, 0x66f4, 0x67f4, 0x68f4, 0x69f4, 0x6af4, 0x6bf4, 0x6cf4, 0xf7e5, 0xedb9, 0x6df4, 0x6ef4, 0x6ff4, 0x70f4, 0xfdbf, 0xeabb, 0xc9f7, 0xc7c6, 0xc8f7, 0x71f4, 0xcaf7, 0xccf7, 0xcbf7, 0x72f4, 0x73f4, 0x74f4, 0xcdf7, 0x75f4, 0xbace, 0x76f4, 0xcef7, 0x77f4, 0x78f4, 0xa7c4, 0x79f4, 0x7af4, 0x7bf4, 0x7cf4, 0x7df4, 0x7ef4, 0x80f4, 0x81f4, 0x82f4, 0x83f4, 0x84f4, 0x85f4, 0x86f4, 0x87f4, 0x88f4, 0x89f4, 0x8af4, 0x8bf4, 0x8cf4, 0x8df4, 0x8ef4, 0x8ff4, 0x90f4, 0x91f4, 0x92f4, 0x93f4, 0x94f4, 0x95f4, 0x96f4, 0x97f4, 0x98f4, 0x99f4, 0x9af4, 0x9bf4, 0x9cf4, 0x9df4, 0x9ef4, 0x9ff4, 0xa0f4, 0x40f5, 0x41f5, 0x42f5, 0x43f5, 0x44f5, 0x45f5, 0x46f5, 0x47f5, 0x48f5, 0x49f5, 0x4af5, 0x4bf5, 0x4cf5, 0x4df5, 0x4ef5, 0x4ff5, 0x50f5, 0x51f5, 0x52f5, 0x53f5, 0x54f5, 0x55f5, 0x56f5, 0x57f5, 0x58f5, 0x59f5, 0x5af5, 0x5bf5, 0x5cf5, 0x5df5, 0x5ef5, 0x5ff5, 0x60f5, 0x61f5, 0x62f5, 0x63f5, 0x64f5, 0x65f5, 0x66f5, 0x67f5, 0x68f5, 0x69f5, 0x6af5, 0x6bf5, 0x6cf5, 0x6df5, 0x6ef5, 0x6ff5, 0x70f5, 0x71f5, 0x72f5, 0x73f5, 0x74f5, 0x75f5, 0x76f5, 0x77f5, 0x78f5, 0x79f5, 0x7af5, 0x7bf5, 0x7cf5, 0x7df5, 0x7ef5, 0x80f5, 0x81f5, 0x82f5, 0x83f5, 0x84f5, 0x85f5, 0x86f5, 0x87f5, 0x88f5, 0x89f5, 0x8af5, 0x8bf5, 0x8cf5, 0x8df5, 0x8ef5, 0x8ff5, 0x90f5, 0x91f5, 0x92f5, 0x93f5, 0x94f5, 0x95f5, 0x96f5, 0x97f5, 0x98f5, 0x99f5, 0x9af5, 0x9bf5, 0x9cf5, 0x9df5, 0x9ef5, 0x9ff5, 0xa0f5, 0x40f6, 0x41f6, 0x42f6, 0x43f6, 0x44f6, 0x45f6, 0x46f6, 0x47f6, 0x48f6, 0x49f6, 0x4af6, 0x4bf6, 0x4cf6, 0x4df6, 0x4ef6, 0x4ff6, 0x50f6, 0x51f6, 0x52f6, 0x53f6, 0x54f6, 0x55f6, 0x56f6, 0x57f6, 0x58f6, 0x59f6, 0x5af6, 0x5bf6, 0x5cf6, 0x5df6, 0x5ef6, 0x5ff6, 0x60f6, 0x61f6, 0x62f6, 0x63f6, 0x64f6, 0x65f6, 0x66f6, 0x67f6, 0x68f6, 0x69f6, 0x6af6, 0x6bf6, 0x6cf6, 0x6df6, 0x6ef6, 0x6ff6, 0x70f6, 0x71f6, 0x72f6, 0x73f6, 0x74f6, 0x75f6, 0x76f6, 0x77f6, 0x78f6, 0x79f6, 0x7af6, 0x7bf6, 0x7cf6, 0x7df6, 0x7ef6, 0x80f6, 0x81f6, 0x82f6, 0x83f6, 0x84f6, 0x85f6, 0x86f6, 0x87f6, 0x88f6, 0x89f6, 0x8af6, 0x8bf6, 0x8cf6, 0x8df6, 0x8ef6, 0x8ff6, 0x90f6, 0x91f6, 0x92f6, 0x93f6, 0x94f6, 0x95f6, 0x96f6, 0x97f6, 0x98f6, 0x99f6, 0x9af6, 0x9bf6, 0x9cf6, 0x9df6, 0x9ef6, 0x9ff6, 0xa0f6, 0x40f7, 0x41f7, 0x42f7, 0x43f7, 0x44f7, 0x45f7, 0x46f7, 0x47f7, 0x48f7, 0x49f7, 0x4af7, 0x4bf7, 0x4cf7, 0x4df7, 0x4ef7, 0x4ff7, 0x50f7, 0x51f7, 0x52f7, 0x53f7, 0x54f7, 0x55f7, 0x56f7, 0x57f7, 0x58f7, 0x59f7, 0x5af7, 0x5bf7, 0x5cf7, 0x5df7, 0x5ef7, 0x5ff7, 0x60f7, 0x61f7, 0x62f7, 0x63f7, 0x64f7, 0x65f7, 0x66f7, 0x67f7, 0x68f7, 0x69f7, 0x6af7, 0x6bf7, 0x6cf7, 0x6df7, 0x6ef7, 0x6ff7, 0x70f7, 0x71f7, 0x72f7, 0x73f7, 0x74f7, 0x75f7, 0x76f7, 0x77f7, 0x78f7, 0x79f7, 0x7af7, 0x7bf7, 0x7cf7, 0x7df7, 0x7ef7, 0x80f7, 0xe3d3, 0x81f7, 0x82f7, 0xcff6, 0x83f7, 0xb3c2, 0xd0f6, 0x84f7, 0x85f7, 0xd1f6, 0xd2f6, 0xd3f6, 0xd4f6, 0x86f7, 0x87f7, 0xd6f6, 0x88f7, 0xabb1, 0xd7f6, 0x89f7, 0xd8f6, 0xd9f6, 0xdaf6, 0x8af7, 0xdbf6, 0xdcf6, 0x8bf7, 0x8cf7, 0x8df7, 0x8ef7, 0xddf6, 0xdef6, 0xcacf, 0x8ff7, 0xdff6, 0xe0f6, 0xe1f6, 0xe2f6, 0xe3f6, 0xe4f6, 0xf0c0, 0xe5f6, 0xe6f6, 0xe7f6, 0xe8f6, 0xe9f6, 0x90f7, 0xeaf6, 0x91f7, 0xebf6, 0xecf6, 0x92f7, 0xedf6, 0xeef6, 0xeff6, 0xf0f6, 0xf1f6, 0xf2f6, 0xf3f6, 0xf4f6, 0xa8be, 0x93f7, 0xf5f6, 0xf6f6, 0xf7f6, 0xf8f6, 0x94f7, 0x95f7, 0x96f7, 0x97f7, 0x98f7, 0xfac8, 0xf9f6, 0xfaf6, 0xfbf6, 0xfcf6, 0x99f7, 0x9af7, 0xfdf6, 0xfef6, 0xa1f7, 0xa2f7, 0xa3f7, 0xa4f7, 0xa5f7, 0x9bf7, 0x9cf7, 0xa6f7, 0xa7f7, 0xa8f7, 0xeeb1, 0xa9f7, 0xaaf7, 0xabf7, 0x9df7, 0x9ef7, 0xacf7, 0xadf7, 0xdbc1, 0xaef7, 0x9ff7, 0xa0f7, 0xaff7, 0x40f8, 0x41f8, 0x42f8, 0x43f8, 0x44f8, 0x45f8, 0x46f8, 0x47f8, 0x48f8, 0x49f8, 0x4af8, 0x4bf8, 0x4cf8, 0x4df8, 0x4ef8, 0x4ff8, 0x50f8, 0x51f8, 0x52f8, 0x53f8, 0x54f8, 0x55f8, 0x56f8, 0x57f8, 0x58f8, 0x59f8, 0x5af8, 0x5bf8, 0x5cf8, 0x5df8, 0x5ef8, 0x5ff8, 0x60f8, 0x61f8, 0x62f8, 0x63f8, 0x64f8, 0x65f8, 0x66f8, 0x67f8, 0x68f8, 0x69f8, 0x6af8, 0x6bf8, 0x6cf8, 0x6df8, 0x6ef8, 0x6ff8, 0x70f8, 0x71f8, 0x72f8, 0x73f8, 0x74f8, 0x75f8, 0x76f8, 0x77f8, 0x78f8, 0x79f8, 0x7af8, 0x7bf8, 0x7cf8, 0x7df8, 0x7ef8, 0x80f8, 0x81f8, 0x82f8, 0x83f8, 0x84f8, 0x85f8, 0x86f8, 0x87f8, 0x88f8, 0x89f8, 0x8af8, 0x8bf8, 0x8cf8, 0x8df8, 0x8ef8, 0x8ff8, 0x90f8, 0x91f8, 0x92f8, 0x93f8, 0x94f8, 0x95f8, 0x96f8, 0x97f8, 0x98f8, 0x99f8, 0x9af8, 0x9bf8, 0x9cf8, 0x9df8, 0x9ef8, 0x9ff8, 0xa0f8, 0x40f9, 0x41f9, 0x42f9, 0x43f9, 0x44f9, 0x45f9, 0x46f9, 0x47f9, 0x48f9, 0x49f9, 0x4af9, 0x4bf9, 0x4cf9, 0x4df9, 0x4ef9, 0x4ff9, 0x50f9, 0x51f9, 0x52f9, 0x53f9, 0x54f9, 0x55f9, 0x56f9, 0x57f9, 0x58f9, 0x59f9, 0x5af9, 0x5bf9, 0x5cf9, 0x5df9, 0x5ef9, 0x5ff9, 0x60f9, 0x61f9, 0x62f9, 0x63f9, 0x64f9, 0x65f9, 0x66f9, 0x67f9, 0x68f9, 0x69f9, 0x6af9, 0x6bf9, 0x6cf9, 0x6df9, 0x6ef9, 0x6ff9, 0x70f9, 0x71f9, 0x72f9, 0x73f9, 0x74f9, 0x75f9, 0x76f9, 0x77f9, 0x78f9, 0x79f9, 0x7af9, 0x7bf9, 0x7cf9, 0x7df9, 0x7ef9, 0x80f9, 0x81f9, 0x82f9, 0x83f9, 0x84f9, 0x85f9, 0x86f9, 0x87f9, 0x88f9, 0x89f9, 0x8af9, 0x8bf9, 0x8cf9, 0x8df9, 0x8ef9, 0x8ff9, 0x90f9, 0x91f9, 0x92f9, 0x93f9, 0x94f9, 0x95f9, 0x96f9, 0x97f9, 0x98f9, 0x99f9, 0x9af9, 0x9bf9, 0x9cf9, 0x9df9, 0x9ef9, 0x9ff9, 0xa0f9, 0x40fa, 0x41fa, 0x42fa, 0x43fa, 0x44fa, 0x45fa, 0x46fa, 0x47fa, 0x48fa, 0x49fa, 0x4afa, 0x4bfa, 0x4cfa, 0x4dfa, 0x4efa, 0x4ffa, 0x50fa, 0x51fa, 0x52fa, 0x53fa, 0x54fa, 0x55fa, 0x56fa, 0x57fa, 0x58fa, 0x59fa, 0x5afa, 0x5bfa, 0x5cfa, 0x5dfa, 0x5efa, 0x5ffa, 0x60fa, 0x61fa, 0x62fa, 0x63fa, 0x64fa, 0x65fa, 0x66fa, 0x67fa, 0x68fa, 0x69fa, 0x6afa, 0x6bfa, 0x6cfa, 0x6dfa, 0x6efa, 0x6ffa, 0x70fa, 0x71fa, 0x72fa, 0x73fa, 0x74fa, 0x75fa, 0x76fa, 0x77fa, 0x78fa, 0x79fa, 0x7afa, 0x7bfa, 0x7cfa, 0x7dfa, 0x7efa, 0x80fa, 0x81fa, 0x82fa, 0x83fa, 0x84fa, 0x85fa, 0x86fa, 0x87fa, 0x88fa, 0x89fa, 0x8afa, 0x8bfa, 0x8cfa, 0x8dfa, 0x8efa, 0x8ffa, 0x90fa, 0x91fa, 0x92fa, 0x93fa, 0x94fa, 0x95fa, 0x96fa, 0x97fa, 0x98fa, 0x99fa, 0x9afa, 0x9bfa, 0x9cfa, 0x9dfa, 0x9efa, 0x9ffa, 0xa0fa, 0x40fb, 0x41fb, 0x42fb, 0x43fb, 0x44fb, 0x45fb, 0x46fb, 0x47fb, 0x48fb, 0x49fb, 0x4afb, 0x4bfb, 0x4cfb, 0x4dfb, 0x4efb, 0x4ffb, 0x50fb, 0x51fb, 0x52fb, 0x53fb, 0x54fb, 0x55fb, 0x56fb, 0x57fb, 0x58fb, 0x59fb, 0x5afb, 0x5bfb, 0xf1c4, 0xaff0, 0xa6bc, 0xb0f0, 0xf9c3, 0x5cfb, 0xb8c5, 0xbbd1, 0x5dfb, 0xb1f0, 0xb2f0, 0xb3f0, 0xb4f0, 0xb5f0, 0xbcd1, 0x5efb, 0xecd1, 0x5ffb, 0xb7f0, 0xb6f0, 0xa7d4, 0x60fb, 0xd2cd, 0xb8f0, 0xbaf0, 0xb9f0, 0xbbf0, 0xbcf0, 0x61fb, 0x62fb, 0xebb8, 0xbdf0, 0xe8ba, 0x63fb, 0xbef0, 0xbff0, 0xe9be, 0xc0f0, 0xecb6, 0xc1f0, 0xc2f0, 0xc3f0, 0xc4f0, 0xb5c8, 0xc5f0, 0xc6f0, 0x64fb, 0xc7f0, 0xf4c5, 0x65fb, 0xc8f0, 0x66fb, 0x67fb, 0x68fb, 0xc9f0, 0x69fb, 0xcaf0, 0xbdf7, 0x6afb, 0xcbf0, 0xccf0, 0xcdf0, 0x6bfb, 0xcef0, 0x6cfb, 0x6dfb, 0x6efb, 0x6ffb, 0xcff0, 0xd7ba, 0x70fb, 0xd0f0, 0xd1f0, 0xd2f0, 0xd3f0, 0xd4f0, 0xd5f0, 0xd6f0, 0xd8f0, 0x71fb, 0x72fb, 0xa5d3, 0xd7f0, 0x73fb, 0xd9f0, 0x74fb, 0x75fb, 0x76fb, 0x77fb, 0x78fb, 0x79fb, 0x7afb, 0x7bfb, 0x7cfb, 0x7dfb, 0xbaf5, 0xb9c2, 0x7efb, 0x80fb, 0xe4f7, 0x81fb, 0x82fb, 0x83fb, 0x84fb, 0xe5f7, 0xe6f7, 0x85fb, 0x86fb, 0xe7f7, 0x87fb, 0x88fb, 0x89fb, 0x8afb, 0x8bfb, 0x8cfb, 0xe8f7, 0xb4c2, 0x8dfb, 0x8efb, 0x8ffb, 0x90fb, 0x91fb, 0x92fb, 0x93fb, 0x94fb, 0x95fb, 0xeaf7, 0x96fb, 0xebf7, 0x97fb, 0x98fb, 0x99fb, 0x9afb, 0x9bfb, 0x9cfb, 0xf3c2, 0x9dfb, 0x9efb, 0x9ffb, 0xa0fb, 0x40fc, 0x41fc, 0x42fc, 0x43fc, 0x44fc, 0x45fc, 0x46fc, 0x47fc, 0x48fc, 0xf0f4, 0x49fc, 0x4afc, 0x4bfc, 0xeff4, 0x4cfc, 0x4dfc, 0xe9c2, 0x4efc, 0xe1f7, 0xe2f7, 0x4ffc, 0x50fc, 0x51fc, 0x52fc, 0x53fc, 0xc6bb, 0x54fc, 0x55fc, 0x56fc, 0x57fc, 0xe4d9, 0x58fc, 0x59fc, 0x5afc, 0xf2ca, 0xe8c0, 0xa4f0, 0x5bfc, 0xdaba, 0x5cfc, 0x5dfc, 0xadc7, 0x5efc, 0x5ffc, 0x60fc, 0xacc4, 0x61fc, 0x62fc, 0xecf7, 0xedf7, 0xeef7, 0x63fc, 0xf0f7, 0xeff7, 0x64fc, 0xf1f7, 0x65fc, 0x66fc, 0xf4f7, 0x67fc, 0xf3f7, 0x68fc, 0xf2f7, 0xf5f7, 0x69fc, 0x6afc, 0x6bfc, 0x6cfc, 0xf6f7, 0x6dfc, 0x6efc, 0x6ffc, 0x70fc, 0x71fc, 0x72fc, 0x73fc, 0x74fc, 0x75fc, 0xe9ed, 0x76fc, 0xeaed, 0xebed, 0x77fc, 0xbcf6, 0x78fc, 0x79fc, 0x7afc, 0x7bfc, 0x7cfc, 0x7dfc, 0x7efc, 0x80fc, 0x81fc, 0x82fc, 0x83fc, 0x84fc, 0xbdf6, 0x85fc, 0xbef6, 0xa6b6, 0x86fc, 0xbed8, 0x87fc, 0x88fc, 0xc4b9, 0x89fc, 0x8afc, 0x8bfc, 0xbbd8, 0x8cfc, 0xb1dc, 0x8dfc, 0x8efc, 0x8ffc, 0x90fc, 0x91fc, 0x92fc, 0xf3ca, 0x93fc, 0xf7f7, 0x94fc, 0x95fc, 0x96fc, 0x97fc, 0x98fc, 0x99fc, 0x9afc, 0x9bfc, 0x9cfc, 0xf8f7, 0x9dfc, 0x9efc, 0xf9f7, 0x9ffc, 0xa0fc, 0x40fd, 0x41fd, 0x42fd, 0x43fd, 0x44fd, 0xfbf7, 0x45fd, 0xfaf7, 0x46fd, 0xc7b1, 0x47fd, 0xfcf7, 0xfdf7, 0x48fd, 0x49fd, 0x4afd, 0x4bfd, 0x4cfd, 0xfef7, 0x4dfd, 0x4efd, 0x4ffd, 0x50fd, 0x51fd, 0x52fd, 0x53fd, 0x54fd, 0x55fd, 0x56fd, 0x57fd, 0xebc6, 0xb4ec, 0x58fd, 0x59fd, 0x5afd, 0x5bfd, 0x5cfd, 0x5dfd, 0x5efd, 0x5ffd, 0x60fd, 0x61fd, 0x62fd, 0x63fd, 0x64fd, 0x65fd, 0x66fd, 0x67fd, 0x68fd, 0x69fd, 0x6afd, 0x6bfd, 0x6cfd, 0x6dfd, 0x6efd, 0x6ffd, 0x70fd, 0x71fd, 0x72fd, 0x73fd, 0x74fd, 0x75fd, 0x76fd, 0x77fd, 0x78fd, 0x79fd, 0x7afd, 0x7bfd, 0x7cfd, 0x7dfd, 0x7efd, 0x80fd, 0x81fd, 0x82fd, 0x83fd, 0x84fd, 0x85fd, 0xddb3, 0xb3f6, 0x86fd, 0x87fd, 0xb4f6, 0xe4c1, 0xb5f6, 0xb6f6, 0xb7f6, 0xb8f6, 0xb9f6, 0xbaf6, 0xa3c8, 0xbbf6, 0x88fd, 0x89fd, 0x8afd, 0x8bfd, 0x8cfd, 0x8dfd, 0x8efd, 0x8ffd, 0x90fd, 0x91fd, 0x92fd, 0x93fd, 0xfac1, 0xa8b9, 0xe8ed, 0x94fd, 0x95fd, 0x96fd, 0xeab9, 0xdfd9, 0x97fd, 0x98fd, 0x99fd, 0x9afd, 0x9bfd }; const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0xf900[ 320 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9cfd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9dfd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9efd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9ffd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa0fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x40fe, 0x41fe, 0x42fe, 0x43fe, 0x001a, 0x44fe, 0x001a, 0x45fe, 0x46fe, 0x001a, 0x001a, 0x001a, 0x47fe, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x48fe, 0x49fe, 0x4afe, 0x001a, 0x4bfe, 0x4cfe, 0x001a, 0x001a, 0x4dfe, 0x4efe, 0x4ffe, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0xfe00[ 512 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x55a9, 0xf2a6, 0x001a, 0xf4a6, 0xf5a6, 0xe0a6, 0xe1a6, 0xf0a6, 0xf1a6, 0xe2a6, 0xe3a6, 0xeea6, 0xefa6, 0xe6a6, 0xe7a6, 0xe4a6, 0xe5a6, 0xe8a6, 0xe9a6, 0xeaa6, 0xeba6, 0x001a, 0x001a, 0x001a, 0x001a, 0x68a9, 0x69a9, 0x6aa9, 0x6ba9, 0x6ca9, 0x6da9, 0x6ea9, 0x6fa9, 0x70a9, 0x71a9, 0x001a, 0x72a9, 0x73a9, 0x74a9, 0x75a9, 0x001a, 0x76a9, 0x77a9, 0x78a9, 0x79a9, 0x7aa9, 0x7ba9, 0x7ca9, 0x7da9, 0x7ea9, 0x80a9, 0x81a9, 0x82a9, 0x83a9, 0x84a9, 0x001a, 0x85a9, 0x86a9, 0x87a9, 0x88a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a3, 0xa2a3, 0xa3a3, 0xe7a1, 0xa5a3, 0xa6a3, 0xa7a3, 0xa8a3, 0xa9a3, 0xaaa3, 0xaba3, 0xaca3, 0xada3, 0xaea3, 0xafa3, 0xb0a3, 0xb1a3, 0xb2a3, 0xb3a3, 0xb4a3, 0xb5a3, 0xb6a3, 0xb7a3, 0xb8a3, 0xb9a3, 0xbaa3, 0xbba3, 0xbca3, 0xbda3, 0xbea3, 0xbfa3, 0xc0a3, 0xc1a3, 0xc2a3, 0xc3a3, 0xc4a3, 0xc5a3, 0xc6a3, 0xc7a3, 0xc8a3, 0xc9a3, 0xcaa3, 0xcba3, 0xcca3, 0xcda3, 0xcea3, 0xcfa3, 0xd0a3, 0xd1a3, 0xd2a3, 0xd3a3, 0xd4a3, 0xd5a3, 0xd6a3, 0xd7a3, 0xd8a3, 0xd9a3, 0xdaa3, 0xdba3, 0xdca3, 0xdda3, 0xdea3, 0xdfa3, 0xe0a3, 0xe1a3, 0xe2a3, 0xe3a3, 0xe4a3, 0xe5a3, 0xe6a3, 0xe7a3, 0xe8a3, 0xe9a3, 0xeaa3, 0xeba3, 0xeca3, 0xeda3, 0xeea3, 0xefa3, 0xf0a3, 0xf1a3, 0xf2a3, 0xf3a3, 0xf4a3, 0xf5a3, 0xf6a3, 0xf7a3, 0xf8a3, 0xf9a3, 0xfaa3, 0xfba3, 0xfca3, 0xfda3, 0xaba1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9a1, 0xeaa1, 0x56a9, 0xfea3, 0x57a9, 0xa4a3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; /* Determines the size of a byte stream character from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_936_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_936_unicode_character_size_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream character size.", function ); return( -1 ); } if( unicode_character < 0x0080 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0480 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2340 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x2440 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2440; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x2440[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fa6 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xf900 ) && ( unicode_character < 0xfa40 ) ) { unicode_character -= 0xf900; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0xf900[ unicode_character ]; } else if( ( unicode_character >= 0xfe00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xfe00; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0xfe00[ unicode_character ]; } byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_character_size += 2; } else { *byte_stream_character_size += 1; } return( 1 ); } /* Copies a Unicode character from a byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_936_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_936_copy_from_byte_stream"; uint8_t additional_character = 0; uint8_t byte_stream_character = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } byte_stream_character = byte_stream[ *byte_stream_index ]; if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else if( byte_stream_character == 0x80 ) { *unicode_character = 0x20ac; } else if( ( *byte_stream_index + 1 ) <= byte_stream_size ) { *byte_stream_index += 1; additional_character = byte_stream[ *byte_stream_index ]; if( ( byte_stream_character >= 0x81 ) && ( byte_stream_character <= 0xa0 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0x81: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8140[ additional_character ]; break; case 0x82: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8240[ additional_character ]; break; case 0x83: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8340[ additional_character ]; break; case 0x84: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8440[ additional_character ]; break; case 0x85: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8540[ additional_character ]; break; case 0x86: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8640[ additional_character ]; break; case 0x87: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8740[ additional_character ]; break; case 0x88: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8840[ additional_character ]; break; case 0x89: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8940[ additional_character ]; break; case 0x8a: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8a40[ additional_character ]; break; case 0x8b: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8b40[ additional_character ]; break; case 0x8c: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8c40[ additional_character ]; break; case 0x8d: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8d40[ additional_character ]; break; case 0x8e: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8e40[ additional_character ]; break; case 0x8f: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8f40[ additional_character ]; break; case 0x90: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9040[ additional_character ]; break; case 0x91: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9140[ additional_character ]; break; case 0x92: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9240[ additional_character ]; break; case 0x93: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9340[ additional_character ]; break; case 0x94: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9440[ additional_character ]; break; case 0x95: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9540[ additional_character ]; break; case 0x96: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9640[ additional_character ]; break; case 0x97: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9740[ additional_character ]; break; case 0x98: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9840[ additional_character ]; break; case 0x99: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9940[ additional_character ]; break; case 0x9a: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9a40[ additional_character ]; break; case 0x9b: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9b40[ additional_character ]; break; case 0x9c: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9c40[ additional_character ]; break; case 0x9d: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9d40[ additional_character ]; break; case 0x9e: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9e40[ additional_character ]; break; case 0x9f: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9f40[ additional_character ]; break; case 0xa0: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa040[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xa1 ) && ( byte_stream_character <= 0xa3 ) ) { if( additional_character >= 0xa0 ) { additional_character -= 0xa0; switch( byte_stream_character ) { case 0xa1: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa1a0[ additional_character ]; break; case 0xa2: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa2a0[ additional_character ]; break; case 0xa3: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa3a0[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xa4 ) && ( byte_stream_character <= 0xa6 ) ) { if( ( additional_character >= 0xa0 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0xa0; switch( byte_stream_character ) { case 0xa4: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa4a0[ additional_character ]; break; case 0xa5: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa5a0[ additional_character ]; break; case 0xa6: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa6a0[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa7 ) { if( ( additional_character >= 0xa0 ) && ( additional_character < 0xc8 ) ) { additional_character -= 0xa0; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7a0[ additional_character ]; } else if( ( additional_character >= 0xd0 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0xd0; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7d0[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa8 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x98 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa840[ additional_character ]; } else if( ( additional_character >= 0xa0 ) && ( additional_character < 0xf0 ) ) { additional_character -= 0xa0; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa8a0[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa9 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x88 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa940[ additional_character ]; } else if( additional_character == 0x88 ) { *unicode_character = 0xfe6b; } else if( additional_character == 0x96 ) { *unicode_character = 0x3007; } else if( ( additional_character >= 0xa0 ) && ( additional_character < 0xf0 ) ) { additional_character -= 0xa0; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa9a0[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xaa ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaa40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x7371; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xab ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xab40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x73f7; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xac ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xac40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x747a; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xad ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xad40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x74f2; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xae ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xae40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x7587; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xaf ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaf40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x7644; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xb0 ) && ( byte_stream_character <= 0xf7 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xb0: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb040[ additional_character ]; break; case 0xb1: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb140[ additional_character ]; break; case 0xb2: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb240[ additional_character ]; break; case 0xb3: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb340[ additional_character ]; break; case 0xb4: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb440[ additional_character ]; break; case 0xb5: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb540[ additional_character ]; break; case 0xb6: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb640[ additional_character ]; break; case 0xb7: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb740[ additional_character ]; break; case 0xb8: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb840[ additional_character ]; break; case 0xb9: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb940[ additional_character ]; break; case 0xba: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xba40[ additional_character ]; break; case 0xbb: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbb40[ additional_character ]; break; case 0xbc: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbc40[ additional_character ]; break; case 0xbd: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbd40[ additional_character ]; break; case 0xbe: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbe40[ additional_character ]; break; case 0xbf: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbf40[ additional_character ]; break; case 0xc0: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc040[ additional_character ]; break; case 0xc1: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc140[ additional_character ]; break; case 0xc2: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc240[ additional_character ]; break; case 0xc3: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc340[ additional_character ]; break; case 0xc4: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc440[ additional_character ]; break; case 0xc5: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc540[ additional_character ]; break; case 0xc6: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc640[ additional_character ]; break; case 0xc7: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc740[ additional_character ]; break; case 0xc8: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc840[ additional_character ]; break; case 0xc9: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc940[ additional_character ]; break; case 0xca: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xca40[ additional_character ]; break; case 0xcb: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcb40[ additional_character ]; break; case 0xcc: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcc40[ additional_character ]; break; case 0xcd: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcd40[ additional_character ]; break; case 0xce: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xce40[ additional_character ]; break; case 0xcf: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcf40[ additional_character ]; break; case 0xd0: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd040[ additional_character ]; break; case 0xd1: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd140[ additional_character ]; break; case 0xd2: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd240[ additional_character ]; break; case 0xd3: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd340[ additional_character ]; break; case 0xd4: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd440[ additional_character ]; break; case 0xd5: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd540[ additional_character ]; break; case 0xd6: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd640[ additional_character ]; break; case 0xd7: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd740[ additional_character ]; break; case 0xd8: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd840[ additional_character ]; break; case 0xd9: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd940[ additional_character ]; break; case 0xda: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xda40[ additional_character ]; break; case 0xdb: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdb40[ additional_character ]; break; case 0xdc: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdc40[ additional_character ]; break; case 0xdd: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdd40[ additional_character ]; break; case 0xde: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xde40[ additional_character ]; break; case 0xdf: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdf40[ additional_character ]; break; case 0xe0: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe040[ additional_character ]; break; case 0xe1: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe140[ additional_character ]; break; case 0xe2: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe240[ additional_character ]; break; case 0xe3: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe340[ additional_character ]; break; case 0xe4: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe440[ additional_character ]; break; case 0xe5: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe540[ additional_character ]; break; case 0xe6: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe640[ additional_character ]; break; case 0xe7: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe740[ additional_character ]; break; case 0xe8: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe840[ additional_character ]; break; case 0xe9: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe940[ additional_character ]; break; case 0xea: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xea40[ additional_character ]; break; case 0xeb: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xeb40[ additional_character ]; break; case 0xec: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xec40[ additional_character ]; break; case 0xed: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xed40[ additional_character ]; break; case 0xee: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xee40[ additional_character ]; break; case 0xef: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xef40[ additional_character ]; break; case 0xf0: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf040[ additional_character ]; break; case 0xf1: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf140[ additional_character ]; break; case 0xf2: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf240[ additional_character ]; break; case 0xf3: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf340[ additional_character ]; break; case 0xf4: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf440[ additional_character ]; break; case 0xf5: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf540[ additional_character ]; break; case 0xf6: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf640[ additional_character ]; break; case 0xf7: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf740[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xf8 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf840[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x9d42; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xf9 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf940[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x9da2; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xfa ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfa40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x9e02; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xfb ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfb40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x9eaa; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xfc ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfc40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x9f31; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xfd ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfd40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0xf9f1; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xfe ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x50 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfe40[ additional_character ]; } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } *byte_stream_index += 1; return( 1 ); } /* Copies a Unicode character to a byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_936_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_936_copy_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( unicode_character < 0x0080 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0480 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2340 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x2440 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2440; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x2440[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fa6 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xf900 ) && ( unicode_character < 0xfa40 ) ) { unicode_character -= 0xf900; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0xf900[ unicode_character ]; } else if( ( unicode_character >= 0xfe00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xfe00; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0xfe00[ unicode_character ]; } byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_index += 1; byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); } *byte_stream_index += 1; return( 1 ); } libevt-20170120/libuna/libuna_unicode_character.c0000664000175000017500000043327513040331677023771 0ustar00lordyestalordyesta00000000000000/* * Unicode character functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_base64_stream.h" #include "libuna_codepage_iso_8859_2.h" #include "libuna_codepage_iso_8859_3.h" #include "libuna_codepage_iso_8859_4.h" #include "libuna_codepage_iso_8859_5.h" #include "libuna_codepage_iso_8859_6.h" #include "libuna_codepage_iso_8859_7.h" #include "libuna_codepage_iso_8859_8.h" #include "libuna_codepage_iso_8859_9.h" #include "libuna_codepage_iso_8859_10.h" #include "libuna_codepage_iso_8859_13.h" #include "libuna_codepage_iso_8859_14.h" #include "libuna_codepage_iso_8859_15.h" #include "libuna_codepage_iso_8859_16.h" #include "libuna_codepage_koi8_r.h" #include "libuna_codepage_koi8_u.h" #include "libuna_codepage_windows_874.h" #include "libuna_codepage_windows_932.h" #include "libuna_codepage_windows_936.h" #include "libuna_codepage_windows_949.h" #include "libuna_codepage_windows_950.h" #include "libuna_codepage_windows_1250.h" #include "libuna_codepage_windows_1251.h" #include "libuna_codepage_windows_1252.h" #include "libuna_codepage_windows_1253.h" #include "libuna_codepage_windows_1254.h" #include "libuna_codepage_windows_1255.h" #include "libuna_codepage_windows_1256.h" #include "libuna_codepage_windows_1257.h" #include "libuna_codepage_windows_1258.h" #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_unused.h" /* Determines the size of a byte stream character from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful or -1 on error */ int libuna_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, int codepage, size_t *byte_stream_character_size, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_size_to_byte_stream"; int result = 1; if( byte_stream_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream character size.", function ); return( -1 ); } switch( codepage ) { case LIBUNA_CODEPAGE_ASCII: case LIBUNA_CODEPAGE_ISO_8859_1: case LIBUNA_CODEPAGE_ISO_8859_2: case LIBUNA_CODEPAGE_ISO_8859_3: case LIBUNA_CODEPAGE_ISO_8859_4: case LIBUNA_CODEPAGE_ISO_8859_5: case LIBUNA_CODEPAGE_ISO_8859_6: case LIBUNA_CODEPAGE_ISO_8859_7: case LIBUNA_CODEPAGE_ISO_8859_8: case LIBUNA_CODEPAGE_ISO_8859_9: case LIBUNA_CODEPAGE_ISO_8859_10: case LIBUNA_CODEPAGE_ISO_8859_11: case LIBUNA_CODEPAGE_ISO_8859_13: case LIBUNA_CODEPAGE_ISO_8859_14: case LIBUNA_CODEPAGE_ISO_8859_15: case LIBUNA_CODEPAGE_ISO_8859_16: case LIBUNA_CODEPAGE_KOI8_R: case LIBUNA_CODEPAGE_KOI8_U: case LIBUNA_CODEPAGE_WINDOWS_874: case LIBUNA_CODEPAGE_WINDOWS_1250: case LIBUNA_CODEPAGE_WINDOWS_1251: case LIBUNA_CODEPAGE_WINDOWS_1252: case LIBUNA_CODEPAGE_WINDOWS_1253: case LIBUNA_CODEPAGE_WINDOWS_1254: case LIBUNA_CODEPAGE_WINDOWS_1255: case LIBUNA_CODEPAGE_WINDOWS_1256: case LIBUNA_CODEPAGE_WINDOWS_1257: case LIBUNA_CODEPAGE_WINDOWS_1258: *byte_stream_character_size += 1; break; case LIBUNA_CODEPAGE_WINDOWS_932: result = libuna_codepage_windows_932_unicode_character_size_to_byte_stream( unicode_character, byte_stream_character_size, error ); break; case LIBUNA_CODEPAGE_WINDOWS_936: result = libuna_codepage_windows_936_unicode_character_size_to_byte_stream( unicode_character, byte_stream_character_size, error ); break; case LIBUNA_CODEPAGE_WINDOWS_949: result = libuna_codepage_windows_949_unicode_character_size_to_byte_stream( unicode_character, byte_stream_character_size, error ); break; case LIBUNA_CODEPAGE_WINDOWS_950: result = libuna_codepage_windows_950_unicode_character_size_to_byte_stream( unicode_character, byte_stream_character_size, error ); break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported codepage: %d.", function, codepage ); return( -1 ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine byte stream character size.", function ); return( -1 ); } return( result ); } /* Copies a Unicode character from a byte stream * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, int codepage, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_byte_stream"; uint8_t byte_stream_character = 0; int result = 1; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } byte_stream_character = byte_stream[ *byte_stream_index ]; switch( codepage ) { case LIBUNA_CODEPAGE_ASCII: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { *unicode_character = 0xfffd; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_1: *unicode_character = byte_stream_character; *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_2: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_2_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_3: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_3_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_4: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_4_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_5: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_5_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_6: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_6_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_7: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_7_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_8: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_8_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_9: if( byte_stream_character < 0xd0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xd0; *unicode_character = libuna_codepage_iso_8859_9_byte_stream_to_unicode_base_0xd0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_10: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_10_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_11: if( byte_stream_character < 0xa1 ) { *unicode_character = byte_stream_character; } else if( byte_stream_character < 0xdb ) { *unicode_character = byte_stream_character + 0x0d60; } else if( byte_stream_character < 0xdf ) { *unicode_character = 0xfffd; } else if( byte_stream_character < 0xfc ) { *unicode_character = byte_stream_character + 0x0d60; } else { *unicode_character = 0xfffd; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_13: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_13_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_14: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_14_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_15: if( ( byte_stream_character >= 0xa0 ) && ( byte_stream_character < 0xc0 ) ) { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_15_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } else { *unicode_character = byte_stream_character; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_16: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_16_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_KOI8_R: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_koi8_r_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_KOI8_U: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_koi8_u_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_874: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_874_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_932: result = libuna_codepage_windows_932_copy_from_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_936: result = libuna_codepage_windows_936_copy_from_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_949: result = libuna_codepage_windows_949_copy_from_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_950: result = libuna_codepage_windows_950_copy_from_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1250: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1250_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1251: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1251_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1252: if( ( byte_stream_character < 0x80 ) || ( byte_stream_character >= 0xa0 ) ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1252_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1253: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1253_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1254: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else if( byte_stream_character < 0xa0 ) { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } else if( byte_stream_character < 0xd0 ) { *unicode_character = byte_stream_character; } else if( byte_stream_character < 0xe0 ) { byte_stream_character -= 0xd0; *unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xd0[ byte_stream_character ]; } else if( byte_stream_character < 0xf0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xf0; *unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xf0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1255: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1255_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1256: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1256_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1257: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1257_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1258: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1258_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported codepage: %d.", function, codepage ); return( -1 ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } return( result ); } /* Copies a Unicode character to a byte stream * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, int codepage, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_byte_stream"; int result = 1; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } switch( codepage ) { case LIBUNA_CODEPAGE_ASCII: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else { byte_stream[ *byte_stream_index ] = 0x1a; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_1: if( unicode_character < 0x0100 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else { byte_stream[ *byte_stream_index ] = 0x1a; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_2: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0120 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0138 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x0138; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x0138[ unicode_character ]; } else if( ( unicode_character >= 0x02d8 ) && ( unicode_character < 0x02e0 ) ) { unicode_character -= 0x02d8; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x02d8[ unicode_character ]; } else if( unicode_character == 0x02c7 ) { byte_stream[ *byte_stream_index ] = 0xb7; } else { byte_stream[ *byte_stream_index ] = 0x1a; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_3: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0108 ) && ( unicode_character < 0x0110 ) ) { unicode_character -= 0x0108; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0108[ unicode_character ]; } else if( ( unicode_character >= 0x0118 ) && ( unicode_character < 0x0128 ) ) { unicode_character -= 0x0118; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0118[ unicode_character ]; } else if( ( unicode_character >= 0x0130 ) && ( unicode_character < 0x0138 ) ) { unicode_character -= 0x0130; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0130[ unicode_character ]; } else if( ( unicode_character >= 0x0158 ) && ( unicode_character < 0x0160 ) ) { unicode_character -= 0x0158; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0158[ unicode_character ]; } else switch( unicode_character ) { case 0x016c: byte_stream[ *byte_stream_index ] = 0xdd; break; case 0x016d: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x017b: byte_stream[ *byte_stream_index ] = 0xaf; break; case 0x017c: byte_stream[ *byte_stream_index ] = 0xbf; break; case 0x02d8: byte_stream[ *byte_stream_index ] = 0xa2; break; case 0x02d9: byte_stream[ *byte_stream_index ] = 0xff; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_4: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0158 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0160 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x0160; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x0160[ unicode_character ]; } else switch( unicode_character ) { case 0x02c7: byte_stream[ *byte_stream_index ] = 0xb7; break; case 0x02d9: byte_stream[ *byte_stream_index ] = 0xff; break; case 0x02db: byte_stream[ *byte_stream_index ] = 0xb2; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_5: if( unicode_character < 0x00a1 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0400 ) && ( unicode_character < 0x0460 ) ) { unicode_character -= 0x0400; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_5_unicode_to_byte_stream_base_0x0400[ unicode_character ]; } else switch( unicode_character ) { case 0x00a7: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x00ad: byte_stream[ *byte_stream_index ] = 0xad; break; case 0x2116: byte_stream[ *byte_stream_index ] = 0xf0; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_6: if( unicode_character < 0x00a1 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0618 ) && ( unicode_character < 0x658 ) ) { unicode_character -= 0x0618; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_6_unicode_to_byte_stream_base_0x0618[ unicode_character ]; } else switch( unicode_character ) { case 0x00a4: byte_stream[ *byte_stream_index ] = 0xa4; break; case 0x00ad: byte_stream[ *byte_stream_index ] = 0xad; break; case 0x060c: byte_stream[ *byte_stream_index ] = 0xac; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_7: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00b8 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0380 ) && ( unicode_character < 0x03d0 ) ) { unicode_character -= 0x0380; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x0380[ unicode_character ]; } else switch( unicode_character ) { case 0x00bb: byte_stream[ *byte_stream_index ] = 0xbb; break; case 0x00bd: byte_stream[ *byte_stream_index ] = 0xbd; break; case 0x037a: byte_stream[ *byte_stream_index ] = 0xaa; break; case 0x2015: byte_stream[ *byte_stream_index ] = 0xaf; break; case 0x2018: byte_stream[ *byte_stream_index ] = 0xa1; break; case 0x2019: byte_stream[ *byte_stream_index ] = 0xa2; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0xa4; break; case 0x20af: byte_stream[ *byte_stream_index ] = 0xa5; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_8: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x05d0 ) && ( unicode_character < 0x05f0 ) ) { unicode_character -= 0x05d0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x05d0[ unicode_character ]; } else switch( unicode_character ) { case 0x00d7: byte_stream[ *byte_stream_index ] = 0xaa; break; case 0x00f7: byte_stream[ *byte_stream_index ] = 0xba; break; case 0x200e: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x200f: byte_stream[ *byte_stream_index ] = 0xfe; break; case 0x2017: byte_stream[ *byte_stream_index ] = 0xdf; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_9: if( unicode_character < 0x00d0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00d0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00d0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_9_unicode_to_byte_stream_base_0x00d0[ unicode_character ]; } else switch( unicode_character ) { case 0x011e: byte_stream[ *byte_stream_index ] = 0xd0; break; case 0x011f: byte_stream[ *byte_stream_index ] = 0xf0; break; case 0x0130: byte_stream[ *byte_stream_index ] = 0xdd; break; case 0x0131: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x015e: byte_stream[ *byte_stream_index ] = 0xde; break; case 0x015f: byte_stream[ *byte_stream_index ] = 0xfe; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_10: if( unicode_character < 0x00a1 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00c0 ) && ( unicode_character < 0x0150 ) ) { unicode_character -= 0x00c0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x00c0[ unicode_character ]; } else if( ( unicode_character >= 0x0160 ) && ( unicode_character < 0x0170 ) ) { unicode_character -= 0x0160; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x0160[ unicode_character ]; } else switch( unicode_character ) { case 0x00a7: byte_stream[ *byte_stream_index ] = 0xa7; break; case 0x00ad: byte_stream[ *byte_stream_index ] = 0xad; break; case 0x00b0: byte_stream[ *byte_stream_index ] = 0xb0; break; case 0x00b7: byte_stream[ *byte_stream_index ] = 0xb7; break; case 0x0172: byte_stream[ *byte_stream_index ] = 0xd9; break; case 0x0173: byte_stream[ *byte_stream_index ] = 0xf9; break; case 0x017d: byte_stream[ *byte_stream_index ] = 0xac; break; case 0x017e: byte_stream[ *byte_stream_index ] = 0xbc; break; case 0x2015: byte_stream[ *byte_stream_index ] = 0xbd; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_11: if( unicode_character < 0x00a1 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0e01 ) && ( unicode_character < 0x0e3b ) ) { byte_stream[ *byte_stream_index ] = (uint8_t) ( unicode_character - 0x0d60 ); } else if( ( unicode_character >= 0x0e3f ) && ( unicode_character < 0x0e5c ) ) { byte_stream[ *byte_stream_index ] = (uint8_t) ( unicode_character - 0x0d60 ); } else { byte_stream[ *byte_stream_index ] = 0x1a; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_13: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x2018 ) && ( unicode_character < 0x2020 ) ) { unicode_character -= 0x2018; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x2018[ unicode_character ]; } else { byte_stream[ *byte_stream_index ] = 0x1a; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_14: if( unicode_character < 0x00a1 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00c0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00c0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x00c0[ unicode_character ]; } else if( ( unicode_character >= 0x0170 ) && ( unicode_character < 0x0178 ) ) { unicode_character -= 0x0170; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x0170[ unicode_character ]; } else if( ( unicode_character >= 0x1e80 ) && ( unicode_character < 0x1e88 ) ) { unicode_character -= 0x1e80; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x1e80[ unicode_character ]; } else switch( unicode_character ) { case 0x00a3: byte_stream[ *byte_stream_index ] = 0xa3; break; case 0x00a7: byte_stream[ *byte_stream_index ] = 0xa7; break; case 0x00a9: byte_stream[ *byte_stream_index ] = 0xa9; break; case 0x00ad: byte_stream[ *byte_stream_index ] = 0xad; break; case 0x00ae: byte_stream[ *byte_stream_index ] = 0xae; break; case 0x00b6: byte_stream[ *byte_stream_index ] = 0xb6; break; case 0x010a: byte_stream[ *byte_stream_index ] = 0xa4; break; case 0x010b: byte_stream[ *byte_stream_index ] = 0xa5; break; case 0x0120: byte_stream[ *byte_stream_index ] = 0xb2; break; case 0x0121: byte_stream[ *byte_stream_index ] = 0xb3; break; case 0x0178: byte_stream[ *byte_stream_index ] = 0xaf; break; case 0x1e02: byte_stream[ *byte_stream_index ] = 0xa1; break; case 0x1e03: byte_stream[ *byte_stream_index ] = 0xa2; break; case 0x1e0a: byte_stream[ *byte_stream_index ] = 0xa6; break; case 0x1e0b: byte_stream[ *byte_stream_index ] = 0xab; break; case 0x1e1e: byte_stream[ *byte_stream_index ] = 0xb0; break; case 0x1e1f: byte_stream[ *byte_stream_index ] = 0xb1; break; case 0x1e40: byte_stream[ *byte_stream_index ] = 0xb4; break; case 0x1e41: byte_stream[ *byte_stream_index ] = 0xb5; break; case 0x1e56: byte_stream[ *byte_stream_index ] = 0xb7; break; case 0x1e57: byte_stream[ *byte_stream_index ] = 0xb9; break; case 0x1e60: byte_stream[ *byte_stream_index ] = 0xbb; break; case 0x1e61: byte_stream[ *byte_stream_index ] = 0xbf; break; case 0x1e6a: byte_stream[ *byte_stream_index ] = 0xd7; break; case 0x1e6b: byte_stream[ *byte_stream_index ] = 0xf7; break; case 0x1ef2: byte_stream[ *byte_stream_index ] = 0xac; break; case 0x1ef3: byte_stream[ *byte_stream_index ] = 0xbc; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_15: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_15_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( unicode_character < 0x0100 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else switch( unicode_character ) { case 0x0152: byte_stream[ *byte_stream_index ] = 0xbc; break; case 0x0153: byte_stream[ *byte_stream_index ] = 0xbd; break; case 0x0160: byte_stream[ *byte_stream_index ] = 0xa6; break; case 0x0161: byte_stream[ *byte_stream_index ] = 0xa8; break; case 0x0178: byte_stream[ *byte_stream_index ] = 0xbe; break; case 0x017d: byte_stream[ *byte_stream_index ] = 0xb4; break; case 0x017e: byte_stream[ *byte_stream_index ] = 0xb8; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0xa4; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_16: if( unicode_character < 0x00a1 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a8 ) && ( unicode_character < 0x0108 ) ) { unicode_character -= 0x00a8; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x00a8[ unicode_character ]; } else if( ( unicode_character >= 0x0140 ) && ( unicode_character < 0x0148 ) ) { unicode_character -= 0x0140; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0140[ unicode_character ]; } else if( ( unicode_character >= 0x0150 ) && ( unicode_character < 0x0158 ) ) { unicode_character -= 0x0150; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0150[ unicode_character ]; } else if( ( unicode_character >= 0x0178 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x0178; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0178[ unicode_character ]; } else if( ( unicode_character >= 0x0218 ) && ( unicode_character < 0x0220 ) ) { unicode_character -= 0x0218; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0218[ unicode_character ]; } else switch( unicode_character ) { case 0x00a7: byte_stream[ *byte_stream_index ] = 0xa7; break; case 0x010c: byte_stream[ *byte_stream_index ] = 0xb2; break; case 0x010d: byte_stream[ *byte_stream_index ] = 0xb9; break; case 0x0110: byte_stream[ *byte_stream_index ] = 0xd0; break; case 0x0111: byte_stream[ *byte_stream_index ] = 0xf0; break; case 0x0118: byte_stream[ *byte_stream_index ] = 0xdd; break; case 0x0119: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x015a: byte_stream[ *byte_stream_index ] = 0xd7; break; case 0x015b: byte_stream[ *byte_stream_index ] = 0xf7; break; case 0x0160: byte_stream[ *byte_stream_index ] = 0xa6; break; case 0x0161: byte_stream[ *byte_stream_index ] = 0xa8; break; case 0x0170: byte_stream[ *byte_stream_index ] = 0xd8; break; case 0x0171: byte_stream[ *byte_stream_index ] = 0xf8; break; case 0x201d: byte_stream[ *byte_stream_index ] = 0xb5; break; case 0x201e: byte_stream[ *byte_stream_index ] = 0xa5; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0xa4; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_KOI8_R: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0410 ) && ( unicode_character < 0x0450 ) ) { unicode_character -= 0x0410; byte_stream[ *byte_stream_index ] = libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x0410[ unicode_character ]; } else if( ( unicode_character >= 0x2550 ) && ( unicode_character < 0x2570 ) ) { unicode_character -= 0x2550; byte_stream[ *byte_stream_index ] = libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x2550[ unicode_character ]; } else switch( unicode_character ) { case 0x00a0: byte_stream[ *byte_stream_index ] = 0x9a; break; case 0x00a9: byte_stream[ *byte_stream_index ] = 0xbf; break; case 0x00b0: byte_stream[ *byte_stream_index ] = 0x9c; break; case 0x00b2: byte_stream[ *byte_stream_index ] = 0x9d; break; case 0x00b7: byte_stream[ *byte_stream_index ] = 0x9e; break; case 0x00f7: byte_stream[ *byte_stream_index ] = 0x9f; break; case 0x0401: byte_stream[ *byte_stream_index ] = 0xb3; break; case 0x0451: byte_stream[ *byte_stream_index ] = 0xa3; break; case 0x2219: byte_stream[ *byte_stream_index ] = 0x95; break; case 0x221a: byte_stream[ *byte_stream_index ] = 0x96; break; case 0x2248: byte_stream[ *byte_stream_index ] = 0x97; break; case 0x2264: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x2265: byte_stream[ *byte_stream_index ] = 0x99; break; case 0x2320: byte_stream[ *byte_stream_index ] = 0x93; break; case 0x2321: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x2500: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2502: byte_stream[ *byte_stream_index ] = 0x81; break; case 0x250c: byte_stream[ *byte_stream_index ] = 0x82; break; case 0x2510: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x2514: byte_stream[ *byte_stream_index ] = 0x84; break; case 0x2518: byte_stream[ *byte_stream_index ] = 0x85; break; case 0x251c: byte_stream[ *byte_stream_index ] = 0x86; break; case 0x2524: byte_stream[ *byte_stream_index ] = 0x87; break; case 0x252c: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x2534: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x253c: byte_stream[ *byte_stream_index ] = 0x8a; break; case 0x2580: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x2584: byte_stream[ *byte_stream_index ] = 0x8c; break; case 0x2588: byte_stream[ *byte_stream_index ] = 0x8d; break; case 0x258c: byte_stream[ *byte_stream_index ] = 0x8e; break; case 0x2590: byte_stream[ *byte_stream_index ] = 0x8f; break; case 0x2591: byte_stream[ *byte_stream_index ] = 0x90; break; case 0x2592: byte_stream[ *byte_stream_index ] = 0x91; break; case 0x2593: byte_stream[ *byte_stream_index ] = 0x92; break; case 0x25a0: byte_stream[ *byte_stream_index ] = 0x94; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_KOI8_U: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0410 ) && ( unicode_character < 0x0450 ) ) { unicode_character -= 0x0410; byte_stream[ *byte_stream_index ] = libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x0410[ unicode_character ]; } else if( ( unicode_character >= 0x2550 ) && ( unicode_character < 0x2570 ) ) { unicode_character -= 0x2550; byte_stream[ *byte_stream_index ] = libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x2550[ unicode_character ]; } else switch( unicode_character ) { case 0x00a0: byte_stream[ *byte_stream_index ] = 0x9a; break; case 0x00a9: byte_stream[ *byte_stream_index ] = 0xbf; break; case 0x00b0: byte_stream[ *byte_stream_index ] = 0x9c; break; case 0x00b2: byte_stream[ *byte_stream_index ] = 0x9d; break; case 0x00b7: byte_stream[ *byte_stream_index ] = 0x9e; break; case 0x00f7: byte_stream[ *byte_stream_index ] = 0x9f; break; case 0x0401: byte_stream[ *byte_stream_index ] = 0xb3; break; case 0x0404: byte_stream[ *byte_stream_index ] = 0xb4; break; case 0x0406: byte_stream[ *byte_stream_index ] = 0xb6; break; case 0x0407: byte_stream[ *byte_stream_index ] = 0xb7; break; case 0x0451: byte_stream[ *byte_stream_index ] = 0xa3; break; case 0x0454: byte_stream[ *byte_stream_index ] = 0xa4; break; case 0x0456: byte_stream[ *byte_stream_index ] = 0xa6; break; case 0x0457: byte_stream[ *byte_stream_index ] = 0xa7; break; case 0x0490: byte_stream[ *byte_stream_index ] = 0xbd; break; case 0x0491: byte_stream[ *byte_stream_index ] = 0xad; break; case 0x2219: byte_stream[ *byte_stream_index ] = 0x95; break; case 0x221a: byte_stream[ *byte_stream_index ] = 0x96; break; case 0x2248: byte_stream[ *byte_stream_index ] = 0x97; break; case 0x2264: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x2265: byte_stream[ *byte_stream_index ] = 0x99; break; case 0x2320: byte_stream[ *byte_stream_index ] = 0x93; break; case 0x2321: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x2500: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2502: byte_stream[ *byte_stream_index ] = 0x81; break; case 0x250c: byte_stream[ *byte_stream_index ] = 0x82; break; case 0x2510: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x2514: byte_stream[ *byte_stream_index ] = 0x84; break; case 0x2518: byte_stream[ *byte_stream_index ] = 0x85; break; case 0x251c: byte_stream[ *byte_stream_index ] = 0x86; break; case 0x2524: byte_stream[ *byte_stream_index ] = 0x87; break; case 0x252c: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x2534: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x253c: byte_stream[ *byte_stream_index ] = 0x8a; break; case 0x2580: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x2584: byte_stream[ *byte_stream_index ] = 0x8c; break; case 0x2588: byte_stream[ *byte_stream_index ] = 0x8d; break; case 0x258c: byte_stream[ *byte_stream_index ] = 0x8e; break; case 0x2590: byte_stream[ *byte_stream_index ] = 0x8f; break; case 0x2591: byte_stream[ *byte_stream_index ] = 0x90; break; case 0x2592: byte_stream[ *byte_stream_index ] = 0x91; break; case 0x2593: byte_stream[ *byte_stream_index ] = 0x92; break; case 0x25a0: byte_stream[ *byte_stream_index ] = 0x94; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_874: if( ( unicode_character < 0x0080 ) || ( unicode_character == 0x00a0 ) ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0e00 ) && ( unicode_character < 0x0e60 ) ) { unicode_character -= 0x0e00; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_874_unicode_to_byte_stream_base_0x0e00[ unicode_character ]; } else if( ( unicode_character >= 0x2018 ) && ( unicode_character < 0x2020 ) ) { unicode_character -= 0x2018; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_874_unicode_to_byte_stream_base_0x2018[ unicode_character ]; } else switch( unicode_character ) { case 0x2013: byte_stream[ *byte_stream_index ] = 0x96; break; case 0x2014: byte_stream[ *byte_stream_index ] = 0x97; break; case 0x2022: byte_stream[ *byte_stream_index ] = 0x95; break; case 0x2026: byte_stream[ *byte_stream_index ] = 0x85; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_932: result = libuna_codepage_windows_932_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_936: result = libuna_codepage_windows_936_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_949: result = libuna_codepage_windows_949_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_950: result = libuna_codepage_windows_950_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1250: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0120 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0138 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x0138; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x0138[ unicode_character ]; } else if( ( unicode_character >= 0x02d8 ) && ( unicode_character < 0x02e0 ) ) { unicode_character -= 0x02d8; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x02d8[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else if( ( unicode_character >= 0x2030 ) && ( unicode_character < 0x2040 ) ) { unicode_character -= 0x2030; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2030[ unicode_character ]; } else switch( unicode_character ) { case 0x02c7: byte_stream[ *byte_stream_index ] = 0xa1; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1251: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0400 ) && ( unicode_character < 0x0460 ) ) { unicode_character -= 0x0400; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x0400[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0490: byte_stream[ *byte_stream_index ] = 0xa5; break; case 0x0491: byte_stream[ *byte_stream_index ] = 0xb4; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x2116: byte_stream[ *byte_stream_index ] = 0xb9; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1252: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1252_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0152: byte_stream[ *byte_stream_index ] = 0x8c; break; case 0x0153: byte_stream[ *byte_stream_index ] = 0x9c; break; case 0x0160: byte_stream[ *byte_stream_index ] = 0x8a; break; case 0x0161: byte_stream[ *byte_stream_index ] = 0x9a; break; case 0x0178: byte_stream[ *byte_stream_index ] = 0x9f; break; case 0x017d: byte_stream[ *byte_stream_index ] = 0x8e; break; case 0x017e: byte_stream[ *byte_stream_index ] = 0x9e; break; case 0x0192: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x02c6: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x02dc: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1253: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0380 ) && ( unicode_character < 0x03d0 ) ) { unicode_character -= 0x0380; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x0380[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0192: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1254: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00d0 ) ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00d0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00d0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x00d0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x011e: byte_stream[ *byte_stream_index ] = 0xd0; break; case 0x011f: byte_stream[ *byte_stream_index ] = 0xf0; break; case 0x0130: byte_stream[ *byte_stream_index ] = 0xdd; break; case 0x0131: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x0152: byte_stream[ *byte_stream_index ] = 0x8c; break; case 0x0153: byte_stream[ *byte_stream_index ] = 0x9c; break; case 0x015e: byte_stream[ *byte_stream_index ] = 0xde; break; case 0x015f: byte_stream[ *byte_stream_index ] = 0xfe; break; case 0x0160: byte_stream[ *byte_stream_index ] = 0x8a; break; case 0x0161: byte_stream[ *byte_stream_index ] = 0x9a; break; case 0x0178: byte_stream[ *byte_stream_index ] = 0x9f; break; case 0x0192: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x02c6: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x02dc: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1255: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x05b0 ) && ( unicode_character < 0x05c8 ) ) { unicode_character -= 0x05b0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05b0[ unicode_character ]; } else if( ( unicode_character >= 0x05d0 ) && ( unicode_character < 0x05f8 ) ) { unicode_character -= 0x05d0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05d0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x00d7: byte_stream[ *byte_stream_index ] = 0xaa; break; case 0x00f7: byte_stream[ *byte_stream_index ] = 0xba; break; case 0x0192: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x02c6: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x02dc: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x200e: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x200f: byte_stream[ *byte_stream_index ] = 0xfe; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20aa: byte_stream[ *byte_stream_index ] = 0xa4; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1256: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x00e0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00e0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00e0[ unicode_character ]; } else if( ( unicode_character >= 0x0618 ) && ( unicode_character < 0x0658 ) ) { unicode_character -= 0x0618; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x0618[ unicode_character ]; } else if( ( unicode_character >= 0x2008 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2008; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x2008[ unicode_character ]; } else switch( unicode_character ) { case 0x00d7: byte_stream[ *byte_stream_index ] = 0xd7; break; case 0x0152: byte_stream[ *byte_stream_index ] = 0x8c; break; case 0x0153: byte_stream[ *byte_stream_index ] = 0x9c; break; case 0x0192: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x02c6: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x060c: byte_stream[ *byte_stream_index ] = 0xa1; break; case 0x0679: byte_stream[ *byte_stream_index ] = 0x8a; break; case 0x067e: byte_stream[ *byte_stream_index ] = 0x81; break; case 0x0686: byte_stream[ *byte_stream_index ] = 0x8d; break; case 0x0688: byte_stream[ *byte_stream_index ] = 0x8f; break; case 0x0691: byte_stream[ *byte_stream_index ] = 0x9a; break; case 0x0698: byte_stream[ *byte_stream_index ] = 0x8e; break; case 0x06a9: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x06af: byte_stream[ *byte_stream_index ] = 0x90; break; case 0x06ba: byte_stream[ *byte_stream_index ] = 0x9f; break; case 0x06be: byte_stream[ *byte_stream_index ] = 0xaa; break; case 0x06c1: byte_stream[ *byte_stream_index ] = 0xc0; break; case 0x06d2: byte_stream[ *byte_stream_index ] = 0xff; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1257: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x02c7: byte_stream[ *byte_stream_index ] = 0x8e; break; case 0x02d9: byte_stream[ *byte_stream_index ] = 0xff; break; case 0x02db: byte_stream[ *byte_stream_index ] = 0x9e; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1258: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00c0 ) && ( unicode_character < 0x0108 ) ) { unicode_character -= 0x00c0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x00c0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0110: byte_stream[ *byte_stream_index ] = 0xd0; break; case 0x0111: byte_stream[ *byte_stream_index ] = 0xf0; break; case 0x0152: byte_stream[ *byte_stream_index ] = 0x8c; break; case 0x0153: byte_stream[ *byte_stream_index ] = 0x9c; break; case 0x0178: byte_stream[ *byte_stream_index ] = 0x9f; break; case 0x0192: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x01a0: byte_stream[ *byte_stream_index ] = 0xd5; break; case 0x01a1: byte_stream[ *byte_stream_index ] = 0xf5; break; case 0x01af: byte_stream[ *byte_stream_index ] = 0xdd; break; case 0x01b0: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x02c6: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x02dc: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x0300: byte_stream[ *byte_stream_index ] = 0xcc; break; case 0x0301: byte_stream[ *byte_stream_index ] = 0xec; break; case 0x0303: byte_stream[ *byte_stream_index ] = 0xde; break; case 0x0309: byte_stream[ *byte_stream_index ] = 0xd2; break; case 0x0323: byte_stream[ *byte_stream_index ] = 0xf2; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ab: byte_stream[ *byte_stream_index ] = 0xfe; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported codepage: %d.", function, codepage ); return( -1 ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy Unicode character to byte stream.", function ); return( -1 ); } return( 1 ); } /* Determines the size of an UTF-7 stream character from an Unicode character * Adds the size to the UTF-7 stream character size value * Returns 1 if successful or -1 on error */ int libuna_unicode_character_size_to_utf7_stream( libuna_unicode_character_t unicode_character, size_t *utf7_stream_character_size, uint32_t *utf7_stream_base64_data, libcerror_error_t **error ) { libuna_utf16_character_t utf16_surrogate = 0; static char *function = "libuna_unicode_character_size_to_utf7_stream"; uint8_t base64_encode_character = 0; uint32_t base64_triplet = 0; uint8_t number_of_bytes = 0; uint8_t current_byte = 0; uint8_t byte_bit_shift = 0; if( utf7_stream_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream character size.", function ); return( -1 ); } if( utf7_stream_base64_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream base64 data.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } /* A-Z is not a continous range on an EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( unicode_character >= 0x41 ) && ( unicode_character <= 0x49 ) ) { } else if( ( unicode_character >= 0x4a ) && ( unicode_character <= 0x52 ) ) { } else if( ( unicode_character >= 0x53 ) && ( unicode_character <= 0x5a ) ) { } /* a-z is not a continous range on an EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( unicode_character >= 0x61 ) && ( unicode_character <= 0x69 ) ) { } else if( ( unicode_character >= 0x6a ) && ( unicode_character <= 0x72 ) ) { } else if( ( unicode_character >= 0x73 ) && ( unicode_character <= 0x7a ) ) { } /* 0-9 */ else if( ( unicode_character >= 0x30 ) && ( unicode_character <= 0x39 ) ) { } /* Valid directly encoded whitespace */ else if( ( unicode_character == (libuna_unicode_character_t) '\t' ) || ( unicode_character == (libuna_unicode_character_t) '\n' ) || ( unicode_character == (libuna_unicode_character_t) '\r' ) || ( unicode_character == (libuna_unicode_character_t) ' ' ) ) { } /* The + character must be escaped */ else if( unicode_character == (libuna_unicode_character_t) '+' ) { } /* Valid directly encoded characters */ else if( ( unicode_character == (libuna_unicode_character_t) '\'' ) || ( unicode_character == (libuna_unicode_character_t) '(' ) || ( unicode_character == (libuna_unicode_character_t) ')' ) || ( unicode_character == (libuna_unicode_character_t) ',' ) || ( unicode_character == (libuna_unicode_character_t) '-' ) || ( unicode_character == (libuna_unicode_character_t) '.' ) || ( unicode_character == (libuna_unicode_character_t) '/' ) || ( unicode_character == (libuna_unicode_character_t) ':' ) || ( unicode_character == (libuna_unicode_character_t) '?' ) ) { } /* Valid optional directly encoded characters */ else if( ( unicode_character == (libuna_unicode_character_t) '!' ) || ( unicode_character == (libuna_unicode_character_t) '"' ) || ( unicode_character == (libuna_unicode_character_t) '#' ) || ( unicode_character == (libuna_unicode_character_t) '$' ) || ( unicode_character == (libuna_unicode_character_t) '%' ) || ( unicode_character == (libuna_unicode_character_t) '&' ) || ( unicode_character == (libuna_unicode_character_t) '*' ) || ( unicode_character == (libuna_unicode_character_t) ';' ) || ( unicode_character == (libuna_unicode_character_t) '<' ) || ( unicode_character == (libuna_unicode_character_t) '=' ) || ( unicode_character == (libuna_unicode_character_t) '>' ) || ( unicode_character == (libuna_unicode_character_t) '@' ) || ( unicode_character == (libuna_unicode_character_t) '[' ) || ( unicode_character == (libuna_unicode_character_t) ']' ) || ( unicode_character == (libuna_unicode_character_t) '^' ) || ( unicode_character == (libuna_unicode_character_t) '_' ) || ( unicode_character == (libuna_unicode_character_t) '`' ) || ( unicode_character == (libuna_unicode_character_t) '{' ) || ( unicode_character == (libuna_unicode_character_t) '|' ) || ( unicode_character == (libuna_unicode_character_t) '}' ) ) { } /* Allow for the end of string character */ else if( unicode_character == 0 ) { } else { base64_encode_character = 1; } if( base64_encode_character == 0 ) { if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { *utf7_stream_base64_data = 0; } *utf7_stream_character_size += 1; /* The + character must be escaped */ if( unicode_character == (libuna_unicode_character_t) '+' ) { *utf7_stream_character_size += 1; } } else { /* Escape the base64 encoded characters with a + */ if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) == 0 ) { *utf7_stream_character_size += 1; } /* Otherwise continue the previously base64 encoded characters */ else { base64_triplet = *utf7_stream_base64_data & 0x00ffffff; number_of_bytes = ( *utf7_stream_base64_data >> 24 ) & 0x03; current_byte = ( *utf7_stream_base64_data >> 28 ) & 0x03; if( number_of_bytes > 0 ) { if( *utf7_stream_character_size < (size_t) ( number_of_bytes + 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-7 stream character size value out of bounds.", function ); return( -1 ); } /* Correct the size for the last partial base64 stream */ *utf7_stream_character_size -= number_of_bytes + 1; } if( *utf7_stream_character_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-7 stream character size value out of bounds.", function ); return( -1 ); } /* Correct the size for the base64 stream termination character */ *utf7_stream_character_size -= 1; } *utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; if( unicode_character > LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { unicode_character -= 0x010000; utf16_surrogate = (libuna_utf16_character_t) ( ( unicode_character >> 10 ) + LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ); byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( ( utf16_surrogate >> 8 ) & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { *utf7_stream_character_size += 4; number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( utf16_surrogate & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { *utf7_stream_character_size += 4; number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } unicode_character = (libuna_utf16_character_t) ( ( unicode_character & 0x03ff ) + LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ); } byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( ( unicode_character >> 8 ) & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { *utf7_stream_character_size += 4; number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( unicode_character & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { *utf7_stream_character_size += 4; number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } /* Terminate the base64 encoded characters */ if( number_of_bytes > 0 ) { *utf7_stream_character_size += number_of_bytes + 1; } *utf7_stream_character_size += 1; } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { *utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; *utf7_stream_base64_data |= (uint32_t) current_byte << 28; *utf7_stream_base64_data |= (uint32_t) number_of_bytes << 24; *utf7_stream_base64_data |= base64_triplet & 0x00ffffff; } return( 1 ); } /* Copies a Unicode character from an UTF-7 stream * The bits of the base64 data contain: * 0 - 23 the base64 triplet * 24 - 25 the number of bytes in the triplet * 26 - 27 unused * 28 - 29 the current byte * 30 unused * 31 flag to indicate the current UTF-7 characters are (modified) base64 encoded * * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_from_utf7_stream( libuna_unicode_character_t *unicode_character, const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf7_stream_index, uint32_t *utf7_stream_base64_data, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_utf7_stream"; libuna_utf16_character_t utf16_surrogate = 0; uint32_t base64_triplet = 0; uint8_t number_of_bytes = 0; uint8_t current_byte = 0; uint8_t padding_size = 0; uint8_t byte_bit_shift = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream index.", function ); return( -1 ); } if( *utf7_stream_index >= utf7_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-7 stream too small.", function ); return( -1 ); } if( utf7_stream_base64_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 base64 data.", function ); return( -1 ); } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { base64_triplet = *utf7_stream_base64_data & 0x00ffffff; number_of_bytes = ( *utf7_stream_base64_data >> 24 ) & 0x03; current_byte = ( *utf7_stream_base64_data >> 28 ) & 0x03; if( current_byte >= number_of_bytes ) { /* A-Z is not a continous range on an EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'A' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'I' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'J' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'R' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'S' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'Z' ) ) { } /* a-z is not a continous range on an EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'a' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'i' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'j' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'r' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 's' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'z' ) ) { } /* 0-9 */ else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) '0' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) '9' ) ) { } /* + or / */ else if( ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '+' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '/' ) ) { } /* Any character not in the modified base64 alphabet * terminates the base64 encoded sequence */ else { *utf7_stream_base64_data = 0; } } } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) == 0 ) { /* Determine if the character is modified base64 encoded * or a + character */ if( utf7_stream[ *utf7_stream_index ] == (uint8_t) '+' ) { if( utf7_stream[ *utf7_stream_index + 1 ] != (uint8_t) '-' ) { *utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; *utf7_stream_index += 1; } } /* A-Z is not a continous range on an EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'A' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'I' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'J' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'R' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'S' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'Z' ) ) { } /* a-z is not a continous range on an EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'a' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'i' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'j' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'r' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 's' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'z' ) ) { } /* 0-9 */ else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) '0' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) '9' ) ) { } /* Valid directly encoded whitespace */ else if( ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '\t' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '\n' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '\r' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) ' ' ) ) { } /* Valid directly encoded characters */ else if( ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '\'' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '(' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) ')' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) ',' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '-' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '.' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '/' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) ':' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '?' ) ) { } /* Valid optional directly encoded characters */ else if( ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '!' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '"' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '#' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '$' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '%' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '&' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '*' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) ';' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '<' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '=' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '>' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '@' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '[' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) ']' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '^' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '_' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '`' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '{' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '|' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '}' ) ) { } /* Allow for the end of string character */ else if( utf7_stream[ *utf7_stream_index ] == 0 ) { } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid directly encoded UTF-7 character byte: 0x%02" PRIx8 ".", function, utf7_stream[ *utf7_stream_index ] ); return( -1 ); } } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) == 0 ) { *unicode_character = utf7_stream[ *utf7_stream_index ]; *utf7_stream_index += 1; if( ( *unicode_character == (libuna_unicode_character_t) '+' ) && ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '-' ) ) { *utf7_stream_index += 1; } } else if( ( number_of_bytes == 0 ) || ( current_byte >= number_of_bytes ) ) { if( libuna_base64_triplet_copy_from_base64_stream( &base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, &padding_size, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy base64 encoded UTF-7 characters.", function ); return( -1 ); } if( padding_size > 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported padding in base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 3 - padding_size; current_byte = 0; } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { byte_bit_shift = 16 - ( current_byte * 8 ); *unicode_character = ( ( base64_triplet >> byte_bit_shift ) & 0x000000ffUL ) << 8; current_byte += 1; if( current_byte >= number_of_bytes ) { if( libuna_base64_triplet_copy_from_base64_stream( &base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, &padding_size, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy base64 encoded UTF-7 characters.", function ); return( -1 ); } if( padding_size > 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported padding in base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 3 - padding_size; current_byte = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); *unicode_character += ( base64_triplet >> byte_bit_shift ) & 0x000000ffUL; current_byte += 1; if( ( *unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( *unicode_character <= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END ) ) { if( current_byte >= number_of_bytes ) { if( libuna_base64_triplet_copy_from_base64_stream( &base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, &padding_size, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy base64 encoded UTF-7 characters.", function ); return( -1 ); } if( padding_size > 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported padding in base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 3 - padding_size; current_byte = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); utf16_surrogate = ( ( base64_triplet >> byte_bit_shift ) & 0x000000ffUL ) << 8; current_byte += 1; if( current_byte >= number_of_bytes ) { if( libuna_base64_triplet_copy_from_base64_stream( &base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, &padding_size, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve base64 encoded UTF-7 characters.", function ); return( -1 ); } if( padding_size > 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported padding in base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 3 - padding_size; current_byte = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); utf16_surrogate += ( base64_triplet >> byte_bit_shift ) & 0x000000ffUL; current_byte += 1; /* Determine if the UTF-16 character is within the low surrogate range */ if( ( utf16_surrogate >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( utf16_surrogate <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; *unicode_character <<= 10; *unicode_character += utf16_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END; *unicode_character += 0x010000; } else { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } } if( *utf7_stream_index >= utf7_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-7 stream too small.", function ); return( -1 ); } if( ( current_byte >= number_of_bytes ) && ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '-' ) ) { *utf7_stream_base64_data = 0; *utf7_stream_index += 1; } } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { *utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; *utf7_stream_base64_data |= (uint32_t) current_byte << 28; *utf7_stream_base64_data |= (uint32_t) number_of_bytes << 24; *utf7_stream_base64_data |= base64_triplet & 0x00ffffff; } return( 1 ); } /* Copies a Unicode character into a UTF-7 stream * The bits of the base64 data contain: * 0 - 23 the base64 triplet * 24 - 25 the number of bytes in the triplet * 26 - 27 unused * 28 - 29 the current byte * 30 unused * 31 flag to indicate the current UTF-7 characters are (modified) base64 encoded * * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_to_utf7_stream( libuna_unicode_character_t unicode_character, uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf7_stream_index, uint32_t *utf7_stream_base64_data, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_utf7_stream"; libuna_utf16_character_t utf16_surrogate = 0; uint32_t base64_triplet = 0; uint8_t number_of_bytes = 0; uint8_t base64_encode_character = 0; uint8_t current_byte = 0; uint8_t byte_bit_shift = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream index.", function ); return( -1 ); } if( utf7_stream_base64_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream base64 data.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } /* A-Z is not a continous range on 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'; } /* Valid directly encoded whitespace */ else if( ( unicode_character == (libuna_unicode_character_t) '\t' ) || ( unicode_character == (libuna_unicode_character_t) '\n' ) || ( unicode_character == (libuna_unicode_character_t) '\r' ) || ( unicode_character == (libuna_unicode_character_t) ' ' ) ) { } /* The + character must be escaped */ else if( unicode_character == (libuna_unicode_character_t) '+' ) { } /* Valid directly encoded characters */ else if( ( unicode_character == (libuna_unicode_character_t) '\'' ) || ( unicode_character == (libuna_unicode_character_t) '(' ) || ( unicode_character == (libuna_unicode_character_t) ')' ) || ( unicode_character == (libuna_unicode_character_t) ',' ) || ( unicode_character == (libuna_unicode_character_t) '-' ) || ( unicode_character == (libuna_unicode_character_t) '.' ) || ( unicode_character == (libuna_unicode_character_t) '/' ) || ( unicode_character == (libuna_unicode_character_t) ':' ) || ( unicode_character == (libuna_unicode_character_t) '?' ) ) { } /* Valid optional directly encoded characters */ else if( ( unicode_character == (libuna_unicode_character_t) '!' ) || ( unicode_character == (libuna_unicode_character_t) '"' ) || ( unicode_character == (libuna_unicode_character_t) '#' ) || ( unicode_character == (libuna_unicode_character_t) '$' ) || ( unicode_character == (libuna_unicode_character_t) '%' ) || ( unicode_character == (libuna_unicode_character_t) '&' ) || ( unicode_character == (libuna_unicode_character_t) '*' ) || ( unicode_character == (libuna_unicode_character_t) ';' ) || ( unicode_character == (libuna_unicode_character_t) '<' ) || ( unicode_character == (libuna_unicode_character_t) '=' ) || ( unicode_character == (libuna_unicode_character_t) '>' ) || ( unicode_character == (libuna_unicode_character_t) '@' ) || ( unicode_character == (libuna_unicode_character_t) '[' ) || ( unicode_character == (libuna_unicode_character_t) ']' ) || ( unicode_character == (libuna_unicode_character_t) '^' ) || ( unicode_character == (libuna_unicode_character_t) '_' ) || ( unicode_character == (libuna_unicode_character_t) '`' ) || ( unicode_character == (libuna_unicode_character_t) '{' ) || ( unicode_character == (libuna_unicode_character_t) '|' ) || ( unicode_character == (libuna_unicode_character_t) '}' ) ) { } /* Allow for the end of string character */ else if( unicode_character == 0 ) { } else { base64_encode_character = 1; } if( base64_encode_character == 0 ) { if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { *utf7_stream_base64_data = 0; } if( *utf7_stream_index >= utf7_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-7 stream too small.", function ); return( -1 ); } utf7_stream[ *utf7_stream_index ] = (uint8_t) unicode_character; *utf7_stream_index += 1; /* The + character must be escaped */ if( unicode_character == (libuna_unicode_character_t) '+' ) { if( *utf7_stream_index >= utf7_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-7 stream too small.", function ); return( -1 ); } utf7_stream[ *utf7_stream_index ] = (uint8_t) '-'; *utf7_stream_index += 1; } } else { /* Escape the base64 encoded chracters with a + */ if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) == 0 ) { if( *utf7_stream_index >= utf7_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-7 stream too small.", function ); return( -1 ); } utf7_stream[ *utf7_stream_index ] = (uint8_t) '+'; *utf7_stream_index += 1; } /* Otherwise continue the previously base64 encoded characters */ else { base64_triplet = *utf7_stream_base64_data & 0x00ffffff; number_of_bytes = ( *utf7_stream_base64_data >> 24 ) & 0x03; current_byte = ( *utf7_stream_base64_data >> 28 ) & 0x03; if( number_of_bytes > 0 ) { /* Correct the index for the last partial base64 stream */ *utf7_stream_index -= number_of_bytes + 1; } /* Correct the index for the base64 stream termination character */ *utf7_stream_index -= 1; } *utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; if( unicode_character > LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { unicode_character -= 0x010000; utf16_surrogate = (libuna_utf16_character_t) ( ( unicode_character >> 10 ) + LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ); byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( ( utf16_surrogate >> 8 ) & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { if( libuna_base64_triplet_copy_to_base64_stream( base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, 0, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( utf16_surrogate & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { if( libuna_base64_triplet_copy_to_base64_stream( base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, 0, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } unicode_character = (libuna_utf16_character_t) ( ( unicode_character & 0x03ff ) + LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ); } byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( ( unicode_character >> 8 ) & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { if( libuna_base64_triplet_copy_to_base64_stream( base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, 0, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( unicode_character & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { if( libuna_base64_triplet_copy_to_base64_stream( base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, 0, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } /* Terminate the base64 encoded characters */ if( number_of_bytes > 0 ) { if( libuna_base64_triplet_copy_to_base64_stream( base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, 3 - number_of_bytes, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set base64 encoded UTF-7 characters.", function ); return( -1 ); } } if( *utf7_stream_index >= utf7_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-7 stream too small.", function ); return( -1 ); } utf7_stream[ *utf7_stream_index ] = (uint8_t) '-'; *utf7_stream_index += 1; } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { *utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; *utf7_stream_base64_data |= (uint32_t) current_byte << 28; *utf7_stream_base64_data |= (uint32_t) number_of_bytes << 24; *utf7_stream_base64_data |= base64_triplet & 0x00ffffff; } return( 1 ); } /* Determines the size of an UTF-8 character from an Unicode character * Adds the size to the UTF-8 character size value * Returns 1 if successful or -1 on error */ int libuna_unicode_character_size_to_utf8( libuna_unicode_character_t unicode_character, size_t *utf8_character_size, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_size_to_utf8"; if( utf8_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 character size.", function ); return( -1 ); } if( unicode_character < 0x080 ) { *utf8_character_size += 1; } else if( unicode_character < 0x0800 ) { *utf8_character_size += 2; } else if( unicode_character < 0x010000 ) { *utf8_character_size += 3; } else if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { *utf8_character_size += 3; } else { *utf8_character_size += 4; } /* If UTF-8 USC support is needed it should be implemented in * utf8_usc or something, but for now leave this here as a reminder else if( unicode_character < 0x010000 ) { *utf8_character_size += 3; } else if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { *utf8_character_size += 2; } else if( unicode_character < 0x0200000 ) { *utf8_character_size += 4; } else if( unicode_character < 0x0400000 ) { *utf8_character_size += 5; } else { *utf8_character_size += 6; } */ return( 1 ); } /* Copies a Unicode character from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_from_utf8( libuna_unicode_character_t *unicode_character, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_utf8"; uint8_t utf8_character_additional_bytes = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } /* Determine the number of additional bytes of the UTF-8 character */ if( utf8_string[ *utf8_string_index ] < 0xc0 ) { utf8_character_additional_bytes = 0; } else if( utf8_string[ *utf8_string_index ] < 0xe0 ) { utf8_character_additional_bytes = 1; } else if( utf8_string[ *utf8_string_index ] < 0xf0 ) { utf8_character_additional_bytes = 2; } else if( utf8_string[ *utf8_string_index ] < 0xf8 ) { utf8_character_additional_bytes = 3; } else if( utf8_string[ *utf8_string_index ] < 0xfc ) { utf8_character_additional_bytes = 4; } else { utf8_character_additional_bytes = 5; } if( ( *utf8_string_index + utf8_character_additional_bytes + 1 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 character bytes.", function ); return( -1 ); } /* Determine the UTF-8 character and make sure it is valid * Unicode limits the UTF-8 character to consist of a maximum of 4 bytes * while ISO 10646 Universal Character Set (UCS) allows up to 6 bytes */ if( utf8_string[ *utf8_string_index ] > 0xf4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index ] ); return( -1 ); } *unicode_character = utf8_string[ *utf8_string_index ]; if( utf8_character_additional_bytes == 0 ) { if( ( utf8_string[ *utf8_string_index ] >= 0x80 ) && ( utf8_string[ *utf8_string_index ] < 0xc2 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index ] ); return( -1 ); } } if( utf8_character_additional_bytes >= 1 ) { if( utf8_string[ *utf8_string_index + 1 ] > 0xbf ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 1 ] ); return( -1 ); } if( ( utf8_string[ *utf8_string_index ] == 0xe0 ) && ( utf8_string[ *utf8_string_index + 1 ] < 0xa0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 1 ] ); return( -1 ); } else if( ( utf8_string[ *utf8_string_index ] == 0xed ) && ( utf8_string[ *utf8_string_index + 1 ] > 0x9f ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 1 ] ); return( -1 ); } else if( ( utf8_string[ *utf8_string_index ] == 0xf0 ) && ( utf8_string[ *utf8_string_index + 1 ] < 0x90 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 1 ] ); return( -1 ); } else if( ( utf8_string[ *utf8_string_index ] == 0xf4 ) && ( utf8_string[ *utf8_string_index + 1 ] > 0x8f ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 1 ] ); return( -1 ); } else if( utf8_string[ *utf8_string_index + 1 ] < 0x80 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 1 ] ); return( -1 ); } *unicode_character <<= 6; *unicode_character += utf8_string[ *utf8_string_index + 1 ]; if( utf8_character_additional_bytes == 1 ) { *unicode_character -= 0x03080; } } if( utf8_character_additional_bytes >= 2 ) { if( ( utf8_string[ *utf8_string_index + 2 ] < 0x80 ) || ( utf8_string[ *utf8_string_index + 2 ] > 0xbf ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 2 ] ); return( -1 ); } *unicode_character <<= 6; *unicode_character += utf8_string[ *utf8_string_index + 2 ]; if( utf8_character_additional_bytes == 2 ) { *unicode_character -= 0x0e2080; } } if( utf8_character_additional_bytes >= 3 ) { if( ( utf8_string[ *utf8_string_index + 3 ] < 0x80 ) || ( utf8_string[ *utf8_string_index + 3 ] > 0xbf ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 3 ] ); return( -1 ); } *unicode_character <<= 6; *unicode_character += utf8_string[ *utf8_string_index + 3 ]; if( utf8_character_additional_bytes == 3 ) { *unicode_character -= 0x03c82080; } } if( utf8_character_additional_bytes >= 4 ) { if( ( utf8_string[ *utf8_string_index + 4 ] < 0x80 ) || ( utf8_string[ *utf8_string_index + 4 ] > 0xbf ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 5th UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 4 ] ); return( -1 ); } *unicode_character <<= 6; *unicode_character += utf8_string[ *utf8_string_index + 4 ]; if( utf8_character_additional_bytes == 4 ) { *unicode_character -= 0x0fa082080; } } if( utf8_character_additional_bytes == 5 ) { if( ( utf8_string[ *utf8_string_index + 5 ] < 0x80 ) || ( utf8_string[ *utf8_string_index + 5 ] > 0xbf ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 6th UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 5 ] ); return( -1 ); } *unicode_character <<= 6; *unicode_character += utf8_string[ *utf8_string_index + 5 ]; *unicode_character -= 0x082082080; } /* Determine if the Unicode character is valid */ if( *unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } *utf8_string_index += 1 + utf8_character_additional_bytes; return( 1 ); } /* Copies a Unicode character into a UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_to_utf8( libuna_unicode_character_t unicode_character, libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_utf8"; uint8_t utf8_character_additional_bytes = 0; uint8_t utf8_character_iterator = 0; uint8_t utf8_first_character_mark = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } /* Determine how many UTF-8 character bytes are required */ if( unicode_character < 0x080 ) { utf8_character_additional_bytes = 0; utf8_first_character_mark = 0; } else if( unicode_character < 0x0800 ) { utf8_character_additional_bytes = 1; utf8_first_character_mark = 0x0c0; } else if( unicode_character < 0x010000 ) { utf8_character_additional_bytes = 2; utf8_first_character_mark = 0x0e0; } else if( unicode_character < 0x0200000 ) { utf8_character_additional_bytes = 3; utf8_first_character_mark = 0x0f0; } else if( unicode_character < 0x0400000 ) { utf8_character_additional_bytes = 4; utf8_first_character_mark = 0x0f8; } else { utf8_character_additional_bytes = 5; utf8_first_character_mark = 0x0fc; } /* Convert Unicode character into UTF-8 character bytes */ if( ( *utf8_string_index + utf8_character_additional_bytes ) >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } for( utf8_character_iterator = utf8_character_additional_bytes; utf8_character_iterator > 0; utf8_character_iterator-- ) { utf8_string[ *utf8_string_index + utf8_character_iterator ] = (libuna_utf8_character_t) ( ( unicode_character & 0x0bf ) | 0x080 ); unicode_character >>= 6; } utf8_string[ *utf8_string_index ] = (libuna_utf8_character_t) ( unicode_character | utf8_first_character_mark ); *utf8_string_index += 1 + utf8_character_additional_bytes; return( 1 ); } /* Determines the size of an UTF-16 character from an Unicode character * Adds the size to the UTF-16 character size value * Returns 1 if successful or -1 on error */ int libuna_unicode_character_size_to_utf16( libuna_unicode_character_t unicode_character, size_t *utf16_character_size, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_size_to_utf16"; if( utf16_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 character size.", function ); return( -1 ); } if( ( unicode_character > LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) && ( unicode_character <= LIBUNA_UTF16_CHARACTER_MAX ) ) { *utf16_character_size += 2; } else { *utf16_character_size += 1; } return( 1 ); } /* Copies a Unicode character from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_from_utf16( libuna_unicode_character_t *unicode_character, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_utf16"; libuna_utf16_character_t utf16_surrogate = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } *unicode_character = utf16_string[ *utf16_string_index ]; *utf16_string_index += 1; /* Determine if the UTF-16 character is within the high surrogate range */ if( ( *unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( *unicode_character <= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END ) ) { if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: missing surrogate UTF-16 character bytes.", function ); return( -1 ); } utf16_surrogate = utf16_string[ *utf16_string_index ]; *utf16_string_index += 1; /* Determine if the UTF-16 character is within the low surrogate range */ if( ( utf16_surrogate >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( utf16_surrogate <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; *unicode_character <<= 10; *unicode_character += utf16_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END; *unicode_character += 0x010000; } else { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } } /* Determine if the Unicode character is valid */ else if( ( *unicode_character >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( *unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } return( 1 ); } /* Copies a Unicode character into a UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_to_utf16( libuna_unicode_character_t unicode_character, libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_utf16"; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( unicode_character > LIBUNA_UTF16_CHARACTER_MAX ) ) { unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } if( unicode_character <= LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { utf16_string[ *utf16_string_index ] = (libuna_utf16_character_t) unicode_character; *utf16_string_index += 1; } else { if( ( *utf16_string_index + 1 ) >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } unicode_character -= 0x010000; utf16_string[ *utf16_string_index ] = (libuna_utf16_character_t) ( ( unicode_character >> 10 ) + LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ); utf16_string[ *utf16_string_index + 1 ] = (libuna_utf16_character_t) ( ( unicode_character & 0x03ff ) + LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ); *utf16_string_index += 2; } return( 1 ); } /* Copies a Unicode character from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_from_utf16_stream( libuna_unicode_character_t *unicode_character, const uint8_t *utf16_stream, size_t utf16_stream_size, size_t *utf16_stream_index, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_utf16_stream"; libuna_utf16_character_t utf16_surrogate = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream index.", function ); return( -1 ); } if( *utf16_stream_index >= utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 stream too small.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( byte_order == LIBUNA_ENDIAN_BIG ) { *unicode_character = utf16_stream[ *utf16_stream_index ]; *unicode_character <<= 8; *unicode_character += utf16_stream[ *utf16_stream_index + 1 ]; } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { *unicode_character = utf16_stream[ *utf16_stream_index + 1 ]; *unicode_character <<= 8; *unicode_character += utf16_stream[ *utf16_stream_index ]; } *utf16_stream_index += 2; /* Determine if the UTF-16 character is within the high surrogate range */ if( ( *unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( *unicode_character <= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END ) ) { if( *utf16_stream_index >= utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: missing surrogate UTF-16 character bytes.", function ); return( -1 ); } if( byte_order == LIBUNA_ENDIAN_BIG ) { utf16_surrogate = utf16_stream[ *utf16_stream_index ]; utf16_surrogate <<= 8; utf16_surrogate += utf16_stream[ *utf16_stream_index + 1 ]; } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_surrogate = utf16_stream[ *utf16_stream_index + 1 ]; utf16_surrogate <<= 8; utf16_surrogate += utf16_stream[ *utf16_stream_index ]; } *utf16_stream_index += 2; /* Determine if the UTF-16 character is within the low surrogate range */ if( ( utf16_surrogate >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( utf16_surrogate <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; *unicode_character <<= 10; *unicode_character += utf16_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END; *unicode_character += 0x010000; } else { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } } /* Determine if the Unicode character is valid */ else if( ( *unicode_character >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( *unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } return( 1 ); } /* Copies a Unicode character to an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_to_utf16_stream( libuna_unicode_character_t unicode_character, uint8_t *utf16_stream, size_t utf16_stream_size, size_t *utf16_stream_index, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_utf16_stream"; libuna_utf16_character_t utf16_surrogate = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream index.", function ); return( -1 ); } if( ( *utf16_stream_index + 1 ) >= utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 stream too small.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( unicode_character > LIBUNA_UTF16_CHARACTER_MAX ) ) { unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } if( unicode_character <= LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { if( byte_order == LIBUNA_ENDIAN_BIG ) { utf16_stream[ *utf16_stream_index + 1 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf16_stream[ *utf16_stream_index ] = (uint8_t) ( unicode_character & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_stream[ *utf16_stream_index ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf16_stream[ *utf16_stream_index + 1 ] = (uint8_t) ( unicode_character & 0xff ); } *utf16_stream_index += 2; } else { if( ( *utf16_stream_index + 3 ) >= utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 stream too small.", function ); return( -1 ); } unicode_character -= 0x010000; utf16_surrogate = (libuna_utf16_character_t) ( ( unicode_character >> 10 ) + LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ); if( byte_order == LIBUNA_ENDIAN_BIG ) { utf16_stream[ *utf16_stream_index + 1 ] = (uint8_t) ( utf16_surrogate & 0xff ); utf16_surrogate >>= 8; utf16_stream[ *utf16_stream_index ] = (uint8_t) ( utf16_surrogate & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_stream[ *utf16_stream_index ] = (uint8_t) ( utf16_surrogate & 0xff ); utf16_surrogate >>= 8; utf16_stream[ *utf16_stream_index + 1 ] = (uint8_t) ( utf16_surrogate & 0xff ); } *utf16_stream_index += 2; utf16_surrogate = (libuna_utf16_character_t) ( ( unicode_character & 0x03ff ) + LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ); if( byte_order == LIBUNA_ENDIAN_BIG ) { utf16_stream[ *utf16_stream_index + 1 ] = (uint8_t) ( utf16_surrogate & 0xff ); utf16_surrogate >>= 8; utf16_stream[ *utf16_stream_index ] = (uint8_t) ( utf16_surrogate & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_stream[ *utf16_stream_index ] = (uint8_t) ( utf16_surrogate & 0xff ); utf16_surrogate >>= 8; utf16_stream[ *utf16_stream_index + 1 ] = (uint8_t) ( utf16_surrogate & 0xff ); } *utf16_stream_index += 2; } return( 1 ); } /* Determines the size of an UTF-32 character from an Unicode character * Adds the size to the UTF-32 character size value * Returns 1 if successful or -1 on error */ int libuna_unicode_character_size_to_utf32( libuna_unicode_character_t unicode_character LIBUNA_ATTRIBUTE_UNUSED, size_t *utf32_character_size, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_size_to_utf32"; LIBUNA_UNREFERENCED_PARAMETER( unicode_character ) if( utf32_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 character size.", function ); return( -1 ); } *utf32_character_size += 1; return( 1 ); } /* Copies a Unicode character from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_from_utf32( libuna_unicode_character_t *unicode_character, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_utf32"; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( ( utf32_string[ *utf32_string_index ] >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( utf32_string[ *utf32_string_index ] <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } else { *unicode_character = utf32_string[ *utf32_string_index ]; } *utf32_string_index += 1; return( 1 ); } /* Copies a Unicode character into a UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_to_utf32( libuna_unicode_character_t unicode_character, libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_utf32"; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( unicode_character > LIBUNA_UTF32_CHARACTER_MAX ) ) { utf32_string[ *utf32_string_index ] = (libuna_utf32_character_t) LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } else { utf32_string[ *utf32_string_index ] = (libuna_utf32_character_t) unicode_character; } *utf32_string_index += 1; return( 1 ); } /* Copies a Unicode character from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_from_utf32_stream( libuna_unicode_character_t *unicode_character, const uint8_t *utf32_stream, size_t utf32_stream_size, size_t *utf32_stream_index, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_utf32_stream"; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream index.", function ); return( -1 ); } if( *utf32_stream_index >= utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 stream too small.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( byte_order == LIBUNA_ENDIAN_BIG ) { *unicode_character = utf32_stream[ *utf32_stream_index ]; *unicode_character <<= 8; *unicode_character += utf32_stream[ *utf32_stream_index + 1 ]; *unicode_character <<= 8; *unicode_character += utf32_stream[ *utf32_stream_index + 2 ]; *unicode_character <<= 8; *unicode_character += utf32_stream[ *utf32_stream_index + 3 ]; } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { *unicode_character = utf32_stream[ *utf32_stream_index + 3 ]; *unicode_character <<= 8; *unicode_character = utf32_stream[ *utf32_stream_index + 2 ]; *unicode_character <<= 8; *unicode_character = utf32_stream[ *utf32_stream_index + 1 ]; *unicode_character <<= 8; *unicode_character += utf32_stream[ *utf32_stream_index ]; } /* Determine if the Unicode character is valid */ if( ( *unicode_character >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( *unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } *utf32_stream_index += 4; return( 1 ); } /* Copies a Unicode character to an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_to_utf32_stream( libuna_unicode_character_t unicode_character, uint8_t *utf32_stream, size_t utf32_stream_size, size_t *utf32_stream_index, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_utf32_stream"; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream index.", function ); return( -1 ); } if( ( *utf32_stream_index + 1 ) >= utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 stream too small.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( unicode_character > LIBUNA_UTF32_CHARACTER_MAX ) ) { unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } if( byte_order == LIBUNA_ENDIAN_BIG ) { utf32_stream[ *utf32_stream_index + 3 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ *utf32_stream_index + 2 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ *utf32_stream_index + 1 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ *utf32_stream_index ] = (uint8_t) ( unicode_character & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf32_stream[ *utf32_stream_index ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ *utf32_stream_index + 1 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ *utf32_stream_index + 2 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ *utf32_stream_index + 3 ] = (uint8_t) ( unicode_character & 0xff ); } *utf32_stream_index += 4; return( 1 ); } libevt-20170120/libuna/libuna_utf8_string.c0000664000175000017500000022742613040331677022602 0ustar00lordyestalordyesta00000000000000/* * UTF-8 string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf8_string.h" /* Determines the size of an UTF-8 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, int codepage, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_byte_stream"; size_t byte_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; /* Check if the byte stream is terminated with a zero byte */ if( byte_stream[ byte_stream_size - 1 ] != 0 ) { *utf8_string_size += 1; } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_byte_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_byte_stream"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_byte_stream( utf8_string, utf8_string_size, &utf8_string_index, byte_stream, byte_stream_size, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_byte_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_byte_stream"; size_t byte_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } /* Check if the byte stream is terminated with zero bytes */ if( byte_stream[ byte_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; } return( 1 ); } /* Compares an UTF-8 string with a byte stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_byte_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_byte_stream"; size_t byte_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t byte_stream_unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } /* Check if the byte stream is terminated with zero bytes */ if( byte_stream[ byte_stream_size - 1 ] == 0 ) { byte_stream_size -= 1; } while( ( utf8_string_index < utf8_string_size ) && ( byte_stream_index < byte_stream_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &byte_stream_unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } if( utf8_unicode_character != byte_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( byte_stream_index != byte_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-8 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_utf7_stream( const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf7_stream"; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; /* Check if the UTF-7 stream is terminated with a zero byte */ if( utf7_stream[ utf7_stream_size - 1 ] != 0 ) { *utf8_string_size += 1; } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_utf7_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_utf7_stream"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_utf7_stream( utf8_string, utf8_string_size, &utf8_string_index, utf7_stream, utf7_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to UTF-7 stream to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_utf7_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf7_stream"; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; uint8_t zero_byte = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } /* Check if the UTF-7 stream is terminated with zero bytes */ if( utf7_stream[ utf7_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; } return( 1 ); } /* Compares an UTF-8 string with an UTF-7 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_utf7_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf7_stream"; size_t utf7_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t utf7_stream_unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } /* Check if the UTF-7 stream is terminated with zero bytes */ if( utf7_stream[ utf7_stream_size - 1 ] == 0 ) { utf7_stream_size -= 1; } while( ( utf8_string_index < utf8_string_size ) && ( utf7_stream_index < utf7_stream_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the UTF-7 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &utf7_stream_unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } if( utf8_unicode_character != utf7_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( utf7_stream_index != utf7_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-8 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_utf8_stream( const uint8_t *utf8_stream, size_t utf8_stream_size, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf8_stream"; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } /* Check if the UTF-8 stream is terminated with a zero byte */ if( utf8_stream[ utf8_stream_size - 1 ] != 0 ) { *utf8_string_size += 1; } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_utf8_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_utf8_stream"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_utf8_stream( utf8_string, utf8_string_size, &utf8_string_index, utf8_stream, utf8_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to UTF-8 stream to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_utf8_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf8_stream"; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } /* Check if the UTF-8 stream is terminated with zero bytes */ if( utf8_stream[ utf8_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; } return( 1 ); } /* Compares an UTF-8 string with an UTF-8 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_utf8_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf8_stream"; size_t utf8_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t utf8_stream_unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } /* Check if the UTF-8 stream is terminated with zero bytes */ if( utf8_stream[ utf8_stream_size - 1 ] == 0 ) { utf8_stream_size -= 1; } while( ( utf8_string_index < utf8_string_size ) && ( utf8_stream_index < utf8_stream_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_stream_unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } if( utf8_unicode_character != utf8_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( utf8_stream_index != utf8_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-8 string from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 string from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_utf16( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_utf16"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_utf16( utf8_string, utf8_string_size, &utf8_string_index, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_utf16( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Compares an UTF-8 string with an UTF-16 string * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_utf16( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf16"; size_t utf16_string_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t utf16_unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } while( ( utf8_string_index < utf8_string_size ) && ( utf16_string_index < utf16_string_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } if( utf8_unicode_character != utf16_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( utf16_string_index != utf16_string_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-8 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_utf16_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf16_stream"; size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; int read_byte_order = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0xfe ) && ( utf16_stream[ 1 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0xff ) && ( utf16_stream[ 1 ] == 0xfe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] != 0 ) || ( utf16_stream[ utf16_stream_size - 1 ] != 0 ) ) { *utf8_string_size += 1; } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } if( utf16_stream_index != utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_utf16_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_utf16_stream"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_utf16_stream( utf8_string, utf8_string_size, &utf8_string_index, utf16_stream, utf16_stream_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_utf16_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf16_stream"; size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; int read_byte_order = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0xfe ) && ( utf16_stream[ 1 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0xff ) && ( utf16_stream[ 1 ] == 0xfe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] != 0 ) || ( utf16_stream[ utf16_stream_size - 1 ] != 0 ) ) { zero_byte = 1; } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } if( utf16_stream_index != utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } if( zero_byte != 0 ) { if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; } return( 1 ); } /* Compares an UTF-8 string with an UTF-16 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_utf16_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf16_stream"; size_t utf16_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t utf16_stream_unicode_character = 0; int read_byte_order = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0xfe ) && ( utf16_stream[ 1 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0xff ) && ( utf16_stream[ 1 ] == 0xfe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] == 0 ) && ( utf16_stream[ utf16_stream_size - 1 ] == 0 ) ) { utf16_stream_size -= 2; } while( ( utf8_string_index < utf8_string_size ) && ( utf16_stream_index < utf16_stream_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &utf16_stream_unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } if( utf8_unicode_character != utf16_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( utf16_stream_index != utf16_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-8 string from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 string from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_utf32( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_utf32"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_utf32( utf8_string, utf8_string_size, &utf8_string_index, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 string to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_utf32( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Compares an UTF-8 string with an UTF-32 string * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_utf32( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf32"; size_t utf32_string_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t utf32_unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } if( utf32_string[ utf32_string_size - 1 ] == 0 ) { utf32_string_size -= 1; } while( ( utf8_string_index < utf8_string_size ) && ( utf32_string_index < utf32_string_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } if( utf8_unicode_character != utf32_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( utf32_string_index != utf32_string_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-8 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_utf32_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf32_stream"; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; int read_byte_order = 0; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 3 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 2 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 1 ] != 0 ) ) { *utf8_string_size += 1; } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } if( utf32_stream_index != utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_utf32_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_utf32_stream"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_utf32_stream( utf8_string, utf8_string_size, &utf8_string_index, utf32_stream, utf32_stream_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_utf32_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf32_stream"; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; int read_byte_order = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 3 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 2 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 1 ] != 0 ) ) { zero_byte = 1; } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } if( utf32_stream_index != utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } if( zero_byte != 0 ) { if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; } return( 1 ); } /* Compares an UTF-8 string with an UTF-32 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_utf32_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf32_stream"; size_t utf32_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t utf32_stream_unicode_character = 0; int read_byte_order = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 3 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 2 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 1 ] == 0 ) ) { utf32_stream_size -= 1; } while( ( utf8_string_index < utf8_string_size ) && ( utf32_stream_index < utf32_stream_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &utf32_stream_unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } if( utf8_unicode_character != utf32_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( utf32_stream_index != utf32_stream_size ) ) { return( 0 ); } return( 1 ); } libevt-20170120/libuna/libuna_base32_stream.c0000664000175000017500000017200513040331677022750 0ustar00lordyestalordyesta00000000000000/* * Base32 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libuna_base32_stream.h" #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" static uint8_t *libuna_base32_quintet_to_character_table = \ (uint8_t *) "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; static uint8_t *libuna_base32hex_quintet_to_character_table = \ (uint8_t *) "0123456789ABCDEFGHIJKLMNOPQRSTUV"; /* Copies a base32 character to a base32 quintet * Returns 1 if successful or -1 on error */ int libuna_base32_character_copy_to_quintet( uint8_t base32_character, uint8_t *base32_quintet, uint32_t base32_variant, libcerror_error_t **error ) { static char *function = "libuna_base32_character_copy_to_quintet"; if( base32_quintet == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 quintet.", function ); return( -1 ); } switch( base32_variant & 0x000f0000UL ) { case LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL: /* A-Z is not a continous range on 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' ) ) { *base32_quintet = base32_character - (uint8_t) 'A'; } else if( ( base32_character >= (uint8_t) 'J' ) && ( base32_character <= (uint8_t) 'R' ) ) { *base32_quintet = base32_character - (uint8_t) 'J' + 9; } else if( ( base32_character >= (uint8_t) 'S' ) && ( base32_character <= (uint8_t) 'Z' ) ) { *base32_quintet = base32_character - (uint8_t) 'S' + 18; } else if( ( base32_character >= (uint8_t) '2' ) && ( base32_character <= (uint8_t) '7' ) ) { *base32_quintet = base32_character - (uint8_t) '2' + 26; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base32 character: 0x%02" PRIx8 ".", function, base32_character ); return( -1 ); } break; case LIBUNA_BASE32_VARIANT_ALPHABET_HEX: if( ( base32_character >= (uint8_t) '0' ) && ( base32_character <= (uint8_t) '9' ) ) { *base32_quintet = base32_character - (uint8_t) '0'; } /* A-V is not a continous range on 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' ) ) { *base32_quintet = base32_character - (uint8_t) 'A' + 10; } else if( ( base32_character >= (uint8_t) 'J' ) && ( base32_character <= (uint8_t) 'R' ) ) { *base32_quintet = base32_character - (uint8_t) 'J' + 19; } else if( ( base32_character >= (uint8_t) 'S' ) && ( base32_character <= (uint8_t) 'V' ) ) { *base32_quintet = base32_character - (uint8_t) 'J' + 27; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base32 character: 0x%02" PRIx8 ".", function, base32_character ); return( -1 ); } break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } return( 1 ); } /* Copies a base32 quintuplet from a base32 stream * * The padding size will still be set to indicate the number of * quintets in the quintuplet * * Returns 1 if successful or -1 on error */ int libuna_base32_quintuplet_copy_from_base32_stream( uint64_t *base32_quintuplet, const uint8_t *base32_stream, size_t base32_stream_size, size_t *base32_stream_index, uint8_t *padding_size, uint32_t base32_variant, libcerror_error_t **error ) { static char *function = "libuna_base32_quintuplet_copy_from_base32_stream"; size_t base32_character_size = 0; size_t stream_index = 0; uint32_t base32_character1 = 0; uint32_t base32_character2 = 0; uint8_t padding_character = 0; uint8_t quintet1 = 0; uint8_t quintet2 = 0; uint8_t quintet3 = 0; uint8_t quintet4 = 0; uint8_t quintet5 = 0; uint8_t quintet6 = 0; uint8_t quintet7 = 0; uint8_t quintet8 = 0; if( base32_quintuplet == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 quintuplet.", function ); return( -1 ); } if( base32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream.", function ); return( -1 ); } if( base32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base32 stream size value exceeds maximum.", function ); return( -1 ); } if( base32_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream index.", function ); return( -1 ); } if( *base32_stream_index >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream string too small.", function ); return( -1 ); } if( padding_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid padding size.", function ); return( -1 ); } switch( base32_variant & 0x0f000000UL ) { case LIBUNA_BASE32_VARIANT_PADDING_NONE: padding_character = 0; break; case LIBUNA_BASE32_VARIANT_PADDING_OPTIONAL: padding_character = (uint8_t) '='; break; case LIBUNA_BASE32_VARIANT_PADDING_REQUIRED: padding_character = (uint8_t) '='; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character_size = 1; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base32_character_size = 2; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base32_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } stream_index = *base32_stream_index; if( ( stream_index + base32_character_size ) > base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 1st base32 character.", function ); return( -1 ); } switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; } stream_index += base32_character_size; if( ( base32_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st base32 character.", function ); return( -1 ); } if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet1, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base32 character to 1st quintet.", function ); return( -1 ); } if( ( stream_index + base32_character_size ) > base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 2nd base32 character.", function ); return( -1 ); } switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; } stream_index += base32_character_size; if( ( base32_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd base32 character.", function ); return( -1 ); } if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet2, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base32 character to 2nd quintet.", function ); return( -1 ); } *padding_size = 6; if( ( stream_index + ( 2 * base32_character_size ) ) <= base32_stream_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ stream_index ]; base32_character2 = base32_stream[ stream_index + 1 ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index + 4 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index + 4 ] ), base32_character2 ); break; } stream_index += 2 * base32_character_size; if( ( base32_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd base32 character.", function ); return( -1 ); } if( ( base32_character2 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base32 character.", function ); return( -1 ); } if( ( padding_character != 0 ) && ( ( base32_character1 == (uint32_t) padding_character ) || ( base32_character2 == (uint32_t) padding_character ) ) ) { if( base32_character1 != (uint32_t) padding_character ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd base32 character.", function ); return( -1 ); } if( base32_character2 != (uint32_t) padding_character ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base32 character.", function ); return( -1 ); } quintet3 = 0; quintet4 = 0; } else if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet3, base32_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd base32 quintet.", function ); return( -1 ); } libcerror_error_free( error ); } else if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character2, &quintet4, base32_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base32 quintet.", function ); return( -1 ); } libcerror_error_free( error ); } else { *padding_size -= 2; } } else if( padding_character != 0 ) { if( ( stream_index + base32_character_size ) > base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 3rd base32 character.", function ); return( -1 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 4th base32 character.", function ); return( -1 ); } } if( ( stream_index + base32_character_size ) <= base32_stream_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; } stream_index += base32_character_size; if( ( base32_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 5th base32 character.", function ); return( -1 ); } if( ( padding_character != 0 ) && ( base32_character1 == (uint32_t) padding_character ) ) { quintet5 = 0; } else if( *padding_size > 4 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 5th base32 quintet.", function ); return( -1 ); } } else if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet5, base32_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 5th base32 quintet.", function ); return( -1 ); } libcerror_error_free( error ); } else { *padding_size -= 1; } } else if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 5th base32 character.", function ); return( -1 ); } if( ( stream_index + ( 2 * base32_character_size ) ) <= base32_stream_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ stream_index ]; base32_character2 = base32_stream[ stream_index + 1 ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index + 4 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index + 4 ] ), base32_character2 ); break; } stream_index += 2 * base32_character_size; if( ( base32_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 6th base32 character.", function ); return( -1 ); } if( ( base32_character2 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 7th base32 character.", function ); return( -1 ); } if( ( padding_character != 0 ) && ( ( base32_character1 == (uint32_t) padding_character ) || ( base32_character2 == (uint32_t) padding_character ) ) ) { if( base32_character1 != (uint32_t) padding_character ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 6th base32 quintet.", function ); return( -1 ); } if( base32_character2 != (uint32_t) padding_character ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 7th base32 quintet.", function ); return( -1 ); } quintet6 = 0; quintet7 = 0; } else if( *padding_size > 3 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 6th and 7th base32 quintet.", function ); return( -1 ); } } else if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet6, base32_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 6th base32 quintet.", function ); return( -1 ); } libcerror_error_free( error ); } else if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character2, &quintet7, base32_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 7th base32 quintet.", function ); return( -1 ); } libcerror_error_free( error ); } else { *padding_size -= 2; } } else if( padding_character != 0 ) { if( ( stream_index + base32_character_size ) > base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 6th base32 character.", function ); return( -1 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 7th base32 character.", function ); return( -1 ); } } if( ( stream_index + base32_character_size ) <= base32_stream_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; } stream_index += base32_character_size; if( ( base32_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 8th base32 character.", function ); return( -1 ); } if( ( padding_character != 0 ) && ( base32_character1 == (uint32_t) padding_character ) ) { quintet8 = 0; } else if( *padding_size > 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 8th base32 quintet.", function ); return( -1 ); } } else if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet8, base32_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 8th base32 quintet.", function ); return( -1 ); } libcerror_error_free( error ); } else { *padding_size -= 1; } } else if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 8th base32 character.", function ); return( -1 ); } *base32_quintuplet = quintet1; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet2; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet3; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet4; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet5; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet6; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet7; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet8; *base32_stream_index = stream_index; return( 1 ); } /* Copies a base32 quintuplet to a base32 stream * Returns 1 if successful or -1 on error */ int libuna_base32_quintuplet_copy_to_base32_stream( uint64_t base32_quintuplet, uint8_t *base32_stream, size_t base32_stream_size, size_t *base32_stream_index, uint8_t padding_size, uint32_t base32_variant, libcerror_error_t **error ) { uint8_t *quintet_to_character_table = NULL; static char *function = "libuna_base32_quintuplet_copy_to_base32_stream"; uint8_t padding_character = 0; uint8_t quintet1 = 0; uint8_t quintet2 = 0; uint8_t quintet3 = 0; uint8_t quintet4 = 0; uint8_t quintet5 = 0; uint8_t quintet6 = 0; uint8_t quintet7 = 0; uint8_t quintet8 = 0; if( base32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream.", function ); return( -1 ); } if( base32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base32 stream size value exceeds maximum.", function ); return( -1 ); } if( base32_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream index.", function ); return( -1 ); } if( *base32_stream_index >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream string too small.", function ); return( -1 ); } if( padding_size > 6 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid padding size value out of bounds.", function ); return( -1 ); } switch( base32_variant & 0x000f0000UL ) { case LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL: quintet_to_character_table = libuna_base32_quintet_to_character_table; break; case LIBUNA_BASE32_VARIANT_ALPHABET_HEX: quintet_to_character_table = libuna_base32hex_quintet_to_character_table; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } switch( base32_variant & 0x0f000000UL ) { case LIBUNA_BASE32_VARIANT_PADDING_NONE: case LIBUNA_BASE32_VARIANT_PADDING_OPTIONAL: padding_character = 0; break; case LIBUNA_BASE32_VARIANT_PADDING_REQUIRED: padding_character = (uint8_t) '='; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } /* TODO encoding support */ /* Separate the 3 bytes value into 8 x 5 bit values */ quintet8 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet7 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet6 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet5 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet4 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet3 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet2 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet1 = (uint8_t) ( base32_quintuplet & 0x1f ); /* Spread the encoding over 2 characters if 1 byte is available */ if( ( *base32_stream_index + 1 ) >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small.", function ); return( -1 ); } base32_stream[ *base32_stream_index ] = quintet_to_character_table[ quintet1 ]; base32_stream[ *base32_stream_index + 1 ] = quintet_to_character_table[ quintet2 ]; *base32_stream_index += 2; /* Spread the encoding over 4 characters if 2 bytes are available * Otherwise pad the remaining bytes if required */ if( ( *base32_stream_index + 1 ) >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small.", function ); return( -1 ); } if( padding_size < 6 ) { base32_stream[ *base32_stream_index ] = quintet_to_character_table[ quintet3 ]; base32_stream[ *base32_stream_index + 1 ] = quintet_to_character_table[ quintet4 ]; *base32_stream_index += 2; } else if( padding_character != 0 ) { base32_stream[ *base32_stream_index ] = padding_character; base32_stream[ *base32_stream_index + 1 ] = padding_character; *base32_stream_index += 2; } /* Spread the encoding over 5 characters if 3 bytes are available * Otherwise pad the remaining bytes if required */ if( *base32_stream_index >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small.", function ); return( -1 ); } if( padding_size < 4 ) { base32_stream[ *base32_stream_index ] = quintet_to_character_table[ quintet5 ]; *base32_stream_index += 1; } else if( padding_character != 0 ) { base32_stream[ *base32_stream_index ] = padding_character; *base32_stream_index += 1; } /* Spread the encoding over 7 characters if 4 bytes are available * Otherwise pad the remaining bytes if required */ if( ( *base32_stream_index + 1 ) >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small.", function ); return( -1 ); } if( padding_size < 3 ) { base32_stream[ *base32_stream_index ] = quintet_to_character_table[ quintet6 ]; base32_stream[ *base32_stream_index + 1 ] = quintet_to_character_table[ quintet7 ]; *base32_stream_index += 2; } else if( padding_character != 0 ) { base32_stream[ *base32_stream_index ] = padding_character; base32_stream[ *base32_stream_index + 1 ] = padding_character; *base32_stream_index += 2; } /* Spread the encoding over 8 characters if 5 bytes are available * Otherwise pad the remaining bytes if required */ if( *base32_stream_index >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small.", function ); return( -1 ); } if( padding_size < 1 ) { base32_stream[ *base32_stream_index ] = quintet_to_character_table[ quintet8 ]; *base32_stream_index += 1; } else if( padding_character != 0 ) { base32_stream[ *base32_stream_index ] = padding_character; *base32_stream_index += 1; } return( 1 ); } /* Copies a base32 quintuplet from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base32_quintuplet_copy_from_byte_stream( uint64_t *base32_quintuplet, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, uint8_t *padding_size, libcerror_error_t **error ) { static char *function = "libuna_base32_quintuplet_copy_from_byte_stream"; if( base32_quintuplet == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 quintuplet.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } /* Determine the value of 5 bytes (40 bits) */ *base32_quintuplet = (uint64_t) byte_stream[ *byte_stream_index ] << 32; *byte_stream_index += 1; *padding_size = 6; if( *byte_stream_index < byte_stream_size ) { *base32_quintuplet |= (uint64_t) byte_stream[ *byte_stream_index ] << 24; *byte_stream_index += 1; *padding_size -= 2; } if( *byte_stream_index < byte_stream_size ) { *base32_quintuplet |= (uint64_t) byte_stream[ *byte_stream_index ] << 16; *byte_stream_index += 1; *padding_size -= 1; } if( *byte_stream_index < byte_stream_size ) { *base32_quintuplet |= (uint64_t) byte_stream[ *byte_stream_index ] << 8; *byte_stream_index += 1; *padding_size -= 2; } if( *byte_stream_index < byte_stream_size ) { *base32_quintuplet |= (uint64_t) byte_stream[ *byte_stream_index ]; *byte_stream_index += 1; *padding_size -= 1; } return( 1 ); } /* Copies a base32 quintuplet to a byte stream * Returns 1 if successful or -1 on error */ int libuna_base32_quintuplet_copy_to_byte_stream( uint64_t base32_quintuplet, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, uint8_t padding_size, libcerror_error_t **error ) { static char *function = "libuna_base32_quintuplet_copy_to_byte_stream"; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } if( padding_size > 6 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid padding size value out of bounds.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( ( base32_quintuplet >> 32 ) & 0xff ); *byte_stream_index += 1; if( padding_size <= 4 ) { if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( ( base32_quintuplet >> 24 ) & 0xff ); *byte_stream_index += 1; } if( padding_size <= 3 ) { if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( ( base32_quintuplet >> 16 ) & 0xff ); *byte_stream_index += 1; } if( padding_size <= 2 ) { if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( ( base32_quintuplet >> 8 ) & 0xff ); *byte_stream_index += 1; } if( padding_size == 0 ) { if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream is too small.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( base32_quintuplet & 0xff ); *byte_stream_index += 1; } return( 1 ); } /* Determines the size of a byte stream from a base32 stream * * LIBUNA_BASE32_FLAG_STRIP_WHITESPACE removes leading space and tab characters, * and trailing space, tab and end of line characters * * Returns 1 if successful or -1 on error */ int libuna_base32_stream_size_to_byte_stream( const uint8_t *base32_stream, size_t base32_stream_size, size_t *byte_stream_size, uint32_t base32_variant, uint8_t flags, libcerror_error_t **error ) { static char *function = "libuna_base32_stream_size_to_byte_stream"; size_t base32_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint8_t character_limit = 0; uint8_t padding_size = 0; uint8_t strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; if( base32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream.", function ); return( -1 ); } if( ( base32_stream_size == 0 ) || ( base32_stream_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid base32 stream size value out of bounds.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } switch( base32_variant & 0x000000ffUL ) { case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } switch( base32_variant & 0x000f0000UL ) { case LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL: break; case LIBUNA_BASE32_VARIANT_ALPHABET_HEX: break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } if( ( flags & ~( LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } base32_stream_index = base32_stream_size - 1; whitespace_size = 0; while( base32_stream_index > 0 ) { if( ( base32_stream[ base32_stream_index ] == (uint8_t) '\n' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\r' ) ) { whitespace_size++; } else if( ( base32_stream[ base32_stream_index ] == (uint8_t) ' ' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\t' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\v' ) ) { if( ( flags & LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) != 0 ) { whitespace_size++; } else { break; } } else { break; } base32_stream_index--; } base32_stream_size -= whitespace_size; if( base32_stream[ base32_stream_size - 1 ] == (uint8_t) '=' ) { padding_size += 1; } if( base32_stream[ base32_stream_size - 2 ] == (uint8_t) '=' ) { padding_size += 1; } if( base32_stream[ base32_stream_size - 3 ] == (uint8_t) '=' ) { padding_size += 1; } if( base32_stream[ base32_stream_size - 4 ] == (uint8_t) '=' ) { padding_size += 1; } if( base32_stream[ base32_stream_size - 5 ] == (uint8_t) '=' ) { padding_size += 1; } if( base32_stream[ base32_stream_size - 6 ] == (uint8_t) '=' ) { padding_size += 1; } if( base32_stream[ base32_stream_size - 7 ] == (uint8_t) '=' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid number of padding bytes.", function ); return( -1 ); } base32_stream_index = 0; whitespace_size = 0; while( base32_stream_index < base32_stream_size ) { if( ( base32_stream[ base32_stream_index ] == (uint8_t) '\n' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\r' ) ) { if( ( strip_mode != LIBUNA_STRIP_MODE_NON_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { if( base32_stream_index < base32_stream_size ) { if( ( base32_stream[ base32_stream_index + 1 ] == (uint8_t) '\n' ) || ( base32_stream[ base32_stream_index + 1 ] == (uint8_t) '\r' ) ) { base32_stream_index++; whitespace_size++; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; } if( character_limit != 0 ) { if( number_of_characters != (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } whitespace_size++; } else if( ( base32_stream[ base32_stream_index ] == (uint8_t) ' ' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\t' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\v' ) ) { if( ( flags & LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) != 0 ) { if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_TRAILING_WHITESPACE; } if( ( strip_mode != LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { whitespace_size++; } } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else if( strip_mode == LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } else if( strip_mode == LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { switch( base32_variant & 0x000f0000UL ) { case LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL: /* A-Z is not a continous range on an EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( base32_stream[ base32_stream_index ] >= (uint8_t) 'A' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) 'I' ) ) { number_of_characters++; } else if( ( base32_stream[ base32_stream_index ] >= (uint8_t) 'J' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) 'R' ) ) { number_of_characters++; } else if( ( base32_stream[ base32_stream_index ] >= (uint8_t) 'S' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) 'Z' ) ) { number_of_characters++; } else if( ( base32_stream[ base32_stream_index ] >= (uint8_t) '2' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) '7' ) ) { number_of_characters++; } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } break; case LIBUNA_BASE32_VARIANT_ALPHABET_HEX: if( ( base32_stream[ base32_stream_index ] >= (uint8_t) '0' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) '9' ) ) { number_of_characters++; } /* A-V is not a continous range on an EBCDIC based system * it consists of the ranges: A-I, J-R, S-V */ else if( ( base32_stream[ base32_stream_index ] >= (uint8_t) 'A' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) 'I' ) ) { number_of_characters++; } else if( ( base32_stream[ base32_stream_index ] >= (uint8_t) 'J' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) 'R' ) ) { number_of_characters++; } else if( ( base32_stream[ base32_stream_index ] >= (uint8_t) 'S' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) 'V' ) ) { number_of_characters++; } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } break; default: strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid character in base32 stream at index: %d.", function, base32_stream_index ); return( -1 ); } base32_stream_index++; } if( character_limit != 0 ) { if( number_of_characters > (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in last line exceed maximum.", function ); return( -1 ); } } base32_stream_size -= whitespace_size; /* Make sure the byte stream is able to hold * at least 5 bytes for each 8 base32 characters */ *byte_stream_size = base32_stream_size / 8; if( ( base32_stream_size % 8 ) != 0 ) { *byte_stream_size += 1; } *byte_stream_size *= 5; return( 1 ); } /* Copies a byte stream from a base32 stream * * LIBUNA_BASE32_FLAG_STRIP_WHITESPACE removes leading space and tab characters, * and trailing space, tab and end of line characters * * Returns 1 if successful or -1 on error */ int libuna_base32_stream_copy_to_byte_stream( const uint8_t *base32_stream, size_t base32_stream_size, uint8_t *byte_stream, size_t byte_stream_size, uint32_t base32_variant, uint8_t flags, libcerror_error_t **error ) { static char *function = "libuna_base32_stream_copy_to_byte_stream"; size_t base32_stream_index = 0; size_t byte_stream_index = 0; size_t number_of_characters = 0; uint64_t base32_quintuplet = 0; uint8_t character_limit = 0; uint8_t padding_size = 0; uint8_t strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; if( base32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream.", function ); return( -1 ); } if( base32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base32 stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } switch( base32_variant & 0x000000ffUL ) { case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } if( ( flags & ~( LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } if( ( flags & LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) == 0 ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } while( base32_stream_index < base32_stream_size ) { if( ( base32_stream[ base32_stream_index ] == (uint8_t) '\n' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\r' ) ) { if( ( strip_mode != LIBUNA_STRIP_MODE_NON_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { if( base32_stream_index < base32_stream_size ) { if( ( base32_stream[ base32_stream_index + 1 ] == (uint8_t) '\n' ) || ( base32_stream[ base32_stream_index + 1 ] == (uint8_t) '\r' ) ) { base32_stream_index++; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; base32_stream_index++; } if( character_limit != 0 ) { if( number_of_characters != (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } } else if( ( base32_stream[ base32_stream_index ] == (uint8_t) ' ' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\t' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\v' ) ) { if( ( flags & LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) != 0 ) { if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_TRAILING_WHITESPACE; } if( ( strip_mode != LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } base32_stream_index++; } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else if( strip_mode == LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } else if( strip_mode == LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid character in base32 stream at index: %d.", function, base32_stream_index ); return( -1 ); } if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { if( padding_size > 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st base32 quintet.", function ); return( -1 ); } /* Convert the base32 stream into a base32 quintuplet */ if( libuna_base32_quintuplet_copy_from_base32_stream( &base32_quintuplet, base32_stream, base32_stream_size, &base32_stream_index, &padding_size, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base32 quintuplet from base32 stream.", function ); return( -1 ); } /* Convert the base32 quintuplet into a byte stream */ if( libuna_base32_quintuplet_copy_to_byte_stream( base32_quintuplet, byte_stream, byte_stream_size, &byte_stream_index, padding_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base32 quintuplet to byte stream.", function ); return( -1 ); } number_of_characters += 8 - padding_size; } } if( character_limit != 0 ) { if( number_of_characters > (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in last line exceed maximum.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of a base32 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base32_stream_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, size_t *base32_stream_size, uint32_t base32_variant, libcerror_error_t **error ) { static char *function = "libuna_base32_stream_size_from_byte_stream"; size_t whitespace_size = 0; uint8_t character_limit = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( base32_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream size.", function ); return( -1 ); } switch( base32_variant & 0x000000ffUL ) { case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } /* Make sure the base32 stream is able to hold * at least 8 base32 characters for each 5 bytes */ *base32_stream_size = byte_stream_size / 5; if( ( byte_stream_size % 5 ) != 0 ) { *base32_stream_size += 1; } *base32_stream_size *= 8; if( character_limit != 0 ) { whitespace_size = *base32_stream_size / character_limit; if( ( *base32_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } *base32_stream_size += whitespace_size; } return( 1 ); } /* Copies a base32 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base32_stream_copy_from_byte_stream( uint8_t *base32_stream, size_t base32_stream_size, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base32_variant, libcerror_error_t **error ) { static char *function = "libuna_base32_stream_copy_from_byte_stream"; size_t base32_stream_index = 0; if( libuna_base32_stream_with_index_copy_from_byte_stream( base32_stream, base32_stream_size, &base32_stream_index, byte_stream, byte_stream_size, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base32 stream from byte stream.", function ); return( -1 ); } return( 1 ); } /* Copies a base32 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base32_stream_with_index_copy_from_byte_stream( uint8_t *base32_stream, size_t base32_stream_size, size_t *base32_stream_index, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base32_variant, libcerror_error_t **error ) { static char *function = "libuna_base32_stream_with_index_copy_from_byte_stream"; size_t calculated_base32_stream_size = 0; size_t stream_index = 0; size_t byte_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint64_t base32_quintuplet = 0; uint8_t character_limit = 0; uint8_t padding_size = 0; if( base32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream.", function ); return( -1 ); } if( base32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base32 stream size value exceeds maximum.", function ); return( -1 ); } if( base32_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream index.", function ); return( -1 ); } if( *base32_stream_index >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream string too small.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } switch( base32_variant & 0x000000ffUL ) { case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } stream_index = *base32_stream_index; /* Make sure the base32 stream is able to hold * at least 8 base32 characters for each 5 bytes */ calculated_base32_stream_size = byte_stream_size / 5; if( ( byte_stream_size % 5 ) != 0 ) { calculated_base32_stream_size += 1; } calculated_base32_stream_size *= 8; if( character_limit != 0 ) { whitespace_size = calculated_base32_stream_size / character_limit; if( ( calculated_base32_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } calculated_base32_stream_size += whitespace_size; } if( base32_stream_size < calculated_base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small.", function ); return( -1 ); } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream into a base32 quintuplet */ if( libuna_base32_quintuplet_copy_from_byte_stream( &base32_quintuplet, byte_stream, byte_stream_size, &byte_stream_index, &padding_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base32 quintuplet from byte stream.", function ); return( -1 ); } /* Convert the base32 quintuplet into a base32 stream */ if( libuna_base32_quintuplet_copy_to_base32_stream( base32_quintuplet, base32_stream, base32_stream_size, &stream_index, padding_size, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base32 quintuplet to base32 stream.", function ); return( -1 ); } if( character_limit != 0 ) { number_of_characters += 8; if( number_of_characters >= (size_t) character_limit ) { base32_stream[ stream_index++ ] = (uint8_t) '\n'; number_of_characters = 0; } } } if( character_limit != 0 ) { if( number_of_characters != 0 ) { base32_stream[ stream_index++ ] = (uint8_t) '\n'; } } *base32_stream_index = stream_index; return( 1 ); } libevt-20170120/libuna/libuna_codepage_windows_950.h0000664000175000017500000000356413040331677024244 0ustar00lordyestalordyesta00000000000000/* * Windows 950 codepage (Traditional Chinese) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_950_H ) #define _LIBUNA_CODEPAGE_WINDOWS_950_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_codepage_windows_950_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_codepage_windows_950_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ); LIBUNA_EXTERN \ 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 ) */ libevt-20170120/libuna/libuna_error.h0000664000175000017500000000332713040331677021454 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_INTERNAL_ERROR_H ) #define _LIBUNA_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBUNA ) #include #endif #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBUNA ) LIBUNA_EXTERN \ void libuna_error_free( libuna_error_t **error ); LIBUNA_EXTERN \ int libuna_error_fprint( libuna_error_t *error, FILE *stream ); LIBUNA_EXTERN \ int libuna_error_sprint( libuna_error_t *error, char *string, size_t size ); LIBUNA_EXTERN \ int libuna_error_backtrace_fprint( libuna_error_t *error, FILE *stream ); LIBUNA_EXTERN \ int libuna_error_backtrace_sprint( libuna_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_INTERNAL_ERROR_H ) */ libevt-20170120/libuna/libuna_codepage_windows_932.h0000664000175000017500000000356313040331677024243 0ustar00lordyestalordyesta00000000000000/* * Windows 932 codepage (Japanese Shift-JIS) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_932_H ) #define _LIBUNA_CODEPAGE_WINDOWS_932_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_codepage_windows_932_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_codepage_windows_932_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ); LIBUNA_EXTERN \ 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 ) */ libevt-20170120/libuna/libuna_utf8_stream.c0000664000175000017500000003716413040331677022565 0ustar00lordyestalordyesta00000000000000/* * UTF-8 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libuna_definitions.h" #include "libuna_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"; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream size.", function ); return( -1 ); } /* Add the byte order mark * Assumes the UTF-8 string is santized */ *utf8_stream_size = 3 + utf8_string_size; return( 1 ); } /* Copies an UTF-8 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf8_stream_copy_from_utf8( uint8_t *utf8_stream, size_t utf8_stream_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_stream_copy_from_utf8"; size_t utf8_stream_index = 0; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 stream is too small.", function ); return( -1 ); } if( libuna_utf8_stream_copy_byte_order_mark( utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-8 byte order mark.", function ); return( -1 ); } /* Assumes the UTF-8 string is santized */ if( memory_copy( &utf8_stream[ utf8_stream_index ], utf8_string, utf8_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: unable to copy UTF-8 string to stream.", function ); return( -1 ); } return( 1 ); } /* Determines the size of an UTF-8 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf8_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_stream_size_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream size.", function ); return( -1 ); } /* Add the byte order mark */ *utf8_stream_size = 3; while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf8_stream_copy_from_utf16( uint8_t *utf8_stream, size_t utf8_stream_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_stream_copy_from_utf16"; size_t utf16_string_index = 0; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf8_stream_copy_byte_order_mark( utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-8 byte order mark.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 stream bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8 stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-8 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf8_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_stream_size_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream size.", function ); return( -1 ); } /* Add the byte order mark */ *utf8_stream_size = 3; while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf8_stream_copy_from_utf32( uint8_t *utf8_stream, size_t utf8_stream_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_stream_copy_from_utf32"; size_t utf32_string_index = 0; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf8_stream_copy_byte_order_mark( utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-8 byte order mark.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8 stream.", function ); return( -1 ); } } return( 1 ); } libevt-20170120/libuna/libuna_codepage_koi8_r.h0000664000175000017500000000250613040331677023343 0ustar00lordyestalordyesta00000000000000/* * KOI8-R codepage (Russian Cyrillic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_KOI8_R_H ) #define _LIBUNA_CODEPAGE_KOI8_R_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_koi8_r_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x0410[ 64 ]; extern const uint8_t libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x2550[ 32 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_KOI8_R_H ) */ libevt-20170120/libuna/libuna_base16_stream.c0000664000175000017500000012364613040331677022761 0ustar00lordyestalordyesta00000000000000/* * Base16 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libuna_base16_stream.h" #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Determines the size of a byte stream from a base16 stream * * LIBUNA_BASE16_FLAG_STRIP_WHITESPACE removes leading space and tab characters, * and trailing space, tab and end of line characters * * Returns 1 if successful or -1 on error */ int libuna_base16_stream_size_to_byte_stream( const uint8_t *base16_stream, size_t base16_stream_size, size_t *byte_stream_size, uint32_t base16_variant, uint8_t flags, libcerror_error_t **error ) { static char *function = "libuna_base16_stream_size_to_byte_stream"; size_t base16_character_size = 0; size_t base16_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint32_t base16_character1 = 0; uint32_t base16_character2 = 0; uint8_t character_case = 0; uint8_t character_limit = 0; uint8_t strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; if( base16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base16 stream.", function ); return( -1 ); } if( ( base16_stream_size == 0 ) || ( base16_stream_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid base16 stream size value out of bounds.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } switch( base16_variant & 0x000000ffUL ) { case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0x000f0000UL ) { case LIBUNA_BASE16_VARIANT_CASE_LOWER: character_case = LIBUNA_CASE_LOWER; break; case LIBUNA_BASE16_VARIANT_CASE_MIXED: character_case = LIBUNA_CASE_MIXED; break; case LIBUNA_BASE16_VARIANT_CASE_UPPER: character_case = LIBUNA_CASE_UPPER; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character_size = 1; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base16_character_size = 2; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base16_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } if( base16_stream_size < base16_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base16 stream value too small.", function ); return( -1 ); } if( ( flags & ~( LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } base16_stream_index = base16_stream_size - base16_character_size; whitespace_size = 0; while( base16_stream_index > base16_character_size ) { switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character1 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; } if( ( base16_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", function, base16_stream_index ); return( -1 ); } base16_stream_index -= base16_character_size; if( ( base16_character1 == (uint32_t) '\n' ) || ( base16_character1 == (uint32_t) '\r' ) ) { whitespace_size += base16_character_size; } else if( ( flags & LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) == 0 ) { break; } else if( ( base16_character1 == (uint32_t) ' ' ) || ( base16_character1 == (uint32_t) '\t' ) || ( base16_character1 == (uint32_t) '\v' ) ) { whitespace_size += base16_character_size; } else { break; } } base16_stream_size -= whitespace_size; if( base16_stream_size < base16_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base16 stream value too small.", function ); return( -1 ); } base16_stream_index = 0; whitespace_size = 0; while( base16_stream_index < base16_stream_size ) { switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character1 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; } if( ( base16_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", function, base16_stream_index ); return( -1 ); } base16_stream_index += base16_character_size; if( ( base16_character1 == (uint32_t) '\n' ) || ( base16_character1 == (uint32_t) '\r' ) ) { if( ( strip_mode != LIBUNA_STRIP_MODE_NON_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { if( ( base16_stream_index + base16_character_size ) < base16_stream_size ) { switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character2 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; } if( ( base16_character2 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", function, base16_stream_index ); return( -1 ); } if( ( base16_character2 == (uint32_t) '\n' ) || ( base16_character2 == (uint32_t) '\r' ) ) { base16_stream_index += base16_character_size; whitespace_size += base16_character_size; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; } if( character_limit != 0 ) { if( number_of_characters != (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } whitespace_size += base16_character_size; } else if( ( base16_character1 == (uint32_t) ' ' ) || ( base16_character1 == (uint32_t) '\t' ) || ( base16_character1 == (uint32_t) '\v' ) ) { if( ( flags & LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) != 0 ) { if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_TRAILING_WHITESPACE; } if( ( strip_mode != LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { whitespace_size += base16_character_size; } } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else if( strip_mode == LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } else if( strip_mode == LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { if( ( base16_character1 >= (uint32_t) 'A' ) && ( base16_character1 <= (uint32_t) 'F' ) ) { if( ( character_case != LIBUNA_CASE_MIXED ) && ( character_case != LIBUNA_CASE_UPPER ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } number_of_characters++; } else if( ( base16_character1 >= (uint32_t) 'a' ) && ( base16_character1 <= (uint32_t) 'f' ) ) { if( ( character_case != LIBUNA_CASE_MIXED ) && ( character_case != LIBUNA_CASE_LOWER ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } number_of_characters++; } else if( ( base16_character1 >= (uint32_t) '0' ) && ( base16_character1 <= (uint32_t) '9' ) ) { number_of_characters++; } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid character in base16 stream at index: %" PRIzd ".", function, base16_stream_index - base16_character_size ); return( -1 ); } } if( character_limit != 0 ) { if( number_of_characters > (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in last line exceed maximum.", function ); return( -1 ); } } base16_stream_size -= whitespace_size; /* Make sure the byte stream is able to hold * at least 1 byte for each 2 base16 characters */ base16_character_size *= 2; if( ( base16_stream_size % base16_character_size ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid base16 stream size.", function ); return( -1 ); } base16_stream_size /= base16_character_size; *byte_stream_size = base16_stream_size; return( 1 ); } /* Copies a byte stream from a base16 stream * * LIBUNA_BASE16_FLAG_STRIP_WHITESPACE removes leading space and tab characters, * and trailing space, tab and end of line characters * * Returns 1 if successful or -1 on error */ int libuna_base16_stream_copy_to_byte_stream( const uint8_t *base16_stream, size_t base16_stream_size, uint8_t *byte_stream, size_t byte_stream_size, uint32_t base16_variant, uint8_t flags, libcerror_error_t **error ) { static char *function = "libuna_base16_stream_copy_to_byte_stream"; size_t base16_character_size = 0; size_t base16_stream_index = 0; size_t byte_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint32_t base16_character1 = 0; uint32_t base16_character2 = 0; uint8_t byte_value = 0; uint8_t character_case = 0; uint8_t character_limit = 0; uint8_t strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; if( base16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base16 stream.", function ); return( -1 ); } if( base16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base16 stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } switch( base16_variant & 0x000000ffUL ) { case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0x000f0000UL ) { case LIBUNA_BASE16_VARIANT_CASE_LOWER: character_case = LIBUNA_CASE_LOWER; break; case LIBUNA_BASE16_VARIANT_CASE_MIXED: character_case = LIBUNA_CASE_MIXED; break; case LIBUNA_BASE16_VARIANT_CASE_UPPER: character_case = LIBUNA_CASE_UPPER; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character_size = 1; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base16_character_size = 2; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base16_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } if( base16_stream_size < base16_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base16 stream value too small.", function ); return( -1 ); } if( ( flags & ~( LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } if( ( flags & LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) == 0 ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } base16_stream_index = base16_stream_size - base16_character_size; whitespace_size = 0; while( base16_stream_index > base16_character_size ) { switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character1 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; } if( ( base16_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", function, base16_stream_index ); return( -1 ); } base16_stream_index -= base16_character_size; if( ( base16_character1 == (uint32_t) '\n' ) || ( base16_character1 == (uint32_t) '\r' ) ) { whitespace_size += base16_character_size; } else if( ( flags & LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) == 0 ) { break; } else if( ( base16_character1 == (uint32_t) ' ' ) || ( base16_character1 == (uint32_t) '\t' ) || ( base16_character1 == (uint32_t) '\v' ) ) { whitespace_size += base16_character_size; } else { break; } } base16_stream_size -= whitespace_size; if( base16_stream_size < base16_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base16 stream value too small.", function ); return( -1 ); } base16_stream_index = 0; while( base16_stream_index < base16_stream_size ) { switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character1 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; } if( ( base16_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", base16_stream_index, function ); return( -1 ); } base16_stream_index += base16_character_size; if( ( base16_character1 == (uint32_t) '\n' ) || ( base16_character1 == (uint32_t) '\r' ) ) { if( ( strip_mode != LIBUNA_STRIP_MODE_NON_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { if( ( base16_stream_index + base16_character_size ) < base16_stream_size ) { switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character2 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; } if( ( base16_character2 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", function, base16_stream_index ); return( -1 ); } if( ( base16_character2 == (uint32_t) '\n' ) || ( base16_character2 == (uint32_t) '\r' ) ) { base16_stream_index += base16_character_size; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; } if( character_limit != 0 ) { if( number_of_characters != (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } } else if( ( base16_character1 == (uint32_t) ' ' ) || ( base16_character1 == (uint32_t) '\t' ) || ( base16_character1 == (uint32_t) '\v' ) ) { if( ( flags & LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) != 0 ) { if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_TRAILING_WHITESPACE; } if( ( strip_mode != LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else if( strip_mode == LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } else if( strip_mode == LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid character in base16 stream at index: %" PRIzd ".", function, base16_stream_index - base16_character_size ); return( -1 ); } if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { byte_value = 0; if( ( base16_character1 >= (uint32_t) 'A' ) && ( base16_character1 <= (uint32_t) 'F' ) ) { if( ( character_case != LIBUNA_CASE_MIXED ) && ( character_case != LIBUNA_CASE_UPPER ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } byte_value = (uint8_t) ( base16_character1 - (uint32_t) 'A' + 10 ); } else if( ( base16_character1 >= (uint32_t) 'a' ) && ( base16_character1 <= (uint32_t) 'f' ) ) { if( ( character_case != LIBUNA_CASE_MIXED ) && ( character_case != LIBUNA_CASE_LOWER ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } byte_value = (uint8_t) ( base16_character1 - (uint32_t) 'a' + 10 ); } else if( ( base16_character1 >= (uint32_t) '0' ) && ( base16_character1 <= (uint32_t) '9' ) ) { byte_value = (uint8_t) ( base16_character1 - (uint32_t) '0' ); } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character stream at index: %" PRIzd ".", function, base16_stream_index - base16_character_size ); return( -1 ); } byte_value <<= 4; switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character1 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; } if( ( base16_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", base16_stream_index, function ); return( -1 ); } base16_stream_index += base16_character_size; if( ( base16_character1 >= (uint32_t) 'A' ) && ( base16_character1 <= (uint32_t) 'F' ) ) { if( ( character_case != LIBUNA_CASE_MIXED ) && ( character_case != LIBUNA_CASE_UPPER ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } byte_value |= (uint8_t) ( base16_character1 - (uint32_t) 'A' + 10 ); } else if( ( base16_character1 >= (uint32_t) 'a' ) && ( base16_character1 <= (uint32_t) 'f' ) ) { if( ( character_case != LIBUNA_CASE_MIXED ) && ( character_case != LIBUNA_CASE_LOWER ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } byte_value |= (uint8_t) ( base16_character1 - (uint32_t) 'a' + 10 ); } else if( ( base16_character1 >= (uint32_t) '0' ) && ( base16_character1 <= (uint32_t) '9' ) ) { byte_value |= (uint8_t) ( base16_character1 - (uint32_t) '0' ); } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character stream at index: %" PRIzd ".", function, base16_stream_index - base16_character_size ); return( -1 ); } if( byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream is too small.", function ); return( -1 ); } byte_stream[ byte_stream_index++ ] = byte_value; number_of_characters += 2; } } if( character_limit != 0 ) { if( number_of_characters > (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in last line exceed maximum.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of a base16 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base16_stream_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, size_t *base16_stream_size, uint32_t base16_variant, libcerror_error_t **error ) { static char *function = "libuna_base16_stream_size_from_byte_stream"; size_t base16_character_size = 0; size_t whitespace_size = 0; uint8_t character_limit = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( base16_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base16 stream size.", function ); return( -1 ); } switch( base16_variant & 0x000000ffUL ) { case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character_size = 1; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base16_character_size = 2; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base16_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } /* The base16 stream contains 2 characters for every byte */ *base16_stream_size = byte_stream_size * 2; if( character_limit != 0 ) { whitespace_size = *base16_stream_size / character_limit; if( ( *base16_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } *base16_stream_size += whitespace_size; } *base16_stream_size *= base16_character_size; return( 1 ); } /* Copies a base16 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base16_stream_copy_from_byte_stream( uint8_t *base16_stream, size_t base16_stream_size, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base16_variant, libcerror_error_t **error ) { static char *function = "libuna_base16_stream_copy_from_byte_stream"; size_t base16_stream_index = 0; if( libuna_base16_stream_with_index_copy_from_byte_stream( base16_stream, base16_stream_size, &base16_stream_index, byte_stream, byte_stream_size, base16_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base16 stream from byte stream.", function ); return( -1 ); } return( 1 ); } /* Copies a base16 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base16_stream_with_index_copy_from_byte_stream( uint8_t *base16_stream, size_t base16_stream_size, size_t *base16_stream_index, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base16_variant, libcerror_error_t **error ) { static char *function = "libuna_base16_stream_with_index_copy_from_byte_stream"; size_t calculated_base16_stream_size = 0; size_t base16_character_size = 0; size_t stream_index = 0; size_t byte_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint32_t a_character_value = 0; uint32_t base16_character = 0; uint8_t character_limit = 0; if( base16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base16 stream.", function ); return( -1 ); } if( base16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base16 stream size value exceeds maximum.", function ); return( -1 ); } if( base16_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base16 stream index.", function ); return( -1 ); } if( *base16_stream_index >= base16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base16 stream string too small.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } switch( base16_variant & 0x000000ffUL ) { case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0x000f0000UL ) { case LIBUNA_BASE16_VARIANT_CASE_LOWER: a_character_value = (uint32_t) 'a' - 10; break; case LIBUNA_BASE16_VARIANT_CASE_MIXED: case LIBUNA_BASE16_VARIANT_CASE_UPPER: a_character_value = (uint32_t) 'A' - 10; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character_size = 1; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base16_character_size = 2; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base16_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } stream_index = *base16_stream_index; /* Make sure the base16 stream is able to hold * at least 2 bytes for each byte */ calculated_base16_stream_size = byte_stream_size * 2; if( character_limit != 0 ) { whitespace_size = calculated_base16_stream_size / character_limit; if( ( calculated_base16_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } calculated_base16_stream_size += whitespace_size; } calculated_base16_stream_size *= base16_character_size; if( base16_stream_size < calculated_base16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base16 stream is too small.", function ); return( -1 ); } while( byte_stream_index < byte_stream_size ) { base16_character = byte_stream[ byte_stream_index ] >> 4; if( base16_character <= 9 ) { base16_character += (uint32_t) '0'; } else { base16_character += a_character_value; } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_stream[ stream_index ] = (uint8_t) base16_character; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; } stream_index += base16_character_size; base16_character = byte_stream[ byte_stream_index ] & 0x0f; if( base16_character <= 9 ) { base16_character += (uint32_t) '0'; } else { base16_character += a_character_value; } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_stream[ stream_index ] = (uint8_t) base16_character; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; } stream_index += base16_character_size; if( character_limit != 0 ) { number_of_characters += 2; if( number_of_characters >= (size_t) character_limit ) { base16_character = (uint32_t) '\n'; switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_stream[ stream_index ] = (uint8_t) base16_character; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; } stream_index += base16_character_size; number_of_characters = 0; } } byte_stream_index++; } if( character_limit != 0 ) { if( number_of_characters != 0 ) { base16_character = (uint32_t) '\n'; switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_stream[ stream_index ] = (uint8_t) base16_character; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; } stream_index += base16_character_size; } } *base16_stream_index = stream_index; return( 1 ); } libevt-20170120/libuna/libuna_codepage_windows_1250.h0000664000175000017500000000320413040331677024305 0ustar00lordyestalordyesta00000000000000/* * Windows 1250 codepage (Central European) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1250_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1250_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1250_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x00a0[ 128 ]; extern const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x0138[ 72 ]; extern const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x02d8[ 8 ]; extern const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2010[ 24 ]; extern const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2030[ 16 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1250_H ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_16.h0000664000175000017500000000315513040331677023746 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-16 codepage (Latin 10) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_16_H ) #define _LIBUNA_CODEPAGE_ISO_8859_16_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_16_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x00a8[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0140[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0150[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0178[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0218[ 8 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_16_H ) */ libevt-20170120/libuna/libuna_utf16_stream.h0000664000175000017500000000604413040331677022642 0ustar00lordyestalordyesta00000000000000/* * UTF-16 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF16_STREAM_H ) #define _LIBUNA_UTF16_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_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 ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_10.h0000664000175000017500000000253713040331677023743 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-10 codepage (Nordic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_10_H ) #define _LIBUNA_CODEPAGE_ISO_8859_10_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_10_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x00c0[ 144 ]; extern const uint8_t libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x0160[ 16 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_10_H ) */ libevt-20170120/libuna/libuna_codepage_windows_932.c0000664000175000017500000105716313040331677024244 0ustar00lordyestalordyesta00000000000000/* * Windows 932 codepage (Japanese Shift-JIS) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_932.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for Windows 932 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8140[ 109 ] = { 0x3000, 0x3001, 0x3002, 0xff0c, 0xff0e, 0x30fb, 0xff1a, 0xff1b, 0xff1f, 0xff01, 0x309b, 0x309c, 0x00b4, 0xff40, 0x00a8, 0xff3e, 0xffe3, 0xff3f, 0x30fd, 0x30fe, 0x309d, 0x309e, 0x3003, 0x4edd, 0x3005, 0x3006, 0x3007, 0x30fc, 0x2015, 0x2010, 0xff0f, 0xff3c, 0xff5e, 0x2225, 0xff5c, 0x2026, 0x2025, 0x2018, 0x2019, 0x201c, 0x201d, 0xff08, 0xff09, 0x3014, 0x3015, 0xff3b, 0xff3d, 0xff5b, 0xff5d, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e, 0x300f, 0x3010, 0x3011, 0xff0b, 0xff0d, 0x00b1, 0x00d7, 0xfffd, 0x00f7, 0xff1d, 0x2260, 0xff1c, 0xff1e, 0x2266, 0x2267, 0x221e, 0x2234, 0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xffe5, 0xff04, 0xffe0, 0xffe1, 0xff05, 0xff03, 0xff06, 0xff0a, 0xff20, 0x00a7, 0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x203b, 0x3012, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81b8[ 8 ] = { 0x2208, 0x220b, 0x2286, 0x2287, 0x2282, 0x2283, 0x222a, 0x2229 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81c8[ 7 ] = { 0x2227, 0x2228, 0xffe2, 0x21d2, 0x21d4, 0x2200, 0x2203 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81da[ 15 ] = { 0x2220, 0x22a5, 0x2312, 0x2202, 0x2207, 0x2261, 0x2252, 0x226a, 0x226b, 0x221a, 0x223d, 0x221d, 0x2235, 0x222b, 0x222c }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81f0[ 8 ] = { 0x212b, 0x2030, 0x266f, 0x266d, 0x266a, 0x2020, 0x2021, 0x00b6 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8440[ 33 ] = { 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8470[ 15 ] = { 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x849f[ 32 ] = { 0x2500, 0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, 0x252c, 0x2524, 0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, 0x251b, 0x2517, 0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, 0x252f, 0x2528, 0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, 0x2542 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x875f[ 23 ] = { 0x3349, 0x3314, 0x3322, 0x334d, 0x3318, 0x3327, 0x3303, 0x3336, 0x3351, 0x3357, 0x330d, 0x3326, 0x3323, 0x332b, 0x334a, 0x333b, 0x339c, 0x339d, 0x339e, 0x338e, 0x338f, 0x33c4, 0x33a1 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8780[ 29 ] = { 0x301d, 0x301f, 0x2116, 0x33cd, 0x2121, 0x32a4, 0x32a5, 0x32a6, 0x32a7, 0x32a8, 0x3231, 0x3232, 0x3239, 0x337e, 0x337d, 0x337c, 0x2252, 0x2261, 0x222b, 0x222e, 0x2211, 0x221a, 0x22a5, 0x2220, 0x221f, 0x22bf, 0x2235, 0x2229, 0x222a }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x889f[ 94 ] = { 0x4e9c, 0x5516, 0x5a03, 0x963f, 0x54c0, 0x611b, 0x6328, 0x59f6, 0x9022, 0x8475, 0x831c, 0x7a50, 0x60aa, 0x63e1, 0x6e25, 0x65ed, 0x8466, 0x82a6, 0x9bf5, 0x6893, 0x5727, 0x65a1, 0x6271, 0x5b9b, 0x59d0, 0x867b, 0x98f4, 0x7d62, 0x7dbe, 0x9b8e, 0x6216, 0x7c9f, 0x88b7, 0x5b89, 0x5eb5, 0x6309, 0x6697, 0x6848, 0x95c7, 0x978d, 0x674f, 0x4ee5, 0x4f0a, 0x4f4d, 0x4f9d, 0x5049, 0x56f2, 0x5937, 0x59d4, 0x5a01, 0x5c09, 0x60df, 0x610f, 0x6170, 0x6613, 0x6905, 0x70ba, 0x754f, 0x7570, 0x79fb, 0x7dad, 0x7def, 0x80c3, 0x840e, 0x8863, 0x8b02, 0x9055, 0x907a, 0x533b, 0x4e95, 0x4ea5, 0x57df, 0x80b2, 0x90c1, 0x78ef, 0x4e00, 0x58f1, 0x6ea2, 0x9038, 0x7a32, 0x8328, 0x828b, 0x9c2f, 0x5141, 0x5370, 0x54bd, 0x54e1, 0x56e0, 0x59fb, 0x5f15, 0x98f2, 0x6deb, 0x80e4, 0x852d }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8940[ 189 ] = { 0x9662, 0x9670, 0x96a0, 0x97fb, 0x540b, 0x53f3, 0x5b87, 0x70cf, 0x7fbd, 0x8fc2, 0x96e8, 0x536f, 0x9d5c, 0x7aba, 0x4e11, 0x7893, 0x81fc, 0x6e26, 0x5618, 0x5504, 0x6b1d, 0x851a, 0x9c3b, 0x59e5, 0x53a9, 0x6d66, 0x74dc, 0x958f, 0x5642, 0x4e91, 0x904b, 0x96f2, 0x834f, 0x990c, 0x53e1, 0x55b6, 0x5b30, 0x5f71, 0x6620, 0x66f3, 0x6804, 0x6c38, 0x6cf3, 0x6d29, 0x745b, 0x76c8, 0x7a4e, 0x9834, 0x82f1, 0x885b, 0x8a60, 0x92ed, 0x6db2, 0x75ab, 0x76ca, 0x99c5, 0x60a6, 0x8b01, 0x8d8a, 0x95b2, 0x698e, 0x53ad, 0x5186, 0xfffd, 0x5712, 0x5830, 0x5944, 0x5bb4, 0x5ef6, 0x6028, 0x63a9, 0x63f4, 0x6cbf, 0x6f14, 0x708e, 0x7114, 0x7159, 0x71d5, 0x733f, 0x7e01, 0x8276, 0x82d1, 0x8597, 0x9060, 0x925b, 0x9d1b, 0x5869, 0x65bc, 0x6c5a, 0x7525, 0x51f9, 0x592e, 0x5965, 0x5f80, 0x5fdc, 0x62bc, 0x65fa, 0x6a2a, 0x6b27, 0x6bb4, 0x738b, 0x7fc1, 0x8956, 0x9d2c, 0x9d0e, 0x9ec4, 0x5ca1, 0x6c96, 0x837b, 0x5104, 0x5c4b, 0x61b6, 0x81c6, 0x6876, 0x7261, 0x4e59, 0x4ffa, 0x5378, 0x6069, 0x6e29, 0x7a4f, 0x97f3, 0x4e0b, 0x5316, 0x4eee, 0x4f55, 0x4f3d, 0x4fa1, 0x4f73, 0x52a0, 0x53ef, 0x5609, 0x590f, 0x5ac1, 0x5bb6, 0x5be1, 0x79d1, 0x6687, 0x679c, 0x67b6, 0x6b4c, 0x6cb3, 0x706b, 0x73c2, 0x798d, 0x79be, 0x7a3c, 0x7b87, 0x82b1, 0x82db, 0x8304, 0x8377, 0x83ef, 0x83d3, 0x8766, 0x8ab2, 0x5629, 0x8ca8, 0x8fe6, 0x904e, 0x971e, 0x868a, 0x4fc4, 0x5ce8, 0x6211, 0x7259, 0x753b, 0x81e5, 0x82bd, 0x86fe, 0x8cc0, 0x96c5, 0x9913, 0x99d5, 0x4ecb, 0x4f1a, 0x89e3, 0x56de, 0x584a, 0x58ca, 0x5efb, 0x5feb, 0x602a, 0x6094, 0x6062, 0x61d0, 0x6212, 0x62d0, 0x6539 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8a40[ 189 ] = { 0x9b41, 0x6666, 0x68b0, 0x6d77, 0x7070, 0x754c, 0x7686, 0x7d75, 0x82a5, 0x87f9, 0x958b, 0x968e, 0x8c9d, 0x51f1, 0x52be, 0x5916, 0x54b3, 0x5bb3, 0x5d16, 0x6168, 0x6982, 0x6daf, 0x788d, 0x84cb, 0x8857, 0x8a72, 0x93a7, 0x9ab8, 0x6d6c, 0x99a8, 0x86d9, 0x57a3, 0x67ff, 0x86ce, 0x920e, 0x5283, 0x5687, 0x5404, 0x5ed3, 0x62e1, 0x64b9, 0x683c, 0x6838, 0x6bbb, 0x7372, 0x78ba, 0x7a6b, 0x899a, 0x89d2, 0x8d6b, 0x8f03, 0x90ed, 0x95a3, 0x9694, 0x9769, 0x5b66, 0x5cb3, 0x697d, 0x984d, 0x984e, 0x639b, 0x7b20, 0x6a2b, 0xfffd, 0x6a7f, 0x68b6, 0x9c0d, 0x6f5f, 0x5272, 0x559d, 0x6070, 0x62ec, 0x6d3b, 0x6e07, 0x6ed1, 0x845b, 0x8910, 0x8f44, 0x4e14, 0x9c39, 0x53f6, 0x691b, 0x6a3a, 0x9784, 0x682a, 0x515c, 0x7ac3, 0x84b2, 0x91dc, 0x938c, 0x565b, 0x9d28, 0x6822, 0x8305, 0x8431, 0x7ca5, 0x5208, 0x82c5, 0x74e6, 0x4e7e, 0x4f83, 0x51a0, 0x5bd2, 0x520a, 0x52d8, 0x52e7, 0x5dfb, 0x559a, 0x582a, 0x59e6, 0x5b8c, 0x5b98, 0x5bdb, 0x5e72, 0x5e79, 0x60a3, 0x611f, 0x6163, 0x61be, 0x63db, 0x6562, 0x67d1, 0x6853, 0x68fa, 0x6b3e, 0x6b53, 0x6c57, 0x6f22, 0x6f97, 0x6f45, 0x74b0, 0x7518, 0x76e3, 0x770b, 0x7aff, 0x7ba1, 0x7c21, 0x7de9, 0x7f36, 0x7ff0, 0x809d, 0x8266, 0x839e, 0x89b3, 0x8acc, 0x8cab, 0x9084, 0x9451, 0x9593, 0x9591, 0x95a2, 0x9665, 0x97d3, 0x9928, 0x8218, 0x4e38, 0x542b, 0x5cb8, 0x5dcc, 0x73a9, 0x764c, 0x773c, 0x5ca9, 0x7feb, 0x8d0b, 0x96c1, 0x9811, 0x9854, 0x9858, 0x4f01, 0x4f0e, 0x5371, 0x559c, 0x5668, 0x57fa, 0x5947, 0x5b09, 0x5bc4, 0x5c90, 0x5e0c, 0x5e7e, 0x5fcc, 0x63ee, 0x673a, 0x65d7, 0x65e2, 0x671f, 0x68cb, 0x68c4 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8b40[ 189 ] = { 0x6a5f, 0x5e30, 0x6bc5, 0x6c17, 0x6c7d, 0x757f, 0x7948, 0x5b63, 0x7a00, 0x7d00, 0x5fbd, 0x898f, 0x8a18, 0x8cb4, 0x8d77, 0x8ecc, 0x8f1d, 0x98e2, 0x9a0e, 0x9b3c, 0x4e80, 0x507d, 0x5100, 0x5993, 0x5b9c, 0x622f, 0x6280, 0x64ec, 0x6b3a, 0x72a0, 0x7591, 0x7947, 0x7fa9, 0x87fb, 0x8abc, 0x8b70, 0x63ac, 0x83ca, 0x97a0, 0x5409, 0x5403, 0x55ab, 0x6854, 0x6a58, 0x8a70, 0x7827, 0x6775, 0x9ecd, 0x5374, 0x5ba2, 0x811a, 0x8650, 0x9006, 0x4e18, 0x4e45, 0x4ec7, 0x4f11, 0x53ca, 0x5438, 0x5bae, 0x5f13, 0x6025, 0x6551, 0xfffd, 0x673d, 0x6c42, 0x6c72, 0x6ce3, 0x7078, 0x7403, 0x7a76, 0x7aae, 0x7b08, 0x7d1a, 0x7cfe, 0x7d66, 0x65e7, 0x725b, 0x53bb, 0x5c45, 0x5de8, 0x62d2, 0x62e0, 0x6319, 0x6e20, 0x865a, 0x8a31, 0x8ddd, 0x92f8, 0x6f01, 0x79a6, 0x9b5a, 0x4ea8, 0x4eab, 0x4eac, 0x4f9b, 0x4fa0, 0x50d1, 0x5147, 0x7af6, 0x5171, 0x51f6, 0x5354, 0x5321, 0x537f, 0x53eb, 0x55ac, 0x5883, 0x5ce1, 0x5f37, 0x5f4a, 0x602f, 0x6050, 0x606d, 0x631f, 0x6559, 0x6a4b, 0x6cc1, 0x72c2, 0x72ed, 0x77ef, 0x80f8, 0x8105, 0x8208, 0x854e, 0x90f7, 0x93e1, 0x97ff, 0x9957, 0x9a5a, 0x4ef0, 0x51dd, 0x5c2d, 0x6681, 0x696d, 0x5c40, 0x66f2, 0x6975, 0x7389, 0x6850, 0x7c81, 0x50c5, 0x52e4, 0x5747, 0x5dfe, 0x9326, 0x65a4, 0x6b23, 0x6b3d, 0x7434, 0x7981, 0x79bd, 0x7b4b, 0x7dca, 0x82b9, 0x83cc, 0x887f, 0x895f, 0x8b39, 0x8fd1, 0x91d1, 0x541f, 0x9280, 0x4e5d, 0x5036, 0x53e5, 0x533a, 0x72d7, 0x7396, 0x77e9, 0x82e6, 0x8eaf, 0x99c6, 0x99c8, 0x99d2, 0x5177, 0x611a, 0x865e, 0x55b0, 0x7a7a, 0x5076, 0x5bd3, 0x9047, 0x9685, 0x4e32, 0x6adb, 0x91e7, 0x5c51, 0x5c48 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8c40[ 189 ] = { 0x6398, 0x7a9f, 0x6c93, 0x9774, 0x8f61, 0x7aaa, 0x718a, 0x9688, 0x7c82, 0x6817, 0x7e70, 0x6851, 0x936c, 0x52f2, 0x541b, 0x85ab, 0x8a13, 0x7fa4, 0x8ecd, 0x90e1, 0x5366, 0x8888, 0x7941, 0x4fc2, 0x50be, 0x5211, 0x5144, 0x5553, 0x572d, 0x73ea, 0x578b, 0x5951, 0x5f62, 0x5f84, 0x6075, 0x6176, 0x6167, 0x61a9, 0x63b2, 0x643a, 0x656c, 0x666f, 0x6842, 0x6e13, 0x7566, 0x7a3d, 0x7cfb, 0x7d4c, 0x7d99, 0x7e4b, 0x7f6b, 0x830e, 0x834a, 0x86cd, 0x8a08, 0x8a63, 0x8b66, 0x8efd, 0x981a, 0x9d8f, 0x82b8, 0x8fce, 0x9be8, 0xfffd, 0x5287, 0x621f, 0x6483, 0x6fc0, 0x9699, 0x6841, 0x5091, 0x6b20, 0x6c7a, 0x6f54, 0x7a74, 0x7d50, 0x8840, 0x8a23, 0x6708, 0x4ef6, 0x5039, 0x5026, 0x5065, 0x517c, 0x5238, 0x5263, 0x55a7, 0x570f, 0x5805, 0x5acc, 0x5efa, 0x61b2, 0x61f8, 0x62f3, 0x6372, 0x691c, 0x6a29, 0x727d, 0x72ac, 0x732e, 0x7814, 0x786f, 0x7d79, 0x770c, 0x80a9, 0x898b, 0x8b19, 0x8ce2, 0x8ed2, 0x9063, 0x9375, 0x967a, 0x9855, 0x9a13, 0x9e78, 0x5143, 0x539f, 0x53b3, 0x5e7b, 0x5f26, 0x6e1b, 0x6e90, 0x7384, 0x73fe, 0x7d43, 0x8237, 0x8a00, 0x8afa, 0x9650, 0x4e4e, 0x500b, 0x53e4, 0x547c, 0x56fa, 0x59d1, 0x5b64, 0x5df1, 0x5eab, 0x5f27, 0x6238, 0x6545, 0x67af, 0x6e56, 0x72d0, 0x7cca, 0x88b4, 0x80a1, 0x80e1, 0x83f0, 0x864e, 0x8a87, 0x8de8, 0x9237, 0x96c7, 0x9867, 0x9f13, 0x4e94, 0x4e92, 0x4f0d, 0x5348, 0x5449, 0x543e, 0x5a2f, 0x5f8c, 0x5fa1, 0x609f, 0x68a7, 0x6a8e, 0x745a, 0x7881, 0x8a9e, 0x8aa4, 0x8b77, 0x9190, 0x4e5e, 0x9bc9, 0x4ea4, 0x4f7c, 0x4faf, 0x5019, 0x5016, 0x5149, 0x516c, 0x529f, 0x52b9, 0x52fe, 0x539a, 0x53e3, 0x5411 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8d40[ 189 ] = { 0x540e, 0x5589, 0x5751, 0x57a2, 0x597d, 0x5b54, 0x5b5d, 0x5b8f, 0x5de5, 0x5de7, 0x5df7, 0x5e78, 0x5e83, 0x5e9a, 0x5eb7, 0x5f18, 0x6052, 0x614c, 0x6297, 0x62d8, 0x63a7, 0x653b, 0x6602, 0x6643, 0x66f4, 0x676d, 0x6821, 0x6897, 0x69cb, 0x6c5f, 0x6d2a, 0x6d69, 0x6e2f, 0x6e9d, 0x7532, 0x7687, 0x786c, 0x7a3f, 0x7ce0, 0x7d05, 0x7d18, 0x7d5e, 0x7db1, 0x8015, 0x8003, 0x80af, 0x80b1, 0x8154, 0x818f, 0x822a, 0x8352, 0x884c, 0x8861, 0x8b1b, 0x8ca2, 0x8cfc, 0x90ca, 0x9175, 0x9271, 0x783f, 0x92fc, 0x95a4, 0x964d, 0xfffd, 0x9805, 0x9999, 0x9ad8, 0x9d3b, 0x525b, 0x52ab, 0x53f7, 0x5408, 0x58d5, 0x62f7, 0x6fe0, 0x8c6a, 0x8f5f, 0x9eb9, 0x514b, 0x523b, 0x544a, 0x56fd, 0x7a40, 0x9177, 0x9d60, 0x9ed2, 0x7344, 0x6f09, 0x8170, 0x7511, 0x5ffd, 0x60da, 0x9aa8, 0x72db, 0x8fbc, 0x6b64, 0x9803, 0x4eca, 0x56f0, 0x5764, 0x58be, 0x5a5a, 0x6068, 0x61c7, 0x660f, 0x6606, 0x6839, 0x68b1, 0x6df7, 0x75d5, 0x7d3a, 0x826e, 0x9b42, 0x4e9b, 0x4f50, 0x53c9, 0x5506, 0x5d6f, 0x5de6, 0x5dee, 0x67fb, 0x6c99, 0x7473, 0x7802, 0x8a50, 0x9396, 0x88df, 0x5750, 0x5ea7, 0x632b, 0x50b5, 0x50ac, 0x518d, 0x6700, 0x54c9, 0x585e, 0x59bb, 0x5bb0, 0x5f69, 0x624d, 0x63a1, 0x683d, 0x6b73, 0x6e08, 0x707d, 0x91c7, 0x7280, 0x7815, 0x7826, 0x796d, 0x658e, 0x7d30, 0x83dc, 0x88c1, 0x8f09, 0x969b, 0x5264, 0x5728, 0x6750, 0x7f6a, 0x8ca1, 0x51b4, 0x5742, 0x962a, 0x583a, 0x698a, 0x80b4, 0x54b2, 0x5d0e, 0x57fc, 0x7895, 0x9dfa, 0x4f5c, 0x524a, 0x548b, 0x643e, 0x6628, 0x6714, 0x67f5, 0x7a84, 0x7b56, 0x7d22, 0x932f, 0x685c, 0x9bad, 0x7b39, 0x5319, 0x518a, 0x5237 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8e40[ 189 ] = { 0x5bdf, 0x62f6, 0x64ae, 0x64e6, 0x672d, 0x6bba, 0x85a9, 0x96d1, 0x7690, 0x9bd6, 0x634c, 0x9306, 0x9bab, 0x76bf, 0x6652, 0x4e09, 0x5098, 0x53c2, 0x5c71, 0x60e8, 0x6492, 0x6563, 0x685f, 0x71e6, 0x73ca, 0x7523, 0x7b97, 0x7e82, 0x8695, 0x8b83, 0x8cdb, 0x9178, 0x9910, 0x65ac, 0x66ab, 0x6b8b, 0x4ed5, 0x4ed4, 0x4f3a, 0x4f7f, 0x523a, 0x53f8, 0x53f2, 0x55e3, 0x56db, 0x58eb, 0x59cb, 0x59c9, 0x59ff, 0x5b50, 0x5c4d, 0x5e02, 0x5e2b, 0x5fd7, 0x601d, 0x6307, 0x652f, 0x5b5c, 0x65af, 0x65bd, 0x65e8, 0x679d, 0x6b62, 0xfffd, 0x6b7b, 0x6c0f, 0x7345, 0x7949, 0x79c1, 0x7cf8, 0x7d19, 0x7d2b, 0x80a2, 0x8102, 0x81f3, 0x8996, 0x8a5e, 0x8a69, 0x8a66, 0x8a8c, 0x8aee, 0x8cc7, 0x8cdc, 0x96cc, 0x98fc, 0x6b6f, 0x4e8b, 0x4f3c, 0x4f8d, 0x5150, 0x5b57, 0x5bfa, 0x6148, 0x6301, 0x6642, 0x6b21, 0x6ecb, 0x6cbb, 0x723e, 0x74bd, 0x75d4, 0x78c1, 0x793a, 0x800c, 0x8033, 0x81ea, 0x8494, 0x8f9e, 0x6c50, 0x9e7f, 0x5f0f, 0x8b58, 0x9d2b, 0x7afa, 0x8ef8, 0x5b8d, 0x96eb, 0x4e03, 0x53f1, 0x57f7, 0x5931, 0x5ac9, 0x5ba4, 0x6089, 0x6e7f, 0x6f06, 0x75be, 0x8cea, 0x5b9f, 0x8500, 0x7be0, 0x5072, 0x67f4, 0x829d, 0x5c61, 0x854a, 0x7e1e, 0x820e, 0x5199, 0x5c04, 0x6368, 0x8d66, 0x659c, 0x716e, 0x793e, 0x7d17, 0x8005, 0x8b1d, 0x8eca, 0x906e, 0x86c7, 0x90aa, 0x501f, 0x52fa, 0x5c3a, 0x6753, 0x707c, 0x7235, 0x914c, 0x91c8, 0x932b, 0x82e5, 0x5bc2, 0x5f31, 0x60f9, 0x4e3b, 0x53d6, 0x5b88, 0x624b, 0x6731, 0x6b8a, 0x72e9, 0x73e0, 0x7a2e, 0x816b, 0x8da3, 0x9152, 0x9996, 0x5112, 0x53d7, 0x546a, 0x5bff, 0x6388, 0x6a39, 0x7dac, 0x9700, 0x56da, 0x53ce, 0x5468 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8f40[ 189 ] = { 0x5b97, 0x5c31, 0x5dde, 0x4fee, 0x6101, 0x62fe, 0x6d32, 0x79c0, 0x79cb, 0x7d42, 0x7e4d, 0x7fd2, 0x81ed, 0x821f, 0x8490, 0x8846, 0x8972, 0x8b90, 0x8e74, 0x8f2f, 0x9031, 0x914b, 0x916c, 0x96c6, 0x919c, 0x4ec0, 0x4f4f, 0x5145, 0x5341, 0x5f93, 0x620e, 0x67d4, 0x6c41, 0x6e0b, 0x7363, 0x7e26, 0x91cd, 0x9283, 0x53d4, 0x5919, 0x5bbf, 0x6dd1, 0x795d, 0x7e2e, 0x7c9b, 0x587e, 0x719f, 0x51fa, 0x8853, 0x8ff0, 0x4fca, 0x5cfb, 0x6625, 0x77ac, 0x7ae3, 0x821c, 0x99ff, 0x51c6, 0x5faa, 0x65ec, 0x696f, 0x6b89, 0x6df3, 0xfffd, 0x6e96, 0x6f64, 0x76fe, 0x7d14, 0x5de1, 0x9075, 0x9187, 0x9806, 0x51e6, 0x521d, 0x6240, 0x6691, 0x66d9, 0x6e1a, 0x5eb6, 0x7dd2, 0x7f72, 0x66f8, 0x85af, 0x85f7, 0x8af8, 0x52a9, 0x53d9, 0x5973, 0x5e8f, 0x5f90, 0x6055, 0x92e4, 0x9664, 0x50b7, 0x511f, 0x52dd, 0x5320, 0x5347, 0x53ec, 0x54e8, 0x5546, 0x5531, 0x5617, 0x5968, 0x59be, 0x5a3c, 0x5bb5, 0x5c06, 0x5c0f, 0x5c11, 0x5c1a, 0x5e84, 0x5e8a, 0x5ee0, 0x5f70, 0x627f, 0x6284, 0x62db, 0x638c, 0x6377, 0x6607, 0x660c, 0x662d, 0x6676, 0x677e, 0x68a2, 0x6a1f, 0x6a35, 0x6cbc, 0x6d88, 0x6e09, 0x6e58, 0x713c, 0x7126, 0x7167, 0x75c7, 0x7701, 0x785d, 0x7901, 0x7965, 0x79f0, 0x7ae0, 0x7b11, 0x7ca7, 0x7d39, 0x8096, 0x83d6, 0x848b, 0x8549, 0x885d, 0x88f3, 0x8a1f, 0x8a3c, 0x8a54, 0x8a73, 0x8c61, 0x8cde, 0x91a4, 0x9266, 0x937e, 0x9418, 0x969c, 0x9798, 0x4e0a, 0x4e08, 0x4e1e, 0x4e57, 0x5197, 0x5270, 0x57ce, 0x5834, 0x58cc, 0x5b22, 0x5e38, 0x60c5, 0x64fe, 0x6761, 0x6756, 0x6d44, 0x72b6, 0x7573, 0x7a63, 0x84b8, 0x8b72, 0x91b8, 0x9320, 0x5631, 0x57f4, 0x98fe }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9040[ 189 ] = { 0x62ed, 0x690d, 0x6b96, 0x71ed, 0x7e54, 0x8077, 0x8272, 0x89e6, 0x98df, 0x8755, 0x8fb1, 0x5c3b, 0x4f38, 0x4fe1, 0x4fb5, 0x5507, 0x5a20, 0x5bdd, 0x5be9, 0x5fc3, 0x614e, 0x632f, 0x65b0, 0x664b, 0x68ee, 0x699b, 0x6d78, 0x6df1, 0x7533, 0x75b9, 0x771f, 0x795e, 0x79e6, 0x7d33, 0x81e3, 0x82af, 0x85aa, 0x89aa, 0x8a3a, 0x8eab, 0x8f9b, 0x9032, 0x91dd, 0x9707, 0x4eba, 0x4ec1, 0x5203, 0x5875, 0x58ec, 0x5c0b, 0x751a, 0x5c3d, 0x814e, 0x8a0a, 0x8fc5, 0x9663, 0x976d, 0x7b25, 0x8acf, 0x9808, 0x9162, 0x56f3, 0x53a8, 0xfffd, 0x9017, 0x5439, 0x5782, 0x5e25, 0x63a8, 0x6c34, 0x708a, 0x7761, 0x7c8b, 0x7fe0, 0x8870, 0x9042, 0x9154, 0x9310, 0x9318, 0x968f, 0x745e, 0x9ac4, 0x5d07, 0x5d69, 0x6570, 0x67a2, 0x8da8, 0x96db, 0x636e, 0x6749, 0x6919, 0x83c5, 0x9817, 0x96c0, 0x88fe, 0x6f84, 0x647a, 0x5bf8, 0x4e16, 0x702c, 0x755d, 0x662f, 0x51c4, 0x5236, 0x52e2, 0x59d3, 0x5f81, 0x6027, 0x6210, 0x653f, 0x6574, 0x661f, 0x6674, 0x68f2, 0x6816, 0x6b63, 0x6e05, 0x7272, 0x751f, 0x76db, 0x7cbe, 0x8056, 0x58f0, 0x88fd, 0x897f, 0x8aa0, 0x8a93, 0x8acb, 0x901d, 0x9192, 0x9752, 0x9759, 0x6589, 0x7a0e, 0x8106, 0x96bb, 0x5e2d, 0x60dc, 0x621a, 0x65a5, 0x6614, 0x6790, 0x77f3, 0x7a4d, 0x7c4d, 0x7e3e, 0x810a, 0x8cac, 0x8d64, 0x8de1, 0x8e5f, 0x78a9, 0x5207, 0x62d9, 0x63a5, 0x6442, 0x6298, 0x8a2d, 0x7a83, 0x7bc0, 0x8aac, 0x96ea, 0x7d76, 0x820c, 0x8749, 0x4ed9, 0x5148, 0x5343, 0x5360, 0x5ba3, 0x5c02, 0x5c16, 0x5ddd, 0x6226, 0x6247, 0x64b0, 0x6813, 0x6834, 0x6cc9, 0x6d45, 0x6d17, 0x67d3, 0x6f5c, 0x714e, 0x717d, 0x65cb, 0x7a7f, 0x7bad, 0x7dda }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9140[ 189 ] = { 0x7e4a, 0x7fa8, 0x817a, 0x821b, 0x8239, 0x85a6, 0x8a6e, 0x8cce, 0x8df5, 0x9078, 0x9077, 0x92ad, 0x9291, 0x9583, 0x9bae, 0x524d, 0x5584, 0x6f38, 0x7136, 0x5168, 0x7985, 0x7e55, 0x81b3, 0x7cce, 0x564c, 0x5851, 0x5ca8, 0x63aa, 0x66fe, 0x66fd, 0x695a, 0x72d9, 0x758f, 0x758e, 0x790e, 0x7956, 0x79df, 0x7c97, 0x7d20, 0x7d44, 0x8607, 0x8a34, 0x963b, 0x9061, 0x9f20, 0x50e7, 0x5275, 0x53cc, 0x53e2, 0x5009, 0x55aa, 0x58ee, 0x594f, 0x723d, 0x5b8b, 0x5c64, 0x531d, 0x60e3, 0x60f3, 0x635c, 0x6383, 0x633f, 0x63bb, 0xfffd, 0x64cd, 0x65e9, 0x66f9, 0x5de3, 0x69cd, 0x69fd, 0x6f15, 0x71e5, 0x4e89, 0x75e9, 0x76f8, 0x7a93, 0x7cdf, 0x7dcf, 0x7d9c, 0x8061, 0x8349, 0x8358, 0x846c, 0x84bc, 0x85fb, 0x88c5, 0x8d70, 0x9001, 0x906d, 0x9397, 0x971c, 0x9a12, 0x50cf, 0x5897, 0x618e, 0x81d3, 0x8535, 0x8d08, 0x9020, 0x4fc3, 0x5074, 0x5247, 0x5373, 0x606f, 0x6349, 0x675f, 0x6e2c, 0x8db3, 0x901f, 0x4fd7, 0x5c5e, 0x8cca, 0x65cf, 0x7d9a, 0x5352, 0x8896, 0x5176, 0x63c3, 0x5b58, 0x5b6b, 0x5c0a, 0x640d, 0x6751, 0x905c, 0x4ed6, 0x591a, 0x592a, 0x6c70, 0x8a51, 0x553e, 0x5815, 0x59a5, 0x60f0, 0x6253, 0x67c1, 0x8235, 0x6955, 0x9640, 0x99c4, 0x9a28, 0x4f53, 0x5806, 0x5bfe, 0x8010, 0x5cb1, 0x5e2f, 0x5f85, 0x6020, 0x614b, 0x6234, 0x66ff, 0x6cf0, 0x6ede, 0x80ce, 0x817f, 0x82d4, 0x888b, 0x8cb8, 0x9000, 0x902e, 0x968a, 0x9edb, 0x9bdb, 0x4ee3, 0x53f0, 0x5927, 0x7b2c, 0x918d, 0x984c, 0x9df9, 0x6edd, 0x7027, 0x5353, 0x5544, 0x5b85, 0x6258, 0x629e, 0x62d3, 0x6ca2, 0x6fef, 0x7422, 0x8a17, 0x9438, 0x6fc1, 0x8afe, 0x8338, 0x51e7, 0x86f8, 0x53ea }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9240[ 189 ] = { 0x53e9, 0x4f46, 0x9054, 0x8fb0, 0x596a, 0x8131, 0x5dfd, 0x7aea, 0x8fbf, 0x68da, 0x8c37, 0x72f8, 0x9c48, 0x6a3d, 0x8ab0, 0x4e39, 0x5358, 0x5606, 0x5766, 0x62c5, 0x63a2, 0x65e6, 0x6b4e, 0x6de1, 0x6e5b, 0x70ad, 0x77ed, 0x7aef, 0x7baa, 0x7dbb, 0x803d, 0x80c6, 0x86cb, 0x8a95, 0x935b, 0x56e3, 0x58c7, 0x5f3e, 0x65ad, 0x6696, 0x6a80, 0x6bb5, 0x7537, 0x8ac7, 0x5024, 0x77e5, 0x5730, 0x5f1b, 0x6065, 0x667a, 0x6c60, 0x75f4, 0x7a1a, 0x7f6e, 0x81f4, 0x8718, 0x9045, 0x99b3, 0x7bc9, 0x755c, 0x7af9, 0x7b51, 0x84c4, 0xfffd, 0x9010, 0x79e9, 0x7a92, 0x8336, 0x5ae1, 0x7740, 0x4e2d, 0x4ef2, 0x5b99, 0x5fe0, 0x62bd, 0x663c, 0x67f1, 0x6ce8, 0x866b, 0x8877, 0x8a3b, 0x914e, 0x92f3, 0x99d0, 0x6a17, 0x7026, 0x732a, 0x82e7, 0x8457, 0x8caf, 0x4e01, 0x5146, 0x51cb, 0x558b, 0x5bf5, 0x5e16, 0x5e33, 0x5e81, 0x5f14, 0x5f35, 0x5f6b, 0x5fb4, 0x61f2, 0x6311, 0x66a2, 0x671d, 0x6f6e, 0x7252, 0x753a, 0x773a, 0x8074, 0x8139, 0x8178, 0x8776, 0x8abf, 0x8adc, 0x8d85, 0x8df3, 0x929a, 0x9577, 0x9802, 0x9ce5, 0x52c5, 0x6357, 0x76f4, 0x6715, 0x6c88, 0x73cd, 0x8cc3, 0x93ae, 0x9673, 0x6d25, 0x589c, 0x690e, 0x69cc, 0x8ffd, 0x939a, 0x75db, 0x901a, 0x585a, 0x6802, 0x63b4, 0x69fb, 0x4f43, 0x6f2c, 0x67d8, 0x8fbb, 0x8526, 0x7db4, 0x9354, 0x693f, 0x6f70, 0x576a, 0x58f7, 0x5b2c, 0x7d2c, 0x722a, 0x540a, 0x91e3, 0x9db4, 0x4ead, 0x4f4e, 0x505c, 0x5075, 0x5243, 0x8c9e, 0x5448, 0x5824, 0x5b9a, 0x5e1d, 0x5e95, 0x5ead, 0x5ef7, 0x5f1f, 0x608c, 0x62b5, 0x633a, 0x63d0, 0x68af, 0x6c40, 0x7887, 0x798e, 0x7a0b, 0x7de0, 0x8247, 0x8a02, 0x8ae6, 0x8e44, 0x9013 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9340[ 189 ] = { 0x90b8, 0x912d, 0x91d8, 0x9f0e, 0x6ce5, 0x6458, 0x64e2, 0x6575, 0x6ef4, 0x7684, 0x7b1b, 0x9069, 0x93d1, 0x6eba, 0x54f2, 0x5fb9, 0x64a4, 0x8f4d, 0x8fed, 0x9244, 0x5178, 0x586b, 0x5929, 0x5c55, 0x5e97, 0x6dfb, 0x7e8f, 0x751c, 0x8cbc, 0x8ee2, 0x985b, 0x70b9, 0x4f1d, 0x6bbf, 0x6fb1, 0x7530, 0x96fb, 0x514e, 0x5410, 0x5835, 0x5857, 0x59ac, 0x5c60, 0x5f92, 0x6597, 0x675c, 0x6e21, 0x767b, 0x83df, 0x8ced, 0x9014, 0x90fd, 0x934d, 0x7825, 0x783a, 0x52aa, 0x5ea6, 0x571f, 0x5974, 0x6012, 0x5012, 0x515a, 0x51ac, 0xfffd, 0x51cd, 0x5200, 0x5510, 0x5854, 0x5858, 0x5957, 0x5b95, 0x5cf6, 0x5d8b, 0x60bc, 0x6295, 0x642d, 0x6771, 0x6843, 0x68bc, 0x68df, 0x76d7, 0x6dd8, 0x6e6f, 0x6d9b, 0x706f, 0x71c8, 0x5f53, 0x75d8, 0x7977, 0x7b49, 0x7b54, 0x7b52, 0x7cd6, 0x7d71, 0x5230, 0x8463, 0x8569, 0x85e4, 0x8a0e, 0x8b04, 0x8c46, 0x8e0f, 0x9003, 0x900f, 0x9419, 0x9676, 0x982d, 0x9a30, 0x95d8, 0x50cd, 0x52d5, 0x540c, 0x5802, 0x5c0e, 0x61a7, 0x649e, 0x6d1e, 0x77b3, 0x7ae5, 0x80f4, 0x8404, 0x9053, 0x9285, 0x5ce0, 0x9d07, 0x533f, 0x5f97, 0x5fb3, 0x6d9c, 0x7279, 0x7763, 0x79bf, 0x7be4, 0x6bd2, 0x72ec, 0x8aad, 0x6803, 0x6a61, 0x51f8, 0x7a81, 0x6934, 0x5c4a, 0x9cf6, 0x82eb, 0x5bc5, 0x9149, 0x701e, 0x5678, 0x5c6f, 0x60c7, 0x6566, 0x6c8c, 0x8c5a, 0x9041, 0x9813, 0x5451, 0x66c7, 0x920d, 0x5948, 0x90a3, 0x5185, 0x4e4d, 0x51ea, 0x8599, 0x8b0e, 0x7058, 0x637a, 0x934b, 0x6962, 0x99b4, 0x7e04, 0x7577, 0x5357, 0x6960, 0x8edf, 0x96e3, 0x6c5d, 0x4e8c, 0x5c3c, 0x5f10, 0x8fe9, 0x5302, 0x8cd1, 0x8089, 0x8679, 0x5eff, 0x65e5, 0x4e73, 0x5165 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9440[ 189 ] = { 0x5982, 0x5c3f, 0x97ee, 0x4efb, 0x598a, 0x5fcd, 0x8a8d, 0x6fe1, 0x79b0, 0x7962, 0x5be7, 0x8471, 0x732b, 0x71b1, 0x5e74, 0x5ff5, 0x637b, 0x649a, 0x71c3, 0x7c98, 0x4e43, 0x5efc, 0x4e4b, 0x57dc, 0x56a2, 0x60a9, 0x6fc3, 0x7d0d, 0x80fd, 0x8133, 0x81bf, 0x8fb2, 0x8997, 0x86a4, 0x5df4, 0x628a, 0x64ad, 0x8987, 0x6777, 0x6ce2, 0x6d3e, 0x7436, 0x7834, 0x5a46, 0x7f75, 0x82ad, 0x99ac, 0x4ff3, 0x5ec3, 0x62dd, 0x6392, 0x6557, 0x676f, 0x76c3, 0x724c, 0x80cc, 0x80ba, 0x8f29, 0x914d, 0x500d, 0x57f9, 0x5a92, 0x6885, 0xfffd, 0x6973, 0x7164, 0x72fd, 0x8cb7, 0x58f2, 0x8ce0, 0x966a, 0x9019, 0x877f, 0x79e4, 0x77e7, 0x8429, 0x4f2f, 0x5265, 0x535a, 0x62cd, 0x67cf, 0x6cca, 0x767d, 0x7b94, 0x7c95, 0x8236, 0x8584, 0x8feb, 0x66dd, 0x6f20, 0x7206, 0x7e1b, 0x83ab, 0x99c1, 0x9ea6, 0x51fd, 0x7bb1, 0x7872, 0x7bb8, 0x8087, 0x7b48, 0x6ae8, 0x5e61, 0x808c, 0x7551, 0x7560, 0x516b, 0x9262, 0x6e8c, 0x767a, 0x9197, 0x9aea, 0x4f10, 0x7f70, 0x629c, 0x7b4f, 0x95a5, 0x9ce9, 0x567a, 0x5859, 0x86e4, 0x96bc, 0x4f34, 0x5224, 0x534a, 0x53cd, 0x53db, 0x5e06, 0x642c, 0x6591, 0x677f, 0x6c3e, 0x6c4e, 0x7248, 0x72af, 0x73ed, 0x7554, 0x7e41, 0x822c, 0x85e9, 0x8ca9, 0x7bc4, 0x91c6, 0x7169, 0x9812, 0x98ef, 0x633d, 0x6669, 0x756a, 0x76e4, 0x78d0, 0x8543, 0x86ee, 0x532a, 0x5351, 0x5426, 0x5983, 0x5e87, 0x5f7c, 0x60b2, 0x6249, 0x6279, 0x62ab, 0x6590, 0x6bd4, 0x6ccc, 0x75b2, 0x76ae, 0x7891, 0x79d8, 0x7dcb, 0x7f77, 0x80a5, 0x88ab, 0x8ab9, 0x8cbb, 0x907f, 0x975e, 0x98db, 0x6a0b, 0x7c38, 0x5099, 0x5c3e, 0x5fae, 0x6787, 0x6bd8, 0x7435, 0x7709, 0x7f8e }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9540[ 189 ] = { 0x9f3b, 0x67ca, 0x7a17, 0x5339, 0x758b, 0x9aed, 0x5f66, 0x819d, 0x83f1, 0x8098, 0x5f3c, 0x5fc5, 0x7562, 0x7b46, 0x903c, 0x6867, 0x59eb, 0x5a9b, 0x7d10, 0x767e, 0x8b2c, 0x4ff5, 0x5f6a, 0x6a19, 0x6c37, 0x6f02, 0x74e2, 0x7968, 0x8868, 0x8a55, 0x8c79, 0x5edf, 0x63cf, 0x75c5, 0x79d2, 0x82d7, 0x9328, 0x92f2, 0x849c, 0x86ed, 0x9c2d, 0x54c1, 0x5f6c, 0x658c, 0x6d5c, 0x7015, 0x8ca7, 0x8cd3, 0x983b, 0x654f, 0x74f6, 0x4e0d, 0x4ed8, 0x57e0, 0x592b, 0x5a66, 0x5bcc, 0x51a8, 0x5e03, 0x5e9c, 0x6016, 0x6276, 0x6577, 0xfffd, 0x65a7, 0x666e, 0x6d6e, 0x7236, 0x7b26, 0x8150, 0x819a, 0x8299, 0x8b5c, 0x8ca0, 0x8ce6, 0x8d74, 0x961c, 0x9644, 0x4fae, 0x64ab, 0x6b66, 0x821e, 0x8461, 0x856a, 0x90e8, 0x5c01, 0x6953, 0x98a8, 0x847a, 0x8557, 0x4f0f, 0x526f, 0x5fa9, 0x5e45, 0x670d, 0x798f, 0x8179, 0x8907, 0x8986, 0x6df5, 0x5f17, 0x6255, 0x6cb8, 0x4ecf, 0x7269, 0x9b92, 0x5206, 0x543b, 0x5674, 0x58b3, 0x61a4, 0x626e, 0x711a, 0x596e, 0x7c89, 0x7cde, 0x7d1b, 0x96f0, 0x6587, 0x805e, 0x4e19, 0x4f75, 0x5175, 0x5840, 0x5e63, 0x5e73, 0x5f0a, 0x67c4, 0x4e26, 0x853d, 0x9589, 0x965b, 0x7c73, 0x9801, 0x50fb, 0x58c1, 0x7656, 0x78a7, 0x5225, 0x77a5, 0x8511, 0x7b86, 0x504f, 0x5909, 0x7247, 0x7bc7, 0x7de8, 0x8fba, 0x8fd4, 0x904d, 0x4fbf, 0x52c9, 0x5a29, 0x5f01, 0x97ad, 0x4fdd, 0x8217, 0x92ea, 0x5703, 0x6355, 0x6b69, 0x752b, 0x88dc, 0x8f14, 0x7a42, 0x52df, 0x5893, 0x6155, 0x620a, 0x66ae, 0x6bcd, 0x7c3f, 0x83e9, 0x5023, 0x4ff8, 0x5305, 0x5446, 0x5831, 0x5949, 0x5b9d, 0x5cf0, 0x5cef, 0x5d29, 0x5e96, 0x62b1, 0x6367, 0x653e, 0x65b9, 0x670b }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9640[ 189 ] = { 0x6cd5, 0x6ce1, 0x70f9, 0x7832, 0x7e2b, 0x80de, 0x82b3, 0x840c, 0x84ec, 0x8702, 0x8912, 0x8a2a, 0x8c4a, 0x90a6, 0x92d2, 0x98fd, 0x9cf3, 0x9d6c, 0x4e4f, 0x4ea1, 0x508d, 0x5256, 0x574a, 0x59a8, 0x5e3d, 0x5fd8, 0x5fd9, 0x623f, 0x66b4, 0x671b, 0x67d0, 0x68d2, 0x5192, 0x7d21, 0x80aa, 0x81a8, 0x8b00, 0x8c8c, 0x8cbf, 0x927e, 0x9632, 0x5420, 0x982c, 0x5317, 0x50d5, 0x535c, 0x58a8, 0x64b2, 0x6734, 0x7267, 0x7766, 0x7a46, 0x91e6, 0x52c3, 0x6ca1, 0x6b86, 0x5800, 0x5e4c, 0x5954, 0x672c, 0x7ffb, 0x51e1, 0x76c6, 0xfffd, 0x6469, 0x78e8, 0x9b54, 0x9ebb, 0x57cb, 0x59b9, 0x6627, 0x679a, 0x6bce, 0x54e9, 0x69d9, 0x5e55, 0x819c, 0x6795, 0x9baa, 0x67fe, 0x9c52, 0x685d, 0x4ea6, 0x4fe3, 0x53c8, 0x62b9, 0x672b, 0x6cab, 0x8fc4, 0x4fad, 0x7e6d, 0x9ebf, 0x4e07, 0x6162, 0x6e80, 0x6f2b, 0x8513, 0x5473, 0x672a, 0x9b45, 0x5df3, 0x7b95, 0x5cac, 0x5bc6, 0x871c, 0x6e4a, 0x84d1, 0x7a14, 0x8108, 0x5999, 0x7c8d, 0x6c11, 0x7720, 0x52d9, 0x5922, 0x7121, 0x725f, 0x77db, 0x9727, 0x9d61, 0x690b, 0x5a7f, 0x5a18, 0x51a5, 0x540d, 0x547d, 0x660e, 0x76df, 0x8ff7, 0x9298, 0x9cf4, 0x59ea, 0x725d, 0x6ec5, 0x514d, 0x68c9, 0x7dbf, 0x7dec, 0x9762, 0x9eba, 0x6478, 0x6a21, 0x8302, 0x5984, 0x5b5f, 0x6bdb, 0x731b, 0x76f2, 0x7db2, 0x8017, 0x8499, 0x5132, 0x6728, 0x9ed9, 0x76ee, 0x6762, 0x52ff, 0x9905, 0x5c24, 0x623b, 0x7c7e, 0x8cb0, 0x554f, 0x60b6, 0x7d0b, 0x9580, 0x5301, 0x4e5f, 0x51b6, 0x591c, 0x723a, 0x8036, 0x91ce, 0x5f25, 0x77e2, 0x5384, 0x5f79, 0x7d04, 0x85ac, 0x8a33, 0x8e8d, 0x9756, 0x67f3, 0x85ae, 0x9453, 0x6109, 0x6108, 0x6cb9, 0x7652 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9740[ 189 ] = { 0x8aed, 0x8f38, 0x552f, 0x4f51, 0x512a, 0x52c7, 0x53cb, 0x5ba5, 0x5e7d, 0x60a0, 0x6182, 0x63d6, 0x6709, 0x67da, 0x6e67, 0x6d8c, 0x7336, 0x7337, 0x7531, 0x7950, 0x88d5, 0x8a98, 0x904a, 0x9091, 0x90f5, 0x96c4, 0x878d, 0x5915, 0x4e88, 0x4f59, 0x4e0e, 0x8a89, 0x8f3f, 0x9810, 0x50ad, 0x5e7c, 0x5996, 0x5bb9, 0x5eb8, 0x63da, 0x63fa, 0x64c1, 0x66dc, 0x694a, 0x69d8, 0x6d0b, 0x6eb6, 0x7194, 0x7528, 0x7aaf, 0x7f8a, 0x8000, 0x8449, 0x84c9, 0x8981, 0x8b21, 0x8e0a, 0x9065, 0x967d, 0x990a, 0x617e, 0x6291, 0x6b32, 0xfffd, 0x6c83, 0x6d74, 0x7fcc, 0x7ffc, 0x6dc0, 0x7f85, 0x87ba, 0x88f8, 0x6765, 0x83b1, 0x983c, 0x96f7, 0x6d1b, 0x7d61, 0x843d, 0x916a, 0x4e71, 0x5375, 0x5d50, 0x6b04, 0x6feb, 0x85cd, 0x862d, 0x89a7, 0x5229, 0x540f, 0x5c65, 0x674e, 0x68a8, 0x7406, 0x7483, 0x75e2, 0x88cf, 0x88e1, 0x91cc, 0x96e2, 0x9678, 0x5f8b, 0x7387, 0x7acb, 0x844e, 0x63a0, 0x7565, 0x5289, 0x6d41, 0x6e9c, 0x7409, 0x7559, 0x786b, 0x7c92, 0x9686, 0x7adc, 0x9f8d, 0x4fb6, 0x616e, 0x65c5, 0x865c, 0x4e86, 0x4eae, 0x50da, 0x4e21, 0x51cc, 0x5bee, 0x6599, 0x6881, 0x6dbc, 0x731f, 0x7642, 0x77ad, 0x7a1c, 0x7ce7, 0x826f, 0x8ad2, 0x907c, 0x91cf, 0x9675, 0x9818, 0x529b, 0x7dd1, 0x502b, 0x5398, 0x6797, 0x6dcb, 0x71d0, 0x7433, 0x81e8, 0x8f2a, 0x96a3, 0x9c57, 0x9e9f, 0x7460, 0x5841, 0x6d99, 0x7d2f, 0x985e, 0x4ee4, 0x4f36, 0x4f8b, 0x51b7, 0x52b1, 0x5dba, 0x601c, 0x73b2, 0x793c, 0x82d3, 0x9234, 0x96b7, 0x96f6, 0x970a, 0x9e97, 0x9f62, 0x66a6, 0x6b74, 0x5217, 0x52a3, 0x70c8, 0x88c2, 0x5ec9, 0x604b, 0x6190, 0x6f23, 0x7149, 0x7c3e, 0x7df4, 0x806f }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9840[ 51 ] = { 0x84ee, 0x9023, 0x932c, 0x5442, 0x9b6f, 0x6ad3, 0x7089, 0x8cc2, 0x8def, 0x9732, 0x52b4, 0x5a41, 0x5eca, 0x5f04, 0x6717, 0x697c, 0x6994, 0x6d6a, 0x6f0f, 0x7262, 0x72fc, 0x7bed, 0x8001, 0x807e, 0x874b, 0x90ce, 0x516d, 0x9e93, 0x7984, 0x808b, 0x9332, 0x8ad6, 0x502d, 0x548c, 0x8a71, 0x6b6a, 0x8cc4, 0x8107, 0x60d1, 0x67a0, 0x9df2, 0x4e99, 0x4e98, 0x9c10, 0x8a6b, 0x85c1, 0x8568, 0x6900, 0x6e7e, 0x7897, 0x8155 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x989f[ 94 ] = { 0x5f0c, 0x4e10, 0x4e15, 0x4e2a, 0x4e31, 0x4e36, 0x4e3c, 0x4e3f, 0x4e42, 0x4e56, 0x4e58, 0x4e82, 0x4e85, 0x8c6b, 0x4e8a, 0x8212, 0x5f0d, 0x4e8e, 0x4e9e, 0x4e9f, 0x4ea0, 0x4ea2, 0x4eb0, 0x4eb3, 0x4eb6, 0x4ece, 0x4ecd, 0x4ec4, 0x4ec6, 0x4ec2, 0x4ed7, 0x4ede, 0x4eed, 0x4edf, 0x4ef7, 0x4f09, 0x4f5a, 0x4f30, 0x4f5b, 0x4f5d, 0x4f57, 0x4f47, 0x4f76, 0x4f88, 0x4f8f, 0x4f98, 0x4f7b, 0x4f69, 0x4f70, 0x4f91, 0x4f6f, 0x4f86, 0x4f96, 0x5118, 0x4fd4, 0x4fdf, 0x4fce, 0x4fd8, 0x4fdb, 0x4fd1, 0x4fda, 0x4fd0, 0x4fe4, 0x4fe5, 0x501a, 0x5028, 0x5014, 0x502a, 0x5025, 0x5005, 0x4f1c, 0x4ff6, 0x5021, 0x5029, 0x502c, 0x4ffe, 0x4fef, 0x5011, 0x5006, 0x5043, 0x5047, 0x6703, 0x5055, 0x5050, 0x5048, 0x505a, 0x5056, 0x506c, 0x5078, 0x5080, 0x509a, 0x5085, 0x50b4, 0x50b2 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9940[ 189 ] = { 0x50c9, 0x50ca, 0x50b3, 0x50c2, 0x50d6, 0x50de, 0x50e5, 0x50ed, 0x50e3, 0x50ee, 0x50f9, 0x50f5, 0x5109, 0x5101, 0x5102, 0x5116, 0x5115, 0x5114, 0x511a, 0x5121, 0x513a, 0x5137, 0x513c, 0x513b, 0x513f, 0x5140, 0x5152, 0x514c, 0x5154, 0x5162, 0x7af8, 0x5169, 0x516a, 0x516e, 0x5180, 0x5182, 0x56d8, 0x518c, 0x5189, 0x518f, 0x5191, 0x5193, 0x5195, 0x5196, 0x51a4, 0x51a6, 0x51a2, 0x51a9, 0x51aa, 0x51ab, 0x51b3, 0x51b1, 0x51b2, 0x51b0, 0x51b5, 0x51bd, 0x51c5, 0x51c9, 0x51db, 0x51e0, 0x8655, 0x51e9, 0x51ed, 0xfffd, 0x51f0, 0x51f5, 0x51fe, 0x5204, 0x520b, 0x5214, 0x520e, 0x5227, 0x522a, 0x522e, 0x5233, 0x5239, 0x524f, 0x5244, 0x524b, 0x524c, 0x525e, 0x5254, 0x526a, 0x5274, 0x5269, 0x5273, 0x527f, 0x527d, 0x528d, 0x5294, 0x5292, 0x5271, 0x5288, 0x5291, 0x8fa8, 0x8fa7, 0x52ac, 0x52ad, 0x52bc, 0x52b5, 0x52c1, 0x52cd, 0x52d7, 0x52de, 0x52e3, 0x52e6, 0x98ed, 0x52e0, 0x52f3, 0x52f5, 0x52f8, 0x52f9, 0x5306, 0x5308, 0x7538, 0x530d, 0x5310, 0x530f, 0x5315, 0x531a, 0x5323, 0x532f, 0x5331, 0x5333, 0x5338, 0x5340, 0x5346, 0x5345, 0x4e17, 0x5349, 0x534d, 0x51d6, 0x535e, 0x5369, 0x536e, 0x5918, 0x537b, 0x5377, 0x5382, 0x5396, 0x53a0, 0x53a6, 0x53a5, 0x53ae, 0x53b0, 0x53b6, 0x53c3, 0x7c12, 0x96d9, 0x53df, 0x66fc, 0x71ee, 0x53ee, 0x53e8, 0x53ed, 0x53fa, 0x5401, 0x543d, 0x5440, 0x542c, 0x542d, 0x543c, 0x542e, 0x5436, 0x5429, 0x541d, 0x544e, 0x548f, 0x5475, 0x548e, 0x545f, 0x5471, 0x5477, 0x5470, 0x5492, 0x547b, 0x5480, 0x5476, 0x5484, 0x5490, 0x5486, 0x54c7, 0x54a2, 0x54b8, 0x54a5, 0x54ac, 0x54c4, 0x54c8, 0x54a8 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9a40[ 189 ] = { 0x54ab, 0x54c2, 0x54a4, 0x54be, 0x54bc, 0x54d8, 0x54e5, 0x54e6, 0x550f, 0x5514, 0x54fd, 0x54ee, 0x54ed, 0x54fa, 0x54e2, 0x5539, 0x5540, 0x5563, 0x554c, 0x552e, 0x555c, 0x5545, 0x5556, 0x5557, 0x5538, 0x5533, 0x555d, 0x5599, 0x5580, 0x54af, 0x558a, 0x559f, 0x557b, 0x557e, 0x5598, 0x559e, 0x55ae, 0x557c, 0x5583, 0x55a9, 0x5587, 0x55a8, 0x55da, 0x55c5, 0x55df, 0x55c4, 0x55dc, 0x55e4, 0x55d4, 0x5614, 0x55f7, 0x5616, 0x55fe, 0x55fd, 0x561b, 0x55f9, 0x564e, 0x5650, 0x71df, 0x5634, 0x5636, 0x5632, 0x5638, 0xfffd, 0x566b, 0x5664, 0x562f, 0x566c, 0x566a, 0x5686, 0x5680, 0x568a, 0x56a0, 0x5694, 0x568f, 0x56a5, 0x56ae, 0x56b6, 0x56b4, 0x56c2, 0x56bc, 0x56c1, 0x56c3, 0x56c0, 0x56c8, 0x56ce, 0x56d1, 0x56d3, 0x56d7, 0x56ee, 0x56f9, 0x5700, 0x56ff, 0x5704, 0x5709, 0x5708, 0x570b, 0x570d, 0x5713, 0x5718, 0x5716, 0x55c7, 0x571c, 0x5726, 0x5737, 0x5738, 0x574e, 0x573b, 0x5740, 0x574f, 0x5769, 0x57c0, 0x5788, 0x5761, 0x577f, 0x5789, 0x5793, 0x57a0, 0x57b3, 0x57a4, 0x57aa, 0x57b0, 0x57c3, 0x57c6, 0x57d4, 0x57d2, 0x57d3, 0x580a, 0x57d6, 0x57e3, 0x580b, 0x5819, 0x581d, 0x5872, 0x5821, 0x5862, 0x584b, 0x5870, 0x6bc0, 0x5852, 0x583d, 0x5879, 0x5885, 0x58b9, 0x589f, 0x58ab, 0x58ba, 0x58de, 0x58bb, 0x58b8, 0x58ae, 0x58c5, 0x58d3, 0x58d1, 0x58d7, 0x58d9, 0x58d8, 0x58e5, 0x58dc, 0x58e4, 0x58df, 0x58ef, 0x58fa, 0x58f9, 0x58fb, 0x58fc, 0x58fd, 0x5902, 0x590a, 0x5910, 0x591b, 0x68a6, 0x5925, 0x592c, 0x592d, 0x5932, 0x5938, 0x593e, 0x7ad2, 0x5955, 0x5950, 0x594e, 0x595a, 0x5958, 0x5962, 0x5960, 0x5967, 0x596c, 0x5969 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9b40[ 189 ] = { 0x5978, 0x5981, 0x599d, 0x4f5e, 0x4fab, 0x59a3, 0x59b2, 0x59c6, 0x59e8, 0x59dc, 0x598d, 0x59d9, 0x59da, 0x5a25, 0x5a1f, 0x5a11, 0x5a1c, 0x5a09, 0x5a1a, 0x5a40, 0x5a6c, 0x5a49, 0x5a35, 0x5a36, 0x5a62, 0x5a6a, 0x5a9a, 0x5abc, 0x5abe, 0x5acb, 0x5ac2, 0x5abd, 0x5ae3, 0x5ad7, 0x5ae6, 0x5ae9, 0x5ad6, 0x5afa, 0x5afb, 0x5b0c, 0x5b0b, 0x5b16, 0x5b32, 0x5ad0, 0x5b2a, 0x5b36, 0x5b3e, 0x5b43, 0x5b45, 0x5b40, 0x5b51, 0x5b55, 0x5b5a, 0x5b5b, 0x5b65, 0x5b69, 0x5b70, 0x5b73, 0x5b75, 0x5b78, 0x6588, 0x5b7a, 0x5b80, 0xfffd, 0x5b83, 0x5ba6, 0x5bb8, 0x5bc3, 0x5bc7, 0x5bc9, 0x5bd4, 0x5bd0, 0x5be4, 0x5be6, 0x5be2, 0x5bde, 0x5be5, 0x5beb, 0x5bf0, 0x5bf6, 0x5bf3, 0x5c05, 0x5c07, 0x5c08, 0x5c0d, 0x5c13, 0x5c20, 0x5c22, 0x5c28, 0x5c38, 0x5c39, 0x5c41, 0x5c46, 0x5c4e, 0x5c53, 0x5c50, 0x5c4f, 0x5b71, 0x5c6c, 0x5c6e, 0x4e62, 0x5c76, 0x5c79, 0x5c8c, 0x5c91, 0x5c94, 0x599b, 0x5cab, 0x5cbb, 0x5cb6, 0x5cbc, 0x5cb7, 0x5cc5, 0x5cbe, 0x5cc7, 0x5cd9, 0x5ce9, 0x5cfd, 0x5cfa, 0x5ced, 0x5d8c, 0x5cea, 0x5d0b, 0x5d15, 0x5d17, 0x5d5c, 0x5d1f, 0x5d1b, 0x5d11, 0x5d14, 0x5d22, 0x5d1a, 0x5d19, 0x5d18, 0x5d4c, 0x5d52, 0x5d4e, 0x5d4b, 0x5d6c, 0x5d73, 0x5d76, 0x5d87, 0x5d84, 0x5d82, 0x5da2, 0x5d9d, 0x5dac, 0x5dae, 0x5dbd, 0x5d90, 0x5db7, 0x5dbc, 0x5dc9, 0x5dcd, 0x5dd3, 0x5dd2, 0x5dd6, 0x5ddb, 0x5deb, 0x5df2, 0x5df5, 0x5e0b, 0x5e1a, 0x5e19, 0x5e11, 0x5e1b, 0x5e36, 0x5e37, 0x5e44, 0x5e43, 0x5e40, 0x5e4e, 0x5e57, 0x5e54, 0x5e5f, 0x5e62, 0x5e64, 0x5e47, 0x5e75, 0x5e76, 0x5e7a, 0x9ebc, 0x5e7f, 0x5ea0, 0x5ec1, 0x5ec2, 0x5ec8, 0x5ed0, 0x5ecf }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9c40[ 189 ] = { 0x5ed6, 0x5ee3, 0x5edd, 0x5eda, 0x5edb, 0x5ee2, 0x5ee1, 0x5ee8, 0x5ee9, 0x5eec, 0x5ef1, 0x5ef3, 0x5ef0, 0x5ef4, 0x5ef8, 0x5efe, 0x5f03, 0x5f09, 0x5f5d, 0x5f5c, 0x5f0b, 0x5f11, 0x5f16, 0x5f29, 0x5f2d, 0x5f38, 0x5f41, 0x5f48, 0x5f4c, 0x5f4e, 0x5f2f, 0x5f51, 0x5f56, 0x5f57, 0x5f59, 0x5f61, 0x5f6d, 0x5f73, 0x5f77, 0x5f83, 0x5f82, 0x5f7f, 0x5f8a, 0x5f88, 0x5f91, 0x5f87, 0x5f9e, 0x5f99, 0x5f98, 0x5fa0, 0x5fa8, 0x5fad, 0x5fbc, 0x5fd6, 0x5ffb, 0x5fe4, 0x5ff8, 0x5ff1, 0x5fdd, 0x60b3, 0x5fff, 0x6021, 0x6060, 0xfffd, 0x6019, 0x6010, 0x6029, 0x600e, 0x6031, 0x601b, 0x6015, 0x602b, 0x6026, 0x600f, 0x603a, 0x605a, 0x6041, 0x606a, 0x6077, 0x605f, 0x604a, 0x6046, 0x604d, 0x6063, 0x6043, 0x6064, 0x6042, 0x606c, 0x606b, 0x6059, 0x6081, 0x608d, 0x60e7, 0x6083, 0x609a, 0x6084, 0x609b, 0x6096, 0x6097, 0x6092, 0x60a7, 0x608b, 0x60e1, 0x60b8, 0x60e0, 0x60d3, 0x60b4, 0x5ff0, 0x60bd, 0x60c6, 0x60b5, 0x60d8, 0x614d, 0x6115, 0x6106, 0x60f6, 0x60f7, 0x6100, 0x60f4, 0x60fa, 0x6103, 0x6121, 0x60fb, 0x60f1, 0x610d, 0x610e, 0x6147, 0x613e, 0x6128, 0x6127, 0x614a, 0x613f, 0x613c, 0x612c, 0x6134, 0x613d, 0x6142, 0x6144, 0x6173, 0x6177, 0x6158, 0x6159, 0x615a, 0x616b, 0x6174, 0x616f, 0x6165, 0x6171, 0x615f, 0x615d, 0x6153, 0x6175, 0x6199, 0x6196, 0x6187, 0x61ac, 0x6194, 0x619a, 0x618a, 0x6191, 0x61ab, 0x61ae, 0x61cc, 0x61ca, 0x61c9, 0x61f7, 0x61c8, 0x61c3, 0x61c6, 0x61ba, 0x61cb, 0x7f79, 0x61cd, 0x61e6, 0x61e3, 0x61f6, 0x61fa, 0x61f4, 0x61ff, 0x61fd, 0x61fc, 0x61fe, 0x6200, 0x6208, 0x6209, 0x620d, 0x620c, 0x6214, 0x621b }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9d40[ 189 ] = { 0x621e, 0x6221, 0x622a, 0x622e, 0x6230, 0x6232, 0x6233, 0x6241, 0x624e, 0x625e, 0x6263, 0x625b, 0x6260, 0x6268, 0x627c, 0x6282, 0x6289, 0x627e, 0x6292, 0x6293, 0x6296, 0x62d4, 0x6283, 0x6294, 0x62d7, 0x62d1, 0x62bb, 0x62cf, 0x62ff, 0x62c6, 0x64d4, 0x62c8, 0x62dc, 0x62cc, 0x62ca, 0x62c2, 0x62c7, 0x629b, 0x62c9, 0x630c, 0x62ee, 0x62f1, 0x6327, 0x6302, 0x6308, 0x62ef, 0x62f5, 0x6350, 0x633e, 0x634d, 0x641c, 0x634f, 0x6396, 0x638e, 0x6380, 0x63ab, 0x6376, 0x63a3, 0x638f, 0x6389, 0x639f, 0x63b5, 0x636b, 0xfffd, 0x6369, 0x63be, 0x63e9, 0x63c0, 0x63c6, 0x63e3, 0x63c9, 0x63d2, 0x63f6, 0x63c4, 0x6416, 0x6434, 0x6406, 0x6413, 0x6426, 0x6436, 0x651d, 0x6417, 0x6428, 0x640f, 0x6467, 0x646f, 0x6476, 0x644e, 0x652a, 0x6495, 0x6493, 0x64a5, 0x64a9, 0x6488, 0x64bc, 0x64da, 0x64d2, 0x64c5, 0x64c7, 0x64bb, 0x64d8, 0x64c2, 0x64f1, 0x64e7, 0x8209, 0x64e0, 0x64e1, 0x62ac, 0x64e3, 0x64ef, 0x652c, 0x64f6, 0x64f4, 0x64f2, 0x64fa, 0x6500, 0x64fd, 0x6518, 0x651c, 0x6505, 0x6524, 0x6523, 0x652b, 0x6534, 0x6535, 0x6537, 0x6536, 0x6538, 0x754b, 0x6548, 0x6556, 0x6555, 0x654d, 0x6558, 0x655e, 0x655d, 0x6572, 0x6578, 0x6582, 0x6583, 0x8b8a, 0x659b, 0x659f, 0x65ab, 0x65b7, 0x65c3, 0x65c6, 0x65c1, 0x65c4, 0x65cc, 0x65d2, 0x65db, 0x65d9, 0x65e0, 0x65e1, 0x65f1, 0x6772, 0x660a, 0x6603, 0x65fb, 0x6773, 0x6635, 0x6636, 0x6634, 0x661c, 0x664f, 0x6644, 0x6649, 0x6641, 0x665e, 0x665d, 0x6664, 0x6667, 0x6668, 0x665f, 0x6662, 0x6670, 0x6683, 0x6688, 0x668e, 0x6689, 0x6684, 0x6698, 0x669d, 0x66c1, 0x66b9, 0x66c9, 0x66be, 0x66bc }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9e40[ 189 ] = { 0x66c4, 0x66b8, 0x66d6, 0x66da, 0x66e0, 0x663f, 0x66e6, 0x66e9, 0x66f0, 0x66f5, 0x66f7, 0x670f, 0x6716, 0x671e, 0x6726, 0x6727, 0x9738, 0x672e, 0x673f, 0x6736, 0x6741, 0x6738, 0x6737, 0x6746, 0x675e, 0x6760, 0x6759, 0x6763, 0x6764, 0x6789, 0x6770, 0x67a9, 0x677c, 0x676a, 0x678c, 0x678b, 0x67a6, 0x67a1, 0x6785, 0x67b7, 0x67ef, 0x67b4, 0x67ec, 0x67b3, 0x67e9, 0x67b8, 0x67e4, 0x67de, 0x67dd, 0x67e2, 0x67ee, 0x67b9, 0x67ce, 0x67c6, 0x67e7, 0x6a9c, 0x681e, 0x6846, 0x6829, 0x6840, 0x684d, 0x6832, 0x684e, 0xfffd, 0x68b3, 0x682b, 0x6859, 0x6863, 0x6877, 0x687f, 0x689f, 0x688f, 0x68ad, 0x6894, 0x689d, 0x689b, 0x6883, 0x6aae, 0x68b9, 0x6874, 0x68b5, 0x68a0, 0x68ba, 0x690f, 0x688d, 0x687e, 0x6901, 0x68ca, 0x6908, 0x68d8, 0x6922, 0x6926, 0x68e1, 0x690c, 0x68cd, 0x68d4, 0x68e7, 0x68d5, 0x6936, 0x6912, 0x6904, 0x68d7, 0x68e3, 0x6925, 0x68f9, 0x68e0, 0x68ef, 0x6928, 0x692a, 0x691a, 0x6923, 0x6921, 0x68c6, 0x6979, 0x6977, 0x695c, 0x6978, 0x696b, 0x6954, 0x697e, 0x696e, 0x6939, 0x6974, 0x693d, 0x6959, 0x6930, 0x6961, 0x695e, 0x695d, 0x6981, 0x696a, 0x69b2, 0x69ae, 0x69d0, 0x69bf, 0x69c1, 0x69d3, 0x69be, 0x69ce, 0x5be8, 0x69ca, 0x69dd, 0x69bb, 0x69c3, 0x69a7, 0x6a2e, 0x6991, 0x69a0, 0x699c, 0x6995, 0x69b4, 0x69de, 0x69e8, 0x6a02, 0x6a1b, 0x69ff, 0x6b0a, 0x69f9, 0x69f2, 0x69e7, 0x6a05, 0x69b1, 0x6a1e, 0x69ed, 0x6a14, 0x69eb, 0x6a0a, 0x6a12, 0x6ac1, 0x6a23, 0x6a13, 0x6a44, 0x6a0c, 0x6a72, 0x6a36, 0x6a78, 0x6a47, 0x6a62, 0x6a59, 0x6a66, 0x6a48, 0x6a38, 0x6a22, 0x6a90, 0x6a8d, 0x6aa0, 0x6a84, 0x6aa2, 0x6aa3 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9f40[ 189 ] = { 0x6a97, 0x8617, 0x6abb, 0x6ac3, 0x6ac2, 0x6ab8, 0x6ab3, 0x6aac, 0x6ade, 0x6ad1, 0x6adf, 0x6aaa, 0x6ada, 0x6aea, 0x6afb, 0x6b05, 0x8616, 0x6afa, 0x6b12, 0x6b16, 0x9b31, 0x6b1f, 0x6b38, 0x6b37, 0x76dc, 0x6b39, 0x98ee, 0x6b47, 0x6b43, 0x6b49, 0x6b50, 0x6b59, 0x6b54, 0x6b5b, 0x6b5f, 0x6b61, 0x6b78, 0x6b79, 0x6b7f, 0x6b80, 0x6b84, 0x6b83, 0x6b8d, 0x6b98, 0x6b95, 0x6b9e, 0x6ba4, 0x6baa, 0x6bab, 0x6baf, 0x6bb2, 0x6bb1, 0x6bb3, 0x6bb7, 0x6bbc, 0x6bc6, 0x6bcb, 0x6bd3, 0x6bdf, 0x6bec, 0x6beb, 0x6bf3, 0x6bef, 0xfffd, 0x9ebe, 0x6c08, 0x6c13, 0x6c14, 0x6c1b, 0x6c24, 0x6c23, 0x6c5e, 0x6c55, 0x6c62, 0x6c6a, 0x6c82, 0x6c8d, 0x6c9a, 0x6c81, 0x6c9b, 0x6c7e, 0x6c68, 0x6c73, 0x6c92, 0x6c90, 0x6cc4, 0x6cf1, 0x6cd3, 0x6cbd, 0x6cd7, 0x6cc5, 0x6cdd, 0x6cae, 0x6cb1, 0x6cbe, 0x6cba, 0x6cdb, 0x6cef, 0x6cd9, 0x6cea, 0x6d1f, 0x884d, 0x6d36, 0x6d2b, 0x6d3d, 0x6d38, 0x6d19, 0x6d35, 0x6d33, 0x6d12, 0x6d0c, 0x6d63, 0x6d93, 0x6d64, 0x6d5a, 0x6d79, 0x6d59, 0x6d8e, 0x6d95, 0x6fe4, 0x6d85, 0x6df9, 0x6e15, 0x6e0a, 0x6db5, 0x6dc7, 0x6de6, 0x6db8, 0x6dc6, 0x6dec, 0x6dde, 0x6dcc, 0x6de8, 0x6dd2, 0x6dc5, 0x6dfa, 0x6dd9, 0x6de4, 0x6dd5, 0x6dea, 0x6dee, 0x6e2d, 0x6e6e, 0x6e2e, 0x6e19, 0x6e72, 0x6e5f, 0x6e3e, 0x6e23, 0x6e6b, 0x6e2b, 0x6e76, 0x6e4d, 0x6e1f, 0x6e43, 0x6e3a, 0x6e4e, 0x6e24, 0x6eff, 0x6e1d, 0x6e38, 0x6e82, 0x6eaa, 0x6e98, 0x6ec9, 0x6eb7, 0x6ed3, 0x6ebd, 0x6eaf, 0x6ec4, 0x6eb2, 0x6ed4, 0x6ed5, 0x6e8f, 0x6ea5, 0x6ec2, 0x6e9f, 0x6f41, 0x6f11, 0x704c, 0x6eec, 0x6ef8, 0x6efe, 0x6f3f, 0x6ef2, 0x6f31, 0x6eef, 0x6f32, 0x6ecc }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe040[ 189 ] = { 0x6f3e, 0x6f13, 0x6ef7, 0x6f86, 0x6f7a, 0x6f78, 0x6f81, 0x6f80, 0x6f6f, 0x6f5b, 0x6ff3, 0x6f6d, 0x6f82, 0x6f7c, 0x6f58, 0x6f8e, 0x6f91, 0x6fc2, 0x6f66, 0x6fb3, 0x6fa3, 0x6fa1, 0x6fa4, 0x6fb9, 0x6fc6, 0x6faa, 0x6fdf, 0x6fd5, 0x6fec, 0x6fd4, 0x6fd8, 0x6ff1, 0x6fee, 0x6fdb, 0x7009, 0x700b, 0x6ffa, 0x7011, 0x7001, 0x700f, 0x6ffe, 0x701b, 0x701a, 0x6f74, 0x701d, 0x7018, 0x701f, 0x7030, 0x703e, 0x7032, 0x7051, 0x7063, 0x7099, 0x7092, 0x70af, 0x70f1, 0x70ac, 0x70b8, 0x70b3, 0x70ae, 0x70df, 0x70cb, 0x70dd, 0xfffd, 0x70d9, 0x7109, 0x70fd, 0x711c, 0x7119, 0x7165, 0x7155, 0x7188, 0x7166, 0x7162, 0x714c, 0x7156, 0x716c, 0x718f, 0x71fb, 0x7184, 0x7195, 0x71a8, 0x71ac, 0x71d7, 0x71b9, 0x71be, 0x71d2, 0x71c9, 0x71d4, 0x71ce, 0x71e0, 0x71ec, 0x71e7, 0x71f5, 0x71fc, 0x71f9, 0x71ff, 0x720d, 0x7210, 0x721b, 0x7228, 0x722d, 0x722c, 0x7230, 0x7232, 0x723b, 0x723c, 0x723f, 0x7240, 0x7246, 0x724b, 0x7258, 0x7274, 0x727e, 0x7282, 0x7281, 0x7287, 0x7292, 0x7296, 0x72a2, 0x72a7, 0x72b9, 0x72b2, 0x72c3, 0x72c6, 0x72c4, 0x72ce, 0x72d2, 0x72e2, 0x72e0, 0x72e1, 0x72f9, 0x72f7, 0x500f, 0x7317, 0x730a, 0x731c, 0x7316, 0x731d, 0x7334, 0x732f, 0x7329, 0x7325, 0x733e, 0x734e, 0x734f, 0x9ed8, 0x7357, 0x736a, 0x7368, 0x7370, 0x7378, 0x7375, 0x737b, 0x737a, 0x73c8, 0x73b3, 0x73ce, 0x73bb, 0x73c0, 0x73e5, 0x73ee, 0x73de, 0x74a2, 0x7405, 0x746f, 0x7425, 0x73f8, 0x7432, 0x743a, 0x7455, 0x743f, 0x745f, 0x7459, 0x7441, 0x745c, 0x7469, 0x7470, 0x7463, 0x746a, 0x7476, 0x747e, 0x748b, 0x749e, 0x74a7, 0x74ca, 0x74cf, 0x74d4, 0x73f1 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe140[ 189 ] = { 0x74e0, 0x74e3, 0x74e7, 0x74e9, 0x74ee, 0x74f2, 0x74f0, 0x74f1, 0x74f8, 0x74f7, 0x7504, 0x7503, 0x7505, 0x750c, 0x750e, 0x750d, 0x7515, 0x7513, 0x751e, 0x7526, 0x752c, 0x753c, 0x7544, 0x754d, 0x754a, 0x7549, 0x755b, 0x7546, 0x755a, 0x7569, 0x7564, 0x7567, 0x756b, 0x756d, 0x7578, 0x7576, 0x7586, 0x7587, 0x7574, 0x758a, 0x7589, 0x7582, 0x7594, 0x759a, 0x759d, 0x75a5, 0x75a3, 0x75c2, 0x75b3, 0x75c3, 0x75b5, 0x75bd, 0x75b8, 0x75bc, 0x75b1, 0x75cd, 0x75ca, 0x75d2, 0x75d9, 0x75e3, 0x75de, 0x75fe, 0x75ff, 0xfffd, 0x75fc, 0x7601, 0x75f0, 0x75fa, 0x75f2, 0x75f3, 0x760b, 0x760d, 0x7609, 0x761f, 0x7627, 0x7620, 0x7621, 0x7622, 0x7624, 0x7634, 0x7630, 0x763b, 0x7647, 0x7648, 0x7646, 0x765c, 0x7658, 0x7661, 0x7662, 0x7668, 0x7669, 0x766a, 0x7667, 0x766c, 0x7670, 0x7672, 0x7676, 0x7678, 0x767c, 0x7680, 0x7683, 0x7688, 0x768b, 0x768e, 0x7696, 0x7693, 0x7699, 0x769a, 0x76b0, 0x76b4, 0x76b8, 0x76b9, 0x76ba, 0x76c2, 0x76cd, 0x76d6, 0x76d2, 0x76de, 0x76e1, 0x76e5, 0x76e7, 0x76ea, 0x862f, 0x76fb, 0x7708, 0x7707, 0x7704, 0x7729, 0x7724, 0x771e, 0x7725, 0x7726, 0x771b, 0x7737, 0x7738, 0x7747, 0x775a, 0x7768, 0x776b, 0x775b, 0x7765, 0x777f, 0x777e, 0x7779, 0x778e, 0x778b, 0x7791, 0x77a0, 0x779e, 0x77b0, 0x77b6, 0x77b9, 0x77bf, 0x77bc, 0x77bd, 0x77bb, 0x77c7, 0x77cd, 0x77d7, 0x77da, 0x77dc, 0x77e3, 0x77ee, 0x77fc, 0x780c, 0x7812, 0x7926, 0x7820, 0x792a, 0x7845, 0x788e, 0x7874, 0x7886, 0x787c, 0x789a, 0x788c, 0x78a3, 0x78b5, 0x78aa, 0x78af, 0x78d1, 0x78c6, 0x78cb, 0x78d4, 0x78be, 0x78bc, 0x78c5, 0x78ca, 0x78ec }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe240[ 189 ] = { 0x78e7, 0x78da, 0x78fd, 0x78f4, 0x7907, 0x7912, 0x7911, 0x7919, 0x792c, 0x792b, 0x7940, 0x7960, 0x7957, 0x795f, 0x795a, 0x7955, 0x7953, 0x797a, 0x797f, 0x798a, 0x799d, 0x79a7, 0x9f4b, 0x79aa, 0x79ae, 0x79b3, 0x79b9, 0x79ba, 0x79c9, 0x79d5, 0x79e7, 0x79ec, 0x79e1, 0x79e3, 0x7a08, 0x7a0d, 0x7a18, 0x7a19, 0x7a20, 0x7a1f, 0x7980, 0x7a31, 0x7a3b, 0x7a3e, 0x7a37, 0x7a43, 0x7a57, 0x7a49, 0x7a61, 0x7a62, 0x7a69, 0x9f9d, 0x7a70, 0x7a79, 0x7a7d, 0x7a88, 0x7a97, 0x7a95, 0x7a98, 0x7a96, 0x7aa9, 0x7ac8, 0x7ab0, 0xfffd, 0x7ab6, 0x7ac5, 0x7ac4, 0x7abf, 0x9083, 0x7ac7, 0x7aca, 0x7acd, 0x7acf, 0x7ad5, 0x7ad3, 0x7ad9, 0x7ada, 0x7add, 0x7ae1, 0x7ae2, 0x7ae6, 0x7aed, 0x7af0, 0x7b02, 0x7b0f, 0x7b0a, 0x7b06, 0x7b33, 0x7b18, 0x7b19, 0x7b1e, 0x7b35, 0x7b28, 0x7b36, 0x7b50, 0x7b7a, 0x7b04, 0x7b4d, 0x7b0b, 0x7b4c, 0x7b45, 0x7b75, 0x7b65, 0x7b74, 0x7b67, 0x7b70, 0x7b71, 0x7b6c, 0x7b6e, 0x7b9d, 0x7b98, 0x7b9f, 0x7b8d, 0x7b9c, 0x7b9a, 0x7b8b, 0x7b92, 0x7b8f, 0x7b5d, 0x7b99, 0x7bcb, 0x7bc1, 0x7bcc, 0x7bcf, 0x7bb4, 0x7bc6, 0x7bdd, 0x7be9, 0x7c11, 0x7c14, 0x7be6, 0x7be5, 0x7c60, 0x7c00, 0x7c07, 0x7c13, 0x7bf3, 0x7bf7, 0x7c17, 0x7c0d, 0x7bf6, 0x7c23, 0x7c27, 0x7c2a, 0x7c1f, 0x7c37, 0x7c2b, 0x7c3d, 0x7c4c, 0x7c43, 0x7c54, 0x7c4f, 0x7c40, 0x7c50, 0x7c58, 0x7c5f, 0x7c64, 0x7c56, 0x7c65, 0x7c6c, 0x7c75, 0x7c83, 0x7c90, 0x7ca4, 0x7cad, 0x7ca2, 0x7cab, 0x7ca1, 0x7ca8, 0x7cb3, 0x7cb2, 0x7cb1, 0x7cae, 0x7cb9, 0x7cbd, 0x7cc0, 0x7cc5, 0x7cc2, 0x7cd8, 0x7cd2, 0x7cdc, 0x7ce2, 0x9b3b, 0x7cef, 0x7cf2, 0x7cf4, 0x7cf6, 0x7cfa, 0x7d06 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe340[ 189 ] = { 0x7d02, 0x7d1c, 0x7d15, 0x7d0a, 0x7d45, 0x7d4b, 0x7d2e, 0x7d32, 0x7d3f, 0x7d35, 0x7d46, 0x7d73, 0x7d56, 0x7d4e, 0x7d72, 0x7d68, 0x7d6e, 0x7d4f, 0x7d63, 0x7d93, 0x7d89, 0x7d5b, 0x7d8f, 0x7d7d, 0x7d9b, 0x7dba, 0x7dae, 0x7da3, 0x7db5, 0x7dc7, 0x7dbd, 0x7dab, 0x7e3d, 0x7da2, 0x7daf, 0x7ddc, 0x7db8, 0x7d9f, 0x7db0, 0x7dd8, 0x7ddd, 0x7de4, 0x7dde, 0x7dfb, 0x7df2, 0x7de1, 0x7e05, 0x7e0a, 0x7e23, 0x7e21, 0x7e12, 0x7e31, 0x7e1f, 0x7e09, 0x7e0b, 0x7e22, 0x7e46, 0x7e66, 0x7e3b, 0x7e35, 0x7e39, 0x7e43, 0x7e37, 0xfffd, 0x7e32, 0x7e3a, 0x7e67, 0x7e5d, 0x7e56, 0x7e5e, 0x7e59, 0x7e5a, 0x7e79, 0x7e6a, 0x7e69, 0x7e7c, 0x7e7b, 0x7e83, 0x7dd5, 0x7e7d, 0x8fae, 0x7e7f, 0x7e88, 0x7e89, 0x7e8c, 0x7e92, 0x7e90, 0x7e93, 0x7e94, 0x7e96, 0x7e8e, 0x7e9b, 0x7e9c, 0x7f38, 0x7f3a, 0x7f45, 0x7f4c, 0x7f4d, 0x7f4e, 0x7f50, 0x7f51, 0x7f55, 0x7f54, 0x7f58, 0x7f5f, 0x7f60, 0x7f68, 0x7f69, 0x7f67, 0x7f78, 0x7f82, 0x7f86, 0x7f83, 0x7f88, 0x7f87, 0x7f8c, 0x7f94, 0x7f9e, 0x7f9d, 0x7f9a, 0x7fa3, 0x7faf, 0x7fb2, 0x7fb9, 0x7fae, 0x7fb6, 0x7fb8, 0x8b71, 0x7fc5, 0x7fc6, 0x7fca, 0x7fd5, 0x7fd4, 0x7fe1, 0x7fe6, 0x7fe9, 0x7ff3, 0x7ff9, 0x98dc, 0x8006, 0x8004, 0x800b, 0x8012, 0x8018, 0x8019, 0x801c, 0x8021, 0x8028, 0x803f, 0x803b, 0x804a, 0x8046, 0x8052, 0x8058, 0x805a, 0x805f, 0x8062, 0x8068, 0x8073, 0x8072, 0x8070, 0x8076, 0x8079, 0x807d, 0x807f, 0x8084, 0x8086, 0x8085, 0x809b, 0x8093, 0x809a, 0x80ad, 0x5190, 0x80ac, 0x80db, 0x80e5, 0x80d9, 0x80dd, 0x80c4, 0x80da, 0x80d6, 0x8109, 0x80ef, 0x80f1, 0x811b, 0x8129, 0x8123, 0x812f, 0x814b }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe440[ 189 ] = { 0x968b, 0x8146, 0x813e, 0x8153, 0x8151, 0x80fc, 0x8171, 0x816e, 0x8165, 0x8166, 0x8174, 0x8183, 0x8188, 0x818a, 0x8180, 0x8182, 0x81a0, 0x8195, 0x81a4, 0x81a3, 0x815f, 0x8193, 0x81a9, 0x81b0, 0x81b5, 0x81be, 0x81b8, 0x81bd, 0x81c0, 0x81c2, 0x81ba, 0x81c9, 0x81cd, 0x81d1, 0x81d9, 0x81d8, 0x81c8, 0x81da, 0x81df, 0x81e0, 0x81e7, 0x81fa, 0x81fb, 0x81fe, 0x8201, 0x8202, 0x8205, 0x8207, 0x820a, 0x820d, 0x8210, 0x8216, 0x8229, 0x822b, 0x8238, 0x8233, 0x8240, 0x8259, 0x8258, 0x825d, 0x825a, 0x825f, 0x8264, 0xfffd, 0x8262, 0x8268, 0x826a, 0x826b, 0x822e, 0x8271, 0x8277, 0x8278, 0x827e, 0x828d, 0x8292, 0x82ab, 0x829f, 0x82bb, 0x82ac, 0x82e1, 0x82e3, 0x82df, 0x82d2, 0x82f4, 0x82f3, 0x82fa, 0x8393, 0x8303, 0x82fb, 0x82f9, 0x82de, 0x8306, 0x82dc, 0x8309, 0x82d9, 0x8335, 0x8334, 0x8316, 0x8332, 0x8331, 0x8340, 0x8339, 0x8350, 0x8345, 0x832f, 0x832b, 0x8317, 0x8318, 0x8385, 0x839a, 0x83aa, 0x839f, 0x83a2, 0x8396, 0x8323, 0x838e, 0x8387, 0x838a, 0x837c, 0x83b5, 0x8373, 0x8375, 0x83a0, 0x8389, 0x83a8, 0x83f4, 0x8413, 0x83eb, 0x83ce, 0x83fd, 0x8403, 0x83d8, 0x840b, 0x83c1, 0x83f7, 0x8407, 0x83e0, 0x83f2, 0x840d, 0x8422, 0x8420, 0x83bd, 0x8438, 0x8506, 0x83fb, 0x846d, 0x842a, 0x843c, 0x855a, 0x8484, 0x8477, 0x846b, 0x84ad, 0x846e, 0x8482, 0x8469, 0x8446, 0x842c, 0x846f, 0x8479, 0x8435, 0x84ca, 0x8462, 0x84b9, 0x84bf, 0x849f, 0x84d9, 0x84cd, 0x84bb, 0x84da, 0x84d0, 0x84c1, 0x84c6, 0x84d6, 0x84a1, 0x8521, 0x84ff, 0x84f4, 0x8517, 0x8518, 0x852c, 0x851f, 0x8515, 0x8514, 0x84fc, 0x8540, 0x8563, 0x8558, 0x8548 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe540[ 189 ] = { 0x8541, 0x8602, 0x854b, 0x8555, 0x8580, 0x85a4, 0x8588, 0x8591, 0x858a, 0x85a8, 0x856d, 0x8594, 0x859b, 0x85ea, 0x8587, 0x859c, 0x8577, 0x857e, 0x8590, 0x85c9, 0x85ba, 0x85cf, 0x85b9, 0x85d0, 0x85d5, 0x85dd, 0x85e5, 0x85dc, 0x85f9, 0x860a, 0x8613, 0x860b, 0x85fe, 0x85fa, 0x8606, 0x8622, 0x861a, 0x8630, 0x863f, 0x864d, 0x4e55, 0x8654, 0x865f, 0x8667, 0x8671, 0x8693, 0x86a3, 0x86a9, 0x86aa, 0x868b, 0x868c, 0x86b6, 0x86af, 0x86c4, 0x86c6, 0x86b0, 0x86c9, 0x8823, 0x86ab, 0x86d4, 0x86de, 0x86e9, 0x86ec, 0xfffd, 0x86df, 0x86db, 0x86ef, 0x8712, 0x8706, 0x8708, 0x8700, 0x8703, 0x86fb, 0x8711, 0x8709, 0x870d, 0x86f9, 0x870a, 0x8734, 0x873f, 0x8737, 0x873b, 0x8725, 0x8729, 0x871a, 0x8760, 0x875f, 0x8778, 0x874c, 0x874e, 0x8774, 0x8757, 0x8768, 0x876e, 0x8759, 0x8753, 0x8763, 0x876a, 0x8805, 0x87a2, 0x879f, 0x8782, 0x87af, 0x87cb, 0x87bd, 0x87c0, 0x87d0, 0x96d6, 0x87ab, 0x87c4, 0x87b3, 0x87c7, 0x87c6, 0x87bb, 0x87ef, 0x87f2, 0x87e0, 0x880f, 0x880d, 0x87fe, 0x87f6, 0x87f7, 0x880e, 0x87d2, 0x8811, 0x8816, 0x8815, 0x8822, 0x8821, 0x8831, 0x8836, 0x8839, 0x8827, 0x883b, 0x8844, 0x8842, 0x8852, 0x8859, 0x885e, 0x8862, 0x886b, 0x8881, 0x887e, 0x889e, 0x8875, 0x887d, 0x88b5, 0x8872, 0x8882, 0x8897, 0x8892, 0x88ae, 0x8899, 0x88a2, 0x888d, 0x88a4, 0x88b0, 0x88bf, 0x88b1, 0x88c3, 0x88c4, 0x88d4, 0x88d8, 0x88d9, 0x88dd, 0x88f9, 0x8902, 0x88fc, 0x88f4, 0x88e8, 0x88f2, 0x8904, 0x890c, 0x890a, 0x8913, 0x8943, 0x891e, 0x8925, 0x892a, 0x892b, 0x8941, 0x8944, 0x893b, 0x8936, 0x8938, 0x894c, 0x891d, 0x8960, 0x895e }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe640[ 189 ] = { 0x8966, 0x8964, 0x896d, 0x896a, 0x896f, 0x8974, 0x8977, 0x897e, 0x8983, 0x8988, 0x898a, 0x8993, 0x8998, 0x89a1, 0x89a9, 0x89a6, 0x89ac, 0x89af, 0x89b2, 0x89ba, 0x89bd, 0x89bf, 0x89c0, 0x89da, 0x89dc, 0x89dd, 0x89e7, 0x89f4, 0x89f8, 0x8a03, 0x8a16, 0x8a10, 0x8a0c, 0x8a1b, 0x8a1d, 0x8a25, 0x8a36, 0x8a41, 0x8a5b, 0x8a52, 0x8a46, 0x8a48, 0x8a7c, 0x8a6d, 0x8a6c, 0x8a62, 0x8a85, 0x8a82, 0x8a84, 0x8aa8, 0x8aa1, 0x8a91, 0x8aa5, 0x8aa6, 0x8a9a, 0x8aa3, 0x8ac4, 0x8acd, 0x8ac2, 0x8ada, 0x8aeb, 0x8af3, 0x8ae7, 0xfffd, 0x8ae4, 0x8af1, 0x8b14, 0x8ae0, 0x8ae2, 0x8af7, 0x8ade, 0x8adb, 0x8b0c, 0x8b07, 0x8b1a, 0x8ae1, 0x8b16, 0x8b10, 0x8b17, 0x8b20, 0x8b33, 0x97ab, 0x8b26, 0x8b2b, 0x8b3e, 0x8b28, 0x8b41, 0x8b4c, 0x8b4f, 0x8b4e, 0x8b49, 0x8b56, 0x8b5b, 0x8b5a, 0x8b6b, 0x8b5f, 0x8b6c, 0x8b6f, 0x8b74, 0x8b7d, 0x8b80, 0x8b8c, 0x8b8e, 0x8b92, 0x8b93, 0x8b96, 0x8b99, 0x8b9a, 0x8c3a, 0x8c41, 0x8c3f, 0x8c48, 0x8c4c, 0x8c4e, 0x8c50, 0x8c55, 0x8c62, 0x8c6c, 0x8c78, 0x8c7a, 0x8c82, 0x8c89, 0x8c85, 0x8c8a, 0x8c8d, 0x8c8e, 0x8c94, 0x8c7c, 0x8c98, 0x621d, 0x8cad, 0x8caa, 0x8cbd, 0x8cb2, 0x8cb3, 0x8cae, 0x8cb6, 0x8cc8, 0x8cc1, 0x8ce4, 0x8ce3, 0x8cda, 0x8cfd, 0x8cfa, 0x8cfb, 0x8d04, 0x8d05, 0x8d0a, 0x8d07, 0x8d0f, 0x8d0d, 0x8d10, 0x9f4e, 0x8d13, 0x8ccd, 0x8d14, 0x8d16, 0x8d67, 0x8d6d, 0x8d71, 0x8d73, 0x8d81, 0x8d99, 0x8dc2, 0x8dbe, 0x8dba, 0x8dcf, 0x8dda, 0x8dd6, 0x8dcc, 0x8ddb, 0x8dcb, 0x8dea, 0x8deb, 0x8ddf, 0x8de3, 0x8dfc, 0x8e08, 0x8e09, 0x8dff, 0x8e1d, 0x8e1e, 0x8e10, 0x8e1f, 0x8e42, 0x8e35, 0x8e30, 0x8e34, 0x8e4a }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe740[ 189 ] = { 0x8e47, 0x8e49, 0x8e4c, 0x8e50, 0x8e48, 0x8e59, 0x8e64, 0x8e60, 0x8e2a, 0x8e63, 0x8e55, 0x8e76, 0x8e72, 0x8e7c, 0x8e81, 0x8e87, 0x8e85, 0x8e84, 0x8e8b, 0x8e8a, 0x8e93, 0x8e91, 0x8e94, 0x8e99, 0x8eaa, 0x8ea1, 0x8eac, 0x8eb0, 0x8ec6, 0x8eb1, 0x8ebe, 0x8ec5, 0x8ec8, 0x8ecb, 0x8edb, 0x8ee3, 0x8efc, 0x8efb, 0x8eeb, 0x8efe, 0x8f0a, 0x8f05, 0x8f15, 0x8f12, 0x8f19, 0x8f13, 0x8f1c, 0x8f1f, 0x8f1b, 0x8f0c, 0x8f26, 0x8f33, 0x8f3b, 0x8f39, 0x8f45, 0x8f42, 0x8f3e, 0x8f4c, 0x8f49, 0x8f46, 0x8f4e, 0x8f57, 0x8f5c, 0xfffd, 0x8f62, 0x8f63, 0x8f64, 0x8f9c, 0x8f9f, 0x8fa3, 0x8fad, 0x8faf, 0x8fb7, 0x8fda, 0x8fe5, 0x8fe2, 0x8fea, 0x8fef, 0x9087, 0x8ff4, 0x9005, 0x8ff9, 0x8ffa, 0x9011, 0x9015, 0x9021, 0x900d, 0x901e, 0x9016, 0x900b, 0x9027, 0x9036, 0x9035, 0x9039, 0x8ff8, 0x904f, 0x9050, 0x9051, 0x9052, 0x900e, 0x9049, 0x903e, 0x9056, 0x9058, 0x905e, 0x9068, 0x906f, 0x9076, 0x96a8, 0x9072, 0x9082, 0x907d, 0x9081, 0x9080, 0x908a, 0x9089, 0x908f, 0x90a8, 0x90af, 0x90b1, 0x90b5, 0x90e2, 0x90e4, 0x6248, 0x90db, 0x9102, 0x9112, 0x9119, 0x9132, 0x9130, 0x914a, 0x9156, 0x9158, 0x9163, 0x9165, 0x9169, 0x9173, 0x9172, 0x918b, 0x9189, 0x9182, 0x91a2, 0x91ab, 0x91af, 0x91aa, 0x91b5, 0x91b4, 0x91ba, 0x91c0, 0x91c1, 0x91c9, 0x91cb, 0x91d0, 0x91d6, 0x91df, 0x91e1, 0x91db, 0x91fc, 0x91f5, 0x91f6, 0x921e, 0x91ff, 0x9214, 0x922c, 0x9215, 0x9211, 0x925e, 0x9257, 0x9245, 0x9249, 0x9264, 0x9248, 0x9295, 0x923f, 0x924b, 0x9250, 0x929c, 0x9296, 0x9293, 0x929b, 0x925a, 0x92cf, 0x92b9, 0x92b7, 0x92e9, 0x930f, 0x92fa, 0x9344, 0x932e }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe840[ 189 ] = { 0x9319, 0x9322, 0x931a, 0x9323, 0x933a, 0x9335, 0x933b, 0x935c, 0x9360, 0x937c, 0x936e, 0x9356, 0x93b0, 0x93ac, 0x93ad, 0x9394, 0x93b9, 0x93d6, 0x93d7, 0x93e8, 0x93e5, 0x93d8, 0x93c3, 0x93dd, 0x93d0, 0x93c8, 0x93e4, 0x941a, 0x9414, 0x9413, 0x9403, 0x9407, 0x9410, 0x9436, 0x942b, 0x9435, 0x9421, 0x943a, 0x9441, 0x9452, 0x9444, 0x945b, 0x9460, 0x9462, 0x945e, 0x946a, 0x9229, 0x9470, 0x9475, 0x9477, 0x947d, 0x945a, 0x947c, 0x947e, 0x9481, 0x947f, 0x9582, 0x9587, 0x958a, 0x9594, 0x9596, 0x9598, 0x9599, 0xfffd, 0x95a0, 0x95a8, 0x95a7, 0x95ad, 0x95bc, 0x95bb, 0x95b9, 0x95be, 0x95ca, 0x6ff6, 0x95c3, 0x95cd, 0x95cc, 0x95d5, 0x95d4, 0x95d6, 0x95dc, 0x95e1, 0x95e5, 0x95e2, 0x9621, 0x9628, 0x962e, 0x962f, 0x9642, 0x964c, 0x964f, 0x964b, 0x9677, 0x965c, 0x965e, 0x965d, 0x965f, 0x9666, 0x9672, 0x966c, 0x968d, 0x9698, 0x9695, 0x9697, 0x96aa, 0x96a7, 0x96b1, 0x96b2, 0x96b0, 0x96b4, 0x96b6, 0x96b8, 0x96b9, 0x96ce, 0x96cb, 0x96c9, 0x96cd, 0x894d, 0x96dc, 0x970d, 0x96d5, 0x96f9, 0x9704, 0x9706, 0x9708, 0x9713, 0x970e, 0x9711, 0x970f, 0x9716, 0x9719, 0x9724, 0x972a, 0x9730, 0x9739, 0x973d, 0x973e, 0x9744, 0x9746, 0x9748, 0x9742, 0x9749, 0x975c, 0x9760, 0x9764, 0x9766, 0x9768, 0x52d2, 0x976b, 0x9771, 0x9779, 0x9785, 0x977c, 0x9781, 0x977a, 0x9786, 0x978b, 0x978f, 0x9790, 0x979c, 0x97a8, 0x97a6, 0x97a3, 0x97b3, 0x97b4, 0x97c3, 0x97c6, 0x97c8, 0x97cb, 0x97dc, 0x97ed, 0x9f4f, 0x97f2, 0x7adf, 0x97f6, 0x97f5, 0x980f, 0x980c, 0x9838, 0x9824, 0x9821, 0x9837, 0x983d, 0x9846, 0x984f, 0x984b, 0x986b, 0x986f, 0x9870 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe940[ 189 ] = { 0x9871, 0x9874, 0x9873, 0x98aa, 0x98af, 0x98b1, 0x98b6, 0x98c4, 0x98c3, 0x98c6, 0x98e9, 0x98eb, 0x9903, 0x9909, 0x9912, 0x9914, 0x9918, 0x9921, 0x991d, 0x991e, 0x9924, 0x9920, 0x992c, 0x992e, 0x993d, 0x993e, 0x9942, 0x9949, 0x9945, 0x9950, 0x994b, 0x9951, 0x9952, 0x994c, 0x9955, 0x9997, 0x9998, 0x99a5, 0x99ad, 0x99ae, 0x99bc, 0x99df, 0x99db, 0x99dd, 0x99d8, 0x99d1, 0x99ed, 0x99ee, 0x99f1, 0x99f2, 0x99fb, 0x99f8, 0x9a01, 0x9a0f, 0x9a05, 0x99e2, 0x9a19, 0x9a2b, 0x9a37, 0x9a45, 0x9a42, 0x9a40, 0x9a43, 0xfffd, 0x9a3e, 0x9a55, 0x9a4d, 0x9a5b, 0x9a57, 0x9a5f, 0x9a62, 0x9a65, 0x9a64, 0x9a69, 0x9a6b, 0x9a6a, 0x9aad, 0x9ab0, 0x9abc, 0x9ac0, 0x9acf, 0x9ad1, 0x9ad3, 0x9ad4, 0x9ade, 0x9adf, 0x9ae2, 0x9ae3, 0x9ae6, 0x9aef, 0x9aeb, 0x9aee, 0x9af4, 0x9af1, 0x9af7, 0x9afb, 0x9b06, 0x9b18, 0x9b1a, 0x9b1f, 0x9b22, 0x9b23, 0x9b25, 0x9b27, 0x9b28, 0x9b29, 0x9b2a, 0x9b2e, 0x9b2f, 0x9b32, 0x9b44, 0x9b43, 0x9b4f, 0x9b4d, 0x9b4e, 0x9b51, 0x9b58, 0x9b74, 0x9b93, 0x9b83, 0x9b91, 0x9b96, 0x9b97, 0x9b9f, 0x9ba0, 0x9ba8, 0x9bb4, 0x9bc0, 0x9bca, 0x9bb9, 0x9bc6, 0x9bcf, 0x9bd1, 0x9bd2, 0x9be3, 0x9be2, 0x9be4, 0x9bd4, 0x9be1, 0x9c3a, 0x9bf2, 0x9bf1, 0x9bf0, 0x9c15, 0x9c14, 0x9c09, 0x9c13, 0x9c0c, 0x9c06, 0x9c08, 0x9c12, 0x9c0a, 0x9c04, 0x9c2e, 0x9c1b, 0x9c25, 0x9c24, 0x9c21, 0x9c30, 0x9c47, 0x9c32, 0x9c46, 0x9c3e, 0x9c5a, 0x9c60, 0x9c67, 0x9c76, 0x9c78, 0x9ce7, 0x9cec, 0x9cf0, 0x9d09, 0x9d08, 0x9ceb, 0x9d03, 0x9d06, 0x9d2a, 0x9d26, 0x9daf, 0x9d23, 0x9d1f, 0x9d44, 0x9d15, 0x9d12, 0x9d41, 0x9d3f, 0x9d3e, 0x9d46, 0x9d48 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xea40[ 101 ] = { 0x9d5d, 0x9d5e, 0x9d64, 0x9d51, 0x9d50, 0x9d59, 0x9d72, 0x9d89, 0x9d87, 0x9dab, 0x9d6f, 0x9d7a, 0x9d9a, 0x9da4, 0x9da9, 0x9db2, 0x9dc4, 0x9dc1, 0x9dbb, 0x9db8, 0x9dba, 0x9dc6, 0x9dcf, 0x9dc2, 0x9dd9, 0x9dd3, 0x9df8, 0x9de6, 0x9ded, 0x9def, 0x9dfd, 0x9e1a, 0x9e1b, 0x9e1e, 0x9e75, 0x9e79, 0x9e7d, 0x9e81, 0x9e88, 0x9e8b, 0x9e8c, 0x9e92, 0x9e95, 0x9e91, 0x9e9d, 0x9ea5, 0x9ea9, 0x9eb8, 0x9eaa, 0x9ead, 0x9761, 0x9ecc, 0x9ece, 0x9ecf, 0x9ed0, 0x9ed4, 0x9edc, 0x9ede, 0x9edd, 0x9ee0, 0x9ee5, 0x9ee8, 0x9eef, 0xfffd, 0x9ef4, 0x9ef6, 0x9ef7, 0x9ef9, 0x9efb, 0x9efc, 0x9efd, 0x9f07, 0x9f08, 0x76b7, 0x9f15, 0x9f21, 0x9f2c, 0x9f3e, 0x9f4a, 0x9f52, 0x9f54, 0x9f63, 0x9f5f, 0x9f60, 0x9f61, 0x9f66, 0x9f67, 0x9f6c, 0x9f6a, 0x9f77, 0x9f72, 0x9f76, 0x9f95, 0x9f9c, 0x9fa0, 0x582f, 0x69c7, 0x9059, 0x7464, 0x51dc, 0x7199 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xed40[ 189 ] = { 0x7e8a, 0x891c, 0x9348, 0x9288, 0x84dc, 0x4fc9, 0x70bb, 0x6631, 0x68c8, 0x92f9, 0x66fb, 0x5f45, 0x4e28, 0x4ee1, 0x4efc, 0x4f00, 0x4f03, 0x4f39, 0x4f56, 0x4f92, 0x4f8a, 0x4f9a, 0x4f94, 0x4fcd, 0x5040, 0x5022, 0x4fff, 0x501e, 0x5046, 0x5070, 0x5042, 0x5094, 0x50f4, 0x50d8, 0x514a, 0x5164, 0x519d, 0x51be, 0x51ec, 0x5215, 0x529c, 0x52a6, 0x52c0, 0x52db, 0x5300, 0x5307, 0x5324, 0x5372, 0x5393, 0x53b2, 0x53dd, 0xfa0e, 0x549c, 0x548a, 0x54a9, 0x54ff, 0x5586, 0x5759, 0x5765, 0x57ac, 0x57c8, 0x57c7, 0xfa0f, 0xfffd, 0xfa10, 0x589e, 0x58b2, 0x590b, 0x5953, 0x595b, 0x595d, 0x5963, 0x59a4, 0x59ba, 0x5b56, 0x5bc0, 0x752f, 0x5bd8, 0x5bec, 0x5c1e, 0x5ca6, 0x5cba, 0x5cf5, 0x5d27, 0x5d53, 0xfa11, 0x5d42, 0x5d6d, 0x5db8, 0x5db9, 0x5dd0, 0x5f21, 0x5f34, 0x5f67, 0x5fb7, 0x5fde, 0x605d, 0x6085, 0x608a, 0x60de, 0x60d5, 0x6120, 0x60f2, 0x6111, 0x6137, 0x6130, 0x6198, 0x6213, 0x62a6, 0x63f5, 0x6460, 0x649d, 0x64ce, 0x654e, 0x6600, 0x6615, 0x663b, 0x6609, 0x662e, 0x661e, 0x6624, 0x6665, 0x6657, 0x6659, 0xfa12, 0x6673, 0x6699, 0x66a0, 0x66b2, 0x66bf, 0x66fa, 0x670e, 0xf929, 0x6766, 0x67bb, 0x6852, 0x67c0, 0x6801, 0x6844, 0x68cf, 0xfa13, 0x6968, 0xfa14, 0x6998, 0x69e2, 0x6a30, 0x6a6b, 0x6a46, 0x6a73, 0x6a7e, 0x6ae2, 0x6ae4, 0x6bd6, 0x6c3f, 0x6c5c, 0x6c86, 0x6c6f, 0x6cda, 0x6d04, 0x6d87, 0x6d6f, 0x6d96, 0x6dac, 0x6dcf, 0x6df8, 0x6df2, 0x6dfc, 0x6e39, 0x6e5c, 0x6e27, 0x6e3c, 0x6ebf, 0x6f88, 0x6fb5, 0x6ff5, 0x7005, 0x7007, 0x7028, 0x7085, 0x70ab, 0x710f, 0x7104, 0x715c, 0x7146, 0x7147, 0xfa15, 0x71c1, 0x71fe, 0x72b1 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xee40[ 189 ] = { 0x72be, 0x7324, 0xfa16, 0x7377, 0x73bd, 0x73c9, 0x73d6, 0x73e3, 0x73d2, 0x7407, 0x73f5, 0x7426, 0x742a, 0x7429, 0x742e, 0x7462, 0x7489, 0x749f, 0x7501, 0x756f, 0x7682, 0x769c, 0x769e, 0x769b, 0x76a6, 0xfa17, 0x7746, 0x52af, 0x7821, 0x784e, 0x7864, 0x787a, 0x7930, 0xfa18, 0xfa19, 0xfa1a, 0x7994, 0xfa1b, 0x799b, 0x7ad1, 0x7ae7, 0xfa1c, 0x7aeb, 0x7b9e, 0xfa1d, 0x7d48, 0x7d5c, 0x7db7, 0x7da0, 0x7dd6, 0x7e52, 0x7f47, 0x7fa1, 0xfa1e, 0x8301, 0x8362, 0x837f, 0x83c7, 0x83f6, 0x8448, 0x84b4, 0x8553, 0x8559, 0xfffd, 0x856b, 0xfa1f, 0x85b0, 0xfa20, 0xfa21, 0x8807, 0x88f5, 0x8a12, 0x8a37, 0x8a79, 0x8aa7, 0x8abe, 0x8adf, 0xfa22, 0x8af6, 0x8b53, 0x8b7f, 0x8cf0, 0x8cf4, 0x8d12, 0x8d76, 0xfa23, 0x8ecf, 0xfa24, 0xfa25, 0x9067, 0x90de, 0xfa26, 0x9115, 0x9127, 0x91da, 0x91d7, 0x91de, 0x91ed, 0x91ee, 0x91e4, 0x91e5, 0x9206, 0x9210, 0x920a, 0x923a, 0x9240, 0x923c, 0x924e, 0x9259, 0x9251, 0x9239, 0x9267, 0x92a7, 0x9277, 0x9278, 0x92e7, 0x92d7, 0x92d9, 0x92d0, 0xfa27, 0x92d5, 0x92e0, 0x92d3, 0x9325, 0x9321, 0x92fb, 0xfa28, 0x931e, 0x92ff, 0x931d, 0x9302, 0x9370, 0x9357, 0x93a4, 0x93c6, 0x93de, 0x93f8, 0x9431, 0x9445, 0x9448, 0x9592, 0xf9dc, 0xfa29, 0x969d, 0x96af, 0x9733, 0x973b, 0x9743, 0x974d, 0x974f, 0x9751, 0x9755, 0x9857, 0x9865, 0xfa2a, 0xfa2b, 0x9927, 0xfa2c, 0x999e, 0x9a4e, 0x9ad9, 0x9adc, 0x9b75, 0x9b72, 0x9b8f, 0x9bb1, 0x9bbb, 0x9c00, 0x9d70, 0x9d6b, 0xfa2d, 0x9e19, 0x9ed1, 0xfffd, 0xfffd, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0xffe2, 0xffe4, 0xff07, 0xff02 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfa40[ 189 ] = { 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0xffe2, 0xffe4, 0xff07, 0xff02, 0x3231, 0x2116, 0x2121, 0x2235, 0x7e8a, 0x891c, 0x9348, 0x9288, 0x84dc, 0x4fc9, 0x70bb, 0x6631, 0x68c8, 0x92f9, 0x66fb, 0x5f45, 0x4e28, 0x4ee1, 0x4efc, 0x4f00, 0x4f03, 0x4f39, 0x4f56, 0x4f92, 0x4f8a, 0x4f9a, 0x4f94, 0x4fcd, 0x5040, 0x5022, 0x4fff, 0x501e, 0x5046, 0x5070, 0x5042, 0x5094, 0x50f4, 0x50d8, 0x514a, 0xfffd, 0x5164, 0x519d, 0x51be, 0x51ec, 0x5215, 0x529c, 0x52a6, 0x52c0, 0x52db, 0x5300, 0x5307, 0x5324, 0x5372, 0x5393, 0x53b2, 0x53dd, 0xfa0e, 0x549c, 0x548a, 0x54a9, 0x54ff, 0x5586, 0x5759, 0x5765, 0x57ac, 0x57c8, 0x57c7, 0xfa0f, 0xfa10, 0x589e, 0x58b2, 0x590b, 0x5953, 0x595b, 0x595d, 0x5963, 0x59a4, 0x59ba, 0x5b56, 0x5bc0, 0x752f, 0x5bd8, 0x5bec, 0x5c1e, 0x5ca6, 0x5cba, 0x5cf5, 0x5d27, 0x5d53, 0xfa11, 0x5d42, 0x5d6d, 0x5db8, 0x5db9, 0x5dd0, 0x5f21, 0x5f34, 0x5f67, 0x5fb7, 0x5fde, 0x605d, 0x6085, 0x608a, 0x60de, 0x60d5, 0x6120, 0x60f2, 0x6111, 0x6137, 0x6130, 0x6198, 0x6213, 0x62a6, 0x63f5, 0x6460, 0x649d, 0x64ce, 0x654e, 0x6600, 0x6615, 0x663b, 0x6609, 0x662e, 0x661e, 0x6624, 0x6665, 0x6657, 0x6659, 0xfa12, 0x6673, 0x6699, 0x66a0, 0x66b2, 0x66bf, 0x66fa, 0x670e, 0xf929, 0x6766, 0x67bb, 0x6852, 0x67c0, 0x6801, 0x6844, 0x68cf, 0xfa13, 0x6968, 0xfa14, 0x6998, 0x69e2, 0x6a30, 0x6a6b, 0x6a46, 0x6a73, 0x6a7e, 0x6ae2, 0x6ae4, 0x6bd6, 0x6c3f, 0x6c5c, 0x6c86, 0x6c6f, 0x6cda, 0x6d04, 0x6d87, 0x6d6f }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfb40[ 189 ] = { 0x6d96, 0x6dac, 0x6dcf, 0x6df8, 0x6df2, 0x6dfc, 0x6e39, 0x6e5c, 0x6e27, 0x6e3c, 0x6ebf, 0x6f88, 0x6fb5, 0x6ff5, 0x7005, 0x7007, 0x7028, 0x7085, 0x70ab, 0x710f, 0x7104, 0x715c, 0x7146, 0x7147, 0xfa15, 0x71c1, 0x71fe, 0x72b1, 0x72be, 0x7324, 0xfa16, 0x7377, 0x73bd, 0x73c9, 0x73d6, 0x73e3, 0x73d2, 0x7407, 0x73f5, 0x7426, 0x742a, 0x7429, 0x742e, 0x7462, 0x7489, 0x749f, 0x7501, 0x756f, 0x7682, 0x769c, 0x769e, 0x769b, 0x76a6, 0xfa17, 0x7746, 0x52af, 0x7821, 0x784e, 0x7864, 0x787a, 0x7930, 0xfa18, 0xfa19, 0xfffd, 0xfa1a, 0x7994, 0xfa1b, 0x799b, 0x7ad1, 0x7ae7, 0xfa1c, 0x7aeb, 0x7b9e, 0xfa1d, 0x7d48, 0x7d5c, 0x7db7, 0x7da0, 0x7dd6, 0x7e52, 0x7f47, 0x7fa1, 0xfa1e, 0x8301, 0x8362, 0x837f, 0x83c7, 0x83f6, 0x8448, 0x84b4, 0x8553, 0x8559, 0x856b, 0xfa1f, 0x85b0, 0xfa20, 0xfa21, 0x8807, 0x88f5, 0x8a12, 0x8a37, 0x8a79, 0x8aa7, 0x8abe, 0x8adf, 0xfa22, 0x8af6, 0x8b53, 0x8b7f, 0x8cf0, 0x8cf4, 0x8d12, 0x8d76, 0xfa23, 0x8ecf, 0xfa24, 0xfa25, 0x9067, 0x90de, 0xfa26, 0x9115, 0x9127, 0x91da, 0x91d7, 0x91de, 0x91ed, 0x91ee, 0x91e4, 0x91e5, 0x9206, 0x9210, 0x920a, 0x923a, 0x9240, 0x923c, 0x924e, 0x9259, 0x9251, 0x9239, 0x9267, 0x92a7, 0x9277, 0x9278, 0x92e7, 0x92d7, 0x92d9, 0x92d0, 0xfa27, 0x92d5, 0x92e0, 0x92d3, 0x9325, 0x9321, 0x92fb, 0xfa28, 0x931e, 0x92ff, 0x931d, 0x9302, 0x9370, 0x9357, 0x93a4, 0x93c6, 0x93de, 0x93f8, 0x9431, 0x9445, 0x9448, 0x9592, 0xf9dc, 0xfa29, 0x969d, 0x96af, 0x9733, 0x973b, 0x9743, 0x974d, 0x974f, 0x9751, 0x9755, 0x9857, 0x9865, 0xfa2a, 0xfa2b, 0x9927, 0xfa2c, 0x999e, 0x9a4e, 0x9ad9 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfc40[ 12 ] = { 0x9adc, 0x9b75, 0x9b72, 0x9b8f, 0x9bb1, 0x9bbb, 0x9c00, 0x9d70, 0x9d6b, 0xfa2d, 0x9e19, 0x9ed1 }; /* Unicode to ASCII character lookup table for Windows 932 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0080[ 128 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9881, 0x4e81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8b81, 0x7d81, 0x001a, 0x001a, 0x4c81, 0x001a, 0xf781, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7e81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8081, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0380[ 256 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9f83, 0xa083, 0xa183, 0xa283, 0xa383, 0xa483, 0xa583, 0xa683, 0xa783, 0xa883, 0xa983, 0xaa83, 0xab83, 0xac83, 0xad83, 0xae83, 0xaf83, 0x001a, 0xb083, 0xb183, 0xb283, 0xb383, 0xb483, 0xb583, 0xb683, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbf83, 0xc083, 0xc183, 0xc283, 0xc383, 0xc483, 0xc583, 0xc683, 0xc783, 0xc883, 0xc983, 0xca83, 0xcb83, 0xcc83, 0xcd83, 0xce83, 0xcf83, 0x001a, 0xd083, 0xd183, 0xd283, 0xd383, 0xd483, 0xd583, 0xd683, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4684, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4084, 0x4184, 0x4284, 0x4384, 0x4484, 0x4584, 0x4784, 0x4884, 0x4984, 0x4a84, 0x4b84, 0x4c84, 0x4d84, 0x4e84, 0x4f84, 0x5084, 0x5184, 0x5284, 0x5384, 0x5484, 0x5584, 0x5684, 0x5784, 0x5884, 0x5984, 0x5a84, 0x5b84, 0x5c84, 0x5d84, 0x5e84, 0x5f84, 0x6084, 0x7084, 0x7184, 0x7284, 0x7384, 0x7484, 0x7584, 0x7784, 0x7884, 0x7984, 0x7a84, 0x7b84, 0x7c84, 0x7d84, 0x7e84, 0x8084, 0x8184, 0x8284, 0x8384, 0x8484, 0x8584, 0x8684, 0x8784, 0x8884, 0x8984, 0x8a84, 0x8b84, 0x8c84, 0x8d84, 0x8e84, 0x8f84, 0x9084, 0x9184, 0x001a, 0x7684, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x2000[ 832 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5d81, 0x001a, 0x001a, 0x001a, 0x001a, 0x5c81, 0x001a, 0x001a, 0x6581, 0x6681, 0x001a, 0x001a, 0x6781, 0x6881, 0x001a, 0x001a, 0xf581, 0xf681, 0x001a, 0x001a, 0x001a, 0x6481, 0x6381, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf181, 0x001a, 0x8c81, 0x8d81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa681, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8e81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8287, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8487, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf081, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5487, 0x5587, 0x5687, 0x5787, 0x5887, 0x5987, 0x5a87, 0x5b87, 0x5c87, 0x5d87, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefee, 0xf0ee, 0xf1ee, 0xf2ee, 0xf3ee, 0xf4ee, 0xf5ee, 0xf6ee, 0xf7ee, 0xf8ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa981, 0xaa81, 0xa881, 0xab81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcb81, 0x001a, 0xcc81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcd81, 0x001a, 0xdd81, 0xce81, 0x001a, 0x001a, 0x001a, 0xde81, 0xb881, 0x001a, 0x001a, 0xb981, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9487, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe381, 0x001a, 0x001a, 0xe581, 0x8781, 0x9887, 0xda81, 0x001a, 0x001a, 0x001a, 0x001a, 0x6181, 0x001a, 0xc881, 0xc981, 0xbf81, 0xbe81, 0xe781, 0xe881, 0x001a, 0x9387, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8881, 0xe681, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe481, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe081, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8281, 0xdf81, 0x001a, 0x001a, 0x001a, 0x001a, 0x8581, 0x8681, 0x001a, 0x001a, 0xe181, 0xe281, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbc81, 0xbd81, 0x001a, 0x001a, 0xba81, 0xbb81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdb81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9987, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdc81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x2440[ 576 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4087, 0x4187, 0x4287, 0x4387, 0x4487, 0x4587, 0x4687, 0x4787, 0x4887, 0x4987, 0x4a87, 0x4b87, 0x4c87, 0x4d87, 0x4e87, 0x4f87, 0x5087, 0x5187, 0x5287, 0x5387, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9f84, 0xaa84, 0xa084, 0xab84, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa184, 0x001a, 0x001a, 0xac84, 0xa284, 0x001a, 0x001a, 0xad84, 0xa484, 0x001a, 0x001a, 0xaf84, 0xa384, 0x001a, 0x001a, 0xae84, 0xa584, 0xba84, 0x001a, 0x001a, 0xb584, 0x001a, 0x001a, 0xb084, 0xa784, 0xbc84, 0x001a, 0x001a, 0xb784, 0x001a, 0x001a, 0xb284, 0xa684, 0x001a, 0x001a, 0xb684, 0xbb84, 0x001a, 0x001a, 0xb184, 0xa884, 0x001a, 0x001a, 0xb884, 0xbd84, 0x001a, 0x001a, 0xb384, 0xa984, 0x001a, 0x001a, 0xb984, 0x001a, 0x001a, 0xbe84, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb484, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa181, 0xa081, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa381, 0xa281, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa581, 0xa481, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9f81, 0x9e81, 0x001a, 0x001a, 0x001a, 0x9b81, 0x001a, 0x001a, 0x9d81, 0x9c81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a81, 0x9981, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a81, 0x001a, 0x8981, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf481, 0x001a, 0x001a, 0xf381, 0x001a, 0xf281, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x3000[ 256 ] = { 0x4081, 0x4181, 0x4281, 0x5681, 0x001a, 0x5881, 0x5981, 0x5a81, 0x7181, 0x7281, 0x7381, 0x7481, 0x7581, 0x7681, 0x7781, 0x7881, 0x7981, 0x7a81, 0xa781, 0xac81, 0x6b81, 0x6c81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8087, 0x001a, 0x8187, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9f82, 0xa082, 0xa182, 0xa282, 0xa382, 0xa482, 0xa582, 0xa682, 0xa782, 0xa882, 0xa982, 0xaa82, 0xab82, 0xac82, 0xad82, 0xae82, 0xaf82, 0xb082, 0xb182, 0xb282, 0xb382, 0xb482, 0xb582, 0xb682, 0xb782, 0xb882, 0xb982, 0xba82, 0xbb82, 0xbc82, 0xbd82, 0xbe82, 0xbf82, 0xc082, 0xc182, 0xc282, 0xc382, 0xc482, 0xc582, 0xc682, 0xc782, 0xc882, 0xc982, 0xca82, 0xcb82, 0xcc82, 0xcd82, 0xce82, 0xcf82, 0xd082, 0xd182, 0xd282, 0xd382, 0xd482, 0xd582, 0xd682, 0xd782, 0xd882, 0xd982, 0xda82, 0xdb82, 0xdc82, 0xdd82, 0xde82, 0xdf82, 0xe082, 0xe182, 0xe282, 0xe382, 0xe482, 0xe582, 0xe682, 0xe782, 0xe882, 0xe982, 0xea82, 0xeb82, 0xec82, 0xed82, 0xee82, 0xef82, 0xf082, 0xf182, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4a81, 0x4b81, 0x5481, 0x5581, 0x001a, 0x001a, 0x4083, 0x4183, 0x4283, 0x4383, 0x4483, 0x4583, 0x4683, 0x4783, 0x4883, 0x4983, 0x4a83, 0x4b83, 0x4c83, 0x4d83, 0x4e83, 0x4f83, 0x5083, 0x5183, 0x5283, 0x5383, 0x5483, 0x5583, 0x5683, 0x5783, 0x5883, 0x5983, 0x5a83, 0x5b83, 0x5c83, 0x5d83, 0x5e83, 0x5f83, 0x6083, 0x6183, 0x6283, 0x6383, 0x6483, 0x6583, 0x6683, 0x6783, 0x6883, 0x6983, 0x6a83, 0x6b83, 0x6c83, 0x6d83, 0x6e83, 0x6f83, 0x7083, 0x7183, 0x7283, 0x7383, 0x7483, 0x7583, 0x7683, 0x7783, 0x7883, 0x7983, 0x7a83, 0x7b83, 0x7c83, 0x7d83, 0x7e83, 0x8083, 0x8183, 0x8283, 0x8383, 0x8483, 0x8583, 0x8683, 0x8783, 0x8883, 0x8983, 0x8a83, 0x8b83, 0x8c83, 0x8d83, 0x8e83, 0x8f83, 0x9083, 0x9183, 0x9283, 0x9383, 0x9483, 0x9583, 0x9683, 0x001a, 0x001a, 0x001a, 0x001a, 0x4581, 0x5b81, 0x5281, 0x5381, 0x001a }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x3200[ 512 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a87, 0x8b87, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c87, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8587, 0x8687, 0x8787, 0x8887, 0x8987, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6587, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6987, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6087, 0x001a, 0x001a, 0x001a, 0x6387, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6187, 0x6b87, 0x001a, 0x001a, 0x6a87, 0x6487, 0x001a, 0x001a, 0x001a, 0x6c87, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6687, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e87, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5f87, 0x6d87, 0x001a, 0x001a, 0x6287, 0x001a, 0x001a, 0x001a, 0x6787, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6887, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7e87, 0x8f87, 0x8e87, 0x8d87, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7287, 0x7387, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6f87, 0x7087, 0x7187, 0x001a, 0x001a, 0x7587, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7487, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8387, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x4e00[ 22288 ] = { 0xea88, 0x9a92, 0x001a, 0xb58e, 0x001a, 0x001a, 0x001a, 0x9c96, 0xe48f, 0x4f8e, 0xe38f, 0xba89, 0x001a, 0x7395, 0x5e97, 0x001a, 0xa098, 0x4e89, 0x001a, 0x001a, 0x8e8a, 0xa198, 0xa290, 0xc099, 0x758b, 0xb895, 0x001a, 0x001a, 0x001a, 0x001a, 0xe58f, 0x001a, 0x001a, 0xbc97, 0x001a, 0x001a, 0x001a, 0x001a, 0xc095, 0x001a, 0x4ced, 0x001a, 0xa298, 0x001a, 0x001a, 0x8692, 0x001a, 0x001a, 0x001a, 0xa398, 0xf88b, 0x001a, 0x001a, 0x001a, 0xa498, 0x001a, 0xdb8a, 0x4f92, 0x001a, 0xe58e, 0xa598, 0x001a, 0x001a, 0xa698, 0x001a, 0x001a, 0xa798, 0x5494, 0x001a, 0x768b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5694, 0x001a, 0xe193, 0xc18c, 0x5296, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x68e5, 0xa898, 0xe68f, 0xa998, 0xb389, 0x001a, 0x001a, 0x001a, 0xe38b, 0xee8c, 0xe796, 0x001a, 0x001a, 0xa49b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9097, 0x001a, 0xfb93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa38a, 0x001a, 0x548b, 0x001a, 0xaa98, 0x001a, 0x001a, 0xab98, 0xb997, 0x001a, 0x5c97, 0x8891, 0xad98, 0x968e, 0xf193, 0x001a, 0xb098, 0x001a, 0x001a, 0x5d89, 0xdd8c, 0x001a, 0xdc8c, 0xe488, 0x001a, 0x001a, 0x6a98, 0x6998, 0x001a, 0xb18d, 0x9f88, 0x001a, 0xb198, 0xb298, 0xb398, 0x5396, 0xb498, 0x001a, 0xf08c, 0xe588, 0x9296, 0x001a, 0x9c8b, 0x001a, 0x001a, 0x9d8b, 0x9e8b, 0xe092, 0xba97, 0x001a, 0xb598, 0x001a, 0x001a, 0xb698, 0x001a, 0x001a, 0xb798, 0x001a, 0x001a, 0x001a, 0x6c90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x598f, 0x6d90, 0xbc98, 0x001a, 0xba98, 0x001a, 0xbb98, 0x778b, 0x001a, 0x001a, 0xa18d, 0xee89, 0x001a, 0xb998, 0xb898, 0xa795, 0x001a, 0x001a, 0x001a, 0x001a, 0x658e, 0x648e, 0xbc91, 0xbd98, 0x7495, 0xe590, 0x001a, 0x001a, 0x001a, 0x5781, 0xbe98, 0xc098, 0x001a, 0x4ded, 0x001a, 0xe391, 0xdf97, 0xc888, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbf98, 0xbc89, 0x001a, 0xc28b, 0x001a, 0x8792, 0x001a, 0x001a, 0x001a, 0x8f8c, 0xc198, 0x001a, 0x001a, 0x001a, 0x4394, 0x4eed, 0x001a, 0x001a, 0x001a, 0x4fed, 0xe98a, 0x001a, 0x50ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc298, 0xc988, 0x001a, 0x001a, 0xde8c, 0xea8a, 0x9a95, 0xb094, 0x788b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xef89, 0x001a, 0xe598, 0x6093, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c94, 0xc498, 0x001a, 0x001a, 0x001a, 0xba94, 0x001a, 0xe097, 0x001a, 0x4c90, 0x51ed, 0x668e, 0x001a, 0x978e, 0xbe89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcf92, 0x001a, 0x001a, 0x4192, 0xc898, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xca88, 0xe192, 0x5a8f, 0xb28d, 0x4397, 0x001a, 0xcc91, 0x001a, 0xbd89, 0x52ed, 0xc798, 0x001a, 0x5d97, 0xc398, 0xc598, 0xec8d, 0xc698, 0x439b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xce98, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd198, 0xcf98, 0x001a, 0x001a, 0xc089, 0x001a, 0xb995, 0xc998, 0x001a, 0x001a, 0x001a, 0x001a, 0xcd98, 0xf18c, 0x001a, 0x001a, 0x678e, 0x001a, 0x001a, 0x001a, 0xa48a, 0x001a, 0x001a, 0xd298, 0x001a, 0xca98, 0x001a, 0x54ed, 0xe197, 0x001a, 0x988e, 0x001a, 0xcb98, 0x001a, 0xd098, 0x53ed, 0x001a, 0x56ed, 0x001a, 0xd398, 0x001a, 0xcc98, 0x001a, 0x55ed, 0x9f8b, 0x001a, 0xcb88, 0x001a, 0x001a, 0xa08b, 0xbf89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x449b, 0x001a, 0x9996, 0x8e95, 0xf28c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4e90, 0xb597, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd695, 0x001a, 0x001a, 0x578c, 0xa391, 0xe289, 0x001a, 0x001a, 0x001a, 0x001a, 0x45ed, 0x728f, 0x001a, 0x001a, 0x57ed, 0xd798, 0x001a, 0xdc98, 0xda98, 0x001a, 0x001a, 0xd598, 0x001a, 0x001a, 0xad91, 0xd898, 0x001a, 0xdb98, 0xd998, 0x001a, 0xdb95, 0x001a, 0xd698, 0x001a, 0x4d90, 0x001a, 0x9396, 0xdd98, 0xde98, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x438f, 0xeb98, 0x001a, 0x001a, 0x001a, 0x6f94, 0x001a, 0x5595, 0xe698, 0x001a, 0xee95, 0x001a, 0xb489, 0x001a, 0x001a, 0x001a, 0xea98, 0x5aed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe498, 0xed98, 0x001a, 0x001a, 0x7191, 0x001a, 0xc28c, 0x001a, 0x7b94, 0x001a, 0xc5e0, 0x001a, 0xec98, 0x7c93, 0x001a, 0xe198, 0x001a, 0xf48c, 0x001a, 0x001a, 0xf38c, 0xdf98, 0x001a, 0x001a, 0x001a, 0x5bed, 0xd88e, 0x001a, 0xe798, 0x59ed, 0xed95, 0x6c92, 0xe398, 0x918c, 0x001a, 0xe098, 0xe898, 0xe298, 0xcf97, 0xe998, 0x6098, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe48b, 0x001a, 0x001a, 0x908c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x58ed, 0x001a, 0x5eed, 0xee98, 0x001a, 0x001a, 0x5ced, 0xef98, 0xf398, 0xcc88, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xce95, 0xf298, 0x001a, 0x001a, 0x001a, 0x001a, 0xf198, 0xf598, 0x001a, 0x001a, 0x001a, 0xf498, 0x001a, 0xe292, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x928c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf698, 0x001a, 0x001a, 0x001a, 0x5ded, 0x001a, 0xc38e, 0x001a, 0xa491, 0xe392, 0xf48b, 0x001a, 0xf798, 0x001a, 0x001a, 0x001a, 0x001a, 0x558b, 0x001a, 0x001a, 0xf898, 0x001a, 0x001a, 0x001a, 0x001a, 0xfa98, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5496, 0x001a, 0x001a, 0x001a, 0x868c, 0x001a, 0x001a, 0x5fed, 0x001a, 0x001a, 0x001a, 0x508e, 0xf594, 0xf998, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc38d, 0x6297, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc98, 0x4299, 0xfb98, 0xc28d, 0x001a, 0x9d8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x588c, 0x001a, 0x001a, 0x001a, 0x4399, 0x001a, 0x001a, 0xcd8b, 0x001a, 0x001a, 0x001a, 0x4099, 0x4199, 0x001a, 0x001a, 0xad93, 0x001a, 0x9c91, 0x001a, 0xa18b, 0x001a, 0x001a, 0x001a, 0x6c96, 0x4499, 0x001a, 0x61ed, 0x001a, 0xbb97, 0x001a, 0x001a, 0x001a, 0x4599, 0x001a, 0x001a, 0x001a, 0x001a, 0x4899, 0x001a, 0x4699, 0x001a, 0x6d91, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4799, 0x4999, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x60ed, 0x4b99, 0x001a, 0x001a, 0x001a, 0x4a99, 0x001a, 0xc695, 0x001a, 0x001a, 0x001a, 0x001a, 0x568b, 0x4d99, 0x4e99, 0x001a, 0xad89, 0x001a, 0x001a, 0x001a, 0x001a, 0x4c99, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf28e, 0x001a, 0x5199, 0x5099, 0x4f99, 0x001a, 0xd498, 0x001a, 0x5299, 0x001a, 0x001a, 0x001a, 0x001a, 0x9e8f, 0x001a, 0x5399, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4497, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd796, 0x001a, 0x001a, 0x001a, 0x001a, 0x5599, 0x001a, 0x001a, 0x5499, 0x5799, 0x5699, 0x001a, 0x001a, 0x5899, 0x5999, 0xf288, 0x001a, 0xb38c, 0x5a8c, 0x5b8f, 0x9b92, 0xa28b, 0xe690, 0xf58c, 0x62ed, 0x8e8d, 0x5b99, 0xc696, 0x6593, 0x001a, 0x998e, 0x001a, 0x5a99, 0x001a, 0x5c99, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7d93, 0x001a, 0x958a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5d99, 0x001a, 0x63ed, 0xfc93, 0x001a, 0x001a, 0x5391, 0x5f99, 0x6099, 0xaa94, 0xf68c, 0x5a98, 0x6199, 0x001a, 0x001a, 0xa48b, 0x001a, 0x001a, 0x001a, 0xba95, 0xb491, 0xef8b, 0x5493, 0x001a, 0x001a, 0x001a, 0x938c, 0x001a, 0x001a, 0x001a, 0x6299, 0x001a, 0x6399, 0x001a, 0x001a, 0xe093, 0x7e89, 0x001a, 0x001a, 0x6699, 0xfb8d, 0x001a, 0x6599, 0xc48d, 0x001a, 0x6799, 0xece3, 0x6899, 0x6096, 0x6999, 0x001a, 0x6a99, 0x6b99, 0xe78f, 0x001a, 0xca8e, 0x001a, 0x001a, 0x001a, 0x64ed, 0x001a, 0x001a, 0xa58a, 0x001a, 0x6e99, 0x001a, 0x6c99, 0xbb96, 0x6d99, 0x001a, 0x7995, 0x6f99, 0x7099, 0x7199, 0x7e93, 0x001a, 0x001a, 0x001a, 0x7599, 0x7399, 0x7499, 0x7299, 0xe18d, 0x7699, 0xe896, 0xe297, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7799, 0x65ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa690, 0x7899, 0x798f, 0x001a, 0x001a, 0x7999, 0x001a, 0x9c92, 0xbd97, 0x8093, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc399, 0x001a, 0x001a, 0x001a, 0x001a, 0x7a99, 0xa3ea, 0xc38b, 0x001a, 0x001a, 0x7b99, 0x7d96, 0x001a, 0x001a, 0x001a, 0x001a, 0x888f, 0xfa91, 0x001a, 0x7d99, 0xe293, 0x001a, 0x66ed, 0x7e99, 0x001a, 0x001a, 0x8099, 0x4d8a, 0x001a, 0x001a, 0x001a, 0x8199, 0xa58b, 0x001a, 0xca93, 0x9a89, 0x6f8f, 0x001a, 0x001a, 0x9f94, 0x8299, 0x001a, 0x8193, 0x001a, 0x001a, 0x6e90, 0x8399, 0x001a, 0xaa95, 0xd890, 0xa08a, 0x001a, 0xa78a, 0x8499, 0x001a, 0x001a, 0x8699, 0x001a, 0x001a, 0x598c, 0x001a, 0x001a, 0x8599, 0x67ed, 0x001a, 0xf197, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x898f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbb94, 0xca95, 0x001a, 0x8799, 0x001a, 0x9897, 0x8899, 0x001a, 0x001a, 0x001a, 0x8999, 0x001a, 0x9e93, 0x001a, 0x001a, 0x8a99, 0x001a, 0x001a, 0xa790, 0xfc8d, 0x948c, 0x8b99, 0x688e, 0x8f8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe492, 0x8d99, 0x001a, 0x001a, 0xa591, 0x001a, 0x001a, 0xed8d, 0x8e99, 0x8f99, 0x4f91, 0x001a, 0x8c99, 0x001a, 0x001a, 0x001a, 0x001a, 0x9199, 0x001a, 0x5596, 0x001a, 0x001a, 0x001a, 0x001a, 0x848d, 0x001a, 0x001a, 0x9099, 0x001a, 0x001a, 0x001a, 0x001a, 0x958c, 0xdc8d, 0x8d94, 0x001a, 0x001a, 0x001a, 0x9499, 0x9299, 0x001a, 0x001a, 0x001a, 0x001a, 0x9b95, 0xe88f, 0x9b99, 0x848a, 0x9599, 0x9399, 0x6e91, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9799, 0x001a, 0x9699, 0x001a, 0x001a, 0x001a, 0x638a, 0x001a, 0x001a, 0x001a, 0x808c, 0x9c99, 0xab97, 0x001a, 0x001a, 0x001a, 0x9899, 0x001a, 0x001a, 0x001a, 0x9d99, 0x9a99, 0x001a, 0x9999, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcd97, 0x68ed, 0x001a, 0x001a, 0xf78c, 0xc189, 0x001a, 0x001a, 0xf297, 0x001a, 0x001a, 0x69ed, 0x001a, 0x001a, 0x958f, 0x7793, 0x858d, 0xa099, 0xa199, 0x001a, 0x5bee, 0x001a, 0xe397, 0x001a, 0x001a, 0x4a98, 0xa399, 0x001a, 0x001a, 0x001a, 0xf88c, 0x001a, 0x001a, 0xa299, 0x001a, 0x4e8a, 0x001a, 0x6aed, 0xa499, 0x001a, 0x7596, 0x001a, 0xba92, 0x001a, 0x4597, 0x001a, 0xd795, 0x001a, 0x001a, 0x001a, 0xa599, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3e8, 0x001a, 0x001a, 0xae93, 0x001a, 0xa699, 0xa88a, 0xb196, 0x001a, 0x6bed, 0x001a, 0x9f8f, 0xa799, 0xe595, 0xab99, 0x001a, 0xa890, 0xa899, 0xce8b, 0x001a, 0xa999, 0xa98a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4d8c, 0xac99, 0x001a, 0xad99, 0x001a, 0x001a, 0xae99, 0xaf99, 0xd98e, 0x001a, 0x001a, 0x001a, 0xf98c, 0xdc96, 0x6ced, 0xe696, 0xf593, 0x001a, 0x001a, 0xef95, 0xb099, 0x6ded, 0xb199, 0x001a, 0x001a, 0x001a, 0x001a, 0xb399, 0x001a, 0xb599, 0xb499, 0x001a, 0x001a, 0x001a, 0x001a, 0xb699, 0xbb89, 0x6b96, 0x001a, 0xfa8d, 0xb799, 0x001a, 0x001a, 0x7891, 0x001a, 0x001a, 0xa08f, 0xa78b, 0x001a, 0xb899, 0x6eed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd994, 0x001a, 0x001a, 0x001a, 0x001a, 0xb999, 0x001a, 0xba99, 0x001a, 0xbb99, 0x001a, 0x001a, 0x001a, 0x001a, 0xbc99, 0x4395, 0xe68b, 0xe388, 0x001a, 0x001a, 0x001a, 0xbd93, 0xbd99, 0x5c8f, 0x001a, 0xe790, 0x001a, 0xbf99, 0xbe99, 0xa18f, 0xdf8c, 0xc199, 0xbc94, 0x001a, 0x001a, 0xc299, 0x001a, 0x001a, 0x001a, 0xda94, 0xb291, 0xec91, 0xa68b, 0x001a, 0x001a, 0xec93, 0x5092, 0x001a, 0x8e94, 0x001a, 0x6d96, 0x001a, 0xc499, 0x001a, 0xe890, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x548c, 0x001a, 0x001a, 0xc599, 0x001a, 0x001a, 0x001a, 0x001a, 0xc699, 0x4b89, 0xf388, 0xeb8a, 0x6fed, 0xa691, 0x708b, 0x9197, 0x001a, 0xc999, 0xb589, 0x001a, 0x001a, 0xc899, 0x001a, 0x001a, 0x001a, 0xa88b, 0x001a, 0x001a, 0xca99, 0x001a, 0xef96, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x70ed, 0x001a, 0x001a, 0xcb99, 0x001a, 0xd097, 0x001a, 0xfa8c, 0x001a, 0x001a, 0x001a, 0x001a, 0xb48c, 0xcc99, 0x001a, 0x001a, 0x001a, 0x001a, 0xce99, 0xcd99, 0x001a, 0x7e90, 0x5889, 0x001a, 0x001a, 0x001a, 0x7d89, 0xcf99, 0x001a, 0xd099, 0x001a, 0x71ed, 0xb58c, 0x001a, 0x001a, 0xd199, 0x001a, 0x001a, 0x001a, 0x001a, 0x8e8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x518e, 0xd299, 0x001a, 0x001a, 0x001a, 0x001a, 0x9496, 0xb38d, 0x798b, 0x4697, 0x6f91, 0xbd94, 0xfb8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x668f, 0x001a, 0xe68e, 0xf38e, 0x001a, 0x968f, 0x001a, 0xbe94, 0x001a, 0x72ed, 0x001a, 0xd599, 0x001a, 0x6289, 0x7091, 0xfb8c, 0xc38c, 0xe58b, 0x001a, 0x001a, 0xd999, 0x4092, 0xfc91, 0xa98b, 0xa28f, 0xda99, 0xd899, 0xc289, 0xe491, 0xb68e, 0x6a8e, 0x4589, 0x001a, 0x001a, 0x908a, 0x868d, 0x698e, 0x001a, 0xdb99, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdc99, 0x001a, 0x688b, 0x658a, 0x001a, 0x001a, 0x001a, 0x878d, 0x678b, 0xdd92, 0x4489, 0xaf93, 0xbc96, 0x408d, 0x9997, 0x6693, 0xfc8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4e8c, 0x001a, 0xe599, 0x001a, 0xe18b, 0x6996, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdb94, 0x001a, 0x001a, 0xe499, 0x001a, 0xdc8a, 0xdf99, 0xe099, 0xe299, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe399, 0x001a, 0x7a8b, 0x8190, 0x001a, 0xab95, 0xe199, 0xdd99, 0xe18c, 0x001a, 0xde99, 0x001a, 0x4398, 0x001a, 0x001a, 0x001a, 0xf095, 0x001a, 0xe692, 0xe08c, 0x908d, 0x001a, 0x001a, 0x001a, 0xe699, 0x001a, 0x001a, 0xdb93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xea99, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc8e, 0x001a, 0xf48e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xed99, 0xeb99, 0x001a, 0xa196, 0x001a, 0xe899, 0xf199, 0xec99, 0x001a, 0x001a, 0x001a, 0xef99, 0xc48c, 0xbd96, 0x001a, 0x001a, 0xf099, 0x001a, 0x001a, 0x001a, 0xf299, 0x001a, 0xf499, 0x001a, 0x001a, 0x001a, 0x75ed, 0xee8d, 0x6198, 0x001a, 0xe999, 0xe799, 0xf399, 0x001a, 0xee99, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf699, 0x001a, 0x429a, 0xf899, 0x001a, 0x001a, 0xfc99, 0x76ed, 0x001a, 0x409a, 0xf999, 0x001a, 0x001a, 0x5d9a, 0x001a, 0x001a, 0xe78d, 0x508a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf799, 0x001a, 0x001a, 0x001a, 0x449a, 0xf488, 0x439a, 0x001a, 0xa388, 0x6995, 0x419a, 0x001a, 0xfa99, 0x001a, 0x001a, 0xf599, 0xfb99, 0xc68d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x459a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf588, 0x4e9a, 0x001a, 0x001a, 0x469a, 0x479a, 0x001a, 0xa38f, 0x8996, 0x001a, 0x001a, 0x001a, 0x4c9a, 0x4b9a, 0x001a, 0x001a, 0x001a, 0x4e93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4d9a, 0x001a, 0x001a, 0x4a9a, 0x001a, 0x77ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x5389, 0x001a, 0xb48d, 0x4f90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x489a, 0x8293, 0x001a, 0x001a, 0x001a, 0x499a, 0x001a, 0xa088, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x539a, 0x4297, 0x001a, 0xa58f, 0x001a, 0x599a, 0x001a, 0x001a, 0x001a, 0x001a, 0x589a, 0x4f9a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc191, 0x001a, 0x509a, 0x001a, 0x001a, 0x001a, 0xed91, 0x559a, 0xa48f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x529a, 0x001a, 0x001a, 0xe296, 0x001a, 0x001a, 0x001a, 0x5b8c, 0x001a, 0x001a, 0x569a, 0x579a, 0x001a, 0x001a, 0x001a, 0x001a, 0x549a, 0x5a9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x519a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x609a, 0x659a, 0x001a, 0x619a, 0x001a, 0x5c9a, 0x001a, 0x001a, 0x669a, 0x5091, 0x001a, 0x78ed, 0x689a, 0x001a, 0x418d, 0x5e9a, 0x9d92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x629a, 0x5b9a, 0xab8a, 0x001a, 0xec8a, 0x858a, 0x639a, 0x5f9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x968c, 0x699a, 0x679a, 0x7291, 0x698b, 0xaa8b, 0x001a, 0x649a, 0x001a, 0xf28b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6389, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d9a, 0x6b9a, 0x001a, 0xa59a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x709a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6a9a, 0x001a, 0x6e9a, 0x001a, 0x001a, 0x6c9a, 0x001a, 0x001a, 0x001a, 0x6b8e, 0x6f9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x729a, 0x001a, 0x779a, 0x001a, 0x001a, 0x001a, 0x759a, 0x749a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5192, 0x001a, 0x001a, 0xc389, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x719a, 0x001a, 0x739a, 0xa68f, 0x5289, 0x001a, 0x001a, 0x769a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdc89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x829a, 0x001a, 0xfa8f, 0x7d9a, 0x001a, 0x7b9a, 0x001a, 0x7c9a, 0x001a, 0x7e9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5c89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5891, 0x001a, 0x789a, 0x001a, 0x799a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x819a, 0x001a, 0x001a, 0x001a, 0xed8a, 0x001a, 0x849a, 0x809a, 0x839a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xac95, 0x001a, 0x001a, 0x001a, 0xd393, 0x001a, 0xb694, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x869a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x859a, 0x648a, 0x001a, 0x001a, 0x879a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x899a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x889a, 0x001a, 0x5894, 0x001a, 0x001a, 0x8b9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8e9a, 0x001a, 0x8d9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x909a, 0x001a, 0x001a, 0x001a, 0x939a, 0x919a, 0x8f9a, 0x929a, 0x001a, 0x001a, 0x001a, 0x001a, 0x949a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x959a, 0x001a, 0x001a, 0x969a, 0x001a, 0x979a, 0x001a, 0x001a, 0x001a, 0x989a, 0x6499, 0x001a, 0xfa8e, 0x6c8e, 0x001a, 0x001a, 0xf189, 0x001a, 0xf688, 0x001a, 0x001a, 0x6392, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x999a, 0x001a, 0xa28d, 0x001a, 0xcd88, 0x7d90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a9a, 0xc58c, 0x001a, 0x001a, 0x918d, 0x001a, 0x9c9a, 0x9b9a, 0x001a, 0x001a, 0xde95, 0x9d9a, 0x001a, 0x001a, 0x001a, 0x9f9a, 0x9e9a, 0x001a, 0xa09a, 0x001a, 0xa19a, 0x001a, 0x978c, 0x001a, 0x001a, 0x8089, 0xa29a, 0x001a, 0x001a, 0xa49a, 0x001a, 0xa39a, 0x001a, 0x001a, 0x001a, 0xa69a, 0x001a, 0x001a, 0x7993, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa79a, 0xb388, 0xdd8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x5c8c, 0x001a, 0x001a, 0x6e92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa89a, 0xa99a, 0x001a, 0x001a, 0xab9a, 0x001a, 0x001a, 0x001a, 0x001a, 0xac9a, 0x001a, 0xe28d, 0x001a, 0x001a, 0x001a, 0x001a, 0xcf8b, 0x001a, 0x001a, 0x5696, 0x001a, 0x001a, 0x001a, 0xaa9a, 0xad9a, 0xbf8d, 0x428d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x79ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb19a, 0x001a, 0x001a, 0xa38d, 0x7aed, 0x5292, 0x001a, 0x001a, 0xae9a, 0xd892, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb29a, 0x001a, 0x001a, 0x8290, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb09a, 0xb39a, 0x001a, 0x5e8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb49a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb59a, 0x001a, 0x438d, 0x5f8a, 0xb79a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb89a, 0x001a, 0x7bed, 0x001a, 0x001a, 0x001a, 0xb99a, 0x001a, 0x001a, 0xb69a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaf9a, 0x001a, 0x001a, 0xba9a, 0x001a, 0x001a, 0xbb9a, 0x7ded, 0x7ced, 0x001a, 0x001a, 0x8496, 0x001a, 0x001a, 0xe98f, 0x001a, 0x001a, 0x001a, 0xbd9a, 0xbe9a, 0xbc9a, 0x001a, 0xc09a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5794, 0x001a, 0x001a, 0xe688, 0x7595, 0x001a, 0x001a, 0xc19a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfb8f, 0x001a, 0x001a, 0xb78e, 0x001a, 0x7c94, 0xee8a, 0x001a, 0xe98d, 0x001a, 0x001a, 0x001a, 0x7896, 0x001a, 0xb093, 0x001a, 0x001a, 0x988c, 0xcd91, 0x001a, 0x001a, 0x001a, 0xbf9a, 0xc29a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc291, 0x001a, 0x001a, 0x001a, 0xc39a, 0x001a, 0x001a, 0x001a, 0xc49a, 0x001a, 0x001a, 0x001a, 0xc69a, 0x001a, 0x001a, 0xe792, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xac8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9fea, 0x8189, 0xf195, 0x001a, 0x001a, 0xea8f, 0x6793, 0x001a, 0x001a, 0x001a, 0x001a, 0xe48d, 0x001a, 0x001a, 0xcc9a, 0x001a, 0x001a, 0xbb95, 0xdb97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf289, 0xc89a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5991, 0xcb9a, 0x001a, 0x8393, 0x001a, 0x001a, 0x6893, 0x8493, 0xb794, 0xcb92, 0x001a, 0x001a, 0x001a, 0xc78d, 0x001a, 0x001a, 0x001a, 0xc79a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9689, 0x001a, 0x5593, 0x001a, 0x001a, 0x001a, 0x001a, 0xc99a, 0x001a, 0xc59a, 0x001a, 0x001a, 0x6f90, 0x001a, 0x001a, 0x001a, 0xcd9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d8f, 0x001a, 0x001a, 0x001a, 0x001a, 0xab8b, 0x001a, 0xce9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe695, 0x001a, 0x001a, 0x001a, 0x9d91, 0x001a, 0x001a, 0x001a, 0x001a, 0xc492, 0x001a, 0x81ed, 0xd09a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e96, 0x001a, 0x001a, 0xd19a, 0x001a, 0x001a, 0xd69a, 0x001a, 0x001a, 0x001a, 0x82ed, 0xad95, 0x001a, 0x001a, 0x001a, 0x001a, 0xd59a, 0xcf9a, 0xd29a, 0xd49a, 0x001a, 0x001a, 0xa48d, 0x001a, 0x001a, 0xc795, 0x001a, 0x001a, 0x001a, 0xd79a, 0x001a, 0x6492, 0x001a, 0x001a, 0xf389, 0x001a, 0xeb8f, 0x001a, 0x001a, 0x001a, 0x001a, 0xd99a, 0x001a, 0xd89a, 0x001a, 0x888d, 0x001a, 0xda9a, 0xdc9a, 0xdb9a, 0x001a, 0x001a, 0xde9a, 0x001a, 0xd39a, 0xe09a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf9a, 0xdd9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d8e, 0x7090, 0x001a, 0x7391, 0xe19a, 0xba90, 0xeb88, 0x8494, 0x001a, 0x001a, 0x001a, 0x001a, 0xd992, 0x001a, 0xe39a, 0xe29a, 0xe49a, 0xe59a, 0xe69a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe79a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcf95, 0xe89a, 0x83ed, 0x001a, 0x001a, 0x001a, 0xc489, 0xe99a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5b97, 0x4f8a, 0x001a, 0xc799, 0x678f, 0xbd91, 0xea9a, 0xe996, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb296, 0x001a, 0x001a, 0xec9a, 0x001a, 0xe591, 0x001a, 0x5693, 0xbe91, 0x7695, 0xed9a, 0xee9a, 0x9b89, 0x001a, 0x001a, 0xb88e, 0xef9a, 0x001a, 0x001a, 0x001a, 0x001a, 0xce88, 0xf09a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf19a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8289, 0x001a, 0x001a, 0xef8a, 0xde93, 0xf295, 0x001a, 0x001a, 0x001a, 0x001a, 0xf59a, 0x7491, 0xf49a, 0x5f8c, 0x001a, 0x84ed, 0x7a96, 0xf39a, 0x001a, 0x8593, 0xf79a, 0x001a, 0xf69a, 0x85ed, 0x001a, 0x86ed, 0x001a, 0x001a, 0xf99a, 0x001a, 0xf89a, 0x87ed, 0x001a, 0x9c89, 0x001a, 0xfa9a, 0xa78f, 0xfc9a, 0x4492, 0x001a, 0xfb9a, 0x001a, 0xb195, 0x001a, 0x001a, 0x001a, 0x001a, 0x978f, 0x7a93, 0x001a, 0x001a, 0x001a, 0x409b, 0x001a, 0x001a, 0x001a, 0x001a, 0x448d, 0x001a, 0x001a, 0x001a, 0x419b, 0x4094, 0xdc94, 0xcf96, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4494, 0x001a, 0x001a, 0x4a9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x578b, 0x001a, 0x001a, 0x6497, 0x001a, 0x001a, 0xad96, 0x001a, 0xaa9b, 0x001a, 0x429b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x459b, 0x88ed, 0xc391, 0x001a, 0x001a, 0x5796, 0x001a, 0x001a, 0x001a, 0x6993, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x469b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8596, 0x89ed, 0xc88d, 0x001a, 0x001a, 0xa88f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x479b, 0x001a, 0x001a, 0x6f8e, 0x001a, 0x6e8e, 0x001a, 0x001a, 0x001a, 0x001a, 0xb788, 0xc68c, 0x001a, 0xa990, 0xcf88, 0x001a, 0x001a, 0x001a, 0x001a, 0x4b9b, 0x4c9b, 0x001a, 0x499b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5789, 0xad8a, 0x001a, 0x489b, 0x001a, 0xc396, 0x5095, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa688, 0x001a, 0x001a, 0x001a, 0x001a, 0xf788, 0x001a, 0x001a, 0x001a, 0x708e, 0x001a, 0xd088, 0x001a, 0xa188, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x519b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4f9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xba96, 0x001a, 0x529b, 0x001a, 0x509b, 0x001a, 0x001a, 0x4e9b, 0x5090, 0x001a, 0x001a, 0x001a, 0x001a, 0x4d9b, 0x001a, 0x001a, 0x001a, 0xd895, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe28c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x569b, 0x579b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa98f, 0x001a, 0x001a, 0x001a, 0x539b, 0x4b98, 0x001a, 0x001a, 0x001a, 0x001a, 0x6b94, 0x001a, 0x001a, 0x559b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa58d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x589b, 0x001a, 0x001a, 0x001a, 0x7795, 0x001a, 0x001a, 0x001a, 0x599b, 0x001a, 0x549b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb996, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7d94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5a9b, 0x5195, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5b9b, 0x5f9b, 0x5c9b, 0x001a, 0x001a, 0xc589, 0x5e9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb98e, 0x001a, 0x5d9b, 0x998c, 0x001a, 0x001a, 0x001a, 0x6b9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x649b, 0x619b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8492, 0x001a, 0x609b, 0x001a, 0x001a, 0x629b, 0x001a, 0x001a, 0x639b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x659b, 0x669b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf08a, 0x001a, 0x689b, 0x679b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x699b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xec8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6c9b, 0x001a, 0xda92, 0x001a, 0x001a, 0x001a, 0x6489, 0x001a, 0x6a9b, 0x001a, 0x001a, 0x001a, 0x6d9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e9b, 0x001a, 0x719b, 0x001a, 0x001a, 0x6f9b, 0x001a, 0x709b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x718e, 0x729b, 0x001a, 0x001a, 0x458d, 0x739b, 0x8aed, 0x9a8e, 0xb691, 0x001a, 0x749b, 0x759b, 0x798e, 0x468d, 0x001a, 0xd096, 0x001a, 0x001a, 0x001a, 0x478b, 0xc78c, 0x769b, 0x778a, 0x001a, 0x001a, 0x779b, 0x001a, 0xb791, 0x001a, 0x001a, 0x001a, 0x001a, 0x789b, 0xa19b, 0x001a, 0x799b, 0x001a, 0x7a9b, 0x001a, 0x001a, 0x7b9b, 0x001a, 0x7d9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7e9b, 0x001a, 0x001a, 0x809b, 0x001a, 0xee91, 0x001a, 0x4689, 0xe78e, 0xc088, 0x001a, 0x7691, 0xae8a, 0xb38e, 0x001a, 0x478d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8693, 0x001a, 0x408f, 0xaf8a, 0x8892, 0xe892, 0xb688, 0x588b, 0xf395, 0x001a, 0xc08e, 0x001a, 0x001a, 0x718b, 0xe990, 0xba8e, 0x4797, 0x819b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7b8b, 0x001a, 0xc98d, 0x001a, 0x001a, 0x518a, 0x8389, 0xaa8f, 0xc689, 0x001a, 0x829b, 0x6597, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x688f, 0x8bed, 0x001a, 0xe28e, 0x839b, 0xf18a, 0xd093, 0xa796, 0x849b, 0x001a, 0x859b, 0x001a, 0x001a, 0x7895, 0x001a, 0x001a, 0x001a, 0x879b, 0x001a, 0xa68a, 0xf58b, 0x869b, 0x001a, 0x001a, 0x001a, 0x8ded, 0x001a, 0x001a, 0xb08a, 0x001a, 0x5190, 0x8b9b, 0x408e, 0x001a, 0xc789, 0x8a9b, 0x001a, 0x889b, 0x8c9b, 0x899b, 0x4a94, 0xcb9e, 0x5290, 0x001a, 0x8d9b, 0x8eed, 0x001a, 0xbe97, 0x001a, 0x8e9b, 0x001a, 0x001a, 0x909b, 0x001a, 0x9e92, 0x8f9b, 0x001a, 0xa190, 0x001a, 0x9b8e, 0x001a, 0x001a, 0x001a, 0xce91, 0xf58e, 0x001a, 0x9595, 0xea90, 0x001a, 0xcb8e, 0x919b, 0xab8f, 0x929b, 0x939b, 0xd188, 0xb891, 0x7190, 0x001a, 0x949b, 0xb193, 0xac8f, 0x001a, 0xad8f, 0x001a, 0x959b, 0x001a, 0x001a, 0xeb90, 0x001a, 0x001a, 0x001a, 0xae8f, 0x001a, 0x001a, 0x001a, 0x8fed, 0x001a, 0x969b, 0x001a, 0x979b, 0x001a, 0xde96, 0x001a, 0x001a, 0x001a, 0x989b, 0x001a, 0x001a, 0x001a, 0x001a, 0xc48b, 0x001a, 0x001a, 0x001a, 0x418f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x999b, 0x9a9b, 0xda8e, 0x4b90, 0xf293, 0x7390, 0xf694, 0x4194, 0xc78b, 0x9b9b, 0x001a, 0x001a, 0x001a, 0x8f8b, 0x9c9b, 0x001a, 0xfc8b, 0x001a, 0xcd93, 0xae89, 0x001a, 0x728e, 0x9d9b, 0xa09b, 0x9f9b, 0xfb8b, 0x001a, 0x9e9b, 0x001a, 0x5793, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xae91, 0x001a, 0x6a93, 0xc68e, 0x001a, 0x001a, 0x7791, 0x9a97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa29b, 0x001a, 0xa39b, 0xd493, 0x001a, 0x528e, 0x001a, 0x001a, 0x001a, 0x001a, 0xa59b, 0x001a, 0x001a, 0xa69b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa79b, 0x001a, 0x001a, 0x001a, 0xf28a, 0xa89b, 0x001a, 0x001a, 0xa99b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaa89, 0x001a, 0x001a, 0x001a, 0x001a, 0x90ed, 0x001a, 0x5a91, 0xe28a, 0x001a, 0xab9b, 0xa696, 0x001a, 0x001a, 0x001a, 0x001a, 0xd091, 0x001a, 0x788a, 0x001a, 0x001a, 0xad9b, 0xaf9b, 0xdd8a, 0x001a, 0x91ed, 0xac9b, 0xae9b, 0x001a, 0xb19b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb09b, 0x001a, 0xb29b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb39b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbb93, 0xac8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe389, 0xb49b, 0xb99b, 0x001a, 0x001a, 0xb79b, 0x001a, 0xf595, 0xf495, 0x001a, 0x001a, 0x001a, 0x001a, 0x92ed, 0x8793, 0x001a, 0x001a, 0x001a, 0xb69b, 0x738f, 0x001a, 0xb59b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9290, 0x001a, 0x001a, 0x001a, 0xba9b, 0x001a, 0x001a, 0xe88d, 0x001a, 0x001a, 0xc09b, 0x001a, 0x001a, 0xc19b, 0xbb9b, 0x528a, 0xbc9b, 0xc59b, 0xc49b, 0xc39b, 0xbf9b, 0x001a, 0x001a, 0x001a, 0xbe9b, 0x001a, 0x001a, 0xc29b, 0x001a, 0x001a, 0x001a, 0x001a, 0x93ed, 0x001a, 0xf695, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x96ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc99b, 0xc69b, 0x001a, 0xc89b, 0x001a, 0x9297, 0x001a, 0xc79b, 0x94ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbd9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9390, 0x001a, 0x001a, 0xca9b, 0x97ed, 0x001a, 0xb58d, 0x001a, 0x001a, 0x001a, 0xcb9b, 0x001a, 0x001a, 0xcc9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcf9b, 0x001a, 0xce9b, 0x001a, 0x001a, 0xcd9b, 0x001a, 0x001a, 0x001a, 0x8893, 0xb89b, 0x001a, 0x001a, 0x001a, 0xd59b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd19b, 0x001a, 0x001a, 0x001a, 0x001a, 0xd09b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd29b, 0x001a, 0xd39b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd69b, 0x98ed, 0x99ed, 0xe497, 0x001a, 0xd79b, 0xd49b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd89b, 0x001a, 0x001a, 0xde8a, 0xd99b, 0x001a, 0x001a, 0x9aed, 0x001a, 0xdb9b, 0xda9b, 0x001a, 0x001a, 0xdc9b, 0x001a, 0x001a, 0x001a, 0x001a, 0xdd9b, 0x001a, 0xec90, 0x428f, 0x001a, 0x001a, 0x848f, 0x001a, 0x8391, 0x001a, 0x488d, 0xb68d, 0x498d, 0x908b, 0x001a, 0x001a, 0xde9b, 0x001a, 0x001a, 0xb78d, 0x001a, 0x001a, 0xc88c, 0xdf9b, 0xa496, 0x6294, 0xe09b, 0x001a, 0x4a8d, 0x001a, 0x001a, 0x001a, 0xaa8a, 0x001a, 0x4692, 0xd08b, 0x001a, 0x001a, 0x001a, 0x738e, 0x7a95, 0x001a, 0x001a, 0xbf94, 0x001a, 0x001a, 0x001a, 0x001a, 0xe19b, 0xf38a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe49b, 0x001a, 0x001a, 0x001a, 0x001a, 0x9f92, 0x001a, 0x001a, 0xe39b, 0xe29b, 0xe59b, 0x001a, 0xe992, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8390, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x748e, 0x001a, 0xc890, 0x001a, 0xd191, 0x418b, 0x001a, 0x001a, 0xa092, 0x001a, 0x001a, 0xe69b, 0xe79b, 0xed8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x5896, 0x001a, 0x001a, 0xea9b, 0x001a, 0x001a, 0xe99b, 0xe89b, 0x9d95, 0x001a, 0xf19b, 0x001a, 0x001a, 0x001a, 0x001a, 0x7996, 0x001a, 0xeb9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xed9b, 0x8b96, 0x001a, 0xec9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xee9b, 0x001a, 0xa694, 0xef9b, 0xbc95, 0xf09b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb18a, 0xbd95, 0x4e94, 0xf29b, 0xf39b, 0x001a, 0x4b8d, 0xb28a, 0xf49b, 0xb68c, 0x6397, 0x4897, 0xf48a, 0xf69b, 0x001a, 0xa192, 0x001a, 0x4c8d, 0xaf8f, 0x001a, 0x001a, 0xdd94, 0x001a, 0x001a, 0xb08f, 0x001a, 0x001a, 0x001a, 0x001a, 0x988f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xea92, 0xf795, 0x5893, 0x001a, 0x001a, 0x4d8d, 0x001a, 0x7b95, 0x001a, 0x001a, 0x001a, 0xf79b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7893, 0xc08d, 0x001a, 0x001a, 0x001a, 0xc98c, 0x001a, 0xeb92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc188, 0x8e8f, 0x4e8d, 0x6697, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf89b, 0xf99b, 0x7094, 0x001a, 0x001a, 0x001a, 0x001a, 0xfa9b, 0xf597, 0x4c98, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc9b, 0xfb9b, 0x001a, 0x001a, 0x668a, 0x001a, 0x001a, 0x409c, 0x001a, 0x001a, 0x001a, 0x439c, 0x449c, 0x001a, 0x429c, 0x001a, 0x5f95, 0xb18f, 0x469c, 0x459c, 0x419c, 0x001a, 0x001a, 0x001a, 0x001a, 0x479c, 0x489c, 0x001a, 0x001a, 0x499c, 0x001a, 0x001a, 0x001a, 0x4c9c, 0x4a9c, 0x001a, 0x4b9c, 0x4d9c, 0x001a, 0x8489, 0xec92, 0x4e9c, 0x001a, 0x9a8c, 0xf489, 0x5594, 0x001a, 0x4f9c, 0xf993, 0x001a, 0xd995, 0x001a, 0x509c, 0x4d98, 0x001a, 0x001a, 0x001a, 0x001a, 0x519c, 0xbe95, 0x549c, 0x9f98, 0xaf98, 0x001a, 0xae8e, 0xf393, 0x559c, 0x001a, 0x7c8b, 0xa292, 0xf888, 0x569c, 0xa495, 0x4f8d, 0x001a, 0x001a, 0x6f92, 0x001a, 0x001a, 0x001a, 0xed92, 0x001a, 0x9bed, 0x001a, 0x001a, 0x001a, 0xed96, 0xb78c, 0xca8c, 0x001a, 0x579c, 0x001a, 0x001a, 0x001a, 0x589c, 0x001a, 0x5e9c, 0x001a, 0xe38e, 0x001a, 0x001a, 0x9ced, 0xa392, 0x001a, 0xad8b, 0x599c, 0x001a, 0x001a, 0x001a, 0x4a95, 0x001a, 0x6592, 0x001a, 0x001a, 0x5a9c, 0x001a, 0x001a, 0x001a, 0x4bed, 0x001a, 0x001a, 0x5b9c, 0x001a, 0xae8b, 0x001a, 0x5c9c, 0x001a, 0x5d9c, 0x001a, 0x001a, 0x5f9c, 0x001a, 0x9693, 0x001a, 0x001a, 0x609c, 0x619c, 0x001a, 0x629c, 0x001a, 0x001a, 0x539c, 0x529c, 0x001a, 0x001a, 0x001a, 0x639c, 0x608c, 0x001a, 0x001a, 0x001a, 0x4695, 0x9ded, 0x001a, 0xca8d, 0x5695, 0xa492, 0x6a95, 0x649c, 0x001a, 0x001a, 0xb28f, 0x6589, 0x001a, 0x659c, 0x001a, 0x001a, 0x001a, 0x669c, 0x001a, 0xf096, 0x001a, 0x001a, 0xde94, 0x001a, 0x001a, 0x699c, 0x9d89, 0xaa90, 0x689c, 0x679c, 0x618c, 0xd291, 0x001a, 0x6d9c, 0x6b9c, 0x001a, 0x6a9c, 0xa597, 0xe38c, 0x001a, 0x001a, 0x001a, 0x998f, 0x6c9c, 0x6b93, 0x5d8f, 0x001a, 0x001a, 0x001a, 0xbe93, 0x709c, 0x6f9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e9c, 0x001a, 0x719c, 0xe48c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x729c, 0x9c95, 0x7a8f, 0x001a, 0x001a, 0x739c, 0xf794, 0x001a, 0x001a, 0x001a, 0x001a, 0xbf93, 0xa592, 0x001a, 0x001a, 0x9eed, 0x001a, 0x4f93, 0x001a, 0x001a, 0x749c, 0x4a8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5390, 0x001a, 0x4b95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf58a, 0x4594, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x759c, 0x758e, 0x5996, 0x5a96, 0x001a, 0x001a, 0x9e89, 0x7a9c, 0x9fed, 0x001a, 0x8992, 0x001a, 0x001a, 0x001a, 0x779c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf589, 0x001a, 0x001a, 0x001a, 0x001a, 0xab9c, 0x799c, 0x001a, 0x001a, 0x001a, 0x4f94, 0x001a, 0x001a, 0x789c, 0x001a, 0x001a, 0x769c, 0x001a, 0x9a8d, 0x001a, 0x7c9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x839c, 0x899c, 0x819c, 0x001a, 0x7b93, 0x001a, 0x001a, 0x869c, 0x7c95, 0x001a, 0x001a, 0x809c, 0x001a, 0x859c, 0xe597, 0x768e, 0x001a, 0x001a, 0xd391, 0x7d9c, 0x001a, 0x001a, 0x001a, 0x7d8b, 0x889c, 0xab90, 0x8589, 0x829c, 0xf689, 0x879c, 0x001a, 0x001a, 0x001a, 0xaf8b, 0x001a, 0x849c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c9c, 0x969c, 0x949c, 0x001a, 0x001a, 0x919c, 0x001a, 0x001a, 0x001a, 0x909c, 0xf697, 0x001a, 0x929c, 0x001a, 0x001a, 0xb08b, 0x001a, 0x508d, 0x001a, 0x001a, 0x9a8f, 0x001a, 0x001a, 0x001a, 0x999c, 0x8b9c, 0x001a, 0x001a, 0xa0ed, 0x001a, 0x8f9c, 0x7e9c, 0x001a, 0xf889, 0x939c, 0x959c, 0x7092, 0x001a, 0x001a, 0xa68d, 0xb689, 0x8d9c, 0x989c, 0x979c, 0xb18b, 0x001a, 0xa791, 0x868a, 0x001a, 0x001a, 0x001a, 0x001a, 0x628c, 0x001a, 0x8e9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a9c, 0x001a, 0x9d9c, 0x9f9c, 0xa1ed, 0x001a, 0x001a, 0x001a, 0xbb8e, 0xa2ed, 0xa59c, 0xee92, 0x9b9c, 0x001a, 0x001a, 0x001a, 0x001a, 0xa39c, 0x001a, 0xf789, 0x001a, 0xa19c, 0xa29c, 0x001a, 0x001a, 0x9e9c, 0xa09c, 0x001a, 0x001a, 0x001a, 0xe58c, 0x4997, 0x001a, 0x001a, 0xb38a, 0x001a, 0x001a, 0x7889, 0xa49c, 0x001a, 0x5994, 0xab88, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf94, 0x7b9c, 0xaa9c, 0xae9c, 0xe396, 0x001a, 0xa79c, 0x001a, 0x001a, 0x001a, 0x8993, 0xac9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xee8f, 0xad9c, 0xd593, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6698, 0x001a, 0xa99c, 0x001a, 0xa4ed, 0x001a, 0x001a, 0xaf9c, 0x001a, 0x9b8d, 0x001a, 0xc990, 0x001a, 0xa3ed, 0xd288, 0xa89c, 0xa69c, 0x001a, 0x7991, 0x001a, 0x001a, 0x001a, 0x9c9c, 0x538e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc491, 0xbb9c, 0xa6ed, 0x7a91, 0xb69c, 0x001a, 0xb39c, 0xb49c, 0x001a, 0xe48e, 0xb79c, 0xba9c, 0x001a, 0x001a, 0x001a, 0x001a, 0xb59c, 0x448f, 0x001a, 0xb89c, 0x001a, 0x001a, 0xb29c, 0x001a, 0xfa96, 0xf996, 0x001a, 0x001a, 0x001a, 0xbc9c, 0xbd9c, 0xd388, 0x001a, 0xa7ed, 0x001a, 0x001a, 0x001a, 0xb19c, 0x001a, 0x001a, 0x001a, 0x001a, 0xf08b, 0xa488, 0x001a, 0x001a, 0x001a, 0xb48a, 0xa5ed, 0xb99c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc19c, 0xc09c, 0x001a, 0x001a, 0x001a, 0xc59c, 0x001a, 0x001a, 0x001a, 0xa9ed, 0x001a, 0x001a, 0x001a, 0xc69c, 0x001a, 0x001a, 0xa8ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xc49c, 0xc79c, 0xbf9c, 0xc39c, 0x001a, 0x001a, 0xc89c, 0x001a, 0xc99c, 0x001a, 0x001a, 0xbe9c, 0x9c8e, 0x001a, 0xc29c, 0xd491, 0x518d, 0xb09c, 0x5490, 0x001a, 0x001a, 0x001a, 0x001a, 0xd69c, 0x001a, 0xe795, 0x001a, 0x001a, 0xcc9c, 0xcd9c, 0xce9c, 0x001a, 0x001a, 0xd59c, 0x001a, 0xd49c, 0x001a, 0x001a, 0x9d96, 0xb58a, 0x001a, 0xd29c, 0x001a, 0x648c, 0x538a, 0x001a, 0x001a, 0xcf9c, 0x001a, 0x001a, 0xb697, 0xd19c, 0xd488, 0xd39c, 0x001a, 0xca9c, 0xd09c, 0xd79c, 0x638c, 0xcb9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7c97, 0x001a, 0x001a, 0x001a, 0x4a97, 0x001a, 0x001a, 0x001a, 0x001a, 0xda9c, 0x001a, 0x001a, 0xde9c, 0x001a, 0x001a, 0x001a, 0x9e91, 0x001a, 0xf797, 0xdf9c, 0x001a, 0x001a, 0xdc9c, 0x001a, 0xd99c, 0x001a, 0xaaed, 0xd89c, 0xdd9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xae95, 0x001a, 0x001a, 0xb293, 0x001a, 0x658c, 0x001a, 0xe09c, 0xdb9c, 0x001a, 0xe19c, 0x001a, 0x001a, 0x001a, 0x9b8c, 0x001a, 0x001a, 0x001a, 0xaf89, 0x001a, 0x001a, 0x001a, 0xe99c, 0x001a, 0x001a, 0x001a, 0xb68a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe79c, 0x001a, 0x001a, 0xe89c, 0xa78d, 0xe69c, 0xe49c, 0xe39c, 0xea9c, 0xe29c, 0xec9c, 0x001a, 0x001a, 0xf989, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xee9c, 0x001a, 0x001a, 0xed9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa692, 0x001a, 0xf19c, 0x001a, 0xef9c, 0xe59c, 0x9c8c, 0x001a, 0xf09c, 0x001a, 0xf49c, 0xf39c, 0xf59c, 0xf29c, 0xf69c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf79c, 0xf89c, 0xe895, 0x001a, 0xfa9c, 0xf99c, 0x5e8f, 0x001a, 0xac90, 0xe489, 0xfa89, 0xabed, 0xfb9c, 0x001a, 0xbd88, 0x001a, 0x001a, 0x001a, 0xca90, 0xfc9c, 0x001a, 0xc1e6, 0x409d, 0x818c, 0x001a, 0x419d, 0x001a, 0x001a, 0x001a, 0x001a, 0xed90, 0x001a, 0x001a, 0x001a, 0x429d, 0x001a, 0x001a, 0x001a, 0x439d, 0x598b, 0x449d, 0x001a, 0x459d, 0x469d, 0xd591, 0x001a, 0x001a, 0x001a, 0xcb8c, 0x001a, 0x001a, 0xdf96, 0x001a, 0x001a, 0x001a, 0x5b96, 0x8a8f, 0x479d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xee90, 0xbbe7, 0xe094, 0x001a, 0xe88e, 0x001a, 0xcb8d, 0x489d, 0x001a, 0x001a, 0x001a, 0x001a, 0xc591, 0x001a, 0xa595, 0x001a, 0x001a, 0xef91, 0x001a, 0x001a, 0x4b9d, 0x001a, 0x001a, 0x499d, 0x001a, 0x4c9d, 0x001a, 0x001a, 0x4a9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x4d9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaf95, 0x001a, 0x001a, 0xb588, 0x001a, 0x001a, 0x001a, 0x001a, 0x7d95, 0x001a, 0x001a, 0xe194, 0x001a, 0x001a, 0x4e9d, 0x001a, 0x519d, 0xb38f, 0x5a8b, 0x001a, 0x4f9d, 0x569d, 0xb48f, 0x001a, 0x001a, 0x001a, 0x001a, 0x509d, 0x6394, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7d97, 0x529d, 0x539d, 0x579d, 0x8a93, 0x549d, 0x528d, 0xdc90, 0x001a, 0x001a, 0x659d, 0xb294, 0x001a, 0xf091, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaced, 0x001a, 0x001a, 0x001a, 0x001a, 0xe294, 0xab9d, 0x001a, 0x001a, 0x001a, 0x001a, 0xf895, 0x001a, 0x001a, 0x001a, 0xef92, 0x001a, 0x001a, 0x001a, 0x9596, 0x001a, 0x5a9d, 0x9f89, 0x8a92, 0x001a, 0x001a, 0x001a, 0x001a, 0x639d, 0x001a, 0x001a, 0x5392, 0x5d9d, 0x649d, 0x5f9d, 0x669d, 0x629d, 0x001a, 0x619d, 0x8f94, 0x001a, 0x5b9d, 0xfb89, 0x599d, 0x918b, 0xf191, 0x559d, 0x001a, 0x001a, 0x589d, 0x538d, 0xd990, 0x001a, 0xb58f, 0x609d, 0x7194, 0x001a, 0x001a, 0x928b, 0x678a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x878a, 0x4090, 0x689d, 0x6d9d, 0x001a, 0x699d, 0x001a, 0x9d8c, 0x001a, 0x6e9d, 0x418e, 0x898d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x458f, 0x5c9d, 0x001a, 0x9d8e, 0x6b9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x778e, 0x6c9d, 0xc288, 0x001a, 0x001a, 0x679d, 0x001a, 0x001a, 0x001a, 0x001a, 0xa792, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x938b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb28b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6a9d, 0xa588, 0x001a, 0x001a, 0xc18d, 0x001a, 0x001a, 0x001a, 0x5590, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf092, 0x001a, 0x001a, 0xd294, 0x709d, 0x7d91, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa891, 0x001a, 0x001a, 0x4a8e, 0x719d, 0x001a, 0x739d, 0x6f9d, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf95, 0x001a, 0xbb92, 0x001a, 0x001a, 0x001a, 0x001a, 0x7b91, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf995, 0xcc8e, 0x809d, 0x001a, 0x7e9d, 0x001a, 0x001a, 0x9890, 0x001a, 0x001a, 0x001a, 0x9e8c, 0x001a, 0x001a, 0x001a, 0x789d, 0xb78f, 0x001a, 0x001a, 0xe693, 0x5094, 0x001a, 0x001a, 0x001a, 0x001a, 0x769d, 0x001a, 0x001a, 0x7c91, 0x001a, 0x001a, 0x001a, 0x001a, 0xf68e, 0x7b9d, 0x001a, 0x001a, 0xb68f, 0x001a, 0x759d, 0x7a9d, 0x001a, 0x001a, 0x7294, 0x001a, 0x001a, 0x001a, 0x749d, 0x001a, 0x408c, 0x001a, 0x001a, 0x7c8a, 0x001a, 0x001a, 0x001a, 0x7c9d, 0xa997, 0xcc8d, 0x5492, 0x799d, 0x001a, 0xda90, 0x001a, 0x548d, 0x8490, 0x8689, 0x5b91, 0x779d, 0x648b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x668c, 0x001a, 0xcd92, 0x7d9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7e91, 0x001a, 0x001a, 0x819d, 0x001a, 0x839d, 0x001a, 0x001a, 0xb591, 0x899d, 0x001a, 0x849d, 0x001a, 0x001a, 0x869d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6095, 0xf192, 0x001a, 0x879d, 0x001a, 0x001a, 0x001a, 0x4b97, 0x001a, 0x001a, 0x001a, 0x6797, 0xb78a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xac88, 0x001a, 0x859d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x829d, 0x001a, 0x001a, 0x001a, 0x001a, 0xf68a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8789, 0xaded, 0x889d, 0x001a, 0x001a, 0x001a, 0x6897, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb991, 0x001a, 0x939d, 0x001a, 0x001a, 0x001a, 0x8d9d, 0x001a, 0x001a, 0x8a9d, 0x919d, 0x001a, 0x001a, 0x001a, 0x001a, 0x729d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8e9d, 0x001a, 0x929d, 0x001a, 0x001a, 0x001a, 0xc094, 0x8b93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8b9d, 0x001a, 0x8f9d, 0x001a, 0x001a, 0x001a, 0x678c, 0x001a, 0x001a, 0x001a, 0xef8d, 0x001a, 0x001a, 0x001a, 0xdb90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x979d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4593, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaeed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x949d, 0x001a, 0x8096, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x959d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x969d, 0x001a, 0xcc96, 0x001a, 0xa090, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x828c, 0x001a, 0x001a, 0x001a, 0x001a, 0x9d9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x548e, 0x9a9d, 0x001a, 0x999d, 0x001a, 0x001a, 0x001a, 0x001a, 0x5194, 0x001a, 0x001a, 0xafed, 0xb393, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5093, 0x9b9d, 0x001a, 0x001a, 0x001a, 0x9c9d, 0x001a, 0x8f95, 0x001a, 0x6494, 0x428e, 0x001a, 0xef90, 0x001a, 0x6f96, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x688a, 0x001a, 0xa39d, 0x9e9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x6997, 0xa59d, 0x001a, 0x001a, 0xa19d, 0x001a, 0xa29d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8091, 0xb0ed, 0x001a, 0x001a, 0x001a, 0xa09d, 0x001a, 0x5e9d, 0x001a, 0x001a, 0x001a, 0xa49d, 0x001a, 0x9f9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa99d, 0xaa9d, 0x4693, 0xac9d, 0x001a, 0x001a, 0x438e, 0xa79d, 0x001a, 0x001a, 0x001a, 0x001a, 0x5b8b, 0x001a, 0x001a, 0xad9d, 0x001a, 0xa69d, 0xb19d, 0x001a, 0xb09d, 0x001a, 0xaf9d, 0x001a, 0x001a, 0x001a, 0xb29d, 0x001a, 0x001a, 0xb49d, 0xef8f, 0x001a, 0xb39d, 0x001a, 0x001a, 0x001a, 0x001a, 0xb79d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb59d, 0x001a, 0x001a, 0x001a, 0xb69d, 0x909d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb99d, 0xb89d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x989d, 0xba9d, 0xae9d, 0x001a, 0x001a, 0x788e, 0x001a, 0x001a, 0x001a, 0x001a, 0xbb9d, 0xbc9d, 0xbe9d, 0xbd9d, 0xbf9d, 0xfc89, 0x001a, 0x558d, 0x001a, 0x001a, 0xfa95, 0xad90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcc8c, 0x001a, 0x001a, 0xc19d, 0x001a, 0x001a, 0x001a, 0x001a, 0xc49d, 0xb1ed, 0x7195, 0x001a, 0x7e8b, 0x001a, 0x001a, 0x001a, 0xc39d, 0xc29d, 0x7394, 0xc59d, 0xb38b, 0x001a, 0x001a, 0x001a, 0xc79d, 0xc69d, 0x001a, 0x001a, 0x001a, 0xb88a, 0x558e, 0x001a, 0x001a, 0xd693, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x688c, 0x001a, 0x001a, 0x001a, 0x9490, 0x001a, 0xc89d, 0x001a, 0xae90, 0x4793, 0x001a, 0x7e95, 0xc99d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xca9d, 0xcb9d, 0x001a, 0x001a, 0x001a, 0xb695, 0x7c9b, 0xc490, 0x001a, 0x001a, 0x6b95, 0x001a, 0xd68d, 0x001a, 0xe394, 0xc194, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6c93, 0x001a, 0xbf97, 0x001a, 0xcd9d, 0xce8e, 0x001a, 0x001a, 0xce9d, 0x001a, 0xb488, 0x001a, 0x001a, 0xd28b, 0xcb90, 0x001a, 0x8095, 0x001a, 0x001a, 0x001a, 0xcf9d, 0x618e, 0x6692, 0x001a, 0x7a8e, 0x5690, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd09d, 0x001a, 0xfb95, 0x001a, 0x001a, 0x9789, 0x7b8e, 0x001a, 0x001a, 0x001a, 0xd39d, 0x001a, 0xd19d, 0xd49d, 0xb797, 0xd29d, 0x001a, 0x001a, 0x001a, 0x001a, 0xf990, 0xd59d, 0x001a, 0x001a, 0xb091, 0x001a, 0x001a, 0xd69d, 0x001a, 0x001a, 0x001a, 0x001a, 0xf88a, 0x001a, 0xd89d, 0x001a, 0xd79d, 0x001a, 0x001a, 0x001a, 0x001a, 0xd99d, 0xda9d, 0xf98a, 0x001a, 0x001a, 0xfa93, 0x5592, 0x8c8b, 0x7c8e, 0x8191, 0x001a, 0x001a, 0x7b8f, 0xae88, 0x001a, 0x001a, 0x001a, 0xdb9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa089, 0xdf9d, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2ed, 0x001a, 0x568d, 0xde9d, 0x001a, 0x001a, 0xa98d, 0xb88f, 0x001a, 0xb5ed, 0xdd9d, 0x001a, 0xb98f, 0x001a, 0xbe96, 0xa88d, 0x001a, 0x001a, 0x001a, 0xd588, 0xcc90, 0xb3ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe49d, 0x001a, 0xb7ed, 0xaf90, 0x6689, 0x001a, 0x001a, 0x001a, 0xb8ed, 0x748f, 0x001a, 0x8696, 0xf08d, 0x001a, 0x001a, 0x001a, 0x001a, 0xba8f, 0xb6ed, 0xa590, 0x001a, 0x47ed, 0x001a, 0x001a, 0xe39d, 0xe19d, 0xe29d, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4ed, 0x8b92, 0x001a, 0x001a, 0x459e, 0x001a, 0xe89d, 0x9e8e, 0x578d, 0xe69d, 0x001a, 0x001a, 0x001a, 0x001a, 0xe79d, 0x001a, 0x5790, 0x001a, 0x001a, 0x001a, 0xe59d, 0x001a, 0x001a, 0x4e8e, 0x001a, 0x001a, 0x001a, 0x001a, 0xbaed, 0x001a, 0xbbed, 0x001a, 0x001a, 0x001a, 0xea9d, 0xe99d, 0xee9d, 0x001a, 0x001a, 0xef9d, 0x001a, 0xeb9d, 0xb9ed, 0x418a, 0xec9d, 0xed9d, 0xd394, 0x001a, 0x001a, 0x001a, 0x001a, 0x8195, 0x698c, 0xf09d, 0x001a, 0x001a, 0xbded, 0xb090, 0x001a, 0xbb8f, 0x001a, 0x001a, 0x001a, 0x7192, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc58b, 0x001a, 0xf19d, 0xf59d, 0x001a, 0x001a, 0xc989, 0xf29d, 0xf49d, 0x001a, 0x001a, 0x001a, 0x001a, 0xf39d, 0x001a, 0x001a, 0x8b8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x6792, 0xc388, 0xf69d, 0xbeed, 0x001a, 0x001a, 0x001a, 0xf79d, 0x001a, 0x001a, 0xbfed, 0x001a, 0xa892, 0x001a, 0x001a, 0x001a, 0xef97, 0x001a, 0x001a, 0x001a, 0x001a, 0x628e, 0x001a, 0x001a, 0xe995, 0x001a, 0x001a, 0x001a, 0xc0ed, 0x001a, 0x5c96, 0x001a, 0x001a, 0x001a, 0x419e, 0xf99d, 0x001a, 0x001a, 0xfc9d, 0x001a, 0xfb9d, 0xc1ed, 0x001a, 0xf89d, 0x001a, 0x001a, 0x409e, 0x001a, 0x001a, 0xdc93, 0x001a, 0xfa9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x429e, 0x001a, 0x001a, 0x8c8f, 0x439e, 0x001a, 0x6a97, 0x9894, 0x001a, 0x001a, 0x449e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x469e, 0x001a, 0x001a, 0x479e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x489e, 0x001a, 0xc88b, 0x6789, 0x588d, 0x499e, 0x001a, 0x4a9e, 0x918f, 0x8291, 0xc2ed, 0x4aed, 0xd699, 0x5d91, 0x5c91, 0xd691, 0xc58d, 0x001a, 0x001a, 0xf098, 0x001a, 0x001a, 0x001a, 0x001a, 0x8e8c, 0x4c97, 0x001a, 0xfc95, 0x001a, 0x9e95, 0xc3ed, 0x4b9e, 0x001a, 0x001a, 0x001a, 0x001a, 0xf18d, 0xbd92, 0x4c9e, 0x4e98, 0x001a, 0x001a, 0x001a, 0x5d96, 0x001a, 0xa992, 0x4d9e, 0xfa8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4e9e, 0x4f9e, 0xd896, 0x001a, 0xa296, 0x9696, 0x7b96, 0x448e, 0x519e, 0x001a, 0x001a, 0xe98e, 0x001a, 0x001a, 0x7096, 0x001a, 0x539e, 0x569e, 0x559e, 0x001a, 0xf78a, 0x001a, 0x001a, 0x808b, 0x001a, 0x529e, 0x001a, 0x549e, 0x001a, 0x001a, 0x001a, 0x001a, 0x579e, 0x001a, 0x001a, 0x9990, 0x001a, 0x001a, 0x001a, 0x001a, 0x9b97, 0xc788, 0xde8d, 0xba91, 0x001a, 0xdb8e, 0x001a, 0x001a, 0xf18f, 0x001a, 0x001a, 0x5a9e, 0x001a, 0x001a, 0x6d93, 0x001a, 0x589e, 0xa991, 0x599e, 0xf08f, 0xdb96, 0x5b9e, 0x5c9e, 0x8897, 0xc5ed, 0x001a, 0x001a, 0x001a, 0x619e, 0x001a, 0x001a, 0x598d, 0x001a, 0x7494, 0x5e9e, 0x8c93, 0xdc9d, 0xe09d, 0x001a, 0x6e8b, 0x001a, 0x6694, 0x001a, 0x001a, 0x001a, 0x001a, 0x609e, 0x001a, 0xbc8f, 0xc294, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x669e, 0x001a, 0xf894, 0x001a, 0x5d9e, 0x001a, 0x639e, 0x629e, 0x001a, 0x001a, 0x001a, 0xcd90, 0x001a, 0x001a, 0x001a, 0x001a, 0x8d96, 0x001a, 0xd197, 0x001a, 0x001a, 0x8796, 0x001a, 0xca89, 0x7d8e, 0x001a, 0x001a, 0x6798, 0x659e, 0x9590, 0x001a, 0x001a, 0x001a, 0x649e, 0x001a, 0x001a, 0x5f9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcd8c, 0x001a, 0x001a, 0x001a, 0x6b9e, 0x699e, 0x001a, 0xcb89, 0x679e, 0x6d9e, 0x739e, 0x001a, 0xc6ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ed, 0xc691, 0x001a, 0x001a, 0xbf95, 0x001a, 0x759e, 0x001a, 0x001a, 0x001a, 0x4195, 0x001a, 0x001a, 0x001a, 0x749e, 0x9094, 0x5e96, 0xb98a, 0x001a, 0xf590, 0x5f8f, 0x001a, 0x001a, 0x001a, 0xd192, 0x001a, 0x4d97, 0x001a, 0x001a, 0x709e, 0x6f9e, 0x001a, 0x001a, 0x001a, 0x719e, 0x001a, 0x6e9e, 0x001a, 0x001a, 0x769e, 0x001a, 0x6c9e, 0x001a, 0x001a, 0x6a9e, 0x001a, 0x729e, 0x689e, 0x001a, 0x8c92, 0x001a, 0xf696, 0xc48e, 0xf28d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb88d, 0x001a, 0x001a, 0x8f96, 0x608a, 0x001a, 0xc9ed, 0xcc92, 0xc893, 0x6889, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf090, 0x001a, 0x001a, 0xb290, 0x498c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x789e, 0x001a, 0x001a, 0x5a8d, 0x9c8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7a9e, 0x948a, 0x819e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7d9e, 0x001a, 0xf190, 0x001a, 0x001a, 0x001a, 0x6a8a, 0xaa8d, 0x001a, 0x001a, 0x698a, 0xcd8d, 0x001a, 0x001a, 0x7b9e, 0x858c, 0x6a8c, 0x8d93, 0xcaed, 0x001a, 0x799e, 0x001a, 0xc488, 0x001a, 0x001a, 0x001a, 0x001a, 0x7c9e, 0x7e9e, 0x001a, 0xcb8b, 0x4b8c, 0xc7ed, 0xba8a, 0x6a8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x829e, 0x001a, 0x001a, 0xf78d, 0x9196, 0x001a, 0x568e, 0x001a, 0x001a, 0x001a, 0x839e, 0x001a, 0x001a, 0x001a, 0x4f95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8f9e, 0x001a, 0xb189, 0x849e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x959e, 0x859e, 0x001a, 0xc097, 0x001a, 0x8c9e, 0x001a, 0x7e94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x949e, 0x001a, 0x879e, 0x001a, 0x001a, 0x001a, 0xb288, 0x899e, 0x001a, 0x001a, 0x5b8d, 0x001a, 0x001a, 0x001a, 0x8b9e, 0x001a, 0x8a9e, 0x001a, 0x869e, 0x919e, 0x001a, 0xbd8f, 0x001a, 0x001a, 0x001a, 0xeb9a, 0xe68c, 0x9c97, 0x001a, 0x001a, 0x001a, 0x001a, 0x889e, 0x001a, 0xf292, 0x428a, 0xab8d, 0x001a, 0x809e, 0x001a, 0x909e, 0x818a, 0x001a, 0x001a, 0x8e9e, 0x929e, 0x001a, 0x8e93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc8a, 0x001a, 0xb09e, 0x001a, 0x48ed, 0xc796, 0x979e, 0xfb8a, 0x001a, 0x9e9e, 0x001a, 0xcbed, 0x001a, 0x001a, 0x5f96, 0x001a, 0x9f9e, 0xa19e, 0x001a, 0xa59e, 0x999e, 0x001a, 0x4992, 0x001a, 0x001a, 0x001a, 0x001a, 0x8f93, 0xa99e, 0x9c9e, 0x001a, 0xa69e, 0x001a, 0x001a, 0x001a, 0xa09e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5890, 0xaa9e, 0x001a, 0x001a, 0xb190, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa89e, 0xbb8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6f98, 0x969e, 0x001a, 0x001a, 0xa49e, 0xd688, 0x001a, 0x001a, 0x989e, 0x001a, 0x001a, 0xb896, 0x9d9e, 0x4190, 0xc592, 0x939e, 0x001a, 0x001a, 0xa39e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a90, 0xad9e, 0x918a, 0x9f8c, 0x001a, 0x001a, 0x001a, 0x001a, 0xaf9e, 0x9a9e, 0xae9e, 0x001a, 0xa79e, 0x9b9e, 0x001a, 0xab9e, 0x001a, 0xac9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbd9e, 0x001a, 0x001a, 0x001a, 0xcc93, 0x001a, 0xa29e, 0x001a, 0x001a, 0xb99e, 0x001a, 0x001a, 0x001a, 0xbb9e, 0x001a, 0xd692, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6b97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9695, 0xb69e, 0xc891, 0x001a, 0x001a, 0x001a, 0xbc9e, 0x5e91, 0x001a, 0xb39e, 0xc09e, 0xbf9e, 0x001a, 0xed93, 0xbe9e, 0xe893, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcded, 0x001a, 0xc29e, 0xb59e, 0x001a, 0xc68b, 0xb89e, 0x7c8f, 0x001a, 0x001a, 0x001a, 0x8094, 0xba9e, 0xc98b, 0x001a, 0xb29e, 0xb49e, 0xb19e, 0x001a, 0x001a, 0x4f98, 0x798a, 0xb79e, 0x001a, 0x001a, 0xc19e, 0x548a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe58d, 0x001a, 0x001a, 0x001a, 0x7c89, 0x001a, 0x001a, 0xd29e, 0x001a, 0x001a, 0x5098, 0xd59e, 0x001a, 0x001a, 0xcfed, 0x001a, 0x001a, 0x5990, 0xd49e, 0x001a, 0x001a, 0x001a, 0xd39e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd09e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc49e, 0x001a, 0x001a, 0xe19e, 0xc39e, 0x001a, 0xd69e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xce9e, 0x001a, 0x001a, 0xc99e, 0xc69e, 0x001a, 0xc79e, 0x001a, 0xcf9e, 0x001a, 0x001a, 0x001a, 0xa0ea, 0x001a, 0x001a, 0xcc9e, 0x5c8d, 0xc692, 0x8491, 0xca9e, 0x001a, 0xc59e, 0x001a, 0x001a, 0xc89e, 0x001a, 0x001a, 0x001a, 0x001a, 0x6c97, 0x8a96, 0x001a, 0x001a, 0x001a, 0xcd9e, 0xd79e, 0x001a, 0x001a, 0x001a, 0xd0ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf9e, 0xd89e, 0x001a, 0x001a, 0xe59e, 0x001a, 0xe39e, 0x001a, 0x001a, 0x001a, 0x001a, 0xde9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdd9e, 0x001a, 0xce92, 0x001a, 0x8591, 0x001a, 0xdb9e, 0x001a, 0x001a, 0xd99e, 0x001a, 0x001a, 0xe09e, 0x001a, 0x001a, 0x001a, 0x001a, 0xe69e, 0xf394, 0xec9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe79e, 0xea9e, 0xe49e, 0x001a, 0x001a, 0x9492, 0x001a, 0x5795, 0x001a, 0xda9e, 0x001a, 0x001a, 0xe29e, 0xbe8f, 0x001a, 0xcd96, 0xf69e, 0xe99e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa08c, 0xa189, 0x7e8a, 0x001a, 0x001a, 0xd19e, 0x001a, 0xd1ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xbf8f, 0xee9e, 0x001a, 0xf59e, 0xf78e, 0x928a, 0x001a, 0x001a, 0x4d92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeb9e, 0x001a, 0xd3ed, 0xf09e, 0xf49e, 0x001a, 0x001a, 0xb48b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6b8b, 0xf29e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x408b, 0x001a, 0xc993, 0xf19e, 0x001a, 0x001a, 0x001a, 0xf39e, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xed9e, 0xd4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xef9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5ed, 0x808a, 0x6892, 0x001a, 0x001a, 0x001a, 0xfa9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf89e, 0xe78c, 0x001a, 0xf79e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x409f, 0x001a, 0x001a, 0x001a, 0x001a, 0x779e, 0x001a, 0x001a, 0x001a, 0xf99e, 0x001a, 0xfb9e, 0xfc9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4b9f, 0x001a, 0x479f, 0x001a, 0x8d9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x469f, 0x001a, 0x001a, 0x001a, 0x001a, 0x459f, 0x001a, 0x001a, 0x429f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe89e, 0x449f, 0x439f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x499f, 0x001a, 0x4598, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4c9f, 0xf98b, 0x001a, 0x001a, 0x489f, 0x4a9f, 0x001a, 0x001a, 0xd6ed, 0x001a, 0xd7ed, 0x001a, 0x001a, 0x001a, 0xa594, 0x001a, 0x4d9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x519f, 0x4e9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9397, 0x4f9f, 0x001a, 0x001a, 0x001a, 0x001a, 0xdc9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x529f, 0x001a, 0x001a, 0x001a, 0x539f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5489, 0x001a, 0x559f, 0x878c, 0x9f8e, 0x001a, 0xd38b, 0x001a, 0x001a, 0x001a, 0xa289, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7e97, 0x001a, 0x001a, 0x001a, 0x001a, 0x579f, 0x569f, 0x599f, 0x5c8b, 0x001a, 0x001a, 0xd48b, 0xbc8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5c9f, 0x001a, 0x001a, 0x001a, 0x5b9f, 0x001a, 0x5d9f, 0x001a, 0x001a, 0xcc89, 0x001a, 0x5692, 0x001a, 0x5e9f, 0x001a, 0x001a, 0xbd8a, 0x609f, 0x001a, 0x001a, 0x001a, 0x001a, 0x5f9f, 0x001a, 0x619f, 0x001a, 0x001a, 0x001a, 0x629f, 0x001a, 0x639f, 0x7e8e, 0xb390, 0x9f8d, 0x001a, 0x9095, 0x001a, 0x001a, 0xe095, 0x6398, 0x001a, 0x001a, 0x001a, 0x001a, 0x958e, 0x001a, 0x001a, 0x001a, 0xce8d, 0xf097, 0x001a, 0x001a, 0x001a, 0x649f, 0x659f, 0x001a, 0x808e, 0x001a, 0x001a, 0x001a, 0x669f, 0x679f, 0x001a, 0x001a, 0x699f, 0x689f, 0x001a, 0x7796, 0x001a, 0x001a, 0x7d8f, 0xea8e, 0x638e, 0x001a, 0x6a9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6c9f, 0x4290, 0x001a, 0x6b9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6f9f, 0x709f, 0x001a, 0x001a, 0x001a, 0x719f, 0x001a, 0x739f, 0x729f, 0x749f, 0xa389, 0x6992, 0x001a, 0x759f, 0x001a, 0x001a, 0x458e, 0x6b8a, 0x769f, 0x001a, 0x001a, 0x6193, 0xca9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x428b, 0x779f, 0x001a, 0x001a, 0x001a, 0x001a, 0x789f, 0x001a, 0xea95, 0x8896, 0x001a, 0x001a, 0x001a, 0xc593, 0x799f, 0xe494, 0x001a, 0xd8ed, 0x001a, 0xf994, 0x001a, 0x001a, 0xd196, 0x001a, 0x001a, 0x001a, 0x7a9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7c9f, 0x7b9f, 0x001a, 0x001a, 0x7e9f, 0x001a, 0x001a, 0x001a, 0x7d9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x819f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x818e, 0x001a, 0xaf96, 0x001a, 0x829f, 0x839f, 0x001a, 0x001a, 0x438b, 0x001a, 0x001a, 0x001a, 0x849f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x869f, 0x859f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8590, 0x001a, 0x001a, 0x5895, 0x6989, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc394, 0xd9ed, 0xf392, 0x608f, 0x818b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc494, 0x001a, 0xac8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x889f, 0x001a, 0xbe8a, 0x001a, 0x001a, 0x9889, 0x001a, 0xdaed, 0xf093, 0x879f, 0x5d8d, 0x7292, 0x001a, 0x899f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x919f, 0x001a, 0x8a9f, 0x001a, 0x001a, 0x001a, 0x001a, 0xdced, 0xbf91, 0x001a, 0x828b, 0x929f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x888c, 0x001a, 0x001a, 0x448b, 0x909f, 0x001a, 0x001a, 0x8e9f, 0x8b9f, 0x8097, 0x001a, 0x001a, 0xdbed, 0x001a, 0xbe92, 0x001a, 0x001a, 0x001a, 0xd793, 0x8c9f, 0x001a, 0x001a, 0x949f, 0x001a, 0x939f, 0x428c, 0x001a, 0x001a, 0xab89, 0x001a, 0x001a, 0xb98d, 0x8d9f, 0x8f9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7696, 0xf291, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9796, 0x001a, 0x001a, 0x9c9f, 0x001a, 0x001a, 0x9d9f, 0x001a, 0xcd89, 0x001a, 0x001a, 0x001a, 0x001a, 0xa695, 0xfb96, 0x9f9f, 0xa18e, 0xc08f, 0x989f, 0x9e9f, 0x8889, 0x001a, 0xb58b, 0x001a, 0x001a, 0x959f, 0x9a9f, 0x001a, 0x001a, 0x001a, 0xf290, 0x9194, 0x001a, 0xe594, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x979f, 0x001a, 0x4096, 0x001a, 0x999f, 0x001a, 0xa29f, 0xdded, 0xa09f, 0x001a, 0x9b9f, 0x001a, 0x001a, 0x001a, 0x4196, 0x6794, 0x838b, 0x001a, 0x4493, 0x001a, 0x001a, 0x8d92, 0x001a, 0xa39f, 0x001a, 0x001a, 0x001a, 0x001a, 0xa19f, 0xd791, 0x969f, 0x001a, 0x6a89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdeed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d97, 0xae9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xad9f, 0x001a, 0x001a, 0x001a, 0x001a, 0xf490, 0x001a, 0xaa9f, 0x001a, 0x8c97, 0x001a, 0x001a, 0xb493, 0xa49f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc392, 0x001a, 0x001a, 0x001a, 0x6b89, 0x5e8d, 0xa79f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x468f, 0xac9f, 0x001a, 0xab9f, 0xa69f, 0x001a, 0xa99f, 0x001a, 0x001a, 0x888a, 0x001a, 0xa89f, 0x6894, 0x001a, 0x001a, 0xac97, 0x001a, 0x001a, 0xf28f, 0xf390, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb49f, 0xb29f, 0x001a, 0x6c95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaf9f, 0xb19f, 0x001a, 0x5989, 0x001a, 0x001a, 0x5f8d, 0x5198, 0x001a, 0x5c8a, 0x001a, 0x8295, 0xe0ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x8197, 0x001a, 0x001a, 0x438a, 0x5a90, 0xb39f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb89f, 0x001a, 0xdfed, 0xc18f, 0x001a, 0x001a, 0x001a, 0x4f97, 0x001a, 0xb59f, 0x001a, 0x001a, 0x001a, 0x001a, 0xb09f, 0x001a, 0xb69f, 0xe1ed, 0x001a, 0x001a, 0xdc97, 0x001a, 0x9393, 0xc093, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2ed, 0x001a, 0x001a, 0x558a, 0x001a, 0x001a, 0x7489, 0x001a, 0x001a, 0xbc9f, 0x001a, 0x001a, 0xbf9f, 0x001a, 0x001a, 0x001a, 0xc197, 0x001a, 0x001a, 0x001a, 0x8497, 0x001a, 0x001a, 0x001a, 0x001a, 0xc69f, 0xc09f, 0xbd9f, 0x001a, 0x001a, 0x001a, 0xd297, 0xc39f, 0x001a, 0x001a, 0xe3ed, 0x001a, 0x698f, 0xc59f, 0x001a, 0x001a, 0xca9f, 0x001a, 0x001a, 0x9193, 0xc89f, 0x001a, 0x001a, 0x001a, 0x001a, 0xc29f, 0x001a, 0x001a, 0x5792, 0x001a, 0x001a, 0xc99f, 0x001a, 0xbe9f, 0x001a, 0xc49f, 0x001a, 0xcb9f, 0xfa88, 0xc19f, 0x001a, 0xcc9f, 0x001a, 0x001a, 0x5b90, 0xe5ed, 0x7e8f, 0x001a, 0xa395, 0x001a, 0xac8d, 0xe4ed, 0xb99f, 0xc79f, 0x5993, 0xe6ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb490, 0x001a, 0x898a, 0xcf8d, 0xc28f, 0xbb9f, 0x618f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6b8c, 0x001a, 0xba9f, 0x001a, 0x001a, 0x001a, 0xd09f, 0x8d8f, 0xb88c, 0x001a, 0xdf9f, 0x001a, 0xd99f, 0x948b, 0x6e93, 0x001a, 0xd49f, 0xdd9f, 0xad88, 0x5189, 0xe9ed, 0x001a, 0xb789, 0x001a, 0xd69f, 0xaa91, 0xcd9f, 0xcf9f, 0x608d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe09f, 0xe7ed, 0xdb9f, 0x001a, 0xeaed, 0x001a, 0xd39f, 0x001a, 0x001a, 0x001a, 0x001a, 0xda9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa996, 0x001a, 0x001a, 0xd89f, 0xdc9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xce8c, 0x001a, 0xc38f, 0x001a, 0x001a, 0x5892, 0xe8ed, 0x001a, 0x001a, 0xd29f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4e97, 0x001a, 0x001a, 0x001a, 0xd59f, 0x001a, 0x001a, 0xce9f, 0x9293, 0x001a, 0x001a, 0xd19f, 0x001a, 0x001a, 0x001a, 0xd79f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7098, 0xbc8e, 0x9e96, 0x001a, 0xe19f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xac94, 0x001a, 0x001a, 0xed9f, 0xb98c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x808f, 0x001a, 0xe39f, 0x001a, 0x001a, 0x001a, 0xad97, 0x618d, 0x001a, 0xf09f, 0x001a, 0x001a, 0xec88, 0x001a, 0x001a, 0xee9f, 0x001a, 0x001a, 0x001a, 0x001a, 0xe29f, 0x001a, 0x001a, 0x001a, 0x001a, 0xe89f, 0x001a, 0x001a, 0xea9f, 0x001a, 0x001a, 0x001a, 0x6e97, 0xe59f, 0x001a, 0x001a, 0x4d93, 0x001a, 0x001a, 0xe79f, 0x001a, 0xebed, 0x001a, 0x001a, 0xef9f, 0x001a, 0xe99f, 0xc596, 0x001a, 0x001a, 0x001a, 0xe49f, 0x001a, 0xa08e, 0xfc9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a8a, 0x001a, 0xe69f, 0xeb9f, 0xec9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xea91, 0xd891, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf49f, 0x001a, 0x001a, 0xfa9f, 0x001a, 0x001a, 0xf89f, 0x001a, 0x4893, 0x001a, 0x001a, 0x42e0, 0xf59f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf69f, 0xde9f, 0x001a, 0x998b, 0x5995, 0x001a, 0x001a, 0x001a, 0xbd8e, 0x001a, 0x001a, 0x978d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5298, 0x001a, 0xf29f, 0x001a, 0x41e0, 0x8989, 0x8691, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9994, 0x001a, 0xbf8a, 0xf897, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9f96, 0xd092, 0x001a, 0x001a, 0x001a, 0x001a, 0xf99f, 0xfb9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5191, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x40e0, 0xf79f, 0x001a, 0xf19f, 0x001a, 0x001a, 0x001a, 0xc18a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x898c, 0x001a, 0x001a, 0x001a, 0x4ee0, 0x001a, 0x001a, 0x49e0, 0xf690, 0x001a, 0x001a, 0x838a, 0x001a, 0x001a, 0x001a, 0x001a, 0x818f, 0x001a, 0x52e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4be0, 0xaa92, 0x48e0, 0xd792, 0x001a, 0x001a, 0x001a, 0x6be0, 0x001a, 0x001a, 0x001a, 0x45e0, 0x001a, 0x44e0, 0x001a, 0x4de0, 0x001a, 0x001a, 0x001a, 0x47e0, 0x46e0, 0x4ce0, 0x001a, 0x9f90, 0x001a, 0x43e0, 0x001a, 0xeced, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4fe0, 0x001a, 0x001a, 0x50e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc08a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x55e0, 0x001a, 0x54e0, 0x56e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x59e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6293, 0x001a, 0x53e0, 0x001a, 0xeded, 0x001a, 0x001a, 0x001a, 0x57e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x838c, 0xf791, 0x51e0, 0x5a94, 0x001a, 0x001a, 0x58e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5de0, 0x5be0, 0x001a, 0x001a, 0x5ee0, 0x001a, 0x001a, 0x61e0, 0x001a, 0x001a, 0x001a, 0x5ae0, 0x8a8d, 0x4794, 0x001a, 0x001a, 0xb79f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9497, 0x5ce0, 0x001a, 0x60e0, 0xf391, 0x001a, 0x5fe0, 0x001a, 0x4ae0, 0x001a, 0xeeed, 0x89e8, 0x001a, 0x001a, 0x001a, 0x64e0, 0x001a, 0x001a, 0x001a, 0x68e0, 0x001a, 0x001a, 0x66e0, 0x001a, 0x001a, 0x001a, 0xefed, 0x001a, 0xf0ed, 0x001a, 0x62e0, 0x001a, 0x63e0, 0x001a, 0x001a, 0x001a, 0x67e0, 0x001a, 0x65e0, 0x001a, 0x001a, 0x001a, 0x6d95, 0x001a, 0x001a, 0x6de0, 0x001a, 0x6ae0, 0x69e0, 0x001a, 0x6ce0, 0xd293, 0x6ee0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9592, 0xeb91, 0xf1ed, 0x001a, 0x001a, 0x001a, 0xa390, 0x001a, 0x001a, 0x001a, 0x6fe0, 0x001a, 0x71e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x70e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf39f, 0x001a, 0x001a, 0x001a, 0x001a, 0x72e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe593, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xce89, 0x001a, 0x001a, 0x001a, 0x9493, 0x448a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x848b, 0x001a, 0x001a, 0x001a, 0xdc8e, 0xd08d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2ed, 0x001a, 0x001a, 0x001a, 0x4698, 0x8690, 0x001a, 0x001a, 0x001a, 0x8a89, 0x001a, 0x001a, 0x001a, 0x75e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3ed, 0x78e0, 0x5992, 0x7be0, 0x76e0, 0x001a, 0x001a, 0x001a, 0x7ae0, 0x001a, 0x001a, 0x001a, 0x001a, 0x79e0, 0x5f93, 0xd788, 0x46ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf397, 0x001a, 0x001a, 0x7de0, 0x001a, 0x001a, 0x001a, 0x4789, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x80e0, 0x001a, 0x001a, 0x001a, 0x7ee0, 0x001a, 0x7ce0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x77e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4296, 0x001a, 0x001a, 0x001a, 0x82e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x81e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x8b89, 0x001a, 0x001a, 0x001a, 0x001a, 0x84e0, 0xb095, 0x001a, 0x83e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xb396, 0x001a, 0x001a, 0x001a, 0x001a, 0xc58f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5291, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc48f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7ed, 0xf8ed, 0x001a, 0xf997, 0x001a, 0x001a, 0x8ae0, 0x001a, 0xf790, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x86e0, 0x8be0, 0x001a, 0x001a, 0x8c89, 0x001a, 0x001a, 0xf6ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x89e0, 0x001a, 0x8194, 0x85e0, 0x88e0, 0xc68f, 0x001a, 0xcf94, 0x001a, 0x001a, 0x8ce0, 0x001a, 0xcf8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf890, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8fe0, 0x001a, 0x001a, 0x001a, 0x87e0, 0x001a, 0x468c, 0x001a, 0x001a, 0x001a, 0x001a, 0x8de0, 0x001a, 0x001a, 0x001a, 0x001a, 0x6f97, 0x90e0, 0x001a, 0x001a, 0x001a, 0xa4ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x91e0, 0x001a, 0x001a, 0x001a, 0x92e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x4d94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x94e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x95e0, 0x001a, 0x001a, 0xfaed, 0x001a, 0x5294, 0x001a, 0x001a, 0x001a, 0x001a, 0x9593, 0x97e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x99e0, 0x001a, 0xd397, 0x001a, 0x96e0, 0x001a, 0x98e0, 0x8d89, 0x001a, 0x93e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7a9a, 0x9ae0, 0x001a, 0x001a, 0x001a, 0x001a, 0x8791, 0x578e, 0x9ce0, 0x001a, 0x001a, 0x001a, 0x001a, 0x9be0, 0x4390, 0xd799, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9de0, 0x001a, 0x001a, 0x001a, 0x9fe0, 0x001a, 0x8ee0, 0x9ee0, 0x001a, 0xfbed, 0xa0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1e0, 0x001a, 0x001a, 0xa2e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e0, 0x001a, 0xdc92, 0x001a, 0xa6e0, 0xa5e0, 0x001a, 0x001a, 0xa7e0, 0x001a, 0xa8e0, 0x001a, 0x001a, 0xdd8e, 0x8395, 0x001a, 0x001a, 0x001a, 0xea96, 0xa9e0, 0xaae0, 0x7591, 0xa28e, 0xabe0, 0xace0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xade0, 0xd095, 0xc594, 0x001a, 0x001a, 0xaee0, 0x7694, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xab92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafe0, 0xe589, 0x001a, 0x8d8b, 0x001a, 0xc496, 0x001a, 0xb496, 0x001a, 0xb289, 0x5398, 0x001a, 0x001a, 0x001a, 0x001a, 0x7196, 0x001a, 0xa895, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb590, 0x001a, 0xb0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc193, 0x001a, 0x001a, 0x001a, 0xa18c, 0xb1e0, 0x001a, 0xd28d, 0xb3e0, 0xb2e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5e0, 0x001a, 0x001a, 0x001a, 0xb6e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5d8b, 0x001a, 0xb7e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa28c, 0x001a, 0x001a, 0xc694, 0x001a, 0xfced, 0xbae0, 0x001a, 0x001a, 0x001a, 0xf38f, 0x001a, 0x001a, 0xb9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x40ee, 0x001a, 0x001a, 0x001a, 0xb68b, 0xbbe0, 0xbde0, 0x001a, 0xbce0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee0, 0x001a, 0xcf8c, 0x001a, 0xbfe0, 0x001a, 0x001a, 0x001a, 0x001a, 0xe78b, 0x001a, 0x5f91, 0x001a, 0x9d8d, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e0, 0xc2e0, 0xc0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeb8e, 0x001a, 0x001a, 0xc693, 0xb78b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4e0, 0x4b92, 0xc3e0, 0x001a, 0x001a, 0x5498, 0x8294, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9e0, 0xc6e0, 0x001a, 0x001a, 0x001a, 0xd296, 0xc8e0, 0xcae0, 0x001a, 0xc297, 0x001a, 0x001a, 0x001a, 0x001a, 0x41ee, 0xcee0, 0x001a, 0x001a, 0x001a, 0xcde0, 0x9692, 0x4c94, 0x001a, 0x001a, 0xa38c, 0xcce0, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe0, 0x001a, 0x5097, 0x5197, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe0, 0x8e89, 0x001a, 0x001a, 0x001a, 0x001a, 0x968d, 0x828e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0e0, 0xd1e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x628f, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e0, 0x001a, 0xd4e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e0, 0x001a, 0x6c8a, 0x001a, 0x001a, 0xd8e0, 0x001a, 0x43ee, 0xd7e0, 0x001a, 0xdae0, 0xd9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xba8c, 0x001a, 0x001a, 0xa697, 0x001a, 0xca8b, 0x001a, 0xa489, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe88b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe697, 0xdce0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee0, 0x001a, 0x44ee, 0x001a, 0x001a, 0xdfe0, 0x001a, 0xcf89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbe0, 0x45ee, 0x588e, 0x001a, 0x001a, 0xbf92, 0xdde0, 0x001a, 0x001a, 0x001a, 0x48ee, 0x001a, 0x001a, 0x001a, 0x46ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2e0, 0x001a, 0xec8e, 0x001a, 0x001a, 0x47ee, 0x001a, 0xe0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x5d8c, 0x001a, 0x001a, 0xc794, 0xe1e0, 0x001a, 0x001a, 0xfce0, 0x001a, 0x001a, 0x001a, 0x4aee, 0x001a, 0x001a, 0xe7e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbb8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x858b, 0x001a, 0xe4e0, 0x9d97, 0x49ee, 0x001a, 0xae97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf491, 0x001a, 0x001a, 0xe6e0, 0x4bee, 0x001a, 0x001a, 0x4dee, 0x4cee, 0x001a, 0x001a, 0x001a, 0x4eee, 0x001a, 0x001a, 0x001a, 0xe8e0, 0xd497, 0xd58b, 0xfa94, 0x6994, 0x001a, 0x001a, 0x001a, 0xe9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe0, 0x001a, 0xeee0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeae0, 0x001a, 0x001a, 0x001a, 0xede0, 0xe88c, 0x6c89, 0xefe0, 0x001a, 0x9090, 0xece0, 0xda97, 0x001a, 0x4fee, 0xf2e0, 0xa2ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0e0, 0xf3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e0, 0xf1e0, 0x001a, 0x001a, 0xba8d, 0x001a, 0x001a, 0xf4e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x9e97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50ee, 0x001a, 0xf6e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e0, 0x51ee, 0x001a, 0x001a, 0xe3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc28a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa38e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xfae0, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5a89, 0x001a, 0x001a, 0x001a, 0x40e1, 0x001a, 0x5a95, 0x41e1, 0x001a, 0x001a, 0xa28a, 0x42e1, 0x001a, 0x43e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x44e1, 0x001a, 0x46e1, 0x47e1, 0x45e1, 0x001a, 0x001a, 0x001a, 0x7295, 0x49e1, 0x48e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x52ee, 0x001a, 0x4be1, 0x4ae1, 0x4ce1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4de1, 0x4fe1, 0x4ee1, 0x001a, 0x001a, 0x998d, 0x001a, 0x51e1, 0x001a, 0x50e1, 0x001a, 0x001a, 0xc38a, 0x001a, 0x7290, 0x001a, 0x5b93, 0x001a, 0x52e1, 0xb690, 0x001a, 0x001a, 0x001a, 0x598e, 0x001a, 0x9989, 0x53e1, 0x001a, 0x7097, 0x001a, 0x001a, 0xe195, 0x54e1, 0x001a, 0x001a, 0x8ced, 0x6393, 0x5297, 0x628d, 0x5c90, 0x001a, 0x001a, 0x001a, 0x6a92, 0xb299, 0x001a, 0xac92, 0xe689, 0x55e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56e1, 0x001a, 0x5be1, 0x001a, 0x001a, 0x59e1, 0x58e1, 0xc09d, 0x458a, 0x57e1, 0x001a, 0xd888, 0x001a, 0xa894, 0x001a, 0x001a, 0xc894, 0x001a, 0x001a, 0x001a, 0x001a, 0xaf97, 0x5ce1, 0x5ae1, 0x7b92, 0xa490, 0x001a, 0x001a, 0xa994, 0x001a, 0x4c95, 0x001a, 0x5ee1, 0xaa97, 0x6c8c, 0x5fe1, 0x001a, 0x5de1, 0xd494, 0x60e1, 0x001a, 0x61e1, 0x001a, 0x53ee, 0xd988, 0x001a, 0x001a, 0xf48f, 0x66e1, 0x001a, 0x63e1, 0xeb93, 0x62e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x458b, 0x001a, 0x001a, 0x69e1, 0x001a, 0x001a, 0x001a, 0x64e1, 0x65e1, 0x001a, 0x68e1, 0x67e1, 0x4495, 0x001a, 0x001a, 0x6191, 0x6091, 0x001a, 0x5e8b, 0x001a, 0x001a, 0x6ae1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6be1, 0x001a, 0x001a, 0x6ce1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ee1, 0x001a, 0x6de1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7589, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x76e1, 0xe694, 0x70e1, 0x001a, 0x72e1, 0x001a, 0x001a, 0x74e1, 0x5d90, 0x001a, 0x001a, 0x75e1, 0x73e1, 0xbe8e, 0x001a, 0x001a, 0x001a, 0x6fe1, 0x71e1, 0x001a, 0x6195, 0x001a, 0xc78f, 0x001a, 0x001a, 0x78e1, 0x001a, 0x001a, 0x77e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x79e1, 0x001a, 0xa48e, 0xad8d, 0x001a, 0x001a, 0x9793, 0x7ae1, 0x001a, 0xc992, 0x001a, 0x001a, 0x7ce1, 0x001a, 0x001a, 0x001a, 0x9f97, 0x7be1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8991, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x82e1, 0x001a, 0x84e1, 0x85e1, 0x7392, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x83e1, 0x001a, 0x80e1, 0x001a, 0x7de1, 0x7ee1, 0x001a, 0x81e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x88e1, 0x001a, 0x86e1, 0x001a, 0x87e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x89e1, 0x8be1, 0x8ce1, 0x8de1, 0x001a, 0x8ee1, 0x001a, 0x001a, 0x8ae1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x90e1, 0x001a, 0x001a, 0x001a, 0x8fe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x91e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc397, 0x001a, 0x001a, 0x001a, 0x94e1, 0x92e1, 0x93e1, 0x001a, 0x001a, 0x001a, 0xe08a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc96, 0x001a, 0x001a, 0x001a, 0xc895, 0x001a, 0x96e1, 0x001a, 0x001a, 0x001a, 0x95e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x97e1, 0x98e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x9ce1, 0x99e1, 0x9ae1, 0x9be1, 0x001a, 0x9de1, 0x001a, 0x001a, 0x001a, 0x9ee1, 0x001a, 0x9fe1, 0x001a, 0x001a, 0x001a, 0xa0e1, 0x001a, 0xa1e1, 0x001a, 0xad94, 0x6f93, 0xa2e1, 0x9294, 0x5395, 0x001a, 0xa3e1, 0x001a, 0x54ee, 0xa4e1, 0x4993, 0x001a, 0x468a, 0x638d, 0xa5e1, 0x001a, 0x001a, 0xa6e1, 0x001a, 0x001a, 0xa7e1, 0x001a, 0x488e, 0x001a, 0x001a, 0xa9e1, 0x001a, 0x001a, 0xa8e1, 0x001a, 0x001a, 0xaae1, 0xabe1, 0x57ee, 0x55ee, 0x001a, 0x56ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x58ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe794, 0x001a, 0xace1, 0x001a, 0x001a, 0x001a, 0xade1, 0x001a, 0x001a, 0x89ea, 0xaee1, 0xafe1, 0xb0e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x4d8e, 0x001a, 0x001a, 0xb1e1, 0x7594, 0x001a, 0x001a, 0x7e96, 0x001a, 0x6d89, 0x001a, 0x7689, 0x001a, 0x001a, 0xb2e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e1, 0x001a, 0x001a, 0x001a, 0xb3e1, 0x9093, 0x001a, 0x001a, 0x001a, 0xb790, 0x589f, 0x001a, 0xb5e1, 0xbf96, 0x001a, 0xb6e1, 0x001a, 0xc48a, 0xd594, 0xb7e1, 0x001a, 0xb8e1, 0x001a, 0x001a, 0xb9e1, 0x001a, 0x001a, 0x001a, 0xda96, 0x001a, 0x001a, 0x001a, 0xd396, 0x001a, 0xbc92, 0x001a, 0x001a, 0x001a, 0x8a91, 0x001a, 0x001a, 0xbbe1, 0x001a, 0x001a, 0x828f, 0x001a, 0x001a, 0xc88f, 0x001a, 0x001a, 0xbee1, 0x001a, 0x001a, 0xbde1, 0xbce1, 0xfb94, 0x001a, 0xc58a, 0xa78c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4e1, 0x001a, 0x001a, 0xc1e1, 0x5e90, 0xb096, 0x001a, 0x001a, 0x001a, 0xc0e1, 0xc2e1, 0xc3e1, 0x001a, 0x001a, 0xbfe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5e1, 0xc6e1, 0x001a, 0xad92, 0x001a, 0xe18a, 0x001a, 0x001a, 0x001a, 0x8592, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5aee, 0xc7e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8e1, 0xcbe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8790, 0x001a, 0xc293, 0x001a, 0xcce1, 0x7296, 0x001a, 0xc9e1, 0x001a, 0x001a, 0xcae1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe1, 0x001a, 0x001a, 0x001a, 0x001a, 0xcee1, 0xcde1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e1, 0x001a, 0x001a, 0xd0e1, 0x001a, 0x001a, 0xd2e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e1, 0x001a, 0xd3e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xcb95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x758f, 0xc497, 0x001a, 0x001a, 0xd5e1, 0x001a, 0x001a, 0xb593, 0x001a, 0x001a, 0xd6e1, 0x001a, 0x001a, 0xd7e1, 0x001a, 0xdbe1, 0xd9e1, 0xdae1, 0x001a, 0xd8e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdce1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee1, 0x001a, 0x001a, 0xdfe1, 0xb596, 0xe0e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xee96, 0xe1e1, 0x001a, 0x6d92, 0x001a, 0x8a94, 0x001a, 0xe98b, 0x001a, 0x001a, 0x001a, 0x5a92, 0xe2e1, 0xb88b, 0x001a, 0x001a, 0x001a, 0xce90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbb8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e1, 0x001a, 0xa48c, 0xd38d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7e1, 0x5cee, 0x001a, 0x001a, 0x001a, 0x7593, 0xd48d, 0x6d8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4396, 0x001a, 0x6a94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7693, 0x001a, 0x001a, 0x001a, 0x001a, 0x7b8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5dee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc98f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5eee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb097, 0x648d, 0x001a, 0x001a, 0xa58c, 0x001a, 0x001a, 0xa194, 0x001a, 0xebe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5fee, 0x001a, 0xede1, 0x001a, 0x001a, 0x001a, 0x001a, 0xe98c, 0x001a, 0x001a, 0x001a, 0x001a, 0xece1, 0xf492, 0x001a, 0x001a, 0x001a, 0x001a, 0xefe1, 0x568a, 0xeae1, 0x001a, 0x001a, 0xe894, 0x001a, 0x4f89, 0x001a, 0xea8d, 0x001a, 0x7198, 0x001a, 0x001a, 0xeee1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0e1, 0x001a, 0x001a, 0x001a, 0xc995, 0x001a, 0xd790, 0xf2e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d8a, 0x001a, 0xf9e1, 0x001a, 0xf8e1, 0x001a, 0x001a, 0xa58e, 0x001a, 0x001a, 0x001a, 0xfae1, 0xf5e1, 0x001a, 0x001a, 0x001a, 0xfbe1, 0xf6e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xd694, 0xf4e1, 0x001a, 0x001a, 0xf7e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x40e2, 0x8196, 0x001a, 0x001a, 0x001a, 0xfce1, 0x001a, 0x001a, 0xe988, 0x001a, 0x001a, 0x001a, 0x001a, 0x43e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x42e2, 0x001a, 0x001a, 0x001a, 0xca8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x44e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6291, 0x001a, 0x001a, 0x46e2, 0x45e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x47e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6e1, 0x001a, 0x001a, 0x001a, 0xe8e1, 0x49e2, 0x48e2, 0x001a, 0x001a, 0x001a, 0x60ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa68e, 0x001a, 0xe797, 0x001a, 0xd08e, 0x001a, 0x4ae2, 0x568c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5f8b, 0x468b, 0x838e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5397, 0x001a, 0x001a, 0x50e2, 0x001a, 0x4fe2, 0x6391, 0x4ce2, 0x001a, 0x001a, 0x4ee2, 0x001a, 0x001a, 0x6a8f, 0x5f90, 0x4de2, 0x4be2, 0x001a, 0x4994, 0x001a, 0x001a, 0xcb8f, 0x001a, 0x001a, 0x5b95, 0x001a, 0x001a, 0x001a, 0x001a, 0xd58d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9893, 0x001a, 0x001a, 0x51e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x52e2, 0x68e2, 0xd68b, 0x001a, 0x001a, 0x5c98, 0x5491, 0x001a, 0x001a, 0x001a, 0x001a, 0x53e2, 0x001a, 0x001a, 0xd089, 0xf592, 0x9f95, 0x001a, 0x001a, 0x001a, 0x001a, 0x64ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x66ee, 0x001a, 0x54e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a8b, 0x55e2, 0x001a, 0x001a, 0x57e2, 0x001a, 0x001a, 0x001a, 0x58e2, 0x001a, 0x4894, 0x001a, 0x001a, 0x59e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ae2, 0x5be2, 0x001a, 0x001a, 0xd78b, 0xd189, 0xc393, 0x478f, 0x848e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ce2, 0x001a, 0x488f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc889, 0x6295, 0x001a, 0x001a, 0x5de2, 0x001a, 0x001a, 0xe994, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6491, 0x001a, 0x60e2, 0x001a, 0x61e2, 0x8994, 0x001a, 0x6090, 0x5ee2, 0x001a, 0x8192, 0x001a, 0x001a, 0x5fe2, 0x001a, 0x001a, 0x001a, 0xcc8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xda88, 0x001a, 0x001a, 0x001a, 0x001a, 0x488b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62e2, 0x001a, 0x001a, 0xf692, 0x001a, 0x63e2, 0xc590, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xab96, 0x001a, 0x001a, 0x4295, 0x64e2, 0x65e2, 0x7492, 0x001a, 0xc597, 0x001a, 0x001a, 0x67e2, 0x66e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xed8e, 0x001a, 0x001a, 0x69e2, 0xee88, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ce2, 0x001a, 0x001a, 0x001a, 0x6ae2, 0xd289, 0x6d8c, 0x6be2, 0x658d, 0x928d, 0x001a, 0xe495, 0x6de2, 0x001a, 0x001a, 0x7396, 0x001a, 0x001a, 0x6fe2, 0x001a, 0x001a, 0x001a, 0xcf90, 0x6e89, 0xb889, 0xaa88, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ee2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x70e2, 0x71e2, 0xf58f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x72e2, 0x001a, 0x6e8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74e2, 0x001a, 0x001a, 0x001a, 0x8a8c, 0x001a, 0x868b, 0x001a, 0x001a, 0x75e2, 0xf38b, 0x001a, 0x001a, 0x76e2, 0x001a, 0xfa90, 0x001a, 0xcb93, 0x001a, 0xde90, 0xf38d, 0x001a, 0x001a, 0x001a, 0x77e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8292, 0x8b91, 0x001a, 0x79e2, 0x7be2, 0x78e2, 0x7ae2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x418c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ce2, 0x458c, 0x001a, 0x001a, 0x001a, 0x878b, 0x7197, 0x7ee2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x80e2, 0x001a, 0x001a, 0x001a, 0x4d89, 0x001a, 0x001a, 0x001a, 0x001a, 0x83e2, 0x001a, 0x001a, 0x001a, 0x968a, 0x82e2, 0x81e2, 0x001a, 0x85e2, 0x7de2, 0x001a, 0x86e2, 0xa797, 0x001a, 0x87e2, 0x001a, 0x88e2, 0x001a, 0x67ee, 0xf29a, 0x8ae2, 0x001a, 0x89e2, 0x001a, 0x001a, 0x001a, 0x8be2, 0x8ce2, 0x001a, 0xb397, 0x8de2, 0x001a, 0xede8, 0xcd8f, 0x8ee2, 0x8fe2, 0x768f, 0x001a, 0xb693, 0x90e2, 0x68ee, 0x001a, 0x001a, 0x4792, 0x6aee, 0x001a, 0x91e2, 0x001a, 0x5b92, 0x92e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa38b, 0x001a, 0x5e99, 0x7c92, 0xb18e, 0x001a, 0x001a, 0x001a, 0x001a, 0xc68a, 0x001a, 0x001a, 0x93e2, 0x001a, 0xa0e2, 0x001a, 0x96e2, 0x001a, 0x888b, 0x001a, 0x95e2, 0xa2e2, 0x001a, 0x001a, 0x001a, 0x94e2, 0x001a, 0xce8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x98e2, 0x99e2, 0x001a, 0x4a93, 0x001a, 0x001a, 0x9ae2, 0x001a, 0x7d8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7990, 0x8495, 0x001a, 0x9ce2, 0x001a, 0x001a, 0x001a, 0xe691, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x97e2, 0x001a, 0x9be2, 0x9de2, 0x001a, 0x001a, 0xf98d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e2, 0x4d95, 0x001a, 0xa494, 0x9993, 0x001a, 0xd88b, 0xa3e2, 0xa1e2, 0x001a, 0xb394, 0x9ee2, 0x7d92, 0x9b93, 0x001a, 0x9a93, 0x001a, 0xf48d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6e2, 0x001a, 0xa8e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xabe2, 0x001a, 0xace2, 0x001a, 0xa9e2, 0xaae2, 0x001a, 0x001a, 0xa7e2, 0xa5e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x9fe2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcd95, 0xd389, 0x001a, 0x001a, 0x001a, 0xb3e2, 0x001a, 0xb0e2, 0x001a, 0xb5e2, 0x001a, 0x001a, 0xb4e2, 0x001a, 0x9394, 0xa596, 0x001a, 0x5a8e, 0xaee2, 0xb7e2, 0xb2e2, 0x001a, 0xb1e2, 0xade2, 0x6bee, 0xafe2, 0x001a, 0xc78a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5c92, 0x001a, 0x001a, 0xfb90, 0x001a, 0x001a, 0x001a, 0xa094, 0x001a, 0x001a, 0xbce2, 0x001a, 0x001a, 0x001a, 0xa294, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf90, 0xb9e2, 0x001a, 0x001a, 0xcd94, 0x001a, 0xbde2, 0xd195, 0x001a, 0x7a92, 0x001a, 0xb8e2, 0xbae2, 0x001a, 0x001a, 0xbbe2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee2, 0x001a, 0x001a, 0xc28e, 0x001a, 0x001a, 0x001a, 0xc493, 0xc3e2, 0xc2e2, 0x001a, 0x001a, 0xbfe2, 0x001a, 0x001a, 0x001a, 0x5598, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8e2, 0x001a, 0x001a, 0xcce2, 0xc9e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe2, 0x001a, 0x001a, 0x001a, 0xc0e2, 0xd399, 0xc7e2, 0xc1e2, 0x001a, 0x001a, 0xcae2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0e2, 0x001a, 0xc88a, 0x001a, 0xcde2, 0x001a, 0x001a, 0x001a, 0xcee2, 0x001a, 0x001a, 0xcfe2, 0xd2e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e2, 0xf494, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3e2, 0xfa97, 0xeb95, 0xd8e2, 0x001a, 0x001a, 0xd5e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e2, 0xd090, 0x001a, 0xd7e2, 0xd9e2, 0x001a, 0x001a, 0x001a, 0xd6e2, 0x001a, 0xdde2, 0x001a, 0xdae2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbe2, 0xc4e2, 0x001a, 0x001a, 0x001a, 0xdce2, 0xdee2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfe2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc495, 0x001a, 0xe0e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe096, 0x001a, 0x001a, 0xcc8b, 0x488c, 0xe1e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb295, 0x001a, 0x8890, 0x001a, 0xae96, 0x001a, 0x001a, 0xe2e2, 0x001a, 0xb197, 0x001a, 0x001a, 0x9494, 0x001a, 0x6591, 0x5394, 0x001a, 0x001a, 0x6c8f, 0x001a, 0x001a, 0x001a, 0xbe88, 0x001a, 0xe7e2, 0xe5e2, 0x001a, 0xe3e2, 0x9f8a, 0x001a, 0xcf8f, 0xe8e2, 0x001a, 0x001a, 0xe6e2, 0x001a, 0xe4e2, 0xece2, 0x001a, 0x001a, 0xebe2, 0xeae2, 0xe9e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xede2, 0x001a, 0x001a, 0x001a, 0xeee2, 0xb890, 0x001a, 0xefe2, 0x001a, 0xf1e2, 0x001a, 0x001a, 0xf0e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xd08c, 0x001a, 0x001a, 0x001a, 0x5791, 0x001a, 0x001a, 0x001a, 0xf3e2, 0x001a, 0x001a, 0x001a, 0x9c93, 0x001a, 0xf2e2, 0x001a, 0x001a, 0x001a, 0xf4e2, 0x001a, 0xb395, 0x8c91, 0x668d, 0x001a, 0xf5e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xc697, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e2, 0x001a, 0x001a, 0xf8e2, 0x001a, 0xf9e2, 0x001a, 0xfae2, 0x001a, 0x858e, 0x001a, 0xfbe2, 0x6e8c, 0x001a, 0x001a, 0x8a8b, 0x001a, 0x498b, 0x001a, 0x40e3, 0x001a, 0xf196, 0x678d, 0xfce2, 0x001a, 0x001a, 0x001a, 0x43e3, 0xe496, 0x001a, 0x5b94, 0x001a, 0x001a, 0x5295, 0x001a, 0x001a, 0x001a, 0x838f, 0x42e3, 0x001a, 0xd18e, 0x688d, 0x868e, 0x898b, 0xb495, 0x41e3, 0x001a, 0x001a, 0x001a, 0x6691, 0x6196, 0xf58d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x878e, 0xdb92, 0x001a, 0x46e3, 0xdd97, 0xd78d, 0x001a, 0x47e3, 0x6190, 0x001a, 0x49e3, 0x001a, 0x001a, 0x001a, 0xd08f, 0xae8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x48e3, 0x001a, 0x001a, 0x498f, 0xbc8c, 0x6791, 0x44e3, 0x4ae3, 0x001a, 0x6dee, 0x001a, 0x001a, 0x45e3, 0x6f8c, 0x001a, 0x4de3, 0x51e3, 0x8b8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ce3, 0x001a, 0x001a, 0x001a, 0x001a, 0x55e3, 0x6eee, 0x001a, 0x698d, 0x001a, 0x001a, 0x8d97, 0xba88, 0x52e3, 0x001a, 0x001a, 0x8b8b, 0x001a, 0x4fe3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50e3, 0x001a, 0x001a, 0x9d93, 0x4ee3, 0x4be3, 0x001a, 0x478a, 0xe290, 0x001a, 0x001a, 0xa68c, 0x001a, 0x001a, 0x001a, 0x57e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x54e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56e3, 0x001a, 0x001a, 0x001a, 0x53e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x708c, 0xb191, 0x58e3, 0x8e91, 0x001a, 0x001a, 0x65e3, 0x70ee, 0x001a, 0x61e3, 0x5be3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5fe3, 0xf88e, 0xdb88, 0x5ae3, 0x62e3, 0x66e3, 0x6a8d, 0xd496, 0x001a, 0xd492, 0x5ce3, 0x001a, 0x6fee, 0x64e3, 0x001a, 0x59e3, 0x5d92, 0x001a, 0x5ee3, 0xbb88, 0xc896, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5de3, 0x001a, 0x001a, 0xd98b, 0xea94, 0x001a, 0x001a, 0x001a, 0x8d91, 0x001a, 0xce97, 0x8f8f, 0x001a, 0x001a, 0x8ee3, 0x71ee, 0x001a, 0x67e3, 0x001a, 0xfc90, 0x001a, 0x63e3, 0x68e3, 0x6ae3, 0x001a, 0xf792, 0x6de3, 0x001a, 0x001a, 0x69e3, 0x001a, 0x001a, 0x001a, 0xd295, 0xc98a, 0x001a, 0x001a, 0xc996, 0x001a, 0x001a, 0xdc88, 0x001a, 0x001a, 0x6ce3, 0x001a, 0xfb97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6be3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8f89, 0x001a, 0x001a, 0xea93, 0x6ee3, 0x001a, 0x001a, 0x001a, 0x75e3, 0x6fe3, 0x76e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x72e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9b94, 0x001a, 0x001a, 0xc88e, 0x74e3, 0x001a, 0x71e3, 0x77e3, 0x70e3, 0x001a, 0x001a, 0x638f, 0x001a, 0x001a, 0x001a, 0x001a, 0x4496, 0x001a, 0x001a, 0x6b8f, 0x001a, 0x001a, 0x73e3, 0x80e3, 0x001a, 0x001a, 0x7be3, 0x001a, 0x7ee3, 0x001a, 0x7ce3, 0x81e3, 0x7ae3, 0x001a, 0x60e3, 0xd190, 0x001a, 0x001a, 0xc994, 0x001a, 0x7de3, 0x001a, 0x001a, 0x78e3, 0x001a, 0x001a, 0x001a, 0x4091, 0x718c, 0x001a, 0x4a8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x72ee, 0x001a, 0x4490, 0x5591, 0x84e3, 0x001a, 0x001a, 0x86e3, 0x87e3, 0x001a, 0x001a, 0x83e3, 0x85e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x79e3, 0x82e3, 0x001a, 0x8ae3, 0x89e3, 0x001a, 0x001a, 0x9a96, 0x001a, 0x001a, 0x4a8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x88e3, 0x001a, 0x8ce3, 0x8be3, 0x8fe3, 0x001a, 0x91e3, 0x001a, 0x001a, 0x5b8e, 0x8de3, 0x001a, 0x001a, 0x001a, 0x001a, 0x92e3, 0x93e3, 0x40ed, 0x001a, 0x94e3, 0x001a, 0x9ae3, 0x5a93, 0x96e3, 0x001a, 0x95e3, 0x97e3, 0x98e3, 0x001a, 0x99e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x9be3, 0x9ce3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xca8a, 0x001a, 0x9de3, 0x001a, 0x9ee3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9fe3, 0x001a, 0x73ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xa0e3, 0xa1e3, 0xa2e3, 0x001a, 0xa3e3, 0xa4e3, 0x001a, 0x001a, 0xa6e3, 0xa5e3, 0x001a, 0x001a, 0xa7e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8e3, 0xa9e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xace3, 0xaae3, 0xabe3, 0xdf8d, 0x728c, 0x001a, 0x001a, 0x7592, 0x001a, 0xb194, 0x001a, 0x908f, 0x001a, 0x001a, 0x6c94, 0x001a, 0xeb94, 0xade3, 0xeb9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaee3, 0xb0e3, 0x001a, 0x8597, 0xafe3, 0xb2e3, 0xb1e3, 0x001a, 0x7297, 0x001a, 0xb3e3, 0x001a, 0xfc94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7e3, 0x001a, 0x001a, 0xb6e3, 0xb5e3, 0x001a, 0x001a, 0x74ee, 0x001a, 0xb8e3, 0x518c, 0x001a, 0x001a, 0x001a, 0x4191, 0x608b, 0x001a, 0x001a, 0x001a, 0x001a, 0xbce3, 0xb9e3, 0x001a, 0x001a, 0xbae3, 0x001a, 0x001a, 0x001a, 0xbde3, 0x001a, 0xbee3, 0xbbe3, 0x001a, 0x001a, 0x001a, 0x4889, 0x001a, 0x001a, 0x001a, 0xa589, 0x001a, 0x001a, 0x001a, 0xc0e3, 0xc1e3, 0x001a, 0x001a, 0x001a, 0xc2e3, 0x001a, 0x8297, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4b8f, 0x001a, 0xc4e3, 0xc3e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8990, 0xc5e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6e3, 0x001a, 0x001a, 0xc7e3, 0x001a, 0xe38a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcb8a, 0x001a, 0x001a, 0xc8e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9e3, 0x001a, 0x7c96, 0x8397, 0x001a, 0x001a, 0x001a, 0x7397, 0x5698, 0x001a, 0x6c8d, 0xcce3, 0xd28e, 0xcbe3, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde3, 0xa78e, 0x001a, 0x001a, 0x001a, 0xcf91, 0x001a, 0xcee3, 0x001a, 0x001a, 0x6b8d, 0x001a, 0xd596, 0xcfe3, 0xd0e3, 0x001a, 0x001a, 0xd1e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa88e, 0x001a, 0x001a, 0xeb96, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e3, 0x001a, 0x5e92, 0x001a, 0xd4e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7e3, 0x001a, 0x001a, 0x001a, 0xd6e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e3, 0x001a, 0x001a, 0x001a, 0xb990, 0x001a, 0xd9e3, 0x001a, 0xdae3, 0x001a, 0x001a, 0x001a, 0xb795, 0xdbe3, 0x001a, 0x8f91, 0xdce3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc97, 0xe0e3, 0x001a, 0xdfe3, 0xdee3, 0xae92, 0x001a, 0xe1e3, 0x4590, 0x001a, 0xe2e3, 0x001a, 0x001a, 0x001a, 0xe3e3, 0x5798, 0xe4e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e3, 0xe7e3, 0xe6e3, 0xa394, 0x001a, 0xf793, 0x001a, 0x5d98, 0xa794, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e3, 0x001a, 0x001a, 0xd18f, 0x001a, 0x4995, 0x001a, 0xeae3, 0xe8e3, 0x001a, 0xcc8a, 0x001a, 0x001a, 0x001a, 0xd28c, 0x888e, 0x001a, 0x001a, 0xec94, 0x001a, 0x001a, 0x001a, 0xa88c, 0x6296, 0x001a, 0xede3, 0xebe3, 0x001a, 0x6d8d, 0x001a, 0x6e8d, 0xe788, 0x001a, 0xe68d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7894, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdd88, 0xf2e3, 0x001a, 0x5f92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7794, 0x001a, 0xd991, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e3, 0x001a, 0x001a, 0xf0e3, 0xf3e3, 0xeee3, 0x001a, 0xf1e3, 0x4596, 0x001a, 0x001a, 0xd38c, 0x001a, 0x001a, 0xfb88, 0xefe3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6e3, 0x001a, 0xf7e3, 0x001a, 0x001a, 0xb793, 0x001a, 0x001a, 0x001a, 0xb98b, 0x001a, 0x001a, 0x001a, 0x45e4, 0x5c94, 0x001a, 0x001a, 0x001a, 0x001a, 0x898e, 0x001a, 0x001a, 0xba8b, 0xc690, 0x6598, 0xac96, 0xf5e3, 0xd290, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x728b, 0xf8e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfae3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe3, 0x001a, 0x4592, 0x001a, 0x5d94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaf92, 0x001a, 0x001a, 0x001a, 0x001a, 0x42e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xfce3, 0x001a, 0x001a, 0x7490, 0x001a, 0x8595, 0x44e4, 0x001a, 0x43e4, 0x6f8d, 0x7298, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x54e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x48e4, 0x49e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xee8e, 0x001a, 0x001a, 0x47e4, 0x001a, 0x988d, 0x46e4, 0x001a, 0x001a, 0x4ae4, 0x001a, 0x001a, 0x001a, 0xb092, 0xa095, 0x4291, 0x001a, 0x001a, 0x001a, 0x001a, 0xda91, 0x4ee4, 0x001a, 0x4fe4, 0x4be4, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ce4, 0x001a, 0x4de4, 0x001a, 0x001a, 0x001a, 0x001a, 0x708d, 0x001a, 0x001a, 0x001a, 0x55e4, 0x001a, 0x51e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x8695, 0x001a, 0x8c96, 0x4795, 0x001a, 0x001a, 0x50e4, 0x001a, 0x001a, 0x53e4, 0x52e4, 0x001a, 0x001a, 0x001a, 0x6396, 0x56e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x57e4, 0x001a, 0x001a, 0x5691, 0x001a, 0x58e4, 0x001a, 0x001a, 0x5ae4, 0x001a, 0x5ee4, 0x001a, 0x001a, 0x5be4, 0x59e4, 0x5e94, 0x5ce4, 0x001a, 0x5de4, 0x001a, 0x001a, 0x001a, 0xb089, 0x001a, 0x64e4, 0x5fe4, 0x001a, 0x001a, 0x001a, 0x60e4, 0x001a, 0x001a, 0x001a, 0x61e4, 0x001a, 0x9f91, 0x001a, 0x001a, 0x001a, 0x001a, 0x63e4, 0x62e4, 0x65e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x66e4, 0x67e4, 0x001a, 0x001a, 0x6290, 0x001a, 0xe789, 0x001a, 0x68e4, 0xd597, 0x001a, 0xa98e, 0x001a, 0x001a, 0x4c8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a8e, 0x7692, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x69e4, 0x6ae4, 0x5089, 0x001a, 0x6be4, 0x001a, 0x001a, 0x6ce4, 0x6de4, 0x001a, 0x001a, 0x6ee4, 0x001a, 0x6fe4, 0xbb8b, 0xa89d, 0x70e4, 0x001a, 0xe390, 0x71e4, 0xc98e, 0x001a, 0x72e4, 0x001a, 0xae98, 0x001a, 0x001a, 0x001a, 0x73e4, 0xdc95, 0xda8a, 0x001a, 0x001a, 0x4391, 0x778f, 0x001a, 0x9195, 0x4d8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74e4, 0x718d, 0x75e4, 0xca94, 0x001a, 0x84e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x77e4, 0x001a, 0xc791, 0x9594, 0xbd8c, 0x76e4, 0x4491, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x78e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf892, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ae4, 0x79e4, 0x7ce4, 0x001a, 0x001a, 0x7be4, 0x001a, 0x7de4, 0x001a, 0x001a, 0x80e4, 0x001a, 0x7ee4, 0x001a, 0xcd8a, 0x001a, 0x81e4, 0x001a, 0x82e4, 0x83e4, 0x001a, 0x001a, 0xaf8d, 0xc797, 0x001a, 0x85e4, 0x4690, 0x001a, 0x001a, 0x001a, 0x9089, 0x86e4, 0x87e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x88e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf088, 0x001a, 0x89e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x8ae4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8795, 0x001a, 0x001a, 0x001a, 0xc58e, 0x001a, 0x8ce4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x488a, 0xb088, 0x001a, 0x001a, 0x001a, 0x001a, 0x8be4, 0x8ee4, 0x6d94, 0x001a, 0x6390, 0x001a, 0xd489, 0x001a, 0x4696, 0x001a, 0x001a, 0x001a, 0x001a, 0x7c8c, 0xda8b, 0x001a, 0x8de4, 0x001a, 0xe889, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa18a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9189, 0x92e4, 0xe897, 0xdb91, 0x001a, 0x001a, 0x6395, 0x001a, 0x9ee4, 0x001a, 0xd589, 0x9ce4, 0x001a, 0x9ae4, 0x91e4, 0x001a, 0x8fe4, 0x001a, 0x90e4, 0x001a, 0xe18e, 0xea8b, 0x9792, 0x001a, 0x001a, 0x001a, 0xcf93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7089, 0x001a, 0x94e4, 0x93e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x99e4, 0x95e4, 0x98e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x76ee, 0xce96, 0x97e4, 0xd689, 0x9d8a, 0x9be4, 0x001a, 0x001a, 0x9de4, 0x001a, 0x001a, 0x001a, 0x001a, 0x738c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1e4, 0xaae4, 0xabe4, 0x001a, 0x001a, 0x001a, 0xa988, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xef88, 0x001a, 0x001a, 0xa9e4, 0x001a, 0x001a, 0x001a, 0xa8e4, 0x001a, 0xa3e4, 0xa2e4, 0x001a, 0xa0e4, 0x9fe4, 0x8392, 0x001a, 0xf991, 0xa5e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7e4, 0x001a, 0x001a, 0x001a, 0x9091, 0x748c, 0x001a, 0x001a, 0x001a, 0x001a, 0x6089, 0xa6e4, 0x001a, 0x728d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9191, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x77ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8e4, 0x001a, 0xb9e4, 0x001a, 0xd789, 0x001a, 0x001a, 0x001a, 0xac89, 0xb6e4, 0x001a, 0x001a, 0x78ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xace4, 0x001a, 0xb4e4, 0x001a, 0xbbe4, 0xb5e4, 0x001a, 0x001a, 0x001a, 0xb3e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x96e4, 0x001a, 0x001a, 0xb1e4, 0x001a, 0x001a, 0x001a, 0xade4, 0x001a, 0x001a, 0x001a, 0xce8a, 0xafe4, 0xbae4, 0x001a, 0xb0e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbce4, 0x001a, 0xaee4, 0x9c94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8997, 0x001a, 0x001a, 0x001a, 0xb7e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde4, 0x001a, 0x001a, 0x001a, 0xc5e4, 0x001a, 0x001a, 0x001a, 0x9b90, 0x001a, 0x79ee, 0x001a, 0x001a, 0x658b, 0x001a, 0xdb8b, 0x001a, 0xc0e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd989, 0x001a, 0x001a, 0xd28f, 0x001a, 0xc3e4, 0x001a, 0x001a, 0x001a, 0xd88d, 0x001a, 0x001a, 0x7093, 0xc8e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xec95, 0x001a, 0xbfe4, 0x001a, 0x001a, 0x001a, 0xd889, 0xd48c, 0x4895, 0xc9e4, 0x001a, 0xbde4, 0x001a, 0x7aee, 0xc6e4, 0x001a, 0x001a, 0x001a, 0xd0e4, 0x001a, 0xc1e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e4, 0xb893, 0x001a, 0x001a, 0xc7e4, 0x001a, 0x001a, 0x001a, 0xc4e4, 0x4796, 0xcae4, 0xde88, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcce4, 0x001a, 0xcbe4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8b94, 0xd2e4, 0x001a, 0xdde4, 0x001a, 0x001a, 0x001a, 0x001a, 0x9e8a, 0x001a, 0x001a, 0x001a, 0xe0e4, 0x001a, 0x001a, 0xcee4, 0x001a, 0x001a, 0x001a, 0xd3e4, 0x8e97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdce4, 0x001a, 0x7bee, 0x7497, 0x001a, 0x001a, 0x001a, 0x001a, 0xa897, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9892, 0x001a, 0x001a, 0x001a, 0x8b8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9295, 0xe2e4, 0x9f93, 0x001a, 0x001a, 0xaf88, 0x001a, 0x001a, 0xdbe4, 0x001a, 0xd7e4, 0x9291, 0xd1e4, 0xd9e4, 0xdee4, 0x001a, 0x4b94, 0x001a, 0x001a, 0x001a, 0xa888, 0x001a, 0xd6e4, 0x001a, 0xdfe4, 0x9895, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdae4, 0x001a, 0xd5e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd38f, 0x001a, 0x001a, 0x001a, 0x001a, 0x4e8f, 0x001a, 0x001a, 0x001a, 0xaa8e, 0x001a, 0x001a, 0x001a, 0x001a, 0xd696, 0x001a, 0x001a, 0x6695, 0x001a, 0x001a, 0xe5e4, 0x001a, 0xeee4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x978a, 0x001a, 0x7cee, 0x001a, 0x001a, 0x001a, 0xf68f, 0xe3e4, 0x001a, 0xe8e4, 0x9391, 0x001a, 0x001a, 0xe4e4, 0x001a, 0xebe4, 0x001a, 0x001a, 0x7e92, 0x001a, 0xece4, 0x001a, 0x001a, 0x7597, 0xe1e4, 0x578a, 0x001a, 0xe7e4, 0x001a, 0x001a, 0xeae4, 0xaa96, 0x001a, 0x001a, 0x001a, 0x001a, 0xede4, 0x001a, 0x001a, 0xe6e4, 0xe9e4, 0x001a, 0x44ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4896, 0x001a, 0x4098, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8e4, 0x001a, 0x001a, 0xf0e4, 0xc18e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcc95, 0x001a, 0xa096, 0xf7e4, 0xf6e4, 0x001a, 0xf2e4, 0xf3e4, 0x001a, 0x5589, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e4, 0x001a, 0xefe4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd392, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e4, 0xfc88, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa091, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc195, 0x001a, 0x001a, 0xf9e4, 0x40e5, 0x001a, 0xd794, 0x001a, 0x001a, 0x001a, 0x001a, 0xfce4, 0xd48f, 0xc78e, 0x42e5, 0x001a, 0x001a, 0xbc8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x7dee, 0x001a, 0x43e5, 0x001a, 0x9995, 0xfbe4, 0x7eee, 0xd4e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfae4, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e98, 0xa093, 0x9395, 0x80ee, 0x001a, 0x4ae5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x51e5, 0x001a, 0x44e5, 0x001a, 0x001a, 0x001a, 0x9694, 0x001a, 0x001a, 0x4ee5, 0x46e5, 0x001a, 0x48e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x52e5, 0x47e5, 0x001a, 0x001a, 0x4be5, 0x001a, 0x001a, 0x9289, 0x001a, 0xe393, 0x001a, 0x4ce5, 0x4fe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x45e5, 0x001a, 0x4591, 0x001a, 0x49e5, 0x468e, 0x6490, 0x4f8c, 0xf296, 0x001a, 0xf796, 0x928f, 0x82ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56e5, 0x54e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d98, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x53e5, 0x001a, 0x001a, 0x001a, 0x9597, 0x001a, 0x55e5, 0x57e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x58e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5be5, 0x59e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa193, 0x5ae5, 0x001a, 0x001a, 0x001a, 0xcb94, 0x4de5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x938f, 0x001a, 0x5ce5, 0x61e5, 0x9491, 0x001a, 0x001a, 0x60e5, 0x001a, 0x001a, 0x001a, 0x41e5, 0x001a, 0x001a, 0x001a, 0x62e5, 0x6891, 0x001a, 0x001a, 0x5de5, 0x5fe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ee5, 0x001a, 0x001a, 0x509f, 0x419f, 0x001a, 0x001a, 0x64e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x63e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9697, 0x001a, 0xbae1, 0x65e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x66e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x67e5, 0xd58c, 0x001a, 0x738b, 0x001a, 0x001a, 0x001a, 0x69e5, 0x7c99, 0x001a, 0x001a, 0x001a, 0x001a, 0x958b, 0x001a, 0xb897, 0x001a, 0xf18b, 0x6ae5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6be5, 0x001a, 0x001a, 0x001a, 0x8e92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ce5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf893, 0x001a, 0xb888, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe189, 0x71e5, 0x72e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6de5, 0x001a, 0x5c8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ee5, 0x6194, 0x001a, 0x001a, 0x001a, 0x001a, 0x6fe5, 0x70e5, 0x7ae5, 0x001a, 0x001a, 0x001a, 0x74e5, 0x77e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x75e5, 0x001a, 0x76e5, 0xd68e, 0x001a, 0x78e5, 0x001a, 0x6092, 0x001a, 0x758c, 0x618a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7be5, 0x001a, 0x001a, 0x001a, 0x001a, 0x5e8a, 0x001a, 0x81e5, 0x001a, 0x001a, 0x7ce5, 0x80e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xb894, 0x001a, 0x001a, 0x001a, 0x001a, 0x7de5, 0x001a, 0x001a, 0x7ee5, 0x6795, 0xd894, 0x82e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfb91, 0x8ce5, 0x001a, 0x88e5, 0x001a, 0x001a, 0xe989, 0x001a, 0x86e5, 0x001a, 0x4996, 0x87e5, 0x001a, 0x001a, 0x84e5, 0x001a, 0x85e5, 0x8ae5, 0x8de5, 0x001a, 0x001a, 0x8be5, 0x001a, 0x001a, 0x001a, 0x89e5, 0x83e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7792, 0x001a, 0x94e5, 0x001a, 0xa896, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x92e5, 0x001a, 0x001a, 0x001a, 0x93e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8ee5, 0x001a, 0x001a, 0x90e5, 0x001a, 0x001a, 0x001a, 0x91e5, 0x001a, 0x001a, 0x001a, 0x8fe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe490, 0x001a, 0x5898, 0x98e5, 0x001a, 0x99e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x9fe5, 0x001a, 0x4990, 0x001a, 0x9be5, 0x001a, 0x9ee5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x96e5, 0x95e5, 0x001a, 0x001a, 0xa0e5, 0x001a, 0x001a, 0xda89, 0x001a, 0x9ce5, 0x001a, 0xa1e5, 0x001a, 0x001a, 0x001a, 0x9de5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9ae5, 0x001a, 0xb192, 0x001a, 0x97e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8894, 0x001a, 0x001a, 0xa5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5a97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e5, 0x001a, 0x001a, 0xa3e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xace5, 0x001a, 0x001a, 0x001a, 0xa6e5, 0x001a, 0x001a, 0x001a, 0xaee5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8697, 0xb1e5, 0x001a, 0xa8e5, 0x001a, 0x001a, 0xa9e5, 0x001a, 0x001a, 0x001a, 0xade5, 0x001a, 0xb0e5, 0xafe5, 0x001a, 0x001a, 0x001a, 0xa7e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xaae5, 0x001a, 0xbbe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2e5, 0x001a, 0x001a, 0xb3e5, 0x001a, 0x001a, 0x001a, 0xb8e5, 0xb9e5, 0x001a, 0x498a, 0x001a, 0x618b, 0x001a, 0x001a, 0xb7e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2e5, 0x001a, 0x85ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e5, 0xbae5, 0xb5e5, 0x001a, 0xbce5, 0x001a, 0x001a, 0x001a, 0xbee5, 0xbde5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0e5, 0xbfe5, 0x79e5, 0x001a, 0x001a, 0x001a, 0xc4e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e5, 0x001a, 0x001a, 0xc3e5, 0x001a, 0xc5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c8c, 0x001a, 0xc7e5, 0x001a, 0xc6e5, 0x001a, 0x4f8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x738d, 0xa59f, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8e5, 0x708f, 0x001a, 0x001a, 0x001a, 0x588a, 0x001a, 0xc9e5, 0x001a, 0x7189, 0x001a, 0xd58f, 0xcae5, 0x001a, 0x001a, 0x748d, 0xcbe5, 0xdf88, 0x001a, 0x001a, 0x001a, 0x001a, 0x5c95, 0x001a, 0x001a, 0xcce5, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a90, 0x001a, 0xd3e5, 0x001a, 0x001a, 0xd0e5, 0x001a, 0x8f92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e5, 0xcee5, 0xdc8b, 0x001a, 0xcde5, 0xd4e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x558c, 0x001a, 0x001a, 0xdc91, 0x001a, 0xdae5, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e5, 0x001a, 0x001a, 0x001a, 0xb391, 0xd5e5, 0x001a, 0xd8e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe5, 0x001a, 0x001a, 0x001a, 0xd9e5, 0x001a, 0xdbe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xed94, 0x001a, 0x001a, 0xd7e5, 0x001a, 0xdce5, 0xdee5, 0x001a, 0x001a, 0xd18c, 0xd2e5, 0x001a, 0xbf88, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde5, 0x001a, 0xd98d, 0xf497, 0xdfe5, 0xe0e5, 0x9591, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa097, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1e5, 0x5497, 0x001a, 0x001a, 0xe2e5, 0xe3e5, 0x001a, 0x001a, 0xe295, 0xe4e5, 0x001a, 0xbe8d, 0x001a, 0xa197, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeae5, 0xd68f, 0xe8e5, 0x86ee, 0x001a, 0x001a, 0x8797, 0xe5e5, 0x001a, 0x001a, 0xe7e5, 0xbb90, 0x9e90, 0x001a, 0x001a, 0x001a, 0xe6e5, 0x001a, 0xebe5, 0x001a, 0x001a, 0xa195, 0x001a, 0x001a, 0xede5, 0x001a, 0xece5, 0x001a, 0x001a, 0x001a, 0x8c8a, 0x001a, 0x4a96, 0xeee5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41ed, 0xfae5, 0xf0e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2e5, 0xf3e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e5, 0x001a, 0xf8e5, 0x001a, 0x001a, 0xf6e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e5, 0x001a, 0xefe5, 0xf5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e5, 0xb5e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa689, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfce5, 0xdd8b, 0xfbe5, 0x001a, 0x001a, 0x001a, 0x41e6, 0x001a, 0x40e6, 0x001a, 0x001a, 0x001a, 0x43e6, 0x001a, 0x001a, 0x42e6, 0x001a, 0x44e6, 0x001a, 0x001a, 0x508f, 0x001a, 0x45e6, 0x001a, 0x001a, 0x46e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x47e6, 0xbc90, 0x001a, 0x7697, 0x001a, 0x48e6, 0x001a, 0x001a, 0xa295, 0x6594, 0x49e6, 0x001a, 0x4ae6, 0xa98c, 0x001a, 0x001a, 0x001a, 0x4b8b, 0x001a, 0x001a, 0x001a, 0x4be6, 0x001a, 0x001a, 0x8b8e, 0x6094, 0x4ce6, 0x001a, 0x6f8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4de6, 0x001a, 0x001a, 0x001a, 0x001a, 0x4fe6, 0x9797, 0x001a, 0x4ee6, 0x6590, 0x001a, 0x50e6, 0x001a, 0x001a, 0x51e6, 0x001a, 0x001a, 0x52e6, 0xcf8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x53e6, 0x001a, 0x001a, 0x54e6, 0x001a, 0x55e6, 0x56e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x708a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x57e6, 0x001a, 0x58e6, 0x59e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf089, 0x001a, 0x001a, 0x4790, 0x5ae6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5be6, 0x001a, 0x001a, 0x001a, 0x5ce6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbe8c, 0x001a, 0xf992, 0x5de6, 0x001a, 0x001a, 0x001a, 0x001a, 0x768c, 0x001a, 0x7590, 0x001a, 0x60e6, 0x001a, 0xa293, 0x001a, 0x5fe6, 0x001a, 0x87ee, 0x508c, 0x001a, 0x001a, 0x5ee6, 0xf591, 0x4c8b, 0x001a, 0x001a, 0x61e6, 0x001a, 0x62e6, 0x001a, 0xd78f, 0x001a, 0x001a, 0x001a, 0x8d8c, 0x001a, 0x63e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x4b96, 0x001a, 0x001a, 0xdd90, 0x001a, 0x001a, 0x001a, 0x968b, 0x001a, 0xf396, 0x6991, 0x001a, 0x64e6, 0x88ee, 0x001a, 0x001a, 0x6690, 0x9092, 0xd88f, 0x001a, 0x001a, 0x001a, 0x001a, 0x65e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x68e6, 0x001a, 0x69e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbc8d, 0xc091, 0x67e6, 0x001a, 0xd98f, 0x5d95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x66e6, 0x001a, 0x001a, 0x8c8e, 0x001a, 0x7289, 0x001a, 0x6de6, 0x778c, 0x001a, 0x001a, 0x8e8e, 0x001a, 0x001a, 0x8d8e, 0x001a, 0x6c98, 0x6ce6, 0x6be6, 0x4691, 0x001a, 0x6c8b, 0x6298, 0x598a, 0xda8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x89ee, 0x001a, 0x001a, 0x6ae6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6fe6, 0x001a, 0x70e6, 0x6ee6, 0x001a, 0xd68c, 0x001a, 0x5f97, 0x001a, 0x001a, 0x8f8e, 0x4694, 0x001a, 0x001a, 0x001a, 0x73e6, 0x001a, 0xbe90, 0x001a, 0x6192, 0x001a, 0x001a, 0x5597, 0x001a, 0x76e6, 0x001a, 0x001a, 0x001a, 0xea8c, 0x001a, 0xbd90, 0x72e6, 0x001a, 0x77e6, 0xeb8c, 0x74e6, 0x75e6, 0x8aee, 0x71e6, 0x001a, 0x001a, 0x001a, 0xe090, 0xc793, 0x001a, 0x001a, 0x4e92, 0x001a, 0xdb89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xee94, 0x001a, 0x001a, 0x628b, 0x001a, 0x8bee, 0xb292, 0x001a, 0x001a, 0x7ae6, 0x001a, 0x78e6, 0x001a, 0x001a, 0x6b92, 0x001a, 0x001a, 0x001a, 0xbf90, 0xd08a, 0x79e6, 0x001a, 0x7a90, 0x001a, 0x001a, 0xc897, 0x001a, 0x001a, 0x001a, 0x5f98, 0x001a, 0x001a, 0x001a, 0x7be6, 0x87e6, 0xb392, 0x001a, 0x86e6, 0x8cee, 0x83e6, 0x8be6, 0x84e6, 0x001a, 0x80e6, 0x001a, 0xfa92, 0x7ee6, 0x001a, 0x001a, 0x001a, 0x7ce6, 0x001a, 0x4097, 0x908e, 0x001a, 0x001a, 0x81e6, 0x001a, 0x7de6, 0x001a, 0x001a, 0x8eee, 0x85e6, 0x948f, 0x001a, 0xbf8c, 0x001a, 0x001a, 0x001a, 0xf891, 0x001a, 0x6496, 0x7989, 0xe088, 0x001a, 0xa393, 0x001a, 0x001a, 0x89e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x88e6, 0x001a, 0xe493, 0x001a, 0x8de6, 0x001a, 0x001a, 0x001a, 0x82e6, 0x001a, 0x8ce6, 0x8ee6, 0x001a, 0xaa8c, 0x8ae6, 0x758d, 0x001a, 0xd38e, 0x001a, 0x001a, 0x8fe6, 0x7797, 0x001a, 0x001a, 0x001a, 0x001a, 0x92e6, 0x001a, 0x95e6, 0x001a, 0x001a, 0x93e6, 0x5495, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x90e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xde8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x94e6, 0x001a, 0x001a, 0x96e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9ae6, 0x001a, 0x001a, 0x97e6, 0x001a, 0x99e6, 0x98e6, 0x001a, 0x001a, 0x001a, 0x8fee, 0x001a, 0x001a, 0x9be6, 0x001a, 0xaf8e, 0x001a, 0x9de6, 0x9ce6, 0x8895, 0x001a, 0x001a, 0x9fe6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x788c, 0x001a, 0x001a, 0x001a, 0x001a, 0x9ee6, 0xa0e6, 0x001a, 0x001a, 0xa1e6, 0x638b, 0xbfe3, 0xf78f, 0x001a, 0xa2e6, 0x001a, 0x001a, 0xec8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e6, 0x001a, 0x90ee, 0xa4e6, 0x001a, 0x001a, 0x5d8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcc9d, 0x001a, 0xa5e6, 0x001a, 0xa6e6, 0x001a, 0x518f, 0x001a, 0xa7e6, 0xa8e6, 0x001a, 0x001a, 0xa9e6, 0x001a, 0x001a, 0xaae6, 0xabe6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4a92, 0x001a, 0x001a, 0xace6, 0x001a, 0x001a, 0x001a, 0x001a, 0xaee6, 0x001a, 0xade6, 0x001a, 0x001a, 0x001a, 0x001a, 0xa493, 0x001a, 0xafe6, 0x001a, 0x4c96, 0x001a, 0xb0e6, 0x001a, 0xb1e6, 0x001a, 0xb2e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xd893, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdb8f, 0xb4e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8b8d, 0xac98, 0xb5e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e6, 0x5e95, 0xb7e6, 0x001a, 0xbfe6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8e6, 0x001a, 0x001a, 0xbae6, 0x001a, 0x001a, 0x001a, 0xb9e6, 0xbbe6, 0x001a, 0x6596, 0xbce6, 0xbde6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee6, 0x001a, 0x001a, 0x001a, 0xc0e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x4c8a, 0xe592, 0x001a, 0x8995, 0xe08d, 0x768d, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e95, 0xdd89, 0xcc94, 0xc3e6, 0xd18a, 0xd390, 0xc2e6, 0xc7e6, 0x9992, 0xe196, 0x001a, 0xc5e6, 0xc6e6, 0x4d8b, 0x001a, 0xc8e6, 0x8394, 0xdd91, 0x001a, 0x001a, 0xef94, 0x5c93, 0xc4e6, 0x001a, 0x6696, 0xea89, 0xcae6, 0x4798, 0xc092, 0x6498, 0x001a, 0x001a, 0x918e, 0xc9e6, 0x001a, 0xaf91, 0x001a, 0x001a, 0xdae6, 0x4791, 0x001a, 0x001a, 0xf693, 0x001a, 0x6f95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde6, 0x5e8e, 0x928e, 0x001a, 0xdc8f, 0x001a, 0x8594, 0x001a, 0xab8c, 0xcce6, 0xcbe6, 0x001a, 0x8a95, 0x001a, 0x001a, 0x001a, 0xbf8e, 0x001a, 0x001a, 0x7193, 0x001a, 0x001a, 0x91ee, 0x001a, 0x001a, 0x001a, 0x92ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe6, 0xd0e6, 0x778d, 0xcee6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e6, 0xd2e6, 0x001a, 0xd4e6, 0xa191, 0x001a, 0xd3e6, 0xe48a, 0x001a, 0xd6e6, 0x001a, 0xd5e6, 0xd7e6, 0x001a, 0x93ee, 0xd9e6, 0xdbe6, 0x001a, 0xdce6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd490, 0x001a, 0xcd8e, 0xdde6, 0x001a, 0x001a, 0x001a, 0x718a, 0x001a, 0xdee6, 0x001a, 0x001a, 0x9691, 0xdfe6, 0x001a, 0xe0e6, 0x8b95, 0x001a, 0x94ee, 0x4e8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1e6, 0x001a, 0x001a, 0x001a, 0xb492, 0x001a, 0x001a, 0x001a, 0x001a, 0x7a89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xef8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x9690, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xab91, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e6, 0x001a, 0x001a, 0x001a, 0xe4e6, 0x001a, 0x001a, 0x001a, 0xe3e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe6, 0xe9e6, 0x001a, 0x001a, 0xe6e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8e6, 0x001a, 0x001a, 0x001a, 0xe7e6, 0xeae6, 0x001a, 0x978b, 0x001a, 0xeee6, 0x001a, 0xd590, 0x001a, 0xefe6, 0x001a, 0x001a, 0x001a, 0x001a, 0xd78c, 0x001a, 0xece6, 0xede6, 0x001a, 0x001a, 0x001a, 0x4898, 0x001a, 0x001a, 0x001a, 0xb592, 0x001a, 0x4891, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0e6, 0x001a, 0x001a, 0xf3e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e6, 0xf2e6, 0x7897, 0x001a, 0x001a, 0x001a, 0x001a, 0xa593, 0xf6e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e6, 0xf5e6, 0xf7e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x48e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfae6, 0x001a, 0x001a, 0x001a, 0xfbe6, 0xf9e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8e6, 0x001a, 0xfb92, 0x001a, 0x001a, 0x40e7, 0x44e7, 0x41e7, 0xfce6, 0x001a, 0x42e7, 0x001a, 0x001a, 0x001a, 0x43e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ae7, 0x001a, 0x001a, 0x001a, 0x45e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd690, 0x47e7, 0x001a, 0x001a, 0x49e7, 0x46e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ce7, 0x001a, 0x528f, 0x001a, 0x4be7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4de7, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ee7, 0x001a, 0x001a, 0x51e7, 0x50e7, 0x001a, 0x4fe7, 0x001a, 0x001a, 0x53e7, 0x52e7, 0x001a, 0xf496, 0x001a, 0x001a, 0x001a, 0x55e7, 0x001a, 0x54e7, 0x56e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x57e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x59e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x58e7, 0x6790, 0x5ae7, 0x001a, 0x001a, 0xeb8b, 0x5be7, 0x5de7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ee7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5fe7, 0x5ce7, 0x001a, 0x60e7, 0x001a, 0xd48e, 0x61e7, 0x4f8b, 0x528c, 0x001a, 0x96ee, 0x001a, 0x001a, 0xac8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62e7, 0x001a, 0x001a, 0x001a, 0xee93, 0x001a, 0x001a, 0x5d93, 0x63e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x66e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb28e, 0x001a, 0x001a, 0x65e7, 0x64e7, 0x798c, 0x67e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x728a, 0x001a, 0x69e7, 0x001a, 0x001a, 0x001a, 0xda8d, 0x68e7, 0x001a, 0x71e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6be7, 0x6de7, 0xe395, 0x6ae7, 0x001a, 0x001a, 0x001a, 0x6ce7, 0x001a, 0x70e7, 0x6ee7, 0x508b, 0x001a, 0x6fe7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x72e7, 0x001a, 0x001a, 0x7994, 0xd697, 0x001a, 0x001a, 0x001a, 0x001a, 0x538f, 0x001a, 0x001a, 0x001a, 0x73e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x4197, 0x75e7, 0x001a, 0x74e7, 0x001a, 0x001a, 0x78e7, 0x6097, 0x001a, 0x001a, 0x77e7, 0x001a, 0x8d8a, 0x76e7, 0x7be7, 0x001a, 0x001a, 0x7ae7, 0x001a, 0x001a, 0x79e7, 0x5193, 0x7ce7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7de7, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ee7, 0x001a, 0x001a, 0x8c8d, 0x001a, 0x448c, 0x80e7, 0x81e7, 0x82e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6890, 0x83e7, 0x001a, 0xab8e, 0x84e7, 0x001a, 0x001a, 0x001a, 0x85e7, 0x001a, 0x001a, 0x001a, 0x9f99, 0x9e99, 0x001a, 0x001a, 0x001a, 0x001a, 0x86e7, 0x90e3, 0x87e7, 0x4392, 0x4a90, 0x5f94, 0x001a, 0x001a, 0x001a, 0x001a, 0x88e7, 0x001a, 0x001a, 0xd395, 0xd292, 0x9e8d, 0x001a, 0x001a, 0x4892, 0x001a, 0x001a, 0x4989, 0x001a, 0x9896, 0x7690, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7d8c, 0x001a, 0x001a, 0xdf8b, 0x001a, 0x001a, 0xd495, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x89e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8be7, 0x001a, 0x001a, 0x8ae7, 0xde89, 0x001a, 0x001a, 0xf493, 0x8ce7, 0x9794, 0x001a, 0x5293, 0x001a, 0x8de7, 0x718f, 0x001a, 0x001a, 0x001a, 0x8fe7, 0x001a, 0x001a, 0xc096, 0x9ee7, 0x91e7, 0x92e7, 0x001a, 0x001a, 0xc792, 0x001a, 0x001a, 0xde91, 0x9791, 0x001a, 0xa693, 0x001a, 0x90e7, 0x748b, 0x001a, 0x001a, 0x001a, 0x001a, 0x99e7, 0x001a, 0x96e7, 0xa3e7, 0xa793, 0x8092, 0x93e7, 0x001a, 0xfc92, 0x7293, 0x94e7, 0x98e7, 0x8090, 0x001a, 0x8794, 0xca92, 0x001a, 0x001a, 0xc090, 0x97e7, 0xac91, 0xa291, 0x95e7, 0xa788, 0x4198, 0x001a, 0x001a, 0x001a, 0x9ae7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf91, 0x001a, 0x001a, 0x548f, 0x6990, 0x001a, 0x001a, 0x9ce7, 0x9be7, 0x001a, 0xed88, 0x9de7, 0x001a, 0x001a, 0x4e95, 0x001a, 0xa5e7, 0x001a, 0x001a, 0xd993, 0x8b90, 0x001a, 0x001a, 0x7892, 0x001a, 0xf68b, 0x001a, 0xa4e7, 0x5697, 0x5e89, 0x001a, 0xd595, 0xdf89, 0x9fe7, 0xa0e7, 0xa1e7, 0xa2e7, 0xb993, 0x4292, 0xe188, 0xa6e7, 0x001a, 0xa7e7, 0xa1ea, 0x001a, 0x001a, 0xbb91, 0x001a, 0xa8e7, 0x001a, 0x9389, 0x6b91, 0x001a, 0xad8c, 0x001a, 0x7997, 0x001a, 0x99ee, 0xa9e7, 0x4b93, 0x001a, 0x001a, 0x001a, 0x9891, 0xd58e, 0xaae7, 0x001a, 0x001a, 0xade7, 0x001a, 0x001a, 0x858f, 0xabe7, 0x4a91, 0x4991, 0x001a, 0xe288, 0x001a, 0xc997, 0xafe7, 0x001a, 0xf094, 0xb1e7, 0xb0e7, 0xaee7, 0x84e2, 0xd28a, 0x001a, 0x001a, 0x8ee7, 0x001a, 0xb3e7, 0xb2e7, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e7, 0x001a, 0x5797, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf93, 0x001a, 0x001a, 0x4d96, 0x001a, 0xb5e7, 0x001a, 0xd78e, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e7, 0x001a, 0xb7e7, 0x001a, 0x001a, 0x001a, 0xb8e7, 0x001a, 0x001a, 0x4093, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe888, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x788d, 0x001a, 0x001a, 0x001a, 0x5998, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbce7, 0x001a, 0x001a, 0x9aee, 0x001a, 0x001a, 0x538c, 0xb9e7, 0x001a, 0xbae7, 0x001a, 0x001a, 0x001a, 0x9495, 0x001a, 0x001a, 0x001a, 0x001a, 0x738a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5897, 0x001a, 0xbd8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7393, 0x001a, 0x001a, 0x001a, 0x001a, 0xbde7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee7, 0x001a, 0x001a, 0x9cee, 0x001a, 0x001a, 0x001a, 0xbfe7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9dee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4193, 0x001a, 0x001a, 0xc1e7, 0x001a, 0xc0e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd193, 0xc2e7, 0x558f, 0xde8e, 0x7a94, 0x9192, 0x001a, 0x001a, 0x001a, 0xf08e, 0x001a, 0x8c90, 0x001a, 0xc3e7, 0x001a, 0xc4e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7c90, 0xc5e7, 0x001a, 0xc6e7, 0x001a, 0x001a, 0x001a, 0xc7e7, 0x8f97, 0x001a, 0x568f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9e7, 0xc8e7, 0x001a, 0x798d, 0x001a, 0x938d, 0x5f8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcce7, 0x001a, 0x001a, 0x001a, 0x001a, 0x868f, 0x001a, 0xcbe7, 0x001a, 0xcae7, 0x001a, 0xe791, 0x001a, 0x001a, 0xed8c, 0x001a, 0xc190, 0x001a, 0x001a, 0x001a, 0x001a, 0xae94, 0x001a, 0x001a, 0x001a, 0x001a, 0x588f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde7, 0x001a, 0xdd8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0e7, 0xcee7, 0x001a, 0x001a, 0x001a, 0xcfe7, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2e7, 0xd1e7, 0x001a, 0x001a, 0xf88f, 0x001a, 0xd3e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e7, 0xd5e7, 0x001a, 0x001a, 0x001a, 0x001a, 0xce94, 0xd18d, 0xdf8e, 0xd6e7, 0x001a, 0xd7e7, 0xa297, 0x648f, 0xec96, 0xca97, 0xd8e7, 0xe08b, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e7, 0x9fee, 0x4293, 0x001a, 0x9eee, 0xdce7, 0x988a, 0x6a90, 0xa0ee, 0xdae7, 0x001a, 0xdbe7, 0x001a, 0xde92, 0xa3ee, 0xa4ee, 0x7496, 0xfa8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1ee, 0xa2ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee7, 0xdfe7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde7, 0x001a, 0x001a, 0xe1e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5ee, 0x001a, 0x001a, 0x001a, 0xa7ee, 0x001a, 0x001a, 0xdd93, 0x628a, 0x001a, 0xa6ee, 0xe5e7, 0x001a, 0x001a, 0xe2e7, 0xe4e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ee8, 0x001a, 0x001a, 0xe3e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe997, 0x001a, 0x001a, 0xd88c, 0x001a, 0xaeee, 0xa8ee, 0x001a, 0xaaee, 0x001a, 0x001a, 0xede7, 0xa9ee, 0x001a, 0x001a, 0x001a, 0x5393, 0xe8e7, 0x001a, 0x001a, 0xebe7, 0xe9e7, 0x001a, 0xeee7, 0x001a, 0x001a, 0xabee, 0x001a, 0xefe7, 0xadee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7e7, 0x001a, 0xacee, 0xf4e7, 0x9489, 0x001a, 0x001a, 0xe6e7, 0x001a, 0x001a, 0x001a, 0xab94, 0x001a, 0xeae7, 0x001a, 0xde8f, 0xafee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7a8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1ee, 0xb2ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6796, 0x001a, 0xe28b, 0x001a, 0x001a, 0x658f, 0x001a, 0xba93, 0x001a, 0x001a, 0x43ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4c91, 0x001a, 0xf2e7, 0x001a, 0xece7, 0xf1e7, 0x001a, 0xc196, 0x001a, 0xb692, 0xf3e7, 0xf0e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4b91, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e7, 0x001a, 0xf6e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e7, 0xb6ee, 0x001a, 0x4e96, 0xbaee, 0x001a, 0xb8ee, 0x001a, 0xb4ee, 0x001a, 0xb5ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9ee, 0x001a, 0x001a, 0x001a, 0x9b8f, 0x001a, 0x001a, 0xb3ee, 0x001a, 0xf8e7, 0xdd95, 0x001a, 0x001a, 0x7389, 0x001a, 0x001a, 0x001a, 0x001a, 0x6595, 0x9292, 0x001a, 0x001a, 0x001a, 0x001a, 0x988b, 0x49ed, 0xfae7, 0xbdee, 0x7c8d, 0x001a, 0x001a, 0xc0ee, 0x001a, 0x001a, 0xc2ee, 0x001a, 0x001a, 0x001a, 0x4b8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e7, 0x8d90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8e90, 0x40e8, 0x42e8, 0x001a, 0x001a, 0xc1ee, 0xbfee, 0x001a, 0xf98f, 0xbcee, 0x41e8, 0x43e8, 0x001a, 0xbbee, 0xd18b, 0x001a, 0x6495, 0x001a, 0x001a, 0xe08e, 0x4298, 0x001a, 0xfce7, 0xf68d, 0x001a, 0x001a, 0x5e98, 0x001a, 0x001a, 0x45e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x44e8, 0x46e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe7, 0x001a, 0x001a, 0x001a, 0x42ed, 0x001a, 0x001a, 0xe793, 0x001a, 0x7493, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd592, 0x001a, 0x4be8, 0xc4ee, 0x001a, 0x001a, 0x001a, 0x6292, 0x47e8, 0x001a, 0x001a, 0x001a, 0x48e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4c8c, 0x001a, 0x4ae8, 0x001a, 0xc3ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xae8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x49e8, 0x001a, 0xdf8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x998a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4fe8, 0x001a, 0xbd8d, 0x9991, 0x001a, 0x001a, 0xc892, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5ee, 0x001a, 0x001a, 0x5a8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4de8, 0x4ee8, 0xc192, 0x001a, 0x4ce8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56e8, 0x001a, 0x001a, 0xc6ee, 0x001a, 0x59e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x58e8, 0x4c93, 0x001a, 0x001a, 0x001a, 0x001a, 0x51e8, 0x52e8, 0x55e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x57e8, 0xc7ee, 0x001a, 0x001a, 0xbe8b, 0x001a, 0x001a, 0x5ae8, 0x54e8, 0x001a, 0x001a, 0x53e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ee8, 0x001a, 0x001a, 0x001a, 0x5fe8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x60e8, 0x001a, 0x001a, 0x5de8, 0x5ce8, 0x001a, 0x001a, 0x001a, 0xe08f, 0xa893, 0x5be8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x64e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9ee, 0x001a, 0x001a, 0x001a, 0x63e8, 0x61e8, 0x001a, 0xf691, 0x001a, 0x65e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x66e8, 0x001a, 0x001a, 0x68e8, 0xcaee, 0x001a, 0x001a, 0xcbee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd38a, 0x67e8, 0xf896, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73e8, 0x69e8, 0x001a, 0x001a, 0x6ce8, 0x001a, 0x6ae8, 0x001a, 0x6be8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6de8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6fe8, 0x001a, 0x001a, 0x001a, 0x001a, 0x70e8, 0x001a, 0x71e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x74e8, 0x72e8, 0x75e8, 0x77e8, 0x001a, 0x76e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb792, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe596, 0x001a, 0x78e8, 0x4d91, 0x001a, 0x001a, 0x001a, 0x79e8, 0x001a, 0xc295, 0x7ae8, 0x4a8a, 0x001a, 0x001a, 0x001a, 0x5b89, 0x001a, 0xd58a, 0xccee, 0xd48a, 0x7be8, 0x001a, 0x7ce8, 0x001a, 0x7de8, 0x7ee8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x80e8, 0x001a, 0xd68a, 0x748a, 0x7d8d, 0xb494, 0x001a, 0x82e8, 0x81e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x83e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x7b89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x86e8, 0x001a, 0x85e8, 0x84e8, 0x001a, 0x87e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x8ae8, 0x001a, 0x001a, 0x001a, 0xc588, 0x001a, 0x001a, 0x88e8, 0x001a, 0x8ce8, 0x8be8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8ee8, 0x8de8, 0x8fe8, 0x001a, 0xac93, 0x001a, 0x001a, 0x001a, 0x90e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x91e8, 0x93e8, 0x001a, 0x001a, 0x92e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c95, 0x001a, 0x001a, 0x001a, 0x001a, 0x94e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x95e8, 0x001a, 0xe38d, 0x001a, 0x001a, 0x001a, 0x96e8, 0x97e8, 0x001a, 0x001a, 0x6896, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6a91, 0x001a, 0x001a, 0x001a, 0xa288, 0xc991, 0x001a, 0x98e8, 0x001a, 0x8d95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9be8, 0x99e8, 0x7e8d, 0x001a, 0x9ae8, 0xc08c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc395, 0x9de8, 0x9fe8, 0x9ee8, 0xa0e8, 0x001a, 0x001a, 0x4089, 0x7790, 0x9c8f, 0xd78a, 0xa1e8, 0x001a, 0x001a, 0x001a, 0x8694, 0x001a, 0xa3e8, 0x001a, 0x001a, 0x001a, 0x4189, 0x001a, 0xa2e8, 0xc292, 0x001a, 0xcb97, 0xa993, 0x9ce8, 0xa497, 0x001a, 0xaf8c, 0x001a, 0x001a, 0x7a97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf78b, 0xb297, 0x001a, 0x478c, 0x001a, 0xe091, 0x40e4, 0x001a, 0xa4e8, 0x4b8a, 0x8f90, 0x001a, 0x001a, 0x001a, 0x001a, 0x758a, 0xa6e8, 0x001a, 0xa7e8, 0xa5e8, 0x848c, 0x001a, 0xdb8d, 0xe18f, 0xcfee, 0x001a, 0x001a, 0x4289, 0x001a, 0x001a, 0xd797, 0x001a, 0x001a, 0x001a, 0xa9e8, 0xace7, 0x001a, 0xa8e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0ee, 0xace8, 0xaae8, 0xabe8, 0x001a, 0xade8, 0x001a, 0xaee8, 0xea97, 0xafe8, 0xb0e8, 0x001a, 0xc790, 0xb994, 0x001a, 0x001a, 0x001a, 0x9d90, 0xe58a, 0x001a, 0x001a, 0x5997, 0xeb89, 0x578f, 0xd98c, 0x001a, 0xb3e8, 0x001a, 0xb2e8, 0x938e, 0xb4e8, 0xb1e8, 0x001a, 0x001a, 0x478e, 0x001a, 0x001a, 0x001a, 0xb8e8, 0xabe5, 0x001a, 0x001a, 0xd499, 0x001a, 0x9790, 0xb6e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa397, 0xef93, 0x001a, 0x001a, 0x001a, 0x001a, 0x4a89, 0x001a, 0xe190, 0xb48e, 0x001a, 0x001a, 0x001a, 0x001a, 0xb595, 0x001a, 0x5f89, 0x001a, 0x001a, 0x001a, 0xeb97, 0x8b97, 0x001a, 0xb9e8, 0x001a, 0x6493, 0x001a, 0x001a, 0x001a, 0x001a, 0xf98e, 0x001a, 0x001a, 0x001a, 0xbae8, 0x001a, 0xbbe8, 0x6b90, 0xbce8, 0x001a, 0xec97, 0x001a, 0x001a, 0xb7e8, 0xbee8, 0xc0e8, 0x001a, 0xbfe8, 0x001a, 0xbde8, 0x001a, 0x001a, 0xc1e8, 0x001a, 0x001a, 0xc2e8, 0x001a, 0x001a, 0x9a91, 0x001a, 0xe089, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3e8, 0x001a, 0x001a, 0xb696, 0x001a, 0x001a, 0xc4e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5e8, 0x001a, 0x4998, 0xd1ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x509e, 0xc6e8, 0x001a, 0xd2ee, 0x001a, 0xc7e8, 0xc8e8, 0x001a, 0x001a, 0x001a, 0xcce8, 0xd3ee, 0xc9e8, 0x001a, 0xcae8, 0x001a, 0xcbe8, 0xcde8, 0x001a, 0x001a, 0x001a, 0xd4ee, 0x001a, 0xd5ee, 0x001a, 0xd6ee, 0xc290, 0x001a, 0x001a, 0xd7ee, 0xf596, 0x001a, 0x001a, 0xc390, 0x001a, 0x001a, 0xcee8, 0x001a, 0xf194, 0x001a, 0xcfe8, 0x72ea, 0xca96, 0x001a, 0xd0e8, 0x001a, 0xd1e8, 0x001a, 0xd2e8, 0x768a, 0x001a, 0xd4e8, 0x001a, 0x7890, 0x001a, 0x001a, 0x001a, 0xd5e8, 0x001a, 0x001a, 0x438c, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e8, 0xdae8, 0x001a, 0xd8e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e8, 0x001a, 0x001a, 0x938a, 0xd7e8, 0xdbe8, 0x001a, 0x001a, 0x001a, 0x001a, 0xdce8, 0x001a, 0xc688, 0x001a, 0xdde8, 0xdee8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe28f, 0x001a, 0x001a, 0x001a, 0xdfe8, 0x001a, 0x001a, 0x001a, 0x668b, 0x001a, 0x001a, 0xe2e8, 0x001a, 0x001a, 0xe1e8, 0x001a, 0xe0e8, 0x001a, 0x001a, 0x91e6, 0x001a, 0xda95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3e8, 0xe4e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e8, 0x001a, 0x001a, 0xe6e8, 0x001a, 0xe7e8, 0x001a, 0x001a, 0xe8e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd88a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeae8, 0x4294, 0x001a, 0x001a, 0x001a, 0xece8, 0xb989, 0x001a, 0xefe8, 0xeee8, 0x001a, 0x001a, 0x001a, 0x001a, 0x4389, 0x001a, 0x001a, 0x001a, 0xbf8b, 0x001a, 0xc595, 0xb892, 0xa08d, 0x001a, 0x808d, 0x878f, 0x001a, 0x7b90, 0x001a, 0x001a, 0x001a, 0xf1e8, 0x001a, 0x001a, 0xf0e8, 0x6197, 0xe68a, 0xd094, 0xda93, 0x001a, 0x001a, 0x001a, 0x9c90, 0xcc97, 0x001a, 0x7a8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e8, 0x001a, 0x001a, 0xf3e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6a96, 0xaa93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6f89, 0x001a, 0x001a, 0xf5e8, 0xf2e8, 0x001a, 0x001a, 0x7095, 0x8a97, 0xf6e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e8, 0xe891, 0x7a8a, 0x7b8a, 0xf8e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xe78a, 0xb08c, 0x001a, 0xd8ee, 0xe88a, 0x001a, 0x001a, 0x5e93, 0x001a, 0x001a, 0xde97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9ee, 0x001a, 0xda8c, 0x001a, 0x001a, 0x001a, 0xfae8, 0x001a, 0x001a, 0x001a, 0xfbe8, 0xfce8, 0x40e9, 0x001a, 0x42e9, 0x41e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9795, 0x001a, 0x43e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x44e9, 0x001a, 0x45e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x46e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x48e9, 0x47e9, 0x001a, 0x49e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf294, 0xcae3, 0x001a, 0x001a, 0x4890, 0x001a, 0x001a, 0x518b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ae9, 0x001a, 0x4be9, 0x001a, 0xaa99, 0x5a9f, 0xd194, 0x001a, 0x001a, 0xf988, 0x001a, 0xb988, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x948e, 0x4f96, 0xfc8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ce9, 0x001a, 0xdd96, 0x001a, 0x001a, 0x001a, 0x4de9, 0x7b97, 0x001a, 0x6189, 0x001a, 0x001a, 0x001a, 0x608e, 0x001a, 0x4ee9, 0xec89, 0x4fe9, 0x001a, 0x001a, 0x001a, 0x50e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x52e9, 0x53e9, 0x001a, 0x55e9, 0x51e9, 0x001a, 0x001a, 0x54e9, 0x001a, 0x001a, 0xdcee, 0xd98a, 0x001a, 0x001a, 0x001a, 0x56e9, 0x001a, 0x57e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x58e9, 0x59e9, 0x001a, 0x001a, 0x001a, 0x5ae9, 0x001a, 0x001a, 0x5ce9, 0x001a, 0x001a, 0x001a, 0x5be9, 0x001a, 0x5ee9, 0x61e9, 0x001a, 0x001a, 0x001a, 0x5de9, 0x5fe9, 0x60e9, 0x001a, 0x001a, 0x62e9, 0x001a, 0xc08b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf18e, 0x63e9, 0x64e9, 0x818d, 0x001a, 0x001a, 0x001a, 0x001a, 0xdeee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x65e9, 0x001a, 0x001a, 0x5d8a, 0x001a, 0x001a, 0x001a, 0x6e94, 0x66e9, 0x67e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x7992, 0xe993, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x68e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x9d94, 0x001a, 0x001a, 0xca91, 0x7789, 0xec8b, 0x001a, 0xed8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9392, 0x6de9, 0xee8b, 0x001a, 0x001a, 0xed89, 0x001a, 0x001a, 0x6ce9, 0x001a, 0x001a, 0x6ae9, 0x001a, 0x6be9, 0x001a, 0x69e9, 0x001a, 0x001a, 0x77e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ee9, 0x6fe9, 0x001a, 0x001a, 0x70e9, 0x71e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73e9, 0x001a, 0x001a, 0x72e9, 0x001a, 0x001a, 0x001a, 0x788f, 0x001a, 0x74e9, 0x001a, 0x001a, 0x001a, 0x76e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x528b, 0x75e9, 0x001a, 0x001a, 0x9b91, 0xb18c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x78e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcb91, 0x001a, 0x001a, 0x79e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xab93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x80e9, 0x001a, 0x7de9, 0x001a, 0x7ce9, 0x7ee9, 0x001a, 0x7be9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x82e9, 0xdfee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x81e9, 0x001a, 0x84e9, 0x001a, 0x001a, 0xc18b, 0x83e9, 0x001a, 0x001a, 0x001a, 0x85e9, 0x001a, 0x001a, 0x86e9, 0x001a, 0x88e9, 0x87e9, 0x001a, 0x001a, 0x001a, 0x89e9, 0x8be9, 0x8ae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9c8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x8ce9, 0x001a, 0x001a, 0x8de9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5b8a, 0x001a, 0x001a, 0x001a, 0x8ee9, 0x001a, 0x001a, 0x001a, 0x8fe9, 0x001a, 0x001a, 0x001a, 0x9190, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x90e9, 0x001a, 0x91e9, 0x001a, 0x92e9, 0x93e9, 0x001a, 0x001a, 0x001a, 0x828d, 0xe0ee, 0x001a, 0x001a, 0xe1ee, 0x001a, 0x94e9, 0x95e9, 0x001a, 0x001a, 0x96e9, 0x97e9, 0x001a, 0x001a, 0x98e9, 0x001a, 0x001a, 0x001a, 0xaf94, 0x9ae9, 0x001a, 0x4595, 0x9be9, 0x99e9, 0x001a, 0x9de9, 0x001a, 0x001a, 0x9ce9, 0x001a, 0x001a, 0x9ee9, 0x001a, 0x001a, 0x001a, 0x9fe9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa0e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1e9, 0x001a, 0xa2e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e9, 0x001a, 0x001a, 0xa4e9, 0xa5e9, 0x001a, 0xa6e9, 0x001a, 0xa7e9, 0xa8e9, 0xa9e9, 0xaae9, 0x001a, 0x001a, 0x001a, 0xabe9, 0xace9, 0x001a, 0x549f, 0xade9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6e2, 0x538b, 0x001a, 0x001a, 0x001a, 0x001a, 0x408a, 0xb08d, 0xafe9, 0xaee9, 0xa396, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1e9, 0xb2e9, 0xb0e9, 0x001a, 0xb3e9, 0x001a, 0x001a, 0x8296, 0x001a, 0x001a, 0x001a, 0xb4e9, 0x001a, 0x9b8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4498, 0x001a, 0x001a, 0xe3ee, 0x001a, 0xb5e9, 0xe2ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbc88, 0xe4ee, 0x001a, 0xb8e9, 0xa995, 0xb6e9, 0x001a, 0x001a, 0xb9e9, 0xbae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbe9, 0xbce9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbde9, 0x001a, 0x8e96, 0x4c8e, 0x001a, 0xf88d, 0x4e91, 0x001a, 0x001a, 0xe5ee, 0x001a, 0x001a, 0xbee9, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e9, 0x001a, 0xe6ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfe9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e9, 0x001a, 0x001a, 0xef8c, 0xc0e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3e9, 0x001a, 0xc4e9, 0xc5e9, 0x001a, 0xc9e9, 0x001a, 0x498e, 0x001a, 0x001a, 0x001a, 0x001a, 0xe291, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcae9, 0xc7e9, 0xc6e9, 0xc8e9, 0x001a, 0x001a, 0x001a, 0x7e8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcee9, 0xcde9, 0xcce9, 0x001a, 0x001a, 0xb188, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7ee, 0x001a, 0x001a, 0x001a, 0xd8e9, 0x001a, 0xd4e9, 0x001a, 0xd5e9, 0xd1e9, 0xd7e9, 0x001a, 0xd3e9, 0x828a, 0x001a, 0x001a, 0x6b98, 0x001a, 0xd6e9, 0xd2e9, 0xd0e9, 0xcfe9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde9, 0x001a, 0x001a, 0xdce9, 0xdbe9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6895, 0xd9e9, 0xf188, 0xdee9, 0x001a, 0xe0e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8f8a, 0xcbe9, 0x5689, 0x001a, 0x001a, 0xe2e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1e9, 0xdfe9, 0x4c92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9096, 0x001a, 0x001a, 0x001a, 0x001a, 0xd897, 0x001a, 0x001a, 0xe3e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6e9, 0x001a, 0xe7e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb992, 0x001a, 0xe8e9, 0x001a, 0xb594, 0x001a, 0xede9, 0xe9e9, 0x001a, 0x001a, 0x001a, 0xeae9, 0x001a, 0x001a, 0x5096, 0xc296, 0x001a, 0xce93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeee9, 0x001a, 0x001a, 0xefe9, 0xbc93, 0xece9, 0xebe9, 0x001a, 0x001a, 0x001a, 0x001a, 0xa889, 0x001a, 0x001a, 0x001a, 0xf7e9, 0x001a, 0x001a, 0xf6e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9589, 0x001a, 0x001a, 0x001a, 0xf4e9, 0x001a, 0x001a, 0x001a, 0xf3e9, 0x001a, 0x001a, 0xf1e9, 0x001a, 0x9b8a, 0x001a, 0xf0e9, 0xb08e, 0xa789, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x838d, 0x001a, 0x001a, 0xfae9, 0xf9e9, 0x001a, 0xf8e9, 0x001a, 0x001a, 0xf5e9, 0x001a, 0xfbe9, 0x001a, 0xfce9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x44ea, 0x43ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x45ea, 0x001a, 0x001a, 0x4c89, 0x40ea, 0x41ea, 0x001a, 0x948d, 0xb796, 0x001a, 0x001a, 0x42ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9ee, 0x5196, 0x001a, 0x001a, 0x4aea, 0xe8ee, 0x001a, 0x46ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4bea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x48ea, 0x001a, 0x47ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7b8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4cea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4dea, 0x001a, 0x001a, 0x001a, 0x001a, 0x4eea, 0x001a, 0x49ea, 0x001a, 0x001a, 0x001a, 0xf2e9, 0x001a, 0x001a, 0x4fea, 0x001a, 0xdf92, 0x001a, 0x001a, 0x001a, 0x53ea, 0x001a, 0x54ea, 0x52ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x51ea, 0x57ea, 0x001a, 0x50ea, 0x001a, 0x55ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56ea, 0x001a, 0x001a, 0x001a, 0x59ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x58ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5bea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5cea, 0x001a, 0x5dea, 0x001a, 0x001a, 0x6898, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5aea, 0xe991, 0xeb8d, 0x001a, 0x001a, 0x5eea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebee, 0x5fea, 0x60ea, 0x001a, 0x001a, 0x61ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62ea, 0x001a, 0x001a, 0xb28c, 0x63ea, 0x001a, 0x001a, 0x001a, 0x64ea, 0x001a, 0xad8e, 0x001a, 0x65ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x66ea, 0x001a, 0x001a, 0x67ea, 0x68ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x6bea, 0x69ea, 0x5b98, 0x001a, 0x6aea, 0x001a, 0xed97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6cea, 0x001a, 0xd997, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6dea, 0x9e94, 0x001a, 0x001a, 0x6eea, 0x70ea, 0x001a, 0x001a, 0x71ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6fea, 0x8d8d, 0xcb96, 0x8396, 0xf59b, 0x001a, 0x809f, 0x9b96, 0x001a, 0x001a, 0x001a, 0x001a, 0xa989, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73ea, 0x6f8b, 0x74ea, 0x75ea, 0x76ea, 0xecee, 0x958d, 0x001a, 0x77ea, 0x001a, 0x001a, 0x001a, 0xd2e0, 0xd996, 0x001a, 0xe191, 0x78ea, 0x7aea, 0x79ea, 0x001a, 0x7bea, 0x001a, 0x001a, 0x001a, 0x001a, 0x7cea, 0x001a, 0x001a, 0x7dea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7eea, 0x001a, 0x001a, 0x001a, 0x001a, 0x80ea, 0x001a, 0x81ea, 0x82ea, 0x001a, 0x83ea, 0x001a, 0x84ea, 0x85ea, 0x86ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x87ea, 0x88ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4393, 0x001a, 0x001a, 0x001a, 0x001a, 0xdb8c, 0x001a, 0x8aea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6c91, 0x8bea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8cea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4095, 0x001a, 0x001a, 0x8dea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8eea, 0x56e2, 0x001a, 0x001a, 0xd8e6, 0xebe8, 0x001a, 0x001a, 0x8fea, 0x001a, 0x90ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x92ea, 0x93ea, 0x94ea, 0xee97, 0x91ea, 0x001a, 0x001a, 0x95ea, 0x96ea, 0x001a, 0x001a, 0x98ea, 0x001a, 0x97ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9aea, 0x001a, 0x001a, 0x001a, 0x9bea, 0x99ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb497, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9cea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9dea, 0x73e2, 0x001a, 0x001a, 0x9eea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0xf900[ 320 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73ed, 0x7eed, 0x80ed, 0x95ed, 0xbced, 0xcced, 0xceed, 0xf9ed, 0x42ee, 0x59ee, 0x61ee, 0x62ee, 0x63ee, 0x65ee, 0x69ee, 0x6cee, 0x75ee, 0x81ee, 0x83ee, 0x84ee, 0x8dee, 0x95ee, 0x97ee, 0x98ee, 0x9bee, 0xb7ee, 0xbeee, 0xceee, 0xdaee, 0xdbee, 0xddee, 0xeaee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0xff00[ 256 ] = { 0x001a, 0x4981, 0xfcee, 0x9481, 0x9081, 0x9381, 0x9581, 0xfbee, 0x6981, 0x6a81, 0x9681, 0x7b81, 0x4381, 0x7c81, 0x4481, 0x5e81, 0x4f82, 0x5082, 0x5182, 0x5282, 0x5382, 0x5482, 0x5582, 0x5682, 0x5782, 0x5882, 0x4681, 0x4781, 0x8381, 0x8181, 0x8481, 0x4881, 0x9781, 0x6082, 0x6182, 0x6282, 0x6382, 0x6482, 0x6582, 0x6682, 0x6782, 0x6882, 0x6982, 0x6a82, 0x6b82, 0x6c82, 0x6d82, 0x6e82, 0x6f82, 0x7082, 0x7182, 0x7282, 0x7382, 0x7482, 0x7582, 0x7682, 0x7782, 0x7882, 0x7982, 0x6d81, 0x5f81, 0x6e81, 0x4f81, 0x5181, 0x4d81, 0x8182, 0x8282, 0x8382, 0x8482, 0x8582, 0x8682, 0x8782, 0x8882, 0x8982, 0x8a82, 0x8b82, 0x8c82, 0x8d82, 0x8e82, 0x8f82, 0x9082, 0x9182, 0x9282, 0x9382, 0x9482, 0x9582, 0x9682, 0x9782, 0x9882, 0x9982, 0x9a82, 0x6f81, 0x6281, 0x7081, 0x6081, 0x001a, 0x001a, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9181, 0x9281, 0xca81, 0x5081, 0xfaee, 0x8f81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; /* Determines the size of a byte stream character from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_932_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_932_unicode_character_size_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream character size.", function ); return( -1 ); } if( unicode_character < 0x0080 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x0380 ) && ( unicode_character < 0x0480 ) ) { unicode_character -= 0x0380; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0380[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2340 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x2440 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2440; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x2440[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3100 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x3200 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3200; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x3200[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fc0 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xf900 ) && ( unicode_character < 0xfa40 ) ) { unicode_character -= 0xf900; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0xf900[ unicode_character ]; } else if( ( unicode_character >= 0xff00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xff00; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0xff00[ unicode_character ]; } byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_character_size += 2; } else { *byte_stream_character_size += 1; } return( 1 ); } /* Copies a Unicode character from a byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_932_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_932_copy_from_byte_stream"; uint8_t additional_character = 0; uint8_t byte_stream_character = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } byte_stream_character = byte_stream[ *byte_stream_index ]; if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else if( ( byte_stream_character >= 0xa1 ) && ( byte_stream_character < 0xe0 ) ) { *unicode_character = 0xff61 + byte_stream_character - 0xa1; } else if( ( *byte_stream_index + 1 ) <= byte_stream_size ) { *byte_stream_index += 1; additional_character = byte_stream[ *byte_stream_index ]; if( byte_stream_character == 0x81 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xad ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8140[ additional_character ]; } else if( ( additional_character >= 0xb8 ) && ( additional_character < 0xc0 ) ) { additional_character -= 0xb8; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81b8[ additional_character ]; } else if( ( additional_character >= 0xc8 ) && ( additional_character < 0xcf ) ) { additional_character -= 0xc8; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81c8[ additional_character ]; } else if( ( additional_character >= 0xda ) && ( additional_character < 0xea ) ) { additional_character -= 0xda; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81da[ additional_character ]; } else if( ( additional_character >= 0xf0 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0xf0; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81f0[ additional_character ]; } else if( additional_character == 0xfc ) { *unicode_character = 0x25ef; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0x82 ) { if( ( additional_character >= 0x4f ) && ( additional_character < 0x59 ) ) { *unicode_character = 0xff10 - 0x4f + additional_character; } else if( ( additional_character >= 0x60 ) && ( additional_character < 0x7a ) ) { *unicode_character = 0xff21 - 0x60 + additional_character; } else if( ( additional_character >= 0x81 ) && ( additional_character < 0x9b ) ) { *unicode_character = 0xff41 - 0x81 + additional_character; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xf2 ) ) { *unicode_character = 0x3041 - 0x9f + additional_character; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0x83 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { *unicode_character = 0x30a1 - 0x40 + additional_character; } else if( ( additional_character >= 0x80 ) && ( additional_character < 0x97 ) ) { *unicode_character = 0x30e0 - 0x80 + additional_character; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xb0 ) ) { *unicode_character = 0x0391 - 0x9f + additional_character; } else if( ( additional_character >= 0xb0 ) && ( additional_character < 0xb7 ) ) { *unicode_character = 0x03a3 - 0xb0 + additional_character; } else if( ( additional_character >= 0xbf ) && ( additional_character < 0xd0 ) ) { *unicode_character = 0x03b1 - 0xbf + additional_character; } else if( ( additional_character >= 0xd0 ) && ( additional_character < 0xd7 ) ) { *unicode_character = 0x03c3 - 0xd0 + additional_character; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0x84 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x61 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8440[ additional_character ]; } else if( ( additional_character >= 0x70 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x70; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8470[ additional_character ]; } else if( ( additional_character >= 0x80 ) && ( additional_character < 0x92 ) ) { *unicode_character = 0x043e - 0x80 + additional_character; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xbf ) ) { additional_character -= 0x9f; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x849f[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0x87 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x54 ) ) { *unicode_character = 0x2460 - 0x40 + additional_character; } else if( ( additional_character >= 0x54 ) && ( additional_character < 0x5e ) ) { *unicode_character = 0x2160 - 0x54 + additional_character; } else if( ( additional_character >= 0x5f ) && ( additional_character < 0x76 ) ) { additional_character -= 0x5f; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x875f[ additional_character ]; } else if( additional_character == 0x7e ) { *unicode_character = 0x337b; } else if( ( additional_character >= 0x80 ) && ( additional_character < 0x9d ) ) { additional_character -= 0x80; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8780[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0x88 ) { if( ( additional_character >= 0x9f ) && ( additional_character < 0xfd ) ) { additional_character -= 0x9f; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x889f[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0x89 ) && ( byte_stream_character <= 0x97 ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xfd ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0x89: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8940[ additional_character ]; break; case 0x8a: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8a40[ additional_character ]; break; case 0x8b: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8b40[ additional_character ]; break; case 0x8c: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8c40[ additional_character ]; break; case 0x8d: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8d40[ additional_character ]; break; case 0x8e: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8e40[ additional_character ]; break; case 0x8f: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8f40[ additional_character ]; break; case 0x90: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9040[ additional_character ]; break; case 0x91: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9140[ additional_character ]; break; case 0x92: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9240[ additional_character ]; break; case 0x93: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9340[ additional_character ]; break; case 0x94: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9440[ additional_character ]; break; case 0x95: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9540[ additional_character ]; break; case 0x96: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9640[ additional_character ]; break; case 0x97: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9740[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0x98 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x73 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9840[ additional_character ]; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xfd ) ) { additional_character -= 0x9f; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x989f[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0x99 ) && ( byte_stream_character <= 0x9f ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xfd ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0x99: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9940[ additional_character ]; break; case 0x9a: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9a40[ additional_character ]; break; case 0x9b: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9b40[ additional_character ]; break; case 0x9c: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9c40[ additional_character ]; break; case 0x9d: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9d40[ additional_character ]; break; case 0x9e: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9e40[ additional_character ]; break; case 0x9f: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9f40[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xe0 ) && ( byte_stream_character <= 0xe9 ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xfd ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xe0: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe040[ additional_character ]; break; case 0xe1: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe140[ additional_character ]; break; case 0xe2: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe240[ additional_character ]; break; case 0xe3: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe340[ additional_character ]; break; case 0xe4: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe440[ additional_character ]; break; case 0xe5: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe540[ additional_character ]; break; case 0xe6: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe640[ additional_character ]; break; case 0xe7: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe740[ additional_character ]; break; case 0xe8: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe840[ additional_character ]; break; case 0xe9: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe940[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xea ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa5 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xea40[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xed ) && ( byte_stream_character <= 0xee ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xfd ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xed: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xed40[ additional_character ]; break; case 0xee: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xee40[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xfa ) && ( byte_stream_character <= 0xfb ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xfd ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xfa: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfa40[ additional_character ]; break; case 0xfb: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfb40[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xfc ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x4c ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfc40[ additional_character ]; } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } *byte_stream_index += 1; return( 1 ); } /* Copies a Unicode character to a byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_932_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_932_copy_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( unicode_character < 0x0080 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x0380 ) && ( unicode_character < 0x0480 ) ) { unicode_character -= 0x0380; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0380[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2340 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x2440 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2440; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x2440[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3100 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x3200 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3200; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x3200[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fc0 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xf900 ) && ( unicode_character < 0xfa40 ) ) { unicode_character -= 0xf900; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0xf900[ unicode_character ]; } else if( ( unicode_character >= 0xff00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xff00; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0xff00[ unicode_character ]; } byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_index += 1; byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); } *byte_stream_index += 1; return( 1 ); } libevt-20170120/libuna/libuna_utf8_stream.h0000664000175000017500000000566313040331677022571 0ustar00lordyestalordyesta00000000000000/* * UTF-8 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF8_STREAM_H ) #define _LIBUNA_UTF8_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_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 ) */ libevt-20170120/libuna/libuna_url_stream.h0000664000175000017500000000361313040331677022476 0ustar00lordyestalordyesta00000000000000/* * Percent or URL encoded stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_URL_STREAM_H ) #define _LIBUNA_URL_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_url_stream_size_from_byte_stream( uint8_t *byte_stream, size_t byte_stream_size, size_t *url_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_url_stream_copy_from_byte_stream( uint8_t *url_stream, size_t url_stream_size, uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_url_stream_size_to_byte_stream( uint8_t *url_stream, size_t url_stream_size, size_t *byte_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_url_stream_copy_to_byte_stream( uint8_t *url_stream, size_t url_stream_size, uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_URL_STREAM_H ) */ libevt-20170120/libuna/libuna_codepage_windows_949.h0000664000175000017500000000354713040331677024255 0ustar00lordyestalordyesta00000000000000/* * Windows 949 codepage (Korean) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_949_H ) #define _LIBUNA_CODEPAGE_WINDOWS_949_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_codepage_windows_949_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_codepage_windows_949_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ); LIBUNA_EXTERN \ 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 ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_8.c0000664000175000017500000000510713040331677023661 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-8 codepage (Hebrew) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_8.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-8 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_8_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0xfffd, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2017, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, 0x05e8, 0x05e9, 0x05ea, 0xfffd, 0xfffd, 0x200e, 0x200f, 0xfffd }; /* Unicode to ASCII character lookup table for ISO 8859-8 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xa0, 0x1a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0x1a, 0xbb, 0xbc, 0xbd, 0xbe, 0x1a }; const uint8_t libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x05d0[ 32 ] = { 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; libevt-20170120/libuna/libuna_types.h0000664000175000017500000000276313040331677021472 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_INTERNAL_TYPES_H ) #define _LIBUNA_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna * The definitions in are copied here * for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) /* Unicode character definitions */ typedef uint32_t libuna_unicode_character_t; /* UTF-8 character definitions */ typedef uint8_t libuna_utf8_character_t; /* UTF-16 character definitions */ typedef uint16_t libuna_utf16_character_t; /* UTF-32 character definitions */ typedef uint32_t libuna_utf32_character_t; #endif /* defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _LIBUNA_INTERNAL_TYPES_H ) */ libevt-20170120/libuna/libuna_codepage_windows_1252.h0000664000175000017500000000243313040331677024312 0ustar00lordyestalordyesta00000000000000/* * Windows 1252 codepage (Western European/Latin 1) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1252_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1252_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1252_byte_stream_to_unicode_base_0x80[ 32 ]; extern const uint8_t libuna_codepage_windows_1252_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1252_H ) */ libevt-20170120/libuna/libuna_codepage_windows_1250.c0000664000175000017500000001033513040331677024303 0ustar00lordyestalordyesta00000000000000/* * Windows 1250 codepage (Central European) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1250.h" /* Extended ASCII to Unicode character lookup table for Windows 1250 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1250_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0xfffd, 0x201a, 0xfffd, 0x201e, 0x2026, 0x2020, 0x2021, 0xfffd, 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0xfffd, 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a, 0x00a0, 0x02c7, 0x02d8, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b, 0x00b0, 0x00b1, 0x02db, 0x0142, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x0105, 0x015f, 0x00bb, 0x013d, 0x02dd, 0x013e, 0x017c, 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e, 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df, 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f, 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9 }; /* Unicode to ASCII character lookup table for Windows 1250 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x00a0[ 128 ] = { 0xa0, 0x1a, 0x1a, 0x1a, 0xa4, 0x1a, 0xa6, 0xa7, 0xa8, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0x1a, 0xb0, 0xb1, 0x1a, 0x1a, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0x1a, 0x1a, 0xbb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc1, 0xc2, 0x1a, 0xc4, 0x1a, 0x1a, 0xc7, 0x1a, 0xc9, 0x1a, 0xcb, 0x1a, 0xcd, 0xce, 0x1a, 0x1a, 0x1a, 0x1a, 0xd3, 0xd4, 0x1a, 0xd6, 0xd7, 0x1a, 0x1a, 0xda, 0x1a, 0xdc, 0xdd, 0x1a, 0xdf, 0x1a, 0xe1, 0xe2, 0x1a, 0xe4, 0x1a, 0x1a, 0xe7, 0x1a, 0xe9, 0x1a, 0xeb, 0x1a, 0xed, 0xee, 0x1a, 0x1a, 0x1a, 0x1a, 0xf3, 0xf4, 0x1a, 0xf6, 0xf7, 0x1a, 0x1a, 0xfa, 0x1a, 0xfc, 0xfd, 0x1a, 0x1a, 0x1a, 0x1a, 0xc3, 0xe3, 0xa5, 0xb9, 0xc6, 0xe6, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0xcf, 0xef, 0xd0, 0xf0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xca, 0xea, 0xcc, 0xec, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x0138[ 72 ] = { 0x1a, 0xc5, 0xe5, 0x1a, 0x1a, 0xbc, 0xbe, 0x1a, 0x1a, 0xa3, 0xb3, 0xd1, 0xf1, 0x1a, 0x1a, 0xd2, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd5, 0xf5, 0x1a, 0x1a, 0xc0, 0xe0, 0x1a, 0x1a, 0xd8, 0xf8, 0x8c, 0x9c, 0x1a, 0x1a, 0xaa, 0xba, 0x8a, 0x9a, 0xde, 0xfe, 0x8d, 0x9d, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd9, 0xf9, 0xdb, 0xfb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x8f, 0x9f, 0xaf, 0xbf, 0x8e, 0x9e, 0x1a }; const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x02d8[ 8 ] = { 0xa2, 0xff, 0x1a, 0xb2, 0x1a, 0xbd, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2030[ 16 ] = { 0x89, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x8b, 0x9b, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; libevt-20170120/libuna/libuna_utf16_string.c0000664000175000017500000022226613040331677022656 0ustar00lordyestalordyesta00000000000000/* * UTF-16 string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf16_string.h" /* Determines the size of an UTF-16 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, int codepage, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_byte_stream"; size_t byte_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; /* Check if the byte stream is terminated with a zero byte */ if( byte_stream[ byte_stream_size - 1 ] != 0 ) { *utf16_string_size += 1; } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } /* Determine how many UTF-16 character byte words are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-16 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_byte_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_byte_stream"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_byte_stream( utf16_string, utf16_string_size, &utf16_string_index, byte_stream, byte_stream_size, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_byte_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_byte_stream"; size_t byte_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } /* Check if the byte stream is terminated with zero bytes */ if( byte_stream[ byte_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character byte words */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; } return( 1 ); } /* Compares an UTF-16 string with a byte stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf16_string_compare_with_byte_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_byte_stream"; size_t byte_stream_index = 0; size_t utf16_string_index = 0; libuna_unicode_character_t utf16_unicode_character = 0; libuna_unicode_character_t byte_stream_unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } /* Check if the byte stream is terminated with zero bytes */ if( byte_stream[ byte_stream_size - 1 ] == 0 ) { byte_stream_size -= 1; } while( ( utf16_string_index < utf16_string_size ) && ( byte_stream_index < byte_stream_size ) ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &byte_stream_unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } if( utf16_unicode_character != byte_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf16_string_index != utf16_string_size ) || ( byte_stream_index != byte_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-16 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_utf7_stream( const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf7_stream"; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; /* Check if the UTF-7 stream is terminated with a zero byte */ if( utf7_stream[ utf7_stream_size - 1 ] != 0 ) { *utf16_string_size += 1; } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-16 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_utf7_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_utf7_stream"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_utf7_stream( utf16_string, utf16_string_size, &utf16_string_index, utf7_stream, utf7_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to UTF-7 stream to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_utf7_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf7_stream"; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; uint8_t zero_byte = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } /* Check if the UTF-7 stream is terminated with zero bytes */ if( utf7_stream[ utf7_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character bytes */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; } return( 1 ); } /* Compares an UTF-16 string with an UTF-7 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf16_string_compare_with_utf7_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_utf7_stream"; size_t utf16_string_index = 0; size_t utf7_stream_index = 0; libuna_unicode_character_t utf16_unicode_character = 0; libuna_unicode_character_t utf7_stream_unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } /* Check if the UTF-7 stream is terminated with zero bytes */ if( utf7_stream[ utf7_stream_size - 1 ] == 0 ) { utf7_stream_size -= 1; } while( ( utf16_string_index < utf16_string_size ) && ( utf7_stream_index < utf7_stream_size ) ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the UTF-7 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &utf7_stream_unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } if( utf16_unicode_character != utf7_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf16_string_index != utf16_string_size ) || ( utf7_stream_index != utf7_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-16 string from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-16 string from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_utf8( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_utf8"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_utf8( utf16_string, utf16_string_size, &utf16_string_index, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_utf8( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character bytes */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-16 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_utf8_stream( const uint8_t *utf8_stream, size_t utf8_stream_size, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf8_stream"; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } /* Check if the UTF-8 stream is terminated with a zero byte */ if( utf8_stream[ utf8_stream_size - 1 ] != 0 ) { *utf16_string_size += 1; } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-16 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_utf8_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_utf8_stream"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_utf8_stream( utf16_string, utf16_string_size, &utf16_string_index, utf8_stream, utf8_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to UTF-8 stream to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_utf8_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf8_stream"; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } /* Check if the UTF-8 stream is terminated with zero bytes */ if( utf8_stream[ utf8_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character bytes */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; } return( 1 ); } /* Compares an UTF-16 string with an UTF-8 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf16_string_compare_with_utf8_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_utf8_stream"; size_t utf16_string_index = 0; size_t utf8_stream_index = 0; libuna_unicode_character_t utf16_unicode_character = 0; libuna_unicode_character_t utf8_stream_unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } /* Check if the UTF-8 stream is terminated with zero bytes */ if( utf8_stream[ utf8_stream_size - 1 ] == 0 ) { utf8_stream_size -= 1; } while( ( utf16_string_index < utf16_string_size ) && ( utf8_stream_index < utf8_stream_size ) ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_stream_unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } if( utf16_unicode_character != utf8_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf16_string_index != utf16_string_size ) || ( utf8_stream_index != utf8_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-16 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_utf16_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf16_stream"; size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; int read_byte_order = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0x0ff ) && ( utf16_stream[ 1 ] == 0x0fe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0x0fe ) && ( utf16_stream[ 1 ] == 0x0ff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] != 0 ) || ( utf16_stream[ utf16_stream_size - 1 ] != 0 ) ) { *utf16_string_size += 1; } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } if( utf16_stream_index != utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_utf16_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_utf16_stream"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_utf16_stream( utf16_string, utf16_string_size, &utf16_string_index, utf16_stream, utf16_stream_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_utf16_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf16_stream"; size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; int read_byte_order = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0x0ff ) && ( utf16_stream[ 1 ] == 0x0fe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0x0fe ) && ( utf16_stream[ 1 ] == 0x0ff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] != 0 ) || ( utf16_stream[ utf16_stream_size - 1 ] != 0 ) ) { zero_byte = 1; } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character bytes */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } if( utf16_stream_index != utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } if( zero_byte != 0 ) { if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; } return( 1 ); } /* Compares an UTF-16 string with an UTF-16 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf16_string_compare_with_utf16_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_utf16_stream"; size_t utf16_stream_index = 0; size_t utf16_string_index = 0; libuna_unicode_character_t utf16_unicode_character = 0; libuna_unicode_character_t utf16_stream_unicode_character = 0; int read_byte_order = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0xfe ) && ( utf16_stream[ 1 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0xff ) && ( utf16_stream[ 1 ] == 0xfe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] == 0 ) && ( utf16_stream[ utf16_stream_size - 1 ] == 0 ) ) { utf16_stream_size -= 2; } while( ( utf16_string_index < utf16_string_size ) && ( utf16_stream_index < utf16_stream_size ) ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &utf16_stream_unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } if( utf16_unicode_character != utf16_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf16_string_index != utf16_string_size ) || ( utf16_stream_index != utf16_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-16 string from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-16 string from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_utf32( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_utf32"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_utf32( utf16_string, utf16_string_size, &utf16_string_index, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 string to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_utf32( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character bytes */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Compares an UTF-16 string with an UTF-32 string * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf16_string_compare_with_utf32( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_utf32"; size_t utf16_string_index = 0; size_t utf32_string_index = 0; libuna_unicode_character_t utf16_unicode_character = 0; libuna_unicode_character_t utf32_unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } if( utf32_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } while( ( utf16_string_index < utf16_string_size ) && ( utf32_string_index < utf32_string_size ) ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } if( utf16_unicode_character != utf32_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf16_string_index != utf16_string_size ) || ( utf32_string_index != utf32_string_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-16 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_utf32_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf32_stream"; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; int read_byte_order = 0; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 3 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 2 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 1 ] != 0 ) ) { *utf16_string_size += 1; } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } if( utf32_stream_index != utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_utf32_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_utf32_stream"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_utf32_stream( utf16_string, utf16_string_size, &utf16_string_index, utf32_stream, utf32_stream_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_utf32_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf32_stream"; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; int read_byte_order = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 3 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 2 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 1 ] != 0 ) ) { zero_byte = 1; } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character bytes */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } if( utf32_stream_index != utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } if( zero_byte != 0 ) { if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; } return( 1 ); } /* Compares an UTF-16 string with an UTF-32 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf16_string_compare_with_utf32_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_utf32_stream"; size_t utf16_string_index = 0; size_t utf32_stream_index = 0; libuna_unicode_character_t utf16_unicode_character = 0; libuna_unicode_character_t utf32_stream_unicode_character = 0; int read_byte_order = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 3 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 2 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 1 ] == 0 ) ) { utf32_stream_size -= 1; } while( ( utf16_string_index < utf16_string_size ) && ( utf32_stream_index < utf32_stream_size ) ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &utf32_stream_unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } if( utf16_unicode_character != utf32_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf16_string_index != utf16_string_size ) || ( utf32_stream_index != utf32_stream_size ) ) { return( 0 ); } return( 1 ); } libevt-20170120/libuna/libuna_codepage_iso_8859_5.h0000664000175000017500000000237713040331677023671 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-5 codepage (Cyrillic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_5_H ) #define _LIBUNA_CODEPAGE_ISO_8859_5_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_5_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_5_unicode_to_byte_stream_base_0x0400[ 96 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_5_H ) */ libevt-20170120/libuna/libuna_extern.h0000664000175000017500000000251513040331677021626 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_INTERNAL_EXTERN_H ) #define _LIBUNA_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if !defined( HAVE_LOCAL_LIBUNA ) /* If libtool DLL support is enabled set LIBUNA_DLL_EXPORT * before including libuna/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBUNA_DLL_EXPORT #endif #include #else #define LIBUNA_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _LIBUNA_INTERNAL_EXTERN_H ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_4.h0000664000175000017500000000253013040331677023657 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-4 codepage (Baltic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_4_H ) #define _LIBUNA_CODEPAGE_ISO_8859_4_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_4_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x00a0[ 184 ]; extern const uint8_t libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x0160[ 32 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_4_H ) */ libevt-20170120/libuna/libuna_byte_stream.h0000664000175000017500000000555313040331677022644 0ustar00lordyestalordyesta00000000000000/* * Byte stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_BYTE_STREAM_H ) #define _LIBUNA_BYTE_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_byte_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, int codepage, size_t *byte_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_byte_stream_copy_from_utf8( uint8_t *byte_stream, size_t byte_stream_size, int codepage, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_byte_stream_copy_to_utf8 is implemented by * libuna_utf8_string_copy_from_byte_stream */ LIBUNA_EXTERN \ int libuna_byte_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, int codepage, size_t *byte_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_byte_stream_copy_from_utf16( uint8_t *byte_stream, size_t byte_stream_size, int codepage, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* The functionality for libuna_byte_stream_copy_to_utf16 is implemented by * libuna_utf16_string_copy_from_byte_stream */ LIBUNA_EXTERN \ int libuna_byte_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, int codepage, size_t *byte_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_byte_stream_copy_from_utf32( uint8_t *byte_stream, size_t byte_stream_size, int codepage, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); /* The functionality for libuna_byte_stream_copy_to_utf32 is implemented by * libuna_utf32_string_copy_from_byte_stream */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_BYTE_STREAM_H ) */ libevt-20170120/libuna/libuna_utf16_string.h0000664000175000017500000002136313040331677022656 0ustar00lordyestalordyesta00000000000000/* * UTF-16 string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF16_STRING_H ) #define _LIBUNA_UTF16_STRING_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_utf16_string_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, int codepage, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_byte_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_byte_stream is implemented by * libuna_byte_stream_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_byte_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_compare_with_byte_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_size_from_utf7_stream( const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_utf7_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_utf7_stream is implemented by * libuna_utf7_stream_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_utf7_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_compare_with_utf7_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_utf8( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_utf8 is implemented by * libuna_utf8_string_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_utf8( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_compare_with_utf8 is implemented by * libuna_utf8_string_compare_with_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_size_from_utf8_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_utf8_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_utf8_stream is implemented by * libuna_utf8_stream_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_utf8_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_compare_with_utf8_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_size_from_utf16_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_utf16_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_utf16_stream is implemented by * libuna_utf16_stream_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_utf16_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_compare_with_utf16_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_utf32( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_utf32 is implemented by * libuna_utf32_string_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_utf32( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_compare_with_utf32( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_size_from_utf32_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_utf32_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_utf32_stream is implemented by * libuna_utf32_stream_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_utf32_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_compare_with_utf32_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_UTF16_STRING_H ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_4.c0000664000175000017500000000675313040331677023665 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-4 codepage (Baltic) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_4.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-4 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_4_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7, 0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af, 0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7, 0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b, 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a, 0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df, 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b, 0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9 }; /* Unicode to ASCII character lookup table for ISO 8859-4 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x00a0[ 184 ] = { 0xa0, 0x1a, 0x1a, 0x1a, 0xa4, 0x1a, 0x1a, 0xa7, 0xa8, 0x1a, 0x1a, 0x1a, 0x1a, 0xad, 0x1a, 0xaf, 0xb0, 0x1a, 0x1a, 0x1a, 0xb4, 0x1a, 0x1a, 0x1a, 0xb8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0x1a, 0x1a, 0xc9, 0x1a, 0xcb, 0x1a, 0xcd, 0xce, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0x1a, 0xda, 0xdb, 0xdc, 0x1a, 0x1a, 0xdf, 0x1a, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0x1a, 0x1a, 0xe9, 0x1a, 0xeb, 0x1a, 0xed, 0xee, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0x1a, 0xfa, 0xfb, 0xfc, 0x1a, 0x1a, 0x1a, 0xc0, 0xe0, 0x1a, 0x1a, 0xa1, 0xb1, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0x1a, 0x1a, 0xd0, 0xf0, 0xaa, 0xba, 0x1a, 0x1a, 0xcc, 0xec, 0xca, 0xea, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xab, 0xbb, 0x1a, 0x1a, 0x1a, 0x1a, 0xa5, 0xb5, 0xcf, 0xef, 0x1a, 0x1a, 0xc7, 0xe7, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd3, 0xf3, 0xa2, 0x1a, 0x1a, 0xa6, 0xb6, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd1, 0xf1, 0x1a, 0x1a, 0x1a, 0xbd, 0xbf, 0xd2, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xa3, 0xb3 }; const uint8_t libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x0160[ 32 ] = { 0xa9, 0xb9, 0x1a, 0x1a, 0x1a, 0x1a, 0xac, 0xbc, 0xdd, 0xfd, 0xde, 0xfe, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd9, 0xf9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xae, 0xbe, 0x1a }; libevt-20170120/libuna/libuna_codepage_iso_8859_10.c0000664000175000017500000000623313040331677023733 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-10 codepage (Nordic) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_10.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-10 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_10_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x0128, 0x0136, 0x00a7, 0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a, 0x00b0, 0x0105, 0x0113, 0x0123, 0x012b, 0x0129, 0x0137, 0x00b7, 0x013c, 0x0111, 0x0161, 0x0167, 0x017e, 0x2015, 0x016b, 0x014b, 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x00cf, 0x00d0, 0x0145, 0x014c, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0168, 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x00ef, 0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169, 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138 }; /* Unicode to ASCII character lookup table for ISO 8859-10 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x00c0[ 144 ] = { 0x1a, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0x1a, 0x1a, 0xc9, 0x1a, 0xcb, 0x1a, 0xcd, 0xce, 0xcf, 0xd0, 0x1a, 0x1a, 0xd3, 0xd4, 0xd5, 0xd6, 0x1a, 0xd8, 0x1a, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0x1a, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0x1a, 0x1a, 0xe9, 0x1a, 0xeb, 0x1a, 0xed, 0xee, 0xef, 0xf0, 0x1a, 0x1a, 0xf3, 0xf4, 0xf5, 0xf6, 0x1a, 0xf8, 0x1a, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x1a, 0xc0, 0xe0, 0x1a, 0x1a, 0xa1, 0xb1, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0x1a, 0x1a, 0xa9, 0xb9, 0xa2, 0xb2, 0x1a, 0x1a, 0xcc, 0xec, 0xca, 0xea, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xa3, 0xb3, 0x1a, 0x1a, 0x1a, 0x1a, 0xa5, 0xb5, 0xa4, 0xb4, 0x1a, 0x1a, 0xc7, 0xe7, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xa6, 0xb6, 0xff, 0x1a, 0x1a, 0xa8, 0xb8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd1, 0xf1, 0x1a, 0x1a, 0x1a, 0xaf, 0xbf, 0xd2, 0xf2, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x0160[ 16 ] = { 0xaa, 0xba, 0x1a, 0x1a, 0x1a, 0x1a, 0xab, 0xbb, 0xd7, 0xf7, 0xae, 0xbe, 0x1a, 0x1a, 0x1a, 0x1a }; libevt-20170120/libuna/Makefile.in0000664000175000017500000012412313040342660020655 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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_windows_874.c \ libuna_codepage_windows_874.h libuna_codepage_windows_932.c \ libuna_codepage_windows_932.h libuna_codepage_windows_936.c \ libuna_codepage_windows_936.h libuna_codepage_windows_949.c \ libuna_codepage_windows_949.h libuna_codepage_windows_950.c \ libuna_codepage_windows_950.h libuna_codepage_windows_1250.c \ libuna_codepage_windows_1250.h libuna_codepage_windows_1251.c \ libuna_codepage_windows_1251.h libuna_codepage_windows_1252.c \ libuna_codepage_windows_1252.h libuna_codepage_windows_1253.c \ libuna_codepage_windows_1253.h libuna_codepage_windows_1254.c \ libuna_codepage_windows_1254.h libuna_codepage_windows_1255.c \ libuna_codepage_windows_1255.h libuna_codepage_windows_1256.c \ libuna_codepage_windows_1256.h libuna_codepage_windows_1257.c \ libuna_codepage_windows_1257.h libuna_codepage_windows_1258.c \ libuna_codepage_windows_1258.h libuna_definitions.h \ libuna_error.c libuna_error.h libuna_extern.h libuna_inline.h \ libuna_libcerror.h libuna_support.c libuna_support.h \ libuna_types.h libuna_unicode_character.c \ libuna_unicode_character.h libuna_unused.h libuna_url_stream.c \ libuna_url_stream.h libuna_utf16_stream.c \ libuna_utf16_stream.h libuna_utf16_string.c \ libuna_utf16_string.h libuna_utf32_stream.c \ libuna_utf32_stream.h libuna_utf32_string.c \ libuna_utf32_string.h libuna_utf7_stream.c \ libuna_utf7_stream.h libuna_utf8_stream.c libuna_utf8_stream.h \ libuna_utf8_string.c libuna_utf8_string.h @HAVE_LOCAL_LIBUNA_TRUE@am_libuna_la_OBJECTS = \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_base16_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_base32_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_base64_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_byte_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_2.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_3.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_4.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_5.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_6.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_7.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_8.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_9.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_10.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_13.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_14.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_15.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_16.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_koi8_r.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_koi8_u.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_874.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_932.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_936.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_949.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_950.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1250.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1251.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1252.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1253.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1254.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1255.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1256.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1257.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1258.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_error.lo libuna_support.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_unicode_character.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_url_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf16_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf16_string.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf32_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf32_string.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf7_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf8_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf8_string.lo libuna_la_OBJECTS = $(am_libuna_la_OBJECTS) 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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBUNA_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBUNA_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBUNA_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBUNA_TRUE@ @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_windows_874.c libuna_codepage_windows_874.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_932.c libuna_codepage_windows_932.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_936.c libuna_codepage_windows_936.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_949.c libuna_codepage_windows_949.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_950.c libuna_codepage_windows_950.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1250.c libuna_codepage_windows_1250.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1251.c libuna_codepage_windows_1251.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1252.c libuna_codepage_windows_1252.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1253.c libuna_codepage_windows_1253.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1254.c libuna_codepage_windows_1254.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1255.c libuna_codepage_windows_1255.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1256.c libuna_codepage_windows_1256.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1257.c libuna_codepage_windows_1257.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1258.c libuna_codepage_windows_1258.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_definitions.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_error.c libuna_error.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_extern.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_inline.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_libcerror.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_support.c libuna_support.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_types.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_unicode_character.c libuna_unicode_character.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_unused.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_url_stream.c libuna_url_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf16_stream.c libuna_utf16_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf16_string.c libuna_utf16_string.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf32_stream.c libuna_utf32_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf32_string.c libuna_utf32_string.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf7_stream.c libuna_utf7_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf8_stream.c libuna_utf8_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf8_string.c libuna_utf8_string.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libuna/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libuna/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_base32_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_base64_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_byte_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_13.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_14.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_15.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_7.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_koi8_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_koi8_u.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1250.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1251.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1252.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1253.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1254.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1255.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1256.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1257.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1258.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_874.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_932.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_936.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_949.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_950.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_unicode_character.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_url_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf16_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf16_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf32_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf32_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf7_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf8_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf8_string.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libuna ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libuna_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libuna/libuna_utf7_stream.h0000664000175000017500000000537213040331677022565 0ustar00lordyestalordyesta00000000000000/* * UTF-7 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF7_STREAM_H ) #define _LIBUNA_UTF7_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_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 ) */ libevt-20170120/libuna/libuna_base32_stream.h0000664000175000017500000000717213040331677022757 0ustar00lordyestalordyesta00000000000000/* * Base32 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_BASE32_STREAM_H ) #define _LIBUNA_BASE32_STREAM_H #include #include #include "libuna_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 ) */ libevt-20170120/libuna/libuna_utf16_stream.c0000664000175000017500000004350713040331677022642 0ustar00lordyestalordyesta00000000000000/* * UTF-16 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf16_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"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream size.", function ); return( -1 ); } /* Add the byte order mark */ *utf16_stream_size = 1; while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } /* Convert the number of characters into bytes */ *utf16_stream_size *= 2; return( 1 ); } /* Copies an UTF-16 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf16_stream_copy_from_utf8( uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_stream_copy_from_utf8"; size_t utf16_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf16_stream_copy_byte_order_mark( utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-16 byte order mark.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 stream bytes */ if( libuna_unicode_character_copy_to_utf16_stream( unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16 stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-16 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf16_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_stream_size_from_utf16"; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream size.", function ); return( -1 ); } /* Add the byte order mark * Assumes the UTF-16 string is santized */ *utf16_stream_size = 1 + utf16_string_size; /* Convert the number of characters into bytes */ *utf16_stream_size *= 2; return( 1 ); } /* Copies an UTF-16 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf16_stream_copy_from_utf16( uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_stream_copy_from_utf16"; size_t utf16_stream_index = 0; size_t utf16_string_index = 0; libuna_utf16_character_t utf16_character = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf16_stream_copy_byte_order_mark( utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-16 byte order mark.", function ); return( -1 ); } /* Assumes the UTF-16 string is santized */ while( utf16_string_index < utf16_string_size ) { if( ( utf16_stream_index + 2 ) > utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 stream too small.", function ); return( -1 ); } utf16_character = utf16_string[ utf16_string_index++ ]; if( byte_order == LIBUNA_ENDIAN_BIG ) { utf16_stream[ utf16_stream_index + 1 ] = (uint8_t) ( utf16_character & 0xff ); utf16_character >>= 8; utf16_stream[ utf16_stream_index ] = (uint8_t) ( utf16_character & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_stream[ utf16_stream_index ] = (uint8_t) ( utf16_character & 0xff ); utf16_character >>= 8; utf16_stream[ utf16_stream_index + 1 ] = (uint8_t) ( utf16_character & 0xff ); } utf16_stream_index += 2; } return( 1 ); } /* Determines the size of an UTF-16 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf16_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf16_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_stream_size_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream size.", function ); return( -1 ); } /* Add the byte order mark */ *utf16_stream_size += 1; while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } /* Convert the number of characters into bytes */ *utf16_stream_size *= 2; return( 1 ); } /* Copies an UTF-16 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf16_stream_copy_from_utf32( uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_stream_copy_from_utf32"; size_t utf16_stream_index = 0; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf16_stream_copy_byte_order_mark( utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-16 byte order mark.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 stream bytes */ if( libuna_unicode_character_copy_to_utf16_stream( unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16 stream.", function ); return( -1 ); } } return( 1 ); } libevt-20170120/libuna/libuna_utf7_stream.c0000664000175000017500000003604113040331677022555 0ustar00lordyestalordyesta00000000000000/* * UTF-7 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf7_stream.h" /* Determines the size of an UTF-7 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf7_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf7_stream_size_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream size.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Determine how many UTF-7 character bytes are required */ if( libuna_unicode_character_size_to_utf7_stream( unicode_character, utf7_stream_size, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-7.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-7 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf7_stream_copy_from_utf8( uint8_t *utf7_stream, size_t utf7_stream_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf7_stream_copy_from_utf8"; size_t utf7_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-7 stream bytes */ if( libuna_unicode_character_copy_to_utf7_stream( unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-7 stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-7 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf7_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf7_stream_size_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream size.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Determine how many UTF-7 character bytes are required */ if( libuna_unicode_character_size_to_utf7_stream( unicode_character, utf7_stream_size, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-7.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-7 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf7_stream_copy_from_utf16( uint8_t *utf7_stream, size_t utf7_stream_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf7_stream_copy_from_utf16"; size_t utf16_string_index = 0; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-7 stream bytes */ if( libuna_unicode_character_copy_to_utf7_stream( unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-7 stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-7 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf7_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf7_stream_size_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream size.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Determine how many UTF-7 character bytes are required */ if( libuna_unicode_character_size_to_utf7_stream( unicode_character, utf7_stream_size, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-7.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-7 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf7_stream_copy_from_utf32( uint8_t *utf7_stream, size_t utf7_stream_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf7_stream_copy_from_utf32"; size_t utf32_string_index = 0; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the Unicode character into UTF-7 character bytes */ if( libuna_unicode_character_copy_to_utf7_stream( unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-7 stream.", function ); return( -1 ); } } return( 1 ); } libevt-20170120/libuna/libuna_support.h0000664000175000017500000000232413040331677022033 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_SUPPORT_H ) #define _LIBUNA_SUPPORT_H #include #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBUNA ) LIBUNA_EXTERN \ const char *libuna_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_SUPPORT_H ) */ libevt-20170120/libuna/libuna_utf32_stream.h0000664000175000017500000000604413040331677022640 0ustar00lordyestalordyesta00000000000000/* * UTF-32 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF32_STREAM_H ) #define _LIBUNA_UTF32_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_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 ) */ libevt-20170120/libuna/libuna_inline.h0000664000175000017500000000226513013521245021571 0ustar00lordyestalordyesta00000000000000/* * The internal inline definition * * Copyright (C) 2008-2016, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_INTERNAL_INLINE_H ) #define _LIBUNA_INTERNAL_INLINE_H #include #if defined( _MSC_VER ) #define LIBUNA_INLINE _inline #elif defined( __BORLANDC__ ) || defined( __clang__ ) || ( defined( __GNUC__ ) && __GNUC__ >= 5 ) #define LIBUNA_INLINE /* inline */ #else #define LIBUNA_INLINE inline #endif #endif /* !defined( _LIBUNA_INTERNAL_INLINE_H ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_3.c0000664000175000017500000000641113040331677023653 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-3 codepage (Latin 3) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_3.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-3 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_3_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, 0xfffd, 0x0124, 0x00a7, 0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, 0xfffd, 0x017b, 0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7, 0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd, 0xfffd, 0x017c, 0x00c0, 0x00c1, 0x00c2, 0xfffd, 0x00c4, 0x010a, 0x0108, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0xfffd, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7, 0x011c, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df, 0x00e0, 0x00e1, 0x00e2, 0xfffd, 0x00e4, 0x010b, 0x0109, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 0xfffd, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7, 0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9 }; /* Unicode to ASCII character lookup table for ISO 8859-3 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x00a0[ 96 ] = { 0xa0, 0x1a, 0x1a, 0xa3, 0xa4, 0x1a, 0x1a, 0xa7, 0xa8, 0x1a, 0x1a, 0x1a, 0x1a, 0xad, 0x1a, 0x1a, 0xb0, 0x1a, 0xb2, 0xb3, 0xb4, 0xb5, 0x1a, 0xb7, 0xb8, 0x1a, 0x1a, 0x1a, 0x1a, 0xbd, 0x1a, 0x1a, 0xc0, 0xc1, 0xc2, 0x1a, 0xc4, 0x1a, 0x1a, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0x1a, 0xd1, 0xd2, 0xd3, 0xd4, 0x1a, 0xd6, 0xd7, 0x1a, 0xd9, 0xda, 0xdb, 0xdc, 0x1a, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0x1a, 0xe4, 0x1a, 0x1a, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x1a, 0xf1, 0xf2, 0xf3, 0xf4, 0x1a, 0xf6, 0xf7, 0x1a, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0108[ 8 ] = { 0xc6, 0xe6, 0xc5, 0xe5, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0118[ 16 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xd8, 0xf8, 0xab, 0xbb, 0xd5, 0xf5, 0x1a, 0x1a, 0xa6, 0xb6, 0xa1, 0xb1 }; const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0130[ 8 ] = { 0xa9, 0xb9, 0x1a, 0x1a, 0xac, 0xbc, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0158[ 8 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xde, 0xfe, 0xaa, 0xba }; libevt-20170120/libuna/libuna_definitions.h0000664000175000017500000003165713040331677022645 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_INTERNAL_DEFINITIONS_H ) #define _LIBUNA_INTERNAL_DEFINITIONS_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if !defined( HAVE_LOCAL_LIBUNA ) #include /* The definitions in are copied here * for local use of libuna */ #else #include #define LIBUNA_VERSION 20170112 /* The libuna version string */ #define LIBUNA_VERSION_STRING "20170112" /* 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_OEM_437 = 437, LIBUNA_CODEPAGE_OEM_720 = 720, LIBUNA_CODEPAGE_OEM_737 = 737, LIBUNA_CODEPAGE_OEM_775 = 775, LIBUNA_CODEPAGE_OEM_850 = 850, LIBUNA_CODEPAGE_OEM_852 = 852, LIBUNA_CODEPAGE_OEM_855 = 855, LIBUNA_CODEPAGE_OEM_857 = 857, LIBUNA_CODEPAGE_OEM_858 = 858, LIBUNA_CODEPAGE_OEM_862 = 862, LIBUNA_CODEPAGE_OEM_866 = 866, LIBUNA_CODEPAGE_WINDOWS_874 = 874, LIBUNA_CODEPAGE_WINDOWS_932 = 932, LIBUNA_CODEPAGE_WINDOWS_936 = 936, LIBUNA_CODEPAGE_WINDOWS_949 = 949, LIBUNA_CODEPAGE_WINDOWS_950 = 950, LIBUNA_CODEPAGE_WINDOWS_1250 = 1250, LIBUNA_CODEPAGE_WINDOWS_1251 = 1251, LIBUNA_CODEPAGE_WINDOWS_1252 = 1252, LIBUNA_CODEPAGE_WINDOWS_1253 = 1253, LIBUNA_CODEPAGE_WINDOWS_1254 = 1254, LIBUNA_CODEPAGE_WINDOWS_1255 = 1255, LIBUNA_CODEPAGE_WINDOWS_1256 = 1256, LIBUNA_CODEPAGE_WINDOWS_1257 = 1257, LIBUNA_CODEPAGE_WINDOWS_1258 = 1258 }; #define LIBUNA_CODEPAGE_US_ASCII LIBUNA_CODEPAGE_ASCII #define LIBUNA_CODEPAGE_ISO_WESTERN_EUROPEAN LIBUNA_CODEPAGE_ISO_8859_1 #define LIBUNA_CODEPAGE_ISO_CENTRAL_EUROPEAN LIBUNA_CODEPAGE_ISO_8859_2 #define LIBUNA_CODEPAGE_ISO_SOUTH_EUROPEAN LIBUNA_CODEPAGE_ISO_8859_3 #define LIBUNA_CODEPAGE_ISO_NORTH_EUROPEAN LIBUNA_CODEPAGE_ISO_8859_4 #define LIBUNA_CODEPAGE_ISO_CYRILLIC LIBUNA_CODEPAGE_ISO_8859_5 #define LIBUNA_CODEPAGE_ISO_ARABIC LIBUNA_CODEPAGE_ISO_8859_6 #define LIBUNA_CODEPAGE_ISO_GREEK LIBUNA_CODEPAGE_ISO_8859_7 #define LIBUNA_CODEPAGE_ISO_HEBREW LIBUNA_CODEPAGE_ISO_8859_8 #define LIBUNA_CODEPAGE_ISO_TURKISH LIBUNA_CODEPAGE_ISO_8859_9 #define LIBUNA_CODEPAGE_ISO_NORDIC LIBUNA_CODEPAGE_ISO_8859_10 #define LIBUNA_CODEPAGE_ISO_THAI LIBUNA_CODEPAGE_ISO_8859_11 #define LIBUNA_CODEPAGE_ISO_BALTIC LIBUNA_CODEPAGE_ISO_8859_13 #define LIBUNA_CODEPAGE_ISO_CELTIC LIBUNA_CODEPAGE_ISO_8859_14 #define LIBUNA_CODEPAGE_ISO_LATIN_1 LIBUNA_CODEPAGE_ISO_8859_1 #define LIBUNA_CODEPAGE_ISO_LATIN_2 LIBUNA_CODEPAGE_ISO_8859_2 #define LIBUNA_CODEPAGE_ISO_LATIN_3 LIBUNA_CODEPAGE_ISO_8859_3 #define LIBUNA_CODEPAGE_ISO_LATIN_4 LIBUNA_CODEPAGE_ISO_8859_4 #define LIBUNA_CODEPAGE_ISO_LATIN_5 LIBUNA_CODEPAGE_ISO_8859_9 #define LIBUNA_CODEPAGE_ISO_LATIN_6 LIBUNA_CODEPAGE_ISO_8859_10 #define LIBUNA_CODEPAGE_ISO_LATIN_7 LIBUNA_CODEPAGE_ISO_8859_13 #define LIBUNA_CODEPAGE_ISO_LATIN_8 LIBUNA_CODEPAGE_ISO_8859_14 #define LIBUNA_CODEPAGE_ISO_LATIN_9 LIBUNA_CODEPAGE_ISO_8859_15 #define LIBUNA_CODEPAGE_ISO_LATIN_10 LIBUNA_CODEPAGE_ISO_8859_16 #define LIBUNA_CODEPAGE_KOI8_RUSSIAN LIBUNA_CODEPAGE_KOI8_R #define LIBUNA_CODEPAGE_KOI8_UKRAINIAN LIBUNA_CODEPAGE_KOI8_U #define LIBUNA_CODEPAGE_OEM_874 LIBUNA_CODEPAGE_WINDOWS_874 #define LIBUNA_CODEPAGE_OEM_932 LIBUNA_CODEPAGE_WINDOWS_932 #define LIBUNA_CODEPAGE_OEM_936 LIBUNA_CODEPAGE_WINDOWS_936 #define LIBUNA_CODEPAGE_OEM_949 LIBUNA_CODEPAGE_WINDOWS_949 #define LIBUNA_CODEPAGE_OEM_950 LIBUNA_CODEPAGE_WINDOWS_950 #define LIBUNA_CODEPAGE_OEM_1258 LIBUNA_CODEPAGE_WINDOWS_1258 #define LIBUNA_CODEPAGE_OEM_US_ENGLISH LIBUNA_CODEPAGE_OEM_437 #define LIBUNA_CODEPAGE_OEM_ARABIC LIBUNA_CODEPAGE_OEM_720 #define LIBUNA_CODEPAGE_OEM_GREEK LIBUNA_CODEPAGE_OEM_737 #define LIBUNA_CODEPAGE_OEM_BALTIC LIBUNA_CODEPAGE_OEM_775 #define LIBUNA_CODEPAGE_OEM_LATIN_1 LIBUNA_CODEPAGE_OEM_850 #define LIBUNA_CODEPAGE_OEM_LATIN_2 LIBUNA_CODEPAGE_OEM_852 #define LIBUNA_CODEPAGE_OEM_CYRILLIC LIBUNA_CODEPAGE_OEM_855 #define LIBUNA_CODEPAGE_OEM_TURKISH LIBUNA_CODEPAGE_OEM_857 #define LIBUNA_CODEPAGE_OEM_LATIN_1_WITH_EURO LIBUNA_CODEPAGE_OEM_858 #define LIBUNA_CODEPAGE_OEM_HEBREW LIBUNA_CODEPAGE_OEM_862 #define LIBUNA_CODEPAGE_OEM_RUSSIAN LIBUNA_CODEPAGE_OEM_866 #define LIBUNA_CODEPAGE_OEM_THAI LIBUNA_CODEPAGE_WINDOWS_874 #define LIBUNA_CODEPAGE_OEM_JAPANESE LIBUNA_CODEPAGE_WINDOWS_932 #define LIBUNA_CODEPAGE_OEM_CHINESE_SIMPLIFIED LIBUNA_CODEPAGE_WINDOWS_936 #define LIBUNA_CODEPAGE_OEM_KOREAN LIBUNA_CODEPAGE_WINDOWS_949 #define LIBUNA_CODEPAGE_OEM_CHINESE_TRADITIONAL LIBUNA_CODEPAGE_WINDOWS_950 #define LIBUNA_CODEPAGE_OEM_VIETNAMESE LIBUNA_CODEPAGE_WINDOWS_1258 #define LIBUNA_CODEPAGE_WINDOWS_THAI LIBUNA_CODEPAGE_WINDOWS_874 #define LIBUNA_CODEPAGE_WINDOWS_JAPANESE LIBUNA_CODEPAGE_WINDOWS_932 #define LIBUNA_CODEPAGE_WINDOWS_CHINESE_SIMPLIFIED LIBUNA_CODEPAGE_WINDOWS_936 #define LIBUNA_CODEPAGE_WINDOWS_KOREAN LIBUNA_CODEPAGE_WINDOWS_949 #define LIBUNA_CODEPAGE_WINDOWS_CHINESE_TRADITIONAL LIBUNA_CODEPAGE_WINDOWS_950 #define LIBUNA_CODEPAGE_WINDOWS_CENTRAL_EUROPEAN LIBUNA_CODEPAGE_WINDOWS_1250 #define LIBUNA_CODEPAGE_WINDOWS_CYRILLIC LIBUNA_CODEPAGE_WINDOWS_1251 #define LIBUNA_CODEPAGE_WINDOWS_WESTERN_EUROPEAN LIBUNA_CODEPAGE_WINDOWS_1252 #define LIBUNA_CODEPAGE_WINDOWS_GREEK LIBUNA_CODEPAGE_WINDOWS_1253 #define LIBUNA_CODEPAGE_WINDOWS_TURKISH LIBUNA_CODEPAGE_WINDOWS_1254 #define LIBUNA_CODEPAGE_WINDOWS_HEBREW LIBUNA_CODEPAGE_WINDOWS_1255 #define LIBUNA_CODEPAGE_WINDOWS_ARABIC LIBUNA_CODEPAGE_WINDOWS_1256 #define LIBUNA_CODEPAGE_WINDOWS_BALTIC LIBUNA_CODEPAGE_WINDOWS_1257 #define LIBUNA_CODEPAGE_WINDOWS_VIETNAMESE LIBUNA_CODEPAGE_WINDOWS_1258 #define LIBUNA_CODEPAGE_SHIFT_JIS LIBUNA_CODEPAGE_WINDOWS_932 #define LIBUNA_CODEPAGE_GB2312 LIBUNA_CODEPAGE_WINDOWS_936 /* Base16 variants * Byte: * 0 - 1 Character limit * 2 - 3 Reserved * 4 Case (0 not supported) * 5 - 6 Reserved * 7 String encoding (0 is byte stream) */ enum LIBUNA_BASE16_VARIANTS { LIBUNA_BASE16_VARIANT_CASE_LOWER = 0x00010000UL, LIBUNA_BASE16_VARIANT_CASE_MIXED = 0x00020000UL, LIBUNA_BASE16_VARIANT_CASE_UPPER = 0x00030000UL, LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE = 0x00000000UL, LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_64 = 0x00000040UL, LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_76 = 0x0000004cUL, LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN = 0x10000000UL, LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN = 0x20000000UL, LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN = 0x30000000UL, LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN = 0x40000000UL }; #define LIBUNA_BASE16_VARIANT_RFC4648 \ LIBUNA_BASE16_VARIANT_CASE_MIXED | LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE /* Base16 processing flags */ enum LIBUNA_BASE16_FLAGS { LIBUNA_BASE16_FLAG_STRIP_WHITESPACE = 0x01 }; /* Base32 variants * Byte: * 0 - 1 Character limit * 2 - 3 Reserved * 4 Alphabet type (0 not supported) * 5 Reserved * 6 Padding (0 not supported) * 7 String encoding (0 is byte stream) */ enum LIBUNA_BASE32_VARIANTS { LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL = 0x00010000UL, LIBUNA_BASE32_VARIANT_ALPHABET_HEX = 0x00020000UL, LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE = 0x00000000UL, LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_64 = 0x00000040UL, LIBUNA_BASE32_VARIANT_PADDING_NONE = 0x01000000UL, LIBUNA_BASE32_VARIANT_PADDING_OPTIONAL = 0x02000000UL, LIBUNA_BASE32_VARIANT_PADDING_REQUIRED = 0x03000000UL, LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN = 0x10000000UL, LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN = 0x20000000UL, LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN = 0x30000000UL, LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN = 0x40000000UL }; #define LIBUNA_BASE32_VARIANT_RFC4648 \ LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE32_VARIANT_PADDING_REQUIRED #define LIBUNA_BASE32_VARIANT_HEX \ LIBUNA_BASE32_VARIANT_ALPHABET_HEX | LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE32_VARIANT_PADDING_REQUIRED /* Base32 processing flags */ enum LIBUNA_BASE32_FLAGS { LIBUNA_BASE32_FLAG_STRIP_WHITESPACE = 0x01 }; /* Base64 variants * Byte: * 0 - 1 Character limit * 2 - 3 Reserved * 4 Alphabet type (0 not supported) * 5 Reserved * 6 Padding (0 not supported) * 7 String encoding (0 is byte stream) */ enum LIBUNA_BASE64_VARIANTS { LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL = 0x00010000UL, LIBUNA_BASE64_VARIANT_ALPHABET_URL = 0x00020000UL, LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE = 0x00000000UL, LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_64 = 0x00000040UL, LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_76 = 0x0000004cUL, LIBUNA_BASE64_VARIANT_PADDING_NONE = 0x01000000UL, LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL = 0x02000000UL, LIBUNA_BASE64_VARIANT_PADDING_REQUIRED = 0x03000000UL, LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN = 0x10000000UL, LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN = 0x20000000UL, LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN = 0x30000000UL, LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN = 0x40000000UL }; #define LIBUNA_BASE64_VARIANT_RFC1421 \ LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_64 | LIBUNA_BASE64_VARIANT_PADDING_REQUIRED #define LIBUNA_BASE64_VARIANT_PEM \ LIBUNA_BASE64_VARIANT_RFC1421 #define LIBUNA_BASE64_VARIANT_RFC1642 \ LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE64_VARIANT_PADDING_NONE #define LIBUNA_BASE64_VARIANT_UTF7 \ LIBUNA_BASE64_VARIANT_RFC1642 #define LIBUNA_BASE64_VARIANT_RFC2045 \ LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_76 | LIBUNA_BASE64_VARIANT_PADDING_REQUIRED #define LIBUNA_BASE64_VARIANT_MIME \ LIBUNA_BASE64_VARIANT_RFC2045 #define LIBUNA_BASE64_VARIANT_URL \ LIBUNA_BASE64_VARIANT_ALPHABET_URL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL /* TODO #define LIBUNA_BASE64_VARIANT_RFC3548 #define LIBUNA_BASE64_VARIANT_RFC4648 */ /* Base64 processing flags */ enum LIBUNA_BASE64_FLAGS { LIBUNA_BASE64_FLAG_STRIP_WHITESPACE = 0x01 }; #endif #define LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM 0 #define LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM 0 #define LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM 0 /* Character case definitions */ enum LIBUNA_CASE { LIBUNA_CASE_LOWER = (uint8_t) 'l', LIBUNA_CASE_MIXED = (uint8_t) 'm', LIBUNA_CASE_UPPER = (uint8_t) 'u' }; /* Strip mode definitions */ enum LIBUNA_STRIP_MODES { LIBUNA_STRIP_MODE_LEADING_WHITESPACE, LIBUNA_STRIP_MODE_NON_WHITESPACE, LIBUNA_STRIP_MODE_TRAILING_WHITESPACE, LIBUNA_STRIP_MODE_INVALID_CHARACTER }; /* Character definitions */ #define LIBUNA_UNICODE_REPLACEMENT_CHARACTER 0x0000fffdUL #define LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX 0x0000ffffUL #define LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START 0x0000dc00UL #define LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END 0x0000dfffUL #define LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START 0x0000d800UL #define LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END 0x0000dbffUL #define LIBUNA_UNICODE_CHARACTER_MAX 0x0010ffffUL #define LIBUNA_UTF16_CHARACTER_MAX 0x0010ffffUL #define LIBUNA_UTF32_CHARACTER_MAX 0x7fffffffUL #define LIBUNA_ASCII_REPLACEMENT_CHARACTER 0x1a /* UTF-7 definitions */ #define LIBUNA_UTF7_IS_BASE64_ENCODED 0x80000000UL #endif libevt-20170120/libuna/libuna_codepage_windows_1255.h0000664000175000017500000000303613040331677024315 0ustar00lordyestalordyesta00000000000000/* * Windows 1255 codepage (Hebrew) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1255_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1255_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1255_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x00a0[ 32 ]; extern const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05b0[ 24 ]; extern const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05d0[ 40 ]; extern const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1255_H ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_14.c0000664000175000017500000000541113040331677023734 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-14 codepage (Celtic) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_14.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-14 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_14_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x1e02, 0x1e03, 0x00a3, 0x010a, 0x010b, 0x1e0a, 0x00a7, 0x1e80, 0x00a9, 0x1e82, 0x1e0b, 0x1ef2, 0x00ad, 0x00ae, 0x0178, 0x1e1e, 0x1e1f, 0x0120, 0x0121, 0x1e40, 0x1e41, 0x00b6, 0x1e56, 0x1e81, 0x1e57, 0x1e83, 0x1e60, 0x1ef3, 0x1e84, 0x1e85, 0x1e61, 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x0174, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x1e6a, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x0176, 0x00df, 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 0x0175, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x1e6b, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x0177, 0x00ff }; /* Unicode to ASCII character lookup table for ISO 8859-14 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x00c0[ 64 ] = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0x1a, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0x1a, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x1a, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0x1a, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0x1a, 0xff, }; const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x0170[ 8 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xd0, 0xf0, 0xde, 0xfe }; const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x1e80[ 8 ] = { 0xa8, 0xb8, 0xaa, 0xba, 0xbd, 0xbe, 0x1a, 0x1a }; libevt-20170120/libuna/libuna_codepage_iso_8859_13.c0000664000175000017500000000712213040331677023734 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-13 codepage (Baltic) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_13.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-13 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_13_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7, 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x201c, 0x00b5, 0x00b6, 0x00b7, 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, 0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b, 0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df, 0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c, 0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019 }; /* Unicode to ASCII character lookup table for ISO 8859-13 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x00a0[ 224 ] = { 0xa0, 0x1a, 0xa2, 0xa3, 0xa4, 0x1a, 0xa6, 0xa7, 0x1a, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0x1a, 0xb0, 0xb1, 0xb2, 0xb3, 0x1a, 0xb5, 0xb6, 0xb7, 0x1a, 0xb9, 0x1a, 0xbb, 0xbc, 0xbd, 0xbe, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc4, 0xc5, 0xaf, 0x1a, 0x1a, 0xc9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd3, 0x1a, 0xd5, 0xd6, 0xd7, 0xa8, 0x1a, 0x1a, 0x1a, 0xdc, 0x1a, 0x1a, 0xdf, 0x1a, 0x1a, 0x1a, 0x1a, 0xe4, 0xe5, 0xbf, 0x1a, 0x1a, 0xe9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf3, 0x1a, 0xf5, 0xf6, 0xf7, 0xb8, 0x1a, 0x1a, 0x1a, 0xfc, 0x1a, 0x1a, 0x1a, 0xc2, 0xe2, 0x1a, 0x1a, 0xc0, 0xe0, 0xc3, 0xe3, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0x1a, 0x1a, 0x1a, 0x1a, 0xc7, 0xe7, 0x1a, 0x1a, 0xcb, 0xeb, 0xc6, 0xe6, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xcc, 0xec, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xce, 0xee, 0x1a, 0x1a, 0xc1, 0xe1, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xcd, 0xed, 0x1a, 0x1a, 0x1a, 0xcf, 0xef, 0x1a, 0x1a, 0x1a, 0x1a, 0xd9, 0xf9, 0xd1, 0xf1, 0xd2, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd4, 0xf4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xaa, 0xba, 0x1a, 0x1a, 0xda, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0xd0, 0xf0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xdb, 0xfb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd8, 0xf8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xca, 0xea, 0xdd, 0xfd, 0xde, 0xfe, 0x1a }; const uint8_t libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x2018[ 8 ] = { 0x1a, 0xff, 0x1a, 0x1a, 0xb4, 0xa1, 0xa5, 0x1a }; libevt-20170120/libuna/libuna_codepage_iso_8859_8.h0000664000175000017500000000252713040331677023671 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-8 codepage (Hebrew) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_8_H ) #define _LIBUNA_CODEPAGE_ISO_8859_8_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_8_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x00a0[ 32 ]; extern const uint8_t libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x05d0[ 32 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_8_H ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_9.c0000664000175000017500000000400713040331677023660 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-9 codepage (Turkish) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_9.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-9 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_9_byte_stream_to_unicode_base_0xd0[ 48 ] = { 0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df, 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff }; /* Unicode to ASCII character lookup table for ISO 8859-9 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_9_unicode_to_byte_stream_base_0x00d0[ 48 ] = { 0x1a, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x1a, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x1a, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a, 0x1a, 0xff }; libevt-20170120/libuna/libuna_codepage_windows_1254.c0000664000175000017500000000507513040331677024314 0ustar00lordyestalordyesta00000000000000/* * Windows 1254 codepage (Turkish) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1254.h" /* Extended ASCII to Unicode character lookup table for Windows 1254 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0x80[ 32 ] = { 0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0xfffd, 0xfffd, 0x0178, }; const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xd0[ 16 ] = { 0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df, }; const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xf0[ 16 ] = { 0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff, }; /* Unicode to ASCII character lookup table for Windows 1254 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x00d0[ 48 ] = { 0x1a, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x1a, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x1a, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a, 0x1a, 0xff, }; const uint8_t libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a, }; libevt-20170120/libuna/libuna_codepage_windows_1258.c0000664000175000017500000000604313040331677024314 0ustar00lordyestalordyesta00000000000000/* * Windows 1258 codepage (Vietnamese) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1258.h" /* Extended ASCII to Unicode character lookup table for Windows 1258 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1258_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0xfffd, 0x2039, 0x0152, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0xfffd, 0x203a, 0x0153, 0xfffd, 0xfffd, 0x0178, 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, 0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x0300, 0x00cd, 0x00ce, 0x00cf, 0x0110, 0x00d1, 0x0309, 0x00d3, 0x00d4, 0x01a0, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x01af, 0x0303, 0x00df, 0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x0301, 0x00ed, 0x00ee, 0x00ef, 0x0111, 0x00f1, 0x0323, 0x00f3, 0x00f4, 0x01a1, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x01b0, 0x20ab, 0x00ff }; /* Unicode to ASCII character lookup table for Windows 1258 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x00c0[ 72 ] = { 0xc0, 0xc1, 0xc2, 0x1a, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0x1a, 0xcd, 0xce, 0xcf, 0x1a, 0xd1, 0x1a, 0xd3, 0xd4, 0x1a, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x1a, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0x1a, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0x1a, 0xed, 0xee, 0xef, 0x1a, 0xf1, 0x1a, 0xf3, 0xf4, 0x1a, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a, 0x1a, 0xff, 0x1a, 0x1a, 0xc3, 0xe3, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libevt-20170120/libuna/libuna_codepage_iso_8859_15.c0000664000175000017500000000345113040331677023737 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-15 codepage (Latin 9) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_15.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-15 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_15_byte_stream_to_unicode_base_0xa0[ 32 ] = { 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7, 0x0161, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x017d, 0x00b5, 0x00b6, 0x00b7, 0x017e, 0x00b9, 0x00ba, 0x00bb, 0x0152, 0x0153, 0x0178, 0x00bf }; /* Unicode to ASCII character lookup table for ISO 8859-15 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_15_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xa0, 0xa1, 0xa2, 0xa3, 0x1a, 0xa5, 0x1a, 0xa7, 0x1a, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0x1a, 0xb5, 0xb6, 0xb7, 0x1a, 0xb9, 0xba, 0xbb, 0x1a, 0x1a, 0x1a, 0xbf }; libevt-20170120/libuna/libuna_codepage_iso_8859_7.c0000664000175000017500000000547313040331677023666 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-7 codepage (Greek) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_7.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-7 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_7_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x2018, 0x2019, 0x00a3, 0x20ac, 0x20af, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x037a, 0x00ab, 0x00ac, 0x00ad, 0xfffd, 0x2015, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386, 0x00b7, 0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f, 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0xfffd, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0xfffd }; /* Unicode to ASCII character lookup table for ISO 8859-7 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x00a0[ 24 ] = { 0xa0, 0x1a, 0x1a, 0xa3, 0x1a, 0x1a, 0xa6, 0xa7, 0xa8, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0x1a, 0x1a, 0xb0, 0xb1, 0xb2, 0xb3, 0x1a, 0x1a, 0x1a, 0xb7 }; const uint8_t libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x0380[ 80 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xb4, 0xb5, 0xb6, 0x1a, 0xb8, 0xb9, 0xba, 0x1a, 0xbc, 0x1a, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0x1a, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x1a }; libevt-20170120/libuna/libuna_codepage_iso_8859_9.h0000664000175000017500000000237613040331677023674 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-9 codepage (Turkish) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_9_H ) #define _LIBUNA_CODEPAGE_ISO_8859_9_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_9_byte_stream_to_unicode_base_0xd0[ 48 ]; extern const uint8_t libuna_codepage_iso_8859_9_unicode_to_byte_stream_base_0x00d0[ 48 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_9_H ) */ libevt-20170120/libuna/libuna_codepage_windows_1258.h0000664000175000017500000000255213040331677024322 0ustar00lordyestalordyesta00000000000000/* * Windows 1258 codepage (Vietnamese) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1258_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1258_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1258_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x00c0[ 72 ]; extern const uint8_t libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1258_H ) */ libevt-20170120/libuna/libuna_base64_stream.c0000664000175000017500000021203013040331677022746 0ustar00lordyestalordyesta00000000000000/* * Base64 stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libuna_base64_stream.h" #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" static uint8_t *libuna_base64_sixtet_to_character_table = \ (uint8_t *) "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static uint8_t *libuna_base64url_sixtet_to_character_table = \ (uint8_t *) "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; /* Copies a base64 character to a base64 sixtet * Returns 1 if successful or -1 on error */ int libuna_base64_character_copy_to_sixtet( uint8_t base64_character, uint8_t *base64_sixtet, uint32_t base64_variant, libcerror_error_t **error ) { static char *function = "libuna_base64_character_copy_to_sixtet"; uint8_t base64_character_62 = 0; uint8_t base64_character_63 = 0; if( base64_sixtet == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 sixtet.", function ); return( -1 ); } switch( base64_variant & 0x000f0000UL ) { case LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL: base64_character_62 = (uint8_t) '+'; base64_character_63 = (uint8_t) '/'; break; case LIBUNA_BASE64_VARIANT_ALPHABET_URL: base64_character_62 = (uint8_t) '-'; base64_character_63 = (uint8_t) '_'; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } /* A-Z is not a continous range on an EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( base64_character >= (uint8_t) 'A' ) && ( base64_character <= (uint8_t) 'I' ) ) { *base64_sixtet = base64_character - (uint8_t) 'A'; } else if( ( base64_character >= (uint8_t) 'J' ) && ( base64_character <= (uint8_t) 'R' ) ) { *base64_sixtet = base64_character - (uint8_t) 'J' + 9; } else if( ( base64_character >= (uint8_t) 'S' ) && ( base64_character <= (uint8_t) 'Z' ) ) { *base64_sixtet = base64_character - (uint8_t) 'S' + 18; } /* a-z is not a continous range on an EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( base64_character >= (uint8_t) 'a' ) && ( base64_character <= (uint8_t) 'i' ) ) { *base64_sixtet = base64_character - (uint8_t) 'a' + 26; } else if( ( base64_character >= (uint8_t) 'j' ) && ( base64_character <= (uint8_t) 'r' ) ) { *base64_sixtet = base64_character - (uint8_t) 'j' + 35; } else if( ( base64_character >= (uint8_t) 's' ) && ( base64_character <= (uint8_t) 'z' ) ) { *base64_sixtet = base64_character - (uint8_t) 's' + 44; } else if( ( base64_character >= (uint8_t) '0' ) && ( base64_character <= (uint8_t) '9' ) ) { *base64_sixtet = base64_character - (uint8_t) '0' + 52; } else if( base64_character == base64_character_62 ) { *base64_sixtet = 62; } else if( base64_character == base64_character_63 ) { *base64_sixtet = 63; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base64 character: 0x%02" PRIx8 ".", function, base64_character ); return( -1 ); } return( 1 ); } /* Copies a base64 triplet from a base64 stream * * The padding size will still be set to indicate the number of * sixtets in the triplet * * Returns 1 if successful or -1 on error */ int libuna_base64_triplet_copy_from_base64_stream( uint32_t *base64_triplet, const uint8_t *base64_stream, size_t base64_stream_size, size_t *base64_stream_index, uint8_t *padding_size, uint32_t base64_variant, libcerror_error_t **error ) { static char *function = "libuna_base64_triplet_copy_from_base64_stream"; size_t base64_character_size = 0; size_t stream_index = 0; uint32_t base64_character = 0; uint8_t padding_character = 0; uint8_t sixtet1 = 0; uint8_t sixtet2 = 0; uint8_t sixtet3 = 0; uint8_t sixtet4 = 0; if( base64_triplet == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 triplet.", function ); return( -1 ); } if( base64_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream.", function ); return( -1 ); } if( base64_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base64 stream size value exceeds maximum.", function ); return( -1 ); } if( base64_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream index.", function ); return( -1 ); } if( *base64_stream_index >= base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream string too small.", function ); return( -1 ); } if( padding_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid padding size.", function ); return( -1 ); } switch( base64_variant & 0x0f000000UL ) { case LIBUNA_BASE64_VARIANT_PADDING_NONE: padding_character = 0; break; case LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL: padding_character = (uint8_t) '='; break; case LIBUNA_BASE64_VARIANT_PADDING_REQUIRED: padding_character = (uint8_t) '='; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character_size = 1; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base64_character_size = 2; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base64_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } stream_index = *base64_stream_index; if( ( stream_index + base64_character_size ) > base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 1st base64 character.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character = base64_stream[ stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; if( ( base64_character & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st base64 character.", function ); return( -1 ); } if( libuna_base64_character_copy_to_sixtet( (uint8_t) base64_character, &sixtet1, base64_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 character to 1st sixtet.", function ); return( -1 ); } if( ( stream_index + base64_character_size ) > base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 2nd base64 character.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character = base64_stream[ stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; if( ( base64_character & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd base64 character.", function ); return( -1 ); } if( libuna_base64_character_copy_to_sixtet( (uint8_t) base64_character, &sixtet2, base64_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 character to 2nd sixtet.", function ); return( -1 ); } *padding_size = 2; if( ( stream_index + base64_character_size ) <= base64_stream_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character = base64_stream[ stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; if( ( base64_character & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd base64 character.", function ); return( -1 ); } if( ( padding_character != 0 ) && ( base64_character == (uint32_t) padding_character ) ) { sixtet3 = 0; } else if( libuna_base64_character_copy_to_sixtet( (uint8_t) base64_character, &sixtet3, base64_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd base64 sixtet.", function ); return( -1 ); } libcerror_error_free( error ); } else { *padding_size -= 1; } } else if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 3rd base64 character.", function ); return( -1 ); } if( ( stream_index + base64_character_size ) <= base64_stream_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character = base64_stream[ stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; if( ( base64_character & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base64 character.", function ); return( -1 ); } if( ( padding_character != 0 ) && ( base64_character == (uint32_t) padding_character ) ) { sixtet4 = 0; } else if( *padding_size > 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base64 sixtet.", function ); return( -1 ); } } else if( libuna_base64_character_copy_to_sixtet( (uint8_t) base64_character, &sixtet4, base64_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4rd base64 sixtet.", function ); return( -1 ); } libcerror_error_free( error ); } else { *padding_size -= 1; } } else if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 4th base64 character.", function ); return( -1 ); } *base64_triplet = sixtet1; *base64_triplet <<= 6; *base64_triplet |= sixtet2; *base64_triplet <<= 6; *base64_triplet |= sixtet3; *base64_triplet <<= 6; *base64_triplet |= sixtet4; *base64_stream_index = stream_index; return( 1 ); } /* Copies a base64 triplet to a base64 stream * Returns 1 if successful or -1 on error */ int libuna_base64_triplet_copy_to_base64_stream( uint32_t base64_triplet, uint8_t *base64_stream, size_t base64_stream_size, size_t *base64_stream_index, uint8_t padding_size, uint32_t base64_variant, libcerror_error_t **error ) { uint8_t *sixtet_to_character_table = NULL; static char *function = "libuna_base64_triplet_copy_to_base64_stream"; size_t base64_character_size = 0; size_t stream_index = 0; uint32_t base64_character = 0; uint8_t padding_character = 0; uint8_t sixtet1 = 0; uint8_t sixtet2 = 0; uint8_t sixtet3 = 0; uint8_t sixtet4 = 0; if( base64_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream.", function ); return( -1 ); } if( base64_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base64 stream size value exceeds maximum.", function ); return( -1 ); } if( base64_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream index.", function ); return( -1 ); } if( *base64_stream_index >= base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream string too small.", function ); return( -1 ); } if( padding_size > 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid padding size value out of bounds.", function ); return( -1 ); } switch( base64_variant & 0x000f0000UL ) { case LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL: sixtet_to_character_table = libuna_base64_sixtet_to_character_table; break; case LIBUNA_BASE64_VARIANT_ALPHABET_URL: sixtet_to_character_table = libuna_base64url_sixtet_to_character_table; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0x0f000000UL ) { case LIBUNA_BASE64_VARIANT_PADDING_NONE: case LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL: padding_character = 0; break; case LIBUNA_BASE64_VARIANT_PADDING_REQUIRED: padding_character = (uint8_t) '='; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character_size = 1; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base64_character_size = 2; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base64_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } stream_index = *base64_stream_index; /* Separate the 3 bytes value into 4 x 6 bit values */ sixtet4 = (uint8_t) ( base64_triplet & 0x3f ); base64_triplet >>= 6; sixtet3 = (uint8_t) ( base64_triplet & 0x3f ); base64_triplet >>= 6; sixtet2 = (uint8_t) ( base64_triplet & 0x3f ); base64_triplet >>= 6; sixtet1 = (uint8_t) ( base64_triplet & 0x3f ); /* Spread the encoding over 2 characters if 1 byte is available */ if( ( stream_index + ( base64_character_size * 2 ) ) > base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream is too small.", function ); return( -1 ); } base64_character = sixtet_to_character_table[ sixtet1 ]; switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_stream[ stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; base64_character = sixtet_to_character_table[ sixtet2 ]; switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_stream[ stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; /* Spread the encoding over 3 characters if 2 bytes are available * Otherwise pad the remaining bytes if required */ if( ( stream_index + base64_character_size ) > base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream is too small.", function ); return( -1 ); } if( ( padding_size < 2 ) || ( padding_character != 0 ) ) { if( padding_size < 2 ) { base64_character = sixtet_to_character_table[ sixtet3 ]; } else if( padding_character != 0 ) { base64_character = padding_character; } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_stream[ stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; } /* Spread the encoding over 4 characters if 3 bytes are available * Otherwise pad the remaining bytes if required */ if( ( stream_index + base64_character_size ) > base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream is too small.", function ); return( -1 ); } if( ( padding_size < 1 ) || ( padding_character != 0 ) ) { if( padding_size < 1 ) { base64_character = sixtet_to_character_table[ sixtet4 ]; } else if( padding_character != 0 ) { base64_character = padding_character; } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_stream[ stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; } *base64_stream_index = stream_index; return( 1 ); } /* Copies a base64 triplet from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base64_triplet_copy_from_byte_stream( uint32_t *base64_triplet, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, uint8_t *padding_size, libcerror_error_t **error ) { static char *function = "libuna_base64_triplet_copy_from_byte_stream"; if( base64_triplet == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 triplet.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } /* Determine the value of 3 bytes (24 bits) */ *base64_triplet = (uint32_t) byte_stream[ *byte_stream_index ] << 16; *byte_stream_index += 1; *padding_size = 2; if( *byte_stream_index < byte_stream_size ) { *base64_triplet |= (uint32_t) byte_stream[ *byte_stream_index ] << 8; *byte_stream_index += 1; *padding_size -= 1; } if( *byte_stream_index < byte_stream_size ) { *base64_triplet |= (uint32_t) byte_stream[ *byte_stream_index ]; *byte_stream_index += 1; *padding_size -= 1; } return( 1 ); } /* Copies a base64 triplet to a byte stream * Returns 1 if successful or -1 on error */ int libuna_base64_triplet_copy_to_byte_stream( uint32_t base64_triplet, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, uint8_t padding_size, libcerror_error_t **error ) { static char *function = "libuna_base64_triplet_copy_to_byte_stream"; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } if( padding_size > 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid padding size value out of bounds.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( ( base64_triplet >> 16 ) & 0xff ); *byte_stream_index += 1; if( padding_size <= 1 ) { if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( ( base64_triplet >> 8 ) & 0xff ); *byte_stream_index += 1; } if( padding_size == 0 ) { if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream is too small.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( base64_triplet & 0xff ); *byte_stream_index += 1; } return( 1 ); } /* Determines the size of a byte stream from a base64 stream * * LIBUNA_BASE64_FLAG_STRIP_WHITESPACE removes leading space and tab characters, * and trailing space, tab and end of line characters * * Returns 1 if successful or -1 on error */ int libuna_base64_stream_size_to_byte_stream( const uint8_t *base64_stream, size_t base64_stream_size, size_t *byte_stream_size, uint32_t base64_variant, uint8_t flags, libcerror_error_t **error ) { static char *function = "libuna_base64_stream_size_to_byte_stream"; size_t base64_character_size = 0; size_t base64_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint32_t base64_character1 = 0; uint32_t base64_character2 = 0; uint8_t base64_character_62 = 0; uint8_t base64_character_63 = 0; uint8_t character_limit = 0; uint8_t padding_size = 0; uint8_t strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; if( base64_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream.", function ); return( -1 ); } if( ( base64_stream_size == 0 ) || ( base64_stream_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid base64 stream size value out of bounds.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } switch( base64_variant & 0x000000ffUL ) { case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0x000f0000UL ) { case LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL: base64_character_62 = (uint8_t) '+'; base64_character_63 = (uint8_t) '/'; break; case LIBUNA_BASE64_VARIANT_ALPHABET_URL: base64_character_62 = (uint8_t) '-'; base64_character_63 = (uint8_t) '_'; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character_size = 1; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base64_character_size = 2; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base64_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } if( base64_stream_size < base64_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base64 stream value too small.", function ); return( -1 ); } if( ( flags & ~( LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } base64_stream_index = base64_stream_size - base64_character_size; whitespace_size = 0; while( base64_stream_index > base64_character_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index -= base64_character_size; if( ( base64_character1 == (uint32_t) '\n' ) || ( base64_character1 == (uint32_t) '\r' ) ) { whitespace_size += base64_character_size; } else if( ( flags & LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) == 0 ) { break; } else if( ( base64_character1 == (uint32_t) ' ' ) || ( base64_character1 == (uint32_t) '\t' ) || ( base64_character1 == (uint32_t) '\v' ) ) { whitespace_size += base64_character_size; } else { break; } } base64_stream_size -= whitespace_size; base64_stream_index = base64_stream_size - base64_character_size; if( base64_stream_size < base64_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base64 stream value too small.", function ); return( -1 ); } if( base64_stream_index > base64_character_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index -= base64_character_size; if( base64_character1 == (uint32_t) '=' ) { padding_size += 1; } } if( base64_stream_index > base64_character_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index -= base64_character_size; if( base64_character1 == (uint32_t) '=' ) { padding_size += 1; } } if( base64_stream_index > base64_character_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } if( base64_character1 == (uint32_t) '=' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid number of padding bytes.", function ); return( -1 ); } } base64_stream_index = 0; whitespace_size = 0; while( base64_stream_index < ( base64_stream_size - ( padding_size * base64_character_size ) ) ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index += base64_character_size; if( ( base64_character1 == (uint32_t) '\n' ) || ( base64_character1 == (uint32_t) '\r' ) ) { if( ( strip_mode != LIBUNA_STRIP_MODE_NON_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { if( ( base64_stream_index + base64_character_size ) < base64_stream_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character2 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; } if( ( base64_character2 == (uint32_t) '\n' ) || ( base64_character2 == (uint32_t) '\r' ) ) { base64_stream_index += base64_character_size; whitespace_size += base64_character_size; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; } if( character_limit != 0 ) { if( number_of_characters != (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } whitespace_size += base64_character_size; } else if( ( base64_character1 == (uint32_t) ' ' ) || ( base64_character1 == (uint32_t) '\t' ) || ( base64_character1 == (uint32_t) '\v' ) ) { if( ( flags & LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) != 0 ) { if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_TRAILING_WHITESPACE; } if( ( strip_mode != LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { whitespace_size += base64_character_size; } } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else if( strip_mode == LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } else if( strip_mode == LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { /* A-Z is not a continous range on 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; *byte_stream_size = base64_stream_size / base64_character_size; if( ( base64_stream_size % base64_character_size ) != 0 ) { *byte_stream_size += 1; } *byte_stream_size *= 3; /* In this case the padding size contains the number of bytes to correct */ *byte_stream_size -= padding_size; return( 1 ); } /* Copies a byte stream from a base64 stream * * LIBUNA_BASE64_FLAG_STRIP_WHITESPACE removes leading space and tab characters, * and trailing space, tab and end of line characters * * Returns 1 if successful or -1 on error */ int libuna_base64_stream_copy_to_byte_stream( const uint8_t *base64_stream, size_t base64_stream_size, uint8_t *byte_stream, size_t byte_stream_size, uint32_t base64_variant, uint8_t flags, libcerror_error_t **error ) { static char *function = "libuna_base64_stream_copy_to_byte_stream"; size_t base64_character_size = 0; size_t base64_stream_index = 0; size_t byte_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint32_t base64_character1 = 0; uint32_t base64_character2 = 0; uint32_t base64_triplet = 0; uint8_t character_limit = 0; uint8_t padding_size = 0; uint8_t strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; if( base64_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream.", function ); return( -1 ); } if( base64_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base64 stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } switch( base64_variant & 0x000000ffUL ) { case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character_size = 1; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base64_character_size = 2; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base64_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } if( base64_stream_size < base64_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base64 stream value too small.", function ); return( -1 ); } if( ( flags & ~( LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } base64_stream_index = base64_stream_size - base64_character_size; whitespace_size = 0; while( base64_stream_index > base64_character_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index -= base64_character_size; if( ( base64_character1 == (uint32_t) '\n' ) || ( base64_character1 == (uint32_t) '\r' ) ) { whitespace_size += base64_character_size; } else if( ( flags & LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) == 0 ) { break; } else if( ( base64_character1 == (uint32_t) ' ' ) || ( base64_character1 == (uint32_t) '\t' ) || ( base64_character1 == (uint32_t) '\v' ) ) { whitespace_size += base64_character_size; } else { break; } } base64_stream_size -= whitespace_size; base64_stream_index = 0; if( ( flags & LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) == 0 ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } while( base64_stream_index < base64_stream_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index += base64_character_size; if( ( base64_character1 == (uint32_t) '\n' ) || ( base64_character1 == (uint32_t) '\r' ) ) { if( ( strip_mode != LIBUNA_STRIP_MODE_NON_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { if( ( base64_stream_index + base64_character_size ) < base64_stream_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character2 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; } if( ( base64_character2 == (uint32_t) '\n' ) || ( base64_character2 == (uint32_t) '\r' ) ) { base64_stream_index += base64_character_size; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; } if( character_limit != 0 ) { if( number_of_characters != (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } } else if( ( base64_character1 == (uint32_t) ' ' ) || ( base64_character1 == (uint32_t) '\t' ) || ( base64_character1 == (uint32_t) '\v' ) ) { if( ( flags & LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) != 0 ) { if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_TRAILING_WHITESPACE; } if( ( strip_mode != LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else if( strip_mode == LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } else if( strip_mode == LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid character in base64 stream at index: %" PRIzd ".", function, base64_stream_index - base64_character_size ); return( -1 ); } if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { if( padding_size > 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st base64 sixtet.", function ); return( -1 ); } base64_stream_index -= base64_character_size; /* Convert the base64 stream into a base64 triplet */ if( libuna_base64_triplet_copy_from_base64_stream( &base64_triplet, base64_stream, base64_stream_size, &base64_stream_index, &padding_size, base64_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 triplet from base64 stream.", function ); return( -1 ); } /* Convert the base64 triplet into a byte stream */ if( libuna_base64_triplet_copy_to_byte_stream( base64_triplet, byte_stream, byte_stream_size, &byte_stream_index, padding_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 triplet to byte stream.", function ); return( -1 ); } number_of_characters += 4 - padding_size; } } if( character_limit != 0 ) { if( number_of_characters > (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in last line exceed maximum.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of a base64 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base64_stream_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, size_t *base64_stream_size, uint32_t base64_variant, libcerror_error_t **error ) { static char *function = "libuna_base64_stream_size_from_byte_stream"; size_t base64_character_size = 0; size_t remaining_size = 0; size_t whitespace_size = 0; uint8_t character_limit = 0; uint8_t padding_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( base64_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream size.", function ); return( -1 ); } switch( base64_variant & 0x000000ffUL ) { case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0x0f000000UL ) { case LIBUNA_BASE64_VARIANT_PADDING_NONE: padding_character = 0; break; case LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL: padding_character = (uint8_t) '='; break; case LIBUNA_BASE64_VARIANT_PADDING_REQUIRED: padding_character = (uint8_t) '='; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character_size = 1; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base64_character_size = 2; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base64_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } /* Make sure the base64 stream is able to hold * at least 4 base64 characters for each 3 bytes */ *base64_stream_size = ( byte_stream_size / 3 ) * 4; remaining_size = byte_stream_size % 3; if( remaining_size != 0 ) { if( padding_character != 0 ) { *base64_stream_size += 4; } else if( remaining_size == 1 ) { *base64_stream_size += 2; } else if( remaining_size == 2 ) { *base64_stream_size += 3; } } if( character_limit != 0 ) { whitespace_size = *base64_stream_size / character_limit; if( ( *base64_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } *base64_stream_size += whitespace_size; } *base64_stream_size *= base64_character_size; return( 1 ); } /* Copies a base64 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base64_stream_copy_from_byte_stream( uint8_t *base64_stream, size_t base64_stream_size, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base64_variant, libcerror_error_t **error ) { static char *function = "libuna_base64_stream_copy_from_byte_stream"; size_t base64_stream_index = 0; if( libuna_base64_stream_with_index_copy_from_byte_stream( base64_stream, base64_stream_size, &base64_stream_index, byte_stream, byte_stream_size, base64_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base64 stream from byte stream.", function ); return( -1 ); } return( 1 ); } /* Copies a base64 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base64_stream_with_index_copy_from_byte_stream( uint8_t *base64_stream, size_t base64_stream_size, size_t *base64_stream_index, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base64_variant, libcerror_error_t **error ) { static char *function = "libuna_base64_stream_with_index_copy_from_byte_stream"; size_t base64_character_size = 0; size_t calculated_base64_stream_size = 0; size_t byte_stream_index = 0; size_t number_of_characters = 0; size_t remaining_size = 0; size_t stream_index = 0; size_t whitespace_size = 0; uint32_t base64_character = 0; uint32_t base64_triplet = 0; uint8_t character_limit = 0; uint8_t padding_character = 0; uint8_t padding_size = 0; if( base64_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream.", function ); return( -1 ); } if( base64_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base64 stream size value exceeds maximum.", function ); return( -1 ); } if( base64_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream index.", function ); return( -1 ); } if( *base64_stream_index >= base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream string too small.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } switch( base64_variant & 0x000000ffUL ) { case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0x0f000000UL ) { case LIBUNA_BASE64_VARIANT_PADDING_NONE: padding_character = 0; break; case LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL: padding_character = (uint8_t) '='; break; case LIBUNA_BASE64_VARIANT_PADDING_REQUIRED: padding_character = (uint8_t) '='; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character_size = 1; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base64_character_size = 2; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base64_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } stream_index = *base64_stream_index; /* Make sure the base64 stream is able to hold * at least 4 base64 characters for each 3 bytes */ calculated_base64_stream_size = ( byte_stream_size / 3 ) * 4; remaining_size = byte_stream_size % 3; if( remaining_size != 0 ) { if( padding_character != 0 ) { calculated_base64_stream_size += 4; } else if( remaining_size == 1 ) { calculated_base64_stream_size += 2; } else if( remaining_size == 2 ) { calculated_base64_stream_size += 3; } } calculated_base64_stream_size += 1; if( character_limit != 0 ) { whitespace_size = calculated_base64_stream_size / character_limit; if( ( calculated_base64_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } calculated_base64_stream_size += whitespace_size; } calculated_base64_stream_size *= base64_character_size; if( base64_stream_size < calculated_base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream is too small.", function ); return( -1 ); } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream into a base64 triplet */ if( libuna_base64_triplet_copy_from_byte_stream( &base64_triplet, byte_stream, byte_stream_size, &byte_stream_index, &padding_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 triplet from byte stream.", function ); return( -1 ); } /* Convert the base64 triplet into a base64 stream */ if( libuna_base64_triplet_copy_to_base64_stream( base64_triplet, base64_stream, base64_stream_size, &stream_index, padding_size, base64_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 triplet to base64 stream.", function ); return( -1 ); } if( character_limit != 0 ) { number_of_characters += 4; if( number_of_characters >= (size_t) character_limit ) { base64_character = (uint32_t) '\n'; switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_stream[ stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; number_of_characters = 0; } } } if( character_limit != 0 ) { if( number_of_characters != 0 ) { base64_character = (uint32_t) '\n'; switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_stream[ stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; } } *base64_stream_index = stream_index; return( 1 ); } libevt-20170120/libuna/libuna_error.c0000664000175000017500000000550413040331677021446 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libuna_error.h" #include "libuna_libcerror.h" #if !defined( HAVE_LOCAL_LIBUNA ) /* Free an error and its elements */ void libuna_error_free( libuna_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libuna_error_fprint( libuna_error_t *error, FILE *stream ) { 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 ) */ libevt-20170120/libuna/libuna_codepage_koi8_u.c0000664000175000017500000000600013040331677023332 0ustar00lordyestalordyesta00000000000000/* * KOI8-U codepage (Ukrainian Cyrillic) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_koi8_u.h" /* Extended ASCII to Unicode character lookup table for KOI8-U codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_koi8_u_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248, 0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7, 0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457, 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x0491, 0x255d, 0x255e, 0x255f, 0x2560, 0x2561, 0x0401, 0x0404, 0x2563, 0x0406, 0x0407, 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x0490, 0x256c, 0x00a9, 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a }; /* Unicode to ASCII character lookup table for KOI8-U codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x0410[ 64 ] = { 0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, 0xfb, 0xfd, 0xff, 0xf9, 0xf8, 0xfc, 0xe0, 0xf1, 0xc1, 0xc2, 0xd7, 0xc7, 0xc4, 0xc5, 0xd6, 0xda, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, 0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1 }; const uint8_t libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x2550[ 32 ] = { 0xa0, 0xa1, 0xa2, 0x1a, 0xa5, 0x1a, 0x1a, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0x1a, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0x1a, 0xb5, 0x1a, 0x1a, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0x1a, 0xbe, 0x1a, 0x1a, 0x1a }; libevt-20170120/libuna/libuna_codepage_iso_8859_13.h0000664000175000017500000000253613040331677023745 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-13 codepage (Baltic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_13_H ) #define _LIBUNA_CODEPAGE_ISO_8859_13_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_13_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x00a0[ 224 ]; extern const uint8_t libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x2018[ 8 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_13_H ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_7.h0000664000175000017500000000252613040331677023667 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-7 codepage (Greek) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_7_H ) #define _LIBUNA_CODEPAGE_ISO_8859_7_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_7_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x00a0[ 24 ]; extern const uint8_t libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x0380[ 80 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_7_H ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_14.h0000664000175000017500000000266713040331677023753 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-14 codepage (Celtic) functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_14_H ) #define _LIBUNA_CODEPAGE_ISO_8859_14_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_14_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x00c0[ 64 ]; extern const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x0170[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x1e80[ 8 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_14_H ) */ libevt-20170120/libuna/libuna_codepage_iso_8859_16.c0000664000175000017500000000634213040331677023742 0ustar00lordyestalordyesta00000000000000/* * ISO 8859-16 codepage (Latin 10) function * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_16.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-16 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_16_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7, 0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b, 0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7, 0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c, 0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0106, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x0110, 0x0143, 0x00d2, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x015a, 0x0170, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0118, 0x021a, 0x00df, 0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x0107, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b, 0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff }; /* Unicode to ASCII character lookup table for ISO 8859-16 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x00a8[ 96 ] = { 0x1a, 0xa9, 0x1a, 0xab, 0x1a, 0xad, 0x1a, 0x1a, 0xb0, 0xb1, 0x1a, 0x1a, 0x1a, 0x1a, 0xb6, 0xb7, 0x1a, 0x1a, 0x1a, 0xbb, 0x1a, 0x1a, 0x1a, 0x1a, 0xc0, 0xc1, 0xc2, 0x1a, 0xc4, 0x1a, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0x1a, 0x1a, 0xd2, 0xd3, 0xd4, 0x1a, 0xd6, 0x1a, 0x1a, 0xd9, 0xda, 0xdb, 0xdc, 0x1a, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0x1a, 0xe4, 0x1a, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x1a, 0x1a, 0xf2, 0xf3, 0xf4, 0x1a, 0xf6, 0x1a, 0x1a, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a, 0x1a, 0xff, 0x1a, 0x1a, 0xc3, 0xe3, 0xa1, 0xa2, 0xc5, 0xe5 }; const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0140[ 8 ] = { 0x1a, 0xa3, 0xb3, 0xd1, 0xf1, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0150[ 8 ] = { 0xd5, 0xf5, 0xbc, 0xbd, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0178[ 8 ] = { 0xbe, 0xac, 0xae, 0xaf, 0xbf, 0xb4, 0xb8, 0x1a }; const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0218[ 8 ] = { 0xaa, 0xba, 0xde, 0xfe, 0x1a, 0x1a, 0x1a, 0x1a }; libevt-20170120/libfvalue/0000775000175000017500000000000013040343017017301 5ustar00lordyestalordyesta00000000000000libevt-20170120/libfvalue/libfvalue_support.h0000664000175000017500000000226113040331702023216 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_SUPPORT_H ) #define _LIBFVALUE_SUPPORT_H #include #include #include "libfvalue_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFVALUE ) LIBFVALUE_EXTERN \ const char *libfvalue_get_version( void ); #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_SUPPORT_H ) */ libevt-20170120/libfvalue/libfvalue_value_entry.c0000664000175000017500000001107013040331702024030 0ustar00lordyestalordyesta00000000000000/* * Value entry functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_libcerror.h" #include "libfvalue_value_entry.h" /* 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 ); } libevt-20170120/libfvalue/libfvalue_libfwnt.h0000664000175000017500000000325713040331702023155 0ustar00lordyestalordyesta00000000000000/* * The libfwnt header wrapper * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBFWNT_H ) #define _LIBFVALUE_LIBFWNT_H #include /* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt */ #if defined( HAVE_LOCAL_LIBFWNT ) #include #include #include #include #include #include #include #include #include /* Note that libfvalue does not require to have libfwnt support */ #elif defined( HAVE_LIBFWNT_H ) /* If libtool DLL support is enabled set LIBFWNT_DLL_IMPORT * before including libfwnt.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFWNT_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBFWNT ) */ #endif /* !defined( _LIBFVALUE_LIBFWNT_H ) */ libevt-20170120/libfvalue/libfvalue_libcerror.h0000664000175000017500000000264413040331701023471 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBCERROR_H ) #define _LIBFVALUE_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFVALUE_LIBCERROR_H ) */ libevt-20170120/libfvalue/libfvalue_value.c0000664000175000017500000036141713040331702022624 0ustar00lordyestalordyesta00000000000000/* * Value functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #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( 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 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, 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( libcdata_array_get_number_of_entries( internal_value->value_instances, number_of_value_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from values instances array.", function ); return( -1 ); } } if( *number_of_value_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of value entries value out of bounds.", function ); return( -1 ); } return( 1 ); } /* Retrieves the entry * 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; 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; 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 ); } libevt-20170120/libfvalue/libfvalue_libcnotify.h0000664000175000017500000000254513040331701023650 0ustar00lordyestalordyesta00000000000000/* * The internal libcnotify header * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBCNOTIFY_H ) #define _LIBFVALUE_LIBCNOTIFY_H #include /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify */ #if defined( HAVE_LOCAL_LIBCNOTIFY ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT * before including libcnotify.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCNOTIFY_DLL_IMPORT #endif #include #endif #endif libevt-20170120/libfvalue/libfvalue_types.h0000664000175000017500000000365613040331702022657 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_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_utf8_string {} libfvalue_split_utf8_string_t; typedef struct libfvalue_split_utf16_string {} libfvalue_split_utf16_string_t; typedef struct libfvalue_table {} libfvalue_table_t; typedef struct libfvalue_value {} libfvalue_value_t; #else typedef intptr_t libfvalue_data_handle_t; typedef intptr_t libfvalue_split_utf8_string_t; typedef intptr_t libfvalue_split_utf16_string_t; typedef intptr_t libfvalue_table_t; typedef intptr_t libfvalue_value_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBFVALUE ) */ #endif /* !defined( _LIBFVALUE_INTERNAL_TYPES_H ) */ libevt-20170120/libfvalue/Makefile.am0000664000175000017500000000272313012271511021337 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBFVALUE AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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_string.c libfvalue_split_string.h \ libfvalue_string.c libfvalue_string.h \ libfvalue_types.h \ libfvalue_table.c libfvalue_table.h \ libfvalue_value.c libfvalue_value.h \ libfvalue_value_entry.c libfvalue_value_entry.h \ libfvalue_value_type.c libfvalue_value_type.h \ libfvalue_support.c libfvalue_support.h \ libfvalue_unused.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfvalue ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfvalue_la_SOURCES) libevt-20170120/libfvalue/libfvalue_integer.h0000664000175000017500000001643213040331701023143 0ustar00lordyestalordyesta00000000000000/* * Integer value functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTEGER_H ) #define _LIBFVALUE_INTEGER_H #include #include #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_integer libfvalue_integer_t; struct libfvalue_integer { /* The value */ uint64_t value; /* The value size */ size_t value_size; }; int libfvalue_integer_initialize( libfvalue_integer_t **integer, libcerror_error_t **error ); int libfvalue_integer_free( libfvalue_integer_t **integer, libcerror_error_t **error ); int libfvalue_integer_clone( libfvalue_integer_t **destination_integer, libfvalue_integer_t *source_integer, libcerror_error_t **error ); int libfvalue_integer_copy_from_byte_stream( libfvalue_integer_t *integer, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ); int libfvalue_integer_copy_from_integer( libfvalue_integer_t *integer, uint64_t integer_value, size_t integer_value_size, libcerror_error_t **error ); int libfvalue_integer_copy_to_integer( libfvalue_integer_t *integer, uint64_t *integer_value, size_t *integer_value_size, libcerror_error_t **error ); int libfvalue_integer_get_string_size( libfvalue_integer_t *integer, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_integer_copy_from_utf8_string_with_index( libfvalue_integer_t *integer, uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_integer_copy_to_utf8_string_with_index( libfvalue_integer_t *integer, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_integer_copy_from_utf16_string_with_index( libfvalue_integer_t *integer, uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_integer_copy_to_utf16_string_with_index( libfvalue_integer_t *integer, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_integer_copy_from_utf32_string_with_index( libfvalue_integer_t *integer, uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_integer_copy_to_utf32_string_with_index( libfvalue_integer_t *integer, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_string_size_from_integer( size_t *string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_copy_from_integer( uint8_t *utf8_string, size_t utf8_string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_with_index_copy_from_integer( uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_copy_to_integer( const uint8_t *utf8_string, size_t utf8_string_length, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_with_index_copy_to_integer( const uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_copy_from_integer( uint16_t *utf16_string, size_t utf16_string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_with_index_copy_from_integer( uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_copy_to_integer( const uint16_t *utf16_string, size_t utf16_string_length, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_with_index_copy_to_integer( const uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf32_string_copy_from_integer( uint32_t *utf32_string, size_t utf32_string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf32_string_with_index_copy_from_integer( uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf32_string_copy_to_integer( const uint32_t *utf32_string, size_t utf32_string_length, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf32_string_with_index_copy_to_integer( const uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_INTEGER_H ) */ libevt-20170120/libfvalue/libfvalue_support.c0000664000175000017500000000216513040331702023214 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_definitions.h" #include "libfvalue_support.h" #if !defined( HAVE_LOCAL_LIBFVALUE ) /* Returns the library version as a string */ const char *libfvalue_get_version( void ) { return( (const char *) LIBFVALUE_VERSION_STRING ); } #endif libevt-20170120/libfvalue/libfvalue_unused.h0000664000175000017500000000255613040331702023014 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_UNUSED_H ) #define _LIBFVALUE_INTERNAL_UNUSED_H #include #if !defined( LIBFVALUE_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFVALUE_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFVALUE_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFVALUE_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFVALUE_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBFVALUE_INTERNAL_UNUSED_H ) */ libevt-20170120/libfvalue/libfvalue_floating_point.c0000664000175000017500000026313113040331701024515 0ustar00lordyestalordyesta00000000000000/* * Floating point value (IEEE 754) functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "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_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_from_utf8_string_with_index"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_utf8_string_with_index_copy_to_floating_point( utf8_string, utf8_string_size, utf8_string_index, &( floating_point->value ), floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit floating point from UTF-8 string.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Copies the floating point to an UTF-8 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_to_utf8_string_with_index( libfvalue_floating_point_t *floating_point, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_to_utf8_string_with_index"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_utf8_string_with_index_copy_from_floating_point( utf8_string, utf8_string_size, utf8_string_index, floating_point->value, floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit floating point to UTF-8 string.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Copies the floating point from an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_from_utf16_string_with_index( libfvalue_floating_point_t *floating_point, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_from_utf16_string_with_index"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_utf16_string_with_index_copy_to_floating_point( utf16_string, utf16_string_size, utf16_string_index, &( floating_point->value ), floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit floating point from UTF-16 string.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Copies the floating point to an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_to_utf16_string_with_index( libfvalue_floating_point_t *floating_point, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_to_utf16_string_with_index"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_utf16_string_with_index_copy_from_floating_point( utf16_string, utf16_string_size, utf16_string_index, floating_point->value, floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit floating point to UTF-16 string.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Copies the floating point from an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_from_utf32_string_with_index( libfvalue_floating_point_t *floating_point, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_from_utf32_string_with_index"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_utf32_string_with_index_copy_to_floating_point( utf32_string, utf32_string_size, utf32_string_index, &( floating_point->value ), floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit floating point from UTF-32 string.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Copies the floating point to an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_to_utf32_string_with_index( libfvalue_floating_point_t *floating_point, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_to_utf32_string_with_index"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_utf32_string_with_index_copy_from_floating_point( utf32_string, utf32_string_size, utf32_string_index, floating_point->value, floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit floating point to UTF-32 string.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Determines the size of a string of a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_string_size_from_floating_point( size_t *string_size, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { char value_string[ 16 ]; byte_stream_float32_t value_float32; byte_stream_float64_t value_float64; static char *function = "libfvalue_string_size_from_floating_point"; uint64_t divider = 0; uint64_t multiplier = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t exponent_divider = 0; int16_t exponent = 0; uint8_t is_denormalized = 0; uint8_t is_indeterminate = 0; uint8_t is_infinite = 0; uint8_t is_not_a_number = 0; uint8_t is_signed = 0; uint8_t is_zero = 0; uint8_t use_value_string = 0; int8_t bit_shift = 0; int print_count = 0; if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { *string_size = ( floating_point_value_size >> 2 ) + 3; } else { bit_shift = (uint8_t) ( floating_point_value_size - 1 ); is_signed = (uint8_t) ( floating_point_value >> bit_shift ); if( is_signed != 0 ) { floating_point_value &= ~( (uint64_t) 1 << bit_shift ); } switch( floating_point_value_size ) { case 32: if( floating_point_value == 0x7f800000UL ) { is_infinite = 1; } else if( ( is_signed != 0 ) && ( floating_point_value == 0x7fc00000UL ) ) { is_indeterminate = 1; } else if( ( floating_point_value >= 0x7f800001UL ) && ( floating_point_value <= 0x7fffffffUL ) ) { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float32.integer = (uint32_t) floating_point_value; print_count = narrow_string_snprintf( value_string, 16, "%06e", value_float32.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 23 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -126; } else { exponent -= 127; } floating_point_value &= 0x007fffffUL; bit_shift = 23; } else { is_zero = 1; } break; case 64: #if 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 = floating_point_value; print_count = narrow_string_snprintf( value_string, 16, "%06e", value_float64.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 52 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -1023; } else { exponent -= 1023; } #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) floating_point_value &= 0x000fffffffffffffUL; #else floating_point_value &= 0x000fffffffffffffULL; #endif bit_shift = 52; } else { is_zero = 1; } break; } /* The string is at least a single digit with an end of string character */ *string_size = 2; if( is_signed != 0 ) { *string_size += 1; } if( is_indeterminate != 0 ) { *string_size += 3; } else if( is_infinite != 0 ) { *string_size += 3; } else if( is_not_a_number != 0 ) { *string_size += 3; } else if( is_zero == 0 ) { if( is_denormalized != 0 ) { while( bit_shift >= 0 ) { if( ( ( floating_point_value >> bit_shift ) & 0x01 ) != 0 ) { break; } bit_shift--; exponent--; } use_value_string = 1; } else { if( floating_point_value != 0 ) { use_value_string = 1; } if( exponent != 0 ) { use_value_string = 1; } floating_point_value |= (uint64_t) 1 << bit_shift; } if( use_value_string == 0 ) { multiplier = 1; while( bit_shift > 0 ) { value_64bit *= 10; value_64bit += ( ( floating_point_value >> bit_shift ) & 0x01 ) * multiplier; multiplier *= 5; floating_point_value ^= (uint64_t) 1 << bit_shift; if( floating_point_value == 0 ) { break; } if( multiplier > 15625 ) { use_value_string = 1; break; } bit_shift--; } floating_point_value = value_64bit; } if( use_value_string != 0 ) { *string_size += 12; } else { divider = 1; while( ( floating_point_value / divider ) >= 10 ) { divider *= 10; *string_size += 1; } if( exponent != 0 ) { if( exponent < 0 ) { exponent *= -1; } exponent_divider = 1; while( ( exponent / exponent_divider ) >= 10 ) { exponent_divider *= 10; *string_size += 1; } *string_size += 3; } } } } return( 1 ); } /* Copies an UTF-8 encoded string from a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_copy_from_floating_point( uint8_t *utf8_string, size_t utf8_string_size, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf8_string_copy_from_floating_point"; size_t utf8_string_index = 0; if( libfvalue_utf8_string_with_index_copy_from_floating_point( utf8_string, utf8_string_size, &utf8_string_index, floating_point_value, floating_point_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floating point value to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 encoded string of from floating_point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_with_index_copy_from_floating_point( uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { char value_string[ 16 ]; byte_stream_float32_t value_float32; byte_stream_float64_t value_float64; static char *function = "libfvalue_utf8_string_with_index_copy_from_floating_point"; size_t string_index = 0; uint64_t divider = 0; uint64_t multiplier = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t exponent_divider = 0; int16_t exponent = 0; int16_t exponent_value = 0; uint8_t byte_value = 0; uint8_t is_denormalized = 0; uint8_t is_indeterminate = 0; uint8_t is_infinite = 0; uint8_t is_not_a_number = 0; uint8_t is_signed = 0; uint8_t is_zero = 0; uint8_t number_of_characters = 0; uint8_t use_value_string = 0; int8_t bit_shift = 0; int print_count = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string index value out of bounds.", function ); return( -1 ); } string_index = *utf8_string_index; if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { number_of_characters = (uint8_t) ( floating_point_value_size >> 2 ) + 3; } else { bit_shift = (uint8_t) ( floating_point_value_size - 1 ); is_signed = (uint8_t) ( floating_point_value >> bit_shift ); if( is_signed != 0 ) { floating_point_value &= ~( (uint64_t) 1 << bit_shift ); } switch( floating_point_value_size ) { case 32: if( floating_point_value == 0x7f800000UL ) { is_infinite = 1; } else if( ( is_signed != 0 ) && ( floating_point_value == 0x7fc00000UL ) ) { is_indeterminate = 1; } else if( ( floating_point_value >= 0x7f800001UL ) && ( floating_point_value <= 0x7fffffffUL ) ) { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float32.integer = (uint32_t) floating_point_value; print_count = narrow_string_snprintf( value_string, 16, "%06e", value_float32.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 23 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -126; } else { exponent -= 127; } floating_point_value &= 0x007fffffUL; bit_shift = 23; } else { is_zero = 1; } break; case 64: #if 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 = floating_point_value; print_count = narrow_string_snprintf( value_string, 16, "%06e", value_float64.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 52 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -1023; } else { exponent -= 1023; } #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) floating_point_value &= 0x000fffffffffffffUL; #else floating_point_value &= 0x000fffffffffffffULL; #endif bit_shift = 52; } else { is_zero = 1; } break; } /* The string is at least a single digit with an end of string character */ number_of_characters = 2; if( is_signed != 0 ) { number_of_characters += 1; } if( is_indeterminate != 0 ) { number_of_characters += 3; } else if( is_infinite != 0 ) { number_of_characters += 3; } else if( is_not_a_number != 0 ) { number_of_characters += 3; } else if( is_zero == 0 ) { if( is_denormalized != 0 ) { while( bit_shift >= 0 ) { if( ( ( floating_point_value >> bit_shift ) & 0x01 ) != 0 ) { break; } bit_shift--; exponent--; } use_value_string = 1; } else { if( floating_point_value != 0 ) { use_value_string = 1; } if( exponent != 0 ) { use_value_string = 1; } floating_point_value |= (uint64_t) 1 << bit_shift; } if( use_value_string == 0 ) { multiplier = 1; while( bit_shift >= 0 ) { value_64bit *= 10; value_64bit += ( ( floating_point_value >> bit_shift ) & 0x01 ) * multiplier; multiplier *= 5; floating_point_value ^= (uint64_t) 1 << bit_shift; if( floating_point_value == 0 ) { break; } if( multiplier > 15625 ) { use_value_string = 1; break; } bit_shift--; } floating_point_value = value_64bit; } if( use_value_string != 0 ) { number_of_characters += 12; } else { divider = 1; while( ( floating_point_value / divider ) >= 10 ) { divider *= 10; number_of_characters += 1; } exponent_value = exponent; if( exponent_value != 0 ) { if( exponent_value < 0 ) { exponent_value *= -1; } exponent_divider = 1; while( ( exponent_value / exponent_divider ) >= 10 ) { exponent_divider *= 10; number_of_characters += 1; } number_of_characters += 3; } } } } if( ( string_index + number_of_characters ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string size too small.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; bit_shift = (uint8_t) ( floating_point_value_size - 4 ); do { byte_value = (uint8_t) ( ( floating_point_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf8_string[ string_index++ ] = (uint8_t) '-'; } if( is_indeterminate != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'I'; utf8_string[ string_index++ ] = (uint8_t) 'n'; utf8_string[ string_index++ ] = (uint8_t) 'd'; } else if( is_infinite != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'I'; utf8_string[ string_index++ ] = (uint8_t) 'n'; utf8_string[ string_index++ ] = (uint8_t) 'f'; } else if( is_not_a_number != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'N'; utf8_string[ string_index++ ] = (uint8_t) 'a'; utf8_string[ string_index++ ] = (uint8_t) 'N'; } else if( is_zero == 0 ) { if( use_value_string != 0 ) { utf8_string[ string_index++ ] = (uint8_t) value_string[ 0 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 1 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 2 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 3 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 4 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 5 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 6 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 7 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 8 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 9 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 10 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 11 ]; } else { if( divider > 1 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( floating_point_value / divider ); floating_point_value %= divider; divider /= 10; utf8_string[ string_index++ ] = (uint8_t) '.'; while( divider > 1 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( floating_point_value / divider ); floating_point_value %= divider; divider /= 10; } } utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( floating_point_value / divider ); if( exponent != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'e'; if( exponent < 0 ) { exponent *= -1; utf8_string[ string_index++ ] = (uint8_t) '-'; } else { utf8_string[ string_index++ ] = (uint8_t) '+'; } while( exponent_divider > 1 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( exponent / exponent_divider ); exponent %= exponent_divider; exponent_divider /= 10; } utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( exponent / exponent_divider ); } } } else { utf8_string[ string_index++ ] = (uint8_t) '0'; } } utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; return( 1 ); } /* Copies an UTF-8 encoded string to a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_with_index_copy_to_floating_point( uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint64_t *floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf8_string_with_index_copy_to_floating_point"; size_t maximum_string_index = 0; size_t string_index = 0; uint64_t divider = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t character_value = 0; int8_t bit_shift = 0; int8_t sign = 1; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string index value out of bounds.", function ); return( -1 ); } string_index = *utf8_string_index; if( floating_point_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point value.", function ); return( -1 ); } if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { maximum_string_index = (size_t) ( floating_point_value_size >> 2 ) + 3; } else { /* The string is at least a single digit with an end of string character */ maximum_string_index = 2; bit_shift = (uint8_t) ( floating_point_value_size - 1 ); divider = 1; value_64bit = ~( ( ~( (uint64_t) 1 << bit_shift ) >> bit_shift ) << bit_shift ); while( ( value_64bit / divider ) >= 10 ) { divider *= 10; maximum_string_index += 1; } } maximum_string_index += string_index; if( maximum_string_index > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid maximum string index value exceeds maximum.", function ); return( -1 ); } value_64bit = 0; if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { if( utf8_string[ string_index ] != (uint8_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } string_index++; if( utf8_string[ string_index ] != (uint8_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } string_index++; while( string_index < utf8_string_length ) { if( utf8_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit <<= 4; if( ( utf8_string[ string_index ] >= (uint8_t) '0' ) && ( utf8_string[ string_index ] <= (uint8_t) '9' ) ) { byte_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) '0' ); } else if( ( utf8_string[ string_index ] >= (uint8_t) 'A' ) && ( utf8_string[ string_index ] <= (uint8_t) 'F' ) ) { byte_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) 'A' + 10 ); } else if( ( utf8_string[ string_index ] >= (uint8_t) 'a' ) && ( utf8_string[ string_index ] <= (uint8_t) 'f' ) ) { byte_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } value_64bit += byte_value; string_index++; } } else { /* In the maximum possible string one character is substituted for the sign */ if( utf8_string[ string_index ] == (uint8_t) '-' ) { string_index++; sign = -1; } else if( utf8_string[ string_index ] == (uint8_t) '+' ) { string_index++; } while( string_index < utf8_string_length ) { if( utf8_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit *= 10; if( ( utf8_string[ string_index ] < (uint8_t) '0' ) && ( utf8_string[ string_index ] > (uint8_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } character_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) '0' ); value_64bit += character_value; string_index++; } if( sign == -1 ) { value_64bit |= (uint64_t) 1 << bit_shift; } } *utf8_string_index = string_index; *floating_point_value = value_64bit; return( 1 ); } /* Copies an UTF-16 encoded string of a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_copy_from_floating_point( uint16_t *utf16_string, size_t utf16_string_size, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf16_string_copy_from_floating_point"; size_t utf16_string_index = 0; if( libfvalue_utf16_string_with_index_copy_from_floating_point( utf16_string, utf16_string_size, &utf16_string_index, floating_point_value, floating_point_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floating point value to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 encoded string of a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_with_index_copy_from_floating_point( uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { char value_string[ 16 ]; byte_stream_float32_t value_float32; byte_stream_float64_t value_float64; static char *function = "libfvalue_utf16_string_with_index_copy_from_floating_point"; size_t string_index = 0; uint64_t divider = 0; uint64_t multiplier = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t exponent_divider = 0; int16_t exponent = 0; int16_t exponent_value = 0; uint8_t byte_value = 0; uint8_t is_denormalized = 0; uint8_t is_indeterminate = 0; uint8_t is_infinite = 0; uint8_t is_not_a_number = 0; uint8_t is_signed = 0; uint8_t is_zero = 0; uint8_t number_of_characters = 0; uint8_t use_value_string = 0; int8_t bit_shift = 0; int print_count = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-16 string index value out of bounds.", function ); return( -1 ); } string_index = *utf16_string_index; if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { number_of_characters = (uint8_t) ( floating_point_value_size >> 2 ) + 3; } else { bit_shift = (uint8_t) ( floating_point_value_size - 1 ); is_signed = (uint8_t) ( floating_point_value >> bit_shift ); if( is_signed != 0 ) { floating_point_value &= ~( (uint64_t) 1 << bit_shift ); } switch( floating_point_value_size ) { case 32: if( floating_point_value == 0x7f800000UL ) { is_infinite = 1; } else if( ( is_signed != 0 ) && ( floating_point_value == 0x7fc00000UL ) ) { is_indeterminate = 1; } else if( ( floating_point_value >= 0x7f800001UL ) && ( floating_point_value <= 0x7fffffffUL ) ) { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float32.integer = (uint32_t) floating_point_value; print_count = narrow_string_snprintf( value_string, 16, "%06e", value_float32.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 23 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -126; } else { exponent -= 127; } floating_point_value &= 0x007fffffUL; bit_shift = 23; } else { is_zero = 1; } break; case 64: #if 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 = floating_point_value; print_count = narrow_string_snprintf( value_string, 16, "%06e", value_float64.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 52 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -1023; } else { exponent -= 1023; } #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) floating_point_value &= 0x000fffffffffffffUL; #else floating_point_value &= 0x000fffffffffffffULL; #endif bit_shift = 52; } else { is_zero = 1; } break; } /* The string is at least a single digit with an end of string character */ number_of_characters = 2; if( is_signed != 0 ) { number_of_characters += 1; } if( is_indeterminate != 0 ) { number_of_characters += 3; } else if( is_infinite != 0 ) { number_of_characters += 3; } else if( is_not_a_number != 0 ) { number_of_characters += 3; } else if( is_zero == 0 ) { if( is_denormalized != 0 ) { while( bit_shift >= 0 ) { if( ( ( floating_point_value >> bit_shift ) & 0x01 ) != 0 ) { break; } bit_shift--; exponent--; } use_value_string = 1; } else { if( floating_point_value != 0 ) { use_value_string = 1; } if( exponent != 0 ) { use_value_string = 1; } floating_point_value |= (uint64_t) 1 << bit_shift; } if( use_value_string == 0 ) { multiplier = 1; while( bit_shift >= 0 ) { value_64bit *= 10; value_64bit += ( ( floating_point_value >> bit_shift ) & 0x01 ) * multiplier; multiplier *= 5; floating_point_value ^= (uint64_t) 1 << bit_shift; if( floating_point_value == 0 ) { break; } if( multiplier > 15625 ) { use_value_string = 1; break; } bit_shift--; } floating_point_value = value_64bit; } if( use_value_string != 0 ) { number_of_characters += 12; } else { divider = 1; while( ( floating_point_value / divider ) >= 10 ) { divider *= 10; number_of_characters += 1; } exponent_value = exponent; if( exponent_value != 0 ) { if( exponent_value < 0 ) { exponent_value *= -1; } exponent_divider = 1; while( ( exponent_value / exponent_divider ) >= 10 ) { exponent_divider *= 10; number_of_characters += 1; } number_of_characters += 3; } } } } if( ( string_index + number_of_characters ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string size too small.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; bit_shift = (uint8_t) ( floating_point_value_size - 4 ); do { byte_value = (uint8_t) ( ( floating_point_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf16_string[ string_index++ ] = (uint16_t) '-'; } if( is_indeterminate != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'I'; utf16_string[ string_index++ ] = (uint16_t) 'n'; utf16_string[ string_index++ ] = (uint16_t) 'd'; } else if( is_infinite != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'I'; utf16_string[ string_index++ ] = (uint16_t) 'n'; utf16_string[ string_index++ ] = (uint16_t) 'f'; } else if( is_not_a_number != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'N'; utf16_string[ string_index++ ] = (uint16_t) 'a'; utf16_string[ string_index++ ] = (uint16_t) 'N'; } else if( is_zero == 0 ) { if( use_value_string != 0 ) { utf16_string[ string_index++ ] = (uint16_t) value_string[ 0 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 1 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 2 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 3 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 4 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 5 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 6 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 7 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 8 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 9 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 10 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 11 ]; } else { if( divider > 1 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( floating_point_value / divider ); floating_point_value %= divider; divider /= 10; utf16_string[ string_index++ ] = (uint16_t) '.'; while( divider > 1 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( floating_point_value / divider ); floating_point_value %= divider; divider /= 10; } } utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( floating_point_value / divider ); if( exponent != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'e'; if( exponent < 0 ) { exponent *= -1; utf16_string[ string_index++ ] = (uint16_t) '-'; } else { utf16_string[ string_index++ ] = (uint16_t) '+'; } while( exponent_divider > 1 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( exponent / exponent_divider ); exponent %= exponent_divider; exponent_divider /= 10; } utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( exponent / exponent_divider ); } } } else { utf16_string[ string_index++ ] = (uint16_t) '0'; } } utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; return( 1 ); } /* Copies an UTF-16 encoded string to a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_with_index_copy_to_floating_point( uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint64_t *floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf16_string_with_index_copy_to_floating_point"; size_t maximum_string_index = 0; size_t string_index = 0; uint64_t value_64bit = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t character_value = 0; int8_t bit_shift = 0; int8_t sign = 1; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-16 string index value out of bounds.", function ); return( -1 ); } string_index = *utf16_string_index; if( floating_point_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point value.", function ); return( -1 ); } if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { maximum_string_index = (size_t) ( floating_point_value_size >> 2 ) + 3; } else { /* The string is at least a single digit with an end of string character */ maximum_string_index = 2; bit_shift = (uint8_t) ( floating_point_value_size - 1 ); divider = 1; value_64bit = ~( ( ~( (uint64_t) 1 << bit_shift ) >> bit_shift ) << bit_shift ); while( ( value_64bit / divider ) >= 10 ) { divider *= 10; maximum_string_index += 1; } } maximum_string_index += string_index; if( maximum_string_index > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid maximum string index value exceeds maximum.", function ); return( -1 ); } value_64bit = 0; if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { if( utf16_string[ string_index ] != (uint16_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } string_index++; if( utf16_string[ string_index ] != (uint16_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } string_index++; while( string_index < utf16_string_length ) { if( utf16_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit <<= 4; if( ( utf16_string[ string_index ] >= (uint16_t) '0' ) && ( utf16_string[ string_index ] <= (uint16_t) '9' ) ) { byte_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) '0' ); } else if( ( utf16_string[ string_index ] >= (uint16_t) 'A' ) && ( utf16_string[ string_index ] <= (uint16_t) 'F' ) ) { byte_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) 'A' + 10 ); } else if( ( utf16_string[ string_index ] >= (uint16_t) 'a' ) && ( utf16_string[ string_index ] <= (uint16_t) 'f' ) ) { byte_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } value_64bit += byte_value; string_index++; } } else { /* In the maximum possible string one character is substituted for the sign */ if( utf16_string[ string_index ] == (uint16_t) '-' ) { string_index++; sign = -1; } else if( utf16_string[ string_index ] == (uint16_t) '+' ) { string_index++; } while( string_index < utf16_string_length ) { if( utf16_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit *= 10; if( ( utf16_string[ string_index ] < (uint16_t) '0' ) && ( utf16_string[ string_index ] > (uint16_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } character_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) '0' ); value_64bit += character_value; string_index++; } if( sign == -1 ) { value_64bit |= (uint64_t) 1 << bit_shift; } } *utf16_string_index = string_index; *floating_point_value = value_64bit; return( 1 ); } /* Copies an UTF-32 encoded string of a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_copy_from_floating_point( uint32_t *utf32_string, size_t utf32_string_size, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf32_string_copy_from_floating_point"; size_t utf32_string_index = 0; if( libfvalue_utf32_string_with_index_copy_from_floating_point( utf32_string, utf32_string_size, &utf32_string_index, floating_point_value, floating_point_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floating point value to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 encoded string of from floating_point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_with_index_copy_from_floating_point( uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { char value_string[ 16 ]; byte_stream_float32_t value_float32; byte_stream_float64_t value_float64; static char *function = "libfvalue_utf32_string_with_index_copy_from_floating_point"; size_t string_index = 0; uint64_t divider = 0; uint64_t multiplier = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t exponent_divider = 0; int16_t exponent = 0; int16_t exponent_value = 0; uint8_t byte_value = 0; uint8_t is_denormalized = 0; uint8_t is_indeterminate = 0; uint8_t is_infinite = 0; uint8_t is_not_a_number = 0; uint8_t is_signed = 0; uint8_t is_zero = 0; uint8_t number_of_characters = 0; uint8_t use_value_string = 0; int8_t bit_shift = 0; int print_count = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-32 string index value out of bounds.", function ); return( -1 ); } string_index = *utf32_string_index; if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { number_of_characters = (uint8_t) ( floating_point_value_size >> 2 ) + 3; } else { bit_shift = (uint8_t) ( floating_point_value_size - 1 ); is_signed = (uint8_t) ( floating_point_value >> bit_shift ); if( is_signed != 0 ) { floating_point_value &= ~( (uint64_t) 1 << bit_shift ); } switch( floating_point_value_size ) { case 32: if( floating_point_value == 0x7f800000UL ) { is_infinite = 1; } else if( ( is_signed != 0 ) && ( floating_point_value == 0x7fc00000UL ) ) { is_indeterminate = 1; } else if( ( floating_point_value >= 0x7f800001UL ) && ( floating_point_value <= 0x7fffffffUL ) ) { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float32.integer = (uint32_t) floating_point_value; print_count = narrow_string_snprintf( value_string, 16, "%06e", value_float32.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 23 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -126; } else { exponent -= 127; } floating_point_value &= 0x007fffffUL; bit_shift = 23; } else { is_zero = 1; } break; case 64: #if 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 = floating_point_value; print_count = narrow_string_snprintf( value_string, 16, "%06e", value_float64.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 52 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -1023; } else { exponent -= 1023; } #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) floating_point_value &= 0x000fffffffffffffUL; #else floating_point_value &= 0x000fffffffffffffULL; #endif bit_shift = 52; } else { is_zero = 1; } break; } /* The string is at least a single digit with an end of string character */ number_of_characters = 2; if( is_signed != 0 ) { number_of_characters += 1; } if( is_indeterminate != 0 ) { number_of_characters += 3; } else if( is_infinite != 0 ) { number_of_characters += 3; } else if( is_not_a_number != 0 ) { number_of_characters += 3; } else if( is_zero == 0 ) { if( is_denormalized != 0 ) { while( bit_shift >= 0 ) { if( ( ( floating_point_value >> bit_shift ) & 0x01 ) != 0 ) { break; } bit_shift--; exponent--; } use_value_string = 1; } else { if( floating_point_value != 0 ) { use_value_string = 1; } if( exponent != 0 ) { use_value_string = 1; } floating_point_value |= (uint64_t) 1 << bit_shift; } if( use_value_string == 0 ) { multiplier = 1; while( bit_shift >= 0 ) { value_64bit *= 10; value_64bit += ( ( floating_point_value >> bit_shift ) & 0x01 ) * multiplier; multiplier *= 5; floating_point_value ^= (uint64_t) 1 << bit_shift; if( floating_point_value == 0 ) { break; } if( multiplier > 15625 ) { use_value_string = 1; break; } bit_shift--; } floating_point_value = value_64bit; } if( use_value_string != 0 ) { number_of_characters += 12; } else { divider = 1; while( ( floating_point_value / divider ) >= 10 ) { divider *= 10; number_of_characters += 1; } exponent_value = exponent; if( exponent_value != 0 ) { if( exponent_value < 0 ) { exponent_value *= -1; } exponent_divider = 1; while( ( exponent_value / exponent_divider ) >= 10 ) { exponent_divider *= 10; number_of_characters += 1; } number_of_characters += 3; } } } } if( ( string_index + number_of_characters ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string size too small.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; bit_shift = (uint8_t) ( floating_point_value_size - 4 ); do { byte_value = (uint8_t) ( ( floating_point_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf32_string[ string_index++ ] = (uint32_t) '-'; } if( is_indeterminate != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'I'; utf32_string[ string_index++ ] = (uint32_t) 'n'; utf32_string[ string_index++ ] = (uint32_t) 'd'; } else if( is_infinite != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'I'; utf32_string[ string_index++ ] = (uint32_t) 'n'; utf32_string[ string_index++ ] = (uint32_t) 'f'; } else if( is_not_a_number != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'N'; utf32_string[ string_index++ ] = (uint32_t) 'a'; utf32_string[ string_index++ ] = (uint32_t) 'N'; } else if( is_zero == 0 ) { if( use_value_string != 0 ) { utf32_string[ string_index++ ] = (uint32_t) value_string[ 0 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 1 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 2 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 3 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 4 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 5 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 6 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 7 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 8 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 9 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 10 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 11 ]; } else { if( divider > 1 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( floating_point_value / divider ); floating_point_value %= divider; divider /= 10; utf32_string[ string_index++ ] = (uint32_t) '.'; while( divider > 1 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( floating_point_value / divider ); floating_point_value %= divider; divider /= 10; } } utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( floating_point_value / divider ); if( exponent != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'e'; if( exponent < 0 ) { exponent *= -1; utf32_string[ string_index++ ] = (uint32_t) '-'; } else { utf32_string[ string_index++ ] = (uint32_t) '+'; } while( exponent_divider > 1 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( exponent / exponent_divider ); exponent %= exponent_divider; exponent_divider /= 10; } utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( exponent / exponent_divider ); } } } else { utf32_string[ string_index++ ] = (uint32_t) '0'; } } utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; return( 1 ); } /* Copies an UTF-32 encoded string to a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_with_index_copy_to_floating_point( uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint64_t *floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf32_string_with_index_copy_to_floating_point"; size_t maximum_string_index = 0; size_t string_index = 0; uint64_t value_64bit = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t character_value = 0; int8_t bit_shift = 0; int8_t sign = 1; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-32 string index value out of bounds.", function ); return( -1 ); } string_index = *utf32_string_index; if( floating_point_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point value.", function ); return( -1 ); } if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { maximum_string_index = (size_t) ( floating_point_value_size >> 2 ) + 3; } else { /* The string is at least a single digit with an end of string character */ maximum_string_index = 2; bit_shift = (uint8_t) ( floating_point_value_size - 1 ); divider = 1; value_64bit = ~( ( ~( (uint64_t) 1 << bit_shift ) >> bit_shift ) << bit_shift ); while( ( value_64bit / divider ) >= 10 ) { divider *= 10; maximum_string_index += 1; } } maximum_string_index += string_index; if( maximum_string_index > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid maximum string index value exceeds maximum.", function ); return( -1 ); } value_64bit = 0; if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { if( utf32_string[ string_index ] != (uint32_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } string_index++; if( utf32_string[ string_index ] != (uint32_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } string_index++; while( string_index < utf32_string_length ) { if( utf32_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit <<= 4; if( ( utf32_string[ string_index ] >= (uint32_t) '0' ) && ( utf32_string[ string_index ] <= (uint32_t) '9' ) ) { byte_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) '0' ); } else if( ( utf32_string[ string_index ] >= (uint32_t) 'A' ) && ( utf32_string[ string_index ] <= (uint32_t) 'F' ) ) { byte_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) 'A' + 10 ); } else if( ( utf32_string[ string_index ] >= (uint32_t) 'a' ) && ( utf32_string[ string_index ] <= (uint32_t) 'f' ) ) { byte_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } value_64bit += byte_value; string_index++; } } else { /* In the maximum possible string one character is substituted for the sign */ if( utf32_string[ string_index ] == (uint32_t) '-' ) { string_index++; sign = -1; } else if( utf32_string[ string_index ] == (uint32_t) '+' ) { string_index++; } while( string_index < utf32_string_length ) { if( utf32_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit *= 10; if( ( utf32_string[ string_index ] < (uint32_t) '0' ) && ( utf32_string[ string_index ] > (uint32_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } character_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) '0' ); value_64bit += character_value; string_index++; } if( sign == -1 ) { value_64bit |= (uint64_t) 1 << bit_shift; } } *utf32_string_index = string_index; *floating_point_value = value_64bit; return( 1 ); } libevt-20170120/libfvalue/libfvalue_codepage.h0000664000175000017500000000626213040331701023255 0ustar00lordyestalordyesta00000000000000/* * Codepage functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_CODEPAGE_H ) #define _LIBFVALUE_INTERNAL_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFVALUE ) #include /* Define HAVE_LOCAL_LIBFVALUE for local use of libfvalue * The definitions in are copied here * for local use of libfvalue */ #else /* The codepage definitions */ enum LIBFVALUE_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_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 and could be SCSU. */ LIBFVALUE_CODEPAGE_1200_MIXED = (int) 0x800004b0 }; #endif /* !defined( HAVE_LOCAL_LIBFVALUE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_INTERNAL_CODEPAGE_H ) */ libevt-20170120/libfvalue/libfvalue_string.c0000664000175000017500000022721413040331702023012 0ustar00lordyestalordyesta00000000000000/* * String value functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_codepage.h" #include "libfvalue_definitions.h" #include "libfvalue_libcerror.h" #include "libfvalue_libcnotify.h" #include "libfvalue_libuna.h" #include "libfvalue_split_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( ( encoding != LIBFVALUE_CODEPAGE_ASCII ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_1 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_2 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_3 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_4 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_5 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_6 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_7 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_8 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_9 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_10 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_11 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_13 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_14 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_15 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_16 ) && ( encoding != LIBFVALUE_CODEPAGE_KOI8_R ) && ( encoding != LIBFVALUE_CODEPAGE_KOI8_U ) && ( encoding != LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) && ( encoding != LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN ) && ( encoding != LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) && ( encoding != LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN ) && ( encoding != LIBFVALUE_CODEPAGE_UTF7 ) && ( encoding != LIBFVALUE_CODEPAGE_UTF8 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_874 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_932 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_936 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_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 ); } string->data = (uint8_t *) byte_stream; string->data_size = byte_stream_size; string->codepage = encoding; return( 1 ); } /* Copies the string from an UTF-8 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_string_copy_from_utf8_string_with_index( libfvalue_string_t *string, const uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_copy_from_utf8_string_with_index"; size_t value_data_size = 0; int byte_order = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } switch( string->codepage ) { case LIBFVALUE_CODEPAGE_1200_MIXED: 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, utf8_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 stream size of UTF-8 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( libuna_utf32_stream_size_from_utf8( utf8_string, utf8_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-32 stream size of UTF-8 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf7_stream_size_from_utf8( utf8_string, utf8_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-7 stream size of UTF-8 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_stream_size_from_utf8( utf8_string, utf8_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 stream size of UTF-8 string.", function ); goto on_error; } break; default: if( libuna_byte_stream_size_from_utf8( utf8_string, utf8_string_size, string->codepage, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine byte stream size of UTF-8 string.", function ); goto on_error; } break; } if( string->data != NULL ) { if( ( string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( string->data ); string->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_MANAGED ); } string->data = NULL; string->data_size = 0; } string->data_size = value_data_size; string->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * string->data_size ); if( string->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string data.", function ); goto on_error; } string->flags |= LIBFVALUE_VALUE_FLAG_DATA_MANAGED; switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf16_stream_copy_from_utf8( string->data, string->data_size, byte_order, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream from UTF-8 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf32_stream_copy_from_utf8( string->data, string->data_size, byte_order, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream from UTF-8 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf7_stream_copy_from_utf8( string->data, string->data_size, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-7 stream from UTF-8 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_stream_copy_from_utf8( string->data, string->data_size, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 stream from UTF-8 string.", function ); goto on_error; } break; default: if( libuna_byte_stream_copy_from_utf8( string->data, string->data_size, string->codepage, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream from UTF-8 string.", function ); goto on_error; } break; } return( 1 ); on_error: if( string->data != NULL ) { if( ( string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( string->data ); string->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_MANAGED ); } string->data = NULL; string->data_size = 0; } return( -1 ); } /* Retrieves the size of an UTF-8 encoded string of the string * Returns 1 if successful or -1 on error */ int libfvalue_string_get_utf8_string_size( libfvalue_string_t *string, size_t *utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_get_utf8_string_size"; int byte_order = 0; 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_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_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf8_string_with_index_copy_from_utf16_stream( utf8_string, utf8_string_size, utf8_string_index, string->data, string->data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream to UTF-8 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf8_string_with_index_copy_from_utf32_stream( utf8_string, utf8_string_size, utf8_string_index, string->data, string->data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream to UTF-8 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf8_string_with_index_copy_from_utf7_stream( utf8_string, utf8_string_size, utf8_string_index, string->data, string->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-7 stream to UTF-8 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_string_with_index_copy_from_utf8_stream( utf8_string, utf8_string_size, utf8_string_index, string->data, string->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 stream to UTF-8 string.", function ); return( -1 ); } break; default: if( libuna_utf8_string_with_index_copy_from_byte_stream( utf8_string, utf8_string_size, utf8_string_index, string->data, string->data_size, string->codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to UTF-8 string.", function ); return( -1 ); } break; } return( 1 ); } /* Copies the string from an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_string_copy_from_utf16_string_with_index( libfvalue_string_t *string, const uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_copy_from_utf16_string_with_index"; size_t value_data_size = 0; int byte_order = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } switch( string->codepage ) { case LIBFVALUE_CODEPAGE_1200_MIXED: 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, utf16_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 stream size of UTF-16 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( libuna_utf32_stream_size_from_utf16( utf16_string, utf16_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-32 stream size of UTF-16 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf7_stream_size_from_utf16( utf16_string, utf16_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-7 stream size of UTF-16 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_stream_size_from_utf16( utf16_string, utf16_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 stream size of UTF-16 string.", function ); goto on_error; } break; default: if( libuna_byte_stream_size_from_utf16( utf16_string, utf16_string_size, string->codepage, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine byte stream size of UTF-16 string.", function ); goto on_error; } break; } if( string->data != NULL ) { if( ( string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( string->data ); string->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_MANAGED ); } string->data = NULL; string->data_size = 0; } string->data_size = value_data_size; string->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * string->data_size ); if( string->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string data.", function ); goto on_error; } string->flags |= LIBFVALUE_VALUE_FLAG_DATA_MANAGED; switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf16_stream_copy_from_utf16( string->data, string->data_size, byte_order, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream from UTF-16 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf32_stream_copy_from_utf16( string->data, string->data_size, byte_order, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream from UTF-16 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf7_stream_copy_from_utf16( string->data, string->data_size, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-7 stream from UTF-16 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_stream_copy_from_utf16( string->data, string->data_size, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 stream from UTF-16 string.", function ); goto on_error; } break; default: if( libuna_byte_stream_copy_from_utf16( string->data, string->data_size, string->codepage, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream from UTF-16 string.", function ); goto on_error; } break; } return( 1 ); on_error: if( string->data != NULL ) { if( ( string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( string->data ); string->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_MANAGED ); } string->data = NULL; string->data_size = 0; } return( -1 ); } /* Retrieves the size of an UTF-16 encoded string of the string * Returns 1 if successful or -1 on error */ int libfvalue_string_get_utf16_string_size( libfvalue_string_t *string, size_t *utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_get_utf16_string_size"; int byte_order = 0; 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_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_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf16_string_with_index_copy_from_utf16_stream( utf16_string, utf16_string_size, utf16_string_index, string->data, string->data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream to UTF-16 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf16_string_with_index_copy_from_utf32_stream( utf16_string, utf16_string_size, utf16_string_index, string->data, string->data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream to UTF-16 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf16_string_with_index_copy_from_utf7_stream( utf16_string, utf16_string_size, utf16_string_index, string->data, string->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-7 stream to UTF-16 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf16_string_with_index_copy_from_utf8_stream( utf16_string, utf16_string_size, utf16_string_index, string->data, string->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 stream to UTF-16 string.", function ); return( -1 ); } break; default: if( libuna_utf16_string_with_index_copy_from_byte_stream( utf16_string, utf16_string_size, utf16_string_index, string->data, string->data_size, string->codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to UTF-16 string.", function ); return( -1 ); } break; } return( 1 ); } /* Copies the string from an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_string_copy_from_utf32_string_with_index( libfvalue_string_t *string, const uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_copy_from_utf32_string_with_index"; size_t value_data_size = 0; int byte_order = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } switch( string->codepage ) { case LIBFVALUE_CODEPAGE_1200_MIXED: 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, utf32_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 stream size of UTF-32 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( libuna_utf32_stream_size_from_utf32( utf32_string, utf32_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-32 stream size of UTF-32 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf7_stream_size_from_utf32( utf32_string, utf32_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-7 stream size of UTF-32 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_stream_size_from_utf32( utf32_string, utf32_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 stream size of UTF-32 string.", function ); goto on_error; } break; default: if( libuna_byte_stream_size_from_utf32( utf32_string, utf32_string_size, string->codepage, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine byte stream size of UTF-32 string.", function ); goto on_error; } break; } if( string->data != NULL ) { if( ( string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( string->data ); string->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_MANAGED ); } string->data = NULL; string->data_size = 0; } string->data_size = value_data_size; string->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * string->data_size ); if( string->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string data.", function ); goto on_error; } string->flags |= LIBFVALUE_VALUE_FLAG_DATA_MANAGED; switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf16_stream_copy_from_utf32( string->data, string->data_size, byte_order, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream from UTF-32 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf32_stream_copy_from_utf32( string->data, string->data_size, byte_order, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream from UTF-32 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf7_stream_copy_from_utf32( string->data, string->data_size, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-7 stream from UTF-32 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_stream_copy_from_utf32( string->data, string->data_size, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 stream from UTF-32 string.", function ); goto on_error; } break; default: if( libuna_byte_stream_copy_from_utf32( string->data, string->data_size, string->codepage, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream from UTF-32 string.", function ); goto on_error; } break; } return( 1 ); on_error: if( string->data != NULL ) { if( ( string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( string->data ); string->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_MANAGED ); } string->data = NULL; string->data_size = 0; } return( -1 ); } /* Retrieves the size of an UTF-32 encoded string of the string * Returns 1 if successful or -1 on error */ int libfvalue_string_get_utf32_string_size( libfvalue_string_t *string, size_t *utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_get_utf32_string_size"; int byte_order = 0; 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_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_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf32_string_with_index_copy_from_utf16_stream( utf32_string, utf32_string_size, utf32_string_index, string->data, string->data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream to UTF-32 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf32_string_with_index_copy_from_utf32_stream( utf32_string, utf32_string_size, utf32_string_index, string->data, string->data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream to UTF-32 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf32_string_with_index_copy_from_utf7_stream( utf32_string, utf32_string_size, utf32_string_index, string->data, string->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-7 stream to UTF-32 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf32_string_with_index_copy_from_utf8_stream( utf32_string, utf32_string_size, utf32_string_index, string->data, string->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 stream to UTF-32 string.", function ); return( -1 ); } break; default: if( libuna_utf32_string_with_index_copy_from_byte_stream( utf32_string, utf32_string_size, utf32_string_index, string->data, string->data_size, string->codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to UTF-32 string.", function ); return( -1 ); } break; } return( 1 ); } /* Splits an UTF-8 string * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_split( const uint8_t *utf8_string, size_t utf8_string_size, uint8_t delimiter, libfvalue_split_utf8_string_t **split_string, libcerror_error_t **error ) { uint8_t *segment_start = NULL; uint8_t *segment_end = NULL; uint8_t *string_end = NULL; static char *function = "libfvalue_utf8_string_split"; size_t string_size = 0; ssize_t segment_length = 0; int number_of_segments = 0; int segment_index = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } if( *split_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid split string already set.", function ); return( -1 ); } /* An empty string has no segments */ if( ( utf8_string_size == 0 ) || ( utf8_string[ 0 ] == 0 ) ) { return( 1 ); } /* Determine the number of segments */ segment_start = (uint8_t *) utf8_string; string_end = (uint8_t *) &( utf8_string[ utf8_string_size - 1 ] ); do { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end > string_end ) { break; } segment_index++; if( segment_end == NULL ) { break; } if( segment_end == segment_start ) { segment_start++; } else if( segment_end != utf8_string ) { segment_start = segment_end + 1; } } while( segment_end != NULL ); number_of_segments = segment_index; if( libfvalue_split_utf8_string_initialize( split_string, utf8_string, utf8_string_size, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to intialize split string.", function ); goto on_error; } if( *split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing split string.", function ); goto on_error; } /* Do not bother splitting empty strings */ if( number_of_segments == 0 ) { return( 1 ); } /* Determine the segments * empty segments are stored as strings only containing the end of character */ if( libfvalue_split_utf8_string_get_string( *split_string, &segment_start, &string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve split UTF-8 string.", function ); goto on_error; } if( segment_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing segment start.", function ); goto on_error; } if( string_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string size value out of bounds.", function ); goto on_error; } string_end = &( segment_start[ string_size - 1 ] ); for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end == NULL ) { segment_length = (ssize_t) ( string_end - segment_start ); } else { segment_length = (ssize_t) ( segment_end - segment_start ); } if( segment_length >= 0 ) { segment_start[ segment_length ] = 0; if( libfvalue_split_utf8_string_set_segment_by_index( *split_string, segment_index, segment_start, segment_length + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set split UTF-8 string segment: %d.", function, segment_index ); goto on_error; } } if( segment_end == NULL ) { break; } if( segment_end == string_end ) { segment_start++; } if( segment_end != string_end ) { segment_start = segment_end + 1; } } return( 1 ); on_error: if( *split_string != NULL ) { libfvalue_split_utf8_string_free( split_string, NULL ); } return( -1 ); } /* Splits an UTF-16 string * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_split( const uint16_t *utf16_string, size_t utf16_string_size, uint16_t delimiter, libfvalue_split_utf16_string_t **split_string, libcerror_error_t **error ) { uint16_t *segment_start = NULL; uint16_t *segment_end = NULL; uint16_t *string_end = NULL; static char *function = "libfvalue_utf16_string_split"; size_t string_size = 0; ssize_t segment_length = 0; int number_of_segments = 0; int segment_index = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } if( *split_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid split string already set.", function ); return( -1 ); } /* An empty string has no segments */ if( ( utf16_string_size == 0 ) || ( utf16_string[ 0 ] == 0 ) ) { return( 1 ); } /* Determine the number of segments */ segment_start = (uint16_t *) utf16_string; string_end = (uint16_t *) &( utf16_string[ utf16_string_size - 1 ] ); do { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end > string_end ) { break; } segment_index++; if( segment_end == NULL ) { break; } if( segment_end == segment_start ) { segment_start++; } else if( segment_end != utf16_string ) { segment_start = segment_end + 1; } } while( segment_end != NULL ); number_of_segments = segment_index; if( libfvalue_split_utf16_string_initialize( split_string, utf16_string, utf16_string_size, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to intialize split string.", function ); goto on_error; } if( *split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing split string.", function ); goto on_error; } /* Do not bother splitting empty strings */ if( number_of_segments == 0 ) { return( 1 ); } /* Determine the segments * empty segments are stored as strings only containing the end of character */ if( libfvalue_split_utf16_string_get_string( *split_string, &segment_start, &string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve split UTF-16 string.", function ); goto on_error; } if( segment_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing segment start.", function ); goto on_error; } if( string_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string size value out of bounds.", function ); goto on_error; } string_end = &( segment_start[ string_size - 1 ] ); for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end == NULL ) { segment_length = (ssize_t) ( string_end - segment_start ); } else { segment_length = (ssize_t) ( segment_end - segment_start ); } if( segment_length >= 0 ) { segment_start[ segment_length ] = 0; if( libfvalue_split_utf16_string_set_segment_by_index( *split_string, segment_index, segment_start, segment_length + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set split UTF-16 string segment: %d.", function, segment_index ); goto on_error; } } if( segment_end == NULL ) { break; } if( segment_end == string_end ) { segment_start++; } if( segment_end != string_end ) { segment_start = segment_end + 1; } } return( 1 ); on_error: if( *split_string != NULL ) { libfvalue_split_utf16_string_free( split_string, NULL ); } return( -1 ); } libevt-20170120/libfvalue/libfvalue_data_handle.c0000664000175000017500000011606513040331701023730 0ustar00lordyestalordyesta00000000000000/* * Data handle functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_data_handle.h" #include "libfvalue_definitions.h" #include "libfvalue_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_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_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( 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 + value_entry_size ) > internal_data_handle->data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value entry 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 + value_entry_size ) > internal_data_handle->data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value entry 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 + value_entry_size ) > internal_data_handle->data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value entry: %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 ); } 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 + value_entry_size ) > internal_data_handle->data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value entry: %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; void *reallocation = NULL; static char *function = "libfvalue_data_handle_append_value_entry_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( value_entry_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value entry index.", function ); return( -1 ); } if( value_entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value entry data.", function ); return( -1 ); } if( value_entry_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value entry data size value exceeds maximum.", function ); return( -1 ); } if( internal_data_handle->data == NULL ) { if( libfvalue_data_handle_set_data( data_handle, value_entry_data, value_entry_data_size, encoding, LIBFVALUE_VALUE_DATA_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data in data handle.", function ); goto on_error; } internal_data_handle->encoding = encoding; } else { if( encoding != internal_data_handle->encoding ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid encoding value out of bounds.", function ); return( -1 ); } if( ( internal_data_handle->data_size + value_entry_data_size ) > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value entry data size value exceeds maximum.", function ); return( -1 ); } if( internal_data_handle->value_entries == NULL ) { if( 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 = memory_reallocate( internal_data_handle->data, internal_data_handle->data_size + value_entry_data_size ); if( reallocation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to resize array entries.", function ); goto on_error; } internal_data_handle->data = (uint8_t *) reallocation; internal_data_handle->data_size += value_entry_data_size; if( memory_copy( &( ( internal_data_handle->data )[ value_entry->offset ] ), value_entry_data, value_entry->size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy value entry data.", function ); goto on_error; } if( 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 ); } libevt-20170120/libfvalue/libfvalue_libcdata.h0000664000175000017500000000302213040331701023240 0ustar00lordyestalordyesta00000000000000/* * The internal libcdata header * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_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 ) */ libevt-20170120/libfvalue/libfvalue_extern.h0000664000175000017500000000256113040331701023011 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_EXTERN_H ) #define _LIBFVALUE_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFVALUE for local use of libfvalue */ #if !defined( HAVE_LOCAL_LIBFVALUE ) /* If libtool DLL support is enabled set LIBFVALUE_DLL_EXPORT * before including libfvalue/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFVALUE_DLL_EXPORT #endif #include #else #define LIBFVALUE_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBFVALUE ) */ #endif /* !defined( _LIBFVALUE_INTERNAL_EXTERN_H ) */ libevt-20170120/libfvalue/libfvalue_libfdatetime.h0000664000175000017500000000345313040331701024136 0ustar00lordyestalordyesta00000000000000/* * The libfdatetime header wrapper * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBFDATETIME_H ) #define _LIBFVALUE_LIBFDATETIME_H #include /* Define HAVE_LOCAL_LIBFDATETIME for local use of libfdatetime */ #if defined( HAVE_LOCAL_LIBFDATETIME ) #include #include #include #include #include #include #include #include #include #include /* Note that libfvalue does not require to have libfdatetime support */ #elif defined( HAVE_LIBFDATETIME_H ) /* If libtool DLL support is enabled set LIBFDATETIME_DLL_IMPORT * before including libfdatetime.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFDATETIME_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBFDATETIME ) */ #endif /* !defined( _LIBFVALUE_LIBFDATETIME_H ) */ libevt-20170120/libfvalue/libfvalue_value_entry.h0000664000175000017500000000320313040331702024034 0ustar00lordyestalordyesta00000000000000/* * Value entry functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_VALUE_ENTRY_H ) #define _LIBFVALUE_VALUE_ENTRY_H #include #include #include "libfvalue_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_value_entry libfvalue_value_entry_t; struct libfvalue_value_entry { /* The offset */ size_t offset; /* The size */ size_t size; }; int libfvalue_value_entry_initialize( libfvalue_value_entry_t **value_entry, libcerror_error_t **error ); int libfvalue_value_entry_free( libfvalue_value_entry_t **value_entry, libcerror_error_t **error ); int libfvalue_value_entry_clone( libfvalue_value_entry_t **destination_value_entry, libfvalue_value_entry_t *source_value_entry, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_VALUE_ENTRY_H ) */ libevt-20170120/libfvalue/libfvalue_split_string.c0000664000175000017500000006445713040331702024235 0ustar00lordyestalordyesta00000000000000/* * Split string functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_libcerror.h" #include "libfvalue_split_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( number_of_segments < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid number of segments less than zero.", function ); return( -1 ); } if( *split_string == NULL ) { internal_split_string = memory_allocate_structure( libfvalue_internal_split_utf8_string_t ); if( internal_split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create split string.", function ); goto on_error; } if( memory_set( internal_split_string, 0, sizeof( libfvalue_internal_split_utf8_string_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear split string.", function ); memory_free( internal_split_string ); return( -1 ); } if( ( utf8_string != NULL ) && ( utf8_string_size > 0 ) ) { internal_split_string->string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * utf8_string_size ); if( internal_split_string->string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string.", function ); goto on_error; } if( memory_copy( internal_split_string->string, utf8_string, sizeof( uint8_t ) * ( utf8_string_size - 1 ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to copy string.", function ); goto on_error; } internal_split_string->string[ utf8_string_size - 1 ] = 0; internal_split_string->string_size = utf8_string_size; } if( number_of_segments > 0 ) { internal_split_string->segments = (uint8_t **) memory_allocate( sizeof( uint8_t * ) * number_of_segments ); if( internal_split_string->segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create segments.", function ); goto on_error; } if( memory_set( internal_split_string->segments, 0, sizeof( uint8_t * ) * number_of_segments ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear segments.", function ); goto on_error; } internal_split_string->segment_sizes = (size_t *) memory_allocate( sizeof( size_t ) * number_of_segments ); if( internal_split_string->segment_sizes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create segment sizes.", function ); goto on_error; } if( memory_set( internal_split_string->segment_sizes, 0, sizeof( size_t ) * number_of_segments ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear segment sizes.", function ); goto on_error; } } internal_split_string->number_of_segments = number_of_segments; *split_string = (libfvalue_split_utf8_string_t *) internal_split_string; } return( 1 ); on_error: if( internal_split_string != NULL ) { if( internal_split_string->segment_sizes != NULL ) { memory_free( internal_split_string->segment_sizes ); } if( internal_split_string->segments != NULL ) { memory_free( internal_split_string->segments ); } if( internal_split_string->string != NULL ) { memory_free( internal_split_string->string ); } memory_free( internal_split_string ); } return( -1 ); } /* Frees 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 ); } /* 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( number_of_segments < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid number of segments less than zero.", function ); return( -1 ); } if( *split_string == NULL ) { internal_split_string = memory_allocate_structure( libfvalue_internal_split_utf16_string_t ); if( internal_split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create split string.", function ); goto on_error; } if( memory_set( internal_split_string, 0, sizeof( libfvalue_internal_split_utf16_string_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear split string.", function ); memory_free( internal_split_string ); return( -1 ); } if( ( utf16_string != NULL ) && ( utf16_string_size > 0 ) ) { internal_split_string->string = (uint16_t *) memory_allocate( sizeof( uint16_t ) * utf16_string_size ); if( internal_split_string->string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string.", function ); goto on_error; } if( memory_copy( internal_split_string->string, utf16_string, sizeof( uint16_t ) * ( utf16_string_size - 1 ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to copy string.", function ); goto on_error; } internal_split_string->string[ utf16_string_size - 1 ] = 0; internal_split_string->string_size = utf16_string_size; } if( number_of_segments > 0 ) { internal_split_string->segments = (uint16_t **) memory_allocate( sizeof( uint16_t * ) * number_of_segments ); if( internal_split_string->segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create segments.", function ); goto on_error; } if( memory_set( internal_split_string->segments, 0, sizeof( uint16_t * ) * number_of_segments ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear segments.", function ); goto on_error; } internal_split_string->segment_sizes = (size_t *) memory_allocate( sizeof( size_t ) * number_of_segments ); if( internal_split_string->segment_sizes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create segment sizes.", function ); goto on_error; } if( memory_set( internal_split_string->segment_sizes, 0, sizeof( size_t ) * number_of_segments ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear segment sizes.", function ); goto on_error; } } internal_split_string->number_of_segments = number_of_segments; *split_string = (libfvalue_split_utf16_string_t *) internal_split_string; } return( 1 ); on_error: if( internal_split_string != NULL ) { if( internal_split_string->segment_sizes != NULL ) { memory_free( internal_split_string->segment_sizes ); } if( internal_split_string->segments != NULL ) { memory_free( internal_split_string->segments ); } if( internal_split_string->string != NULL ) { memory_free( internal_split_string->string ); } memory_free( internal_split_string ); } return( -1 ); } /* Frees 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 ); } libevt-20170120/libfvalue/libfvalue_value.h0000664000175000017500000004744113040331702022627 0ustar00lordyestalordyesta00000000000000/* * Value functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_VALUE_H ) #define _LIBFVALUE_INTERNAL_VALUE_H #include #include #include #include "libfvalue_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 ) */ libevt-20170120/libfvalue/libfvalue_binary_data.h0000664000175000017500000000630213040331701023756 0ustar00lordyestalordyesta00000000000000/* * Binary data value functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_BINARY_DATA_H ) #define _LIBFVALUE_BINARY_DATA_H #include #include #include "libfvalue_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_binary_data libfvalue_binary_data_t; struct libfvalue_binary_data { /* The data */ const uint8_t *data; /* The data size */ size_t data_size; }; int libfvalue_binary_data_initialize( libfvalue_binary_data_t **binary_data, libcerror_error_t **error ); int libfvalue_binary_data_free( libfvalue_binary_data_t **binary_data, libcerror_error_t **error ); int libfvalue_binary_data_clone( libfvalue_binary_data_t **destination_binary_data, libfvalue_binary_data_t *source_binary_data, libcerror_error_t **error ); int libfvalue_binary_data_copy_from_byte_stream( libfvalue_binary_data_t *binary_data, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ); int libfvalue_binary_data_get_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 ) */ libevt-20170120/libfvalue/libfvalue_value_type.h0000664000175000017500000000457013040331702023664 0ustar00lordyestalordyesta00000000000000/* * Value type functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_VALUE_TYPE_H ) #define _LIBFVALUE_INTERNAL_VALUE_TYPE_H #include #include #include #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBFVALUE_EXTERN \ int libfvalue_value_type_initialize( libfvalue_value_t **value, int type, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_type_initialize_with_data_handle( libfvalue_value_t **value, int type, 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( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_INTERNAL_VALUE_TYPE_H ) */ libevt-20170120/libfvalue/libfvalue_value_type.c0000664000175000017500000010740713040331702023662 0ustar00lordyestalordyesta00000000000000/* * Value functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libfvalue_binary_data.h" #include "libfvalue_data_handle.h" #include "libfvalue_definitions.h" #include "libfvalue_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_H ) || defined( HAVE_LOCAL_LIBFDATETIME ) #include "libfvalue_libfdatetime.h" #endif #if defined( HAVE_LIBFGUID_H ) || defined( HAVE_LOCAL_LIBFGUID ) #include "libfvalue_libfguid.h" #endif #if defined( HAVE_LIBFWNT_H ) || defined( HAVE_LOCAL_LIBFWNT ) #include "libfvalue_libfwnt.h" #endif const char *libfvalue_value_type_strings[ 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_H ) || defined( HAVE_LOCAL_LIBFDATETIME ) case LIBFVALUE_VALUE_TYPE_FAT_DATE_TIME: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, (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 **)) &libfdatetime_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 #if defined( HAVE_LIBFGUID_H ) || defined( HAVE_LOCAL_LIBFGUID ) case LIBFVALUE_VALUE_TYPE_GUID: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, (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 #if defined( HAVE_LIBFWNT_H ) || defined( HAVE_LOCAL_LIBFWNT ) case LIBFVALUE_VALUE_TYPE_NT_SECURITY_IDENTIFIER: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, (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 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 } return( (ssize_t) data_index ); } /* Sets the data of a variable sized string * This function will look for a end-of-string character as the indicator * of the end of the string upto data size * Returns data size of the string if successful or -1 on error */ ssize_t libfvalue_value_type_set_data_string( libfvalue_value_t *value, const uint8_t *data, size_t data_size, int encoding, uint8_t flags, libcerror_error_t **error ) { static char *function = "libfvalue_value_type_set_data_string"; ssize_t data_index = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } data_index = libfvalue_value_type_get_string_size( value, data, data_size, error ); if( data_index == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to determine data string size.", function ); return( -1 ); } if( libfvalue_value_set_data( value, data, (size_t) data_index, encoding, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value entry.", function ); return( -1 ); } return( data_index ); } /* Append the data of a variable sized string * This function will look for a end-of-string character as the indicator * of the end of the string upto data size * Returns data size of the string if successful or -1 on error */ ssize_t libfvalue_value_type_append_data_string( libfvalue_value_t *value, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ) { static char *function = "libfvalue_value_type_append_data_string"; ssize_t data_index = 0; int value_entry_index = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } data_index = libfvalue_value_type_get_string_size( value, data, data_size, error ); if( data_index == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to determine data string size.", function ); return( -1 ); } if( libfvalue_value_append_entry_data( value, &value_entry_index, data, (size_t) data_index, encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value entry.", function ); return( -1 ); } return( data_index ); } /* Sets the data of an array of variable sized strings * This function will look for a NUL-character as the indicator of * the end of the string upto data_size * Returns data size of the string array if successful or -1 on error */ ssize_t libfvalue_value_type_set_data_strings_array( libfvalue_value_t *value, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ) { static char *function = "libfvalue_value_type_set_data_strings_array"; ssize_t data_index = 0; ssize_t last_data_index = 0; int value_entry_index = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } while( (size_t) last_data_index < data_size ) { data_index = libfvalue_value_type_get_string_size( value, &( data[ last_data_index ] ), data_size - last_data_index, error ); if( data_index == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to determine data string size.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: strings array value entry: %d data 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 ); } libevt-20170120/libfvalue/Makefile.in0000664000175000017500000010440413040342657021362 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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 = libfvalue ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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_string.c libfvalue_split_string.h \ libfvalue_string.c libfvalue_string.h libfvalue_types.h \ libfvalue_table.c libfvalue_table.h libfvalue_value.c \ libfvalue_value.h libfvalue_value_entry.c \ libfvalue_value_entry.h libfvalue_value_type.c \ libfvalue_value_type.h libfvalue_support.c libfvalue_support.h \ libfvalue_unused.h @HAVE_LOCAL_LIBFVALUE_TRUE@am_libfvalue_la_OBJECTS = \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_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_string.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_string.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_table.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_value.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_value_entry.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_value_type.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_support.lo libfvalue_la_OBJECTS = $(am_libfvalue_la_OBJECTS) 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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFVALUE_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFVALUE_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFVALUE_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFVALUE_TRUE@ @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_string.c libfvalue_split_string.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_string.c libfvalue_string.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_types.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_table.c libfvalue_table.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_value.c libfvalue_value.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_value_entry.c libfvalue_value_entry.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_value_type.c libfvalue_value_type.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_support.c libfvalue_support.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_unused.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfvalue/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfvalue/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_data_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_filetime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_floating_point.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_integer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_split_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_value_entry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_value_type.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfvalue ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfvalue_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libfvalue/libfvalue_libuna.h0000664000175000017500000000324013040331702022752 0ustar00lordyestalordyesta00000000000000/* * The libuna header wrapper * * Copyright (C) 2010-2017, Joachim Metz * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBUNA_H ) #define _LIBFVALUE_LIBUNA_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT * before including libuna.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBUNA_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _LIBFVALUE_LIBUNA_H ) */ libevt-20170120/libfvalue/libfvalue_error.c0000664000175000017500000000555613040331701022637 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_error.h" #include "libfvalue_libcerror.h" #if !defined( HAVE_LOCAL_LIBFVALUE ) /* Free an error and its elements */ void libfvalue_error_free( libfvalue_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfvalue_error_fprint( libfvalue_error_t *error, FILE *stream ) { 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 ) */ libevt-20170120/libfvalue/libfvalue_error.h0000664000175000017500000000343413040331701022635 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_ERROR_H ) #define _LIBFVALUE_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFVALUE ) #include #endif #include "libfvalue_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFVALUE ) LIBFVALUE_EXTERN \ void libfvalue_error_free( libfvalue_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_error_fprint( libfvalue_error_t *error, FILE *stream ); LIBFVALUE_EXTERN \ int libfvalue_error_sprint( libfvalue_error_t *error, char *string, size_t size ); LIBFVALUE_EXTERN \ int libfvalue_error_backtrace_fprint( libfvalue_error_t *error, FILE *stream ); LIBFVALUE_EXTERN \ int libfvalue_error_backtrace_sprint( libfvalue_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBFVALUE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_INTERNAL_ERROR_H ) */ libevt-20170120/libfvalue/libfvalue_filetime.c0000664000175000017500000000554713040331701023304 0ustar00lordyestalordyesta00000000000000/* * Filetime functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libfvalue_definitions.h" #include "libfvalue_filetime.h" #include "libfvalue_libcerror.h" #include "libfvalue_libfdatetime.h" #if defined( HAVE_LIBFDATETIME_H ) || 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_H ) || defined( HAVE_LOCAL_LIBFDATETIME ) */ libevt-20170120/libfvalue/libfvalue_table.c0000664000175000017500000007613213040331702022574 0ustar00lordyestalordyesta00000000000000/* * Values table functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfvalue_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 ); goto on_error; } 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 > (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; } /* Determine if the XML tag is an open or close tag: '/' */ if( utf8_string[ string_index ] != 0x2f ) { xml_tag_type = LIBFVALUE_XML_TAG_TYPE_OPEN; } else { xml_tag_type = LIBFVALUE_XML_TAG_TYPE_CLOSE; string_index++; } xml_tag_name = &( utf8_string[ string_index ] ); xml_tag_name_length = 0; while( string_index < utf8_string_size ) { /* The XML tag name should only consists of: [A-Za-z0-9_] */ if( ( ( utf8_string[ string_index ] >= 0x41 ) && ( utf8_string[ string_index ] <= 0x5a ) ) || ( ( utf8_string[ string_index ] >= 0x61 ) && ( utf8_string[ string_index ] <= 0x7a ) ) || ( ( utf8_string[ string_index ] >= 0x30 ) && ( utf8_string[ string_index ] <= 0x39 ) ) || ( utf8_string[ string_index ] == 0x5f ) ) { xml_tag_name_length++; } else { break; } string_index++; } /* TODO add support for XML tag attributes but ignore them for now */ while( string_index < utf8_string_size ) { /* Look for the end of the XML tag: '>' */ if( utf8_string[ string_index ] == 0x3e ) { break; } string_index++; } /* Look for the end of the XML tag: '>' */ if( utf8_string[ string_index++ ] != 0x3e ) { continue; } if( ( xml_tag_name == NULL ) || ( xml_tag_name_length == 0 ) ) { continue; } if( xml_table_name == NULL ) { if( ( xml_tag_type == LIBFVALUE_XML_TAG_TYPE_OPEN ) && ( xml_tag_name_length == table_name_length ) && ( 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 ' * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBFGUID_H ) #define _LIBFVALUE_LIBFGUID_H #include /* Define HAVE_LOCAL_LIBFGUID for local use of libfguid */ #if defined( HAVE_LOCAL_LIBFGUID ) #include #include #include /* Note that libfvalue does not require to have libfguid support */ #elif defined( HAVE_LIBFGUID_H ) /* If libtool DLL support is enabled set LIBFGUID_DLL_IMPORT * before including libfguid.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFGUID_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBFGUID ) */ #endif /* !defined( _LIBFVALUE_LIBFGUID_H ) */ libevt-20170120/libfvalue/libfvalue_string.h0000664000175000017500000001050013040331702023003 0ustar00lordyestalordyesta00000000000000/* * String value functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBVALUE_STRING_H ) #define _LIBVALUE_STRING_H #include #include #include "libfvalue_definitions.h" #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #if defined( _cplusplus ) extern "C" { #endif typedef struct libfvalue_string libfvalue_string_t; struct libfvalue_string { /* The data */ uint8_t *data; /* The data size */ size_t data_size; /* The codepage */ int codepage; /* The flags */ uint8_t flags; }; int libfvalue_string_initialize( libfvalue_string_t **string, libcerror_error_t **error ); int libfvalue_string_free( libfvalue_string_t **string, libcerror_error_t **error ); int libfvalue_string_clone( libfvalue_string_t **destination_string, libfvalue_string_t *source_string, libcerror_error_t **error ); int libfvalue_string_copy_from_byte_stream( libfvalue_string_t *string, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ); int libfvalue_string_copy_from_utf8_string_with_index( libfvalue_string_t *string, const uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_get_utf8_string_size( libfvalue_string_t *string, size_t *utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_copy_to_utf8_string_with_index( libfvalue_string_t *string, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_copy_from_utf16_string_with_index( libfvalue_string_t *string, const uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_get_utf16_string_size( libfvalue_string_t *string, size_t *utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_copy_to_utf16_string_with_index( libfvalue_string_t *string, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_copy_from_utf32_string_with_index( libfvalue_string_t *string, const uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_get_utf32_string_size( libfvalue_string_t *string, size_t *utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_copy_to_utf32_string_with_index( libfvalue_string_t *string, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_split( const uint8_t *utf8_string, size_t utf8_string_size, uint8_t delimiter, libfvalue_split_utf8_string_t **split_string, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_split( const uint16_t *utf16_string, size_t utf16_string_size, uint16_t delimiter, libfvalue_split_utf16_string_t **split_string, libcerror_error_t **error ); #if defined( _cplusplus ) } #endif #endif libevt-20170120/libfvalue/libfvalue_table.h0000664000175000017500000000667513040331702022606 0ustar00lordyestalordyesta00000000000000/* * Values table functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_TABLE_H ) #define _LIBFVALUE_INTERNAL_TABLE_H #include #include #include "libfvalue_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 ) */ libevt-20170120/libfvalue/libfvalue_split_string.h0000664000175000017500000001067713040331702024235 0ustar00lordyestalordyesta00000000000000/* * Split string functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_SPLIT_STRING_H ) #define _LIBFVALUE_INTERNAL_SPLIT_STRING_H #include #include #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_internal_split_utf8_string libfvalue_internal_split_utf8_string_t; struct libfvalue_internal_split_utf8_string { /* The number of string segments */ int number_of_segments; /* The string */ uint8_t *string; /* The string size */ size_t string_size; /* The segments */ uint8_t **segments; /* The segment sizes */ size_t *segment_sizes; }; typedef struct libfvalue_internal_split_utf16_string libfvalue_internal_split_utf16_string_t; struct libfvalue_internal_split_utf16_string { /* The number of string segments */ int number_of_segments; /* The string */ uint16_t *string; /* The string size */ size_t string_size; /* The segments */ uint16_t **segments; /* The segment sizes */ size_t *segment_sizes; }; int libfvalue_split_utf8_string_initialize( libfvalue_split_utf8_string_t **split_string, const uint8_t *utf8_string, size_t utf8_string_size, int number_of_segments, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf8_string_free( libfvalue_split_utf8_string_t **split_string, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf8_string_get_string( libfvalue_split_utf8_string_t *split_string, uint8_t **utf8_string, size_t *utf8_string_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf8_string_get_number_of_segments( libfvalue_split_utf8_string_t *split_string, int *number_of_segments, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf8_string_get_segment_by_index( libfvalue_split_utf8_string_t *split_string, int segment_index, uint8_t **utf8_string_segment, size_t *utf8_string_segment_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf8_string_set_segment_by_index( libfvalue_split_utf8_string_t *split_string, int segment_index, uint8_t *utf8_string_segment, size_t utf8_string_segment_size, libcerror_error_t **error ); int libfvalue_split_utf16_string_initialize( libfvalue_split_utf16_string_t **split_string, const uint16_t *utf16_string, size_t utf16_string_size, int number_of_segments, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf16_string_free( libfvalue_split_utf16_string_t **split_string, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf16_string_get_string( libfvalue_split_utf16_string_t *split_string, uint16_t **utf16_string, size_t *utf16_string_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf16_string_get_number_of_segments( libfvalue_split_utf16_string_t *split_string, int *number_of_segments, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf16_string_get_segment_by_index( libfvalue_split_utf16_string_t *split_string, int segment_index, uint16_t **utf16_string_segment, size_t *utf16_string_segment_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf16_string_set_segment_by_index( libfvalue_split_utf16_string_t *split_string, int segment_index, uint16_t *utf16_string_segment, size_t utf16_string_segment_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_INTERNAL_SPLIT_STRING_H ) */ libevt-20170120/libfvalue/libfvalue_floating_point.h0000664000175000017500000001671413040331701024525 0ustar00lordyestalordyesta00000000000000/* * Floating point value (IEEE 754) functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_FLOATING_POINT_H ) #define _LIBFVALUE_FLOATING_POINT_H #include #include #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_floating_point libfvalue_floating_point_t; struct libfvalue_floating_point { /* The value */ uint64_t value; /* The value size */ size_t value_size; }; int libfvalue_floating_point_initialize( libfvalue_floating_point_t **floating_point, libcerror_error_t **error ); int libfvalue_floating_point_free( libfvalue_floating_point_t **floating_point, libcerror_error_t **error ); int libfvalue_floating_point_clone( libfvalue_floating_point_t **destination_floating_point, libfvalue_floating_point_t *source_floating_point, libcerror_error_t **error ); int libfvalue_floating_point_copy_from_byte_stream( libfvalue_floating_point_t *floating_point, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ); int libfvalue_floating_point_copy_from_integer( libfvalue_floating_point_t *floating_point, uint64_t integer_value, size_t integer_value_size, libcerror_error_t **error ); int libfvalue_floating_point_copy_to_integer( libfvalue_floating_point_t *floating_point, uint64_t *integer_value, size_t *integer_value_size, libcerror_error_t **error ); int libfvalue_floating_point_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 ) */ libevt-20170120/libfvalue/libfvalue_binary_data.c0000664000175000017500000011753013040331701023757 0ustar00lordyestalordyesta00000000000000/* * Binary data value functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfvalue_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( 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 ); } 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( 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( ( 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 ); } 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( 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 ); } 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 ); } 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( 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( ( 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_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( 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 ); } 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 ); } 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( 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( ( 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_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( 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 ); } 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 ); } libevt-20170120/libfvalue/libfvalue_filetime.h0000664000175000017500000000314313040331701023277 0ustar00lordyestalordyesta00000000000000/* * Filetime functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_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_H ) || 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_H ) || defined( HAVE_LOCAL_LIBFDATETIME ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_FILETIME_H ) */ libevt-20170120/libfvalue/libfvalue_integer.c0000664000175000017500000020730413040331701023136 0ustar00lordyestalordyesta00000000000000/* * Integer value functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfvalue_definitions.h" #include "libfvalue_integer.h" #include "libfvalue_libcerror.h" /* 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_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_from_utf8_string_with_index"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_utf8_string_with_index_copy_to_integer( utf8_string, utf8_string_size, utf8_string_index, &( integer->value ), integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit integer from UTF-8 string.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Copies the integer to an UTF-8 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_to_utf8_string_with_index( libfvalue_integer_t *integer, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_to_utf8_string_with_index"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_utf8_string_with_index_copy_from_integer( utf8_string, utf8_string_size, utf8_string_index, integer->value, integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit integer to UTF-8 string.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Copies the integer from an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_from_utf16_string_with_index( libfvalue_integer_t *integer, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_from_utf16_string_with_index"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_utf16_string_with_index_copy_to_integer( utf16_string, utf16_string_size, utf16_string_index, &( integer->value ), integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit integer from UTF-16 string.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Copies the integer to an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_to_utf16_string_with_index( libfvalue_integer_t *integer, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_to_utf16_string_with_index"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_utf16_string_with_index_copy_from_integer( utf16_string, utf16_string_size, utf16_string_index, integer->value, integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit integer to UTF-16 string.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Copies the integer from an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_from_utf32_string_with_index( libfvalue_integer_t *integer, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_from_utf32_string_with_index"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_utf32_string_with_index_copy_to_integer( utf32_string, utf32_string_size, utf32_string_index, &( integer->value ), integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit integer from UTF-32 string.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Copies the integer to an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_to_utf32_string_with_index( libfvalue_integer_t *integer, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_to_utf32_string_with_index"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_utf32_string_with_index_copy_from_integer( utf32_string, utf32_string_size, utf32_string_index, integer->value, integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit integer to UTF-32 string.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Determines the size of a string of an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_string_size_from_integer( size_t *string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_size_from_integer"; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t is_signed = 0; int8_t bit_shift = 0; if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { *string_size = 6; } else { *string_size = 5; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { *string_size = ( integer_value_size >> 2 ) + 1; if( ( 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 string_index = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t is_signed = 0; uint8_t number_of_characters = 0; int8_t bit_shift = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string index value out of bounds.", function ); return( -1 ); } string_index = *utf8_string_index; if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { number_of_characters = 6; } else { number_of_characters = 5; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { number_of_characters = (uint8_t) ( integer_value_size >> 2 ) + 1; if( ( 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( ( string_index + number_of_characters ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string size too small.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'f'; utf8_string[ string_index++ ] = (uint8_t) 'a'; utf8_string[ string_index++ ] = (uint8_t) 'l'; utf8_string[ string_index++ ] = (uint8_t) 's'; utf8_string[ string_index++ ] = (uint8_t) 'e'; } else { utf8_string[ string_index++ ] = (uint8_t) 't'; utf8_string[ string_index++ ] = (uint8_t) 'r'; utf8_string[ string_index++ ] = (uint8_t) 'u'; utf8_string[ string_index++ ] = (uint8_t) 'e'; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; } bit_shift = (uint8_t) ( integer_value_size - 4 ); do { byte_value = (uint8_t) ( ( integer_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf8_string[ string_index++ ] = (uint8_t) '-'; } while( divider > 1 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( integer_value / divider ); integer_value %= divider; divider /= 10; } utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( integer_value / divider ); } utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; return( 1 ); } /* Copies an UTF-8 encoded string to an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_copy_to_integer( const uint8_t *utf8_string, size_t utf8_string_length, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf8_string_copy_to_integer"; size_t utf8_string_index = 0; if( libfvalue_utf8_string_with_index_copy_to_integer( utf8_string, utf8_string_length, &utf8_string_index, integer_value, integer_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to integer value.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 encoded string to an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_with_index_copy_to_integer( const uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf8_string_with_index_copy_to_integer"; size_t maximum_string_index = 0; size_t string_index = 0; uint64_t divider = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t character_value = 0; int8_t bit_shift = 0; int8_t sign = 1; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string index value out of bounds.", function ); return( -1 ); } string_index = *utf8_string_index; if( integer_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer value.", function ); return( -1 ); } if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { maximum_string_index = 5; } else { maximum_string_index = 4; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { maximum_string_index = (size_t) ( integer_value_size >> 2 ); if( ( 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 += 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 ) { if( utf8_string[ string_index ] != (uint8_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } string_index++; if( utf8_string[ string_index ] != (uint8_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } string_index++; } while( string_index < utf8_string_length ) { if( utf8_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit <<= 4; if( ( utf8_string[ string_index ] >= (uint8_t) '0' ) && ( utf8_string[ string_index ] <= (uint8_t) '9' ) ) { byte_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) '0' ); } else if( ( utf8_string[ string_index ] >= (uint8_t) 'A' ) && ( utf8_string[ string_index ] <= (uint8_t) 'F' ) ) { byte_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) 'A' + 10 ); } else if( ( utf8_string[ string_index ] >= (uint8_t) 'a' ) && ( utf8_string[ string_index ] <= (uint8_t) 'f' ) ) { byte_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } value_64bit += byte_value; string_index++; } } else { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { /* In the maximum possible string one character is substituted for the sign */ if( utf8_string[ string_index ] == (uint8_t) '-' ) { string_index++; sign = -1; } else if( utf8_string[ string_index ] == (uint8_t) '+' ) { string_index++; } } while( string_index < utf8_string_length ) { if( utf8_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit *= 10; if( ( utf8_string[ string_index ] < (uint8_t) '0' ) && ( utf8_string[ string_index ] > (uint8_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } character_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) '0' ); value_64bit += character_value; string_index++; } if( sign == -1 ) { value_64bit |= (uint64_t) 1 << bit_shift; } } *utf8_string_index = string_index; *integer_value = value_64bit; return( 1 ); } /* Copies an UTF-16 encoded string of an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_copy_from_integer( uint16_t *utf16_string, size_t utf16_string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf16_string_copy_from_integer"; size_t utf16_string_index = 0; if( libfvalue_utf16_string_with_index_copy_from_integer( utf16_string, utf16_string_size, &utf16_string_index, integer_value, integer_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy integer value to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 encoded string of an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_with_index_copy_from_integer( uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf16_string_with_index_copy_from_integer"; size_t string_index = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t is_signed = 0; uint8_t number_of_characters = 0; int8_t bit_shift = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-16 string index value out of bounds.", function ); return( -1 ); } string_index = *utf16_string_index; if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { number_of_characters = 6; } else { number_of_characters = 5; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { number_of_characters = (uint8_t) ( integer_value_size >> 2 ) + 1; if( ( 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( ( string_index + number_of_characters ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string size too small.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'f'; utf16_string[ string_index++ ] = (uint16_t) 'a'; utf16_string[ string_index++ ] = (uint16_t) 'l'; utf16_string[ string_index++ ] = (uint16_t) 's'; utf16_string[ string_index++ ] = (uint16_t) 'e'; } else { utf16_string[ string_index++ ] = (uint16_t) 't'; utf16_string[ string_index++ ] = (uint16_t) 'r'; utf16_string[ string_index++ ] = (uint16_t) 'u'; utf16_string[ string_index++ ] = (uint16_t) 'e'; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; } bit_shift = (uint8_t) ( integer_value_size - 4 ); do { byte_value = (uint16_t) ( ( integer_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf16_string[ string_index++ ] = (uint16_t) '-'; } while( divider > 1 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( integer_value / divider ); integer_value %= divider; divider /= 10; } utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( integer_value / divider ); } utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; return( 1 ); } /* Copies an UTF-16 encoded string to an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_copy_to_integer( const uint16_t *utf16_string, size_t utf16_string_length, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf16_string_copy_to_integer"; size_t utf16_string_index = 0; if( libfvalue_utf16_string_with_index_copy_to_integer( utf16_string, utf16_string_length, &utf16_string_index, integer_value, integer_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to integer value.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 encoded string to an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_with_index_copy_to_integer( const uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf16_string_with_index_copy_to_integer"; size_t maximum_string_index = 0; size_t string_index = 0; uint64_t value_64bit = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t character_value = 0; int8_t bit_shift = 0; int8_t sign = 1; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-16 string index value out of bounds.", function ); return( -1 ); } string_index = *utf16_string_index; if( integer_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer value.", function ); return( -1 ); } if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { maximum_string_index = 5; } else { maximum_string_index = 4; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { maximum_string_index = (size_t) ( integer_value_size >> 2 ); if( ( 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 += 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 ) { if( utf16_string[ string_index ] != (uint16_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } string_index++; if( utf16_string[ string_index ] != (uint16_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } string_index++; } while( string_index < utf16_string_length ) { if( utf16_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit <<= 4; if( ( utf16_string[ string_index ] >= (uint16_t) '0' ) && ( utf16_string[ string_index ] <= (uint16_t) '9' ) ) { byte_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) '0' ); } else if( ( utf16_string[ string_index ] >= (uint16_t) 'A' ) && ( utf16_string[ string_index ] <= (uint16_t) 'F' ) ) { byte_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) 'A' + 10 ); } else if( ( utf16_string[ string_index ] >= (uint16_t) 'a' ) && ( utf16_string[ string_index ] <= (uint16_t) 'f' ) ) { byte_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } value_64bit += byte_value; string_index++; } } else { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { /* In the maximum possible string one character is substituted for the sign */ if( utf16_string[ string_index ] == (uint16_t) '-' ) { string_index++; sign = -1; } else if( utf16_string[ string_index ] == (uint16_t) '+' ) { string_index++; } } while( string_index < utf16_string_length ) { if( utf16_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit *= 10; if( ( utf16_string[ string_index ] < (uint16_t) '0' ) && ( utf16_string[ string_index ] > (uint16_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } character_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) '0' ); value_64bit += character_value; string_index++; } if( sign == -1 ) { value_64bit |= (uint64_t) 1 << bit_shift; } } *utf16_string_index = string_index; *integer_value = value_64bit; return( 1 ); } /* Copies an UTF-32 encoded string of an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_copy_from_integer( uint32_t *utf32_string, size_t utf32_string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf32_string_copy_from_integer"; size_t utf32_string_index = 0; if( libfvalue_utf32_string_with_index_copy_from_integer( utf32_string, utf32_string_size, &utf32_string_index, integer_value, integer_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy integer value to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 encoded string of an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_with_index_copy_from_integer( uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf32_string_with_index_copy_from_integer"; size_t string_index = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t is_signed = 0; uint8_t number_of_characters = 0; int8_t bit_shift = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-32 string index value out of bounds.", function ); return( -1 ); } string_index = *utf32_string_index; if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { number_of_characters = 6; } else { number_of_characters = 5; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { number_of_characters = (uint8_t) ( integer_value_size >> 2 ) + 1; if( ( 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( ( string_index + number_of_characters ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string size too small.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'f'; utf32_string[ string_index++ ] = (uint32_t) 'a'; utf32_string[ string_index++ ] = (uint32_t) 'l'; utf32_string[ string_index++ ] = (uint32_t) 's'; utf32_string[ string_index++ ] = (uint32_t) 'e'; } else { utf32_string[ string_index++ ] = (uint32_t) 't'; utf32_string[ string_index++ ] = (uint32_t) 'r'; utf32_string[ string_index++ ] = (uint32_t) 'u'; utf32_string[ string_index++ ] = (uint32_t) 'e'; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; } bit_shift = (uint8_t) ( integer_value_size - 4 ); do { byte_value = (uint32_t) ( ( integer_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf32_string[ string_index++ ] = (uint32_t) '-'; } while( divider > 1 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( integer_value / divider ); integer_value %= divider; divider /= 10; } utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( integer_value / divider ); } utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; return( 1 ); } /* Copies an UTF-32 encoded string to an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_copy_to_integer( const uint32_t *utf32_string, size_t utf32_string_length, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf32_string_copy_to_integer"; size_t utf32_string_index = 0; if( libfvalue_utf32_string_with_index_copy_to_integer( utf32_string, utf32_string_length, &utf32_string_index, integer_value, integer_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 string to integer value.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 encoded string to an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_with_index_copy_to_integer( const uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf32_string_with_index_copy_to_integer"; size_t maximum_string_index = 0; size_t string_index = 0; uint64_t value_64bit = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t character_value = 0; int8_t bit_shift = 0; int8_t sign = 1; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-32 string index value out of bounds.", function ); return( -1 ); } string_index = *utf32_string_index; if( integer_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer value.", function ); return( -1 ); } if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { maximum_string_index = 5; } else { maximum_string_index = 4; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { maximum_string_index = (size_t) ( integer_value_size >> 2 ); if( ( 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 += 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 ) { if( utf32_string[ string_index ] != (uint32_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } string_index++; if( utf32_string[ string_index ] != (uint32_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } string_index++; } while( string_index < utf32_string_length ) { if( utf32_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit <<= 4; if( ( utf32_string[ string_index ] >= (uint32_t) '0' ) && ( utf32_string[ string_index ] <= (uint32_t) '9' ) ) { byte_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) '0' ); } else if( ( utf32_string[ string_index ] >= (uint32_t) 'A' ) && ( utf32_string[ string_index ] <= (uint32_t) 'F' ) ) { byte_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) 'A' + 10 ); } else if( ( utf32_string[ string_index ] >= (uint32_t) 'a' ) && ( utf32_string[ string_index ] <= (uint32_t) 'f' ) ) { byte_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } value_64bit += byte_value; string_index++; } } else { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { /* In the maximum possible string one character is substituted for the sign */ if( utf32_string[ string_index ] == (uint32_t) '-' ) { string_index++; sign = -1; } else if( utf32_string[ string_index ] == (uint32_t) '+' ) { string_index++; } } while( string_index < utf32_string_length ) { if( utf32_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit *= 10; if( ( utf32_string[ string_index ] < (uint32_t) '0' ) && ( utf32_string[ string_index ] > (uint32_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } character_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) '0' ); value_64bit += character_value; string_index++; } if( sign == -1 ) { value_64bit |= (uint64_t) 1 << bit_shift; } } *utf32_string_index = string_index; *integer_value = value_64bit; return( 1 ); } libevt-20170120/libfvalue/libfvalue_data_handle.h0000664000175000017500000001201113040331701023717 0ustar00lordyestalordyesta00000000000000/* * Data handle functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_DATA_HANDLE_H ) #define _LIBFVALUE_INTERNAL_DATA_HANDLE_H #include #include #include "libfvalue_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 ) */ libevt-20170120/libfvalue/libfvalue_definitions.h0000664000175000017500000002254413040331701024022 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBFVALUE_INTERNAL_DEFINITIONS_H ) #define LIBFVALUE_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBFVALUE for local use of libfvalue */ #if !defined( HAVE_LOCAL_LIBFVALUE ) #include /* The definitions in are copied here * for local use of libfvalue */ #else #include #define LIBFVALUE_VERSION 20170113 /* The libfvalue version string */ #define LIBFVALUE_VERSION_STRING "20170113" /* 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 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 #endif libevt-20170120/Makefile.in0000664000175000017500000012775313040342656017424 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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/libevt/definitions.h \ include/libevt/features.h include/libevt/types.h \ dpkg/changelog dpkg/copyright libevt.pc libevt.spec 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 dist dist-all distcheck 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)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libevt.pc.in \ $(srcdir)/libevt.spec.in $(top_srcdir)/dpkg/changelog.in \ $(top_srcdir)/dpkg/copyright.in \ $(top_srcdir)/include/libevt/definitions.h.in \ $(top_srcdir)/include/libevt/features.h.in \ $(top_srcdir)/include/libevt/types.h.in ABOUT-NLS AUTHORS \ COPYING 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 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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 \ libevt \ libfwevt \ libexe \ libregf \ libwrc \ libcdirectory \ evttools \ pyevt \ pyevt-python2 \ pyevt-python3 \ po \ manuals \ tests \ msvscpp DPKG_FILES = \ dpkg/changelog \ dpkg/changelog.in \ dpkg/compat \ dpkg/control \ dpkg/copyright \ dpkg/copyright.in \ dpkg/rules \ dpkg/libevt.docs \ dpkg/libevt-dev.docs \ dpkg/libevt-python.docs \ dpkg/libevt-python3.docs \ dpkg/libevt-tools.docs \ dpkg/source/format GETTEXT_FILES = \ config.rpath \ po/Makevars.in PKGCONFIG_FILES = \ libevt.pc.in SETUP_PY_FILES = \ setup.py SPEC_FILES = \ libevt.spec \ libevt.spec.in EXTRA_DIST = \ $(DPKG_FILES) \ $(GETTEXT_FILES) \ $(PKGCONFIG_FILES) \ $(SETUP_PY_FILES) \ $(SPEC_FILES) MAINTAINERCLEANFILES = \ Makefile.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ libevt.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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): include/libevt/definitions.h: $(top_builddir)/config.status $(top_srcdir)/include/libevt/definitions.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ include/libevt/features.h: $(top_builddir)/config.status $(top_srcdir)/include/libevt/features.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ include/libevt/types.h: $(top_builddir)/config.status $(top_srcdir)/include/libevt/types.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ dpkg/changelog: $(top_builddir)/config.status $(top_srcdir)/dpkg/changelog.in cd $(top_builddir) && $(SHELL) ./config.status $@ dpkg/copyright: $(top_builddir)/config.status $(top_srcdir)/dpkg/copyright.in cd $(top_builddir) && $(SHELL) ./config.status $@ libevt.pc: $(top_builddir)/config.status $(srcdir)/libevt.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libevt.spec: $(top_builddir)/config.status $(srcdir)/libevt.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @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" 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: $(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) | GZIP=$(GZIP_ENV) gzip -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-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) | GZIP=$(GZIP_ENV) gzip -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*) \ GZIP=$(GZIP_ENV) gzip -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*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ 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) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: $(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 distcheck distclean distclean-generic \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-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)/libevt && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS)) distclean: clean /bin/rm -f Makefile /bin/rm -f config.status /bin/rm -f config.cache /bin/rm -f config.log /bin/rm -f libevt.pc /bin/rm -f libevt.spec @for dir in ${subdirs}; do \ (cd $$dir && $(MAKE) distclean) \ || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" splint: (cd $(srcdir)/libcerror && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcthreads && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcdata && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libclocale && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcnotify && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcsplit && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libuna && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcfile && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcpath && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libbfio && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfcache && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdata && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdatetime && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfguid && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfvalue && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfwnt && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libevt && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfcache && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdata && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfwevt && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libexe && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libregf && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libwrc && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcdirectory && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/evttools && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/pyevt && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/tests && $(MAKE) splint $(AM_MAKEFLAGS)) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/pyevt-python2/0000775000175000017500000000000013040343017020100 5ustar00lordyestalordyesta00000000000000libevt-20170120/pyevt-python2/Makefile.am0000664000175000017500000000331013040331671022134 0ustar00lordyestalordyesta00000000000000# Note that we cannot use: AUTOMAKE_OPTIONS = subdir-objects # subdir-objects will compile the source files to a single version of Python. # Since subdir-objects is being deprecated we copy the source files instead. am__installdirs = "$(DESTDIR)$(pyexecdir2)" pyexecdir = $(pyexecdir2) if HAVE_PYTHON2 AM_CFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ am_pyevt_la_rpath = -rpath $(pyexecdir2) BUILT_SOURCES = \ pyevt.c pyevt.h \ pyevt_codepage.c pyevt_codepage.h \ pyevt_datetime.c pyevt_datetime.h \ pyevt_error.c pyevt_error.h \ pyevt_event_types.c pyevt_event_types.h \ pyevt_file.c pyevt_file.h \ pyevt_file_flags.c pyevt_file_flags.h \ pyevt_file_object_io_handle.c pyevt_file_object_io_handle.h \ pyevt_integer.c pyevt_integer.h \ pyevt_libbfio.h \ pyevt_libcerror.h \ pyevt_libclocale.h \ pyevt_libevt.h \ pyevt_python.h \ pyevt_record.c pyevt_record.h \ pyevt_records.c pyevt_records.h \ pyevt_strings.c pyevt_strings.h \ pyevt_unused.h pyexec_LTLIBRARIES = pyevt.la nodist_pyevt_la_SOURCES = $(BUILT_SOURCES) pyevt_la_LIBADD = \ @LIBCERROR_LIBADD@ \ ../libevt/libevt.la \ @LIBCDATA_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBBFIO_LIBADD@ pyevt_la_CPPFLAGS = $(PYTHON2_CPPFLAGS) pyevt_la_LDFLAGS = -module -avoid-version $(PYTHON2_LDFLAGS) $(BUILT_SOURCES): /bin/cp -f $(top_srcdir)/pyevt/$@ $@ endif MAINTAINERCLEANFILES = \ Makefile.in clean-local: /bin/rm -f pyevt*.[ch] distclean: clean /bin/rm -f Makefile libevt-20170120/pyevt-python2/Makefile.in0000664000175000017500000014200713040342660022154 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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 = pyevt-python2 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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; }; \ } LTLIBRARIES = $(pyexec_LTLIBRARIES) @HAVE_PYTHON2_TRUE@pyevt_la_DEPENDENCIES = ../libevt/libevt.la @HAVE_PYTHON2_TRUE@am__objects_1 = pyevt_la-pyevt.lo \ @HAVE_PYTHON2_TRUE@ pyevt_la-pyevt_codepage.lo \ @HAVE_PYTHON2_TRUE@ pyevt_la-pyevt_datetime.lo \ @HAVE_PYTHON2_TRUE@ pyevt_la-pyevt_error.lo \ @HAVE_PYTHON2_TRUE@ pyevt_la-pyevt_event_types.lo \ @HAVE_PYTHON2_TRUE@ pyevt_la-pyevt_file.lo \ @HAVE_PYTHON2_TRUE@ pyevt_la-pyevt_file_flags.lo \ @HAVE_PYTHON2_TRUE@ pyevt_la-pyevt_file_object_io_handle.lo \ @HAVE_PYTHON2_TRUE@ pyevt_la-pyevt_integer.lo \ @HAVE_PYTHON2_TRUE@ pyevt_la-pyevt_record.lo \ @HAVE_PYTHON2_TRUE@ pyevt_la-pyevt_records.lo \ @HAVE_PYTHON2_TRUE@ pyevt_la-pyevt_strings.lo @HAVE_PYTHON2_TRUE@nodist_pyevt_la_OBJECTS = $(am__objects_1) pyevt_la_OBJECTS = $(nodist_pyevt_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 = pyevt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(pyevt_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__depfiles_maybe = depfiles 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 = $(nodist_pyevt_la_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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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 = $(pyexecdir2) pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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@ # Note that we cannot use: AUTOMAKE_OPTIONS = subdir-objects # subdir-objects will compile the source files to a single version of Python. # Since subdir-objects is being deprecated we copy the source files instead. am__installdirs = "$(DESTDIR)$(pyexecdir2)" @HAVE_PYTHON2_TRUE@AM_CFLAGS = \ @HAVE_PYTHON2_TRUE@ -I$(top_srcdir)/include \ @HAVE_PYTHON2_TRUE@ -I$(top_srcdir)/common \ @HAVE_PYTHON2_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_PYTHON2_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_PYTHON2_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_PYTHON2_TRUE@ @LIBCSPLIT_CPPFLAGS@ \ @HAVE_PYTHON2_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_PYTHON2_TRUE@ @LIBCFILE_CPPFLAGS@ \ @HAVE_PYTHON2_TRUE@ @LIBCPATH_CPPFLAGS@ \ @HAVE_PYTHON2_TRUE@ @LIBBFIO_CPPFLAGS@ @HAVE_PYTHON2_TRUE@am_pyevt_la_rpath = -rpath $(pyexecdir2) @HAVE_PYTHON2_TRUE@BUILT_SOURCES = \ @HAVE_PYTHON2_TRUE@ pyevt.c pyevt.h \ @HAVE_PYTHON2_TRUE@ pyevt_codepage.c pyevt_codepage.h \ @HAVE_PYTHON2_TRUE@ pyevt_datetime.c pyevt_datetime.h \ @HAVE_PYTHON2_TRUE@ pyevt_error.c pyevt_error.h \ @HAVE_PYTHON2_TRUE@ pyevt_event_types.c pyevt_event_types.h \ @HAVE_PYTHON2_TRUE@ pyevt_file.c pyevt_file.h \ @HAVE_PYTHON2_TRUE@ pyevt_file_flags.c pyevt_file_flags.h \ @HAVE_PYTHON2_TRUE@ pyevt_file_object_io_handle.c pyevt_file_object_io_handle.h \ @HAVE_PYTHON2_TRUE@ pyevt_integer.c pyevt_integer.h \ @HAVE_PYTHON2_TRUE@ pyevt_libbfio.h \ @HAVE_PYTHON2_TRUE@ pyevt_libcerror.h \ @HAVE_PYTHON2_TRUE@ pyevt_libclocale.h \ @HAVE_PYTHON2_TRUE@ pyevt_libevt.h \ @HAVE_PYTHON2_TRUE@ pyevt_python.h \ @HAVE_PYTHON2_TRUE@ pyevt_record.c pyevt_record.h \ @HAVE_PYTHON2_TRUE@ pyevt_records.c pyevt_records.h \ @HAVE_PYTHON2_TRUE@ pyevt_strings.c pyevt_strings.h \ @HAVE_PYTHON2_TRUE@ pyevt_unused.h @HAVE_PYTHON2_TRUE@pyexec_LTLIBRARIES = pyevt.la @HAVE_PYTHON2_TRUE@nodist_pyevt_la_SOURCES = $(BUILT_SOURCES) @HAVE_PYTHON2_TRUE@pyevt_la_LIBADD = \ @HAVE_PYTHON2_TRUE@ @LIBCERROR_LIBADD@ \ @HAVE_PYTHON2_TRUE@ ../libevt/libevt.la \ @HAVE_PYTHON2_TRUE@ @LIBCDATA_LIBADD@ \ @HAVE_PYTHON2_TRUE@ @LIBCLOCALE_LIBADD@ \ @HAVE_PYTHON2_TRUE@ @LIBCSPLIT_LIBADD@ \ @HAVE_PYTHON2_TRUE@ @LIBUNA_LIBADD@ \ @HAVE_PYTHON2_TRUE@ @LIBCFILE_LIBADD@ \ @HAVE_PYTHON2_TRUE@ @LIBCPATH_LIBADD@ \ @HAVE_PYTHON2_TRUE@ @LIBBFIO_LIBADD@ @HAVE_PYTHON2_TRUE@pyevt_la_CPPFLAGS = $(PYTHON2_CPPFLAGS) @HAVE_PYTHON2_TRUE@pyevt_la_LDFLAGS = -module -avoid-version $(PYTHON2_LDFLAGS) MAINTAINERCLEANFILES = \ Makefile.in all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pyevt-python2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pyevt-python2/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) @$(NORMAL_INSTALL) @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}; \ } pyevt.la: $(pyevt_la_OBJECTS) $(pyevt_la_DEPENDENCIES) $(EXTRA_pyevt_la_DEPENDENCIES) $(AM_V_CCLD)$(pyevt_la_LINK) $(am_pyevt_la_rpath) $(pyevt_la_OBJECTS) $(pyevt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_codepage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_datetime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_event_types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_file_flags.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_file_object_io_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_integer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_record.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_records.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyevt_la-pyevt_strings.Plo@am__quote@ .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 $@ $< pyevt_la-pyevt.lo: pyevt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt.Tpo -c -o pyevt_la-pyevt.lo `test -f 'pyevt.c' || echo '$(srcdir)/'`pyevt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt.Tpo $(DEPDIR)/pyevt_la-pyevt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt.c' object='pyevt_la-pyevt.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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt.lo `test -f 'pyevt.c' || echo '$(srcdir)/'`pyevt.c pyevt_la-pyevt_codepage.lo: pyevt_codepage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_codepage.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_codepage.Tpo -c -o pyevt_la-pyevt_codepage.lo `test -f 'pyevt_codepage.c' || echo '$(srcdir)/'`pyevt_codepage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_codepage.Tpo $(DEPDIR)/pyevt_la-pyevt_codepage.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_codepage.c' object='pyevt_la-pyevt_codepage.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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_codepage.lo `test -f 'pyevt_codepage.c' || echo '$(srcdir)/'`pyevt_codepage.c pyevt_la-pyevt_datetime.lo: pyevt_datetime.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_datetime.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_datetime.Tpo -c -o pyevt_la-pyevt_datetime.lo `test -f 'pyevt_datetime.c' || echo '$(srcdir)/'`pyevt_datetime.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_datetime.Tpo $(DEPDIR)/pyevt_la-pyevt_datetime.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_datetime.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_datetime.lo `test -f 'pyevt_datetime.c' || echo '$(srcdir)/'`pyevt_datetime.c pyevt_la-pyevt_error.lo: pyevt_error.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_error.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_error.Tpo -c -o pyevt_la-pyevt_error.lo `test -f 'pyevt_error.c' || echo '$(srcdir)/'`pyevt_error.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_error.Tpo $(DEPDIR)/pyevt_la-pyevt_error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_error.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_error.lo `test -f 'pyevt_error.c' || echo '$(srcdir)/'`pyevt_error.c pyevt_la-pyevt_event_types.lo: pyevt_event_types.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_event_types.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_event_types.Tpo -c -o pyevt_la-pyevt_event_types.lo `test -f 'pyevt_event_types.c' || echo '$(srcdir)/'`pyevt_event_types.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_event_types.Tpo $(DEPDIR)/pyevt_la-pyevt_event_types.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_event_types.c' object='pyevt_la-pyevt_event_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_event_types.lo `test -f 'pyevt_event_types.c' || echo '$(srcdir)/'`pyevt_event_types.c pyevt_la-pyevt_file.lo: pyevt_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_file.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_file.Tpo -c -o pyevt_la-pyevt_file.lo `test -f 'pyevt_file.c' || echo '$(srcdir)/'`pyevt_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_file.Tpo $(DEPDIR)/pyevt_la-pyevt_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_file.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_file.lo `test -f 'pyevt_file.c' || echo '$(srcdir)/'`pyevt_file.c pyevt_la-pyevt_file_flags.lo: pyevt_file_flags.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_file_flags.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_file_flags.Tpo -c -o pyevt_la-pyevt_file_flags.lo `test -f 'pyevt_file_flags.c' || echo '$(srcdir)/'`pyevt_file_flags.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_file_flags.Tpo $(DEPDIR)/pyevt_la-pyevt_file_flags.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_file_flags.c' object='pyevt_la-pyevt_file_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_file_flags.lo `test -f 'pyevt_file_flags.c' || echo '$(srcdir)/'`pyevt_file_flags.c pyevt_la-pyevt_file_object_io_handle.lo: pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_file_object_io_handle.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_file_object_io_handle.Tpo -c -o pyevt_la-pyevt_file_object_io_handle.lo `test -f 'pyevt_file_object_io_handle.c' || echo '$(srcdir)/'`pyevt_file_object_io_handle.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_file_object_io_handle.Tpo $(DEPDIR)/pyevt_la-pyevt_file_object_io_handle.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_file_object_io_handle.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_file_object_io_handle.lo `test -f 'pyevt_file_object_io_handle.c' || echo '$(srcdir)/'`pyevt_file_object_io_handle.c pyevt_la-pyevt_integer.lo: pyevt_integer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_integer.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_integer.Tpo -c -o pyevt_la-pyevt_integer.lo `test -f 'pyevt_integer.c' || echo '$(srcdir)/'`pyevt_integer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_integer.Tpo $(DEPDIR)/pyevt_la-pyevt_integer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_integer.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_integer.lo `test -f 'pyevt_integer.c' || echo '$(srcdir)/'`pyevt_integer.c pyevt_la-pyevt_record.lo: pyevt_record.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_record.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_record.Tpo -c -o pyevt_la-pyevt_record.lo `test -f 'pyevt_record.c' || echo '$(srcdir)/'`pyevt_record.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_record.Tpo $(DEPDIR)/pyevt_la-pyevt_record.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_record.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_record.lo `test -f 'pyevt_record.c' || echo '$(srcdir)/'`pyevt_record.c pyevt_la-pyevt_records.lo: pyevt_records.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_records.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_records.Tpo -c -o pyevt_la-pyevt_records.lo `test -f 'pyevt_records.c' || echo '$(srcdir)/'`pyevt_records.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_records.Tpo $(DEPDIR)/pyevt_la-pyevt_records.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_records.c' object='pyevt_la-pyevt_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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_records.lo `test -f 'pyevt_records.c' || echo '$(srcdir)/'`pyevt_records.c pyevt_la-pyevt_strings.lo: pyevt_strings.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyevt_la-pyevt_strings.lo -MD -MP -MF $(DEPDIR)/pyevt_la-pyevt_strings.Tpo -c -o pyevt_la-pyevt_strings.lo `test -f 'pyevt_strings.c' || echo '$(srcdir)/'`pyevt_strings.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyevt_la-pyevt_strings.Tpo $(DEPDIR)/pyevt_la-pyevt_strings.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyevt_strings.c' object='pyevt_la-pyevt_strings.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) $(pyevt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyevt_la-pyevt_strings.lo `test -f 'pyevt_strings.c' || echo '$(srcdir)/'`pyevt_strings.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pyexecdir2)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-local \ clean-pyexecLTLIBRARIES mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-pyexecLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pyexecLTLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-local 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 \ tags tags-am uninstall uninstall-am \ uninstall-pyexecLTLIBRARIES .PRECIOUS: Makefile @HAVE_PYTHON2_TRUE@$(BUILT_SOURCES): @HAVE_PYTHON2_TRUE@ /bin/cp -f $(top_srcdir)/pyevt/$@ $@ clean-local: /bin/rm -f pyevt*.[ch] distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/ChangeLog0000664000175000017500000000376713012333137017120 0ustar00lordyestalordyesta00000000000000TODO: * libevt - remove file_get_version * evtexport, add date time format selection * evtexport, add flags to strip strings and messages string of CR-LFs * evtexport, add support for CVS and/or TSV format with surrounding quotes * add parameter expansion support * recovery: what about record that is recoverable but has a size mismatch * msvscpp: - check and fix debug output generation - check 64-bit compilation output (warnings) * check signal abort * test find paths on windows * get %WinDir% SYSTEM\CurrentControlSet\Control\Session Manager\Environment\windir - add callback for dealing with path expansion ? * registry file: - detect the file type + version based on the base sub keys? - add file type specific support e.g. CurrentControlSet in key names ? or be more generic and allow HKEY_ ... type of keys and detect registry file type * libcdirectory: - move WINAPI * path expansion from export handle to libcdirectory * update manuals - evtexport add example output * add error tollerability (+/-) - sizes and copy Tools: * API - functionality to parse event identifier ? * registy file - what about NT4 root/base key support ? * evtexport/export handle - validate eventlog/computername in system registry ? - use current control set nr ? - print if message file key not found - print if message file not found - print if message file has no resources - user sid - find corresponding user name ? - output data as CSV/TSV, DFXML ? (different output formatting modules) - print data - move output to separate code, e.g. libpff * evtinfo * pyevt - functionality to parse event identifier ? - string representations of event type ? - access to data * tests - file wrap Format: * event flags ? (debug function) * closing record number ? Notes * %SystemRoot% expansion support for WINNT and WINNT35 check if this is set in SOFTWARE\Microsoft\Windows NT\CurrentVersion\ ? 20111003 * see `git log' for more recent change log * Created initial version based on libnk2 libevt-20170120/m4/0000775000175000017500000000000013040343016015647 5ustar00lordyestalordyesta00000000000000libevt-20170120/m4/libuna.m40000664000175000017500000004246112675773545017425 0ustar00lordyestalordyesta00000000000000dnl Functions for libuna dnl dnl Version: 20130406 dnl Function to detect if libuna is available as library dnl ac_libuna_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBUNA_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xno && test "x$ac_cv_with_libuna" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libuna"], [CFLAGS="$CFLAGS -I${ac_cv_with_libuna}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libuna}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libuna]) ]) ]) AS_IF( [test "x$ac_cv_with_libuna" = xno], [ac_cv_libuna=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libuna], [libuna >= 20120425], [ac_cv_libuna=yes], [ac_cv_libuna=no]) ]) AS_IF( [test "x$ac_cv_libuna" = xyes], [ac_cv_libuna_CPPFLAGS="$pkg_cv_libuna_CFLAGS" ac_cv_libuna_LIBADD="$pkg_cv_libuna_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libuna.h]) AS_IF( [test "x$ac_cv_header_libuna_h" = xno], [ac_cv_libuna=no], [dnl Check for the individual functions ac_cv_libuna=yes AC_CHECK_LIB( una, libuna_get_version, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl Base16 stream functions AC_CHECK_LIB( una, libuna_base16_stream_size_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base16_stream_copy_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base16_stream_size_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base16_stream_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base16_stream_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl Base32 stream functions AC_CHECK_LIB( una, libuna_base32_quintuplet_copy_from_base32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_quintuplet_copy_to_base32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_quintuplet_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_quintuplet_copy_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_stream_size_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_stream_copy_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_stream_size_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_stream_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_stream_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl Base64 stream functions AC_CHECK_LIB( una, libuna_base64_triplet_copy_from_base64_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_triplet_copy_to_base64_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_triplet_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_triplet_copy_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_stream_size_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_stream_copy_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_stream_size_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_stream_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_stream_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl Byte stream functions AC_CHECK_LIB( una, libuna_byte_stream_size_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_byte_stream_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_byte_stream_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_byte_stream_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_byte_stream_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_byte_stream_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl UTF-8 stream functions AC_CHECK_LIB( una, libuna_utf8_stream_size_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_stream_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_stream_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_stream_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_stream_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_stream_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl UTF-16 stream functions AC_CHECK_LIB( una, libuna_utf16_stream_size_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_stream_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_stream_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_stream_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_stream_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_stream_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl UTF-32 stream functions AC_CHECK_LIB( una, libuna_utf32_stream_size_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_stream_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_stream_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_stream_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_stream_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_stream_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl UTF-8 string functions AC_CHECK_LIB( una, libuna_utf8_string_size_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl UTF-16 string functions AC_CHECK_LIB( una, libuna_utf16_string_size_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl UTF-32 string functions AC_CHECK_LIB( una, libuna_utf32_string_size_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( libuna_utf32_string_with_index_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) ac_cv_libuna_LIBADD="-luna" ]) ]) ]) AS_IF( [test "x$ac_cv_libuna" = xyes], [AC_DEFINE( [HAVE_LIBUNA], [1], [Define to 1 if you have the `una' library (-luna).]) ]) AS_IF( [test "x$ac_cv_libuna" = xyes], [AC_SUBST( [HAVE_LIBUNA], [1]) ], [AC_SUBST( [HAVE_LIBUNA], [0]) ]) ]) dnl Function to detect how to enable libuna AC_DEFUN([AX_LIBUNA_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libuna], [libuna], [search for libuna in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBUNA_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libuna" != xyes], [ac_cv_libuna_CPPFLAGS="-I../libuna"; ac_cv_libuna_LIBADD="../libuna/libuna.la"; ac_cv_libuna=local AC_DEFINE( [HAVE_LOCAL_LIBUNA], [1], [Define to 1 if the local version of libuna is used.]) AC_SUBST( [HAVE_LOCAL_LIBUNA], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBUNA], [test "x$ac_cv_libuna" = xlocal]) AS_IF( [test "x$ac_cv_libuna_CPPFLAGS" != "x"], [AC_SUBST( [LIBUNA_CPPFLAGS], [$ac_cv_libuna_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libuna_LIBADD" != "x"], [AC_SUBST( [LIBUNA_LIBADD], [$ac_cv_libuna_LIBADD]) ]) AS_IF( [test "x$ac_cv_libuna" = xyes], [AC_SUBST( [ax_libuna_pc_libs_private], [-luna]) ]) AS_IF( [test "x$ac_cv_libuna" = xyes], [AC_SUBST( [ax_libuna_spec_requires], [libuna]) AC_SUBST( [ax_libuna_spec_build_requires], [libuna-devel]) ]) ]) libevt-20170120/m4/gettext.m40000644000175000017500000003513211642277124017613 0ustar00lordyestalordyesta00000000000000# gettext.m4 serial 63 (gettext-0.18) dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl 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 can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE([HAVE_DCGETTEXT], [1], [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST([BUILD_INCLUDED_LIBINTL]) AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST([DATADIRNAME]) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST([INSTOBJEXT]) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST([GENCAT]) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST([INTLOBJS]) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST([INTLLIBS]) dnl Make all documented variables known to autoconf. AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) AC_SUBST([POSUB]) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) libevt-20170120/m4/tests.m40000664000175000017500000000071713024107631017263 0ustar00lordyestalordyesta00000000000000dnl Functions for testing dnl dnl Version: 20161212 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]) 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 funtion is available in GNU dl.]) ]) ]) libevt-20170120/m4/libwrc.m40000664000175000017500000000565612675771063017433 0ustar00lordyestalordyesta00000000000000dnl Functions for libwrc dnl dnl Version: 20120501 dnl Function to detect if libwrc is available dnl ac_libwrc_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBWRC_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libwrc" != x && test "x$ac_cv_with_libwrc" != xno && test "x$ac_cv_with_libwrc" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libwrc"], [CFLAGS="$CFLAGS -I${ac_cv_with_libwrc}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libwrc}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libwrc]) ]) ]) AS_IF( [test "x$ac_cv_with_libwrc" = xno], [ac_cv_libwrc=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libwrc], [libwrc >= 20120405], [ac_cv_libwrc=yes], [ac_cv_libwrc=no]) ]) AS_IF( [test "x$ac_cv_libwrc" = xyes], [ac_cv_libwrc_CPPFLAGS="$pkg_cv_libwrc_CFLAGS" ac_cv_libwrc_LIBADD="$pkg_cv_libwrc_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libwrc.h]) AS_IF( [test "x$ac_cv_header_libwrc_h" = xno], [ac_cv_libwrc=no], [dnl Check for the individual functions ac_cv_libwrc=yes AC_CHECK_LIB( wrc, libwrc_get_version, [ac_cv_libwrc_dummy=yes], [ac_cv_libwrc=no]) dnl TODO add functions ac_cv_libwrc_LIBADD="-lwrc" ]) ]) ]) AS_IF( [test "x$ac_cv_libwrc" = xyes], [AC_DEFINE( [HAVE_LIBWRC], [1], [Define to 1 if you have the `wrc' library (-lwrc).]) ]) AS_IF( [test "x$ac_cv_libwrc" = xyes], [AC_SUBST( [HAVE_LIBWRC], [1]) ], [AC_SUBST( [HAVE_LIBWRC], [0]) ]) ]) dnl Function to detect how to enable libwrc AC_DEFUN([AX_LIBWRC_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libwrc], [libwrc], [search for libwrc 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_LIBWRC_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libwrc" != xyes], [ac_cv_libwrc_CPPFLAGS="-I../libwrc"; ac_cv_libwrc_LIBADD="../libwrc/libwrc.la"; ac_cv_libwrc=local AC_DEFINE( [HAVE_LOCAL_LIBWRC], [1], [Define to 1 if the local version of libwrc is used.]) AC_SUBST( [HAVE_LOCAL_LIBWRC], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBWRC], [test "x$ac_cv_libwrc" = xlocal]) AS_IF( [test "x$ac_cv_libwrc_CPPFLAGS" != "x"], [AC_SUBST( [LIBWRC_CPPFLAGS], [$ac_cv_libwrc_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libwrc_LIBADD" != "x"], [AC_SUBST( [LIBWRC_LIBADD], [$ac_cv_libwrc_LIBADD]) ]) AS_IF( [test "x$ac_cv_libwrc" = xyes], [AC_SUBST( [ax_libwrc_pc_libs_private], [-lwrc]) ]) AS_IF( [test "x$ac_cv_libwrc" = xyes], [AC_SUBST( [ax_libwrc_spec_requires], [libwrc]) AC_SUBST( [ax_libwrc_spec_build_requires], [libwrc-devel]) ]) ]) libevt-20170120/m4/libfwevt.m40000664000175000017500000003672412675773551017777 0ustar00lordyestalordyesta00000000000000dnl Functions for libfwevt dnl dnl Version: 20160112 dnl Function to detect if libfwevt is available dnl ac_libfwevt_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFWEVT_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfwevt" != x && test "x$ac_cv_with_libfwevt" != xno && test "x$ac_cv_with_libfwevt" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfwevt"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfwevt}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfwevt}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfwevt]) ]) ]) AS_IF( [test "x$ac_cv_with_libfwevt" = xno], [ac_cv_libfwevt=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfwevt], [libfwevt >= 20160103], [ac_cv_libfwevt=yes], [ac_cv_libfwevt=no]) ]) AS_IF( [test "x$ac_cv_libfwevt" = xyes], [ac_cv_libfwevt_CPPFLAGS="$pkg_cv_libfwevt_CFLAGS" ac_cv_libfwevt_LIBADD="$pkg_cv_libfwevt_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfwevt.h]) AS_IF( [test "x$ac_cv_header_libfwevt_h" = xno], [ac_cv_libfwevt=no], [dnl Check for the individual functions ac_cv_libfwevt=yes AC_CHECK_LIB( fwevt, libfwevt_get_version, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) dnl Channel functions AC_CHECK_LIB( fwevt, libfwevt_channel_initialize, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_channel_free, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_channel_read, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) dnl Event functions AC_CHECK_LIB( fwevt, libfwevt_event_initialize, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_event_free, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_event_read, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_event_get_identifier, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_event_get_message_identifier, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_event_get_template_offset, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) dnl Keyword functions AC_CHECK_LIB( fwevt, libfwevt_keyword_initialize, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_keyword_free, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_keyword_read, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) dnl Level functions AC_CHECK_LIB( fwevt, libfwevt_level_initialize, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_level_free, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_level_read, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) dnl Manifest functions AC_CHECK_LIB( fwevt, libfwevt_manifest_initialize, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_manifest_free, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_manifest_read, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_manifest_get_number_of_providers, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_manifest_get_provider, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_manifest_get_provider_by_identifier, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) dnl Map functions AC_CHECK_LIB( fwevt, libfwevt_map_initialize, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_map_free, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_map_read, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) dnl Opcode functions AC_CHECK_LIB( fwevt, libfwevt_opcode_initialize, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_opcode_free, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_opcode_read, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) dnl Provider functions AC_CHECK_LIB( fwevt, libfwevt_provider_initialize, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_free, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_read, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_read_channels, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_read_events, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_read_keywords, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_read_levels, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_read_maps, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_read_opcodes, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_read_tasks, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_read_templates, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_compare_identifier, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_number_of_channels, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_channel, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_number_of_events, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_event, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_event_by_identifier, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_number_of_keywords, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_keyword, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_number_of_levels, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_level, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_number_of_maps, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_map, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_number_of_opcodes, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_opcode, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_number_of_tasks, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_task, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_number_of_templates, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_template, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_provider_get_template_by_offset, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) dnl Task functions AC_CHECK_LIB( fwevt, libfwevt_task_initialize, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_task_free, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_task_read, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) dnl Template functions AC_CHECK_LIB( fwevt, libfwevt_template_initialize, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_template_free, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_template_read, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_template_read_xml_document, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_template_set_ascii_codepage, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_template_get_data, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_template_set_data [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_template_get_offset [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_template_set_offset [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_template_get_size [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) dnl XML document functions AC_CHECK_LIB( fwevt, libfwevt_xml_document_initialize, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_document_free, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_document_clone, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_document_get_root_xml_tag, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_document_read, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_document_get_utf8_xml_string_size, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_document_get_utf8_xml_string, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_document_get_utf16_xml_string_size, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_document_get_utf16_xml_string, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AS_IF( [test "x$ac_cv_enable_debug_output" != xno ], [AC_CHECK_LIB( fwevt, libfwevt_xml_document_debug_print, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) ]) dnl XML tag functions AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_utf8_name_size, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_utf8_name, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_utf16_name_size, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_utf16_name, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_utf8_value_size, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_utf8_value, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_utf16_value_size, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_utf16_value, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_number_of_attributes, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_attribute_by_index, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_attribute_by_utf8_name, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_attribute_by_utf16_name, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_number_of_elements, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_element_by_index, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_element_by_utf8_name, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_element_by_utf16_name, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_flags, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) ac_cv_libfwevt_LIBADD="-lfwevt" ]) ]) ]) AS_IF( [test "x$ac_cv_libfwevt" = xyes], [AC_DEFINE( [HAVE_LIBFWEVT], [1], [Define to 1 if you have the `fwevt' library (-lfwevt).]) ]) AS_IF( [test "x$ac_cv_libfwevt" = xyes], [AC_SUBST( [HAVE_LIBFWEVT], [1]) ], [AC_SUBST( [HAVE_LIBFWEVT], [0]) ]) ]) dnl Function to detect how to enable libfwevt AC_DEFUN([AX_LIBFWEVT_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfwevt], [libfwevt], [search for libfwevt 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_LIBFWEVT_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfwevt" != xyes], [ac_cv_libfwevt_CPPFLAGS="-I../libfwevt"; ac_cv_libfwevt_LIBADD="../libfwevt/libfwevt.la"; ac_cv_libfwevt=local AC_DEFINE( [HAVE_LOCAL_LIBFWEVT], [1], [Define to 1 if the local version of libfwevt is used.]) AC_SUBST( [HAVE_LOCAL_LIBFWEVT], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFWEVT], [test "x$ac_cv_libfwevt" = xlocal]) AS_IF( [test "x$ac_cv_libfwevt_CPPFLAGS" != "x"], [AC_SUBST( [LIBFWEVT_CPPFLAGS], [$ac_cv_libfwevt_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfwevt_LIBADD" != "x"], [AC_SUBST( [LIBFWEVT_LIBADD], [$ac_cv_libfwevt_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfwevt" = xyes], [AC_SUBST( [ax_libfwevt_pc_libs_private], [-lfwevt]) ]) AS_IF( [test "x$ac_cv_libfwevt" = xyes], [AC_SUBST( [ax_libfwevt_spec_requires], [libfwevt]) AC_SUBST( [ax_libfwevt_spec_build_requires], [libfwevt-devel]) ]) ]) libevt-20170120/m4/lib-prefix.m40000644000175000017500000002042211642277124020164 0ustar00lordyestalordyesta00000000000000# lib-prefix.m4 serial 7 (gettext-0.18) dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a variable acl_libdirstem, containing the basename of the libdir, either dnl "lib" or "lib64" or "lib/64", dnl - a variable acl_libdirstem2, as a secondary possible value for dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. dnl On 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. We determine dnl the compiler's default mode by looking at the compiler's library search dnl path. If at least one of its elements ends in /lib64 or points to a dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. dnl Otherwise we use the default, 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]) acl_libdirstem=lib acl_libdirstem2= 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. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) libevt-20170120/m4/libregf.m40000664000175000017500000000711612675771063017554 0ustar00lordyestalordyesta00000000000000dnl Functions for libregf dnl dnl Version: 20120501 dnl Function to detect if libregf is available dnl ac_libregf_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBREGF_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libregf" != x && test "x$ac_cv_with_libregf" != xno && test "x$ac_cv_with_libregf" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libregf"], [CFLAGS="$CFLAGS -I${ac_cv_with_libregf}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libregf}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libregf]) ]) ]) AS_IF( [test "x$ac_cv_with_libregf" = xno], [ac_cv_libregf=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libregf], [libregf >= 20120405], [ac_cv_libregf=yes], [ac_cv_libregf=no]) ]) AS_IF( [test "x$ac_cv_libregf" = xyes], [ac_cv_libregf_CPPFLAGS="$pkg_cv_libregf_CFLAGS" ac_cv_libregf_LIBADD="$pkg_cv_libregf_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libregf.h]) AS_IF( [test "x$ac_cv_header_libregf_h" = xno], [ac_cv_libregf=no], [dnl Check for the individual functions ac_cv_libregf=yes AC_CHECK_LIB( regf, libregf_get_version, [ac_cv_libregf_dummy=yes], [ac_cv_libregf=no]) dnl TODO add functions ac_cv_libregf_LIBADD="-lregf" ]) ]) ]) AS_IF( [test "x$ac_cv_libregf" = xyes], [AC_DEFINE( [HAVE_LIBREGF], [1], [Define to 1 if you have the `regf' library (-lregf).]) ]) AS_IF( [test "x$ac_cv_libregf" = xyes], [AC_SUBST( [HAVE_LIBREGF], [1]) ], [AC_SUBST( [HAVE_LIBREGF], [0]) ]) ]) dnl Function to detect if libregf dependencies are available AC_DEFUN([AX_LIBREGF_CHECK_LOCAL], [dnl Headers included in libregf/libregf_file.h, libregf/libregf_key.h dnl libregf/libregf_key_item_values.h and libregf/libregf_value_item_values.h AC_CHECK_HEADERS([wctype.h]) dnl Functions used in libregf/libregf_file.h, libregf/libregf_key.h dnl libregf/libregf_key_item_values.h and libregf/libregf_value_item_values.h AC_CHECK_FUNCS([towupper]) AS_IF( [test "x$ac_cv_func_towupper" != xyes], [AC_MSG_FAILURE( [Missing functions: towupper], [1]) ]) ac_cv_libregf_CPPFLAGS="-I../libregf"; ac_cv_libregf_LIBADD="../libregf/libregf.la"; ac_cv_libregf=local ]) dnl Function to detect how to enable libregf AC_DEFUN([AX_LIBREGF_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libregf], [libregf], [search for libregf 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_LIBREGF_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libregf" != xyes], [AX_LIBREGF_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBREGF], [1], [Define to 1 if the local version of libregf is used.]) AC_SUBST( [HAVE_LOCAL_LIBREGF], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBREGF], [test "x$ac_cv_libregf" = xlocal]) AS_IF( [test "x$ac_cv_libregf_CPPFLAGS" != "x"], [AC_SUBST( [LIBREGF_CPPFLAGS], [$ac_cv_libregf_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libregf_LIBADD" != "x"], [AC_SUBST( [LIBREGF_LIBADD], [$ac_cv_libregf_LIBADD]) ]) AS_IF( [test "x$ac_cv_libregf" = xyes], [AC_SUBST( [ax_libregf_pc_libs_private], [-lregf]) ]) AS_IF( [test "x$ac_cv_libregf" = xyes], [AC_SUBST( [ax_libregf_spec_requires], [libregf]) AC_SUBST( [ax_libregf_spec_build_requires], [libregf-devel]) ]) ]) libevt-20170120/m4/ltoptions.m40000644000175000017500000003426213040342646020161 0ustar00lordyestalordyesta00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 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])]) libevt-20170120/m4/libfwnt.m40000664000175000017500000001561013012267054017567 0ustar00lordyestalordyesta00000000000000dnl Functions for libfwnt dnl dnl Version: 20161107 dnl Function to detect if libfwnt is available dnl ac_libfwnt_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFWNT_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xno && test "x$ac_cv_with_libfwnt" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfwnt"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfwnt}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfwnt}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfwnt]) ]) ]) AS_IF( [test "x$ac_cv_with_libfwnt" = xno], [ac_cv_libfwnt=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfwnt], [libfwnt >= 20161103], [ac_cv_libfwnt=yes], [ac_cv_libfwnt=no]) ]) AS_IF( [test "x$ac_cv_libfwnt" = xyes], [ac_cv_libfwnt_CPPFLAGS="$pkg_cv_libfwnt_CFLAGS" ac_cv_libfwnt_LIBADD="$pkg_cv_libfwnt_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfwnt.h]) AS_IF( [test "x$ac_cv_header_libfwnt_h" = xno], [ac_cv_libfwnt=no], [dnl Check for the individual functions ac_cv_libfwnt=yes AC_CHECK_LIB( fwnt, libfwnt_get_version, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) dnl 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_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], [AC_DEFINE( [HAVE_LIBFWNT], [1], [Define to 1 if you have the `fwnt' library (-lfwnt).]) ]) AS_IF( [test "x$ac_cv_libfwnt" = xyes], [AC_SUBST( [HAVE_LIBFWNT], [1]) ], [AC_SUBST( [HAVE_LIBFWNT], [0]) ]) ]) dnl Function to detect how to enable libfwnt AC_DEFUN([AX_LIBFWNT_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfwnt], [libfwnt], [search for libfwnt in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBFWNT_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfwnt" != xyes], [ac_cv_libfwnt_CPPFLAGS="-I../libfwnt"; ac_cv_libfwnt_LIBADD="../libfwnt/libfwnt.la"; ac_cv_libfwnt=local AC_DEFINE( [HAVE_LOCAL_LIBFWNT], [1], [Define to 1 if the local version of libfwnt is used.]) AC_SUBST( [HAVE_LOCAL_LIBFWNT], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFWNT], [test "x$ac_cv_libfwnt" = xlocal]) AS_IF( [test "x$ac_cv_libfwnt_CPPFLAGS" != "x"], [AC_SUBST( [LIBFWNT_CPPFLAGS], [$ac_cv_libfwnt_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfwnt_LIBADD" != "x"], [AC_SUBST( [LIBFWNT_LIBADD], [$ac_cv_libfwnt_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfwnt" = xyes], [AC_SUBST( [ax_libfwnt_pc_libs_private], [-lfwnt]) ]) AS_IF( [test "x$ac_cv_libfwnt" = xyes], [AC_SUBST( [ax_libfwnt_spec_requires], [libfwnt]) AC_SUBST( [ax_libfwnt_spec_build_requires], [libfwnt-devel]) ]) ]) libevt-20170120/m4/libcpath.m40000664000175000017500000001555712675773545017747 0ustar00lordyestalordyesta00000000000000dnl Functions for libcpath dnl dnl Version: 20130406 dnl Function to detect if libcpath is available dnl ac_libcpath_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCPATH_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xno && test "x$ac_cv_with_libcpath" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcpath"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcpath}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcpath}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcpath]) ]) ]) AS_IF( [test "x$ac_cv_with_libcpath" = xno], [ac_cv_libcpath=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcpath], [libcpath >= 20120701], [ac_cv_libcpath=yes], [ac_cv_libcpath=no]) ]) AS_IF( [test "x$ac_cv_libcpath" = xyes], [ac_cv_libcpath_CPPFLAGS="$pkg_cv_libcpath_CFLAGS" ac_cv_libcpath_LIBADD="$pkg_cv_libcpath_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcpath.h]) AS_IF( [test "x$ac_cv_header_libcpath_h" = xno], [ac_cv_libcpath=no], [dnl Check for the individual functions ac_cv_libcpath=yes AC_CHECK_LIB( cpath, libcpath_get_version, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) dnl Path functions AC_CHECK_LIB( cpath, libcpath_path_change_directory, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_get_current_working_directory, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_get_full_path, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_join, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_make_directory, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_sanitize, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_sanitize_filename, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( cpath, libcpath_path_change_directory_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_get_current_working_directory_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_get_full_path_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_join_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_make_directory_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_sanitize_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_sanitize_filename_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) ]) ac_cv_libcpath_LIBADD="-lcpath" ]) ]) ]) AS_IF( [test "x$ac_cv_libcpath" = xyes], [AC_DEFINE( [HAVE_LIBCPATH], [1], [Define to 1 if you have the `cpath' library (-lcpath).]) ]) AS_IF( [test "x$ac_cv_libcpath" = xyes], [AC_SUBST( [HAVE_LIBCPATH], [1]) ], [AC_SUBST( [HAVE_LIBCPATH], [0]) ]) ]) dnl Function to detect if mkdir is available dnl Also checks how to use mkdir AC_DEFUN([AX_LIBCPATH_CHECK_FUNC_MKDIR], [AC_CHECK_FUNCS([mkdir]) AS_IF( [test "x$ac_cv_func_mkdir" = xyes], [AC_MSG_CHECKING( [how to use mkdir]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" AC_LANG_PUSH(C) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[mkdir( "", 0 )]] )], [AC_MSG_RESULT( [with additional mode argument]) ac_cv_cv_mkdir_mode=yes], [ac_cv_cv_mkdir_mode=no]) AS_IF( [test "x$ac_cv_cv_mkdir_mode" = xno], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[mkdir( "" )]] )], [AC_MSG_RESULT( [with single argument]) ac_cv_cv_mkdir=yes], [ac_cv_cv_mkdir=no]) ]) AC_LANG_POP(C) CFLAGS="$SAVE_CFLAGS" AS_IF( [test "x$ac_cv_cv_mkdir_mode" = xno && test "x$ac_cv_cv_mkdir" = xno], [AC_MSG_WARN( [unknown]) ac_cv_func_mkdir=no]) AS_IF( [test "x$ac_cv_func_mkdir" = xyes], [AC_DEFINE( [HAVE_MKDIR], [1], [Define to 1 if you have the mkdir function.]) ]) AS_IF( [test "x$ac_cv_cv_mkdir_mode" = xyes], [AC_DEFINE( [HAVE_MKDIR_MODE], [1], [Define to 1 if you have the mkdir function with a second mode argument.]) ]) ]) AS_IF( [test "x$ac_cv_func_mkdir" = xno], [AC_MSG_FAILURE( [Missing function: mkdir], [1]) ]) ]) dnl Function to detect if libcpath dependencies are available AC_DEFUN([AX_LIBCPATH_CHECK_LOCAL], [dnl Headers included in libcpath/libcpath_path.h AC_CHECK_HEADERS([errno.h sys/stat.h sys/syslimits.h]) dnl Path functions used in libcpath/libcpath_path.h AC_CHECK_FUNCS([chdir getcwd]) AS_IF( [test "x$ac_cv_func_chdir" != xyes], [AC_MSG_FAILURE( [Missing functions: chdir], [1]) ]) AS_IF( [test "x$ac_cv_func_getcwd" != xyes], [AC_MSG_FAILURE( [Missing functions: getcwd], [1]) ]) AX_LIBCPATH_CHECK_FUNC_MKDIR ac_cv_libcpath_CPPFLAGS="-I../libcpath"; ac_cv_libcpath_LIBADD="../libcpath/libcpath.la"; ac_cv_libcpath=local ]) dnl Function to detect how to enable libcpath AC_DEFUN([AX_LIBCPATH_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcpath], [libcpath], [search for libcpath in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCPATH_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcpath" != xyes], [AX_LIBCPATH_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCPATH], [1], [Define to 1 if the local version of libcpath is used.]) AC_SUBST( [HAVE_LOCAL_LIBCPATH], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCPATH], [test "x$ac_cv_libcpath" = xlocal]) AS_IF( [test "x$ac_cv_libcpath_CPPFLAGS" != "x"], [AC_SUBST( [LIBCPATH_CPPFLAGS], [$ac_cv_libcpath_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcpath_LIBADD" != "x"], [AC_SUBST( [LIBCPATH_LIBADD], [$ac_cv_libcpath_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcpath" = xyes], [AC_SUBST( [ax_libcpath_pc_libs_private], [-lcpath]) ]) AS_IF( [test "x$ac_cv_libcpath" = xyes], [AC_SUBST( [ax_libcpath_spec_requires], [libcpath]) AC_SUBST( [ax_libcpath_spec_build_requires], [libcpath-devel]) ]) ]) libevt-20170120/m4/lib-ld.m40000644000175000017500000000660311642277124017273 0ustar00lordyestalordyesta00000000000000# lib-ld.m4 serial 4 (gettext-0.18) dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT([$LD]) else AC_MSG_RESULT([no]) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) libevt-20170120/m4/libcthreads.m40000664000175000017500000002225012712542106020404 0ustar00lordyestalordyesta00000000000000dnl Functions for libcthreads dnl dnl Version: 20160404 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], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xno && test "x$ac_cv_with_libcthreads" != xauto-detect], [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_WARN([no such directory: $ac_cv_with_libcthreads]) ]) ]) AS_IF( [test "x$ac_cv_with_libcthreads" = xno], [ac_cv_libcthreads=no], [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=no]) ]) AS_IF( [test "x$ac_cv_libcthreads" = xyes], [ac_cv_libcthreads_CPPFLAGS="$pkg_cv_libcthreads_CFLAGS" ac_cv_libcthreads_LIBADD="$pkg_cv_libcthreads_LIBS"], [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], [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"; 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]) ]) ]) libevt-20170120/m4/lib-link.m40000644000175000017500000010020211642277124017617 0ustar00lordyestalordyesta00000000000000# lib-link.m4 serial 21 (gettext-0.18) dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ([2.54]) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[translit([$1],[./-], [___])]) pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes 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],[translit([$1],[./-], [___])]) pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" 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_TRY_LINK([$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_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_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],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [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],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) 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(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-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\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= 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 dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; 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" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) 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"; 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"; 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]) ]) libevt-20170120/m4/python.m40000664000175000017500000003522112675773551017465 0ustar00lordyestalordyesta00000000000000dnl Functions for Python bindings dnl dnl Version: 20160106 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 python2 python2.7 python2.6 python2.5 python3 python3.4 python3.3 python3.2 python3.1 python3.0"]) AC_CHECK_PROGS( [PYTHON], [$ax_python_progs]) AS_IF( [test "x${PYTHON}" != x], [ax_prog_python_version=`${PYTHON} -c "import sys; sys.stdout.write(sys.version[[:3]])" 2>/dev/null`; AC_SUBST( [PYTHON_VERSION], [$ax_prog_python_version]) 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 python2 binary is available dnl "python2 python2.#" AC_DEFUN([AX_PROG_PYTHON2], [ax_python2_progs="python2 python2.7 python2.6 python2.5" AC_CHECK_PROGS( [PYTHON2], [$ax_python2_progs]) AS_IF( [test "x${PYTHON2}" != x], [ax_prog_python2_version=`${PYTHON2} -c "import sys; sys.stdout.write(sys.version[[:3]])" 2>/dev/null`; AC_SUBST( [PYTHON2_VERSION], [$ax_prog_python2_version]) ax_prog_python2_platform=`${PYTHON2} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; AC_SUBST( [PYTHON2_PLATFORM], [$ax_prog_python2_platform]) ], [AC_MSG_ERROR( [Unable to find python2]) ]) AC_SUBST( [PYTHON2], [$PYTHON2]) ]) dnl Function to check if the python3 binary is available dnl "python3 python3.#" AC_DEFUN([AX_PROG_PYTHON3], [ax_python3_progs="python3 python3.4 python3.3 python3.2 python3.1 python3.0" AC_CHECK_PROGS( [PYTHON3], [$ax_python3_progs]) AS_IF( [test "x${PYTHON3}" != x], [ax_prog_python3_version=`${PYTHON3} -c "import sys; sys.stdout.write(sys.version[[:3]])" 2>/dev/null`; AC_SUBST( [PYTHON3_VERSION], [$ax_prog_python3_version]) ax_prog_python3_platform=`${PYTHON3} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; AC_SUBST( [PYTHON3_PLATFORM], [$ax_prog_python3_platform]) ], [AC_MSG_ERROR( [Unable to find python3]) ]) AC_SUBST( [PYTHON3], [$PYTHON3]) ]) 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}" != x], [AC_CHECK_PROGS( [PYTHON_CONFIG], [python${PYTHON_VERSION}-config python-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 check if the python2-config binary is available AC_DEFUN([AX_PROG_PYTHON2_CONFIG], [AS_IF( [test "x${PYTHON2}" != x], [AC_CHECK_PROGS( [PYTHON2_CONFIG], [python2-config]) ]) AS_IF( [test "x${PYTHON2_CONFIG}" = x], [AC_MSG_ERROR( [Unable to find python2-config]) ]) AC_SUBST( [PYTHON2_CONFIG], [$PYTHON2_CONFIG]) ]) dnl Function to check if the python3-config binary is available AC_DEFUN([AX_PROG_PYTHON3_CONFIG], [AS_IF( [test "x${PYTHON3}" != x], [AC_CHECK_PROGS( [PYTHON3_CONFIG], [python3-config]) ]) AS_IF( [test "x${PYTHON3_CONFIG}" = x], [AC_MSG_ERROR( [Unable to find python3-config]) ]) AC_SUBST( [PYTHON3_CONFIG], [$PYTHON3_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 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=$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 distutils.sysconfig; print 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 distutils.sysconfig; print 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 detect if a Python 2 build environment is available AC_DEFUN([AX_PYTHON2_CHECK], [AX_PROG_PYTHON2 AX_PROG_PYTHON2_CONFIG AS_IF( [test "x${PYTHON2_CONFIG}" != x], [dnl Check for Python 2 includes PYTHON2_INCLUDES=`${PYTHON2_CONFIG} --includes 2>/dev/null`; AC_MSG_CHECKING( [for Python verison 2 includes]) AC_MSG_RESULT( [$PYTHON2_INCLUDES]) dnl Check for Python 2 libraries PYTHON2_LDFLAGS=`${PYTHON2_CONFIG} --ldflags 2>/dev/null`; AC_MSG_CHECKING( [for Python 2 libraries]) AC_MSG_RESULT( [$PYTHON2_LDFLAGS]) dnl Check for the existence of Python.h BACKUP_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PYTHON2_INCLUDES}" AC_CHECK_HEADERS( [Python.h], [ac_cv_header_python2_h=yes], [ac_cv_header_python2_h=no]) CPPFLAGS="${BACKUP_CPPFLAGS}" ]) AS_IF( [test "x${ac_cv_header_python2_h}" != xyes], [ac_cv_enable_python2=no], [ac_cv_enable_python2=$PYTHON2_VERSION AC_SUBST( [PYTHON2_CPPFLAGS], [$PYTHON2_INCLUDES]) AC_SUBST( [PYTHON2_LDFLAGS], [$PYTHON2_LDFLAGS]) dnl Check for Python prefix AS_IF( [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], [ax_python2_prefix="\${prefix}"], [ax_python2_prefix=`${PYTHON2_CONFIG} --prefix 2>/dev/null`]) AC_SUBST( [PYTHON2_PREFIX], [$ax_python2_prefix]) dnl Check for Python exec-prefix AS_IF( [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], [ax_python2_exec_prefix="\${exec_prefix}"], [ax_python2_exec_prefix=`${PYTHON2_CONFIG} --exec-prefix 2>/dev/null`]) AC_SUBST( [PYTHON2_EXEC_PREFIX], [$ax_python2_exec_prefix]) dnl Check for Python 2 library directory ax_python2_pythondir_suffix=`${PYTHON2} -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_pythondir2}" = x || test "x${ac_cv_with_pythondir2}" = xno], [AS_IF( [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], [ax_python2_pythondir="${ax_python_prefix}/${ax_python2_pythondir_suffix}"], [ax_python2_pythondir=`${PYTHON2} -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib() " 2>/dev/null`])], [ax_python2_pythondir=$ac_cv_with_pythondir2]) AC_SUBST( [pythondir2], [$ax_python2_pythondir]) dnl Check for Python 2 platform specific library directory ax_python2_pyexecdir_suffix=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; ax_python2_library_dir=`${PYTHON2} -c "import distutils.sysconfig; print 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_python2_pyexecdir="${ax_python2_exec_prefix}/${ax_python2_pyexecdir_suffix}"], [ax_python2_pyexecdir=$ax_python2_library_dir]) AC_SUBST( [pyexecdir2], [$ax_python2_pyexecdir]) AC_SUBST( [PYTHON2_LIBRARY_DIR], [$ax_python2_pyexecdir_suffix]) AC_SUBST( [PYTHON2_PACKAGE_DIR], [$ax_python2_library_dir]) ]) ]) dnl Function to detect if a Python 3 build environment is available AC_DEFUN([AX_PYTHON3_CHECK], [AX_PROG_PYTHON3 AX_PROG_PYTHON3_CONFIG AS_IF( [test "x${PYTHON3_CONFIG}" != x], [dnl Check for Python 3 includes PYTHON3_INCLUDES=`${PYTHON3_CONFIG} --includes 2>/dev/null`; AC_MSG_CHECKING( [for Python verison 3 includes]) AC_MSG_RESULT( [$PYTHON3_INCLUDES]) dnl Check for Python 3 libraries PYTHON3_LDFLAGS=`${PYTHON3_CONFIG} --ldflags 2>/dev/null`; AC_MSG_CHECKING( [for Python 3 libraries]) AC_MSG_RESULT( [$PYTHON3_LDFLAGS]) dnl Check for the existence of Python.h BACKUP_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PYTHON3_INCLUDES}" AC_CHECK_HEADERS( [Python.h], [ac_cv_header_python3_h=yes], [ac_cv_header_python3_h=no]) CPPFLAGS="${BACKUP_CPPFLAGS}" ]) AS_IF( [test "x${ac_cv_header_python3_h}" != xyes], [ac_cv_enable_python3=no], [ac_cv_enable_python3=$PYTHON3_VERSION AC_SUBST( [PYTHON3_CPPFLAGS], [$PYTHON3_INCLUDES]) AC_SUBST( [PYTHON3_LDFLAGS], [$PYTHON3_LDFLAGS]) dnl Check for Python prefix AS_IF( [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], [ax_python3_prefix="\${prefix}"], [ax_python3_prefix=`${PYTHON3_CONFIG} --prefix 2>/dev/null`]) AC_SUBST( [PYTHON3_PREFIX], [$ax_python3_prefix]) dnl Check for Python exec-prefix AS_IF( [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], [ax_python3_exec_prefix="\${exec_prefix}"], [ax_python3_exec_prefix=`${PYTHON3_CONFIG} --exec-prefix 2>/dev/null`]) AC_SUBST( [PYTHON3_EXEC_PREFIX], [$ax_python3_exec_prefix]) dnl Check for Python 3 library directory ax_python3_pythondir_suffix=`${PYTHON3} -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_pythondir3}" = x || test "x${ac_cv_with_pythondir3}" = xno], [AS_IF( [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], [ax_python3_pythondir="${ax_python_prefix}/${ax_python3_pythondir_suffix}"], [ax_python3_pythondir=`${PYTHON3} -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib() " 2>/dev/null`])], [ax_python3_pythondir=$ac_cv_with_pythondir3]) AC_SUBST( [pythondir3], [$ax_python3_pythondir]) dnl Check for Python 3 platform specific library directory ax_python3_pyexecdir_suffix=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; ax_python3_library_dir=`${PYTHON3} -c "import distutils.sysconfig; print 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_python3_pyexecdir="${ax_python3_exec_prefix}/${ax_python3_pyexecdir_suffix}"], [ax_python3_pyexecdir=$ax_python3_library_dir]) AC_SUBST( [pyexecdir3], [$ax_python3_pyexecdir]) AC_SUBST( [PYTHON3_LIBRARY_DIR], [$ax_python3_pyexecdir_suffix]) AC_SUBST( [PYTHON3_PACKAGE_DIR], [$ax_python3_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_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]) AS_IF( [test "x${ac_cv_enable_python}" != xno], [AC_DEFINE( [HAVE_PYTHON], [1], [Define to 1 if you have Python]) ]) AM_CONDITIONAL( HAVE_PYTHON, [test "x${ac_cv_enable_python}" != xno]) ]) dnl Function to detect if to enable Python 2 AC_DEFUN([AX_PYTHON2_CHECK_ENABLE], [AX_COMMON_ARG_ENABLE( [python2], [python2], [build Python 2 bindings], [no]) AX_COMMON_ARG_WITH( [pythondir2], [pythondir2], [use to specify the Python 2 directory (pythondir2)], [no], [no]) AS_IF( [test "x${ac_cv_enable_python2}" != xno], [AX_PYTHON2_CHECK]) AS_IF( [test "x${ac_cv_enable_python2}" != xno], [AC_DEFINE( [HAVE_PYTHON2], [1], [Define to 1 if you have Python 2]) ]) AM_CONDITIONAL( HAVE_PYTHON2, [test "x${ac_cv_enable_python2}" != xno]) ]) dnl Function to detect if to enable Python 3 AC_DEFUN([AX_PYTHON3_CHECK_ENABLE], [AX_COMMON_ARG_ENABLE( [python3], [python3], [build Python 3 bindings], [no]) AX_COMMON_ARG_WITH( [pythondir3], [pythondir3], [use to specify the Python 3 directory (pythondir3)], [no], [no]) AS_IF( [test "x${ac_cv_enable_python3}" != xno], [AX_PYTHON3_CHECK]) AS_IF( [test "x${ac_cv_enable_python3}" != xno], [AC_DEFINE( [HAVE_PYTHON3], [1], [Define to 1 if you have Python 3]) ]) AM_CONDITIONAL( HAVE_PYTHON3, [test "x${ac_cv_enable_python3}" != xno]) ]) libevt-20170120/m4/libtool.m40000644000175000017500000112530613040342646017573 0ustar00lordyestalordyesta00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 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 . ]) # serial 58 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_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, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## 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 cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -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*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test 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], [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 `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out 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 `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; 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 `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file 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 `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file 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 `/usr/bin/file 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} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 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* | 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 -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_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*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # 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*) # 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='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. 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*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be 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=/usr/bin/file 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++, # 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*) # 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 == "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*) _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++ 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 yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) 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 ;; 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 == "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++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-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 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*) _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 ;; 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*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-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 ;; 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*) # 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_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 libevt-20170120/m4/nls.m40000644000175000017500000000231511642277124016720 0ustar00lordyestalordyesta00000000000000# nls.m4 serial 5 (gettext-0.18) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 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 dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE([nls], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT([$USE_NLS]) AC_SUBST([USE_NLS]) ]) libevt-20170120/m4/libclocale.m40000664000175000017500000001371312675773545020242 0ustar00lordyestalordyesta00000000000000dnl Functions for libclocale dnl dnl Version: 20130406 dnl Function to detect if libclocale is available dnl ac_libclocale_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCLOCALE_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xno && test "x$ac_cv_with_libclocale" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libclocale"], [CFLAGS="$CFLAGS -I${ac_cv_with_libclocale}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libclocale}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libclocale]) ]) ]) AS_IF( [test "x$ac_cv_with_libclocale" = xno], [ac_cv_libclocale=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libclocale], [libclocale >= 20120425], [ac_cv_libclocale=yes], [ac_cv_libclocale=no]) ]) AS_IF( [test "x$ac_cv_libclocale" = xyes], [ac_cv_libclocale_CPPFLAGS="$pkg_cv_libclocale_CFLAGS" ac_cv_libclocale_LIBADD="$pkg_cv_libclocale_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libclocale.h]) AS_IF( [test "x$ac_cv_header_libclocale_h" = xno], [ac_cv_libclocale=no], [dnl Check for the individual functions ac_cv_libclocale=yes AC_CHECK_LIB( clocale, libclocale_get_version, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) dnl Codepage functions AC_CHECK_LIB( clocale, libclocale_codepage, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) AC_CHECK_LIB( clocale, libclocale_codepage_get, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) AC_CHECK_LIB( clocale, libclocale_codepage_set, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) AC_CHECK_LIB( clocale, libclocale_codepage_copy_from_string, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( clocale, libclocale_codepage_copy_from_string_wide, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) ]) dnl Locale functions AC_CHECK_LIB( clocale, libclocale_locale_get_codepage, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) AC_CHECK_LIB( clocale, libclocale_locale_get_decimal_point, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) dnl Support functions AC_CHECK_LIB( clocale, libclocale_initialize, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) ac_cv_libclocale_LIBADD="-lclocale" ]) ]) ]) AS_IF( [test "x$ac_cv_libclocale" = xyes], [AC_DEFINE( [HAVE_LIBCLOCALE], [1], [Define to 1 if you have the `clocale' library (-lclocale).]) ]) AS_IF( [test "x$ac_cv_libclocale" = xyes], [AC_SUBST( [HAVE_LIBCLOCALE], [1]) ], [AC_SUBST( [HAVE_LIBCLOCALE], [0]) ]) ]) dnl Function to detect whether nl_langinfo supports CODESET AC_DEFUN([AX_LIBCLOCALE_CHECK_FUNC_LANGINFO_CODESET], [AC_CHECK_FUNCS([nl_langinfo]) AS_IF( [test "x$ac_cv_func_nl_langinfo" = xyes], [AC_CACHE_CHECK( [for nl_langinfo CODESET support], [ac_cv_cv_langinfo_codeset], [AC_LANG_PUSH(C) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[char* charset = nl_langinfo( CODESET );]] )], [ac_cv_cv_langinfo_codeset=yes], [ac_cv_cv_langinfo_codeset=no]) AC_LANG_POP(C) ]) ], [ac_cv_cv_langinfo_codeset=no]) AS_IF( [test "x$ac_cv_cv_langinfo_codeset" = xyes], [AC_DEFINE( [HAVE_LANGINFO_CODESET], [1], [Define if nl_langinfo has CODESET support.]) ]) ]) dnl Function to detect if libclocale dependencies are available AC_DEFUN([AX_LIBCLOCALE_CHECK_LOCAL], [dnl Headers included in libclocale/libclocale_locale.c AC_CHECK_HEADERS([langinfo.h locale.h]) dnl Check for environment functions in libclocale/libclocale_locale.c AC_CHECK_FUNCS([getenv]) AS_IF( [test "x$ac_cv_func_getenv" != xyes], [AC_MSG_FAILURE( [Missing function: getenv], [1]) ]) dnl Check for localization functions in libclocale/libclocale_locale.c AS_IF( [test "x$ac_cv_enable_winapi" = xno], [AC_CHECK_FUNCS([localeconv]) AS_IF( [test "x$ac_cv_func_localeconv" != xyes], [AC_MSG_FAILURE( [Missing function: localeconv], [1]) ]) ]) AC_CHECK_FUNCS([setlocale]) AS_IF( [test "x$ac_cv_func_setlocale" != xyes], [AC_MSG_FAILURE( [Missing function: setlocale], [1]) ]) AX_LIBCLOCALE_CHECK_FUNC_LANGINFO_CODESET ac_cv_libclocale_CPPFLAGS="-I../libclocale"; ac_cv_libclocale_LIBADD="../libclocale/libclocale.la"; ac_cv_libclocale=local ]) dnl Function to detect how to enable libclocale AC_DEFUN([AX_LIBCLOCALE_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libclocale], [libclocale], [search for libclocale in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCLOCALE_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libclocale" != xyes], [AX_LIBCLOCALE_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCLOCALE], [1], [Define to 1 if the local version of libclocale is used.]) AC_SUBST( [HAVE_LOCAL_LIBCLOCALE], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCLOCALE], [test "x$ac_cv_libclocale" = xlocal]) AS_IF( [test "x$ac_cv_libclocale_CPPFLAGS" != "x"], [AC_SUBST( [LIBCLOCALE_CPPFLAGS], [$ac_cv_libclocale_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libclocale_LIBADD" != "x"], [AC_SUBST( [LIBCLOCALE_LIBADD], [$ac_cv_libclocale_LIBADD]) ]) AS_IF( [test "x$ac_cv_libclocale" = xyes], [AC_SUBST( [ax_libclocale_pc_libs_private], [-lclocale]) ]) AS_IF( [test "x$ac_cv_libclocale" = xyes], [AC_SUBST( [ax_libclocale_spec_requires], [libclocale]) AC_SUBST( [ax_libclocale_spec_build_requires], [libclocale-devel]) ]) ]) libevt-20170120/m4/libfdata.m40000664000175000017500000002547212706057447017713 0ustar00lordyestalordyesta00000000000000dnl Functions for libfdata dnl dnl Version: 20160325 dnl Function to detect if libfdata is available dnl ac_libfdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFDATA_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xno && test "x$ac_cv_with_libfdata" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfdata"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfdata}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfdata}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfdata]) ]) ]) AS_IF( [test "x$ac_cv_with_libfdata" = xno], [ac_cv_libfdata=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfdata], [libfdata >= 20160325], [ac_cv_libfdata=yes], [ac_cv_libfdata=no]) ]) AS_IF( [test "x$ac_cv_libfdata" = xyes], [ac_cv_libfdata_CPPFLAGS="$pkg_cv_libfdata_CFLAGS" ac_cv_libfdata_LIBADD="$pkg_cv_libfdata_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfdata.h]) AS_IF( [test "x$ac_cv_header_libfdata_h" = xno], [ac_cv_libfdata=no], [dnl Check for the individual functions ac_cv_libfdata=yes AC_CHECK_LIB( fdata, libfdata_get_version, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) dnl Area functions dnl TODO: add functions dnl Balanced tree functions dnl TODO: add functions 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_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], [AC_DEFINE( [HAVE_LIBFDATA], [1], [Define to 1 if you have the `fdata' library (-lfdata).]) ]) AS_IF( [test "x$ac_cv_libfdata" = xyes], [AC_SUBST( [HAVE_LIBFDATA], [1]) ], [AC_SUBST( [HAVE_LIBFDATA], [0]) ]) ]) dnl Function to detect how to enable libfdata AC_DEFUN([AX_LIBFDATA_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfdata], [libfdata], [search for libfdata in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBFDATA_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfdata" != xyes], [ac_cv_libfdata_CPPFLAGS="-I../libfdata"; ac_cv_libfdata_LIBADD="../libfdata/libfdata.la"; ac_cv_libfdata=local AC_DEFINE( [HAVE_LOCAL_LIBFDATA], [1], [Define to 1 if the local version of libfdata is used.]) AC_SUBST( [HAVE_LOCAL_LIBFDATA], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFDATA], [test "x$ac_cv_libfdata" = xlocal]) AS_IF( [test "x$ac_cv_libfdata_CPPFLAGS" != "x"], [AC_SUBST( [LIBFDATA_CPPFLAGS], [$ac_cv_libfdata_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfdata_LIBADD" != "x"], [AC_SUBST( [LIBFDATA_LIBADD], [$ac_cv_libfdata_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfdata" = xyes], [AC_SUBST( [ax_libfdata_pc_libs_private], [-lfdata]) ]) AS_IF( [test "x$ac_cv_libfdata" = xyes], [AC_SUBST( [ax_libfdata_spec_requires], [libfdata]) AC_SUBST( [ax_libfdata_spec_build_requires], [libfdata-devel]) ]) ]) libevt-20170120/m4/libfdatetime.m40000664000175000017500000003604012733144561020561 0ustar00lordyestalordyesta00000000000000dnl Functions for libfdatetime dnl dnl Version: 20160220 dnl Function to detect if libfdatetime is available dnl ac_libfdatetime_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFDATETIME_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xno && test "x$ac_cv_with_libfdatetime" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfdatetime"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfdatetime}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfdatetime}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfdatetime]) ]) ]) AS_IF( [test "x$ac_cv_with_libfdatetime" = xno], [ac_cv_libfdatetime=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfdatetime], [libfdatetime >= 20160220], [ac_cv_libfdatetime=yes], [ac_cv_libfdatetime=no]) ]) AS_IF( [test "x$ac_cv_libfdatetime" = xyes], [ac_cv_libfdatetime_CPPFLAGS="$pkg_cv_libfdatetime_CFLAGS" ac_cv_libfdatetime_LIBADD="$pkg_cv_libfdatetime_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfdatetime.h]) AS_IF( [test "x$ac_cv_header_libfdatetime_h" = xno], [ac_cv_libfdatetime=no], [dnl Check for the individual functions ac_cv_libfdatetime=yes AC_CHECK_LIB( fdatetime, libfdatetime_get_version, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) dnl FAT date time functions AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_initialize, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_free, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_copy_from_byte_stream, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_copy_from_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], [AC_DEFINE( [HAVE_LIBFDATETIME], [1], [Define to 1 if you have the `fdatetime' library (-lfdatetime).]) ]) AS_IF( [test "x$ac_cv_libfdatetime" = xyes], [AC_SUBST( [HAVE_LIBFDATETIME], [1]) ], [AC_SUBST( [HAVE_LIBFDATETIME], [0]) ]) ]) dnl Function to detect how to enable libfdatetime AC_DEFUN([AX_LIBFDATETIME_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfdatetime], [libfdatetime], [search for libfdatetime in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) AX_LIBFDATETIME_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfdatetime" != xyes], [ac_cv_libfdatetime_CPPFLAGS="-I../libfdatetime"; ac_cv_libfdatetime_LIBADD="../libfdatetime/libfdatetime.la"; ac_cv_libfdatetime=local AC_DEFINE( [HAVE_LOCAL_LIBFDATETIME], [1], [Define to 1 if the local version of libfdatetime is used.]) AC_SUBST( [HAVE_LOCAL_LIBFDATETIME], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFDATETIME], [test "x$ac_cv_libfdatetime" = xlocal]) AS_IF( [test "x$ac_cv_libfdatetime_CPPFLAGS" != "x"], [AC_SUBST( [LIBFDATETIME_CPPFLAGS], [$ac_cv_libfdatetime_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfdatetime_LIBADD" != "x"], [AC_SUBST( [LIBFDATETIME_LIBADD], [$ac_cv_libfdatetime_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfdatetime" = xyes], [AC_SUBST( [ax_libfdatetime_pc_libs_private], [-lfdatetime]) ]) AS_IF( [test "x$ac_cv_libfdatetime" = xyes], [AC_SUBST( [ax_libfdatetime_spec_requires], [libfdatetime]) AC_SUBST( [ax_libfdatetime_spec_build_requires], [libfdatetime-devel]) ]) ]) libevt-20170120/m4/libcnotify.m40000664000175000017500000001111312675773545020303 0ustar00lordyestalordyesta00000000000000dnl Functions for libcnotify dnl dnl Version: 20130406 dnl Function to detect if libcnotify is available dnl ac_libcnotify_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCNOTIFY_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xno && test "x$ac_cv_with_libcnotify" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcnotify"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcnotify}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcnotify}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcnotify]) ]) ]) AS_IF( [test "x$ac_cv_with_libcnotify" = xno], [ac_cv_libcnotify=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcnotify], [libcnotify >= 20120425], [ac_cv_libcnotify=yes], [ac_cv_libcnotify=no]) ]) AS_IF( [test "x$ac_cv_libcnotify" = xyes], [ac_cv_libcnotify_CPPFLAGS="$pkg_cv_libcnotify_CFLAGS" ac_cv_libcnotify_LIBADD="$pkg_cv_libcnotify_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcnotify.h]) AS_IF( [test "x$ac_cv_header_libcnotify_h" = xno], [ac_cv_libcnotify=no], [dnl Check for the individual functions ac_cv_libcnotify=yes AC_CHECK_LIB( cnotify, libcnotify_get_version, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) dnl Print functions AC_CHECK_LIB( cnotify, libcnotify_printf, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) AC_CHECK_LIB( cnotify, libcnotify_print_data, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) AC_CHECK_LIB( cnotify, libcnotify_print_error_backtrace, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) dnl Stream functions AC_CHECK_LIB( cnotify, libcnotify_stream_set, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) AC_CHECK_LIB( cnotify, libcnotify_stream_open, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) AC_CHECK_LIB( cnotify, libcnotify_stream_close, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) dnl Verbose functions AC_CHECK_LIB( cnotify, libcnotify_verbose_set, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) ac_cv_libcnotify_LIBADD="-lcnotify" ]) ]) ]) AS_IF( [test "x$ac_cv_libcnotify" = xyes], [AC_DEFINE( [HAVE_LIBCNOTIFY], [1], [Define to 1 if you have the `cnotify' library (-lcnotify).]) ]) AS_IF( [test "x$ac_cv_libcnotify" = xyes], [AC_SUBST( [HAVE_LIBCNOTIFY], [1]) ], [AC_SUBST( [HAVE_LIBCNOTIFY], [0]) ]) ]) dnl Function to detect if libcnotify dependencies are available AC_DEFUN([AX_LIBCNOTIFY_CHECK_LOCAL], [dnl Headers included in libcnotify/libcnotify_print.c AC_CHECK_HEADERS([stdarg.h varargs.h]) AS_IF( [test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes], [AC_MSG_FAILURE( [Missing headers: stdarg.h and varargs.h], [1]) ]) dnl Headers included in libcnotify/libcnotify_stream.c AC_CHECK_HEADERS([errno.h]) ac_cv_libcnotify_CPPFLAGS="-I../libcnotify"; ac_cv_libcnotify_LIBADD="../libcnotify/libcnotify.la"; ac_cv_libcnotify=local ]) dnl Function to detect how to enable libcnotify AC_DEFUN([AX_LIBCNOTIFY_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcnotify], [libcnotify], [search for libcnotify in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCNOTIFY_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcnotify" != xyes], [AX_LIBCNOTIFY_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCNOTIFY], [1], [Define to 1 if the local version of libcnotify is used.]) AC_SUBST( [HAVE_LOCAL_LIBCNOTIFY], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCNOTIFY], [test "x$ac_cv_libcnotify" = xlocal]) AS_IF( [test "x$ac_cv_libcnotify_CPPFLAGS" != "x"], [AC_SUBST( [LIBCNOTIFY_CPPFLAGS], [$ac_cv_libcnotify_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcnotify_LIBADD" != "x"], [AC_SUBST( [LIBCNOTIFY_LIBADD], [$ac_cv_libcnotify_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcnotify" = xyes], [AC_SUBST( [ax_libcnotify_pc_libs_private], [-lcnotify]) ]) AS_IF( [test "x$ac_cv_libcnotify" = xyes], [AC_SUBST( [ax_libcnotify_spec_requires], [libcnotify]) AC_SUBST( [ax_libcnotify_spec_build_requires], [libcnotify-devel]) ]) ]) libevt-20170120/m4/ltversion.m40000644000175000017500000000127313040342647020150 0ustar00lordyestalordyesta00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 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 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) libevt-20170120/m4/libcdata.m40000664000175000017500000003065012675773551017710 0ustar00lordyestalordyesta00000000000000dnl Functions for libcdata dnl dnl Version: 20160108 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], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xno && test "x$ac_cv_with_libcdata" != xauto-detect], [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_WARN([no such directory: $ac_cv_with_libcdata]) ]) ]) AS_IF( [test "x$ac_cv_with_libcdata" = xno], [ac_cv_libcdata=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcdata], [libcdata >= 20160108], [ac_cv_libcdata=yes], [ac_cv_libcdata=no]) ]) AS_IF( [test "x$ac_cv_libcdata" = xyes], [ac_cv_libcdata_CPPFLAGS="$pkg_cv_libcdata_CFLAGS" ac_cv_libcdata_LIBADD="$pkg_cv_libcdata_LIBS"], [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 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_value, [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_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], [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 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], [ac_cv_libcdata_CPPFLAGS="-I../libcdata"; ac_cv_libcdata_LIBADD="../libcdata/libcdata.la"; ac_cv_libcdata=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]) ]) ]) libevt-20170120/m4/progtest.m40000644000175000017500000000557311642277124020004 0ustar00lordyestalordyesta00000000000000# progtest.m4 serial 6 (gettext-0.18) dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. AC_PREREQ([2.50]) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL([ac_cv_path_$1], [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$][$1]) else AC_MSG_RESULT([no]) fi AC_SUBST([$1])dnl ]) libevt-20170120/m4/lt~obsolete.m40000644000175000017500000001377413040342647020506 0ustar00lordyestalordyesta00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 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])]) libevt-20170120/m4/libcfile.m40000664000175000017500000002130712706057447017707 0ustar00lordyestalordyesta00000000000000dnl Functions for libcfile dnl dnl Version: 20160409 dnl Function to detect if libcfile is available dnl ac_libcfile_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCFILE_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xno && test "x$ac_cv_with_libcfile" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcfile"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcfile}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcfile}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcfile]) ]) ]) AS_IF( [test "x$ac_cv_with_libcfile" = xno], [ac_cv_libcfile=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcfile], [libcfile >= 20160409], [ac_cv_libcfile=yes], [ac_cv_libcfile=no]) ]) AS_IF( [test "x$ac_cv_libcfile" = xyes], [ac_cv_libcfile_CPPFLAGS="$pkg_cv_libcfile_CFLAGS" ac_cv_libcfile_LIBADD="$pkg_cv_libcfile_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcfile.h]) AS_IF( [test "x$ac_cv_header_libcfile_h" = xno], [ac_cv_libcfile=no], [dnl Check for the individual functions ac_cv_libcfile=yes AC_CHECK_LIB( cfile, libcfile_get_version, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) dnl File functions AC_CHECK_LIB( cfile, libcfile_file_initialize, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_free, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_open, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_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], [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"; 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]) ]) ]) libevt-20170120/m4/po.m40000644000175000017500000004461611642277124016554 0ustar00lordyestalordyesta00000000000000# po.m4 serial 17 (gettext-0.18) dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" <]], [[printf( "%jd" ); ]] )], [ac_cv_cv_have_printf_jd=no], [ac_cv_cv_have_printf_jd=yes]) dnl Second try to see if compilation and linkage with a parameter succeeds AS_IF( [test "x$ac_cv_cv_have_printf_jd" = xyes], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[printf( "%jd", (off_t) 10 ); ]] )], [ac_cv_cv_have_printf_jd=yes], [ac_cv_cv_have_printf_jd=no]) ]) dnl Third try to see if the program runs correctly AS_IF( [test "x$ac_cv_cv_have_printf_jd" = xyes], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[char string[ 3 ]; if( snprintf( string, 3, "%jd", (off_t) 10 ) < 0 ) return( 1 ); if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )], [ac_cv_cv_have_printf_jd=yes], [ac_cv_cv_have_printf_jd=no], [ac_cv_cv_have_printf_jd=undetermined]) ]) AC_LANG_POP(C) CFLAGS="$SAVE_CFLAGS" AS_IF( [test "x$ac_cv_cv_have_printf_jd" = xyes], [AC_MSG_RESULT( [yes]) AC_DEFINE( [HAVE_PRINTF_JD], [1], [Define to 1 whether printf supports the conversion specifier "%jd".]) ], [AC_MSG_RESULT( [$ac_cv_cv_have_printf_jd]) ]) ]) dnl Function to detect whether printf conversion specifier "%zd" is available AC_DEFUN([AX_COMMON_CHECK_FUNC_PRINTF_ZD], [ AC_MSG_CHECKING( [whether printf supports the conversion specifier "%zd"]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" AC_LANG_PUSH(C) dnl First try to see if compilation and linkage without a parameter succeeds AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[printf( "%zd" ); ]] )], [ac_cv_cv_have_printf_zd=no], [ac_cv_cv_have_printf_zd=yes]) dnl Second try to see if compilation and linkage with a parameter succeeds AS_IF( [test "x$ac_cv_cv_have_printf_zd" = xyes], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[printf( "%zd", (size_t) 10 ); ]] )], [ac_cv_cv_have_printf_zd=yes], [ac_cv_cv_have_printf_zd=no]) ]) dnl Third try to see if the program runs correctly AS_IF( [test "x$ac_cv_cv_have_printf_zd" = xyes], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[char string[ 3 ]; if( snprintf( string, 3, "%zd", (size_t) 10 ) < 0 ) return( 1 ); if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )], [ac_cv_cv_have_printf_zd=yes], [ac_cv_cv_have_printf_zd=no], [ac_cv_cv_have_printf_zd=undetermined]) ]) AC_LANG_POP(C) CFLAGS="$SAVE_CFLAGS" AS_IF( [test "x$ac_cv_cv_have_printf_zd" = xyes], [AC_MSG_RESULT( [yes]) AC_DEFINE( [HAVE_PRINTF_ZD], [1], [Define to 1 whether printf supports the conversion specifier "%zd".]) ], [AC_MSG_RESULT( [$ac_cv_cv_have_printf_zd]) ]) ]) dnl Function to detect if common dependencies are available AC_DEFUN([AX_COMMON_CHECK_LOCAL], [ dnl Headers included in common/common.h AS_IF( [test "x$ac_cv_enable_winapi" = xyes], [AC_CHECK_HEADERS([windows.h]) AS_IF( [test "x$ac_cv_header_windows_h" = xno], [AC_MSG_FAILURE( [Missing header: windows.h header is required to compile with winapi support], [1]) ]) ]) AS_IF( [test "x$ac_cv_enable_winapi" = xno], [AC_CHECK_HEADERS([libintl.h]) ]) dnl Headers included in common/types.h AC_CHECK_HEADERS([limits.h]) dnl Headers included in common/memory.h 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 ]) libevt-20170120/m4/libcerror.m40000664000175000017500000001216612675773545020135 0ustar00lordyestalordyesta00000000000000dnl Functions for libcerror dnl dnl Version: 20130503 dnl Function to detect if libcerror is available dnl ac_libcerror_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCERROR_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xno && test "x$ac_cv_with_libcerror" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcerror"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcerror}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcerror}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcerror]) ]) ]) AS_IF( [test "x$ac_cv_with_libcerror" = xno], [ac_cv_libcerror=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcerror], [libcerror >= 20120425], [ac_cv_libcerror=yes], [ac_cv_libcerror=no]) ]) AS_IF( [test "x$ac_cv_libcerror" = xyes], [ac_cv_libcerror_CPPFLAGS="$pkg_cv_libcerror_CFLAGS" ac_cv_libcerror_LIBADD="$pkg_cv_libcerror_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcerror.h]) AS_IF( [test "x$ac_cv_header_libcerror_h" = xno], [ac_cv_libcerror=no], [dnl Check for the individual functions ac_cv_libcerror=yes AC_CHECK_LIB( cerror, libcerror_get_version, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) dnl Error functions AC_CHECK_LIB( cerror, libcerror_error_free, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) AC_CHECK_LIB( cerror, libcerror_error_set, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) AC_CHECK_LIB( cerror, libcerror_error_matches, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) AC_CHECK_LIB( cerror, libcerror_error_fprint, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) AC_CHECK_LIB( cerror, libcerror_error_sprint, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) AC_CHECK_LIB( cerror, libcerror_error_backtrace_fprint, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) AC_CHECK_LIB( cerror, libcerror_error_backtrace_sprint, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) dnl System 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], [AC_DEFINE( [HAVE_LIBCERROR], [1], [Define to 1 if you have the `cerror' library (-lcerror).]) ]) AS_IF( [test "x$ac_cv_libcerror" = xyes], [AC_SUBST( [HAVE_LIBCERROR], [1]) ], [AC_SUBST( [HAVE_LIBCERROR], [0]) ]) ]) dnl Function to detect if libcerror dependencies are available AC_DEFUN([AX_LIBCERROR_CHECK_LOCAL], [dnl Headers included in libcerror/libcerror_error.c AC_CHECK_HEADERS([stdarg.h varargs.h]) AS_IF( [test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes], [AC_MSG_FAILURE( [Missing headers: stdarg.h and varargs.h], [1]) ]) dnl Wide character string functions used in libcerror/libcerror_error.c AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_FUNCS([wcstombs]) AS_IF( [test "x$ac_cv_func_wcstombs" != xyes], [AC_MSG_FAILURE( [Missing function: wcstombs], [1]) ]) ]) dnl Check for error string functions used in libcerror/libcerror_system.c AC_FUNC_STRERROR_R() AS_IF( [test "x$ac_cv_have_decl_strerror_r" != xyes], [AC_CHECK_FUNCS([strerror]) AS_IF( [test "x$ac_cv_func_strerror" != xyes], [AC_MSG_FAILURE( [Missing functions: strerror_r and strerror], [1]) ]) ]) ac_cv_libcerror_CPPFLAGS="-I../libcerror"; ac_cv_libcerror_LIBADD="../libcerror/libcerror.la"; ac_cv_libcerror=local ]) dnl Function to detect how to enable libcerror AC_DEFUN([AX_LIBCERROR_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcerror], [libcerror], [search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCERROR_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcerror" != xyes], [AX_LIBCERROR_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCERROR], [1], [Define to 1 if the local version of libcerror is used.]) AC_SUBST( [HAVE_LOCAL_LIBCERROR], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCERROR], [test "x$ac_cv_libcerror" = xlocal]) AS_IF( [test "x$ac_cv_libcerror_CPPFLAGS" != "x"], [AC_SUBST( [LIBCERROR_CPPFLAGS], [$ac_cv_libcerror_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcerror_LIBADD" != "x"], [AC_SUBST( [LIBCERROR_LIBADD], [$ac_cv_libcerror_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcerror" = xyes], [AC_SUBST( [ax_libcerror_pc_libs_private], [-lcerror]) ]) AS_IF( [test "x$ac_cv_libcerror" = xyes], [AC_SUBST( [ax_libcerror_spec_requires], [libcerror]) AC_SUBST( [ax_libcerror_spec_build_requires], [libcerror-devel]) ]) ]) libevt-20170120/m4/libfguid.m40000664000175000017500000001061512706057447017723 0ustar00lordyestalordyesta00000000000000dnl Functions for libfguid dnl dnl Version: 20160417 dnl Function to detect if libfguid is available dnl ac_libfguid_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFGUID_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xno && test "x$ac_cv_with_libfguid" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfguid"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfguid}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfguid}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfguid]) ]) ]) AS_IF( [test "x$ac_cv_with_libfguid" = xno], [ac_cv_libfguid=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfguid], [libfguid >= 20120426], [ac_cv_libfguid=yes], [ac_cv_libfguid=no]) ]) AS_IF( [test "x$ac_cv_libfguid" = xyes], [ac_cv_libfguid_CPPFLAGS="$pkg_cv_libfguid_CFLAGS" ac_cv_libfguid_LIBADD="$pkg_cv_libfguid_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfguid.h]) AS_IF( [test "x$ac_cv_header_libfguid_h" = xno], [ac_cv_libfguid=no], [dnl Check for the individual functions ac_cv_libfguid=yes AC_CHECK_LIB( fguid, libfguid_get_version, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) dnl Identifier functions AC_CHECK_LIB( fguid, libfguid_identifier_initialize, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_free, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_from_byte_stream, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_get_string_size, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_to_utf8_string, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_to_utf8_string_with_index, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_to_utf16_string, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_to_utf16_string_with_index, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_to_utf32_string, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_to_utf32_string_with_index, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) ac_cv_libfguid_LIBADD="-lfguid" ]) ]) ]) AS_IF( [test "x$ac_cv_libfguid" = xyes], [AC_DEFINE( [HAVE_LIBFGUID], [1], [Define to 1 if you have the `fguid' library (-lfguid).]) ]) AS_IF( [test "x$ac_cv_libfguid" = xyes], [AC_SUBST( [HAVE_LIBFGUID], [1]) ], [AC_SUBST( [HAVE_LIBFGUID], [0]) ]) ]) dnl Function to detect how to enable libfguid AC_DEFUN([AX_LIBFGUID_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfguid], [libfguid], [search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBFGUID_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfguid" != xyes], [ac_cv_libfguid_CPPFLAGS="-I../libfguid"; ac_cv_libfguid_LIBADD="../libfguid/libfguid.la"; ac_cv_libfguid=local AC_DEFINE( [HAVE_LOCAL_LIBFGUID], [1], [Define to 1 if the local version of libfguid is used.]) AC_SUBST( [HAVE_LOCAL_LIBFGUID], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFGUID], [test "x$ac_cv_libfguid" = xlocal]) AS_IF( [test "x$ac_cv_libfguid_CPPFLAGS" != "x"], [AC_SUBST( [LIBFGUID_CPPFLAGS], [$ac_cv_libfguid_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfguid_LIBADD" != "x"], [AC_SUBST( [LIBFGUID_LIBADD], [$ac_cv_libfguid_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfguid" = xyes], [AC_SUBST( [ax_libfguid_pc_libs_private], [-lfguid]) ]) AS_IF( [test "x$ac_cv_libfguid" = xyes], [AC_SUBST( [ax_libfguid_spec_requires], [libfguid]) AC_SUBST( [ax_libfguid_spec_build_requires], [libfguid-devel]) ]) ]) libevt-20170120/m4/iconv.m40000644000175000017500000001653711642277124017255 0ustar00lordyestalordyesta00000000000000# iconv.m4 serial 11 (gettext-0.18.1) dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_TRY_RUN([ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } /* 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 const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) 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])]], [[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_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) fi ]) libevt-20170120/m4/ltsugar.m40000644000175000017500000001044013040342646017577 0ustar00lordyestalordyesta00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 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 ]) libevt-20170120/m4/libfcache.m40000664000175000017500000001260212675773551020042 0ustar00lordyestalordyesta00000000000000dnl Functions for libfcache dnl dnl Version: 20140912 dnl Function to detect if libfcache is available dnl ac_libfcache_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFCACHE_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xno && test "x$ac_cv_with_libfcache" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfcache"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfcache}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfcache}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfcache]) ]) ]) AS_IF( [test "x$ac_cv_with_libfcache" = xno], [ac_cv_libfcache=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfcache], [libfcache >= 20140912], [ac_cv_libfcache=yes], [ac_cv_libfcache=no]) ]) AS_IF( [test "x$ac_cv_libfcache" = xyes], [ac_cv_libfcache_CPPFLAGS="$pkg_cv_libfcache_CFLAGS" ac_cv_libfcache_LIBADD="$pkg_cv_libfcache_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfcache.h]) AS_IF( [test "x$ac_cv_header_libfcache_h" = xno], [ac_cv_libfcache=no], [dnl Check for the individual functions ac_cv_libfcache=yes AC_CHECK_LIB( fcache, libfcache_get_version, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) dnl 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_get_value_by_index, [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_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], [AC_DEFINE( [HAVE_LIBFCACHE], [1], [Define to 1 if you have the `fcache' library (-lfcache).]) ]) AS_IF( [test "x$ac_cv_libfcache" = xyes], [AC_SUBST( [HAVE_LIBFCACHE], [1]) ], [AC_SUBST( [HAVE_LIBFCACHE], [0]) ]) ]) dnl Function to detect if libfcache dependencies are available AC_DEFUN([AX_LIBFCACHE_CHECK_LOCAL], [dnl Types used in libfcache/libfcache_date_time.h AC_STRUCT_TM dnl Headers included in libfcache/libfcache_date_time.h AC_HEADER_TIME dnl Date and time functions used in libfcache/libfcache_date_time.h AC_CHECK_FUNCS( [time], [], [AC_MSG_FAILURE( [Missing function: time], [1]) ]) ac_cv_libfcache_CPPFLAGS="-I../libfcache"; ac_cv_libfcache_LIBADD="../libfcache/libfcache.la"; ac_cv_libfcache=local ]) dnl Function to detect how to enable libfcache AC_DEFUN([AX_LIBFCACHE_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfcache], [libfcache], [search for libfcache in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBFCACHE_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfcache" != xyes], [AX_LIBFCACHE_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBFCACHE], [1], [Define to 1 if the local version of libfcache is used.]) AC_SUBST( [HAVE_LOCAL_LIBFCACHE], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFCACHE], [test "x$ac_cv_libfcache" = xlocal]) AS_IF( [test "x$ac_cv_libfcache_CPPFLAGS" != "x"], [AC_SUBST( [LIBFCACHE_CPPFLAGS], [$ac_cv_libfcache_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfcache_LIBADD" != "x"], [AC_SUBST( [LIBFCACHE_LIBADD], [$ac_cv_libfcache_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfcache" = xyes], [AC_SUBST( [ax_libfcache_pc_libs_private], [-lfcache]) ]) AS_IF( [test "x$ac_cv_libfcache" = xyes], [AC_SUBST( [ax_libfcache_spec_requires], [libfcache]) AC_SUBST( [ax_libfcache_spec_build_requires], [libfcache-devel]) ]) ]) libevt-20170120/m4/libcsplit.m40000664000175000017500000001176112675773545020137 0ustar00lordyestalordyesta00000000000000dnl Functions for libcsplit dnl dnl Version: 20130406 dnl Function to detect if libcsplit is available dnl ac_libcsplit_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCSPLIT_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xno && test "x$ac_cv_with_libcsplit" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcsplit"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcsplit}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcsplit}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcsplit]) ]) ]) AS_IF( [test "x$ac_cv_with_libcsplit" = xno], [ac_cv_libcsplit=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcsplit], [libcsplit >= 20120701], [ac_cv_libcsplit=yes], [ac_cv_libcsplit=no]) ]) AS_IF( [test "x$ac_cv_libcsplit" = xyes], [ac_cv_libcsplit_CPPFLAGS="$pkg_cv_libcsplit_CFLAGS" ac_cv_libcsplit_LIBADD="$pkg_cv_libcsplit_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcsplit.h]) AS_IF( [test "x$ac_cv_header_libcsplit_h" = xno], [ac_cv_libcsplit=no], [dnl Check for the individual functions ac_cv_libcsplit=yes AC_CHECK_LIB( csplit, libcsplit_get_version, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) dnl Narrow string functions AC_CHECK_LIB( csplit, libcsplit_narrow_string_split, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) dnl Narrow split string functions AC_CHECK_LIB( csplit, libcsplit_narrow_split_string_free, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_narrow_split_string_get_string, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_narrow_split_string_get_number_of_segments, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_narrow_split_string_get_segment_by_index, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_narrow_split_string_set_segment_by_index, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) dnl Wide string functions AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( csplit, libcsplit_wide_string_split, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) dnl Wide split string functions AC_CHECK_LIB( csplit, libcsplit_wide_split_string_free, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_wide_split_string_get_string, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_wide_split_string_get_number_of_segments, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_wide_split_string_get_segment_by_index, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_wide_split_string_set_segment_by_index, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) ]) ac_cv_libcsplit_LIBADD="-lcsplit" ]) ]) ]) AS_IF( [test "x$ac_cv_libcsplit" = xyes], [AC_DEFINE( [HAVE_LIBCSPLIT], [1], [Define to 1 if you have the `csplit' library (-lcsplit).]) ]) AS_IF( [test "x$ac_cv_libcsplit" = xyes], [AC_SUBST( [HAVE_LIBCSPLIT], [1]) ], [AC_SUBST( [HAVE_LIBCSPLIT], [0]) ]) ]) dnl Function to detect how to enable libcsplit AC_DEFUN([AX_LIBCSPLIT_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcsplit], [libcsplit], [search for libcsplit in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCSPLIT_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcsplit" != xyes], [AC_DEFINE( [HAVE_LOCAL_LIBCSPLIT], [1], [Define to 1 if the local version of libcsplit is used.]) AC_SUBST( [HAVE_LOCAL_LIBCSPLIT], [1]) ac_cv_libcsplit_CPPFLAGS="-I../libcsplit"; ac_cv_libcsplit_LIBADD="../libcsplit/libcsplit.la"; ac_cv_libcsplit=local ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCSPLIT], [test "x$ac_cv_libcsplit" = xlocal]) AS_IF( [test "x$ac_cv_libcsplit_CPPFLAGS" != "x"], [AC_SUBST( [LIBCSPLIT_CPPFLAGS], [$ac_cv_libcsplit_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcsplit_LIBADD" != "x"], [AC_SUBST( [LIBCSPLIT_LIBADD], [$ac_cv_libcsplit_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcsplit" = xyes], [AC_SUBST( [ax_libcsplit_pc_libs_private], [-lcsplit]) ]) AS_IF( [test "x$ac_cv_libcsplit" = xyes], [AC_SUBST( [ax_libcsplit_spec_requires], [libcsplit]) AC_SUBST( [ax_libcsplit_spec_build_requires], [libcsplit-devel]) ]) ]) libevt-20170120/m4/libcdirectory.m40000664000175000017500000001437312675773551021007 0ustar00lordyestalordyesta00000000000000dnl Functions for libcdirectory dnl dnl Version: 20160102 dnl Function to detect if libcdirectory is available dnl ac_libcdirectory_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCDIRECTORY_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcdirectory" != x && test "x$ac_cv_with_libcdirectory" != xno && test "x$ac_cv_with_libcdirectory" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcdirectory"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcdirectory}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcdirectory}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcdirectory]) ]) ]) AS_IF( [test "x$ac_cv_with_libcdirectory" = xno], [ac_cv_libcdirectory=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcdirectory], [libcdirectory >= 20120423], [ac_cv_libcdirectory=yes], [ac_cv_libcdirectory=no]) ]) AS_IF( [test "x$ac_cv_libcdirectory" = xyes], [ac_cv_libcdirectory_CPPFLAGS="$pkg_cv_libcdirectory_CFLAGS" ac_cv_libcdirectory_LIBADD="$pkg_cv_libcdirectory_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcdirectory.h]) AS_IF( [test "x$ac_cv_header_libcdirectory_h" = xno], [ac_cv_libcdirectory=no], [dnl Check for the individual functions ac_cv_libcdirectory=yes AC_CHECK_LIB( cdirectory, libcdirectory_get_version, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) dnl Directory functions AC_CHECK_LIB( cdirectory, libcdirectory_directory_initialize, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) AC_CHECK_LIB( cdirectory, libcdirectory_directory_free, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) AC_CHECK_LIB( cdirectory, libcdirectory_directory_open, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) AC_CHECK_LIB( cdirectory, libcdirectory_directory_close, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) AC_CHECK_LIB( cdirectory, libcdirectory_directory_read_entry, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) AC_CHECK_LIB( cdirectory, libcdirectory_directory_has_entry, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( cdirectory, libcdirectory_directory_open_wide, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) AC_CHECK_LIB( cdirectory, libcdirectory_directory_has_entry_wide, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) ]) dnl Directory entry functions AC_CHECK_LIB( cdirectory, libcdirectory_directory_entry_initialize, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) AC_CHECK_LIB( cdirectory, libcdirectory_directory_entry_free, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) AC_CHECK_LIB( cdirectory, libcdirectory_directory_entry_get_type, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) AC_CHECK_LIB( cdirectory, libcdirectory_directory_entry_get_name, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( cdirectory, libcdirectory_directory_entry_get_name_wide, [ac_cv_libcdirectory_dummy=yes], [ac_cv_libcdirectory=no]) ]) ac_cv_libcdirectory_LIBADD="-lcdirectory" ]) ]) ]) AS_IF( [test "x$ac_cv_libcdirectory" = xyes], [AC_DEFINE( [HAVE_LIBCDIRECTORY], [1], [Define to 1 if you have the `cdirectory' library (-lcdirectory).]) ]) AS_IF( [test "x$ac_cv_libcdirectory" = xyes], [AC_SUBST( [HAVE_LIBCDIRECTORY], [1]) ], [AC_SUBST( [HAVE_LIBCDIRECTORY], [0]) ]) ]) dnl Function to detect if libcdirectory dependencies are available AC_DEFUN([AX_LIBCDIRECTORY_CHECK_LOCAL], [AS_IF( [test "x$ac_cv_enable_winapi" = xno], [dnl Headers included in libcdirectory/libcdirectory_directory.h AC_CHECK_HEADERS([dirent.h errno.h sys/stat.h]) dnl Directory functions used in libcdirectory/libcdirectory_directory.h AC_CHECK_FUNCS([closedir opendir readdir_r]) AS_IF( [test "x$ac_cv_func_closedir" != xyes], [AC_MSG_FAILURE( [Missing functions: closedir], [1]) ]) AS_IF( [test "x$ac_cv_func_opendir" != xyes], [AC_MSG_FAILURE( [Missing functions: opendir], [1]) ]) AS_IF( [test "x$ac_cv_func_readdir_r" != xyes], [AC_MSG_FAILURE( [Missing functions: readdir_r], [1]) ]) ]) ac_cv_libcdirectory_CPPFLAGS="-I../libcdirectory"; ac_cv_libcdirectory_LIBADD="../libcdirectory/libcdirectory.la"; ac_cv_libcdirectory=local ]) dnl Function to detect how to enable libcdirectory AC_DEFUN([AX_LIBCDIRECTORY_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcdirectory], [libcdirectory], [search for libcdirectory 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_LIBCDIRECTORY_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcdirectory" != xyes], [AX_LIBCDIRECTORY_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCDIRECTORY], [1], [Define to 1 if the local version of libcdirectory is used.]) AC_SUBST( [HAVE_LOCAL_LIBCDIRECTORY], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCDIRECTORY], [test "x$ac_cv_libcdirectory" = xlocal]) AS_IF( [test "x$ac_cv_libcdirectory_CPPFLAGS" != "x"], [AC_SUBST( [LIBCDIRECTORY_CPPFLAGS], [$ac_cv_libcdirectory_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcdirectory_LIBADD" != "x"], [AC_SUBST( [LIBCDIRECTORY_LIBADD], [$ac_cv_libcdirectory_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcdirectory" = xyes], [AC_SUBST( [ax_libcdirectory_pc_libs_private], [-lstring]) ]) AS_IF( [test "x$ac_cv_libcdirectory" = xyes], [AC_SUBST( [ax_libcdirectory_spec_requires], [libcdirectory]) AC_SUBST( [ax_libcdirectory_spec_build_requires], [libcdirectory-devel]) ]) ]) libevt-20170120/m4/intlmacosx.m40000664000175000017500000000457512072617625020323 0ustar00lordyestalordyesta00000000000000# intlmacosx.m4 serial 3 (gettext-0.18) dnl Copyright (C) 2004-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Checks for special options needed on MacOS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFPreferencesCopyAppValue(NULL, NULL)], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in MacOS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) libevt-20170120/m4/types.m40000664000175000017500000000377112774643534017312 0ustar00lordyestalordyesta00000000000000dnl Functions for type definitions dnl dnl Version: 20161004 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([off_t]) AC_CHECK_SIZEOF([size_t]) AS_IF( [test "x$ac_cv_header_wchar_h" = xyes], [AC_CHECK_SIZEOF([wchar_t])]) ]) libevt-20170120/m4/libexe.m40000664000175000017500000000566112675771063017415 0ustar00lordyestalordyesta00000000000000dnl Functions for libexe dnl dnl Version: 20120501 dnl Function to detect if libexe is available dnl ac_libexe_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBEXE_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libexe" != x && test "x$ac_cv_with_libexe" != xno && test "x$ac_cv_with_libexe" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libexe"], [CFLAGS="$CFLAGS -I${ac_cv_with_libexe}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libexe}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libexe]) ]) ]) AS_IF( [test "x$ac_cv_with_libexe" = xno], [ac_cv_libexe=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libexe], [libexe >= 20120405], [ac_cv_libexe=yes], [ac_cv_libexe=no]) ]) AS_IF( [test "x$ac_cv_libexe" = xyes], [ac_cv_libexe_CPPFLAGS="$pkg_cv_libexe_CFLAGS" ac_cv_libexe_LIBADD="$pkg_cv_libexe_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libexe.h]) AS_IF( [test "x$ac_cv_header_libexe_h" = xno], [ac_cv_libexe=no], [dnl Check for the individual functions ac_cv_libexe=yes AC_CHECK_LIB( exe, libexe_get_version, [ac_cv_libexe_dummy=yes], [ac_cv_libexe=no]) dnl TODO add functions ac_cv_libexe_LIBADD="-lexe" ]) ]) ]) AS_IF( [test "x$ac_cv_libexe" = xyes], [AC_DEFINE( [HAVE_LIBEXE], [1], [Define to 1 if you have the `exe' library (-lexe).]) ]) AS_IF( [test "x$ac_cv_libexe" = xyes], [AC_SUBST( [HAVE_LIBEXE], [1]) ], [AC_SUBST( [HAVE_LIBEXE], [0]) ]) ]) dnl Function to detect how to enable libexe AC_DEFUN([AX_LIBEXE_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libexe], [libexe], [search for libexe 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_LIBEXE_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libexe" != xyes], [ac_cv_libexe_CPPFLAGS="-I../libexe"; ac_cv_libexe_LIBADD="../libexe/libexe.la"; ac_cv_libexe=local AC_DEFINE( [HAVE_LOCAL_LIBEXE], [1], [Define to 1 if the local version of libexe is used.]) AC_SUBST( [HAVE_LOCAL_LIBEXE], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBEXE], [test "x$ac_cv_libexe" = xlocal]) AS_IF( [test "x$ac_cv_libexe_CPPFLAGS" != "x"], [AC_SUBST( [LIBEXE_CPPFLAGS], [$ac_cv_libexe_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libexe_LIBADD" != "x"], [AC_SUBST( [LIBEXE_LIBADD], [$ac_cv_libexe_LIBADD]) ]) AS_IF( [test "x$ac_cv_libexe" = xyes], [AC_SUBST( [ax_libexe_pc_libs_private], [-lexe]) ]) AS_IF( [test "x$ac_cv_libexe" = xyes], [AC_SUBST( [ax_libexe_spec_requires], [libexe]) AC_SUBST( [ax_libexe_spec_build_requires], [libexe-devel]) ]) ]) libevt-20170120/m4/libbfio.m40000664000175000017500000001705112675773551017553 0ustar00lordyestalordyesta00000000000000dnl Functions for libbfio dnl dnl Version: 20160108 dnl Function to detect if libbfio is available AC_DEFUN([AX_LIBBFIO_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xno && test "x$ac_cv_with_libbfio" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libbfio"], [CFLAGS="$CFLAGS -I${ac_cv_with_libbfio}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libbfio}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libbfio]) ]) ]) AS_IF( [test "x$ac_cv_with_libbfio" = xno], [ac_cv_libbfio=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libbfio], [libbfio >= 20160108], [ac_cv_libbfio=yes], [ac_cv_libbfio=no]) ]) AS_IF( [test "x$ac_cv_libbfio" = xyes], [ac_cv_libbfio_CPPFLAGS="$pkg_cv_libbfio_CFLAGS" ac_cv_libbfio_LIBADD="$pkg_cv_libbfio_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libbfio.h]) AS_IF( [test "x$ac_cv_header_libbfio_h" = xno], [ac_cv_libbfio=no], [dnl Check for the individual functions ac_cv_libbfio=yes AC_CHECK_LIB( bfio, libbfio_get_version, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) dnl Handle functions AC_CHECK_LIB( bfio, libbfio_handle_free, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_open, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_close, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_exists, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_read_buffer, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_write_buffer, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_seek_offset, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_is_open, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_get_offset, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_get_size, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_set_track_offsets_read, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_get_number_of_offsets_read, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_get_offset_read, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) dnl File functions AC_CHECK_LIB( bfio, libbfio_file_initialize, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_file_get_name_size, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_file_get_name, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_file_set_name, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( bfio, libbfio_file_get_name_size_wide, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_file_get_name_wide, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_file_set_name_wide, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) ]) dnl Pool functions AC_CHECK_LIB( bfio, libbfio_pool_initialize, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_free, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_clone, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_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_write_buffer, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_seek_offset, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_get_offset, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_get_size, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) ac_cv_libbfio_LIBADD="-lbfio" ]) ]) ]) AS_IF( [test "x$ac_cv_libbfio" = xyes], [AC_DEFINE( [HAVE_LIBBFIO], [1], [Define to 1 if you have the `bfio' library (-lbfio).]) ]) AS_IF( [test "x$ac_cv_libbfio" = xyes], [AC_SUBST( [HAVE_LIBBFIO], [1]) ], [AC_SUBST( [HAVE_LIBBFIO], [0]) ]) ]) dnl Function to detect how to enable libbfio AC_DEFUN([AX_LIBBFIO_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libbfio], [libbfio], [search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBBFIO_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libbfio" != xyes], [AC_DEFINE( [HAVE_LOCAL_LIBBFIO], [1], [Define to 1 if the local version of libbfio is used.]) AC_SUBST( [HAVE_LOCAL_LIBBFIO], [1]) ac_cv_libbfio_CPPFLAGS="-I../libbfio"; ac_cv_libbfio_LIBADD="../libbfio/libbfio.la"; ac_cv_libbfio=local ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBBFIO], [test "x$ac_cv_libbfio" = xlocal]) AS_IF( [test "x$ac_cv_libbfio_CPPFLAGS" != "x"], [AC_SUBST( [LIBBFIO_CPPFLAGS], [$ac_cv_libbfio_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libbfio_LIBADD" != "x"], [AC_SUBST( [LIBBFIO_LIBADD], [$ac_cv_libbfio_LIBADD]) ]) AS_IF( [test "x$ac_cv_libbfio" = xyes], [AC_SUBST( [ax_libbfio_pc_libs_private], [-lbfio]) ]) AS_IF( [test "x$ac_cv_libbfio" = xyes], [AC_SUBST( [ax_libbfio_spec_requires], [libbfio]) AC_SUBST( [ax_libbfio_spec_build_requires], [libbfio-devel]) ]) ]) libevt-20170120/m4/libfvalue.m40000664000175000017500000004016112706057447020106 0ustar00lordyestalordyesta00000000000000dnl Functions for libfvalue dnl dnl Version: 20160131 dnl Function to detect if libfvalue available dnl ac_libfvalue_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFVALUE_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xno && test "x$ac_cv_with_libfvalue" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfvalue"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfvalue}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfvalue}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfvalue]) ]) ]) AS_IF( [test "x$ac_cv_with_libfvalue" = xno], [ac_cv_libfvalue=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfvalue], [libfvalue >= 20160131], [ac_cv_libfvalue=yes], [ac_cv_libfvalue=no]) ]) AS_IF( [test "x$ac_cv_libfvalue" = xyes], [ac_cv_libfvalue_CPPFLAGS="$pkg_cv_libfvalue_CFLAGS" ac_cv_libfvalue_LIBADD="$pkg_cv_libfvalue_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfvalue.h]) AS_IF( [test "x$ac_cv_header_libfvalue_h" = xno], [ac_cv_libfvalue=no], [dnl Check for the individual functions ac_cv_libfvalue=yes AC_CHECK_LIB( fvalue, libfvalue_get_version, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) dnl 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], [AC_DEFINE( [HAVE_LIBFVALUE], [1], [Define to 1 if you have the `fvalue' library (-lfvalue).]) ]) AS_IF( [test "x$ac_cv_libfvalue" = xyes], [AC_SUBST( [HAVE_LIBFVALUE], [1]) ], [AC_SUBST( [HAVE_LIBFVALUE], [0]) ]) ]) dnl Function to detect how to enable libfvalue AC_DEFUN([AX_LIBFVALUE_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfvalue], [libfvalue], [search for libfvalue in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBFVALUE_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfvalue" != xyes], [ac_cv_libfvalue_CPPFLAGS="-I../libfvalue"; ac_cv_libfvalue_LIBADD="../libfvalue/libfvalue.la"; ac_cv_libfvalue=local AC_DEFINE( [HAVE_LOCAL_LIBFVALUE], [1], [Define to 1 if the local version of libfvalue is used.]) AC_SUBST( [HAVE_LOCAL_LIBFVALUE], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFVALUE], [test "x$ac_cv_libfvalue" = xlocal]) AS_IF( [test "x$ac_cv_libfvalue_CPPFLAGS" != "x"], [AC_SUBST( [LIBFVALUE_CPPFLAGS], [$ac_cv_libfvalue_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfvalue_LIBADD" != "x"], [AC_SUBST( [LIBFVALUE_LIBADD], [$ac_cv_libfvalue_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfvalue" = xyes], [AC_SUBST( [ax_libfvalue_pc_libs_private], [-lfvalue]) ]) AS_IF( [test "x$ac_cv_libfvalue" = xyes], [AC_SUBST( [ax_libfvalue_spec_requires], [libfvalue]) AC_SUBST( [ax_libfvalue_spec_build_requires], [libfvalue-devel]) ]) ]) libevt-20170120/libcerror/0000775000175000017500000000000013040343016017312 5ustar00lordyestalordyesta00000000000000libevt-20170120/libcerror/libcerror_system.c0000664000175000017500000004130413040331675023057 0ustar00lordyestalordyesta00000000000000/* * System functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_STRING_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #include #elif defined( HAVE_VARARGS_H ) #include #else #error Missing headers stdarg.h and varargs.h #endif #include "libcerror_error.h" #include "libcerror_system.h" #include "libcerror_types.h" /* The make language identifier macro for the WINAPI FormatMessage function */ #if !defined( MAKELANGID ) #define MAKELANGID( primary_language_identifier, sub_language_identifier ) \ ( ( ( (WORD) ( sub_language_identifier ) ) << 10 ) | (WORD) ( primary_language_identifier ) ) #endif #if !defined( LANG_NEUTRAL ) #define LANG_NEUTRAL 0 #endif #if !defined( SUBLANG_DEFAULT ) #define SUBLANG_DEFAULT 1 #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* Cross Windows safe version of FormatMessageA * Returns TRUE if successful or FALSE on error */ DWORD libcerror_FormatMessageA( DWORD flags, LPCVOID source, DWORD message_identifier, DWORD language_identifier, LPCSTR string, DWORD string_size, va_list *argument_list ) { FARPROC function = NULL; HMODULE library_handle = NULL; DWORD result = 0; if( string == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "FormatMessageA" ); if( function != NULL ) { result = function( flags, source, message_identifier, language_identifier, string, string_size, argument_list ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { result = FALSE; } return( result ); } /* Cross Windows safe version of FormatMessageW * Returns TRUE if successful or FALSE on error */ DWORD libcerror_FormatMessageW( DWORD flags, LPCVOID source, DWORD message_identifier, DWORD language_identifier, LPWSTR string, DWORD string_size, va_list *argument_list ) { FARPROC function = NULL; HMODULE library_handle = NULL; DWORD result = 0; if( string == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "FormatMessageA" ); if( function != NULL ) { result = function( flags, source, message_identifier, language_identifier, string, string_size, argument_list ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { result = FALSE; } return( result ); } #endif #if defined( WINAPI ) && ( WINVER >= 0x0501 ) /* 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 flags = 0; DWORD print_count = 0; if( string == NULL ) { return( -1 ); } flags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS; if( string_size > (size_t) INT_MAX ) { return( -1 ); } #if ( WINVER <= 0x0500 ) #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) print_count = libcerror_FormatMessageW( flags, NULL, (DWORD) error_number, MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), string, (DWORD) string_size, NULL ); #else print_count = libcerror_FormatMessageA( flags, NULL, (DWORD) error_number, MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), string, (DWORD) string_size, NULL ); #endif #else #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) print_count = FormatMessageW( flags, NULL, (DWORD) error_number, MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), string, (DWORD) string_size, NULL ); #else print_count = FormatMessageA( flags, NULL, (DWORD) error_number, MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), string, (DWORD) string_size, NULL ); #endif #endif /* ( WINVER <= 0x0500 ) */ if( print_count == 0 ) { return( -1 ); } return( (int) print_count ); } #elif defined( HAVE_STRERROR_R ) /* Retrieves a descriptive string of the error number * This function uses the POSIX strerror_r function or equivalent * Returns the string_length if successful or -1 on error */ 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 ); } /* Sanity check */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) #error Missing wide character strerror_r function #endif #if defined( STRERROR_R_CHAR_P ) if( strerror_r( (int) error_number, string, string_size ) == NULL ) #else if( strerror_r( (int) error_number, string, string_size ) != 0 ) #endif { return( -1 ); } string[ string_size - 1 ] = (system_character_t) 0; string_length = system_string_length( string ); return( (int) string_length ); } #elif defined( HAVE_STRERROR ) || defined( WINAPI ) /* Retrieves a descriptive string of the error number * This function uses the POSIX strerror function or equivalent * Returns the string_length if successful or -1 on error */ 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 ); } /* Sanity check */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) && !defined( WINAPI ) #error Missing wide character strerror function #endif #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 *system_format_string = NULL; void *reallocation = NULL; size_t format_string_length = 0; size_t message_size = LIBCERROR_MESSAGE_INCREMENT_SIZE; size_t string_index = 0; int message_index = 0; int print_count = 0; if( error == NULL ) { return; } if( format_string == NULL ) { return; } format_string_length = narrow_string_length( format_string ); if( format_string_length > message_size ) { message_size = ( ( format_string_length / LIBCERROR_MESSAGE_INCREMENT_SIZE ) + 1 ) * LIBCERROR_MESSAGE_INCREMENT_SIZE; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) do { reallocation = memory_reallocate( system_format_string, sizeof( system_character_t ) * ( format_string_length + 1 ) ); if( reallocation == NULL ) { goto on_error; } system_format_string = (system_character_t *) reallocation; #if defined( __BORLANDC__ ) || defined( _MSC_VER ) print_count = wide_string_snwprintf( system_format_string, format_string_length + 1, L"%S", format_string ); #else print_count = wide_string_snwprintf( system_format_string, format_string_length + 1, L"%s", format_string ); #endif if( print_count <= -1 ) { format_string_length += LIBCERROR_MESSAGE_INCREMENT_SIZE; } else if( ( (size_t) print_count > format_string_length ) || ( system_format_string[ print_count ] != 0 ) ) { format_string_length = (size_t) print_count; print_count = -1; } if( format_string_length >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { goto on_error; } } while( print_count <= -1 ); #else system_format_string = (system_character_t *) format_string; #endif #if defined( __BORLANDC__ ) || defined( _MSC_VER ) /* Rewrite %s to %S */ string_index = 0; while( string_index < format_string_length ) { if( system_format_string[ string_index ] == 0 ) { break; } else if( system_format_string[ string_index ] == (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 if( *error == NULL ) { internal_error = memory_allocate_structure( libcerror_internal_error_t ); if( internal_error == NULL ) { goto on_error; } internal_error->domain = error_domain; internal_error->code = error_code; internal_error->number_of_messages = 0; internal_error->messages = NULL; internal_error->sizes = NULL; *error = (libcerror_error_t *) internal_error; } else { internal_error = (libcerror_internal_error_t *) *error; } reallocation = memory_reallocate( internal_error->messages, sizeof( system_character_t * ) * ( internal_error->number_of_messages + 1 ) ); if( reallocation == NULL ) { goto on_error; } internal_error->messages = (system_character_t **) reallocation; reallocation = memory_reallocate( internal_error->sizes, sizeof( size_t ) * ( internal_error->number_of_messages + 1 ) ); if( reallocation == NULL ) { goto on_error; } internal_error->sizes = (size_t *) reallocation; message_index = internal_error->number_of_messages; internal_error->messages[ message_index ] = NULL; internal_error->sizes[ message_index ] = 0; internal_error->number_of_messages += 1; do { reallocation = memory_reallocate( internal_error->messages[ message_index ], sizeof( system_character_t ) * message_size ); if( reallocation == NULL ) { memory_free( internal_error->messages[ message_index ] ); internal_error->messages[ message_index ] = NULL; break; } internal_error->messages[ message_index ] = (system_character_t *) reallocation; VASTART( argument_list, const char *, format_string ); print_count = system_string_vsprintf( internal_error->messages[ message_index ], message_size, system_format_string, argument_list ); VAEND( argument_list ); if( print_count <= -1 ) { message_size += LIBCERROR_MESSAGE_INCREMENT_SIZE; } else if( ( (size_t) print_count > message_size ) || ( ( internal_error->messages[ message_index ] )[ print_count ] != 0 ) ) { message_size = (size_t) ( print_count + 1 ); print_count = -1; } if( message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { memory_free( internal_error->messages[ message_index ] ); internal_error->messages[ message_index ] = NULL; internal_error->sizes[ message_index ] = 0; break; } internal_error->sizes[ message_index ] = (size_t) print_count + 1; } while( print_count <= -1 ); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) memory_free( system_format_string ); system_format_string = NULL; #endif string_index = internal_error->sizes[ message_index ] - 1; if( ( internal_error->messages[ message_index ] != 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; } message_size += (size_t) print_count; if( message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { memory_free( internal_error->messages[ message_index ] ); internal_error->messages[ message_index ] = NULL; internal_error->sizes[ message_index ] = 0; goto on_error; } internal_error->sizes[ message_index ] += print_count; return; on_error: #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_format_string != NULL ) { memory_free( system_format_string ); } #endif if( ( *error == NULL ) && ( internal_error != NULL ) ) { memory_free( internal_error ); } return; } #undef VARARGS #undef VASTART #undef VAEND libevt-20170120/libcerror/libcerror_error.c0000664000175000017500000004026213040331675022666 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #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_types.h" /* Free an error and its elements */ void libcerror_error_free( libcerror_error_t **error ) { libcerror_internal_error_t *internal_error = NULL; int message_index = 0; if( error == NULL ) { return; } if( *error != NULL ) { internal_error = (libcerror_internal_error_t *) *error; if( internal_error->messages != NULL ) { for( message_index = 0; message_index < internal_error->number_of_messages; message_index++ ) { if( internal_error->messages[ message_index ] != NULL ) { memory_free( internal_error->messages[ message_index ] ); } } memory_free( internal_error->messages ); } if( internal_error->sizes != NULL ) { memory_free( internal_error->sizes ); } memory_free( *error ); *error = NULL; } } #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #define VARARGS( function, error, error_domain, error_code, type, argument ) \ function( error, error_domain, error_code, type argument, ... ) #define VASTART( argument_list, type, name ) \ va_start( argument_list, name ) #define VAEND( argument_list ) \ va_end( argument_list ) #elif defined( HAVE_VARARGS_H ) #define VARARGS( function, error, error_domain, error_code, type, argument ) \ function( error, error_domain, error_code, va_alist ) va_dcl #define VASTART( argument_list, type, name ) \ { type name; va_start( argument_list ); name = va_arg( argument_list, type ) #define VAEND( argument_list ) \ va_end( argument_list ); } #endif /* Sets an error * 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 *system_format_string = NULL; void *reallocation = NULL; size_t format_string_length = 0; size_t message_size = LIBCERROR_MESSAGE_INCREMENT_SIZE; int message_index = 0; int print_count = 0; #if defined( __BORLANDC__ ) || defined( _MSC_VER ) size_t string_index = 0; #endif if( error == NULL ) { return; } if( format_string == NULL ) { return; } format_string_length = narrow_string_length( format_string ); if( format_string_length > message_size ) { message_size = ( ( format_string_length / LIBCERROR_MESSAGE_INCREMENT_SIZE ) + 1 ) * LIBCERROR_MESSAGE_INCREMENT_SIZE; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) do { reallocation = memory_reallocate( system_format_string, sizeof( system_character_t ) * ( format_string_length + 1 ) ); if( reallocation == NULL ) { goto on_error; } system_format_string = (system_character_t *) reallocation; #if defined( __BORLANDC__ ) || defined( _MSC_VER ) print_count = wide_string_snwprintf( system_format_string, format_string_length + 1, L"%S", format_string ); #else print_count = wide_string_snwprintf( system_format_string, format_string_length + 1, L"%s", format_string ); #endif if( print_count <= -1 ) { format_string_length += LIBCERROR_MESSAGE_INCREMENT_SIZE; } else if( ( (size_t) print_count > format_string_length ) || ( system_format_string[ print_count ] != 0 ) ) { format_string_length = (size_t) print_count; print_count = -1; } if( format_string_length >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { goto on_error; } } while( print_count <= -1 ); #else system_format_string = (system_character_t *) format_string; #endif #if defined( __BORLANDC__ ) || defined( _MSC_VER ) /* Rewrite %s to %S */ string_index = 0; while( string_index < format_string_length ) { if( system_format_string[ string_index ] == 0 ) { break; } else if( system_format_string[ string_index ] == (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 ) */ if( *error == NULL ) { internal_error = memory_allocate_structure( libcerror_internal_error_t ); if( internal_error == NULL ) { goto on_error; } internal_error->domain = error_domain; internal_error->code = error_code; internal_error->number_of_messages = 0; internal_error->messages = NULL; internal_error->sizes = NULL; *error = (libcerror_error_t *) internal_error; } else { internal_error = (libcerror_internal_error_t *) *error; } reallocation = memory_reallocate( internal_error->messages, sizeof( system_character_t * ) * ( internal_error->number_of_messages + 1 ) ); if( reallocation == NULL ) { goto on_error; } internal_error->messages = (system_character_t **) reallocation; reallocation = memory_reallocate( internal_error->sizes, sizeof( size_t ) * ( internal_error->number_of_messages + 1 ) ); if( reallocation == NULL ) { goto on_error; } internal_error->sizes = (size_t *) reallocation; message_index = internal_error->number_of_messages; internal_error->messages[ message_index ] = NULL; internal_error->sizes[ message_index ] = 0; internal_error->number_of_messages += 1; do { reallocation = memory_reallocate( internal_error->messages[ message_index ], sizeof( system_character_t ) * message_size ); if( reallocation == NULL ) { memory_free( internal_error->messages[ message_index ] ); internal_error->messages[ message_index ] = NULL; break; } internal_error->messages[ message_index ] = (system_character_t *) reallocation; VASTART( argument_list, const char *, format_string ); print_count = system_string_vsprintf( internal_error->messages[ message_index ], message_size, system_format_string, argument_list ); VAEND( argument_list ); if( print_count <= -1 ) { message_size += LIBCERROR_MESSAGE_INCREMENT_SIZE; } else if( ( (size_t) print_count >= message_size ) || ( ( internal_error->messages[ message_index ] )[ print_count ] != (system_character_t) 0 ) ) { message_size = (size_t) ( print_count + 1 ); print_count = -1; } if( message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { memory_free( internal_error->messages[ message_index ] ); internal_error->messages[ message_index ] = NULL; internal_error->sizes[ message_index ] = 0; break; } internal_error->sizes[ message_index ] = (size_t) print_count + 1; } while( print_count <= -1 ); #if defined( 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 if( ( *error == NULL ) && ( internal_error != NULL ) ) { memory_free( internal_error ); } return; } #undef VARARGS #undef VASTART #undef VAEND /* Determines if an error equals a certain error code of a domain * Returns 1 if error matches or 0 if not */ int libcerror_error_matches( libcerror_error_t *error, int error_domain, int error_code ) { if( error == NULL ) { return( 0 ); } if( ( ( (libcerror_internal_error_t *) error )->domain == error_domain ) && ( ( (libcerror_internal_error_t *) error )->code == error_code ) ) { return( 1 ); } return( 0 ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcerror_error_fprint( libcerror_error_t *error, FILE *stream ) { libcerror_internal_error_t *internal_error = NULL; int message_index = 0; int print_count = 0; if( error == NULL ) { return( -1 ); } internal_error = (libcerror_internal_error_t *) error; if( internal_error->messages == NULL ) { return( -1 ); } if( stream == NULL ) { return( -1 ); } message_index = internal_error->number_of_messages - 1; if( internal_error->messages[ message_index ] != NULL ) { #if defined( WINAPI ) print_count = fprintf( stream, "%" PRIs_SYSTEM "\r\n", internal_error->messages[ message_index ] ); #else print_count = fprintf( stream, "%" PRIs_SYSTEM "\n", internal_error->messages[ message_index ] ); #endif if( print_count <= -1 ) { return( -1 ); } } return( print_count ); } /* Prints a descriptive string of the error to the string * The end-of-string character is not included in the return value * Returns the number of printed characters if successful or -1 on error */ int libcerror_error_sprint( libcerror_error_t *error, char *string, size_t size ) { libcerror_internal_error_t *internal_error = NULL; size_t print_count = 0; int message_index = 0; if( error == NULL ) { return( -1 ); } internal_error = (libcerror_internal_error_t *) error; if( internal_error->messages == 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; if( internal_error->messages[ message_index ] != NULL ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) #if defined( _MSC_VER ) if( wcstombs_s( &print_count, string, size, internal_error->messages[ message_index ], _TRUNCATE ) != 0 ) { return( -1 ); } #else print_count = wcstombs( string, internal_error->messages[ message_index ], size ); if( print_count == (size_t) -1 ) { return( -1 ); } #endif /* defined( _MSC_VER ) */ if( print_count >= size ) { return( -1 ); } #else if( ( internal_error->sizes[ message_index ] + 1 ) >= size ) { return( -1 ); } if( narrow_string_copy( string, internal_error->messages[ message_index ], internal_error->sizes[ message_index ] ) == NULL ) { string[ 0 ] = (system_character_t) 0; return( -1 ); } print_count = internal_error->sizes[ message_index ]; string[ print_count ] = (system_character_t) 0; #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; int message_index = 0; int print_count = 0; int total_print_count = 0; if( error == NULL ) { return( -1 ); } internal_error = (libcerror_internal_error_t *) error; if( internal_error->messages == NULL ) { return( -1 ); } if( stream == NULL ) { return( -1 ); } for( message_index = 0; message_index < internal_error->number_of_messages; message_index++ ) { if( internal_error->messages[ message_index ] != NULL ) { #if defined( WINAPI ) print_count = fprintf( stream, "%" PRIs_SYSTEM "\r\n", internal_error->messages[ message_index ] ); #else print_count = fprintf( stream, "%" PRIs_SYSTEM "\n", internal_error->messages[ message_index ] ); #endif if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } } return( total_print_count ); } /* Prints a backtrace of the error to the string * The end-of-string character is not included in the return value * Returns the number of printed characters if successful or -1 on error */ int libcerror_error_backtrace_sprint( libcerror_error_t *error, char *string, size_t size ) { libcerror_internal_error_t *internal_error = NULL; size_t string_index = 0; int message_index = 0; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) size_t print_count = 0; #endif if( error == NULL ) { return( -1 ); } internal_error = (libcerror_internal_error_t *) error; if( internal_error->messages == NULL ) { return( -1 ); } if( internal_error->sizes == NULL ) { return( -1 ); } if( string == NULL ) { return( -1 ); } #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++ ) { if( internal_error->messages[ message_index ] != 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, internal_error->messages[ message_index ], _TRUNCATE ) != 0 ) { return( -1 ); } #else print_count = wcstombs( &( string[ string_index ] ), internal_error->messages[ message_index ], size - string_index ); if( print_count == (size_t) -1 ) { return( -1 ); } #endif /*defined( _MSC_VER ) */ string_index += print_count; if( string_index >= size ) { return( -1 ); } if( string[ string_index - 1 ] == 0 ) { string_index--; } #else if( ( string_index + internal_error->sizes[ message_index ] + 1 ) >= size ) { return( -1 ); } if( narrow_string_copy( &( string[ string_index ] ), internal_error->messages[ message_index ], internal_error->sizes[ message_index ] ) == NULL ) { return( -1 ); } string_index += internal_error->sizes[ message_index ] - 1; string[ string_index ] = (system_character_t) 0; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ } } string_index++; if( string_index > (size_t) INT_MAX ) { return( -1 ); } return( (int) string_index ); } libevt-20170120/libcerror/libcerror_extern.h0000664000175000017500000000256113040331675023047 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_INTERNAL_EXTERN_H ) #define _LIBCERROR_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if !defined( HAVE_LOCAL_LIBCERROR ) /* If libtool DLL support is enabled set LIBCERROR_DLL_EXPORT * before including libcerror/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCERROR_DLL_EXPORT #endif #include #else #define LIBCERROR_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBCERROR_INTERNAL_EXTERN_H ) */ libevt-20170120/libcerror/Makefile.am0000664000175000017500000000113413012271461021350 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBCERROR AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcerror ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcerror_la_SOURCES) libevt-20170120/libcerror/libcerror_error.h0000664000175000017500000000472713040331675022701 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_INTERNAL_ERROR_H ) #define _LIBCERROR_INTERNAL_ERROR_H #include #include #include #include "libcerror_extern.h" #include "libcerror_types.h" #if defined( __cplusplus ) extern "C" { #endif #define LIBCERROR_MESSAGE_INCREMENT_SIZE 64 #define LIBCERROR_MESSAGE_MAXIMUM_SIZE 4096 typedef struct libcerror_internal_error libcerror_internal_error_t; struct libcerror_internal_error { /* The error domain */ int domain; /* The error code */ int code; /* The number of messages */ int number_of_messages; /* A dynamic array containing the message strings */ system_character_t **messages; /* A dynamic array containing the message string sizes * without the end-of-string character */ size_t *sizes; }; LIBCERROR_EXTERN \ void libcerror_error_free( libcerror_error_t **error ); LIBCERROR_EXTERN \ void libcerror_error_set( libcerror_error_t **error, int error_domain, int error_code, const char *format_string, ... ); LIBCERROR_EXTERN \ int libcerror_error_matches( libcerror_error_t *error, int error_domain, int error_code ); LIBCERROR_EXTERN \ int libcerror_error_fprint( libcerror_error_t *error, FILE *stream ); LIBCERROR_EXTERN \ int libcerror_error_sprint( libcerror_error_t *error, char *string, size_t size ); LIBCERROR_EXTERN \ int libcerror_error_backtrace_fprint( libcerror_error_t *error, FILE *stream ); LIBCERROR_EXTERN \ int libcerror_error_backtrace_sprint( libcerror_error_t *error, char *string, size_t size ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCERROR_INTERNAL_ERROR_H ) */ libevt-20170120/libcerror/libcerror_support.h0000664000175000017500000000233013040331675023250 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_SUPPORT_H ) #define _LIBCERROR_SUPPORT_H #include #include #include "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 ) */ libevt-20170120/libcerror/libcerror_types.h0000664000175000017500000000276413040331675022713 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_INTERNAL_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 ) */ libevt-20170120/libcerror/libcerror_definitions.h0000664000175000017500000001656313040331675024064 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBCERROR_INTERNAL_DEFINITIONS_H ) #define LIBCERROR_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if !defined( HAVE_LOCAL_LIBCERROR ) #include /* The definitions in are copied here * for local use of libcerror */ #else #define LIBCERROR_VERSION 20170115 /* The libcerror version string */ #define LIBCERROR_VERSION_STRING "20170115" /* 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 ) */ #endif /* !defined( LIBCERROR_INTERNAL_DEFINITIONS_H ) */ libevt-20170120/libcerror/libcerror_unused.h0000664000175000017500000000255613040331675023051 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_INTERNAL_UNUSED_H ) #define _LIBCERROR_INTERNAL_UNUSED_H #include #if !defined( LIBCERROR_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCERROR_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCERROR_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCERROR_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCERROR_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBCERROR_INTERNAL_UNUSED_H ) */ libevt-20170120/libcerror/Makefile.in0000664000175000017500000007527713040342657021413 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBCERROR_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCERROR_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCERROR_TRUE@ -I$(top_srcdir)/common @HAVE_LOCAL_LIBCERROR_TRUE@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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcerror/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcerror/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcerror_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcerror_system.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcerror ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcerror_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libcerror/libcerror_support.c0000664000175000017500000000221013040331675023240 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcerror_definitions.h" #include "libcerror_support.h" #if !defined( HAVE_LOCAL_LIBCERROR ) /* Returns the library version as a string */ const char *libcerror_get_version( void ) { return( (const char *) LIBCERROR_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBCERROR ) */ libevt-20170120/libcerror/libcerror_system.h0000664000175000017500000000375413040331675023073 0ustar00lordyestalordyesta00000000000000/* * System functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_SYSTEM_H ) #define _LIBCERROR_SYSTEM_H #include #include #include #include "libcerror_extern.h" #include "libcerror_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 ) */ libevt-20170120/libevt/0000775000175000017500000000000013040343017016615 5ustar00lordyestalordyesta00000000000000libevt-20170120/libevt/libevt_record_values.c0000664000175000017500000012747013040331672023202 0ustar00lordyestalordyesta00000000000000/* * Record values functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "libevt_debug.h" #include "libevt_io_handle.h" #include "libevt_libbfio.h" #include "libevt_libcerror.h" #include "libevt_libcnotify.h" #include "libevt_libfdatetime.h" #include "libevt_libfvalue.h" #include "libevt_libfwnt.h" #include "libevt_record_values.h" #include "libevt_unused.h" #include "evt_file_header.h" #include "evt_record.h" const uint8_t evt_end_of_file_record_signature1[ 4 ] = { 0x11, 0x11, 0x11, 0x11 }; const uint8_t evt_end_of_file_record_signature2[ 4 ] = { 0x22, 0x22, 0x22, 0x22 }; const uint8_t evt_end_of_file_record_signature3[ 4 ] = { 0x33, 0x33, 0x33, 0x33 }; const uint8_t evt_end_of_file_record_signature4[ 4 ] = { 0x44, 0x44, 0x44, 0x44 }; /* Creates record values * Make sure the value record_values is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libevt_record_values_initialize( libevt_record_values_t **record_values, libcerror_error_t **error ) { static char *function = "libevt_record_values_initialize"; if( record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record values.", function ); return( -1 ); } if( *record_values != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid record values value already set.", function ); return( -1 ); } *record_values = memory_allocate_structure( libevt_record_values_t ); if( *record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create record values.", function ); goto on_error; } if( memory_set( *record_values, 0, sizeof( libevt_record_values_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear record values.", function ); goto on_error; } return( 1 ); on_error: if( *record_values != NULL ) { memory_free( *record_values ); *record_values = NULL; } return( -1 ); } /* Frees record values * Returns 1 if successful or -1 on error */ int libevt_record_values_free( libevt_record_values_t **record_values, libcerror_error_t **error ) { static char *function = "libevt_record_values_free"; int result = 1; if( record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record values.", function ); return( -1 ); } if( *record_values != NULL ) { if( ( *record_values )->source_name != NULL ) { if( libfvalue_value_free( &( ( *record_values )->source_name ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free source name value.", function ); result = -1; } } if( ( *record_values )->computer_name != NULL ) { if( libfvalue_value_free( &( ( *record_values )->computer_name ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free computer name value.", function ); result = -1; } } if( ( *record_values )->user_security_identifier != NULL ) { if( libfvalue_value_free( &( ( *record_values )->user_security_identifier ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free user security identifier (SID).", function ); result = -1; } } if( ( *record_values )->strings != NULL ) { if( libfvalue_value_free( &( ( *record_values )->strings ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free strings.", function ); result = -1; } } if( ( *record_values )->data != NULL ) { if( libfvalue_value_free( &( ( *record_values )->data ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data.", function ); result = -1; } } memory_free( *record_values ); *record_values = NULL; } return( result ); } /* Clones the record values * Returns 1 if successful or -1 on error */ int libevt_record_values_clone( libevt_record_values_t **destination_record_values, libevt_record_values_t *source_record_values, libcerror_error_t **error ) { static char *function = "libevt_record_values_clone"; if( destination_record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination record values.", function ); return( -1 ); } if( *destination_record_values != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination record values value already set.", function ); return( -1 ); } if( source_record_values == NULL ) { *destination_record_values = NULL; return( 1 ); } *destination_record_values = memory_allocate_structure( libevt_record_values_t ); if( *destination_record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination record values.", function ); goto on_error; } if( memory_copy( *destination_record_values, source_record_values, sizeof( libevt_record_values_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy source to destination record values.", function ); goto on_error; } return( 1 ); on_error: if( *destination_record_values != NULL ) { memory_free( *destination_record_values ); *destination_record_values = NULL; } return( -1 ); } /* Reads a record_values * Returns the number of bytes read if successful or -1 on error */ ssize_t libevt_record_values_read( libevt_record_values_t *record_values, libbfio_handle_t *file_io_handle, libevt_io_handle_t *io_handle, off64_t *file_offset, uint8_t strict_mode, libcerror_error_t **error ) { uint8_t record_size_data[ 4 ]; uint8_t *record_data = NULL; static char *function = "libevt_record_values_read"; size_t read_size = 0; size_t record_data_offset = 0; ssize_t read_count = 0; ssize_t total_read_count = 0; uint32_t record_data_size = 0; if( record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record values.", 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( file_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file offset.", function ); return( -1 ); } record_values->offset = *file_offset; read_count = libbfio_handle_read_buffer( file_io_handle, record_size_data, sizeof( uint32_t ), error ); if( read_count != (ssize_t) sizeof( uint32_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record size data.", function ); goto on_error; } *file_offset += read_count; total_read_count = read_count; byte_stream_copy_to_uint32_little_endian( record_size_data, record_data_size ); if( record_data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: record data size value out of bounds.", function ); goto on_error; } #if SIZEOF_SIZE_T <= 4 if( (size_t) record_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid record data size value exceeds maximum.", function ); goto on_error; } #endif /* Allocating record data as 4 bytes and then using realloc here * corrupts the memory */ record_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * record_data_size ); if( record_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create record data.", function ); goto on_error; } byte_stream_copy_from_uint32_little_endian( record_data, record_data_size ); record_data_offset = 4; read_size = record_data_size - record_data_offset; if( ( (size64_t) *file_offset + read_size ) > io_handle->file_size ) { read_size = (size_t) ( io_handle->file_size - *file_offset ); } read_count = libbfio_handle_read_buffer( file_io_handle, &( record_data[ record_data_offset ] ), read_size, error ); if( read_count != (ssize_t) read_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record data.", function ); goto on_error; } *file_offset += read_count; record_data_offset += read_count; total_read_count += read_count; if( record_data_offset < (size_t) record_data_size ) { if( libbfio_handle_seek_offset( file_io_handle, (off64_t) sizeof( evt_file_header_t ), SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek file header offset: %" PRIzd ".", function, sizeof( evt_file_header_t ) ); goto on_error; } *file_offset = (off64_t) sizeof( evt_file_header_t ); read_size = (size_t) record_data_size - record_data_offset; read_count = libbfio_handle_read_buffer( file_io_handle, &( record_data[ record_data_offset ] ), read_size, error ); if( read_count != (ssize_t) read_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record data.", function ); goto on_error; } *file_offset += read_count; total_read_count += read_count; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: record data:\n", function ); libcnotify_print_data( record_data, (size_t) record_data_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif if( memory_compare( &( record_data[ 4 ] ), evt_file_signature, 4 ) == 0 ) { record_values->type = LIBEVT_RECORD_TYPE_EVENT; } else if( memory_compare( &( record_data[ 4 ] ), evt_end_of_file_record_signature1, 4 ) == 0 ) { record_values->type = LIBEVT_RECORD_TYPE_END_OF_FILE; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record values signature.", function ); goto on_error; } if( record_values->type == LIBEVT_RECORD_TYPE_EVENT ) { if( libevt_record_values_read_event( record_values, record_data, (size_t) record_data_size, strict_mode, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read event record values.", function ); goto on_error; } } else if( record_values->type == LIBEVT_RECORD_TYPE_END_OF_FILE ) { if( libevt_record_values_read_end_of_file( record_values, record_data, (size_t) record_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read end of file record values.", function ); goto on_error; } } memory_free( record_data ); return( total_read_count ); on_error: if( record_data != NULL ) { memory_free( record_data ); } return( -1 ); } /* Reads the event record values * Returns 1 if successful or -1 on error */ int libevt_record_values_read_event( libevt_record_values_t *record_values, uint8_t *record_data, size_t record_data_size, uint8_t strict_mode, libcerror_error_t **error ) { static char *function = "libevt_record_values_read_event"; size_t record_data_offset = 0; size_t strings_data_offset = 0; ssize_t value_data_size = 0; uint32_t data_offset = 0; uint32_t data_size = 0; uint32_t members_data_size = 0; uint32_t size = 0; uint32_t size_copy = 0; uint32_t strings_offset = 0; uint32_t strings_size = 0; uint32_t user_sid_offset = 0; uint32_t user_sid_size = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t posix_time_string[ 32 ]; libfdatetime_posix_time_t *posix_time = NULL; uint32_t value_32bit = 0; uint16_t value_16bit = 0; int result = 0; #endif if( record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record values.", function ); return( -1 ); } if( record_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record data.", function ); return( -1 ); } if( record_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid record data size value exceeds maximum.", function ); return( -1 ); } if( record_data_size < ( sizeof( evt_record_event_header_t ) + 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: record data size value out of bounds.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( ( (evt_record_event_header_t *) record_data )->size, size ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_event_header_t *) record_data )->record_number, record_values->number ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_event_header_t *) record_data )->creation_time, record_values->creation_time ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_event_header_t *) record_data )->written_time, record_values->written_time ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_event_header_t *) record_data )->event_identifier, record_values->event_identifier ); byte_stream_copy_to_uint16_little_endian( ( (evt_record_event_header_t *) record_data )->event_type, record_values->event_type ); byte_stream_copy_to_uint16_little_endian( ( (evt_record_event_header_t *) record_data )->event_category, record_values->event_category ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_event_header_t *) record_data )->strings_offset, strings_offset ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_event_header_t *) record_data )->user_sid_size, user_sid_size ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_event_header_t *) record_data )->user_sid_offset, user_sid_offset ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_event_header_t *) record_data )->data_size, data_size ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_event_header_t *) record_data )->data_offset, data_offset ); byte_stream_copy_to_uint32_little_endian( &( record_data[ record_data_size - 4 ] ), size_copy ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu32 "\n", function, size ); libcnotify_printf( "%s: signature\t\t\t\t: %c%c%c%c\n", function, ( (evt_record_event_header_t *) record_data )->signature[ 0 ], ( (evt_record_event_header_t *) record_data )->signature[ 1 ], ( (evt_record_event_header_t *) record_data )->signature[ 2 ], ( (evt_record_event_header_t *) record_data )->signature[ 3 ] ); libcnotify_printf( "%s: record number\t\t\t\t: %" PRIu32 "\n", function, record_values->number ); if( libfdatetime_posix_time_initialize( &posix_time, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create POSIX time.", function ); goto on_error; } if( libfdatetime_posix_time_copy_from_byte_stream( posix_time, ( (evt_record_event_header_t *) record_data )->creation_time, 4, LIBFDATETIME_ENDIAN_LITTLE, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to copy POSIX time from byte stream.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfdatetime_posix_time_copy_to_utf16_string( posix_time, (uint16_t *) posix_time_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, error ); #else result = libfdatetime_posix_time_copy_to_utf8_string( posix_time, (uint8_t *) posix_time_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to copy POSIX time to string.", function ); goto on_error; } libcnotify_printf( "%s: creation time\t\t\t\t: %" PRIs_SYSTEM " UTC\n", function, posix_time_string ); if( libfdatetime_posix_time_copy_from_byte_stream( posix_time, ( (evt_record_event_header_t *) record_data )->written_time, 4, LIBFDATETIME_ENDIAN_LITTLE, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to copy POSIX time from byte stream.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfdatetime_posix_time_copy_to_utf16_string( posix_time, (uint16_t *) posix_time_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, error ); #else result = libfdatetime_posix_time_copy_to_utf8_string( posix_time, (uint8_t *) posix_time_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to copy POSIX time to string.", function ); goto on_error; } libcnotify_printf( "%s: written time\t\t\t\t: %" PRIs_SYSTEM " UTC\n", function, posix_time_string ); if( libfdatetime_posix_time_free( &posix_time, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free POSIX time.", function ); goto on_error; } libcnotify_printf( "%s: event identifier\t\t\t: 0x%08" PRIx32 "\n", function, record_values->event_identifier ); libcnotify_printf( "%s: event identifier: code\t\t\t: %" PRIu32 "\n", function, record_values->event_identifier & 0x0000ffffUL ); libcnotify_printf( "%s: event identifier: facility\t\t: %" PRIu32 "\n", function, ( record_values->event_identifier & 0x0fff0000UL ) >> 16 ); libcnotify_printf( "%s: event identifier: reserved\t\t: %" PRIu32 "\n", function, ( record_values->event_identifier & 0x10000000UL ) >> 28 ); libcnotify_printf( "%s: event identifier: customer flags\t: %" PRIu32 "\n", function, ( record_values->event_identifier & 0x20000000UL ) >> 29 ); libcnotify_printf( "%s: event identifier: severity\t\t: %" PRIu32 " (", function, ( record_values->event_identifier & 0xc0000000UL ) >> 30 ); libevt_debug_print_event_identifier_severity( record_values->event_identifier ); libcnotify_printf( ")\n" ); libcnotify_printf( "%s: event type\t\t\t\t: %" PRIu16 " (", function, record_values->event_type ); libevt_debug_print_event_type( record_values->event_type ); libcnotify_printf( ")\n" ); byte_stream_copy_to_uint16_little_endian( ( (evt_record_event_header_t *) record_data )->number_of_strings, value_16bit ); libcnotify_printf( "%s: number of strings\t\t\t: %" PRIu16 "\n", function, value_16bit ); libcnotify_printf( "%s: event category\t\t\t\t: %" PRIu16 "\n", function, record_values->event_category ); byte_stream_copy_to_uint16_little_endian( ( (evt_record_event_header_t *) record_data )->event_flags, value_16bit ); libcnotify_printf( "%s: event flags\t\t\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_event_header_t *) record_data )->closing_record_number, value_32bit ); libcnotify_printf( "%s: closing record values number\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "%s: strings offset\t\t\t\t: %" PRIu32 "\n", function, strings_offset ); libcnotify_printf( "%s: user security identifier (SID) size\t: %" PRIu32 "\n", function, user_sid_size ); libcnotify_printf( "%s: user security identifier (SID) offset\t: %" PRIu32 "\n", function, user_sid_offset ); libcnotify_printf( "%s: data size\t\t\t\t: %" PRIu32 "\n", function, data_size ); libcnotify_printf( "%s: data offset\t\t\t\t: %" PRIu32 "\n", function, data_offset ); } #endif record_data_offset = sizeof( evt_record_event_header_t ); if( ( user_sid_offset == 0 ) && ( user_sid_size != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: user SID offset or size value out of bounds.", function ); goto on_error; } if( user_sid_offset != 0 ) { if( ( (size_t) user_sid_offset < record_data_offset ) || ( (size_t) user_sid_offset >= ( record_data_size - 4 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: user SID offset value out of bounds.", function ); goto on_error; } if( user_sid_size != 0 ) { if( (size_t) ( user_sid_offset + user_sid_size ) > ( record_data_size - 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: user SID size value out of bounds.", function ); goto on_error; } } } /* If the strings offset is points at the offset at record data size - 4 * the strings are empty. For this to be sane the data offset should * be the same as the strings offset or the data size 0. */ if( ( (size_t) strings_offset < user_sid_offset ) || ( (size_t) strings_offset >= ( record_data_size - 4 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: strings offset value out of bounds.", function ); goto on_error; } if( ( (size_t) data_offset < strings_offset ) || ( (size_t) data_offset >= ( record_data_size - 4 ) ) ) { if( data_size != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: data offset value out of bounds.", function ); goto on_error; } data_offset = (uint32_t) record_data_size - 4; } if( ( (size_t) strings_offset >= ( record_data_size - 4 ) ) && ( strings_offset != data_offset ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: strings offset value out of bounds.", function ); goto on_error; } if( strings_offset != 0 ) { if( strings_offset < record_data_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: strings offset value out of bounds.", function ); goto on_error; } } if( user_sid_offset != 0 ) { members_data_size = user_sid_offset - (uint32_t) record_data_offset; } else if( strings_offset != 0 ) { members_data_size = strings_offset - (uint32_t) record_data_offset; } if( strings_offset != 0 ) { strings_size = data_offset - strings_offset; } if( data_size != 0 ) { if( (size_t) ( data_offset + data_size ) > ( record_data_size - 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: data size value out of bounds.", function ); goto on_error; } } if( members_data_size != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: members data:\n", function ); libcnotify_print_data( &( record_data[ record_data_offset ] ), members_data_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif if( libfvalue_value_type_initialize( &( record_values->source_name ), LIBFVALUE_VALUE_TYPE_STRING_UTF16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create source name value.", function ); goto on_error; } value_data_size = libfvalue_value_type_set_data_string( record_values->source_name, &( record_data[ record_data_offset ] ), members_data_size, LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN, LIBFVALUE_VALUE_DATA_FLAG_MANAGED, error ); if( value_data_size == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data of source name value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: source name\t\t\t\t: ", function ); if( libfvalue_value_print( record_values->source_name, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print source name value.", function ); goto on_error; } libcnotify_printf( "\n" ); } #endif record_data_offset += value_data_size; members_data_size -= (uint32_t) value_data_size; if( libfvalue_value_type_initialize( &( record_values->computer_name ), LIBFVALUE_VALUE_TYPE_STRING_UTF16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create computer name value.", function ); goto on_error; } value_data_size = libfvalue_value_type_set_data_string( record_values->computer_name, &( record_data[ record_data_offset ] ), members_data_size, LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN, LIBFVALUE_VALUE_DATA_FLAG_MANAGED, error ); if( value_data_size == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data of computer name value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: computer name\t\t\t\t: ", function ); if( libfvalue_value_print( record_values->computer_name, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print computer name value.", function ); goto on_error; } libcnotify_printf( "\n" ); } #endif record_data_offset += value_data_size; members_data_size -= (uint32_t) value_data_size; if( members_data_size > 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: members trailing data:\n", function ); libcnotify_print_data( &( record_data[ record_data_offset ] ), members_data_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif record_data_offset += members_data_size; } } if( user_sid_size != 0 ) { if( libfvalue_value_type_initialize( &( record_values->user_security_identifier ), LIBFVALUE_VALUE_TYPE_NT_SECURITY_IDENTIFIER, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create user security identifier (SID) value.", function ); goto on_error; } if( libfvalue_value_set_data( record_values->user_security_identifier, &( record_data[ user_sid_offset ] ), (size_t) user_sid_size, LIBFVALUE_ENDIAN_LITTLE, 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 of user security identifier (SID) value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: user security identifier (SID)\t\t: ", function ); if( libfvalue_value_print( record_values->user_security_identifier, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print user security identifier (SID) value.", function ); goto on_error; } libcnotify_printf( "\n" ); } #endif record_data_offset += user_sid_size; } if( strings_size != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: strings data:\n", function ); libcnotify_print_data( &( record_data[ strings_offset ] ), strings_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif if( size_copy == 0 ) { /* If the strings data is truncated */ strings_data_offset = strings_offset + strings_size - 2; while( strings_data_offset > strings_offset ) { if( ( record_data[ strings_data_offset ] != 0 ) || ( record_data[ strings_data_offset + 1 ] != 0 ) ) { strings_size += 2; break; } strings_data_offset -= 2; strings_size -= 2; } } if( libfvalue_value_type_initialize( &( record_values->strings ), LIBFVALUE_VALUE_TYPE_STRING_UTF16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create strings value.", function ); goto on_error; } value_data_size = libfvalue_value_type_set_data_strings_array( record_values->strings, &( record_data[ strings_offset ] ), strings_size, LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN, error ); if( value_data_size == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data of strings value.", function ); goto on_error; } record_data_offset += strings_size; } if( data_size != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data:\n", function ); libcnotify_print_data( &( record_data[ data_offset ] ), (size_t) data_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif if( libfvalue_value_type_initialize( &( record_values->data ), LIBFVALUE_VALUE_TYPE_BINARY_DATA, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data value.", function ); goto on_error; } if( libfvalue_value_set_data( record_values->data, &( record_data[ record_data_offset ] ), (size_t) data_size, LIBFVALUE_ENDIAN_LITTLE, 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 of data value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) record_data_offset += data_size; #endif } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( record_data_offset < ( record_data_size - 4 ) ) { libcnotify_printf( "%s: padding:\n", function ); libcnotify_print_data( &( record_data[ record_data_offset ] ), (size_t) record_data_size - record_data_offset - 4, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } libcnotify_printf( "%s: size copy\t\t\t\t: %" PRIu32 "\n", function, size_copy ); libcnotify_printf( "\n" ); } #endif if( ( strict_mode == 0 ) && ( size_copy == 0 ) ) { size_copy = size; } if( size != size_copy ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_VALUE_MISMATCH, "%s: value mismatch for size and size copy.", function ); goto on_error; } if( record_data_size != (size_t) size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_VALUE_MISMATCH, "%s: value mismatch for record_values data size and size.", function ); goto on_error; } return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( posix_time != NULL ) { libfdatetime_posix_time_free( &posix_time, NULL ); } #endif if( record_values->data != NULL ) { libfvalue_value_free( &( record_values->data ), NULL ); } if( record_values->strings != NULL ) { libfvalue_value_free( &( record_values->strings ), NULL ); } if( record_values->user_security_identifier != NULL ) { libfvalue_value_free( &( record_values->user_security_identifier ), NULL ); } if( record_values->computer_name != NULL ) { libfvalue_value_free( &( record_values->computer_name ), NULL ); } if( record_values->source_name != NULL ) { libfvalue_value_free( &( record_values->source_name ), NULL ); } return( -1 ); } /* Reads the end of file record values * Returns 1 if successful or -1 on error */ int libevt_record_values_read_end_of_file( libevt_record_values_t *record_values, uint8_t *record_data, size_t record_data_size, libcerror_error_t **error ) { static char *function = "libevt_record_values_read_end_of_file"; uint32_t size = 0; uint32_t size_copy = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; #endif if( record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record values.", function ); return( -1 ); } if( record_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record data.", function ); return( -1 ); } if( record_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid record data size value exceeds maximum.", function ); return( -1 ); } if( record_data_size < sizeof( evt_record_end_of_file_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: record data size value out of bounds.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( ( (evt_record_end_of_file_t *) record_data )->size, size ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_end_of_file_t *) record_data )->size_copy, size_copy ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: size\t\t\t\t: %" PRIu32 "\n", function, size ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_end_of_file_t *) record_data )->signature1, value_32bit ); libcnotify_printf( "%s: signature1\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_end_of_file_t *) record_data )->signature2, value_32bit ); libcnotify_printf( "%s: signature2\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_end_of_file_t *) record_data )->signature3, value_32bit ); libcnotify_printf( "%s: signature3\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_end_of_file_t *) record_data )->signature4, value_32bit ); libcnotify_printf( "%s: signature4\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_end_of_file_t *) record_data )->first_record_offset, value_32bit ); libcnotify_printf( "%s: first record offset\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_end_of_file_t *) record_data )->end_of_file_record_offset, value_32bit ); libcnotify_printf( "%s: end of file record offset\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_end_of_file_t *) record_data )->last_record_number, value_32bit ); libcnotify_printf( "%s: last record number\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (evt_record_end_of_file_t *) record_data )->first_record_number, value_32bit ); libcnotify_printf( "%s: first record number\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "%s: size copy\t\t\t: %" PRIu32 "\n", function, size_copy ); libcnotify_printf( "\n" ); } #endif if( size != size_copy ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_VALUE_MISMATCH, "%s: value mismatch for size and size copy.", function ); return( -1 ); } if( record_data_size != (size_t) size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_VALUE_MISMATCH, "%s: value mismatch for record data size and size.", function ); return( -1 ); } /* TODO correct values in IO handle if necessary */ return( 1 ); } /* Retrieves the type * Returns 1 if successful or -1 on error */ int libevt_record_values_get_type( libevt_record_values_t *record_values, uint8_t *type, libcerror_error_t **error ) { static char *function = "libevt_record_values_get_type"; if( record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record values.", 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 = record_values->type; return( 1 ); } /* Reads record values * Callback for the (recovered) records list * Returns 1 if successful or -1 on error */ int libevt_record_values_read_element_data( libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *element, libfcache_cache_t *cache, int element_file_index LIBEVT_ATTRIBUTE_UNUSED, off64_t element_offset, size64_t element_size LIBEVT_ATTRIBUTE_UNUSED, uint32_t element_flags LIBEVT_ATTRIBUTE_UNUSED, uint8_t read_flags LIBEVT_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libevt_record_values_t *record_values = NULL; static char *function = "libevt_record_values_read_element_data"; off64_t file_offset = 0; ssize_t read_count = 0; LIBEVT_UNREFERENCED_PARAMETER( element_size ) LIBEVT_UNREFERENCED_PARAMETER( element_file_index ) LIBEVT_UNREFERENCED_PARAMETER( element_flags ) LIBEVT_UNREFERENCED_PARAMETER( read_flags ) #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading record at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, element_offset, element_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, element_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek record offset: %" PRIi64 ".", function, element_offset ); goto on_error; } if( libevt_record_values_initialize( &record_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record values.", function ); goto on_error; } /* File offset must be before being passed to libevt_record_values_read */ file_offset = element_offset; read_count = libevt_record_values_read( record_values, file_io_handle, io_handle, &file_offset, 0, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record at offset: %" PRIi64 ".", function, element_offset ); goto on_error; } if( libfdata_list_element_set_element_value( element, (intptr_t *) file_io_handle, cache, (intptr_t *) record_values, (int (*)(intptr_t **, libcerror_error_t **)) &libevt_record_values_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 record values as element value.", function ); goto on_error; } return( 1 ); on_error: if( record_values != NULL ) { libevt_record_values_free( &record_values, NULL ); } return( -1 ); } libevt-20170120/libevt/evt_record.h0000664000175000017500000000704413040331672021133 0ustar00lordyestalordyesta00000000000000/* * The item definition of a Windows Event Log (EVT) * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVT_RECORD_H ) #define _EVT_RECORD_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct evt_record_event_header evt_record_event_header_t; struct evt_record_event_header { /* The (header) size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* Signature * Consists of 4 bytes * "LfLe" */ uint8_t signature[ 4 ]; /* The record number * Consists of 4 bytes */ uint8_t record_number[ 4 ]; /* The creation date and time * Consists of 4 bytes * Contain s 32-bit Unix epoch timestamp */ uint8_t creation_time[ 4 ]; /* The (last) written date and time * Consists of 4 bytes * Contain s 32-bit Unix epoch timestamp */ uint8_t written_time[ 4 ]; /* The event identifier * Consists of 4 bytes */ uint8_t event_identifier[ 4 ]; /* The event type * Consists of 2 bytes */ uint8_t event_type[ 2 ]; /* The number of strings * Consists of 2 bytes */ uint8_t number_of_strings[ 2 ]; /* The event category * Consists of 2 bytes */ uint8_t event_category[ 2 ]; /* The event flags * Consists of 2 bytes */ uint8_t event_flags[ 2 ]; /* The closing record number * Consists of 4 bytes */ uint8_t closing_record_number[ 4 ]; /* The strings offset * Consists of 4 bytes */ uint8_t strings_offset[ 4 ]; /* The user security identifier (SID) size * Consists of 4 bytes */ uint8_t user_sid_size[ 4 ]; /* The user security identifier (SID) offset * Consists of 4 bytes */ uint8_t user_sid_offset[ 4 ]; /* The data size * Consists of 4 bytes */ uint8_t data_size[ 4 ]; /* The data offset * Consists of 4 bytes */ uint8_t data_offset[ 4 ]; }; typedef struct evt_record_end_of_file evt_record_end_of_file_t; struct evt_record_end_of_file { /* The (header) size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* Signature * Consists of 4 bytes * 0x11111111 */ uint8_t signature1[ 4 ]; /* Signature * Consists of 4 bytes * 0x22222222 */ uint8_t signature2[ 4 ]; /* Signature * Consists of 4 bytes * 0x33333333 */ uint8_t signature3[ 4 ]; /* Signature * Consists of 4 bytes * 0x44444444 */ uint8_t signature4[ 4 ]; /* The first (oldest) record offset * Consists of 4 bytes */ uint8_t first_record_offset[ 4 ]; /* The end of file record offset * Consists of 4 bytes */ uint8_t end_of_file_record_offset[ 4 ]; /* The last (newest) record number * Consists of 4 bytes */ uint8_t last_record_number[ 4 ]; /* The first (oldest) record number * Consists of 4 bytes */ uint8_t first_record_number[ 4 ]; /* Copy of the (header) size * Consists of 4 bytes */ uint8_t size_copy[ 4 ]; }; #if defined( __cplusplus ) } #endif #endif /* !defined( _EVT_RECORD_H ) */ libevt-20170120/libevt/libevt_unused.h0000664000175000017500000000252613040331672021647 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_INTERNAL_UNUSED_H ) #define _LIBEVT_INTERNAL_UNUSED_H #include #if !defined( LIBEVT_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBEVT_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBEVT_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBEVT_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBEVT_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBEVT_INTERNAL_UNUSED_H ) */ libevt-20170120/libevt/libevt_definitions.h.in0000664000175000017500000000622213040331672023261 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_INTERNAL_DEFINITIONS_H ) #define _LIBEVT_INTERNAL_DEFINITIONS_H #include #include #define LIBEVT_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBEVT_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* Define HAVE_LOCAL_LIBEVT for local use of libevt */ #if !defined( HAVE_LOCAL_LIBEVT ) #include /* The definitions in are copied here * for local use of libevt */ #else #define LIBEVT_VERSION @VERSION@ /* The version string */ #define LIBEVT_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 LIBEVT_ACCESS_FLAGS { LIBEVT_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBEVT_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBEVT_OPEN_READ ( LIBEVT_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBEVT_OPEN_WRITE ( LIBEVT_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBEVT_OPEN_READ_WRITE ( LIBEVT_ACCESS_FLAG_READ | LIBEVT_ACCESS_FLAG_WRITE ) /* The event type definitions */ enum LIBEVT_EVENT_TYPES { LIBEVT_EVENT_TYPE_ERROR = 0x0001, LIBEVT_EVENT_TYPE_WARNING = 0x0002, LIBEVT_EVENT_TYPE_INFORMATION = 0x0004, LIBEVT_EVENT_TYPE_AUDIT_SUCCESS = 0x0008, LIBEVT_EVENT_TYPE_AUDIT_FAILURE = 0x0010 }; /* The event file flags */ enum LIBEVT_FILE_FLAGS { LIBEVT_FILE_FLAG_IS_DIRTY = 0x00000001UL, LIBEVT_FILE_FLAG_HAS_WRAPPED = 0x00000002UL, LIBEVT_FILE_FLAG_IS_FULL = 0x00000004UL, LIBEVT_FILE_FLAG_ARCHIVE = 0x00000008UL }; #endif /* The IO handle flags */ enum LIBEVT_IO_HANDLE_FLAGS { /* The file is corrupted */ LIBEVT_IO_HANDLE_FLAG_IS_CORRUPTED = 0x01 }; /* The record flags */ enum LIBEVT_RECORD_FLAGS { LIBEVT_RECORD_FLAG_NON_MANAGED_FILE_IO_HANDLE = 0x00, LIBEVT_RECORD_FLAG_MANAGED_FILE_IO_HANDLE = 0x01, }; /* The recover scan states */ enum LIBEVT_RECOVER_SCAN_STATES { LIBEVT_RECOVER_SCAN_STATE_START, LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE1, LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE2, LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE3, LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE4, LIBEVT_RECOVER_SCAN_STATE_FOUND_RECORD_SIGNATURE, }; #define LIBEVT_MAXIMUM_CACHE_ENTRIES_RECORDS 16 #endif libevt-20170120/libevt/libevt_codepage.h0000664000175000017500000000501513040331672022107 0ustar00lordyestalordyesta00000000000000/* * Codepage functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_INTERNAL_CODEPAGE_H ) #define _LIBEVT_INTERNAL_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBEVT ) #include /* Define HAVE_LOCAL_LIBEVT for local use of libevt * The definitions in are copied here * for local use of libevt */ #else /* The codepage definitions */ enum LIBEVT_CODEPAGES { LIBEVT_CODEPAGE_ASCII = 20127, LIBEVT_CODEPAGE_ISO_8859_1 = 28591, LIBEVT_CODEPAGE_ISO_8859_2 = 28592, LIBEVT_CODEPAGE_ISO_8859_3 = 28593, LIBEVT_CODEPAGE_ISO_8859_4 = 28594, LIBEVT_CODEPAGE_ISO_8859_5 = 28595, LIBEVT_CODEPAGE_ISO_8859_6 = 28596, LIBEVT_CODEPAGE_ISO_8859_7 = 28597, LIBEVT_CODEPAGE_ISO_8859_8 = 28598, LIBEVT_CODEPAGE_ISO_8859_9 = 28599, LIBEVT_CODEPAGE_ISO_8859_10 = 28600, LIBEVT_CODEPAGE_ISO_8859_11 = 28601, LIBEVT_CODEPAGE_ISO_8859_13 = 28603, LIBEVT_CODEPAGE_ISO_8859_14 = 28604, LIBEVT_CODEPAGE_ISO_8859_15 = 28605, LIBEVT_CODEPAGE_ISO_8859_16 = 28606, LIBEVT_CODEPAGE_KOI8_R = 20866, LIBEVT_CODEPAGE_KOI8_U = 21866, LIBEVT_CODEPAGE_WINDOWS_874 = 874, LIBEVT_CODEPAGE_WINDOWS_932 = 932, LIBEVT_CODEPAGE_WINDOWS_936 = 936, LIBEVT_CODEPAGE_WINDOWS_949 = 949, LIBEVT_CODEPAGE_WINDOWS_950 = 950, LIBEVT_CODEPAGE_WINDOWS_1250 = 1250, LIBEVT_CODEPAGE_WINDOWS_1251 = 1251, LIBEVT_CODEPAGE_WINDOWS_1252 = 1252, LIBEVT_CODEPAGE_WINDOWS_1253 = 1253, LIBEVT_CODEPAGE_WINDOWS_1254 = 1254, LIBEVT_CODEPAGE_WINDOWS_1255 = 1255, LIBEVT_CODEPAGE_WINDOWS_1256 = 1256, LIBEVT_CODEPAGE_WINDOWS_1257 = 1257, LIBEVT_CODEPAGE_WINDOWS_1258 = 1258 }; #endif /* !defined( HAVE_LOCAL_LIBEVT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEVT_INTERNAL_CODEPAGE_H ) */ libevt-20170120/libevt/evt_file_header.h0000664000175000017500000000423413040331672022102 0ustar00lordyestalordyesta00000000000000/* * The file header definition of a Windows Event Log (EVT) * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVT_FILE_HEADER_H ) #define _EVT_FILE_HEADER_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct evt_file_header evt_file_header_t; struct evt_file_header { /* The (header) size * Consists of 4 bytes */ uint8_t size[ 4 ]; /* Signature * Consists of 4 bytes * "LfLe" */ uint8_t signature[ 4 ]; /* The major version * Consists of 4 bytes */ uint8_t major_version[ 4 ]; /* The minor version * Consists of 4 bytes */ uint8_t minor_version[ 4 ]; /* The first (oldest) record offset * Consists of 4 bytes */ uint8_t first_record_offset[ 4 ]; /* The end of file record offset * Consists of 4 bytes */ uint8_t end_of_file_record_offset[ 4 ]; /* The last (newest) record number * Consists of 4 bytes */ uint8_t last_record_number[ 4 ]; /* The first (oldest) record number * Consists of 4 bytes */ uint8_t first_record_number[ 4 ]; /* The maximum file size * Consists of 4 bytes */ uint8_t maximum_file_size[ 4 ]; /* The file flags * Consists of 4 bytes */ uint8_t file_flags[ 4 ]; /* The retention * Consists of 4 bytes */ uint8_t retention[ 4 ]; /* Copy of the (header) size * Consists of 4 bytes */ uint8_t size_copy[ 4 ]; }; #if defined( __cplusplus ) } #endif #endif /* !defined( _EVT_FILE_HEADER_H ) */ libevt-20170120/libevt/libevt_libfdata.h0000664000175000017500000000313413040331672022106 0ustar00lordyestalordyesta00000000000000/* * The libfdata header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_LIBFDATA_H ) #define _LIBEVT_LIBFDATA_H #include /* Define HAVE_LOCAL_LIBFDATA for local use of libfdata */ #if defined( HAVE_LOCAL_LIBFDATA ) #include #include #include #include #include #include #include #include #include #include #include #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( _LIBEVT_LIBFDATA_H ) */ libevt-20170120/libevt/libevt_record_values.h0000664000175000017500000000755213040331672023205 0ustar00lordyestalordyesta00000000000000/* * Record values functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_RECORD_VALUES_H ) #define _LIBEVT_RECORD_VALUES_H #include #include #include "libevt_io_handle.h" #include "libevt_libbfio.h" #include "libevt_libcerror.h" #include "libevt_libfcache.h" #include "libevt_libfdata.h" #include "libevt_libfvalue.h" #if defined( __cplusplus ) extern "C" { #endif enum LIBEVT_RECORD_TYPES { LIBEVT_RECORD_TYPE_EVENT, LIBEVT_RECORD_TYPE_END_OF_FILE }; extern const uint8_t evt_end_of_file_record_signature1[ 4 ]; extern const uint8_t evt_end_of_file_record_signature2[ 4 ]; extern const uint8_t evt_end_of_file_record_signature3[ 4 ]; extern const uint8_t evt_end_of_file_record_signature4[ 4 ]; typedef struct libevt_record_values libevt_record_values_t; struct libevt_record_values { /* The offset */ off64_t offset; /* The (record) type */ uint8_t type; /* The (record) number */ uint32_t number; /* The creation time */ uint32_t creation_time; /* The written time */ uint32_t written_time; /* The event identifier */ uint32_t event_identifier; /* The event type */ uint16_t event_type; /* The event category */ uint16_t event_category; /* The source name */ libfvalue_value_t *source_name; /* The computer name */ libfvalue_value_t *computer_name; /* The user security identifier (SID) */ libfvalue_value_t *user_security_identifier; /* The strings */ libfvalue_value_t *strings; /* The data */ libfvalue_value_t *data; }; int libevt_record_values_initialize( libevt_record_values_t **record_values, libcerror_error_t **error ); int libevt_record_values_free( libevt_record_values_t **record_values, libcerror_error_t **error ); int libevt_record_values_clone( libevt_record_values_t **destination_record_values, libevt_record_values_t *source_record_values, libcerror_error_t **error ); ssize_t libevt_record_values_read( libevt_record_values_t *record_values, libbfio_handle_t *file_io_handle, libevt_io_handle_t *io_handle, off64_t *file_offset, uint8_t strict_mode, libcerror_error_t **error ); int libevt_record_values_read_event( libevt_record_values_t *record_values, uint8_t *record_values_data, size_t record_values_data_size, uint8_t strict_mode, libcerror_error_t **error ); int libevt_record_values_read_end_of_file( libevt_record_values_t *record_values, uint8_t *record_values_data, size_t record_values_data_size, libcerror_error_t **error ); int libevt_record_values_get_type( libevt_record_values_t *record_values, uint8_t *type, libcerror_error_t **error ); int libevt_record_values_read_element_data( libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *element, libfcache_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( _LIBEVT_RECORD_VALUES_H ) */ libevt-20170120/libevt/libevt_debug.h0000664000175000017500000000267713040331672021441 0ustar00lordyestalordyesta00000000000000/* * Debug functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_DEBUG_H ) #define _LIBEVT_DEBUG_H #include #include #include "libevt_libbfio.h" #include "libevt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) void libevt_debug_print_file_flags( uint32_t file_flags ); void libevt_debug_print_event_identifier_severity( uint32_t event_identifier_severity ); void libevt_debug_print_event_type( uint16_t event_type ); int libevt_debug_print_read_offsets( libbfio_handle_t *file_io_handle, libcerror_error_t **error ); #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEVT_DEBUG_H ) */ libevt-20170120/libevt/Makefile.am0000664000175000017500000000375713010061574020667 0ustar00lordyestalordyesta00000000000000AM_CPPFLAGS = \ -DLOCALEDIR=\"$(datadir)/locale\" \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_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@ lib_LTLIBRARIES = libevt.la libevt_la_SOURCES = \ evt_file_header.h \ evt_record.h \ libevt.c \ libevt_codepage.h \ libevt_debug.c libevt_debug.h \ libevt_definitions.h \ libevt_error.c libevt_error.h \ libevt_extern.h \ libevt_file.c libevt_file.h \ libevt_io_handle.c libevt_io_handle.h \ libevt_libbfio.h \ libevt_libcdata.h \ libevt_libcerror.h \ libevt_libclocale.h \ libevt_libcnotify.h \ libevt_libfcache.h \ libevt_libfdata.h \ libevt_libfdatetime.h \ libevt_libfvalue.h \ libevt_libfwnt.h \ libevt_libuna.h \ libevt_notify.c libevt_notify.h \ libevt_record.c libevt_record.h \ libevt_record_values.c libevt_record_values.h \ libevt_support.c libevt_support.h \ libevt_types.h \ libevt_unused.h libevt_la_LIBADD = \ @LIBCERROR_LIBADD@ \ @LIBCTHREADS_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@ libevt_la_LDFLAGS = -no-undefined -version-info 1:0:0 EXTRA_DIST = \ libevt_definitions.h.in \ libevt.rc \ libevt.rc.in MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f libevt_definitions.h /bin/rm -f libevt.rc /bin/rm -f Makefile splint: @echo "Running splint on libevt ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libevt_la_SOURCES) libevt-20170120/libevt/libevt_support.c0000664000175000017500000002245013040331672022051 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "libevt_definitions.h" #include "libevt_io_handle.h" #include "libevt_libbfio.h" #include "libevt_libcerror.h" #include "libevt_libclocale.h" #include "libevt_support.h" #if !defined( HAVE_LOCAL_LIBEVT ) /* Returns the library version */ const char *libevt_get_version( void ) { return( (const char *) LIBEVT_VERSION_STRING ); } /* Returns the access flags for reading */ int libevt_get_access_flags_read( void ) { return( (int) LIBEVT_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 libevt_get_codepage( int *codepage, libcerror_error_t **error ) { static char *function = "libevt_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 libevt_set_codepage( int codepage, libcerror_error_t **error ) { static char *function = "libevt_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_LIBEVT ) */ /* Determines if a file contains an EVT file signature * Returns 1 if true, 0 if not or -1 on error */ int libevt_check_file_signature( const char *filename, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libevt_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 = libevt_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 EVT file signature * Returns 1 if true, 0 if not or -1 on error */ int libevt_check_file_signature_wide( const wchar_t *filename, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libevt_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 ); 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_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 = libevt_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 EVT file signature using a Basic File IO (bfio) handle * Returns 1 if true, 0 if not or -1 on error */ int libevt_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { uint8_t signature[ 8 ]; static char *function = "libevt_check_file_signature_file_io_handle"; ssize_t read_count = 0; int file_io_handle_is_open = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } file_io_handle_is_open = libbfio_handle_is_open( file_io_handle, error ); if( file_io_handle_is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); goto on_error; } else if( file_io_handle_is_open == 0 ) { if( libbfio_handle_open( file_io_handle, LIBBFIO_OPEN_READ, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); goto on_error; } } if( libbfio_handle_seek_offset( file_io_handle, 0, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek file header offset: 0.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, signature, 8, error ); if( read_count != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read signature.", function ); goto on_error; } if( file_io_handle_is_open == 0 ) { if( libbfio_handle_close( file_io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close file.", function ); goto on_error; } } if( memory_compare( evt_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 ); } libevt-20170120/libevt/libevt_types.h0000664000175000017500000000302613040331672021504 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_INTERNAL_TYPES_H ) #define _LIBEVT_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBEVT for local use of libevt * The definitions in are copied here * for local use of libevt */ #if defined( HAVE_LOCAL_LIBEVT ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libevt_file {} libevt_file_t; typedef struct libevt_record {} libevt_record_t; #else typedef intptr_t libevt_file_t; typedef intptr_t libevt_record_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBEVT ) */ #endif /* !defined( _LIBEVT_INTERNAL_TYPES_H ) */ libevt-20170120/libevt/libevt_notify.h0000664000175000017500000000303513040331672021650 0ustar00lordyestalordyesta00000000000000/* * Notification functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_NOTIFY_H ) #define _LIBEVT_NOTIFY_H #include #include #include #include "libevt_extern.h" #include "libevt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBEVT ) LIBEVT_EXTERN \ void libevt_notify_set_verbose( int verbose ); LIBEVT_EXTERN \ int libevt_notify_set_stream( FILE *stream, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_notify_stream_open( const char *filename, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_notify_stream_close( libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBEVT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEVT_NOTIFY_H ) */ libevt-20170120/libevt/libevt.rc0000664000175000017500000000206313040342671020436 0ustar00lordyestalordyesta00000000000000#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 Windows Event Log (EVT) format\0" VALUE "FileVersion", "20170120" "\0" VALUE "InternalName", "libevt.dll\0" VALUE "LegalCopyright", "(C) 2011-2017, Joachim Metz \0" VALUE "OriginalFilename", "libevt.dll\0" VALUE "ProductName", "libevt\0" VALUE "ProductVersion", "20170120" "\0" VALUE "Comments", "For more information visit https://github.com/libyal/libevt/\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0409, 1200 END END libevt-20170120/libevt/libevt_record.h0000664000175000017500000001374313040331672021625 0ustar00lordyestalordyesta00000000000000/* * Record functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_RECORD_H ) #define _LIBEVT_RECORD_H #include #include #include "libevt_extern.h" #include "libevt_io_handle.h" #include "libevt_libbfio.h" #include "libevt_libcerror.h" #include "libevt_record_values.h" #include "libevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libevt_internal_record libevt_internal_record_t; struct libevt_internal_record { /* The IO handle */ libevt_io_handle_t *io_handle; /* The file IO handle */ libbfio_handle_t *file_io_handle; /* The (event) record values */ libevt_record_values_t *record_values; }; int libevt_record_initialize( libevt_record_t **record, libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libevt_record_values_t *record_values, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_free( libevt_record_t **record, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_offset( libevt_record_t *record, off64_t *offset, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_identifier( libevt_record_t *record, uint32_t *identifier, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_creation_time( libevt_record_t *record, uint32_t *posix_time, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_written_time( libevt_record_t *record, uint32_t *posix_time, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_event_identifier( libevt_record_t *record, uint32_t *event_identifier, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_event_type( libevt_record_t *record, uint16_t *event_type, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_event_category( libevt_record_t *record, uint16_t *event_category, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf8_source_name_size( libevt_record_t *record, size_t *utf8_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf8_source_name( libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf16_source_name_size( libevt_record_t *record, size_t *utf16_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf16_source_name( libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf8_computer_name_size( libevt_record_t *record, size_t *utf8_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf8_computer_name( libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf16_computer_name_size( libevt_record_t *record, size_t *utf16_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf16_computer_name( libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf8_user_security_identifier_size( libevt_record_t *record, size_t *utf8_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf8_user_security_identifier( libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf16_user_security_identifier_size( libevt_record_t *record, size_t *utf16_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf16_user_security_identifier( libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_number_of_strings( libevt_record_t *record, int *number_of_strings, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf8_string_size( libevt_record_t *record, int string_index, size_t *utf8_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf8_string( libevt_record_t *record, int string_index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf16_string_size( libevt_record_t *record, int string_index, size_t *utf16_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_utf16_string( libevt_record_t *record, int string_index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_data_size( libevt_record_t *record, size_t *data_size, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_record_get_data( libevt_record_t *record, uint8_t *data, size_t data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEVT_RECORD_H ) */ libevt-20170120/libevt/libevt_extern.h0000664000175000017500000000251513040331672021647 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_INTERNAL_EXTERN_H ) #define _LIBEVT_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBEVT for local use of libevt */ #if !defined( HAVE_LOCAL_LIBEVT ) /* If libtool DLL support is enabled set LIBEVT_DLL_EXPORT * before including libevt/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBEVT_DLL_EXPORT #endif #include #else #define LIBEVT_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBEVT ) */ #endif /* !defined( _LIBEVT_INTERNAL_EXTERN_H ) */ libevt-20170120/libevt/libevt.rc.in0000664000175000017500000000206513040331672021044 0ustar00lordyestalordyesta00000000000000#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 Windows Event Log (EVT) format\0" VALUE "FileVersion", "@VERSION@" "\0" VALUE "InternalName", "libevt.dll\0" VALUE "LegalCopyright", "(C) 2011-2017, Joachim Metz \0" VALUE "OriginalFilename", "libevt.dll\0" VALUE "ProductName", "libevt\0" VALUE "ProductVersion", "@VERSION@" "\0" VALUE "Comments", "For more information visit https://github.com/libyal/libevt/\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0409, 1200 END END libevt-20170120/libevt/libevt_error.h0000664000175000017500000000332713040331672021475 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_INTERNAL_ERROR_H ) #define _LIBEVT_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBEVT ) #include #endif #include "libevt_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBEVT ) LIBEVT_EXTERN \ void libevt_error_free( libevt_error_t **error ); LIBEVT_EXTERN \ int libevt_error_fprint( libevt_error_t *error, FILE *stream ); LIBEVT_EXTERN \ int libevt_error_sprint( libevt_error_t *error, char *string, size_t size ); LIBEVT_EXTERN \ int libevt_error_backtrace_fprint( libevt_error_t *error, FILE *stream ); LIBEVT_EXTERN \ int libevt_error_backtrace_sprint( libevt_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBEVT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEVT_INTERNAL_ERROR_H ) */ libevt-20170120/libevt/libevt_libuna.h0000664000175000017500000000322713040331672021615 0ustar00lordyestalordyesta00000000000000/* * The libuna header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_LIBUNA_H ) #define _LIBEVT_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( _LIBEVT_LIBUNA_H ) */ libevt-20170120/libevt/libevt_libfdatetime.h0000664000175000017500000000327213040331672022774 0ustar00lordyestalordyesta00000000000000/* * The libfdatetime header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_LIBFDATETIME_H ) #define _LIBEVT_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( _LIBEVT_LIBFDATETIME_H ) */ libevt-20170120/libevt/libevt_io_handle.c0000664000175000017500000010412013040331672022252 0ustar00lordyestalordyesta00000000000000/* * Input/Output (IO) handle functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libevt_debug.h" #include "libevt_codepage.h" #include "libevt_definitions.h" #include "libevt_io_handle.h" #include "libevt_libbfio.h" #include "libevt_libcdata.h" #include "libevt_libcerror.h" #include "libevt_libcnotify.h" #include "libevt_record_values.h" #include "libevt_unused.h" #include "evt_file_header.h" const char *evt_file_signature = "LfLe"; /* 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 libevt_io_handle_initialize( libevt_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libevt_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( libevt_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( libevt_io_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file.", function ); goto on_error; } ( *io_handle )->ascii_codepage = LIBEVT_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 libevt_io_handle_free( libevt_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libevt_io_handle_free"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( *io_handle != NULL ) { memory_free( *io_handle ); *io_handle = NULL; } return( 1 ); } /* Clears the IO handle * Returns 1 if successful or -1 on error */ int libevt_io_handle_clear( libevt_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libevt_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( libevt_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 = LIBEVT_CODEPAGE_WINDOWS_1252; return( 1 ); } /* Reads the file header * Returns 1 if successful or -1 on error */ int libevt_io_handle_read_file_header( libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t *first_record_offset, uint32_t *end_of_file_record_offset, libcerror_error_t **error ) { evt_file_header_t file_header; static char *function = "libevt_io_handle_read_file_header"; ssize_t read_count = 0; uint32_t size = 0; uint32_t size_copy = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; #endif if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( first_record_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first record offset.", function ); return( -1 ); } if( end_of_file_record_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid end of file record offset.", function ); return( -1 ); } if( libbfio_handle_get_size( file_io_handle, &( 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 ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading file header at offset: 0 (0x00000000)\n", function ); } #endif if( libbfio_handle_seek_offset( file_io_handle, 0, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek file header offset: 0.", function ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, (uint8_t *) &file_header, sizeof( evt_file_header_t ), error ); if( read_count != (ssize_t) sizeof( evt_file_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read file header.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: file header:\n", function ); libcnotify_print_data( (uint8_t *) &file_header, sizeof( evt_file_header_t ), 0 ); } #endif if( memory_compare( file_header.signature, evt_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( file_header.size, size ); byte_stream_copy_to_uint32_little_endian( file_header.major_version, io_handle->major_version ); byte_stream_copy_to_uint32_little_endian( file_header.minor_version, io_handle->minor_version ); byte_stream_copy_to_uint32_little_endian( file_header.first_record_offset, *first_record_offset ); byte_stream_copy_to_uint32_little_endian( file_header.end_of_file_record_offset, *end_of_file_record_offset ); byte_stream_copy_to_uint32_little_endian( file_header.file_flags, io_handle->file_flags ); byte_stream_copy_to_uint32_little_endian( file_header.size_copy, size_copy ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: size\t\t\t\t\t: %" PRIu32 "\n", function, size ); libcnotify_printf( "%s: signature\t\t\t\t: %c%c%c%c\n", function, file_header.signature[ 0 ], file_header.signature[ 1 ], file_header.signature[ 2 ], file_header.signature[ 3 ] ); libcnotify_printf( "%s: major version\t\t\t: %" PRIu32 "\n", function, io_handle->major_version ); libcnotify_printf( "%s: minor version\t\t\t: %" PRIu32 "\n", function, io_handle->minor_version ); libcnotify_printf( "%s: first record offset\t\t\t: 0x%08" PRIx32 "\n", function, *first_record_offset ); libcnotify_printf( "%s: end of file record offset\t\t: 0x%08" PRIx32 "\n", function, *end_of_file_record_offset ); byte_stream_copy_to_uint32_little_endian( file_header.last_record_number, value_32bit ); libcnotify_printf( "%s: last record number\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( file_header.first_record_number, value_32bit ); libcnotify_printf( "%s: first record number\t\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "%s: file flags\t\t\t\t: 0x%08" PRIx32 "\n", function, io_handle->file_flags ); libevt_debug_print_file_flags( io_handle->file_flags ); libcnotify_printf( "\n" ); byte_stream_copy_to_uint32_little_endian( file_header.retention, value_32bit ); libcnotify_printf( "%s: retention\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: size copy\t\t\t\t: %" PRIu32 "\n", function, size_copy ); libcnotify_printf( "\n" ); } #endif if( size != size_copy ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value mismatch for size and copy ( %" PRIu32 " != %" PRIu32 " ).\n", function, size, size_copy ); } #endif /* If the size does not match the header size assume size copy contains * the correct value for the next validation check */ if( size != sizeof( evt_file_header_t ) ) { size = size_copy; } io_handle->flags |= LIBEVT_IO_HANDLE_FLAG_IS_CORRUPTED; } if( (size_t) size != sizeof( evt_file_header_t ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: size: %" PRIu32 " does not match header size.\n", function, size ); } #endif io_handle->flags |= LIBEVT_IO_HANDLE_FLAG_IS_CORRUPTED; } return( 1 ); } /* Reads the records into the records array * Returns 1 if successful or -1 on error */ int libevt_io_handle_read_records( libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t first_record_offset, uint32_t end_of_file_record_offset, libfdata_list_t *records_list, off64_t *last_record_offset, libcerror_error_t **error ) { libevt_record_values_t *record_values = NULL; static char *function = "libevt_io_handle_read_records"; off64_t file_offset = 0; ssize_t read_count = 0; uint32_t record_iterator = 0; uint8_t record_type = 0; int element_index = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( last_record_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid last record offset.", function ); return( -1 ); } file_offset = (off64_t) first_record_offset; if( ( file_offset < (off64_t) sizeof( evt_file_header_t ) ) || ( (size64_t) file_offset >= io_handle->file_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: file offset value out of bounds.", function ); goto on_error; } if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek record offset: %" PRIi64 ".", function, file_offset ); goto on_error; } do { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading record: %" PRIu32 " at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, record_iterator, file_offset, file_offset ); } #endif if( libevt_record_values_initialize( &record_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record values.", function ); goto on_error; } *last_record_offset = file_offset; read_count = libevt_record_values_read( record_values, file_io_handle, io_handle, &file_offset, 1, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record: %" PRIu32 ".", function, record_iterator ); goto on_error; } if( *last_record_offset > file_offset ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: wrapped at offset: 0x%08" PRIx64 ".\n", function, *last_record_offset ); } #endif io_handle->has_wrapped = 1; } record_type = record_values->type; if( record_type == LIBEVT_RECORD_TYPE_EVENT ) { if( libfdata_list_append_element( records_list, &element_index, 0, *last_record_offset, (size64_t) read_count, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append record to records list.", function ); goto on_error; } } if( libevt_record_values_free( &record_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free record values.", function ); goto on_error; } if( record_type == LIBEVT_RECORD_TYPE_END_OF_FILE ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: end-of-file record found at offset: 0x%08" PRIx64 ".\n", function, file_offset ); } #endif break; } if( ( file_offset > (off64_t) end_of_file_record_offset ) && ( file_offset < (off64_t) ( end_of_file_record_offset + read_count ) ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: file offset: 0x%08" PRIx64 " exceeds end-of-file offset: 0x%08" PRIx64 ".\n", function, file_offset, end_of_file_record_offset ); } #endif break; } record_iterator++; } while( record_type != LIBEVT_RECORD_TYPE_END_OF_FILE ); if( record_type == LIBEVT_RECORD_TYPE_END_OF_FILE ) { if( *last_record_offset != (off64_t) end_of_file_record_offset ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in end of file record offset ( %" PRIi64 " != %" PRIu32 " ).\n", function, *last_record_offset, end_of_file_record_offset ); } #endif io_handle->flags |= LIBEVT_IO_HANDLE_FLAG_IS_CORRUPTED; } *last_record_offset += read_count; } if( ( io_handle->has_wrapped != 0 ) && ( ( io_handle->flags & LIBEVT_FILE_FLAG_HAS_WRAPPED ) == 0 ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: file has wrapped but file flags indicate otherwise.\n", function ); } #endif io_handle->flags |= LIBEVT_IO_HANDLE_FLAG_IS_CORRUPTED; } return( 1 ); on_error: if( record_values != NULL ) { libevt_record_values_free( &record_values, NULL ); } return( -1 ); } /* Scans for the end-of-file record and adjusts the offsets accordingly * Returns 1 if successful, 0 if not or -1 on error */ int libevt_io_handle_end_of_file_record_scan( libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t *first_record_offset, uint32_t *end_of_file_record_offset, libcerror_error_t **error ) { uint8_t *scan_block = NULL; static char *function = "libevt_io_handle_end_of_file_record_scan"; off64_t file_offset = 0; off64_t initial_file_offset = 0; size_t read_size = 0; size_t scan_block_offset = 0; size_t scan_block_size = 8192; ssize_t read_count = 0; uint8_t scan_state = LIBEVT_RECOVER_SCAN_STATE_START; uint8_t scan_has_wrapped = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( first_record_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first record offset.", function ); return( -1 ); } if( end_of_file_record_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid end of file record offset.", function ); return( -1 ); } scan_block = (uint8_t *) memory_allocate( sizeof( uint8_t ) * scan_block_size ); if( scan_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create scan block.", function ); goto on_error; } /* If the file has wrapped start looking for the end-of-file record after the end-of-file record offset */ file_offset = (off64_t) *end_of_file_record_offset; if( ( file_offset < (off64_t) sizeof( evt_file_header_t ) ) || ( (size64_t) file_offset >= io_handle->file_size ) ) { file_offset = (off64_t) sizeof( evt_file_header_t ); } initial_file_offset = file_offset; if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek scan block offset: %" PRIi64 ".", function, file_offset ); goto on_error; } do { if( ( (size64_t) file_offset + scan_block_size ) > io_handle->file_size ) { read_size = (size_t) ( io_handle->file_size - file_offset ); } else { read_size = scan_block_size; } read_count = libbfio_handle_read_buffer( file_io_handle, scan_block, read_size, error ); if( read_count != (ssize_t) read_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read scan block at offset: %" PRIi64 ".", function, file_offset ); goto on_error; } file_offset += read_count; for( scan_block_offset = 0; scan_block_offset < read_size; scan_block_offset += 4 ) { if( scan_state == LIBEVT_RECOVER_SCAN_STATE_START ) { if( memory_compare( &( scan_block[ scan_block_offset ] ), evt_end_of_file_record_signature1, 4 ) == 0 ) { scan_state = LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE1; } } else if( scan_state == LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE1 ) { if( memory_compare( &( scan_block[ scan_block_offset ] ), evt_end_of_file_record_signature2, 4 ) == 0 ) { scan_state = LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE2; } else { scan_state = LIBEVT_RECOVER_SCAN_STATE_START; } } else if( scan_state == LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE2 ) { if( memory_compare( &( scan_block[ scan_block_offset ] ), evt_end_of_file_record_signature3, 4 ) == 0 ) { scan_state = LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE3; } else { scan_state = LIBEVT_RECOVER_SCAN_STATE_START; } } else if( scan_state == LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE3 ) { if( memory_compare( &( scan_block[ scan_block_offset ] ), evt_end_of_file_record_signature4, 4 ) == 0 ) { *end_of_file_record_offset = (uint32_t) ( file_offset - read_count + scan_block_offset - 16 ); scan_state = LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE4; } else { scan_state = LIBEVT_RECOVER_SCAN_STATE_START; } } else if( scan_state == LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE4 ) { if( memory_compare( &( scan_block[ scan_block_offset ] ), evt_file_signature, 4 ) == 0 ) { *first_record_offset = (uint32_t) ( file_offset - read_count + scan_block_offset - 4 ); scan_state = LIBEVT_RECOVER_SCAN_STATE_FOUND_RECORD_SIGNATURE; break; } } } if( scan_state == LIBEVT_RECOVER_SCAN_STATE_FOUND_RECORD_SIGNATURE ) { break; } if( (size64_t) file_offset >= io_handle->file_size ) { if( libbfio_handle_seek_offset( file_io_handle, (off64_t) sizeof( evt_file_header_t ), SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek scan block offset: %" PRIzd ".", function, sizeof( evt_file_header_t ) ); goto on_error; } file_offset = (off64_t) sizeof( evt_file_header_t ); scan_has_wrapped = 1; } } while( ( scan_has_wrapped == 0 ) || ( file_offset < initial_file_offset ) ); memory_free( scan_block ); scan_block = NULL; if( scan_state == LIBEVT_RECOVER_SCAN_STATE_FOUND_RECORD_SIGNATURE ) { return( 1 ); } return( 0 ); on_error: if( scan_block != NULL ) { memory_free( scan_block ); } return( -1 ); } /* Scans for the event record and adds them to the recovered records array * Returns 1 if successful, 0 if not or -1 on error */ int libevt_io_handle_event_record_scan( libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, off64_t file_offset, size64_t size, libfdata_list_t *recovered_records_list, libcerror_error_t **error ) { libevt_record_values_t *record_values = NULL; uint8_t *scan_block = NULL; static char *function = "libevt_io_handle_event_record_scan"; off64_t record_offset = 0; size_t read_size = 0; size_t scan_block_offset = 0; size_t scan_block_size = 8192; ssize_t read_count = 0; int element_index = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( file_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid file offset value less than zero.", function ); return( -1 ); } if( size > (off64_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 ); } scan_block = (uint8_t *) memory_allocate( sizeof( uint8_t ) * scan_block_size ); if( scan_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create scan block.", function ); goto on_error; } while( size > 0 ) { if( libbfio_handle_seek_offset( file_io_handle, file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek scan block offset: %" PRIi64 ".", function, file_offset ); goto on_error; } if( scan_block_size > size ) { read_size = (size_t) size; } else { read_size = scan_block_size; } read_count = libbfio_handle_read_buffer( file_io_handle, scan_block, read_size, error ); if( read_count != (ssize_t) read_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read scan block at offset: %" PRIi64 ".", function, file_offset ); goto on_error; } scan_block_offset = 0; while( scan_block_offset < read_size ) { if( memory_compare( &( scan_block[ scan_block_offset ] ), evt_file_signature, 4 ) != 0 ) { scan_block_offset += 4; continue; } record_offset = file_offset + scan_block_offset - 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading recovered record at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, record_offset, record_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, record_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek record offset: %" PRIi64 ".", function, record_offset ); goto on_error; } if( record_values == NULL ) { if( libevt_record_values_initialize( &record_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record values.", function ); goto on_error; } } read_count = libevt_record_values_read( record_values, file_io_handle, io_handle, &record_offset, 0, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record at offset: %" PRIi64 ".", function, record_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif libcerror_error_free( error ); scan_block_offset += 4; continue; } if( record_values->type == LIBEVT_RECORD_TYPE_EVENT ) { if( libfdata_list_append_element( recovered_records_list, &element_index, 0, file_offset + scan_block_offset - 4, (size64_t) read_count, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append recovered record to records list.", function ); goto on_error; } } if( libevt_record_values_free( &record_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free record values.", function ); goto on_error; } scan_block_offset += read_count - 4; if( ( scan_block_offset + read_count - 4 ) > read_size ) { break; } } file_offset += scan_block_offset; size -= scan_block_offset; } if( record_values != NULL ) { if( libevt_record_values_free( &record_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free record values.", function ); goto on_error; } } memory_free( scan_block ); scan_block = NULL; return( 1 ); on_error: if( record_values != NULL ) { libevt_record_values_free( &record_values, NULL ); } if( scan_block != NULL ) { memory_free( scan_block ); } return( -1 ); } /* Tries to recover records * Returns 1 if successful or -1 on error */ int libevt_io_handle_recover_records( libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t first_record_offset, uint32_t end_of_file_record_offset, off64_t last_record_offset, libfdata_list_t *records_list, libfdata_list_t *recovered_records_list, libcerror_error_t **error ) { static char *function = "libevt_io_handle_recover_records"; int result = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( last_record_offset == (off64_t) first_record_offset ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: no records found at specified offsets scanning for end-of-file record.\n", function ); } #endif io_handle->flags |= LIBEVT_IO_HANDLE_FLAG_IS_CORRUPTED; result = libevt_io_handle_end_of_file_record_scan( io_handle, file_io_handle, &first_record_offset, &end_of_file_record_offset, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to scan for end of file record.", function ); return( -1 ); } else if( result != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: end-of-file record found at offset: 0x%08" PRIx64 ".\n", function, end_of_file_record_offset ); } #endif result = libevt_io_handle_read_records( io_handle, file_io_handle, first_record_offset, end_of_file_record_offset, records_list, &last_record_offset, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } #endif libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read records.", 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 { first_record_offset = (uint32_t) sizeof( evt_file_header_t ); last_record_offset = (off64_t) sizeof( evt_file_header_t ); } } if( io_handle->has_wrapped == 0 ) { if( first_record_offset > (uint32_t) sizeof( evt_file_header_t ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: scanning unused space before records at offset: 0x%08" PRIzd " - 0x%08" PRIx32 "\n", function, sizeof( evt_file_header_t ), first_record_offset ); } #endif if( libevt_io_handle_event_record_scan( io_handle, file_io_handle, (off64_t) sizeof( evt_file_header_t ), (size64_t) ( first_record_offset - sizeof( evt_file_header_t ) ), recovered_records_list, error ) != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } #endif libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to scan for event records.", 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( last_record_offset < (off64_t) io_handle->file_size ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( last_record_offset > (off64_t) sizeof( evt_file_header_t ) ) { libcnotify_printf( "%s: scanning unused space after records at offset: 0x%08" PRIx64 " - 0x%08" PRIx64 "\n", function, last_record_offset, io_handle->file_size ); } else { libcnotify_printf( "%s: scanning unused space after header at offset: 0x%08" PRIx64 " - 0x%08" PRIx64 "\n", function, last_record_offset, io_handle->file_size ); } } #endif if( libevt_io_handle_event_record_scan( io_handle, file_io_handle, last_record_offset, io_handle->file_size - last_record_offset, recovered_records_list, error ) != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } #endif libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to scan for event records.", 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( last_record_offset < (off64_t) first_record_offset ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: scanning unused space between records at offset: 0x%08" PRIx64 " - 0x%08" PRIx32 "\n", function, last_record_offset, first_record_offset ); } #endif if( libevt_io_handle_event_record_scan( io_handle, file_io_handle, last_record_offset, (size64_t) first_record_offset - last_record_offset, recovered_records_list, error ) != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } #endif libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to scan for event records.", 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 ); } } } return( 1 ); } libevt-20170120/libevt/libevt_definitions.h0000664000175000017500000000622013040342671022653 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_INTERNAL_DEFINITIONS_H ) #define _LIBEVT_INTERNAL_DEFINITIONS_H #include #include #define LIBEVT_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBEVT_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* Define HAVE_LOCAL_LIBEVT for local use of libevt */ #if !defined( HAVE_LOCAL_LIBEVT ) #include /* The definitions in are copied here * for local use of libevt */ #else #define LIBEVT_VERSION 20170120 /* The version string */ #define LIBEVT_VERSION_STRING "20170120" /* 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 LIBEVT_ACCESS_FLAGS { LIBEVT_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBEVT_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBEVT_OPEN_READ ( LIBEVT_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBEVT_OPEN_WRITE ( LIBEVT_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBEVT_OPEN_READ_WRITE ( LIBEVT_ACCESS_FLAG_READ | LIBEVT_ACCESS_FLAG_WRITE ) /* The event type definitions */ enum LIBEVT_EVENT_TYPES { LIBEVT_EVENT_TYPE_ERROR = 0x0001, LIBEVT_EVENT_TYPE_WARNING = 0x0002, LIBEVT_EVENT_TYPE_INFORMATION = 0x0004, LIBEVT_EVENT_TYPE_AUDIT_SUCCESS = 0x0008, LIBEVT_EVENT_TYPE_AUDIT_FAILURE = 0x0010 }; /* The event file flags */ enum LIBEVT_FILE_FLAGS { LIBEVT_FILE_FLAG_IS_DIRTY = 0x00000001UL, LIBEVT_FILE_FLAG_HAS_WRAPPED = 0x00000002UL, LIBEVT_FILE_FLAG_IS_FULL = 0x00000004UL, LIBEVT_FILE_FLAG_ARCHIVE = 0x00000008UL }; #endif /* The IO handle flags */ enum LIBEVT_IO_HANDLE_FLAGS { /* The file is corrupted */ LIBEVT_IO_HANDLE_FLAG_IS_CORRUPTED = 0x01 }; /* The record flags */ enum LIBEVT_RECORD_FLAGS { LIBEVT_RECORD_FLAG_NON_MANAGED_FILE_IO_HANDLE = 0x00, LIBEVT_RECORD_FLAG_MANAGED_FILE_IO_HANDLE = 0x01, }; /* The recover scan states */ enum LIBEVT_RECOVER_SCAN_STATES { LIBEVT_RECOVER_SCAN_STATE_START, LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE1, LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE2, LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE3, LIBEVT_RECOVER_SCAN_STATE_FOUND_EOF_SIGNATURE4, LIBEVT_RECOVER_SCAN_STATE_FOUND_RECORD_SIGNATURE, }; #define LIBEVT_MAXIMUM_CACHE_ENTRIES_RECORDS 16 #endif libevt-20170120/libevt/libevt_debug.c0000664000175000017500000001047213040331672021424 0ustar00lordyestalordyesta00000000000000/* * Debug functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libevt_debug.h" #include "libevt_definitions.h" #include "libevt_libbfio.h" #include "libevt_libcerror.h" #include "libevt_libcnotify.h" #if defined( HAVE_DEBUG_OUTPUT ) /* Prints the file flags */ void libevt_debug_print_file_flags( uint32_t file_flags ) { if( ( file_flags & LIBEVT_FILE_FLAG_IS_DIRTY ) != 0 ) { libcnotify_printf( "Is dirty (ELF_LOGFILE_HEADER_DIRTY)\n" ); } if( ( file_flags & LIBEVT_FILE_FLAG_HAS_WRAPPED ) != 0 ) { libcnotify_printf( "Has wrapped (ELF_LOGFILE_HEADER_WRAP)\n" ); } if( ( file_flags & LIBEVT_FILE_FLAG_IS_FULL ) != 0 ) { libcnotify_printf( "Is full (ELF_LOGFILE_LOGFULL_WRITTEN)\n" ); } if( ( file_flags & LIBEVT_FILE_FLAG_ARCHIVE ) != 0 ) { libcnotify_printf( "Should be archived (ELF_LOGFILE_ARCHIVE_SET)\n" ); } } /* Prints the event identifier severity */ void libevt_debug_print_event_identifier_severity( uint32_t event_identifier_severity ) { event_identifier_severity >>= 30; switch( event_identifier_severity ) { case 0: libcnotify_printf( "Success" ); break; case 1: libcnotify_printf( "Informational" ); break; case 2: libcnotify_printf( "Warning" ); break; case 3: libcnotify_printf( "Error" ); break; } } /* Prints the event type */ void libevt_debug_print_event_type( uint16_t event_type ) { switch( event_type ) { case LIBEVT_EVENT_TYPE_ERROR: libcnotify_printf( "Error event" ); break; case LIBEVT_EVENT_TYPE_WARNING: libcnotify_printf( "Warning event" ); break; case LIBEVT_EVENT_TYPE_INFORMATION: libcnotify_printf( "Information event" ); break; case LIBEVT_EVENT_TYPE_AUDIT_SUCCESS: libcnotify_printf( "Success Audit event" ); break; case LIBEVT_EVENT_TYPE_AUDIT_FAILURE: libcnotify_printf( "Failure Audit event" ); break; default: libcnotify_printf( "(Unknown)" ); } } /* Prints the read offsets * Returns 1 if successful or -1 on error */ int libevt_debug_print_read_offsets( libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libevt_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 + 1 ) ); return( -1 ); } libcnotify_printf( "%08" PRIi64 " ( 0x%08" PRIx64 " ) - %08" PRIi64 " ( 0x%08" PRIx64 " ) size: %" PRIu64 "\n", offset, offset, offset + size, offset + size, size ); } libcnotify_printf( "\n" ); return( 1 ); } #endif libevt-20170120/libevt/libevt_file.h0000664000175000017500000001062313040331672021260 0ustar00lordyestalordyesta00000000000000/* * File functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_FILE_H ) #define _LIBEVT_FILE_H #include #include #include "libevt_extern.h" #include "libevt_io_handle.h" #include "libevt_libbfio.h" #include "libevt_libcerror.h" #include "libevt_libfcache.h" #include "libevt_libfdata.h" #include "libevt_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libevt_internal_file libevt_internal_file_t; struct libevt_internal_file { /* The IO handle */ libevt_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 records list */ libfdata_list_t *records_list; /* The recovered records list */ libfdata_list_t *recovered_records_list; /* The records cache */ libfcache_cache_t *records_cache; }; LIBEVT_EXTERN \ int libevt_file_initialize( libevt_file_t **file, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_free( libevt_file_t **file, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_signal_abort( libevt_file_t *file, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_open( libevt_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBEVT_EXTERN \ int libevt_file_open_wide( libevt_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ LIBEVT_EXTERN \ int libevt_file_open_file_io_handle( libevt_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_close( libevt_file_t *file, libcerror_error_t **error ); int libevt_file_open_read( libevt_internal_file_t *internal_file, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_is_corrupted( libevt_file_t *file, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_get_ascii_codepage( libevt_file_t *file, int *ascii_codepage, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_set_ascii_codepage( libevt_file_t *file, int ascii_codepage, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_get_format_version( libevt_file_t *file, uint32_t *major_version, uint32_t *minor_version, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_get_version( libevt_file_t *file, uint32_t *major_version, uint32_t *minor_version, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_get_flags( libevt_file_t *file, uint32_t *flags, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_get_number_of_records( libevt_file_t *file, int *number_of_records, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_get_record( libevt_file_t *file, int record_index, libevt_record_t **record, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_get_number_of_recovered_records( libevt_file_t *file, int *number_of_records, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_file_get_recovered_record( libevt_file_t *file, int record_index, libevt_record_t **record, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEVT_FILE_H ) */ libevt-20170120/libevt/libevt_error.c0000664000175000017500000000550413040331672021467 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libevt_error.h" #include "libevt_libcerror.h" #if !defined( HAVE_LOCAL_LIBEVT ) /* Free an error and its elements */ void libevt_error_free( libevt_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 libevt_error_fprint( libevt_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 libevt_error_sprint( libevt_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 libevt_error_backtrace_fprint( libevt_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 libevt_error_backtrace_sprint( libevt_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_LIBEVT ) */ libevt-20170120/libevt/libevt_libcnotify.h0000664000175000017500000000265513040331672022511 0ustar00lordyestalordyesta00000000000000/* * The internal libcnotify header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_LIBCNOTIFY_H ) #define _LIBEVT_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( _LIBEVT_LIBCNOTIFY_H ) */ libevt-20170120/libevt/libevt_libclocale.h0000664000175000017500000000266013040331672022434 0ustar00lordyestalordyesta00000000000000/* * The internal libclocale header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_LIBCLOCALE_H ) #define _LIBEVT_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( _LIBEVT_LIBCLOCALE_H ) */ libevt-20170120/libevt/libevt_file.c0000664000175000017500000011071413040331672021255 0ustar00lordyestalordyesta00000000000000/* * File functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "libevt_codepage.h" #include "libevt_debug.h" #include "libevt_definitions.h" #include "libevt_io_handle.h" #include "libevt_file.h" #include "libevt_libbfio.h" #include "libevt_libcerror.h" #include "libevt_libcnotify.h" #include "libevt_libfcache.h" #include "libevt_libfdata.h" #include "libevt_record.h" #include "libevt_record_values.h" /* Creates a file * Make sure the value file is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libevt_file_initialize( libevt_file_t **file, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_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( libevt_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( libevt_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( libevt_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( libfdata_list_initialize( &( internal_file->records_list ), (intptr_t *) internal_file->io_handle, NULL, NULL, (int (*)(intptr_t *, intptr_t *, libfdata_list_element_t *, libfcache_cache_t *, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libevt_record_values_read_element_data, 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 records list.", function ); goto on_error; } if( libfdata_list_initialize( &( internal_file->recovered_records_list ), (intptr_t *) internal_file->io_handle, NULL, NULL, (int (*)(intptr_t *, intptr_t *, libfdata_list_element_t *, libfcache_cache_t *, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libevt_record_values_read_element_data, 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 recovered records list.", function ); goto on_error; } if( libfcache_cache_initialize( &( internal_file->records_cache ), LIBEVT_MAXIMUM_CACHE_ENTRIES_RECORDS, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create records cache.", function ); goto on_error; } *file = (libevt_file_t *) internal_file; return( 1 ); on_error: if( internal_file != NULL ) { if( internal_file->recovered_records_list != NULL ) { libfdata_list_free( &( internal_file->recovered_records_list ), NULL ); } if( internal_file->records_list != NULL ) { libfdata_list_free( &( internal_file->records_list ), NULL ); } if( internal_file->io_handle != NULL ) { libevt_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 libevt_file_free( libevt_file_t **file, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_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 = (libevt_internal_file_t *) *file; if( internal_file->file_io_handle != NULL ) { if( libevt_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( libfcache_cache_free( &( internal_file->records_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free records cache.", function ); result = -1; } if( libfdata_list_free( &( internal_file->recovered_records_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free recovered records list.", function ); result = -1; } if( libfdata_list_free( &( internal_file->records_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free records list.", function ); result = -1; } if( libevt_io_handle_free( &( internal_file->io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free IO handle.", function ); result = -1; } memory_free( internal_file ); } return( result ); } /* Signals the file to abort its current activity * Returns 1 if successful or -1 on error */ int libevt_file_signal_abort( libevt_file_t *file, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_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 = (libevt_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 libevt_file_open( libevt_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_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 = (libevt_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 & LIBEVT_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBEVT_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 & LIBEVT_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( libevt_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 libevt_file_open_wide( libevt_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_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 = (libevt_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 & LIBEVT_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBEVT_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 & LIBEVT_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( libevt_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 libevt_file_open_file_io_handle( libevt_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_file_open_file_io_handle"; int bfio_access_flags = 0; int file_io_handle_is_open = 0; int file_io_handle_opened_in_library = 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 = (libevt_internal_file_t *) file; if( internal_file->file_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - file IO handle already set.", function ); return( -1 ); } if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( ( ( access_flags & LIBEVT_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBEVT_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 & LIBEVT_ACCESS_FLAG_WRITE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: write access currently not supported.", function ); return( -1 ); } if( ( access_flags & LIBEVT_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 determine if file IO handle is open.", 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; } file_io_handle_opened_in_library = 1; } if( libevt_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; internal_file->file_io_handle_opened_in_library = file_io_handle_opened_in_library; return( 1 ); on_error: if( file_io_handle_opened_in_library != 0 ) { libbfio_handle_close( file_io_handle, error ); } return( -1 ); } /* Closes a file * Returns 0 if successful or -1 on error */ int libevt_file_close( libevt_file_t *file, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_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 = (libevt_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( libevt_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( libevt_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_list_empty( internal_file->records_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty records list.", function ); result = -1; } if( libfdata_list_empty( internal_file->recovered_records_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty recovered records list.", function ); result = -1; } if( libfcache_cache_empty( internal_file->records_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty records cache.", function ); result = -1; } return( result ); } /* Opens a file for reading * Returns 1 if successful or -1 on error */ int libevt_file_open_read( libevt_internal_file_t *internal_file, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libevt_file_open_read"; off64_t last_record_offset = 0; uint32_t end_of_file_record_offset = 0; uint32_t first_record_offset = 0; int result_record_read = 0; int result_record_recovery = 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->io_handle->abort != 0 ) { internal_file->io_handle->abort = 0; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading file header:\n" ); } #endif if( libevt_io_handle_read_file_header( internal_file->io_handle, file_io_handle, &first_record_offset, &end_of_file_record_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read file header.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading records:\n" ); } #endif result_record_read = libevt_io_handle_read_records( internal_file->io_handle, file_io_handle, first_record_offset, end_of_file_record_offset, internal_file->records_list, &last_record_offset, error ); if( result_record_read != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read records.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif } if( internal_file->io_handle->abort == 0 ) { result_record_recovery = libevt_io_handle_recover_records( internal_file->io_handle, file_io_handle, first_record_offset, end_of_file_record_offset, last_record_offset, internal_file->records_list, internal_file->recovered_records_list, error ); if( result_record_recovery != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( result_record_read != 1 ) { libcerror_error_free( error ); } #endif libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to recover records.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif } } if( ( result_record_read != 1 ) && ( result_record_recovery != 1 ) ) { return( -1 ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } if( internal_file->io_handle->abort != 0 ) { internal_file->io_handle->abort = 0; } return( 1 ); } /* Determine if the file corrupted * Returns 1 if corrupted, 0 if not or -1 on error */ int libevt_file_is_corrupted( libevt_file_t *file, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_file_is_corrupted"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libevt_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( ( internal_file->io_handle->flags & LIBEVT_IO_HANDLE_FLAG_IS_CORRUPTED ) != 0 ) { return( 1 ); } return( 0 ); } /* Retrieves the file ASCII codepage * Returns 1 if successful or -1 on error */ int libevt_file_get_ascii_codepage( libevt_file_t *file, int *ascii_codepage, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_file_get_ascii_codepage"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libevt_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( ascii_codepage == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid ASCII codepage.", function ); return( -1 ); } *ascii_codepage = internal_file->io_handle->ascii_codepage; return( 1 ); } /* Sets the file ASCII codepage * Returns 1 if successful or -1 on error */ int libevt_file_set_ascii_codepage( libevt_file_t *file, int ascii_codepage, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_file_set_ascii_codepage"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libevt_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( ( ascii_codepage != LIBEVT_CODEPAGE_ASCII ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_874 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_932 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_936 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_949 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_950 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_1250 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_1251 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_1252 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_1253 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_1254 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_1255 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_1256 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_1257 ) && ( ascii_codepage != LIBEVT_CODEPAGE_WINDOWS_1258 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported ASCII codepage.", function ); return( -1 ); } internal_file->io_handle->ascii_codepage = ascii_codepage; return( 1 ); } /* Retrieves the format version * Returns 1 if successful or -1 on error */ int libevt_file_get_format_version( libevt_file_t *file, uint32_t *major_version, uint32_t *minor_version, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_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 = (libevt_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( major_version == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid major version.", function ); return( -1 ); } if( minor_version == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid minor version.", function ); return( -1 ); } *major_version = internal_file->io_handle->major_version; *minor_version = internal_file->io_handle->minor_version; return( 1 ); } /* Retrieves the version * Returns 1 if successful or -1 on error */ int libevt_file_get_version( libevt_file_t *file, uint32_t *major_version, uint32_t *minor_version, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_file_get_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 = (libevt_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( major_version == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid major version.", function ); return( -1 ); } if( minor_version == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid minor version.", function ); return( -1 ); } *major_version = internal_file->io_handle->major_version; *minor_version = internal_file->io_handle->minor_version; return( 1 ); } /* Retrieves the flags * Returns 1 if successful or -1 on error */ int libevt_file_get_flags( libevt_file_t *file, uint32_t *flags, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_file_get_flags"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libevt_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( flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid flags.", function ); return( -1 ); } *flags = internal_file->io_handle->file_flags; return( 1 ); } /* Retrieves the number of records * Returns 1 if successful or -1 on error */ int libevt_file_get_number_of_records( libevt_file_t *file, int *number_of_records, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_file_get_number_of_records"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libevt_internal_file_t *) file; if( libfdata_list_get_number_of_elements( internal_file->records_list, number_of_records, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from records list.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific record * Returns 1 if successful or -1 on error */ int libevt_file_get_record( libevt_file_t *file, int record_index, libevt_record_t **record, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; libevt_record_values_t *record_values = NULL; static char *function = "libevt_file_get_record"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libevt_internal_file_t *) file; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( libfdata_list_get_element_value_by_index( internal_file->records_list, (intptr_t *) internal_file->file_io_handle, internal_file->records_cache, record_index, (intptr_t **) &record_values, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record values: %d.", function, record_index ); return( -1 ); } if( libevt_record_initialize( record, internal_file->io_handle, internal_file->file_io_handle, record_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of recovered records * Returns 1 if successful or -1 on error */ int libevt_file_get_number_of_recovered_records( libevt_file_t *file, int *number_of_records, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; static char *function = "libevt_file_get_number_of_recovered_records"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libevt_internal_file_t *) file; if( libfdata_list_get_number_of_elements( internal_file->recovered_records_list, number_of_records, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from recovered records list.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific recovered record * Returns 1 if successful or -1 on error */ int libevt_file_get_recovered_record( libevt_file_t *file, int record_index, libevt_record_t **record, libcerror_error_t **error ) { libevt_internal_file_t *internal_file = NULL; libevt_record_values_t *record_values = NULL; static char *function = "libevt_file_get_recovered_record"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libevt_internal_file_t *) file; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( libfdata_list_get_element_value_by_index( internal_file->recovered_records_list, (intptr_t *) internal_file->file_io_handle, internal_file->records_cache, record_index, (intptr_t **) &record_values, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recovered record values: %d.", function, record_index ); return( -1 ); } if( libevt_record_initialize( record, internal_file->io_handle, internal_file->file_io_handle, record_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record.", function ); return( -1 ); } return( 1 ); } libevt-20170120/libevt/Makefile.in0000664000175000017500000010541513040342657020701 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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 = libevt ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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 = libevt_definitions.h libevt.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) libevt_la_DEPENDENCIES = am_libevt_la_OBJECTS = libevt.lo libevt_debug.lo libevt_error.lo \ libevt_file.lo libevt_io_handle.lo libevt_notify.lo \ libevt_record.lo libevt_record_values.lo libevt_support.lo libevt_la_OBJECTS = $(am_libevt_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 = libevt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libevt_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__depfiles_maybe = depfiles 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 = $(libevt_la_SOURCES) DIST_SOURCES = $(libevt_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__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)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libevt.rc.in \ $(srcdir)/libevt_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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_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@ lib_LTLIBRARIES = libevt.la libevt_la_SOURCES = \ evt_file_header.h \ evt_record.h \ libevt.c \ libevt_codepage.h \ libevt_debug.c libevt_debug.h \ libevt_definitions.h \ libevt_error.c libevt_error.h \ libevt_extern.h \ libevt_file.c libevt_file.h \ libevt_io_handle.c libevt_io_handle.h \ libevt_libbfio.h \ libevt_libcdata.h \ libevt_libcerror.h \ libevt_libclocale.h \ libevt_libcnotify.h \ libevt_libfcache.h \ libevt_libfdata.h \ libevt_libfdatetime.h \ libevt_libfvalue.h \ libevt_libfwnt.h \ libevt_libuna.h \ libevt_notify.c libevt_notify.h \ libevt_record.c libevt_record.h \ libevt_record_values.c libevt_record_values.h \ libevt_support.c libevt_support.h \ libevt_types.h \ libevt_unused.h libevt_la_LIBADD = \ @LIBCERROR_LIBADD@ \ @LIBCTHREADS_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@ libevt_la_LDFLAGS = -no-undefined -version-info 1:0:0 EXTRA_DIST = \ libevt_definitions.h.in \ libevt.rc \ libevt.rc.in MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libevt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libevt/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): libevt_definitions.h: $(top_builddir)/config.status $(srcdir)/libevt_definitions.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libevt.rc: $(top_builddir)/config.status $(srcdir)/libevt.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}; \ } libevt.la: $(libevt_la_OBJECTS) $(libevt_la_DEPENDENCIES) $(EXTRA_libevt_la_DEPENDENCIES) $(AM_V_CCLD)$(libevt_la_LINK) -rpath $(libdir) $(libevt_la_OBJECTS) $(libevt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevt_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevt_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevt_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevt_io_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevt_notify.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevt_record.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevt_record_values.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevt_support.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile distclean: clean /bin/rm -f libevt_definitions.h /bin/rm -f libevt.rc /bin/rm -f Makefile splint: @echo "Running splint on libevt ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libevt_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: libevt-20170120/libevt/libevt_libcerror.h0000664000175000017500000000263313040331672022326 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_LIBCERROR_H ) #define _LIBEVT_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( _LIBEVT_LIBCERROR_H ) */ libevt-20170120/libevt/libevt_notify.c0000664000175000017500000000525413040331672021650 0ustar00lordyestalordyesta00000000000000/* * Notification functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "libevt_libcerror.h" #include "libevt_libcnotify.h" #include "libevt_notify.h" #if !defined( HAVE_LOCAL_LIBEVT ) /* Sets the verbose notification */ void libevt_notify_set_verbose( int verbose ) { libcnotify_verbose_set( verbose ); } /* Sets the notification stream * Returns 1 if successful or -1 on error */ int libevt_notify_set_stream( FILE *stream, libcerror_error_t **error ) { static char *function = "libevt_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 libevt_notify_stream_open( const char *filename, libcerror_error_t **error ) { static char *function = "libevt_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 libevt_notify_stream_close( libcerror_error_t **error ) { static char *function = "libevt_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_LIBEVT ) */ libevt-20170120/libevt/libevt_libbfio.h0000664000175000017500000000324313040331672021747 0ustar00lordyestalordyesta00000000000000/* * The libbfio header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_LIBBFIO_H ) #define _LIBEVT_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( _LIBEVT_LIBBFIO_H ) */ libevt-20170120/libevt/libevt_record.c0000664000175000017500000011374213040331672021620 0ustar00lordyestalordyesta00000000000000/* * Record functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libevt_definitions.h" #include "libevt_io_handle.h" #include "libevt_libbfio.h" #include "libevt_libcerror.h" #include "libevt_record.h" #include "libevt_record_values.h" /* Creates record * Make sure the value record is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libevt_record_initialize( libevt_record_t **record, libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libevt_record_values_t *record_values, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_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( record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record values.", function ); return( -1 ); } internal_record = memory_allocate_structure( libevt_internal_record_t ); if( internal_record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create internal record.", function ); goto on_error; } if( memory_set( internal_record, 0, sizeof( libevt_internal_record_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear internal record.", function ); memory_free( internal_record ); return( -1 ); } internal_record->file_io_handle = file_io_handle; internal_record->io_handle = io_handle; internal_record->record_values = record_values; *record = (libevt_record_t *) internal_record; return( 1 ); on_error: if( internal_record != NULL ) { memory_free( internal_record ); } return( -1 ); } /* Frees a record * Returns 1 if successful or -1 on error */ int libevt_record_free( libevt_record_t **record, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_free"; 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 = (libevt_internal_record_t *) *record; *record = NULL; /* The file_io_handle, io_handle and record_values references are freed elsewhere */ memory_free( internal_record ); } return( 1 ); } /* Retrieves the offset * Returns 1 if successful or -1 on error */ int libevt_record_get_offset( libevt_record_t *record, off64_t *offset, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_offset"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", 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 ); } *offset = internal_record->record_values->offset; return( 1 ); } /* Retrieves the identifier (record number) * Returns 1 if successful or -1 on error */ int libevt_record_get_identifier( libevt_record_t *record, uint32_t *identifier, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", 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 = internal_record->record_values->number; return( 1 ); } /* Retrieves the creation time * The timestamp is a 32-bit POSIX date and time value * Returns 1 if successful or -1 on error */ int libevt_record_get_creation_time( libevt_record_t *record, uint32_t *posix_time, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_creation_time"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid posix time.", function ); return( -1 ); } *posix_time = internal_record->record_values->creation_time; return( 1 ); } /* Retrieves the written time * The timestamp is a 32-bit POSIX date and time value * Returns 1 if successful or -1 on error */ int libevt_record_get_written_time( libevt_record_t *record, uint32_t *posix_time, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_written_time"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid posix time.", function ); return( -1 ); } *posix_time = internal_record->record_values->written_time; return( 1 ); } /* Retrieves the event identifier * Returns 1 if successful or -1 on error */ int libevt_record_get_event_identifier( libevt_record_t *record, uint32_t *event_identifier, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_event_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( event_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event identifier.", function ); return( -1 ); } *event_identifier = internal_record->record_values->event_identifier; return( 1 ); } /* Retrieves the event type * Returns 1 if successful or -1 on error */ int libevt_record_get_event_type( libevt_record_t *record, uint16_t *event_type, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_event_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( event_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event type.", function ); return( -1 ); } *event_type = internal_record->record_values->event_type; return( 1 ); } /* Retrieves the event category * Returns 1 if successful or -1 on error */ int libevt_record_get_event_category( libevt_record_t *record, uint16_t *event_category, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_event_category"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( event_category == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event category.", function ); return( -1 ); } *event_category = internal_record->record_values->event_category; return( 1 ); } /* Retrieves the size of the UTF-8 encoded source name * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_utf8_source_name_size( libevt_record_t *record, size_t *utf8_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf8_source_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( libfvalue_value_get_utf8_string_size( internal_record->record_values->source_name, 0, 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 source name * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_utf8_source_name( libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf8_source_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf8_string( internal_record->record_values->source_name, 0, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy source name to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 encoded source name * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_utf16_source_name_size( libevt_record_t *record, size_t *utf16_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf16_source_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( libfvalue_value_get_utf16_string_size( internal_record->record_values->source_name, 0, 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 source name * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_utf16_source_name( libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf16_source_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf16_string( internal_record->record_values->source_name, 0, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy source name to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 encoded computer name * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_utf8_computer_name_size( libevt_record_t *record, size_t *utf8_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf8_computer_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( libfvalue_value_get_utf8_string_size( internal_record->record_values->computer_name, 0, 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 computer name * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_utf8_computer_name( libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf8_computer_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf8_string( internal_record->record_values->computer_name, 0, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy computer name to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 encoded computer name * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_utf16_computer_name_size( libevt_record_t *record, size_t *utf16_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf16_computer_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( libfvalue_value_get_utf16_string_size( internal_record->record_values->computer_name, 0, 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 computer name * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_utf16_computer_name( libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf16_computer_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf16_string( internal_record->record_values->computer_name, 0, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy computer name to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 encoded user security identifier * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_utf8_user_security_identifier_size( libevt_record_t *record, size_t *utf8_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf8_user_security_identifier_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( internal_record->record_values->user_security_identifier == NULL ) { return( 0 ); } if( libfvalue_value_get_utf8_string_size( internal_record->record_values->user_security_identifier, 0, 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 user security identifier * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_utf8_user_security_identifier( libevt_record_t *record, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf8_user_security_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( internal_record->record_values->user_security_identifier == NULL ) { return( 0 ); } if( libfvalue_value_copy_to_utf8_string( internal_record->record_values->user_security_identifier, 0, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy user security identifier to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 encoded user security identifier * The returned size includes the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_utf16_user_security_identifier_size( libevt_record_t *record, size_t *utf16_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf16_user_security_identifier_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( libfvalue_value_get_utf16_string_size( internal_record->record_values->user_security_identifier, 0, 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 user security identifier * The size should include the end of string character * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_utf16_user_security_identifier( libevt_record_t *record, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf16_user_security_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( libfvalue_value_copy_to_utf16_string( internal_record->record_values->user_security_identifier, 0, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy user security identifier to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of strings * Returns 1 if successful or -1 on error */ int libevt_record_get_number_of_strings( libevt_record_t *record, int *number_of_strings, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_number_of_strings"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( internal_record->record_values->strings == NULL ) { if( number_of_strings == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of strings.", function ); return( -1 ); } *number_of_strings = 0; } else { if( libfvalue_value_get_number_of_value_entries( internal_record->record_values->strings, number_of_strings, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of strings value entries.", function ); return( -1 ); } } return( 1 ); } /* Retrieves the size of a specific UTF-8 encoded string * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libevt_record_get_utf8_string_size( libevt_record_t *record, int string_index, size_t *utf8_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf8_string_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( internal_record->record_values->strings == NULL ) { 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 ); } if( libfvalue_value_get_utf8_string_size( internal_record->record_values->strings, string_index, 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 of strings value entry: %d.", function, string_index ); return( -1 ); } return( 1 ); } /* Retrieves a specific UTF-8 encoded string * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libevt_record_get_utf8_string( libevt_record_t *record, int string_index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf8_string"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( internal_record->record_values->strings == NULL ) { 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 ); } if( libfvalue_value_copy_to_utf8_string( internal_record->record_values->strings, 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 strings value entry: %d to UTF-8 string.", function, string_index ); return( -1 ); } return( 1 ); } /* Retrieves the size of a specific UTF-16 encoded string * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libevt_record_get_utf16_string_size( libevt_record_t *record, int string_index, size_t *utf16_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf16_string_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( internal_record->record_values->strings == NULL ) { 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 ); } if( libfvalue_value_get_utf16_string_size( internal_record->record_values->strings, string_index, 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 of strings value entry: %d.", function, string_index ); return( -1 ); } return( 1 ); } /* Retrieves a specific UTF-16 encoded string * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libevt_record_get_utf16_string( libevt_record_t *record, int string_index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_utf16_string"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( internal_record->record_values->strings == NULL ) { 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 ); } if( libfvalue_value_copy_to_utf16_string( internal_record->record_values->strings, 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 strings value entry: %d to UTF-16 string.", function, string_index ); return( -1 ); } return( 1 ); } /* Retrieves the size of the data * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_data_size( libevt_record_t *record, size_t *data_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( internal_record->record_values->data == NULL ) { return( 0 ); } if( libfvalue_value_get_data_size( internal_record->record_values->data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the data * Returns 1 if successful, 0 if not available or -1 on error */ int libevt_record_get_data( libevt_record_t *record, uint8_t *data, size_t data_size, libcerror_error_t **error ) { libevt_internal_record_t *internal_record = NULL; static char *function = "libevt_record_get_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 = (libevt_internal_record_t *) record; if( internal_record->record_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing record values.", function ); return( -1 ); } if( internal_record->record_values->data == NULL ) { return( 0 ); } if( libfvalue_value_copy_data( internal_record->record_values->data, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy data.", function ); return( -1 ); } return( 1 ); } libevt-20170120/libevt/libevt_libfvalue.h0000664000175000017500000000302613040331672022311 0ustar00lordyestalordyesta00000000000000/* * The libfvalue header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_LIBFVALUE_H ) #define _LIBEVT_LIBFVALUE_H #include /* Define HAVE_LOCAL_LIBFVALUE for local use of libfvalue */ #if defined( HAVE_LOCAL_LIBFVALUE ) #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBFVALUE_DLL_IMPORT * before including libfvalue.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFVALUE_DLL_IMPORT #endif #include #endif #endif libevt-20170120/libevt/libevt_libfcache.h0000664000175000017500000000263613040331672022246 0ustar00lordyestalordyesta00000000000000/* * The internal libfcache header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_LIBFCACHE_H ) #define _LIBEVT_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( _LIBEVT_LIBFCACHE_H ) */ libevt-20170120/libevt/libevt_libcdata.h0000664000175000017500000000301113040331672022075 0ustar00lordyestalordyesta00000000000000/* * The internal libcdata header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_LIBCDATA_H ) #define _LIBEVT_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( _LIBEVT_LIBCDATA_H ) */ libevt-20170120/libevt/libevt_support.h0000664000175000017500000000370413040331672022057 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_SUPPORT_H ) #define _LIBEVT_SUPPORT_H #include #include #include "libevt_extern.h" #include "libevt_libbfio.h" #include "libevt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBEVT ) LIBEVT_EXTERN \ const char *libevt_get_version( void ); LIBEVT_EXTERN \ int libevt_get_access_flags_read( void ); LIBEVT_EXTERN \ int libevt_get_codepage( int *codepage, libcerror_error_t **error ); LIBEVT_EXTERN \ int libevt_set_codepage( int codepage, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBEVT ) */ LIBEVT_EXTERN \ int libevt_check_file_signature( const char *filename, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBEVT_EXTERN \ int libevt_check_file_signature_wide( const wchar_t *filename, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ LIBEVT_EXTERN \ int libevt_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEVT_SUPPORT_H ) */ libevt-20170120/libevt/libevt_libfwnt.h0000664000175000017500000000311013040331672021777 0ustar00lordyestalordyesta00000000000000/* * The libfwnt header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_LIBFWNT_H ) #define _LIBEVT_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 #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( _LIBEVT_LIBFWNT_H ) */ libevt-20170120/libevt/libevt.c0000664000175000017500000000343013040331672020252 0ustar00lordyestalordyesta00000000000000/* * Library to access the Windows Event Log (EVT) format * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #if defined( WINAPI ) #include #endif #include "libevt_unused.h" /* Define HAVE_LOCAL_LIBEVT for local use of libevt */ #if !defined( HAVE_LOCAL_LIBEVT ) #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 ) { LIBEVT_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 libevt_is_dll( void ) { return( 1 ); } #endif /* defined( WINAPI ) && defined( HAVE_DLLMAIN ) */ #endif /* !defined( HAVE_LOCAL_LIBEVT ) */ libevt-20170120/libevt/libevt_io_handle.h0000664000175000017500000000646713040331672022276 0ustar00lordyestalordyesta00000000000000/* * Input/Output (IO) handle functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBEVT_IO_HANDLE_H ) #define _LIBEVT_IO_HANDLE_H #include #include #include "libevt_libbfio.h" #include "libevt_libcerror.h" #include "libevt_libfcache.h" #include "libevt_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif extern const char *evt_file_signature; typedef struct libevt_io_handle libevt_io_handle_t; struct libevt_io_handle { /* The major version */ uint32_t major_version; /* The minor version */ uint32_t minor_version; /* The file flags */ uint32_t file_flags; /* The file size */ size64_t file_size; /* Value to indicate the record data has wrapped */ uint8_t has_wrapped; /* Flags */ uint8_t flags; /* The codepage of the extended ASCII strings */ int ascii_codepage; /* Value to indicate if abort was signalled */ int abort; }; int libevt_io_handle_initialize( libevt_io_handle_t **io_handle, libcerror_error_t **error ); int libevt_io_handle_free( libevt_io_handle_t **io_handle, libcerror_error_t **error ); int libevt_io_handle_clear( libevt_io_handle_t *io_handle, libcerror_error_t **error ); int libevt_io_handle_read_file_header( libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t *first_record_offset, uint32_t *end_of_file_record_offset, libcerror_error_t **error ); int libevt_io_handle_read_records( libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t first_record_offset, uint32_t end_of_file_record_offset, libfdata_list_t *records_list, off64_t *last_record_offset, libcerror_error_t **error ); int libevt_io_handle_end_of_file_record_scan( libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t *first_record_offset, uint32_t *end_of_file_record_offset, libcerror_error_t **error ); int libevt_io_handle_event_record_scan( libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, off64_t file_offset, size64_t size, libfdata_list_t *recovered_records_list, libcerror_error_t **error ); int libevt_io_handle_recover_records( libevt_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t first_record_offset, uint32_t end_of_file_record_offset, off64_t last_record_offset, libfdata_list_t *records_list, libfdata_list_t *recovered_records_list, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBEVT_IO_HANDLE_H ) */ libevt-20170120/libcnotify/0000775000175000017500000000000013040343016017471 5ustar00lordyestalordyesta00000000000000libevt-20170120/libcnotify/libcnotify_libcerror.h0000664000175000017500000000252713040331676024066 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_LIBCERROR_H ) #define _LIBCNOTIFY_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libevt-20170120/libcnotify/libcnotify_unused.h0000664000175000017500000000256613040331676023411 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_INTERNAL_UNUSED_H ) #define _LIBCNOTIFY_INTERNAL_UNUSED_H #include #if !defined( LIBCNOTIFY_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCNOTIFY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCNOTIFY_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCNOTIFY_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCNOTIFY_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBCNOTIFY_INTERNAL_UNUSED_H ) */ libevt-20170120/libcnotify/libcnotify_support.h0000664000175000017500000000236413040331676023616 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_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 ) */ libevt-20170120/libcnotify/libcnotify_support.c0000664000175000017500000000221613040331676023605 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcnotify_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 ) */ libevt-20170120/libcnotify/Makefile.am0000664000175000017500000000126413012271467021541 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBCNOTIFY AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcnotify ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcnotify_la_SOURCES) libevt-20170120/libcnotify/libcnotify_print.c0000664000175000017500000001504113040331676023225 0ustar00lordyestalordyesta00000000000000/* * Notification print functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #include #elif defined( HAVE_VARARGS_H ) #include #else #error Missing headers stdarg.h and varargs.h #endif #include "libcnotify_definitions.h" #include "libcnotify_libcerror.h" #include "libcnotify_print.h" #include "libcnotify_stream.h" extern FILE *libcnotify_stream; #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #define VARARGS( function, type, argument ) \ function( type argument, ... ) #define VASTART( argument_list, type, name ) \ va_start( argument_list, name ) #define VAEND( argument_list ) \ va_end( argument_list ) #elif defined( HAVE_VARARGS_H ) #define VARARGS( function, type, argument ) \ function( va_alist ) va_dcl #define VASTART( argument_list, type, name ) \ { type name; va_start( argument_list ); name = va_arg( argument_list, type ) #define VAEND( argument_list ) \ va_end( argument_list ); } #endif /* Print a formatted string on the notify stream * Returns the number of printed characters if successful or -1 on error */ int VARARGS( libcnotify_printf, const char *, format ) { va_list argument_list; int print_count = 0; if( libcnotify_stream == NULL ) { return( 0 ); } VASTART( argument_list, char *, format ); #if defined( HAVE_GLIB_H ) g_logv( G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, argument_list ); #else /* TODO handle narrow and wide streams * for multi platform support */ print_count = file_stream_vfprintf( libcnotify_stream, format, argument_list ); #endif VAEND( argument_list ); if( print_count <= -1 ) { return( -1 ); } return( print_count ); } #undef VARARGS #undef VASTART #undef VAEND /* Prints the data on the notify stream * Returns the number of printed characters if successful or -1 on error */ int libcnotify_print_data( const uint8_t *data, size_t data_size, uint8_t print_data_flags ) { size_t byte_iterator = 0; size_t data_iterator = 0; int in_group = 0; int print_count = 0; int total_print_count = 0; if( libcnotify_stream == NULL ) { return( 0 ); } if( data == NULL ) { return( -1 ); } while( data_iterator < data_size ) { if( ( ( print_data_flags & LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ) != 0 ) && ( data_size >= 32 ) && ( data_iterator >= 16 ) && ( data_iterator <= ( data_size - 32 ) ) ) { if( ( memory_compare( &( data[ data_iterator - 16 ] ), &( data[ data_iterator ] ), 16 ) == 0 ) && ( memory_compare( &( data[ data_iterator + 16 ] ), &( data[ data_iterator ] ), 16 ) == 0 ) ) { if( in_group == 0 ) { print_count = libcnotify_printf( "...\n" ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; in_group = 1; } byte_iterator += 16; data_iterator += 16; continue; } in_group = 0; } while( byte_iterator < data_size ) { if( byte_iterator % 16 == 0 ) { print_count = libcnotify_printf( "%.8" PRIzx ": ", byte_iterator ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } print_count = libcnotify_printf( "%.2" PRIx8 " ", data[ byte_iterator++ ] ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; if( byte_iterator % 16 == 0 ) { break; } else if( byte_iterator % 8 == 0 ) { print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } } while( byte_iterator % 16 != 0 ) { byte_iterator++; print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; if( ( byte_iterator % 8 == 0 ) && ( byte_iterator % 16 != 0 ) ) { print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } } print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; byte_iterator = data_iterator; while( byte_iterator < data_size ) { if( ( data[ byte_iterator ] >= 0x20 ) && ( data[ byte_iterator ] <= 0x7e ) ) { print_count = libcnotify_printf( "%c", (char) data[ byte_iterator ] ); } else { print_count = libcnotify_printf( "." ); } if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; byte_iterator++; if( byte_iterator % 16 == 0 ) { break; } else if( byte_iterator % 8 == 0 ) { print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } } print_count = libcnotify_printf( "\n" ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; data_iterator = byte_iterator; } print_count = libcnotify_printf( "\n" ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; return( total_print_count ); } /* Prints the backtrace of the error on the notify stream * Returns the number of printed characters if successful or -1 on error */ int libcnotify_print_error_backtrace( libcerror_error_t *error ) { int print_count = 0; if( libcnotify_stream == NULL ) { return( 0 ); } print_count = libcerror_error_backtrace_fprint( error, libcnotify_stream ); return( print_count ); } libevt-20170120/libcnotify/libcnotify_verbose.c0000664000175000017500000000211013040331676023527 0ustar00lordyestalordyesta00000000000000/* * Verbose functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcnotify_verbose.h" /* Value to indicate if the verbose notification is active */ int libcnotify_verbose = 0; /* Sets the verbose notification */ void libcnotify_verbose_set( int verbose ) { libcnotify_verbose = verbose; } libevt-20170120/libcnotify/libcnotify_stream.h0000664000175000017500000000264113040331676023373 0ustar00lordyestalordyesta00000000000000/* * Notification stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_STREAM_H ) #define _LIBCNOTIFY_STREAM_H #include #include #include #include "libcnotify_extern.h" #include "libcnotify_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif LIBCNOTIFY_EXTERN \ int libcnotify_stream_set( FILE *stream, libcerror_error_t **error ); LIBCNOTIFY_EXTERN \ int libcnotify_stream_open( const char *filename, libcerror_error_t **error ); LIBCNOTIFY_EXTERN \ int libcnotify_stream_close( libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCNOTIFY_STREAM_H ) */ libevt-20170120/libcnotify/libcnotify_extern.h0000664000175000017500000000257513040331676023413 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_INTERNAL_EXTERN_H ) #define _LIBCNOTIFY_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify */ #if !defined( HAVE_LOCAL_LIBCNOTIFY ) /* If libtool DLL support is enabled set LIBCNOTIFY_DLL_EXPORT * before including libcnotify/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCNOTIFY_DLL_EXPORT #endif #include #else #define LIBCNOTIFY_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBCNOTIFY ) */ #endif /* !defined( _LIBCNOTIFY_INTERNAL_EXTERN_H ) */ libevt-20170120/libcnotify/libcnotify_stream.c0000664000175000017500000000766413040331676023400 0ustar00lordyestalordyesta00000000000000/* * Notification stream functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_ERRNO_H ) || defined( WINAPI ) #include #endif #include "libcnotify_libcerror.h" #include "libcnotify_stream.h" /* The notification stream */ FILE *libcnotify_stream = NULL; /* Value to indicate if the notification stream * was opened by the library */ int libcnotify_stream_opened_in_library = 0; /* Set the stream * Returns 1 if successful or -1 on error */ int libcnotify_stream_set( FILE *stream, libcerror_error_t **error ) { static char *function = "libcnotify_stream_set"; if( libcnotify_stream_opened_in_library != 0 ) { if( libcnotify_stream_close( error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to close notify stream.", function ); return( -1 ); } } libcnotify_stream = stream; return( 1 ); } /* Opens the notification stream using a filename * The stream is opened in append mode * Returns 1 if successful or -1 on error */ int libcnotify_stream_open( const char *filename, libcerror_error_t **error ) { static char *function = "libcnotify_stream_open"; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( libcnotify_stream_opened_in_library != 0 ) { if( libcnotify_stream_close( error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to close notify stream.", function ); return( -1 ); } } libcnotify_stream = file_stream_open( filename, FILE_STREAM_OPEN_APPEND ); if( libcnotify_stream == NULL ) { switch( errno ) { case EACCES: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_ACCESS_DENIED, "%s: access denied to file: %s.", function, filename ); break; case ENOENT: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_INVALID_RESOURCE, "%s: no such file: %s.", function, filename ); break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file: %s.", function, filename ); break; } return( -1 ); } libcnotify_stream_opened_in_library = 1; return( 1 ); } /* Closes the notification stream if opened using a filename * Returns 0 if successful or -1 on error */ int libcnotify_stream_close( libcerror_error_t **error ) { static char *function = "libcnotify_stream_close"; if( libcnotify_stream_opened_in_library != 0 ) { if( file_stream_close( libcnotify_stream ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to close stream.", function ); return( -1 ); } libcnotify_stream = NULL; libcnotify_stream_opened_in_library = 0; } return( 0 ); } libevt-20170120/libcnotify/Makefile.in0000664000175000017500000007607213040342657021564 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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$(top_srcdir)/include \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ -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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcnotify/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcnotify/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcnotify_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcnotify_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcnotify_verbose.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcnotify ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcnotify_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libcnotify/libcnotify_print.h0000664000175000017500000000262113040331676023232 0ustar00lordyestalordyesta00000000000000/* * Notification print functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_PRINT_H ) #define _LIBCNOTIFY_PRINT_H #include #include #include "libcnotify_extern.h" #include "libcnotify_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif LIBCNOTIFY_EXTERN \ int libcnotify_printf( const char *format, ... ); LIBCNOTIFY_EXTERN \ int libcnotify_print_data( const uint8_t *data, size_t data_size, uint8_t print_data_flags ); LIBCNOTIFY_EXTERN \ int libcnotify_print_error_backtrace( libcerror_error_t *error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCNOTIFY_PRINT_H ) */ libevt-20170120/libcnotify/libcnotify_verbose.h0000664000175000017500000000234213040331676023543 0ustar00lordyestalordyesta00000000000000/* * Verbose functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_VERBOSE_H ) #define _LIBCNOTIFY_VERBOSE_H #include #include #include "libcnotify_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( __CYGWIN__ ) extern int libcnotify_verbose; #else int libcnotify_verbose; #endif LIBCNOTIFY_EXTERN \ void libcnotify_verbose_set( int verbose ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCNOTIFY_VERBOSE_H ) */ libevt-20170120/libcnotify/libcnotify_definitions.h0000664000175000017500000000273213040331676024414 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBCNOTIFY_INTERNAL_DEFINITIONS_H ) #define LIBCNOTIFY_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify */ #if !defined( HAVE_LOCAL_LIBCNOTIFY ) #include /* The definitions in are copied here * for local use of libcnotify */ #else #define LIBCNOTIFY_VERSION 20170107 /* The libcnotify version string */ #define LIBCNOTIFY_VERSION_STRING "20170107" /* The print data flags */ enum LIBCNOTIFY_NOTIFY_PRINT_DATA_FLAGS { LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA = 0x01, }; #endif /* !defined( HAVE_LOCAL_LIBCNOTIFY ) */ #endif libevt-20170120/ltmain.sh0000644000175000017500000117077113040342646017173 0ustar00lordyestalordyesta00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 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.6 package_revision=2.4.6 ## ------ ## ## 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=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # 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. # 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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 . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## 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 # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # 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 ## ------------------------- ## ## 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" ## ----------------- ## ## 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_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_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_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg 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. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # 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_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_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_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_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 # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # 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 . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## 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 '# warranty; '. # # 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 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 # to the main code. A hook is just a named list of of function, 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 functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is 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 funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # 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=: ;; # # 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 # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # 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_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse 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 [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_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 propogate 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+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # 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+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break 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 ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # 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+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## 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#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' 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. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # 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: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # 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.6 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= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _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; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } 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" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match 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_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_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_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test 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_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_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 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 -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_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=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_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: 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_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_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\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ 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_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $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 ;; 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*) # 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*) # 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 ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-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_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -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 # -stdlib=* select c++ std lib with clang -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=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -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_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test 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_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test 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|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) 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*) # 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_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test 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_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test 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_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do 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_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test 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: libevt-20170120/compile0000755000175000017500000001624513040342656016724 0ustar00lordyestalordyesta00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 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*) 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/*) 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 ) 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 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libevt-20170120/config.rpath0000754000175000017500000004401211642277124017651 0ustar00lordyestalordyesta00000000000000#! /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-2010 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,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux* | k*bsd*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _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*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | 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 ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; 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*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | 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 test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _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*) library_names_spec='$libname.a' ;; 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' ;; freebsd1*) ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; nto-qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. # 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 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libevt-20170120/libcdirectory/0000775000175000017500000000000013040343017020166 5ustar00lordyestalordyesta00000000000000libevt-20170120/libcdirectory/libcdirectory_error.h0000664000175000017500000000357013040331677024424 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDIRECTORY_INTERNAL_ERROR_H ) #define _LIBCDIRECTORY_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBCDIRECTORY ) #include #endif #include "libcdirectory_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCDIRECTORY ) LIBCDIRECTORY_EXTERN \ void libcdirectory_error_free( libcdirectory_error_t **error ); LIBCDIRECTORY_EXTERN \ int libcdirectory_error_fprint( libcdirectory_error_t *error, FILE *stream ); LIBCDIRECTORY_EXTERN \ int libcdirectory_error_sprint( libcdirectory_error_t *error, char *string, size_t size ); LIBCDIRECTORY_EXTERN \ int libcdirectory_error_backtrace_fprint( libcdirectory_error_t *error, FILE *stream ); LIBCDIRECTORY_EXTERN \ int libcdirectory_error_backtrace_sprint( libcdirectory_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBCDIRECTORY ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDIRECTORY_INTERNAL_ERROR_H ) */ libevt-20170120/libcdirectory/libcdirectory_unused.h0000664000175000017500000000261613040331677024576 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDIRECTORY_INTERNAL_UNUSED_H ) #define _LIBCDIRECTORY_INTERNAL_UNUSED_H #include #if !defined( LIBCDIRECTORY_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCDIRECTORY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCDIRECTORY_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCDIRECTORY_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCDIRECTORY_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBCDIRECTORY_INTERNAL_UNUSED_H ) */ libevt-20170120/libcdirectory/libcdirectory_error.c0000664000175000017500000000564613040331677024425 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcdirectory_error.h" #include "libcdirectory_libcerror.h" #if !defined( HAVE_LOCAL_LIBCDIRECTORY ) /* Free an error and its elements */ void libcdirectory_error_free( libcdirectory_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 libcdirectory_error_fprint( libcdirectory_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 libcdirectory_error_sprint( libcdirectory_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 libcdirectory_error_backtrace_fprint( libcdirectory_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 libcdirectory_error_backtrace_sprint( libcdirectory_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_LIBCDIRECTORY ) */ libevt-20170120/libcdirectory/libcdirectory_extern.h0000664000175000017500000000264113040331677024576 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDIRECTORY_INTERNAL_EXTERN_H ) #define _LIBCDIRECTORY_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCDIRECTORY for local use of libcdirectory */ #if !defined( HAVE_LOCAL_LIBCDIRECTORY ) /* If libtool DLL support is enabled set LIBCDIRECTORY_DLL_EXPORT * before including libcdirectory/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCDIRECTORY_DLL_EXPORT #endif #include #else #define LIBCDIRECTORY_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBCDIRECTORY ) */ #endif /* !defined( _LIBCDIRECTORY_INTERNAL_EXTERN_H ) */ libevt-20170120/libcdirectory/libcdirectory_wide_string.h0000664000175000017500000000326113040331677025606 0ustar00lordyestalordyesta00000000000000/* * Wide character string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDIRECTORY_WIDE_STRING_H ) #define _LIBCDIRECTORY_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 ) \ libcdirectory_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 libcdirectory_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( _LIBCDIRECTORY_WIDE_STRING_H ) */ libevt-20170120/libcdirectory/Makefile.am0000664000175000017500000000176613012271460022235 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBCDIRECTORY AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ noinst_LTLIBRARIES = libcdirectory.la libcdirectory_la_SOURCES = \ libcdirectory_definitions.h \ libcdirectory_error.c libcdirectory_error.h \ libcdirectory_extern.h \ libcdirectory_directory.c libcdirectory_directory.h \ libcdirectory_directory_entry.c libcdirectory_directory_entry.h \ libcdirectory_libcerror.h \ libcdirectory_libclocale.h \ libcdirectory_libuna.h \ libcdirectory_support.c libcdirectory_support.h \ libcdirectory_system_string.c libcdirectory_system_string.h \ libcdirectory_types.h \ libcdirectory_unused.h \ libcdirectory_wide_string.c libcdirectory_wide_string.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcdirectory ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcdirectory_la_SOURCES) libevt-20170120/libcdirectory/libcdirectory_support.c0000664000175000017500000000453613040331677025005 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcdirectory_definitions.h" #include "libcdirectory_libcerror.h" #include "libcdirectory_libclocale.h" #include "libcdirectory_support.h" #if !defined( HAVE_LOCAL_LIBCDIRECTORY ) /* Returns the library version as a string */ const char *libcdirectory_get_version( void ) { return( (const char *) LIBCDIRECTORY_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 libcdirectory_get_codepage( int *codepage, libcerror_error_t **error ) { static char *function = "libcdirectory_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 libcdirectory_set_codepage( int codepage, libcerror_error_t **error ) { static char *function = "libcdirectory_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_LIBCDIRECTORY ) */ libevt-20170120/libcdirectory/libcdirectory_directory_entry.c0000664000175000017500000005123313040331677026512 0ustar00lordyestalordyesta00000000000000/* * Directory entry functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #if defined( HAVE_ERRNO_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_SYS_STAT_H ) #include #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #include #endif #if defined( HAVE_DIRENT_H ) #include #endif #if defined( HAVE_UNISTD_H ) #include #endif #include "libcdirectory_definitions.h" #include "libcdirectory_directory_entry.h" #include "libcdirectory_libcerror.h" #include "libcdirectory_system_string.h" #include "libcdirectory_types.h" /* Creates a directory entry * Make sure the value directory_entry is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcdirectory_directory_entry_initialize( libcdirectory_directory_entry_t **directory_entry, libcerror_error_t **error ) { libcdirectory_internal_directory_entry_t *internal_directory_entry = NULL; static char *function = "libcdirectory_directory_entry_initialize"; if( directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory entry.", function ); return( -1 ); } if( *directory_entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid directory entry value already set.", function ); return( -1 ); } internal_directory_entry = memory_allocate_structure( libcdirectory_internal_directory_entry_t ); if( internal_directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create directory entry.", function ); goto on_error; } if( memory_set( internal_directory_entry, 0, sizeof( libcdirectory_internal_directory_entry_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear directory entry.", function ); goto on_error; } *directory_entry = (libcdirectory_directory_entry_t *) internal_directory_entry; return( 1 ); on_error: if( internal_directory_entry != NULL ) { memory_free( internal_directory_entry ); } return( -1 ); } /* Frees a directory entry * Returns 1 if successful or -1 on error */ int libcdirectory_directory_entry_free( libcdirectory_directory_entry_t **directory_entry, libcerror_error_t **error ) { libcdirectory_internal_directory_entry_t *internal_directory_entry = NULL; static char *function = "libcdirectory_directory_entry_free"; if( directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory entry.", function ); return( -1 ); } if( *directory_entry != NULL ) { internal_directory_entry = (libcdirectory_internal_directory_entry_t *) *directory_entry; *directory_entry = NULL; #if defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( internal_directory_entry->narrow_name != NULL ) { memory_free( internal_directory_entry->narrow_name ); } #else if( internal_directory_entry->wide_name != NULL ) { memory_free( internal_directory_entry->wide_name ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ memory_free( internal_directory_entry ); } return( 1 ); } /* Copies the directory entry including elements * Returns 1 if successful or -1 on error */ int libcdirectory_directory_entry_copy( libcdirectory_directory_entry_t *destination_directory_entry, libcdirectory_directory_entry_t *source_directory_entry, libcerror_error_t **error ) { libcdirectory_internal_directory_entry_t *internal_destination_directory_entry = NULL; libcdirectory_internal_directory_entry_t *internal_source_directory_entry = NULL; static char *function = "libcdirectory_directory_entry_copy"; #if defined( WINAPI ) size_t find_data_size = 0; #endif if( destination_directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination directory entry.", function ); return( -1 ); } internal_destination_directory_entry = (libcdirectory_internal_directory_entry_t *) destination_directory_entry; if( source_directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid source directory entry.", function ); return( -1 ); } internal_source_directory_entry = (libcdirectory_internal_directory_entry_t *) source_directory_entry; #if defined( WINAPI ) find_data_size = sizeof( WIN32_FIND_DATA ); if( memory_copy( &( internal_destination_directory_entry->find_data ), &( internal_source_directory_entry->find_data ), find_data_size ) == NULL ) #else if( memory_copy( &( internal_destination_directory_entry->entry ), &( internal_source_directory_entry->entry ), sizeof( struct dirent ) ) == NULL ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy directory entry data.", function ); return( -1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_SYSTEM_CHARACTER ) /* TODO copy narrow_name */ #else /* TODO copy wide_name */ #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } #if defined( WINAPI ) && ( WINVER >= 0x0501 ) /* Retrieves the directory entry type * This function uses the WINAPI directory entry structure for Windows XP or later * Returns 1 if successful or -1 on error */ int libcdirectory_directory_entry_get_type( libcdirectory_directory_entry_t *directory_entry, uint8_t *type, libcerror_error_t **error ) { libcdirectory_internal_directory_entry_t *internal_directory_entry = NULL; static char *function = "libcdirectory_directory_entry_get_type"; if( directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory entry.", function ); return( -1 ); } internal_directory_entry = (libcdirectory_internal_directory_entry_t *) directory_entry; if( type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid type.", function ); return( -1 ); } if( ( internal_directory_entry->find_data.dwFileAttributes & FILE_ATTRIBUTE_DEVICE ) != 0 ) { *type = LIBCDIRECTORY_ENTRY_TYPE_DEVICE; } else if( ( internal_directory_entry->find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) != 0 ) { *type = LIBCDIRECTORY_ENTRY_TYPE_DIRECTORY; } else if( ( internal_directory_entry->find_data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT ) != 0 ) { *type = LIBCDIRECTORY_ENTRY_TYPE_LINK; } else { *type = LIBCDIRECTORY_ENTRY_TYPE_FILE; } return( 1 ); } #elif defined( WINAPI ) /* TODO */ #error WINAPI directory entry structure for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_DIRENT_H ) /* Retrieves the directory entry type * This function uses the POSIX directory entry structure * Returns 1 if successful or -1 on error */ int libcdirectory_directory_entry_get_type( libcdirectory_directory_entry_t *directory_entry, uint8_t *type, libcerror_error_t **error ) { libcdirectory_internal_directory_entry_t *internal_directory_entry = NULL; static char *function = "libcdirectory_directory_entry_get_type"; if( directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory entry.", function ); return( -1 ); } internal_directory_entry = (libcdirectory_internal_directory_entry_t *) directory_entry; if( type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid type.", function ); return( -1 ); } /* TODO what about DT_WHT ? */ if( ( internal_directory_entry->entry.d_type == DT_BLK ) || ( internal_directory_entry->entry.d_type == DT_CHR ) ) { *type = LIBCDIRECTORY_ENTRY_TYPE_DEVICE; } else if( internal_directory_entry->entry.d_type == DT_DIR ) { *type = LIBCDIRECTORY_ENTRY_TYPE_DIRECTORY; } else if( internal_directory_entry->entry.d_type == DT_FIFO ) { *type = LIBCDIRECTORY_ENTRY_TYPE_PIPE; } else if( internal_directory_entry->entry.d_type == DT_LNK ) { *type = LIBCDIRECTORY_ENTRY_TYPE_LINK; } else if( internal_directory_entry->entry.d_type == DT_REG ) { *type = LIBCDIRECTORY_ENTRY_TYPE_FILE; } else if( internal_directory_entry->entry.d_type == DT_SOCK ) { *type = LIBCDIRECTORY_ENTRY_TYPE_SOCKET; } else if( internal_directory_entry->entry.d_type == DT_UNKNOWN ) { *type = LIBCDIRECTORY_ENTRY_TYPE_UNDEFINED; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported type.", function ); return( -1 ); } return( 1 ); } #else #error Missing directory entry structure definition #endif #if defined( WINAPI ) && ( WINVER >= 0x0501 ) /* Retrieves the directory entry name * This function uses the WINAPI directory entry structure for Windows XP or later * Returns 1 if successful or -1 on error */ int libcdirectory_directory_entry_get_name( libcdirectory_directory_entry_t *directory_entry, char **name, libcerror_error_t **error ) { libcdirectory_internal_directory_entry_t *internal_directory_entry = NULL; static char *function = "libcdirectory_directory_entry_get_name"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) const wchar_t *directory_name = NULL; size_t directory_name_length = 0; size_t narrow_directory_name_size = 0; #endif if( directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory entry.", function ); return( -1 ); } internal_directory_entry = (libcdirectory_internal_directory_entry_t *) directory_entry; if( name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) directory_name = internal_directory_entry->find_data.cFileName; directory_name_length = wide_string_length( directory_name ); if( libcdirectory_system_string_size_to_narrow_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 character directory name size.", function ); goto on_error; } internal_directory_entry->narrow_name = narrow_string_allocate( narrow_directory_name_size ); if( internal_directory_entry->narrow_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create narrow character directory name.", function ); goto on_error; } if( libcdirectory_system_string_copy_to_narrow_string( directory_name, directory_name_length + 1, internal_directory_entry->narrow_name, narrow_directory_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set narrow character directory name.", function ); goto on_error; } *name = internal_directory_entry->narrow_name; #else *name = internal_directory_entry->find_data.cFileName; #endif return( 1 ); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) on_error: if( internal_directory_entry->narrow_name != NULL ) { memory_free( internal_directory_entry->narrow_name ); internal_directory_entry->narrow_name = NULL; } return( -1 ); #endif } #elif defined( WINAPI ) /* TODO */ #error WINAPI directory entry structure for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_DIRENT_H ) /* Retrieves the directory entry name * This function uses the POSIX directory entry structure * Returns 1 if successful or -1 on error */ int libcdirectory_directory_entry_get_name( libcdirectory_directory_entry_t *directory_entry, char **name, libcerror_error_t **error ) { libcdirectory_internal_directory_entry_t *internal_directory_entry = NULL; static char *function = "libcdirectory_directory_entry_get_name"; if( directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory entry.", function ); return( -1 ); } internal_directory_entry = (libcdirectory_internal_directory_entry_t *) directory_entry; if( name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name.", function ); return( -1 ); } *name = internal_directory_entry->entry.d_name; return( 1 ); } #else #error Missing directory entry structure definition #endif #if defined( HAVE_WIDE_CHARACTER_TYPE ) #if defined( WINAPI ) && ( WINVER >= 0x0501 ) /* Retrieves the directory entry name * This function uses the WINAPI directory entry structure for Windows XP or later * Returns 1 if successful or -1 on error */ int libcdirectory_directory_entry_get_name_wide( libcdirectory_directory_entry_t *directory_entry, wchar_t **name, libcerror_error_t **error ) { libcdirectory_internal_directory_entry_t *internal_directory_entry = NULL; static char *function = "libcdirectory_directory_entry_get_name_wide"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) const char *directory_name = NULL; size_t directory_name_length = 0; size_t wide_directory_name_size = 0; #endif if( directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory entry.", function ); return( -1 ); } internal_directory_entry = (libcdirectory_internal_directory_entry_t *) directory_entry; if( name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) *name = internal_directory_entry->find_data.cFileName; #else directory_name = internal_directory_entry->find_data.cFileName; directory_name_length = narrow_string_length( directory_name ); if( libcdirectory_system_string_size_to_wide_string( directory_name, directory_name_length + 1, &wide_directory_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine wide character directory name size.", function ); goto on_error; } internal_directory_entry->wide_name = wide_string_allocate( wide_directory_name_size ); if( internal_directory_entry->wide_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create wide character directory name.", function ); goto on_error; } if( libcdirectory_system_string_copy_to_wide_string( directory_name, directory_name_length + 1, internal_directory_entry->wide_name, wide_directory_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set wide character directory name.", function ); goto on_error; } *name = internal_directory_entry->wide_name; #endif return( 1 ); #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) on_error: if( internal_directory_entry->wide_name != NULL ) { memory_free( internal_directory_entry->wide_name ); internal_directory_entry->wide_name = NULL; } return( -1 ); #endif } #elif defined( WINAPI ) /* TODO */ #error WINAPI directory entry structure for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_DIRENT_H ) /* Retrieves the directory entry name * This function uses the POSIX directory entry structure * Returns 1 if successful or -1 on error */ int libcdirectory_directory_entry_get_name_wide( libcdirectory_directory_entry_t *directory_entry, wchar_t **name, libcerror_error_t **error ) { libcdirectory_internal_directory_entry_t *internal_directory_entry = NULL; static char *function = "libcdirectory_directory_entry_get_name_wide"; size_t directory_name_length = 0; size_t wide_directory_name_size = 0; if( directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory entry.", function ); return( -1 ); } internal_directory_entry = (libcdirectory_internal_directory_entry_t *) directory_entry; if( name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name.", function ); return( -1 ); } directory_name_length = narrow_string_length( internal_directory_entry->entry.d_name ); if( libcdirectory_system_string_size_to_wide_string( internal_directory_entry->entry.d_name, directory_name_length + 1, &wide_directory_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine wide character directory name size.", function ); goto on_error; } internal_directory_entry->wide_name = wide_string_allocate( wide_directory_name_size ); if( internal_directory_entry->wide_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create wide character directory name.", function ); goto on_error; } if( libcdirectory_system_string_copy_to_wide_string( internal_directory_entry->entry.d_name, directory_name_length + 1, internal_directory_entry->wide_name, wide_directory_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set wide character directory name.", function ); goto on_error; } *name = internal_directory_entry->wide_name; return( 1 ); on_error: if( internal_directory_entry->wide_name != NULL ) { memory_free( internal_directory_entry->wide_name ); internal_directory_entry->wide_name = NULL; } return( -1 ); } #else #error Missing directory entry structure definition #endif #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libevt-20170120/libcdirectory/libcdirectory_system_string.h0000664000175000017500000000551013040331677026201 0ustar00lordyestalordyesta00000000000000/* * System string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDIRECTORY_SYSTEM_STRING_H ) #define _LIBCDIRECTORY_SYSTEM_STRING_H #include #include #include "libcdirectory_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libcdirectory_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 libcdirectory_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 libcdirectory_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 libcdirectory_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 libcdirectory_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 libcdirectory_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 libcdirectory_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 libcdirectory_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( _LIBCDIRECTORY_SYSTEM_STRING_H ) */ libevt-20170120/libcdirectory/libcdirectory_directory.c0000664000175000017500000012231013040331677025264 0ustar00lordyestalordyesta00000000000000/* * Directory functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #if defined( HAVE_ERRNO_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_SYS_STAT_H ) #include #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #include #endif #if defined( HAVE_DIRENT_H ) #include #endif #if defined( HAVE_UNISTD_H ) #include #endif #include "libcdirectory_definitions.h" #include "libcdirectory_directory.h" #include "libcdirectory_directory_entry.h" #include "libcdirectory_libcerror.h" #include "libcdirectory_system_string.h" #include "libcdirectory_types.h" #include "libcdirectory_wide_string.h" /* Creates a directory * Make sure the value directory is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcdirectory_directory_initialize( libcdirectory_directory_t **directory, libcerror_error_t **error ) { libcdirectory_internal_directory_t *internal_directory = NULL; static char *function = "libcdirectory_directory_initialize"; if( directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory.", function ); return( -1 ); } if( *directory != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid directory value already set.", function ); return( -1 ); } internal_directory = memory_allocate_structure( libcdirectory_internal_directory_t ); if( internal_directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create directory.", function ); goto on_error; } if( memory_set( internal_directory, 0, sizeof( libcdirectory_internal_directory_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear directory.", function ); goto on_error; } #if defined( WINAPI ) internal_directory->handle = INVALID_HANDLE_VALUE; #endif *directory = (libcdirectory_directory_t *) internal_directory; return( 1 ); on_error: if( internal_directory != NULL ) { memory_free( internal_directory ); } return( -1 ); } /* Frees a directory * Returns 1 if successful or -1 on error */ int libcdirectory_directory_free( libcdirectory_directory_t **directory, libcerror_error_t **error ) { libcdirectory_internal_directory_t *internal_directory = NULL; static char *function = "libcdirectory_directory_free"; int result = 1; if( directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory.", function ); return( -1 ); } if( *directory != NULL ) { internal_directory = (libcdirectory_internal_directory_t *) *directory; #if defined( WINAPI ) if( internal_directory->handle != INVALID_HANDLE_VALUE ) #else if( internal_directory->stream != NULL ) #endif { if( libcdirectory_directory_close( *directory, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close directory.", function ); result = -1; } } *directory = NULL; memory_free( internal_directory ); } return( result ); } #if defined( WINAPI ) && ( WINVER >= 0x0501 ) /* Opens a directory * This function uses the WINAPI function for Windows XP or later * Returns 1 if successful or -1 on error */ int libcdirectory_directory_open( libcdirectory_directory_t *directory, const char *directory_name, libcerror_error_t **error ) { libcdirectory_internal_directory_t *internal_directory = NULL; libcdirectory_internal_directory_entry_t *internal_first_directory_entry = NULL; system_character_t *system_directory_name = NULL; static char *function = "libcdirectory_directory_open"; size_t directory_name_length = 0; size_t system_directory_name_size = 0; DWORD error_code = 0; if( directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory.", function ); return( -1 ); } internal_directory = (libcdirectory_internal_directory_t *) 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( internal_directory->handle != INVALID_HANDLE_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid directory - handle value already set.", function ); return( -1 ); } if( internal_directory->first_entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid directory - first entry value already set.", function ); return( -1 ); } if( libcdirectory_directory_entry_initialize( &( internal_directory->first_entry ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create first entry.", function ); goto on_error; } if( internal_directory->first_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid directory - missing first entry.", function ); goto on_error; } internal_first_directory_entry = (libcdirectory_internal_directory_entry_t *) internal_directory->first_entry; directory_name_length = narrow_string_length( directory_name ); if( libcdirectory_system_string_size_from_narrow_string( directory_name, directory_name_length + 1, &system_directory_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine system character directory name size.", function ); goto on_error; } /* Find files requires a search path, add a \ and * if necessary */ if( ( directory_name_length < 2 ) || ( directory_name[ directory_name_length - 1 ] != '\\' ) ) { system_directory_name_size += 1; } system_directory_name_size += 1; system_directory_name = system_string_allocate( system_directory_name_size ); if( system_directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create system character directory name.", function ); goto on_error; } if( libcdirectory_system_string_copy_from_narrow_string( system_directory_name, system_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 system character directory name.", function ); goto on_error; } /* Find files requires a search path, add a \ and * if necessary */ if( ( directory_name_length < 2 ) || ( directory_name[ directory_name_length - 1 ] != '\\' ) ) { system_directory_name[ system_directory_name_size - 3 ] = (system_character_t) '\\'; } system_directory_name[ system_directory_name_size - 2 ] = (system_character_t) '*'; system_directory_name[ system_directory_name_size - 1 ] = 0; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) /* Cannot use FindFirstFileA here because it requires a narrow version of WIN32_FIND_DATA */ internal_directory->handle = FindFirstFileW( (LPCWSTR) system_directory_name, &( internal_first_directory_entry->find_data ) ); #else internal_directory->handle = FindFirstFileA( (LPCSTR) system_directory_name, &( internal_first_directory_entry->find_data ) ); #endif if( internal_directory->handle == INVALID_HANDLE_VALUE ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, error_code, "%s: unable to open directory.", function ); goto on_error; } memory_free( system_directory_name ); return( 1 ); on_error: if( system_directory_name != NULL ) { memory_free( system_directory_name ); } if( internal_directory->first_entry != NULL ) { libcdirectory_directory_entry_free( &( internal_directory->first_entry ), NULL ); } return( -1 ); } #elif defined( WINAPI ) /* TODO */ #error WINAPI open directory for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_OPENDIR ) /* Opens a directory * This function uses the POSIX opendir function * Returns 1 if successful or -1 on error */ int libcdirectory_directory_open( libcdirectory_directory_t *directory, const char *directory_name, libcerror_error_t **error ) { libcdirectory_internal_directory_t *internal_directory = NULL; static char *function = "libcdirectory_directory_open"; if( directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory.", function ); return( -1 ); } internal_directory = (libcdirectory_internal_directory_t *) 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( internal_directory->stream != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid directory - stream value already set.", function ); return( -1 ); } internal_directory->stream = opendir( directory_name ); if( internal_directory->stream == NULL ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, errno, "%s: unable to open directory.", function ); return( -1 ); } return( 1 ); } #else #error Missing open directory function #endif #if defined( HAVE_WIDE_CHARACTER_TYPE ) #if defined( WINAPI ) && ( WINVER >= 0x0501 ) /* Opens a directory * This function uses the WINAPI function for Windows XP or later * Returns 1 if successful or -1 on error */ int libcdirectory_directory_open_wide( libcdirectory_directory_t *directory, const wchar_t *directory_name, libcerror_error_t **error ) { libcdirectory_internal_directory_t *internal_directory = NULL; libcdirectory_internal_directory_entry_t *internal_first_directory_entry = NULL; system_character_t *system_directory_name = NULL; static char *function = "libcdirectory_directory_open_wide"; size_t directory_name_length = 0; size_t system_directory_name_size = 0; DWORD error_code = 0; if( directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory.", function ); return( -1 ); } internal_directory = (libcdirectory_internal_directory_t *) 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( internal_directory->handle != INVALID_HANDLE_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid directory - handle value already set.", function ); return( -1 ); } if( internal_directory->first_entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid directory - first entry value already set.", function ); return( -1 ); } if( libcdirectory_directory_entry_initialize( &( internal_directory->first_entry ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create first entry.", function ); goto on_error; } if( internal_directory->first_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid directory - missing first entry.", function ); goto on_error; } internal_first_directory_entry = (libcdirectory_internal_directory_entry_t *) internal_directory->first_entry; directory_name_length = wide_string_length( directory_name ); if( libcdirectory_system_string_size_from_wide_string( directory_name, directory_name_length + 1, &system_directory_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine system character directory name size.", function ); goto on_error; } /* Find files requires a search path, add a \ and * if necessary */ if( ( directory_name_length < 2 ) || ( directory_name[ directory_name_length - 1 ] == (wchar_t) '\\' ) ) { system_directory_name_size += 1; } system_directory_name_size += 1; system_directory_name = system_string_allocate( system_directory_name_size ); if( system_directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create system character directory name.", function ); goto on_error; } if( libcdirectory_system_string_copy_from_wide_string( system_directory_name, system_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 system character directory name.", function ); goto on_error; } /* Find files requires a search path, add a \ and * if necessary */ if( ( directory_name_length < 2 ) || ( directory_name[ directory_name_length - 1 ] == (wchar_t) '\\' ) ) { system_directory_name[ system_directory_name_size - 3 ] = (system_character_t) '\\'; } system_directory_name[ system_directory_name_size - 2 ] = (system_character_t) '*'; system_directory_name[ system_directory_name_size - 1 ] = 0; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) internal_directory->handle = FindFirstFileW( (LPCWSTR) system_directory_name, &( internal_first_directory_entry->find_data ) ); #else /* Cannot use FindFirstFileW here because it requires a wide version of WIN32_FIND_DATA */ internal_directory->handle = FindFirstFileA( (LPCSTR) system_directory_name, &( internal_first_directory_entry->find_data ) ); #endif if( internal_directory->handle == INVALID_HANDLE_VALUE ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, error_code, "%s: unable to open directory.", function ); goto on_error; } memory_free( system_directory_name ); return( 1 ); on_error: if( system_directory_name != NULL ) { memory_free( system_directory_name ); } if( internal_directory->first_entry != NULL ) { libcdirectory_directory_entry_free( &( internal_directory->first_entry ), NULL ); } return( -1 ); } #elif defined( WINAPI ) /* TODO */ #error WINAPI open directory for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_OPENDIR ) /* Opens a directory * This function uses the POSIX opendir function * Returns 1 if successful or -1 on error */ int libcdirectory_directory_open_wide( libcdirectory_directory_t *directory, const wchar_t *directory_name, libcerror_error_t **error ) { libcdirectory_internal_directory_t *internal_directory = NULL; static char *function = "libcdirectory_directory_open_wide"; char *system_directory_name = NULL; size_t directory_name_length = 0; size_t system_directory_name_size = 0; if( directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory.", function ); return( -1 ); } internal_directory = (libcdirectory_internal_directory_t *) 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( internal_directory->stream != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid directory - stream value already set.", function ); return( -1 ); } directory_name_length = wide_string_length( directory_name ); if( libcdirectory_system_string_size_from_wide_string( directory_name, directory_name_length + 1, &system_directory_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine system character directory name size.", function ); goto on_error; } system_directory_name = system_string_allocate( system_directory_name_size ); if( system_directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create system character directory name.", function ); goto on_error; } if( libcdirectory_system_string_copy_from_wide_string( system_directory_name, system_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 system character directory name.", function ); goto on_error; } internal_directory->stream = opendir( system_directory_name ); if( internal_directory->stream == NULL ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, errno, "%s: unable to open directory.", function ); goto on_error; } memory_free( system_directory_name ); system_directory_name = NULL; return( 1 ); on_error: if( system_directory_name != NULL ) { memory_free( system_directory_name ); } return( -1 ); } #else #error Missing wide open directory function #endif #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( WINAPI ) && ( WINVER >= 0x0501 ) /* Closes a directory * This function uses the WINAPI function for Windows XP or later * Returns 0 if successful or -1 on error */ int libcdirectory_directory_close( libcdirectory_directory_t *directory, libcerror_error_t **error ) { libcdirectory_internal_directory_t *internal_directory = NULL; static char *function = "libcdirectory_directory_close"; int result = 0; DWORD error_code = 0; if( directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory.", function ); return( -1 ); } internal_directory = (libcdirectory_internal_directory_t *) directory; if( internal_directory->handle != INVALID_HANDLE_VALUE ) { if( FindClose( internal_directory->handle ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, error_code, "%s: unable to close directory.", function ); result = -1; } internal_directory->handle = INVALID_HANDLE_VALUE; } if( internal_directory->first_entry != NULL ) { if( libcdirectory_directory_entry_free( &( internal_directory->first_entry ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free first entry.", function ); result = -1; } } return( result ); } #elif defined( WINAPI ) /* TODO */ #error WINAPI close directory for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_CLOSEDIR ) /* Closes a directory * This function uses the POSIX closedir function * Returns 0 if successful or -1 on error */ int libcdirectory_directory_close( libcdirectory_directory_t *directory, libcerror_error_t **error ) { libcdirectory_internal_directory_t *internal_directory = NULL; static char *function = "libcdirectory_directory_close"; int result = 0; if( directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory.", function ); return( -1 ); } internal_directory = (libcdirectory_internal_directory_t *) directory; if( internal_directory->stream != NULL ) { if( closedir( internal_directory->stream ) != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, errno, "%s: unable to close directory.", function ); result = -1; } internal_directory->stream = NULL; } return( result ); } #else #error Missing close directory function #endif #if defined( WINAPI ) && ( WINVER >= 0x0501 ) /* Reads a directory * This function uses the WINAPI function for Windows XP or later * Returns 1 if successful, 0 if no such entry or -1 on error */ int libcdirectory_directory_read_entry( libcdirectory_directory_t *directory, libcdirectory_directory_entry_t *directory_entry, libcerror_error_t **error ) { libcdirectory_internal_directory_t *internal_directory = NULL; libcdirectory_internal_directory_entry_t *internal_directory_entry = NULL; static char *function = "libcdirectory_directory_read_entry"; DWORD error_code = 0; if( directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory.", function ); return( -1 ); } internal_directory = (libcdirectory_internal_directory_t *) directory; if( directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory entry.", function ); return( -1 ); } internal_directory_entry = (libcdirectory_internal_directory_entry_t *) directory_entry; if( internal_directory->handle == INVALID_HANDLE_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid directory - missing handle.", function ); return( -1 ); } if( internal_directory->first_entry != NULL ) { if( libcdirectory_directory_entry_copy( directory_entry, internal_directory->first_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy first directory entry.", function ); return( -1 ); } if( libcdirectory_directory_entry_free( (libcdirectory_directory_t **) &( internal_directory->first_entry ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free first entry.", function ); return( -1 ); } } else { #if defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( internal_directory_entry->narrow_name != NULL ) { memory_free( internal_directory_entry->narrow_name ); internal_directory_entry->narrow_name = NULL; } #else if( internal_directory_entry->wide_name != NULL ) { memory_free( internal_directory_entry->wide_name ); internal_directory_entry->wide_name = NULL; } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ if( FindNextFile( internal_directory->handle, &( internal_directory_entry->find_data ) ) == 0 ) { error_code = GetLastError(); if( error_code == ERROR_NO_MORE_FILES ) { return( 0 ); } else { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, error_code, "%s: unable to read from directory.", function ); } return( -1 ); } } return( 1 ); } #elif defined( WINAPI ) /* TODO */ #error WINAPI read directory entry for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_READDIR_R ) /* Reads a directory * This function uses the POSIX readdir_r function * Returns 1 if successful, 0 if no such entry or -1 on error */ int libcdirectory_directory_read_entry( libcdirectory_directory_t *directory, libcdirectory_directory_entry_t *directory_entry, libcerror_error_t **error ) { libcdirectory_internal_directory_t *internal_directory = NULL; libcdirectory_internal_directory_entry_t *internal_directory_entry = NULL; struct dirent *result_directory_entry = NULL; static char *function = "libcdirectory_directory_read_entry"; int result = 0; if( directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory.", function ); return( -1 ); } internal_directory = (libcdirectory_internal_directory_t *) directory; if( directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory entry.", function ); return( -1 ); } internal_directory_entry = (libcdirectory_internal_directory_entry_t *) directory_entry; if( internal_directory->stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid directory - missing stream.", function ); return( -1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( internal_directory_entry->narrow_name != NULL ) { memory_free( internal_directory_entry->narrow_name ); internal_directory_entry->narrow_name = NULL; } #else if( internal_directory_entry->wide_name != NULL ) { memory_free( internal_directory_entry->wide_name ); internal_directory_entry->wide_name = NULL; } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ result = readdir_r( internal_directory->stream, &( internal_directory_entry->entry ), &result_directory_entry ); if( result != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, errno, "%s: unable to read from directory.", function ); return( -1 ); } if( result_directory_entry == NULL ) { return( 0 ); } return( 1 ); } #else #error Missing read directory entry function #endif /* Determines if a directory has a specific entry * Returns 1 if the directory has the corresponding entry, 0 if not or -1 on error */ int libcdirectory_directory_has_entry( libcdirectory_directory_t *directory, libcdirectory_directory_entry_t *directory_entry, const char *entry_name, size_t entry_name_length, uint8_t entry_type, uint8_t compare_flags, libcerror_error_t **error ) { libcdirectory_directory_entry_t *search_directory_entry = NULL; char *search_directory_entry_name = NULL; static char *function = "libcdirectory_directory_read_entry"; size_t search_directory_entry_name_length = 0; uint8_t search_directory_entry_type = 0; int entry_found = 0; int match = 0; int result = 0; if( directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory.", function ); return( -1 ); } if( directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory entry.", function ); return( -1 ); } if( entry_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry name.", function ); return( -1 ); } if( entry_name_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entry name length value exceeds maximum.", function ); return( -1 ); } if( ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_DEVICE ) && ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_DIRECTORY ) && ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_FILE ) && ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_LINK ) && ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_PIPE ) && ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_SOCKET ) && ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_UNDEFINED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported entry type.", function ); return( -1 ); } if( ( compare_flags & ~( LIBCDIRECTORY_COMPARE_FLAG_NO_CASE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported compare flags.", function ); return( -1 ); } if( libcdirectory_directory_entry_initialize( &search_directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create search directory entry.", function ); goto on_error; } entry_found = 0; do { result = libcdirectory_directory_read_entry( directory, search_directory_entry, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read directory entry.", function ); goto on_error; } else if( result == 0 ) { break; } if( libcdirectory_directory_entry_get_type( search_directory_entry, &search_directory_entry_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve directory entry type.", function ); goto on_error; } if( search_directory_entry_type == entry_type ) { if( libcdirectory_directory_entry_get_name( search_directory_entry, &search_directory_entry_name, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve directory entry name.", function ); goto on_error; } search_directory_entry_name_length = narrow_string_length( search_directory_entry_name ); if( search_directory_entry_name_length == entry_name_length ) { /* If there is an exact match we're done searching */ match = narrow_string_compare( search_directory_entry_name, entry_name, entry_name_length ); if( match == 0 ) { if( libcdirectory_directory_entry_copy( directory_entry, search_directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy search directory entry.", function ); goto on_error; } entry_found = 1; break; } /* Ignore successive caseless matches */ if( ( ( compare_flags & LIBCDIRECTORY_COMPARE_FLAG_NO_CASE ) != 0 ) && ( entry_found == 0 ) ) { match = narrow_string_compare_no_case( search_directory_entry_name, entry_name, entry_name_length ); if( match == 0 ) { if( libcdirectory_directory_entry_copy( directory_entry, search_directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy search directory entry.", function ); goto on_error; } entry_found = 1; } } } } } while( result != 0 ); if( libcdirectory_directory_entry_free( &search_directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free search directory entry.", function ); goto on_error; } return( entry_found ); on_error: if( search_directory_entry != NULL ) { libcdirectory_directory_entry_free( &search_directory_entry, NULL ); } return( -1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Determines if a directory has a specific entry * Returns 1 if the directory has the corresponding entry, 0 if not or -1 on error */ int libcdirectory_directory_has_entry_wide( libcdirectory_directory_t *directory, libcdirectory_directory_entry_t *directory_entry, const wchar_t *entry_name, size_t entry_name_length, uint8_t entry_type, uint8_t compare_flags, libcerror_error_t **error ) { libcdirectory_directory_entry_t *search_directory_entry = NULL; wchar_t *search_directory_entry_name = NULL; static char *function = "libcdirectory_directory_read_entry_wide"; size_t search_directory_entry_name_length = 0; uint8_t search_directory_entry_type = 0; int entry_found = 0; int match = 0; int result = 0; if( directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory.", function ); return( -1 ); } if( directory_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory entry.", function ); return( -1 ); } if( entry_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry name.", function ); return( -1 ); } if( entry_name_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entry name length value exceeds maximum.", function ); return( -1 ); } if( ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_DEVICE ) && ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_DIRECTORY ) && ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_FILE ) && ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_LINK ) && ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_PIPE ) && ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_SOCKET ) && ( entry_type != LIBCDIRECTORY_ENTRY_TYPE_UNDEFINED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported entry type.", function ); return( -1 ); } if( ( compare_flags & ~( LIBCDIRECTORY_COMPARE_FLAG_NO_CASE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported compare flags.", function ); return( -1 ); } if( libcdirectory_directory_entry_initialize( &search_directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create search directory entry.", function ); goto on_error; } entry_found = 0; do { result = libcdirectory_directory_read_entry( directory, search_directory_entry, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read directory entry.", function ); goto on_error; } else if( result == 0 ) { break; } if( libcdirectory_directory_entry_get_type( search_directory_entry, &search_directory_entry_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve directory entry type.", function ); goto on_error; } if( search_directory_entry_type == entry_type ) { if( libcdirectory_directory_entry_get_name_wide( search_directory_entry, &search_directory_entry_name, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve directory entry name.", function ); goto on_error; } search_directory_entry_name_length = wide_string_length( search_directory_entry_name ); if( search_directory_entry_name_length == entry_name_length ) { /* If there is an exact match we're done searching */ match = wide_string_compare( search_directory_entry_name, entry_name, entry_name_length ); if( match == 0 ) { if( libcdirectory_directory_entry_copy( directory_entry, search_directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy search directory entry.", function ); goto on_error; } entry_found = 1; break; } /* Ignore successive caseless matches */ if( ( ( compare_flags & LIBCDIRECTORY_COMPARE_FLAG_NO_CASE ) != 0 ) && ( entry_found == 0 ) ) { match = wide_string_compare_no_case( search_directory_entry_name, entry_name, entry_name_length ); if( match == 0 ) { if( libcdirectory_directory_entry_copy( directory_entry, search_directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy search directory entry.", function ); goto on_error; } entry_found = 1; } } } } } while( result != 0 ); if( libcdirectory_directory_entry_free( &search_directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free search directory entry.", function ); goto on_error; } return( entry_found ); on_error: if( search_directory_entry != NULL ) { libcdirectory_directory_entry_free( &search_directory_entry, NULL ); } return( -1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libevt-20170120/libcdirectory/libcdirectory_directory_entry.h0000664000175000017500000000622013040331677026513 0ustar00lordyestalordyesta00000000000000/* * Directory entry functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDIRECTORY_DIRECTORY_ENTRY_H ) #define _LIBCDIRECTORY_DIRECTORY_ENTRY_H #include #include #if defined( HAVE_SYS_STAT_H ) #include #endif #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 #include #endif #if defined( HAVE_DIRENT_H ) #include #endif #if defined( HAVE_IO_H ) || defined( WINAPI ) #include #endif #include "libcdirectory_extern.h" #include "libcdirectory_libcerror.h" #include "libcdirectory_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcdirectory_internal_directory_entry libcdirectory_internal_directory_entry_t; #if defined( WINAPI ) struct libcdirectory_internal_directory_entry { WIN32_FIND_DATA find_data; #if defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_SYSTEM_CHARACTER ) char *narrow_name; #else wchar_t *wide_name; #endif }; #elif defined( HAVE_DIRENT_H ) struct libcdirectory_internal_directory_entry { struct dirent entry; #if defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_SYSTEM_CHARACTER ) char *narrow_name; #else wchar_t *wide_name; #endif }; #endif /* defined( WINAPI ) */ LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_entry_initialize( libcdirectory_directory_entry_t **directory_entry, libcerror_error_t **error ); LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_entry_free( libcdirectory_directory_entry_t **directory_entry, libcerror_error_t **error ); int libcdirectory_directory_entry_copy( libcdirectory_directory_entry_t *destination_directory_entry, libcdirectory_directory_entry_t *source_directory_entry, libcerror_error_t **error ); LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_entry_get_type( libcdirectory_directory_entry_t *directory_entry, uint8_t *type, libcerror_error_t **error ); LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_entry_get_name( libcdirectory_directory_entry_t *directory_entry, char **name, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_entry_get_name_wide( libcdirectory_directory_entry_t *directory_entry, wchar_t **name, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDIRECTORY_DIRECTORY_ENTRY_H ) */ libevt-20170120/libcdirectory/libcdirectory_directory.h0000664000175000017500000000642513040331677025301 0ustar00lordyestalordyesta00000000000000/* * Directory functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDIRECTORY_DIRECTORY_H ) #define _LIBCDIRECTORY_DIRECTORY_H #include #include #if defined( HAVE_DIRENT_H ) #include #endif #include "libcdirectory_directory_entry.h" #include "libcdirectory_extern.h" #include "libcdirectory_libcerror.h" #include "libcdirectory_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcdirectory_internal_directory libcdirectory_internal_directory_t; #if defined( WINAPI ) struct libcdirectory_internal_directory { HANDLE handle; libcdirectory_directory_entry_t *first_entry; }; #elif defined( HAVE_DIRENT_H ) struct libcdirectory_internal_directory { DIR *stream; }; #endif LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_initialize( libcdirectory_directory_t **directory, libcerror_error_t **error ); LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_free( libcdirectory_directory_t **directory, libcerror_error_t **error ); LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_open( libcdirectory_directory_t *directory, const char *directory_name, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_open_wide( libcdirectory_directory_t *directory, const wchar_t *directory_name, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_close( libcdirectory_directory_t *directory, libcerror_error_t **error ); LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_read_entry( libcdirectory_directory_t *directory, libcdirectory_directory_entry_t *directory_entry, libcerror_error_t **error ); LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_has_entry( libcdirectory_directory_t *directory, libcdirectory_directory_entry_t *directory_entry, const char *entry_name, size_t entry_name_length, uint8_t entry_type, uint8_t compare_flags, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBCDIRECTORY_EXTERN \ int libcdirectory_directory_has_entry_wide( libcdirectory_directory_t *directory, libcdirectory_directory_entry_t *directory_entry, const wchar_t *entry_name, size_t entry_name_length, uint8_t entry_type, uint8_t compare_flags, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDIRECTORY_DIRECTORY_H ) */ libevt-20170120/libcdirectory/libcdirectory_support.h0000664000175000017500000000277013040331677025010 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDIRECTORY_SUPPORT_H ) #define _LIBCDIRECTORY_SUPPORT_H #include #include #include "libcdirectory_extern.h" #include "libcdirectory_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCDIRECTORY ) LIBCDIRECTORY_EXTERN \ const char *libcdirectory_get_version( void ); LIBCDIRECTORY_EXTERN \ int libcdirectory_get_codepage( int *codepage, libcerror_error_t **error ); LIBCDIRECTORY_EXTERN \ int libcdirectory_set_codepage( int codepage, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBCDIRECTORY ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDIRECTORY_SUPPORT_H ) */ libevt-20170120/libcdirectory/libcdirectory_libcerror.h0000664000175000017500000000266013040331677025255 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDIRECTORY_LIBCERROR_H ) #define _LIBCDIRECTORY_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( _LIBCDIRECTORY_LIBCERROR_H ) */ libevt-20170120/libcdirectory/libcdirectory_libuna.h0000664000175000017500000000325413040331677024544 0ustar00lordyestalordyesta00000000000000/* * The libuna header wrapper * * Copyright (C) 2008-2017, Joachim Metz * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDIRECTORY_LIBUNA_H ) #define _LIBCDIRECTORY_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( _LIBCDIRECTORY_LIBUNA_H ) */ libevt-20170120/libcdirectory/Makefile.in0000664000175000017500000010045513040342657022251 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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 = libcdirectory ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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) libcdirectory_la_LIBADD = am__libcdirectory_la_SOURCES_DIST = libcdirectory_definitions.h \ libcdirectory_error.c libcdirectory_error.h \ libcdirectory_extern.h libcdirectory_directory.c \ libcdirectory_directory.h libcdirectory_directory_entry.c \ libcdirectory_directory_entry.h libcdirectory_libcerror.h \ libcdirectory_libclocale.h libcdirectory_libuna.h \ libcdirectory_support.c libcdirectory_support.h \ libcdirectory_system_string.c libcdirectory_system_string.h \ libcdirectory_types.h libcdirectory_unused.h \ libcdirectory_wide_string.c libcdirectory_wide_string.h @HAVE_LOCAL_LIBCDIRECTORY_TRUE@am_libcdirectory_la_OBJECTS = \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_error.lo \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_directory.lo \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_directory_entry.lo \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_support.lo \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_system_string.lo \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_wide_string.lo libcdirectory_la_OBJECTS = $(am_libcdirectory_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_LIBCDIRECTORY_TRUE@am_libcdirectory_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__depfiles_maybe = depfiles 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 = $(libcdirectory_la_SOURCES) DIST_SOURCES = $(am__libcdirectory_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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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_LIBCDIRECTORY_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ @LIBUNA_CPPFLAGS@ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@noinst_LTLIBRARIES = libcdirectory.la @HAVE_LOCAL_LIBCDIRECTORY_TRUE@libcdirectory_la_SOURCES = \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_definitions.h \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_error.c libcdirectory_error.h \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_extern.h \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_directory.c libcdirectory_directory.h \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_directory_entry.c libcdirectory_directory_entry.h \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_libcerror.h \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_libclocale.h \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_libuna.h \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_support.c libcdirectory_support.h \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_system_string.c libcdirectory_system_string.h \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_types.h \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_unused.h \ @HAVE_LOCAL_LIBCDIRECTORY_TRUE@ libcdirectory_wide_string.c libcdirectory_wide_string.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcdirectory/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcdirectory/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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}; \ } libcdirectory.la: $(libcdirectory_la_OBJECTS) $(libcdirectory_la_DEPENDENCIES) $(EXTRA_libcdirectory_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libcdirectory_la_rpath) $(libcdirectory_la_OBJECTS) $(libcdirectory_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdirectory_directory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdirectory_directory_entry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdirectory_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdirectory_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdirectory_system_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdirectory_wide_string.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcdirectory ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcdirectory_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: libevt-20170120/libcdirectory/libcdirectory_definitions.h0000664000175000017500000000342313040331677025603 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBCDIRECTORY_INTERNAL_DEFINITIONS_H ) #define LIBCDIRECTORY_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCDIRECTORY for local use of libcdirectory */ #if !defined( HAVE_LOCAL_LIBCDIRECTORY ) #include /* The definitions in are copied here * for local use of libcdirectory */ #else #define LIBCDIRECTORY_VERSION 20170104 /* The libcdirectory version string */ #define LIBCDIRECTORY_VERSION_STRING "20170104" /* The directory entry type definitions */ enum LIBCDIRECTORY_ENTRY_TYPES { LIBCDIRECTORY_ENTRY_TYPE_UNDEFINED, LIBCDIRECTORY_ENTRY_TYPE_DEVICE, LIBCDIRECTORY_ENTRY_TYPE_DIRECTORY, LIBCDIRECTORY_ENTRY_TYPE_FILE, LIBCDIRECTORY_ENTRY_TYPE_LINK, LIBCDIRECTORY_ENTRY_TYPE_PIPE, LIBCDIRECTORY_ENTRY_TYPE_SOCKET }; /* The directory entry compare flags */ enum LIBCDIRECTORY_COMPARE_FLAGS { LIBCDIRECTORY_COMPARE_FLAG_NO_CASE = 0x01 }; #endif #endif libevt-20170120/libcdirectory/libcdirectory_wide_string.c0000664000175000017500000000367113040331677025606 0ustar00lordyestalordyesta00000000000000/* * Wide character string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_WCTYPE_H ) #include #endif #include "libcdirectory_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 libcdirectory_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 ) */ libevt-20170120/libcdirectory/libcdirectory_types.h0000664000175000017500000000325113040331677024433 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDIRECTORY_INTERNAL_TYPES_H ) #define _LIBCDIRECTORY_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBCDIRECTORY for local use of libcdirectory * The definitions in are copied here * for local use of libcdirectory */ #if defined( HAVE_LOCAL_LIBCDIRECTORY ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libcdirectory_directory {} libcdirectory_directory_t; typedef struct libcdirectory_directory_entry {} libcdirectory_directory_entry_t; #else typedef intptr_t libcdirectory_directory_t; typedef intptr_t libcdirectory_directory_entry_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBCDIRECTORY ) */ #endif /* !defined( _LIBCDIRECTORY_INTERNAL_TYPES_H ) */ libevt-20170120/libcdirectory/libcdirectory_libclocale.h0000664000175000017500000000270513040331677025363 0ustar00lordyestalordyesta00000000000000/* * The internal libclocale header * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDIRECTORY_LIBCLOCALE_H ) #define _LIBCDIRECTORY_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( _LIBCDIRECTORY_LIBCLOCALE_H ) */ libevt-20170120/libcdirectory/libcdirectory_system_string.c0000664000175000017500000006207613040331677026206 0ustar00lordyestalordyesta00000000000000/* * System string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include "libcdirectory_libcerror.h" #include "libcdirectory_libclocale.h" #include "libcdirectory_libuna.h" #include "libcdirectory_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 libcdirectory_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 = "libcdirectory_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 libcdirectory_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 = "libcdirectory_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 libcdirectory_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 = "libcdirectory_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 libcdirectory_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 = "libcdirectory_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 libcdirectory_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 = "libcdirectory_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 libcdirectory_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 = "libcdirectory_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 libcdirectory_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 = "libcdirectory_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 libcdirectory_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 = "libcdirectory_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 ) */ libevt-20170120/po/0000775000175000017500000000000013040343017015746 5ustar00lordyestalordyesta00000000000000libevt-20170120/po/en@quot.header0000644000175000017500000000226311642277124020547 0ustar00lordyestalordyesta00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # libevt-20170120/po/Rules-quot0000644000175000017500000000340011642277124017757 0ustar00lordyestalordyesta00000000000000# Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header libevt-20170120/po/POTFILES.in0000644000175000017500000000007311642277124017534 0ustar00lordyestalordyesta00000000000000# List of source files which contain translatable strings. libevt-20170120/po/remove-potcdate.sin0000644000175000017500000000066011642277124021572 0ustar00lordyestalordyesta00000000000000# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } libevt-20170120/po/Makevars.in0000644000175000017500000000342011642277124020057 0ustar00lordyestalordyesta00000000000000# 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 = libevt-20170120/po/ChangeLog0000664000175000017500000000006213006112167017520 0ustar00lordyestalordyesta000000000000002016-11-01 gettextize libevt-20170120/po/en@boldquot.header0000644000175000017500000000247111642277124021411 0ustar00lordyestalordyesta00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # libevt-20170120/po/quot.sed0000644000175000017500000000023111642277124017440 0ustar00lordyestalordyesta00000000000000s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g libevt-20170120/po/Makevars0000664000175000017500000000342013040342670017445 0ustar00lordyestalordyesta00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = libevt # 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 = libevt-20170120/po/insert-header.sin0000644000175000017500000000124011642277124021221 0ustar00lordyestalordyesta00000000000000# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } libevt-20170120/po/Makefile.in.in0000644000175000017500000003744211642277124020443 0ustar00lordyestalordyesta00000000000000# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # # Origin: gettext-0.18 GETTEXT_MACRO_VERSION = 0.18 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) MSGFMT_ = @MSGFMT@ MSGFMT_no = @MSGFMT@ MSGFMT_yes = @MSGFMT_015@ MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: check-macro-version all-@USE_NLS@ all-yes: stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. check-macro-version: @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, stamp-po is a nop (i.e. a phony target). # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch stamp-po" && \ echo timestamp > stamp-poT && \ mv stamp-poT stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ package_gnu='GNU '; \ else \ package_gnu=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --package-name="$${package_gnu}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${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-7] | 0.1[0-7].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${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: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: stamp-po $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$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-7] | 0.1[0-7].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -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: libevt-20170120/po/boldquot.sed0000644000175000017500000000033111642277124020302 0ustar00lordyestalordyesta00000000000000s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g s/“/“/g s/”/”/g s/‘/‘/g s/’/’/g libevt-20170120/libfdata/0000775000175000017500000000000013040343016017075 5ustar00lordyestalordyesta00000000000000libevt-20170120/libfdata/libfdata_segments_array.h0000664000175000017500000000533213040331701024120 0ustar00lordyestalordyesta00000000000000/* * The segments array functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_SEGMENTS_ARRAY_H ) #define _LIBFDATA_SEGMENTS_ARRAY_H #include #include #include "libfdata_libcdata.h" #include "libfdata_libcerror.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 ) */ libevt-20170120/libfdata/libfdata_cache.c0000664000175000017500000000317413040331700022134 0ustar00lordyestalordyesta00000000000000/* * Cache functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "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 ) */ libevt-20170120/libfdata/libfdata_support.c0000664000175000017500000000222613040331701022603 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_support.h" #if !defined( HAVE_LOCAL_LIBFDATA ) /* Returns the library version as a string */ const char *libfdata_get_version( void ) { return( (const char *) LIBFDATA_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ libevt-20170120/libfdata/libfdata_btree_node.c0000664000175000017500000012735313040331700023205 0ustar00lordyestalordyesta00000000000000/* * The balanced tree node functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_btree_node.h" #include "libfdata_btree_range.h" #include "libfdata_definitions.h" #include "libfdata_libcdata.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_types.h" /* Creates a node * Make sure the value node is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfdata_btree_node_initialize( libfdata_btree_node_t **node, int level, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_initialize"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( *node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid node value already set.", function ); return( -1 ); } if( level < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid level value less than zero.", function ); return( -1 ); } internal_tree_node = memory_allocate_structure( libfdata_internal_btree_node_t ); if( internal_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create node.", function ); goto on_error; } if( memory_set( internal_tree_node, 0, sizeof( libfdata_internal_btree_node_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear node.", function ); memory_free( internal_tree_node ); return( -1 ); } internal_tree_node->level = level; internal_tree_node->flags = LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; *node = (libfdata_btree_node_t *) internal_tree_node; return( 1 ); on_error: if( internal_tree_node != NULL ) { memory_free( internal_tree_node ); } return( -1 ); } /* Frees a node * Returns 1 if successful or -1 on error */ int libfdata_btree_node_free( libfdata_btree_node_t **node, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_free"; int result = 1; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( *node != NULL ) { internal_tree_node = (libfdata_internal_btree_node_t *) *node; *node = NULL; if( internal_tree_node->sub_node_ranges_array != NULL ) { if( libcdata_array_free( &( internal_tree_node->sub_node_ranges_array ), (int (*)(intptr_t **, libcerror_error_t **error)) &libfdata_btree_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the sub node ranges array.", function ); result = -1; } } if( internal_tree_node->leaf_value_ranges_array != NULL ) { if( libcdata_array_free( &( internal_tree_node->leaf_value_ranges_array ), (int (*)(intptr_t **, libcerror_error_t **error)) &libfdata_btree_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the leaf value ranges array.", function ); result = -1; } } memory_free( internal_tree_node ); } return( result ); } /* Node functions */ /* Retrieves the level * Returns 1 if successful or -1 on error */ int libfdata_btree_node_get_level( libfdata_btree_node_t *node, int *level, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_get_level"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( level == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid level.", function ); return( -1 ); } *level = internal_tree_node->level; return( 1 ); } /* Determines if the node is a branch node * Returns 1 if a branch node, 0 if not or -1 on error */ int libfdata_btree_node_is_branch( libfdata_btree_node_t *node, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_is_branch"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_BTREE_NODE_FLAG_IS_BRANCH ) != 0 ) { return( 1 ); } return( 0 ); } /* Determines if the node is a leaf node * Returns 1 if a leaf node, 0 if not or -1 on error */ int libfdata_btree_node_is_leaf( libfdata_btree_node_t *node, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_is_leaf"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_BTREE_NODE_FLAG_IS_LEAF ) != 0 ) { return( 1 ); } return( 0 ); } /* Determines if the node is a root node * Returns 1 if a root node, 0 if not or -1 on error */ int libfdata_btree_node_is_root( libfdata_btree_node_t *node, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_is_root"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( internal_tree_node->level == 0 ) { return( 1 ); } return( 0 ); } /* Sub node data range functions */ /* Retrieves the number of sub nodes * Returns 1 if successful or -1 on error */ int libfdata_btree_node_get_number_of_sub_nodes( libfdata_btree_node_t *node, int *number_of_sub_nodes, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_get_number_of_sub_nodes"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( internal_tree_node->sub_node_ranges_array == NULL ) { if( number_of_sub_nodes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of sub nodes.", function ); return( -1 ); } *number_of_sub_nodes = 0; } else { if( libcdata_array_get_number_of_entries( internal_tree_node->sub_node_ranges_array, number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub node ranges array.", function ); return( -1 ); } } return( 1 ); } /* Retrieves a specific sub node data range * Returns 1 if successful or -1 on error */ int libfdata_btree_node_get_sub_node_data_range_by_index( libfdata_btree_node_t *node, int sub_node_index, libfdata_btree_range_t **sub_node_data_range, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_get_sub_node_data_range_by_index"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( internal_tree_node->sub_node_ranges_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing sub node ranges array.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_tree_node->sub_node_ranges_array, sub_node_index, (intptr_t **) sub_node_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub node ranges array.", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Retrieves a sub node data range for a specific mapped index * Returns 1 if successful or -1 on error */ int libfdata_btree_node_get_sub_node_data_range_by_mapped_index( libfdata_btree_node_t *node, int mapped_index, libfdata_btree_range_t **sub_node_data_range, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_get_sub_node_data_range_by_mapped_index"; int number_of_sub_nodes = 0; int sub_node_index = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( internal_tree_node->sub_node_ranges_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing sub node ranges array.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid node - unsupported flags calculate mapped ranges is set.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: requested index: %d\n", function, mapped_index ); } #endif if( libcdata_array_get_number_of_entries( internal_tree_node->sub_node_ranges_array, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub node ranges array.", function ); return( -1 ); } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libcdata_array_get_entry_by_index( internal_tree_node->sub_node_ranges_array, sub_node_index, (intptr_t **) sub_node_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub node ranges array.", function, sub_node_index ); return( -1 ); } if( *sub_node_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing sub node: %d data range.", function, sub_node_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mapped range: %d - %d\n", function, ( *sub_node_data_range )->mapped_first_leaf_value_index, ( *sub_node_data_range )->mapped_last_leaf_value_index ); } #endif if( ( mapped_index >= ( *sub_node_data_range )->mapped_first_leaf_value_index ) && ( mapped_index <= ( *sub_node_data_range )->mapped_last_leaf_value_index ) ) { break; } } if( sub_node_index >= number_of_sub_nodes ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node data range.", function ); return( -1 ); } return( 1 ); } /* Retrieves a sub node data range for a specific key * * Uses the key_value_compare_function to determine the similarity of the key values * The key_value_compare_function should return LIBFDATA_COMPARE_LESS, * LIBFDATA_COMPARE_LESS_EQUAL, LIBFDATA_COMPARE_EQUAL, LIBFDATA_COMPARE_GREATER, * LIBFDATA_COMPARE_GREATER_EQUAL if successful or -1 on error * * Returns 1 if successful, 0 if no such value or -1 on error */ int libfdata_btree_node_get_sub_node_data_range_by_key( libfdata_btree_node_t *node, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), int *sub_node_index, libfdata_btree_range_t **sub_node_data_range, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_get_sub_node_data_range_by_key"; int number_of_sub_nodes = 0; int result = 0; int search_node_index = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( internal_tree_node->sub_node_ranges_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing sub node ranges array.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid node - unsupported flags calculate mapped ranges is set.", function ); 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( libcdata_array_get_number_of_entries( internal_tree_node->sub_node_ranges_array, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub node ranges array.", function ); return( -1 ); } for( search_node_index = 0; search_node_index < number_of_sub_nodes; search_node_index++ ) { if( libcdata_array_get_entry_by_index( internal_tree_node->sub_node_ranges_array, search_node_index, (intptr_t **) sub_node_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub node ranges array.", function, search_node_index ); return( -1 ); } if( *sub_node_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing sub node: %d data range.", function, search_node_index ); return( -1 ); } if( key_value_compare_function == NULL ) { if( key_value == ( *sub_node_data_range )->key_value ) { *sub_node_index = search_node_index; return( 1 ); } } else { result = key_value_compare_function( key_value, ( *sub_node_data_range )->key_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare key value with sub node data range key value: %d.", function, search_node_index ); return( -1 ); } else if( ( result == LIBFDATA_COMPARE_EQUAL ) || ( result == LIBFDATA_COMPARE_GREATER_EQUAL ) || ( result == LIBFDATA_COMPARE_LESS_EQUAL ) ) { *sub_node_index = search_node_index; return( 1 ); } else if( result == LIBFDATA_COMPARE_LESS ) { break; } else if( result != LIBFDATA_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value compare function return value: %d.", function, result ); return( -1 ); } } } *sub_node_data_range = NULL; return( 0 ); } /* Retrieves a specific sub node * Returns 1 if successful or -1 on error */ int libfdata_btree_node_get_sub_node_by_index( libfdata_btree_node_t *node, int sub_node_index, int *sub_node_data_file_index, off64_t *sub_node_data_offset, size64_t *sub_node_data_size, uint32_t *sub_node_data_flags, intptr_t **key_value, libcerror_error_t **error ) { libfdata_btree_range_t *data_range = NULL; static char *function = "libfdata_btree_node_get_sub_node_by_index"; if( libfdata_btree_node_get_sub_node_data_range_by_index( node, sub_node_index, &data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d data range.", function, sub_node_index ); return( -1 ); } if( libfdata_btree_range_get( data_range, sub_node_data_file_index, sub_node_data_offset, sub_node_data_size, sub_node_data_flags, key_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values from sub node: %d data range.", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Sets the offset and size of a specific sub node * Returns 1 if successful or -1 on error */ int libfdata_btree_node_set_sub_node_by_index( libfdata_btree_node_t *node, int sub_node_index, int sub_node_data_file_index, off64_t sub_node_data_offset, size64_t sub_node_data_size, uint32_t sub_node_data_flags, intptr_t *key_value, int (*free_key_value)( intptr_t **key_value, libcerror_error_t **error ), uint8_t key_value_flags, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; libfdata_btree_range_t *data_range = NULL; static char *function = "libfdata_btree_node_set_sub_node_by_index"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( internal_tree_node->sub_node_ranges_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid sub node index value out of bounds.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_tree_node->sub_node_ranges_array, sub_node_index, (intptr_t **) &data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub node ranges array.", function, sub_node_index ); return( -1 ); } if( libfdata_btree_range_set( data_range, sub_node_data_file_index, sub_node_data_offset, sub_node_data_size, sub_node_data_flags, key_value, free_key_value, key_value_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub node: %d data range.", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Appends a sub node offset and size * Returns 1 if successful or -1 on error */ int libfdata_btree_node_append_sub_node( libfdata_btree_node_t *node, int *sub_node_index, int sub_node_data_file_index, off64_t sub_node_data_offset, size64_t sub_node_data_size, uint32_t sub_node_data_flags, intptr_t *key_value, int (*free_key_value)( intptr_t **key_value, libcerror_error_t **error ), uint8_t key_value_flags, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; libfdata_btree_range_t *data_range = NULL; static char *function = "libfdata_btree_node_append_sub_node"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_BTREE_NODE_FLAG_IS_LEAF ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid node - unsupported flags is leaf is set.", function ); return( -1 ); } if( internal_tree_node->sub_node_ranges_array == NULL ) { if( libcdata_array_initialize( &( internal_tree_node->sub_node_ranges_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub node ranges array.", function ); goto on_error; } } if( libfdata_btree_range_initialize( &data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data range.", function ); goto on_error; } if( libfdata_btree_range_set( data_range, sub_node_data_file_index, sub_node_data_offset, sub_node_data_size, sub_node_data_flags, key_value, free_key_value, key_value_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range.", function ); goto on_error; } if( libcdata_array_append_entry( internal_tree_node->sub_node_ranges_array, sub_node_index, (intptr_t *) data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append data range to sub node ranges array.", function ); goto on_error; } internal_tree_node->flags |= LIBFDATA_BTREE_NODE_FLAG_IS_BRANCH; return( 1 ); on_error: if( data_range != NULL ) { libfdata_btree_range_free( &data_range, NULL ); } return( -1 ); } /* Branch leaf values functions */ /* Retrieves the number of leaf values in the branch * Returns 1 if successful or -1 on error */ int libfdata_btree_node_get_number_of_leaf_values_in_branch( libfdata_btree_node_t *node, int *number_of_leaf_values, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_get_number_of_leaf_values_in_branch"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; 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 ); } *number_of_leaf_values = internal_tree_node->branch_number_of_leaf_values; return( 1 ); } /* Leaf value data range functions */ /* Retrieves the number of leaf values * Returns 1 if successful or -1 on error */ int libfdata_btree_node_get_number_of_leaf_values( libfdata_btree_node_t *node, int *number_of_leaf_values, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_get_number_of_leaf_values"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( internal_tree_node->leaf_value_ranges_array == NULL ) { 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 ); } *number_of_leaf_values = 0; } else { if( libcdata_array_get_number_of_entries( internal_tree_node->leaf_value_ranges_array, 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 entries from leaf value ranges array.", function ); return( -1 ); } } return( 1 ); } /* Retrieves a specific leaf value data range * Returns 1 if successful or -1 on error */ int libfdata_btree_node_get_leaf_value_data_range_by_index( libfdata_btree_node_t *node, int leaf_value_index, libfdata_btree_range_t **leaf_value_data_range, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_get_leaf_value_data_range_by_index"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( internal_tree_node->leaf_value_ranges_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing leaf value ranges array.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_tree_node->leaf_value_ranges_array, leaf_value_index, (intptr_t **) leaf_value_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from leaf value ranges array.", function, leaf_value_index ); return( -1 ); } return( 1 ); } /* Retrieves a leaf value data range for a specific mapped index * Returns 1 if successful or -1 on error */ int libfdata_btree_node_get_leaf_value_data_range_by_mapped_index( libfdata_btree_node_t *node, int mapped_index, libfdata_btree_range_t **leaf_value_data_range, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_get_leaf_value_data_range_by_mapped_index"; int number_of_leaf_values = 0; int leaf_value_index = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( internal_tree_node->leaf_value_ranges_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing leaf value ranges array.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid node - unsupported flags calculate mapped ranges is set.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: requested index: %d\n", function, mapped_index ); } #endif if( libcdata_array_get_number_of_entries( internal_tree_node->leaf_value_ranges_array, &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 entries from leaf value ranges array.", function ); return( -1 ); } for( leaf_value_index = 0; leaf_value_index < number_of_leaf_values; leaf_value_index++ ) { if( libcdata_array_get_entry_by_index( internal_tree_node->leaf_value_ranges_array, leaf_value_index, (intptr_t **) leaf_value_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from leaf value ranges array.", function, leaf_value_index ); return( -1 ); } if( *leaf_value_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing leaf value: %d data range.", function, leaf_value_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mapped range: %d\n", function, ( *leaf_value_data_range )->mapped_first_leaf_value_index ); } #endif if( ( mapped_index == ( *leaf_value_data_range )->mapped_first_leaf_value_index ) && ( ( *leaf_value_data_range )->mapped_number_of_leaf_values == 1 ) ) { break; } } if( leaf_value_index >= number_of_leaf_values ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value data range.", function ); return( -1 ); } return( 1 ); } /* Retrieves a leaf value data range for a specific key * * Uses the key_value_compare_function to determine the similarity of the key values * The key_value_compare_function should return LIBFDATA_COMPARE_LESS, * LIBFDATA_COMPARE_EQUAL, LIBFDATA_COMPARE_GREATER if successful or -1 on error * * Returns 1 if successful, 0 if no such value or -1 on error */ int libfdata_btree_node_get_leaf_value_data_range_by_key( libfdata_btree_node_t *node, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), libfdata_btree_range_t **leaf_value_data_range, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; static char *function = "libfdata_btree_node_get_leaf_value_data_range_by_key"; int number_of_leaf_values = 0; int leaf_value_index = 0; 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 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( internal_tree_node->leaf_value_ranges_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing leaf value ranges array.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid node - unsupported flags calculate mapped ranges is set.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_tree_node->leaf_value_ranges_array, &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 entries from leaf value ranges array.", function ); return( -1 ); } for( leaf_value_index = 0; leaf_value_index < number_of_leaf_values; leaf_value_index++ ) { if( libcdata_array_get_entry_by_index( internal_tree_node->leaf_value_ranges_array, leaf_value_index, (intptr_t **) leaf_value_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from leaf value ranges array.", function, leaf_value_index ); return( -1 ); } if( *leaf_value_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing leaf value: %d data range.", function, leaf_value_index ); return( -1 ); } if( key_value_compare_function == NULL ) { if( key_value == ( *leaf_value_data_range )->key_value ) { return( 1 ); } } else { result = key_value_compare_function( key_value, ( *leaf_value_data_range )->key_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare key value with leaf value data range key value: %d.", function, leaf_value_index ); return( -1 ); } else if( result == LIBFDATA_COMPARE_EQUAL ) { return( 1 ); } else if( result == LIBFDATA_COMPARE_LESS ) { return( 0 ); } else if( result != LIBFDATA_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 ); } } } return( 0 ); } /* Retrieves a specific leaf value * Returns 1 if successful or -1 on error */ int libfdata_btree_node_get_leaf_value_by_index( libfdata_btree_node_t *node, int leaf_value_index, int *leaf_value_data_file_index, off64_t *leaf_value_data_offset, size64_t *leaf_value_data_size, uint32_t *leaf_value_data_flags, intptr_t **key_value, libcerror_error_t **error ) { libfdata_btree_range_t *data_range = NULL; static char *function = "libfdata_btree_node_get_leaf_value_by_index"; if( libfdata_btree_node_get_leaf_value_data_range_by_index( node, leaf_value_index, &data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value data range.", function ); return( -1 ); } if( libfdata_btree_range_get( data_range, leaf_value_data_file_index, leaf_value_data_offset, leaf_value_data_size, leaf_value_data_flags, key_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values from leaf value data range.", function ); return( -1 ); } return( 1 ); } /* Retrieves a leaf value for a specific key * * Uses the key_value_compare_function to determine the similarity of the key values * The key_value_compare_function should return LIBFDATA_COMPARE_LESS, * LIBFDATA_COMPARE_EQUAL, LIBFDATA_COMPARE_GREATER if successful or -1 on error * * Returns 1 if successful, 0 if no such value or -1 on error */ int libfdata_btree_node_get_leaf_value_by_key( libfdata_btree_node_t *node, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), int *leaf_value_data_file_index, off64_t *leaf_value_data_offset, size64_t *leaf_value_data_size, uint32_t *leaf_value_data_flags, libcerror_error_t **error ) { libfdata_btree_range_t *data_range = NULL; intptr_t *data_range_key_value = NULL; static char *function = "libfdata_btree_node_get_leaf_value_by_key"; if( libfdata_btree_node_get_leaf_value_data_range_by_key( node, key_value, key_value_compare_function, &data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value data range.", function ); return( -1 ); } if( libfdata_btree_range_get( data_range, leaf_value_data_file_index, leaf_value_data_offset, leaf_value_data_size, leaf_value_data_flags, &data_range_key_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values from leaf value data range.", function ); return( -1 ); } return( 1 ); } /* Sets the offset and size of a specific leaf value * Returns 1 if successful or -1 on error */ int libfdata_btree_node_set_leaf_value_by_index( libfdata_btree_node_t *node, int leaf_value_index, int leaf_value_data_file_index, off64_t leaf_value_data_offset, size64_t leaf_value_data_size, uint32_t leaf_value_data_flags, intptr_t *key_value, int (*free_key_value)( intptr_t **key_value, libcerror_error_t **error ), uint8_t key_value_flags, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; libfdata_btree_range_t *data_range = NULL; static char *function = "libfdata_btree_node_set_leaf_value_by_index"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( internal_tree_node->leaf_value_ranges_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid leaf value index value out of bounds.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_tree_node->leaf_value_ranges_array, leaf_value_index, (intptr_t **) &data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from leaf value ranges array.", function, leaf_value_index ); return( -1 ); } if( libfdata_btree_range_set( data_range, leaf_value_data_file_index, leaf_value_data_offset, leaf_value_data_size, leaf_value_data_flags, key_value, free_key_value, key_value_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set leaf value: %d data range.", function, leaf_value_index ); return( -1 ); } return( 1 ); } /* Appends a leaf value offset and size * Returns 1 if successful or -1 on error */ int libfdata_btree_node_append_leaf_value( libfdata_btree_node_t *node, int *leaf_value_index, int leaf_value_data_file_index, off64_t leaf_value_data_offset, size64_t leaf_value_data_size, uint32_t leaf_value_data_flags, intptr_t *key_value, int (*free_key_value)( intptr_t **key_value, libcerror_error_t **error ), uint8_t key_value_flags, libcerror_error_t **error ) { libfdata_internal_btree_node_t *internal_tree_node = NULL; libfdata_btree_range_t *data_range = NULL; static char *function = "libfdata_btree_node_append_leaf_value"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_btree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_BTREE_NODE_FLAG_IS_BRANCH ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid node - unsupported flags is branch is set.", function ); return( -1 ); } if( internal_tree_node->leaf_value_ranges_array == NULL ) { if( libcdata_array_initialize( &( internal_tree_node->leaf_value_ranges_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create leaf value ranges array.", function ); goto on_error; } } if( libfdata_btree_range_initialize( &data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data range.", function ); goto on_error; } if( libfdata_btree_range_set( data_range, leaf_value_data_file_index, leaf_value_data_offset, leaf_value_data_size, leaf_value_data_flags, key_value, free_key_value, key_value_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range.", function ); goto on_error; } if( libcdata_array_append_entry( internal_tree_node->leaf_value_ranges_array, leaf_value_index, (intptr_t *) data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append data range to leaf value ranges array.", function ); goto on_error; } internal_tree_node->flags |= LIBFDATA_BTREE_NODE_FLAG_IS_LEAF; return( 1 ); on_error: if( data_range != NULL ) { libfdata_btree_range_free( &data_range, NULL ); } return( -1 ); } libevt-20170120/libfdata/libfdata_list_element.c0000664000175000017500000004646613040331700023570 0ustar00lordyestalordyesta00000000000000/* * The list element functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_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, libfdata_list_t *list, int element_index, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_destination_element = NULL; libfdata_internal_list_element_t *internal_source_element = NULL; static char *function = "libfdata_list_element_clone"; if( destination_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination element.", function ); return( -1 ); } if( *destination_element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination element already set.", function ); return( -1 ); } if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( element_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid element index value less than zero.", function ); return( -1 ); } if( source_element == NULL ) { *destination_element = NULL; return( 1 ); } internal_source_element = (libfdata_internal_list_element_t *) source_element; internal_destination_element = memory_allocate_structure( libfdata_internal_list_element_t ); if( internal_destination_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination element.", function ); goto on_error; } if( memory_set( internal_destination_element, 0, sizeof( libfdata_internal_list_element_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear destination element.", function ); memory_free( internal_destination_element ); return( -1 ); } if( libfdata_range_clone( &( internal_destination_element->data_range ), internal_source_element->data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination data range.", function ); goto on_error; } 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 = list; internal_destination_element->element_index = 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, time_t *timestamp, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_get_timestamp"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( timestamp == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid time stamp.", function ); return( -1 ); } *timestamp = internal_element->timestamp; return( 1 ); } /* 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, libfcache_cache_t *cache, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_get_element_value"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( libfdata_list_get_element_value( internal_element->list, file_io_handle, cache, element, element_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value.", function ); return( -1 ); } return( 1 ); } /* Sets the element value * * If the flag LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED is set the list element * takes over management of the value and the value is freed when * no longer needed. * * Returns 1 if successful or -1 on error */ int libfdata_list_element_set_element_value( libfdata_list_element_t *element, intptr_t *file_io_handle, libfcache_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 ); } libevt-20170120/libfdata/libfdata_mapped_range.h0000664000175000017500000000371513040331700023521 0ustar00lordyestalordyesta00000000000000/* * The (data) mapped range functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_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 ) */ libevt-20170120/libfdata/libfdata_extern.h0000664000175000017500000000254513040331700022404 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_EXTERN_H ) #define _LIBFDATA_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFDATA for local use of libfdata */ #if !defined( HAVE_LOCAL_LIBFDATA ) /* If libtool DLL support is enabled set LIBFDATA_DLL_EXPORT * before including libfdata/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFDATA_DLL_EXPORT #endif #include #else #define LIBFDATA_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ #endif /* !defined( _LIBFDATA_INTERNAL_EXTERN_H ) */ libevt-20170120/libfdata/libfdata_list.c0000664000175000017500000032353613040331700022053 0ustar00lordyestalordyesta00000000000000/* * The list functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_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, libfcache_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, libfcache_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; } } 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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, element_index, element_file_index, 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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, element_index, mapped_range_offset, mapped_range_offset + mapped_range_size, mapped_range_size ); } libcnotify_printf( "\n" ); } #endif 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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, *element_index, element_file_index, element_offset, element_offset + element_size, element_size ); libcnotify_printf( "%s: element: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, *element_index, mapped_offset, mapped_offset + element_size, element_size ); libcnotify_printf( "\n" ); } #endif 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 " and size: %" PRIu64 " to list with mapped offset: %" PRIi64 " and size: %" PRIu64 "\n", function, internal_source_list->mapped_offset, internal_source_list->size, 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 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 "\n", function, 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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, element_index, element_file_index, 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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, element_index, mapped_range_offset, mapped_range_offset + mapped_range_size, mapped_range_size ); } libcnotify_printf( "\n" ); } #endif 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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, *element_index, element_file_index, element_offset, element_offset + element_size, element_size ); libcnotify_printf( "%s: element: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, *element_index, mapped_offset, mapped_offset + mapped_size, mapped_size ); libcnotify_printf( "\n" ); } #endif 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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, element_index, element_file_index, element_offset, element_offset + element_size, element_size ); libcnotify_printf( "%s: element: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, element_index, mapped_offset, mapped_offset + mapped_size, mapped_size ); } #endif 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: 0x%08" PRIx64 "\n", function, 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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, search_element_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_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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, search_element_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_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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, search_element_index, element_file_index, element_offset, element_offset + element_size, element_size ); } #endif 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: 0x%08" PRIx64 ".", function, 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: 0x%08" PRIx64 ".", function, 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, libfcache_cache_t *cache, int element_index, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, time_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 ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_cache_element_value"; int cache_entry_index = -1; int number_of_cache_entries = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( element_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element index value out of bounds.", function ); return( -1 ); } if( libfcache_cache_get_number_of_entries( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } if( internal_list->calculate_cache_entry_index == NULL ) { cache_entry_index = element_index % number_of_cache_entries; } else { cache_entry_index = internal_list->calculate_cache_entry_index( element_index, element_file_index, element_offset, element_size, element_flags, number_of_cache_entries ); } if( libfcache_cache_set_value_by_index( cache, cache_entry_index, element_file_index, element_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 entry: %d.", function, cache_entry_index ); 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, libfcache_cache_t *cache, libfdata_list_element_t *element, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_get_element_value"; off64_t cache_value_offset = (off64_t) -1; off64_t element_offset = 0; size64_t element_size = 0; time_t cache_value_timestamp = 0; time_t element_timestamp = 0; uint32_t element_flags = 0; int cache_entry_index = -1; int cache_value_file_index = -1; int element_file_index = -1; int element_index = -1; int number_of_cache_entries = 0; int result = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( 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_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.", function ); return( -1 ); } if( libfcache_cache_get_number_of_entries( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( libfdata_list_element_get_element_index( element, &element_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element index from list element.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } if( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) { if( internal_list->calculate_cache_entry_index == NULL ) { cache_entry_index = element_index % number_of_cache_entries; } else { cache_entry_index = internal_list->calculate_cache_entry_index( element_index, element_file_index, element_offset, element_size, element_flags, number_of_cache_entries ); } if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfdata_list_element_get_timestamp( element, &element_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve time stamp from list element.", function ); return( -1 ); } if( libfcache_cache_value_get_identifier( cache_value, &cache_value_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_offset == cache_value_offset ) && ( element_timestamp == cache_value_timestamp ) ) { result = 1; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( result == 0 ) { libcnotify_printf( "%s: cache: 0x%08" PRIjx " miss (%d out of %d)\n", function, (intptr_t) cache, cache_entry_index, number_of_cache_entries ); } else { libcnotify_printf( "%s: cache: 0x%08" PRIjx " hit (%d out of %d)\n", function, (intptr_t) cache, cache_entry_index, number_of_cache_entries ); } } #endif } if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading element data at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIu64 "\n", function, element_offset, element_offset, element_size ); } #endif if( internal_list->read_element_data( internal_list->data_handle, file_io_handle, element, cache, element_file_index, element_offset, element_size, element_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_offset ); return( -1 ); } if( internal_list->calculate_cache_entry_index == NULL ) { cache_entry_index = element_index % number_of_cache_entries; } else { cache_entry_index = internal_list->calculate_cache_entry_index( element_index, element_file_index, element_offset, element_size, element_flags, number_of_cache_entries ); } if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfdata_list_element_get_timestamp( element, &element_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve time stamp from list element.", function ); return( -1 ); } if( libfcache_cache_value_get_identifier( cache_value, &cache_value_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_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, libfcache_cache_t *cache, int element_index, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_get_element_value_by_index"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( 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, libfcache_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: 0x%08" PRIx64 ".", function, 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, libfcache_cache_t *cache, libfdata_list_element_t *element, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ) { static char *function = "libfdata_list_set_element_value"; off64_t element_offset = 0; size64_t element_size = 0; time_t element_timestamp = 0; uint32_t element_flags = 0; int element_file_index = -1; int element_index = -1; LIBFDATA_UNREFERENCED_PARAMETER( file_io_handle ) 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 from list element.", function ); return( -1 ); } if( libfdata_list_element_get_element_index( element, &element_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element index from list element.", function ); return( -1 ); } if( 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( libfdata_list_cache_element_value( list, cache, element_index, element_file_index, element_offset, element_size, element_flags, 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 cache element value.", 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, libfcache_cache_t *cache, int element_index, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t 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, libfcache_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: 0x%08" PRIx64 ".", function, 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 ); } libevt-20170120/libfdata/libfdata_libcdata.h0000664000175000017500000000301713040331700022635 0ustar00lordyestalordyesta00000000000000/* * The internal libcdata header * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_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 ) */ libevt-20170120/libfdata/libfdata_notify.h0000664000175000017500000000307313040331700022404 0ustar00lordyestalordyesta00000000000000/* * Notification functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_NOTIFY_H ) #define _LIBFDATA_NOTIFY_H #include #include #include #include "libfdata_extern.h" #include "libfdata_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFDATA ) LIBFDATA_EXTERN \ void libfdata_notify_set_verbose( int verbose ); LIBFDATA_EXTERN \ int libfdata_notify_set_stream( FILE *stream, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_notify_stream_open( const char *filename, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_notify_stream_close( libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_NOTIFY_H ) */ libevt-20170120/libfdata/libfdata_range_list.h0000664000175000017500000001360513040331701023226 0ustar00lordyestalordyesta00000000000000/* * The range list functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_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, libfcache_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, libfcache_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, libfcache_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, libfcache_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, libfcache_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, libfcache_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 ) */ libevt-20170120/libfdata/Makefile.am0000664000175000017500000000272113012271504021134 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBFDATA AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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_btree.c libfdata_btree.h \ libfdata_btree_node.c libfdata_btree_node.h \ libfdata_btree_range.c libfdata_btree_range.h \ libfdata_cache.c libfdata_cache.h \ libfdata_definitions.h \ libfdata_error.c libfdata_error.h \ libfdata_extern.h \ libfdata_inline.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_tree.c libfdata_tree.h \ libfdata_tree_node.c libfdata_tree_node.h \ libfdata_types.h \ libfdata_unused.h \ libfdata_vector.c libfdata_vector.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdata_la_SOURCES) libevt-20170120/libfdata/libfdata_error.c0000664000175000017500000000554013040331700022221 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_error.h" #include "libfdata_libcerror.h" #if !defined( HAVE_LOCAL_LIBFDATA ) /* Free an error and its elements */ void libfdata_error_free( libfdata_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfdata_error_fprint( libfdata_error_t *error, FILE *stream ) { 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 ) */ libevt-20170120/libfdata/libfdata_list.h0000664000175000017500000002757213040331700022061 0ustar00lordyestalordyesta00000000000000/* * The list functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_LIST_H ) #define _LIBFDATA_INTERNAL_LIST_H #include #include #include "libfdata_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 calculate cache entry index value */ int (*calculate_cache_entry_index)( int element_index, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_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_list_element_t *list_element, libfcache_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, libfcache_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, libfcache_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, libfcache_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_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, libfcache_cache_t *cache, int element_index, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, time_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, libfcache_cache_t *cache, libfdata_list_element_t *element, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_element_value_by_index( libfdata_list_t *list, intptr_t *file_io_handle, libfcache_cache_t *cache, int element_index, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_element_value_at_offset( libfdata_list_t *list, intptr_t *file_io_handle, libfcache_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, libfcache_cache_t *cache, libfdata_list_element_t *element, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t 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, libfcache_cache_t *cache, int element_index, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t 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, libfcache_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 ) */ libevt-20170120/libfdata/libfdata_btree_range.c0000664000175000017500000002155413040331700023350 0ustar00lordyestalordyesta00000000000000/* * The balanced tree range functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_btree_range.h" #include "libfdata_definitions.h" #include "libfdata_libcerror.h" #include "libfdata_range.h" #include "libfdata_types.h" /* Creates a tree range * Make sure the value range is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfdata_btree_range_initialize( libfdata_btree_range_t **range, libcerror_error_t **error ) { static char *function = "libfdata_btree_range_initialize"; if( range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree range.", function ); return( -1 ); } if( *range != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid tree range value already set.", function ); return( -1 ); } *range = memory_allocate_structure( libfdata_btree_range_t ); if( *range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create tree range.", function ); goto on_error; } if( memory_set( *range, 0, sizeof( libfdata_btree_range_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear tree 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 tree range * Returns 1 if successful or -1 on error */ int libfdata_btree_range_free( libfdata_btree_range_t **range, libcerror_error_t **error ) { static char *function = "libfdata_btree_range_free"; int result = 1; if( range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree range.", function ); return( -1 ); } if( *range != NULL ) { if( ( *range )->key_value != NULL ) { if( ( ( *range )->key_value_flags & LIBFDATA_KEY_VALUE_FLAG_MANAGED ) != 0 ) { if( ( *range )->free_key_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree range - missing free key value function.", function ); result = -1; } else if( ( *range )->free_key_value( &( ( *range )->key_value ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free key value.", function ); result = -1; } } } memory_free( *range ); *range = NULL; } return( result ); } /* Clones (duplicates) the range * Returns 1 if successful or -1 on error */ int libfdata_btree_range_clone( libfdata_btree_range_t **destination_range, libfdata_btree_range_t *source_range, libcerror_error_t **error ) { static char *function = "libfdata_btree_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_btree_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_btree_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; } ( *destination_range )->key_value = NULL; return( 1 ); on_error: if( *destination_range != NULL ) { memory_free( *destination_range ); *destination_range = NULL; } return( -1 ); } /* Retrieves the tree range values * Returns 1 if successful or -1 on error */ int libfdata_btree_range_get( libfdata_btree_range_t *range, int *data_file_index, off64_t *data_offset, size64_t *data_size, uint32_t *data_flags, intptr_t **key_value, libcerror_error_t **error ) { static char *function = "libfdata_btree_range_get"; if( range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree range.", function ); return( -1 ); } if( data_file_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data file index.", function ); return( -1 ); } if( data_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data offset.", function ); return( -1 ); } if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } if( data_flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data flags.", function ); return( -1 ); } if( key_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key value.", function ); return( -1 ); } *data_file_index = range->file_index; *data_offset = range->offset; *data_size = range->size; *data_flags = range->flags; *key_value = range->key_value; return( 1 ); } /* Sets the tree range values * Returns 1 if successful or -1 on error */ int libfdata_btree_range_set( libfdata_btree_range_t *range, int data_file_index, off64_t data_offset, size64_t data_size, uint32_t data_flags, intptr_t *key_value, int (*free_key_value)( intptr_t **key_value, libcerror_error_t **error ), uint8_t key_value_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 tree range.", function ); return( -1 ); } if( free_key_value != NULL ) { if( ( range->key_value_flags & LIBFDATA_KEY_VALUE_FLAG_MANAGED ) != 0 ) { if( range->key_value != NULL ) { if( range->free_key_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing free key value function.", function ); return( -1 ); } if( range->free_key_value( &( range->key_value ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free key value.", function ); return( -1 ); } } range->key_value_flags &= ~( LIBFDATA_KEY_VALUE_FLAG_MANAGED ); } } range->file_index = data_file_index; range->offset = data_offset; range->size = data_size; range->flags = data_flags; range->key_value = key_value; range->free_key_value = free_key_value; range->key_value_flags |= key_value_flags; return( 1 ); } libevt-20170120/libfdata/libfdata_area.h0000664000175000017500000001624013040331700022004 0ustar00lordyestalordyesta00000000000000/* * The area functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_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 time stamp */ time_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, libfcache_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, libfcache_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, libfcache_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, libfcache_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, libfcache_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, libfcache_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 ) */ libevt-20170120/libfdata/libfdata_tree_node.h0000664000175000017500000002275613040331701023052 0ustar00lordyestalordyesta00000000000000/* * The tree node functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_TREE_NODE_H ) #define _LIBFDATA_INTERNAL_TREE_NODE_H #include #include #include "libfdata_extern.h" #include "libfdata_libcdata.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_range.h" #include "libfdata_tree.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif #define libfdata_tree_node_calculate_branch_node_cache_entry_index( node_offset, number_of_cache_entries ) \ ( number_of_cache_entries > 4 ) ? ( node_offset % ( number_of_cache_entries / 4 ) ) : ( node_offset % number_of_cache_entries ) #define libfdata_tree_node_calculate_leaf_node_cache_entry_index( node_offset, number_of_cache_entries ) \ ( number_of_cache_entries > 4 ) ? ( number_of_cache_entries / 4 ) + ( node_offset % ( ( number_of_cache_entries * 3 ) / 4 ) ) : ( node_offset % number_of_cache_entries ) typedef struct libfdata_internal_tree_node libfdata_internal_tree_node_t; struct libfdata_internal_tree_node { /* The tree reference */ libfdata_tree_t *tree; /* The parent (tree) node reference */ libfdata_tree_node_t *parent_node; /* The node data range */ libfdata_range_t *node_data_range; /* The sub nodes data range */ libfdata_range_t *sub_nodes_data_range; /* The time stamp */ time_t timestamp; /* The flags */ uint8_t flags; /* The sub nodes (array) */ libcdata_array_t *sub_nodes; /* The number of leaf nodes */ int number_of_leaf_nodes; /* The number of deleted leaf nodes */ int number_of_deleted_leaf_nodes; /* The relative first leaf node index */ int first_leaf_node_index; /* The relative first deleted leaf node index */ int first_deleted_leaf_node_index; }; int libfdata_tree_node_initialize( libfdata_tree_node_t **node, libfdata_tree_t *tree, libfdata_tree_node_t *parent_node, libcerror_error_t **error ); int libfdata_tree_node_free( libfdata_tree_node_t **node, libcerror_error_t **error ); int libfdata_tree_node_free_single( libfdata_tree_node_t **node, libcerror_error_t **error ); int libfdata_tree_node_set_parent_node( libfdata_tree_node_t *node, libfdata_tree_node_t *parent_node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_is_root( libfdata_tree_node_t *node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_get_data_range( libfdata_tree_node_t *node, int *node_file_index, off64_t *node_offset, size64_t *node_size, uint32_t *node_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_data_range( libfdata_tree_node_t *node, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_sub_nodes_data_range_is_set( libfdata_tree_node_t *node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_get_sub_nodes_data_range( libfdata_tree_node_t *node, int *sub_nodes_file_index, off64_t *sub_nodes_offset, size64_t *sub_nodes_size, uint32_t *sub_nodes_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_sub_nodes_data_range( libfdata_tree_node_t *node, int sub_nodes_file_index, off64_t sub_nodes_offset, size64_t sub_nodes_size, uint32_t sub_nodes_flags, libcerror_error_t **error ); int libfdata_tree_node_get_timestamp( libfdata_tree_node_t *node, time_t *timestamp, libcerror_error_t **error ); int libfdata_tree_node_get_first_leaf_node_index( libfdata_tree_node_t *node, int *first_leaf_node_index, int *deleted_first_leaf_node_index, libcerror_error_t **error ); int libfdata_tree_node_set_first_leaf_node_index( libfdata_tree_node_t *node, int first_leaf_node_index, int deleted_first_leaf_node_index, libcerror_error_t **error ); /* Node value functions */ LIBFDATA_EXTERN \ int libfdata_tree_node_get_node_value( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, intptr_t **node_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_node_value( libfdata_tree_node_t *node, libfcache_cache_t *cache, intptr_t *node_value, int (*free_node_value)( intptr_t **node_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); /* Sub node functions */ LIBFDATA_EXTERN \ int libfdata_tree_node_resize_sub_nodes( libfdata_tree_node_t *node, int number_of_sub_nodes, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_get_number_of_sub_nodes( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int *number_of_sub_nodes, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_get_sub_node_by_index( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int sub_node_index, libfdata_tree_node_t **sub_node, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_sub_node_by_index( libfdata_tree_node_t *node, int sub_node_index, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_append_sub_node( libfdata_tree_node_t *node, int *sub_node_index, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_insert_sub_node( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int *sub_node_index, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, int (*node_value_compare_function)( intptr_t *first_node_value, intptr_t *second_node_value, libcerror_error_t **error ), uint8_t insert_flags, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_split_sub_nodes( libfdata_tree_node_t *node, int number_of_splits, libcerror_error_t **error ); /* Deleted node functions */ LIBFDATA_EXTERN \ int libfdata_tree_node_is_deleted( libfdata_tree_node_t *node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_deleted( libfdata_tree_node_t *node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_deleted_sub_node( libfdata_tree_node_t *node, int sub_node_index, libcerror_error_t **error ); /* Leaf node functions */ int libfdata_tree_node_set_calculate_leaf_node_values( libfdata_tree_node_t *node, libcerror_error_t **error ); int libfdata_tree_node_read_leaf_node_values( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_is_leaf( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_leaf( libfdata_tree_node_t *node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_leaf_sub_node( libfdata_tree_node_t *node, int sub_node_index, libcerror_error_t **error ); int libfdata_tree_node_get_number_of_leaf_nodes( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int *number_of_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ); int libfdata_tree_node_get_leaf_node_by_index( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int leaf_node_index, libfdata_tree_node_t **leaf_node, uint8_t read_flags, libcerror_error_t **error ); int libfdata_tree_node_get_number_of_deleted_leaf_nodes( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int *number_of_deleted_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ); int libfdata_tree_node_get_deleted_leaf_node_by_index( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int deleted_leaf_node_index, libfdata_tree_node_t **deleted_leaf_node, uint8_t read_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_INTERNAL_TREE_NODE_H ) */ libevt-20170120/libfdata/libfdata_types.h0000664000175000017500000000457513040331701022251 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_TYPES_H ) #define _LIBFDATA_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFDATA for local use of libfdata * The definitions in are copied here * for local use of libfdata */ #if defined( HAVE_LOCAL_LIBFDATA ) #include "libfdata_libfcache.h" typedef libfcache_cache_t libfdata_cache_t; /* 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_btree {} libfdata_btree_t; typedef struct libfdata_btree_node {} libfdata_btree_node_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_tree {} libfdata_tree_t; typedef struct libfdata_tree_node {} libfdata_tree_node_t; typedef struct libfdata_vector {} libfdata_vector_t; #else typedef intptr_t libfdata_area_t; typedef intptr_t libfdata_btree_t; typedef intptr_t libfdata_btree_node_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_tree_t; typedef intptr_t libfdata_tree_node_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 ) */ libevt-20170120/libfdata/libfdata_area.c0000664000175000017500000011130713040331700021777 0ustar00lordyestalordyesta00000000000000/* * The area functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_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, libfcache_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, libfcache_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; 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; 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 segments * Returns 1 if successful or -1 on error */ int libfdata_area_resize_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_resize_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_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 ); } 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, libfcache_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; time_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( 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( 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( 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_VECTOR_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, libfcache_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( 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( 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 ); } libevt-20170120/libfdata/libfdata_range.h0000664000175000017500000000405613040331700022172 0ustar00lordyestalordyesta00000000000000/* * The range functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_RANGE_H ) #define _LIBFDATA_RANGE_H #include #include #include "libfdata_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_range libfdata_range_t; struct libfdata_range { /* The 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 ) */ libevt-20170120/libfdata/libfdata_vector.c0000664000175000017500000014506413040331701022401 0ustar00lordyestalordyesta00000000000000/* * The vector functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_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, libfcache_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, libfcache_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->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; 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_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_resize_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_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: 0x%08" PRIx64 "\n", function, 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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, segment_index, 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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, segment_index, 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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, segment_index, segment_file_index, segment_offset, segment_offset + segment_size, segment_size ); } #endif 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, libfcache_cache_t *cache, int element_index, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; libfdata_internal_vector_t *internal_vector = NULL; libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_vector_get_element_value_by_index"; off64_t cache_value_offset = (off64_t) -1; off64_t element_data_offset = 0; time_t cache_value_timestamp = 0; uint32_t element_data_flags = 0; int cache_entry_index = -1; int cache_value_file_index = -1; int element_data_file_index = -1; int number_of_cache_entries = 0; int result = 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->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 ) { 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: 0x%08" PRIx64 ".", function, 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 ); } 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( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } if( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) { if( internal_vector->calculate_cache_entry_index == NULL ) { cache_entry_index = element_index % number_of_cache_entries; } else { cache_entry_index = internal_vector->calculate_cache_entry_index( element_index, element_data_file_index, element_data_offset, internal_vector->element_data_size, element_data_flags, number_of_cache_entries ); } if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfcache_cache_value_get_identifier( cache_value, &cache_value_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 ) ) { result = 1; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( result == 0 ) { libcnotify_printf( "%s: cache: 0x%08" PRIjx " miss (%d out of %d)\n", function, (intptr_t) cache, cache_entry_index, number_of_cache_entries ); } else { libcnotify_printf( "%s: cache: 0x%08" PRIjx " hit (%d out of %d)\n", function, (intptr_t) cache, cache_entry_index, number_of_cache_entries ); } } #endif } if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading element data at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIu64 "\n", function, element_data_offset, element_data_offset, internal_vector->element_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: 0x%08" PRIx64 ".", function, element_data_offset ); return( -1 ); } if( internal_vector->calculate_cache_entry_index == NULL ) { cache_entry_index = element_index % number_of_cache_entries; } else { cache_entry_index = internal_vector->calculate_cache_entry_index( element_index, element_data_file_index, element_data_offset, internal_vector->element_data_size, element_data_flags, number_of_cache_entries ); } if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfcache_cache_value_get_identifier( cache_value, &cache_value_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_MISSING, "%s: missing cache value.", function ); return( -1 ); } } if( libfcache_cache_value_get_value( cache_value, element_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the value an element at a specific offset * Returns 1 if successful or -1 on error */ int libfdata_vector_get_element_value_at_offset( libfdata_vector_t *vector, intptr_t *file_io_handle, libfcache_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: 0x%08" PRIx64 ".", function, 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, libfcache_cache_t *cache, int element_index, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t 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; uint32_t element_data_flags = 0; int cache_entry_index = -1; int element_data_file_index = -1; int number_of_cache_entries = 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 ) { 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: 0x%08" PRIx64 ".", function, 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 ); } 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( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } if( internal_vector->calculate_cache_entry_index == NULL ) { cache_entry_index = element_index % number_of_cache_entries; } else { cache_entry_index = internal_vector->calculate_cache_entry_index( element_index, element_data_file_index, element_data_offset, internal_vector->element_data_size, element_data_flags, number_of_cache_entries ); } if( libfcache_cache_set_value_by_index( cache, cache_entry_index, element_data_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 entry: %d.", function, cache_entry_index ); 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 ); } libevt-20170120/libfdata/libfdata_stream.h0000664000175000017500000002251613040331701022373 0ustar00lordyestalordyesta00000000000000/* * The stream functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_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 offset */ off64_t current_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 ) */ libevt-20170120/libfdata/libfdata_vector.h0000664000175000017500000001767413040331701022413 0ustar00lordyestalordyesta00000000000000/* * The vector functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_VECTOR_H ) #define _LIBFDATA_INTERNAL_VECTOR_H #include #include #include "libfdata_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 time stamp */ time_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_vector_t *vector, libfcache_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, libfcache_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, libfcache_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, libfcache_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 ); /* Segment functions */ 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 ); 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, libfcache_cache_t *cache, int element_index, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_get_element_value_at_offset( libfdata_vector_t *vector, intptr_t *file_io_handle, libfcache_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, libfcache_cache_t *cache, int element_index, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t 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 ) */ libevt-20170120/libfdata/libfdata_btree.h0000664000175000017500000002472313040331700022202 0ustar00lordyestalordyesta00000000000000/* * The balanced tree functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_BTREE_H ) #define _LIBFDATA_INTERNAL_BTREE_H #include #include #include "libfdata_btree_node.h" #include "libfdata_btree_range.h" #include "libfdata_extern.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_internal_btree libfdata_internal_btree_t; struct libfdata_internal_btree { /* The root node data range */ libfdata_btree_range_t *root_node_data_range; /* The time stamp */ time_t timestamp; /* The flags */ uint8_t flags; /* The calculate node cache entry index value */ int (*calculate_node_cache_entry_index)( libfdata_btree_t *tree, libfcache_cache_t *cache, int level, int node_data_file_index, off64_t node_data_offset, size64_t node_data_size, uint32_t node_data_flags, int *cache_entry_index, libcerror_error_t **error ); /* The calculate leaf value cache entry index value */ int (*calculate_leaf_value_cache_entry_index)( libfdata_btree_t *tree, libfcache_cache_t *cache, int leaf_value_index, int leaf_value_data_file_index, off64_t leaf_value_data_offset, size64_t leaf_value_data_size, uint32_t leaf_value_data_flags, int *cache_entry_index, libcerror_error_t **error ); /* 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 node function */ int (*read_node)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_btree_node_t *node, int node_data_file_index, off64_t node_data_offset, size64_t node_data_size, uint32_t node_data_flags, intptr_t *key_value, uint8_t read_flags, libcerror_error_t **error ); /* The read leaf value function */ int (*read_leaf_value)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_btree_t *tree, libfcache_cache_t *cache, int leaf_value_index, int leaf_value_data_file_index, off64_t leaf_value_data_offset, size64_t leaf_value_data_size, uint32_t leaf_value_data_flags, intptr_t *key_value, uint8_t read_flags, libcerror_error_t **error ); }; LIBFDATA_EXTERN \ int libfdata_btree_initialize( libfdata_btree_t **tree, 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_node)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_btree_node_t *node, int node_data_file_index, off64_t node_data_offset, size64_t node_data_size, uint32_t node_data_flags, intptr_t *key_value, uint8_t read_flags, libcerror_error_t **error ), int (*read_leaf_value)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_btree_t *tree, libfcache_cache_t *cache, int leaf_value_index, int leaf_value_data_file_index, off64_t leaf_value_data_offset, size64_t leaf_value_data_size, uint32_t leaf_value_data_flags, intptr_t *key_value, uint8_t read_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_free( libfdata_btree_t **tree, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_clone( libfdata_btree_t **destination_tree, libfdata_btree_t *source_tree, libcerror_error_t **error ); /* Cache entry functions */ int libfdata_btree_calculate_node_cache_entry_index( libfdata_btree_t *tree, libfcache_cache_t *cache, int level, int node_data_file_index, off64_t node_data_offset, size64_t node_data_size, uint32_t node_data_flags, int *cache_entry_index, libcerror_error_t **error ); int libfdata_btree_calculate_leaf_value_cache_entry_index( libfdata_btree_t *tree, libfcache_cache_t *cache, int leaf_value_index, int leaf_value_data_file_index, off64_t leaf_value_data_offset, size64_t leaf_value_data_size, uint32_t leaf_value_data_flags, int *cache_entry_index, libcerror_error_t **error ); /* Root node functions */ LIBFDATA_EXTERN \ int libfdata_btree_get_root_node( libfdata_btree_t *tree, int *node_data_file_index, off64_t *node_data_offset, size64_t *node_data_size, uint32_t *node_data_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_set_root_node( libfdata_btree_t *tree, int node_data_file_index, off64_t node_data_offset, size64_t node_data_size, uint32_t node_data_flags, libcerror_error_t **error ); /* Leaf value functions */ int libfdata_btree_read_leaf_value( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *leaf_value_data_range, intptr_t **leaf_value, uint8_t read_flags, libcerror_error_t **error ); int libfdata_btree_read_node( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *node_data_range, int level, libfdata_btree_node_t **node, uint8_t read_flags, libcerror_error_t **error ); int libfdata_btree_read_sub_tree( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *node_data_range, int level, int mapped_first_leaf_value_index, libfdata_btree_node_t **node, uint8_t read_flags, libcerror_error_t **error ); int libfdata_btree_get_leaf_node_by_index( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *node_data_range, int level, int leaf_value_index, libfdata_btree_node_t **node, uint8_t read_flags, libcerror_error_t **error ); int libfdata_btree_get_leaf_node_by_key( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *node_data_range, int maximum_node_level, int current_node_level, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), int *node_index, libfdata_btree_node_t **node, uint8_t read_flags, libcerror_error_t **error ); int libfdata_btree_get_next_leaf_node_by_key( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *node_data_range, int node_index, libfdata_btree_node_t *node, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), int *next_node_index, libfdata_btree_node_t **next_node, uint8_t read_flags, libcerror_error_t **error ); int libfdata_btree_get_previous_leaf_node_by_key( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *node_data_range, int node_index, libfdata_btree_node_t *node, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), int *previous_node_index, libfdata_btree_node_t **previous_node, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_get_number_of_leaf_values( libfdata_btree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int *number_of_values, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_get_leaf_value_by_index( libfdata_btree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int leaf_value_index, intptr_t **value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_set_leaf_value_by_index( libfdata_btree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int leaf_value_index, intptr_t *leaf_value, int (*free_leaf_value)( intptr_t **leaf_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_get_leaf_value_by_key( libfdata_btree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), uint8_t search_flags, intptr_t **value, uint8_t read_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_INTERNAL_BTREE_H ) */ libevt-20170120/libfdata/libfdata_tree.h0000664000175000017500000001472513040331701022042 0ustar00lordyestalordyesta00000000000000/* * The tree functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_TREE_H ) #define _LIBFDATA_INTERNAL_TREE_H #include #include #include "libfdata_extern.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_internal_tree libfdata_internal_tree_t; struct libfdata_internal_tree { /* The root node */ libfdata_tree_node_t *root_node; /* The flags */ uint8_t flags; /* The calculate cache entry index value */ int (*calculate_cache_entry_index)( int node_index, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_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 node function */ int (*read_node)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, uint8_t read_flags, libcerror_error_t **error ); /* The read sub nodes function */ int (*read_sub_nodes)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, int sub_nodes_file_index, off64_t sub_nodes_offset, size64_t sub_nodes_size, uint32_t sub_nodes_flags, uint8_t read_flags, libcerror_error_t **error ); }; LIBFDATA_EXTERN \ int libfdata_tree_initialize( libfdata_tree_t **tree, 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_node)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, uint8_t read_flags, libcerror_error_t **error ), int (*read_sub_nodes)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, int sub_nodes_file_index, off64_t sub_nodes_offset, size64_t sub_nodes_size, uint32_t sub_nodes_flags, uint8_t read_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_free( libfdata_tree_t **tree, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_clone( libfdata_tree_t **destination_tree, libfdata_tree_t *source_tree, libcerror_error_t **error ); /* Node value functions */ int libfdata_tree_get_node_value( libfdata_tree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_tree_node_t *node, intptr_t **node_value, uint8_t read_flags, libcerror_error_t **error ); int libfdata_tree_set_node_value( libfdata_tree_t *tree, libfcache_cache_t *cache, libfdata_tree_node_t *node, intptr_t *node_value, int (*free_node_value)( intptr_t **node_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); /* Sub node functions */ int libfdata_tree_read_sub_nodes( libfdata_tree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_tree_node_t *node, uint8_t read_flags, libcerror_error_t **error ); /* Root node functions */ LIBFDATA_EXTERN \ int libfdata_tree_get_root_node( libfdata_tree_t *tree, libfdata_tree_node_t **root_node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_set_root_node( libfdata_tree_t *tree, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, libcerror_error_t **error ); /* Leaf node functions */ LIBFDATA_EXTERN \ int libfdata_tree_get_number_of_leaf_nodes( libfdata_tree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int *number_of_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_get_leaf_node_by_index( libfdata_tree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int leaf_node_index, libfdata_tree_node_t **leaf_node, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_get_number_of_deleted_leaf_nodes( libfdata_tree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int *number_of_deleted_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_get_deleted_leaf_node_by_index( libfdata_tree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int deleted_leaf_node_index, libfdata_tree_node_t **deleted_leaf_node, uint8_t read_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_INTERNAL_TREE_H ) */ libevt-20170120/libfdata/libfdata_support.h0000664000175000017500000000232013040331701022603 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_SUPPORT_H ) #define _LIBFDATA_SUPPORT_H #include #include #include "libfdata_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFDATA ) LIBFDATA_EXTERN \ const char *libfdata_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_SUPPORT_H ) */ libevt-20170120/libfdata/libfdata_libfcache.h0000664000175000017500000000264413040331700022777 0ustar00lordyestalordyesta00000000000000/* * The internal libfcache header * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_LIBFCACHE_H ) #define _LIBFDATA_LIBFCACHE_H #include /* Define HAVE_LOCAL_LIBFCACHE for local use of libfcache */ #if defined( HAVE_LOCAL_LIBFCACHE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBFCACHE_DLL_IMPORT * before including libfcache.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFCACHE_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBFCACHE ) */ #endif /* !defined( _LIBFDATA_LIBFCACHE_H ) */ libevt-20170120/libfdata/libfdata_libcerror.h0000664000175000017500000000264113040331700023057 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_LIBCERROR_H ) #define _LIBFDATA_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFDATA_LIBCERROR_H ) */ libevt-20170120/libfdata/libfdata_range_list.c0000664000175000017500000007424113040331701023224 0ustar00lordyestalordyesta00000000000000/* * The range list functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_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, libfcache_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, libfcache_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 ); } if( 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 ) != 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, libfcache_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, libfcache_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 ); } libevt-20170120/libfdata/libfdata_btree_range.h0000664000175000017500000000543513040331700023355 0ustar00lordyestalordyesta00000000000000/* * The balanced tree range functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_BTREE_RANGE_H ) #define _LIBFDATA_BTREE_RANGE_H #include #include #include "libfdata_extern.h" #include "libfdata_libcerror.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_btree_range libfdata_btree_range_t; struct libfdata_btree_range { /* The file index */ int file_index; /* The offset */ off64_t offset; /* The size */ size64_t size; /* The flags */ uint32_t flags; /* The key value */ intptr_t *key_value; /* The free key value function */ int (*free_key_value)( intptr_t **key_value, libcerror_error_t **error ); /* The key value flags */ uint8_t key_value_flags; /* The mapped first leaf value index */ int mapped_first_leaf_value_index; /* The mapped last leaf value index */ int mapped_last_leaf_value_index; /* The mapped number of leaf values */ int mapped_number_of_leaf_values; }; int libfdata_btree_range_initialize( libfdata_btree_range_t **range, libcerror_error_t **error ); int libfdata_btree_range_free( libfdata_btree_range_t **range, libcerror_error_t **error ); int libfdata_btree_range_clone( libfdata_btree_range_t **destination_range, libfdata_btree_range_t *source_range, libcerror_error_t **error ); int libfdata_btree_range_get( libfdata_btree_range_t *range, int *data_file_index, off64_t *data_offset, size64_t *data_size, uint32_t *data_flags, intptr_t **key_value, libcerror_error_t **error ); int libfdata_btree_range_set( libfdata_btree_range_t *range, int data_file_index, off64_t data_offset, size64_t data_size, uint32_t data_flags, intptr_t *key_value, int (*free_key_value)( intptr_t **key_value, libcerror_error_t **error ), uint8_t key_value_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_BTREE_RANGE_H ) */ libevt-20170120/libfdata/libfdata_tree.c0000664000175000017500000007354113040331701022036 0ustar00lordyestalordyesta00000000000000/* * The tree functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_libfcache.h" #include "libfdata_tree.h" #include "libfdata_tree_node.h" #include "libfdata_types.h" /* Creates a tree * Make sure the value tree is referencing, is set to NULL * * If the flag LIBFDATA_DATA_HANDLE_FLAG_MANAGED is set the tree * 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_tree_initialize( libfdata_tree_t **tree, 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_node)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, uint8_t read_flags, libcerror_error_t **error ), int (*read_sub_nodes)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, int sub_nodes_file_index, off64_t sub_nodes_offset, size64_t sub_nodes_size, uint32_t sub_nodes_flags, uint8_t read_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_initialize"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( *tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid tree value already set.", function ); return( -1 ); } if( read_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read node function.", function ); return( -1 ); } if( read_sub_nodes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read sub nodes function.", function ); return( -1 ); } internal_tree = memory_allocate_structure( libfdata_internal_tree_t ); if( internal_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create tree.", function ); goto on_error; } if( memory_set( internal_tree, 0, sizeof( libfdata_internal_tree_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear tree.", function ); goto on_error; } internal_tree->flags |= flags; internal_tree->data_handle = data_handle; internal_tree->free_data_handle = free_data_handle; internal_tree->clone_data_handle = clone_data_handle; internal_tree->read_node = read_node; internal_tree->read_sub_nodes = read_sub_nodes; *tree = (libfdata_tree_t *) internal_tree; return( 1 ); on_error: if( internal_tree != NULL ) { memory_free( internal_tree ); } return( -1 ); } /* Frees a tree * Returns 1 if successful or -1 on error */ int libfdata_tree_free( libfdata_tree_t **tree, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_free"; int result = 1; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( *tree != NULL ) { internal_tree = (libfdata_internal_tree_t *) *tree; *tree = NULL; if( internal_tree->root_node != NULL ) { if( libfdata_tree_node_free( &( internal_tree->root_node ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free root node.", function ); result = -1; } } if( ( internal_tree->flags & LIBFDATA_DATA_HANDLE_FLAG_MANAGED ) != 0 ) { if( internal_tree->data_handle != NULL ) { if( internal_tree->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_tree->free_data_handle( &( internal_tree->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_tree ); } return( result ); } /* Clones (duplicates) the tree * Returns 1 if successful or -1 on error */ int libfdata_tree_clone( libfdata_tree_t **destination_tree, libfdata_tree_t *source_tree, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_source_tree = NULL; libfdata_tree_node_t *source_tree_root_node = NULL; intptr_t *destination_data_handle = NULL; static char *function = "libfdata_tree_clone"; off64_t node_offset = 0; size64_t node_size = 0; uint32_t node_flags = 0; int node_file_index = -1; if( destination_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination tree.", function ); return( -1 ); } if( *destination_tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination tree value already set.", function ); return( -1 ); } if( source_tree == NULL ) { *destination_tree = NULL; return( 1 ); } internal_source_tree = (libfdata_internal_tree_t *) source_tree; if( internal_source_tree->data_handle != NULL ) { if( internal_source_tree->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source tree - missing free data handle function.", function ); goto on_error; } if( internal_source_tree->clone_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source tree - missing clone data handle function.", function ); goto on_error; } if( internal_source_tree->clone_data_handle( &destination_data_handle, internal_source_tree->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; } } if( libfdata_tree_initialize( destination_tree, destination_data_handle, internal_source_tree->free_data_handle, internal_source_tree->clone_data_handle, internal_source_tree->read_node, internal_source_tree->read_sub_nodes, LIBFDATA_DATA_HANDLE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination tree.", function ); goto on_error; } destination_data_handle = NULL; if( libfdata_tree_get_root_node( source_tree, &source_tree_root_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve source tree root node.", function ); goto on_error; } if( libfdata_tree_node_get_data_range( source_tree_root_node, &node_file_index, &node_offset, &node_size, &node_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve source tree root node data range.", function ); goto on_error; } if( libfdata_tree_set_root_node( *destination_tree, node_file_index, node_offset, node_size, node_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set destination tree root node.", function ); goto on_error; } /* TODO or clone all the tree nodes ? */ return( 1 ); on_error: if( *destination_tree != NULL ) { libfdata_tree_free( destination_tree, NULL ); } if( destination_data_handle != NULL ) { internal_source_tree->free_data_handle( &destination_data_handle, NULL ); } return( -1 ); } /* Retrieves the node value of the node * Returns 1 if successful or -1 on error */ int libfdata_tree_get_node_value( libfdata_tree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_tree_node_t *node, intptr_t **node_value, uint8_t read_flags, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_get_node_value"; off64_t cache_value_offset = (off64_t) -1; off64_t node_offset = 0; size64_t node_size = 0; time_t cache_value_timestamp = 0; time_t node_timestamp = 0; uint32_t node_flags = 0; int cache_entry_index = -1; int cache_value_file_index = -1; int number_of_cache_entries = 0; int node_file_index = -1; int result = 0; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( internal_tree->read_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree - missing read node function.", function ); return( -1 ); } if( libfdata_tree_node_get_data_range( node, &node_file_index, &node_offset, &node_size, &node_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range from tree node.", function ); return( -1 ); } if( libfcache_cache_get_number_of_entries( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } if( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) { if( ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { cache_entry_index = libfdata_tree_node_calculate_leaf_node_cache_entry_index( node_offset, number_of_cache_entries ); } else { cache_entry_index = libfdata_tree_node_calculate_branch_node_cache_entry_index( node_offset, number_of_cache_entries ); } if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfdata_tree_node_get_timestamp( node, &node_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve time stamp from tree node.", function ); return( -1 ); } if( libfcache_cache_value_get_identifier( cache_value, &cache_value_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( ( node_file_index == cache_value_file_index ) && ( node_offset == cache_value_offset ) && ( node_timestamp == cache_value_timestamp ) ) { result = 1; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( result == 0 ) { libcnotify_printf( "%s: cache: 0x%08" PRIjx " miss (entry: %d, want: %" PRIi64 ", got: %" PRIi64 ")\n", function, (intptr_t) cache, cache_entry_index, node_offset, cache_value_offset ); } else { libcnotify_printf( "%s: cache: 0x%08" PRIjx " hit (entry: %d)\n", function, (intptr_t) cache, cache_entry_index ); } } #endif } if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading node at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIu64 "\n", function, node_offset, node_offset, node_size ); } #endif if( internal_tree->read_node( internal_tree->data_handle, file_io_handle, node, cache, node_file_index, node_offset, node_size, node_flags, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read node at offset: 0x%08" PRIx64 ".", function, node_offset ); return( -1 ); } if( ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { cache_entry_index = libfdata_tree_node_calculate_leaf_node_cache_entry_index( node_offset, number_of_cache_entries ); } else { cache_entry_index = libfdata_tree_node_calculate_branch_node_cache_entry_index( node_offset, number_of_cache_entries ); } if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfdata_tree_node_get_timestamp( node, &node_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve time stamp from tree node.", function ); return( -1 ); } if( libfcache_cache_value_get_identifier( cache_value, &cache_value_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( ( node_file_index != cache_value_file_index ) || ( node_offset != cache_value_offset ) || ( node_timestamp != cache_value_timestamp ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing cache value.", function ); return( -1 ); } } if( libfcache_cache_value_get_value( cache_value, node_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } return( 1 ); } /* Sets the node value of the node * * If the flag LIBFDATA_TREE_NODE_VALUE_FLAG_MANAGED is set the tree * takes over management of the value and the value is freed when * no longer needed. * * Returns 1 if successful or -1 on error */ int libfdata_tree_set_node_value( libfdata_tree_t *tree, libfcache_cache_t *cache, libfdata_tree_node_t *node, intptr_t *node_value, int (*free_node_value)( intptr_t **node_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { static char *function = "libfdata_tree_set_node_value"; off64_t node_offset = 0; size64_t node_size = 0; time_t node_timestamp = 0; uint32_t node_flags = 0; int cache_entry_index = -1; int node_file_index = -1; int number_of_cache_entries = 0; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( libfdata_tree_node_get_data_range( node, &node_file_index, &node_offset, &node_size, &node_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range from tree node.", function ); return( -1 ); } if( libfdata_tree_node_get_timestamp( node, &node_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve timestamp from tree node.", function ); return( -1 ); } if( libfcache_cache_get_number_of_entries( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } if( ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { cache_entry_index = libfdata_tree_node_calculate_leaf_node_cache_entry_index( node_offset, number_of_cache_entries ); } else { cache_entry_index = libfdata_tree_node_calculate_branch_node_cache_entry_index( node_offset, number_of_cache_entries ); } if( libfcache_cache_set_value_by_index( cache, cache_entry_index, node_file_index, node_offset, node_timestamp, node_value, free_node_value, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in cache entry: %d.", function, cache_entry_index ); return( -1 ); } return( 1 ); } /* Reads the sub nodes of the node * Returns 1 if successful or -1 on error */ int libfdata_tree_read_sub_nodes( libfdata_tree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_tree_node_t *node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_read_sub_nodes"; off64_t sub_nodes_offset = 0; size64_t sub_nodes_size = 0; uint32_t sub_nodes_flags = 0; int sub_nodes_file_index = -1; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( internal_tree->read_sub_nodes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree - missing read sub nodes function.", function ); return( -1 ); } if( libfdata_tree_node_get_sub_nodes_data_range( node, &sub_nodes_file_index, &sub_nodes_offset, &sub_nodes_size, &sub_nodes_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub nodes data range.", function ); return( -1 ); } if( internal_tree->read_sub_nodes( internal_tree->data_handle, file_io_handle, node, cache, sub_nodes_file_index, sub_nodes_offset, sub_nodes_size, sub_nodes_flags, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub nodes at offset: 0x%08" PRIx64 ".", function, sub_nodes_offset ); return( -1 ); } return( 1 ); } /* Retrieves the offset and size of the root node * Returns 1 if successful or -1 on error */ int libfdata_tree_get_root_node( libfdata_tree_t *tree, libfdata_tree_node_t **root_node, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_get_root_node"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( root_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid root node.", function ); return( -1 ); } *root_node = internal_tree->root_node; return( 1 ); } /* Sets the root node * Returns 1 if successful or -1 on error */ int libfdata_tree_set_root_node( libfdata_tree_t *tree, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_set_root_node"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( internal_tree->root_node == NULL ) { if( libfdata_tree_node_initialize( &( internal_tree->root_node ), tree, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create root node.", function ); return( -1 ); } } if( libfdata_tree_node_set_data_range( internal_tree->root_node, node_file_index, node_offset, node_size, node_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set root node data range.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of leaf nodes in the tree * Returns 1 if successful or -1 on error */ int libfdata_tree_get_number_of_leaf_nodes( libfdata_tree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int *number_of_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_get_number_of_leaf_nodes"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( libfdata_tree_node_get_number_of_leaf_nodes( internal_tree->root_node, file_io_handle, cache, number_of_leaf_nodes, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf nodes from root node.", function ); return( -1 ); } return( 1 ); } /* Retrieves a leaf nodes at a specific index * Returns 1 if successful or -1 on error */ int libfdata_tree_get_leaf_node_by_index( libfdata_tree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int leaf_node_index, libfdata_tree_node_t **leaf_node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_get_leaf_node_by_index"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( libfdata_tree_node_get_leaf_node_by_index( internal_tree->root_node, file_io_handle, cache, leaf_node_index, leaf_node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node: %d from root node.", function, leaf_node_index ); return( -1 ); } return( 1 ); } /* Retrieves the number of deleted leaf nodes in the tree * Returns 1 if successful or -1 on error */ int libfdata_tree_get_number_of_deleted_leaf_nodes( libfdata_tree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int *number_of_deleted_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_get_number_of_deleted_leaf_nodes"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( libfdata_tree_node_get_number_of_deleted_leaf_nodes( internal_tree->root_node, file_io_handle, cache, number_of_deleted_leaf_nodes, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of deleted leaf nodes from root node.", function ); return( -1 ); } return( 1 ); } /* Retrieves a deleted leaf nodes at a specific index * Returns 1 if successful or -1 on error */ int libfdata_tree_get_deleted_leaf_node_by_index( libfdata_tree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int deleted_leaf_node_index, libfdata_tree_node_t **deleted_leaf_node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_get_deleted_leaf_node_by_index"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( libfdata_tree_node_get_deleted_leaf_node_by_index( internal_tree->root_node, file_io_handle, cache, deleted_leaf_node_index, deleted_leaf_node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of deleted leaf node: %d from root node.", function, deleted_leaf_node_index ); return( -1 ); } return( 1 ); } libevt-20170120/libfdata/libfdata_tree_node.c0000664000175000017500000024773313040331701023051 0ustar00lordyestalordyesta00000000000000/* * The tree node functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_libcdata.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_range.h" #include "libfdata_tree_node.h" #include "libfdata_types.h" /* Creates a node * Make sure the value node is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfdata_tree_node_initialize( libfdata_tree_node_t **node, libfdata_tree_t *tree, libfdata_tree_node_t *parent_node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_initialize"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( *node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid node value already set.", function ); return( -1 ); } if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree_node = memory_allocate_structure( libfdata_internal_tree_node_t ); if( internal_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create node.", function ); goto on_error; } if( memory_set( internal_tree_node, 0, sizeof( libfdata_internal_tree_node_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear node.", function ); memory_free( internal_tree_node ); return( -1 ); } if( libfdata_range_initialize( &( internal_tree_node->node_data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create node data range.", function ); goto on_error; } if( libfdata_range_initialize( &( internal_tree_node->sub_nodes_data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub nodes data range.", function ); goto on_error; } if( libcdata_array_initialize( &( internal_tree_node->sub_nodes ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub nodes array.", function ); goto on_error; } if( libfcache_date_time_get_timestamp( &( internal_tree_node->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_tree_node->tree = tree; internal_tree_node->parent_node = parent_node; internal_tree_node->flags = LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; *node = (libfdata_tree_node_t *) internal_tree_node; return( 1 ); on_error: if( internal_tree_node != NULL ) { if( internal_tree_node->sub_nodes != NULL ) { libcdata_array_free( &( internal_tree_node->sub_nodes ), NULL, NULL ); } if( internal_tree_node->sub_nodes_data_range != NULL ) { libfdata_range_free( &( internal_tree_node->sub_nodes_data_range ), NULL ); } if( internal_tree_node->node_data_range != NULL ) { libfdata_range_free( &( internal_tree_node->node_data_range ), NULL ); } memory_free( internal_tree_node ); } return( -1 ); } /* Frees a node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_free( libfdata_tree_node_t **node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_free"; int result = 1; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( *node != NULL ) { internal_tree_node = (libfdata_internal_tree_node_t *) *node; *node = NULL; if( internal_tree_node->node_data_range != NULL ) { if( libfdata_range_free( &( internal_tree_node->node_data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free node data range.", function ); result = -1; } } if( internal_tree_node->sub_nodes_data_range != NULL ) { if( libfdata_range_free( &( internal_tree_node->sub_nodes_data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub nodes data range.", function ); result = -1; } } if( libcdata_array_free( &( internal_tree_node->sub_nodes ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the sub nodes array.", function ); result = -1; } memory_free( internal_tree_node ); } return( result ); } /* Frees a node, but not its sub nodes * Returns 1 if successful or -1 on error */ int libfdata_tree_node_free_single( libfdata_tree_node_t **node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_free_single"; int result = 1; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( *node != NULL ) { internal_tree_node = (libfdata_internal_tree_node_t *) node; *node = NULL; if( libcdata_array_free( &( internal_tree_node->sub_nodes ), NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the sub nodes array.", function ); result = -1; } memory_free( internal_tree_node ); } return( result ); } /* Sets the parent node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_parent_node( libfdata_tree_node_t *node, libfdata_tree_node_t *parent_node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_parent_node"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; internal_tree_node->parent_node = parent_node; return( 1 ); } /* Determines if the node is a root node * Returns 1 if a root node, 0 if not or -1 on error */ int libfdata_tree_node_is_root( libfdata_tree_node_t *node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_is_root"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( internal_tree_node->parent_node == NULL ) { return( 1 ); } return( 0 ); } /* Retrieves the data offset and size * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_data_range( libfdata_tree_node_t *node, int *node_file_index, off64_t *node_offset, size64_t *node_size, uint32_t *node_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_data_range"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( libfdata_range_get( internal_tree_node->node_data_range, node_file_index, node_offset, node_size, node_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node data range.", function ); return( -1 ); } return( 1 ); } /* Sets the data offset and size * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_data_range( libfdata_tree_node_t *node, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_data_range"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - node is virtual.", function ); return( -1 ); } if( libfdata_range_set( internal_tree_node->node_data_range, node_file_index, node_offset, node_size, node_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set node data range.", function ); return( -1 ); } if( libfcache_date_time_get_timestamp( &( internal_tree_node->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 ); } /* Determines if the sub nodes data range has been set * Returns 1 if sub nodes have been set, 0 if not or -1 on error */ int libfdata_tree_node_sub_nodes_data_range_is_set( libfdata_tree_node_t *node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_sub_nodes_data_range_is_set"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) { return( 1 ); } return( 0 ); } /* Retrieves the sub nodes data range * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_sub_nodes_data_range( libfdata_tree_node_t *node, int *sub_nodes_file_index, off64_t *sub_nodes_offset, size64_t *sub_nodes_size, uint32_t *sub_nodes_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_sub_nodes_data_range"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - sub nodes range has not been set.", function ); return( -1 ); } if( libfdata_range_get( internal_tree_node->sub_nodes_data_range, sub_nodes_file_index, sub_nodes_offset, sub_nodes_size, sub_nodes_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub nodes data range.", function ); return( -1 ); } return( 1 ); } /* Sets the sub nodes data range * The sub nodes data range cannot be set after the sub nodes have been read * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_sub_nodes_data_range( libfdata_tree_node_t *node, int sub_nodes_file_index, off64_t sub_nodes_offset, size64_t sub_nodes_size, uint32_t sub_nodes_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_sub_nodes_data_range"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - node is virtual.", function ); return( -1 ); } if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - node is a leaf.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - sub nodes range has already been read.", function ); return( -1 ); } if( libfdata_range_set( internal_tree_node->sub_nodes_data_range, sub_nodes_file_index, sub_nodes_offset, sub_nodes_size, sub_nodes_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub nodes data range.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET; return( 1 ); } /* Retrieves the time stamp * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_timestamp( libfdata_tree_node_t *node, time_t *timestamp, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_timestamp"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( timestamp == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node time stamp.", function ); return( -1 ); } *timestamp = internal_tree_node->timestamp; return( 1 ); } /* Retrieves the first leaf node index * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_first_leaf_node_index( libfdata_tree_node_t *node, int *first_leaf_node_index, int *deleted_first_leaf_node_index, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_first_leaf_node_index"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( first_leaf_node_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first leaf node index.", function ); return( -1 ); } if( deleted_first_leaf_node_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first deleted leaf node index.", function ); return( -1 ); } *first_leaf_node_index = internal_tree_node->first_leaf_node_index; *deleted_first_leaf_node_index = internal_tree_node->first_deleted_leaf_node_index; return( 1 ); } /* Sets the first leaf node index * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_first_leaf_node_index( libfdata_tree_node_t *node, int first_leaf_node_index, int first_deleted_leaf_node_index, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_first_leaf_node_index"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( first_leaf_node_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid first leaf node index value less than zero.", function ); return( -1 ); } if( first_deleted_leaf_node_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid first deleted leaf node index value less than zero.", function ); return( -1 ); } internal_tree_node->first_leaf_node_index = first_leaf_node_index; internal_tree_node->first_deleted_leaf_node_index = first_deleted_leaf_node_index; return( 1 ); } /* Retrieves the node value * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_node_value( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, intptr_t **node_value, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_node_value"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, cache, node, node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; return( 1 ); } /* Sets the node value * * If the flag LIBFDATA_TREE_NODE_VALUE_FLAG_MANAGED is set the node * takes over management of the value and the value is freed when * no longer needed. * * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_node_value( libfdata_tree_node_t *node, libfcache_cache_t *cache, intptr_t *node_value, int (*free_node_value)( intptr_t **node_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_node_value"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( libfdata_tree_set_node_value( internal_tree_node->tree, cache, node, node_value, free_node_value, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set node value.", function ); return( -1 ); } return( 1 ); } /* Resizes the sub nodes * Returns 1 if successful or -1 on error */ int libfdata_tree_node_resize_sub_nodes( libfdata_tree_node_t *node, int number_of_sub_nodes, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_resize_sub_nodes"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - node is a leaf.", function ); return( -1 ); } if( libcdata_array_resize( internal_tree_node->sub_nodes, number_of_sub_nodes, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize sub nodes array.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of sub nodes * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_number_of_sub_nodes( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int *number_of_sub_nodes, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; intptr_t *node_value = NULL; static char *function = "libfdata_tree_node_get_number_of_sub_nodes"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) == 0 ) ) { /* Make sure the node data is read before the sub nodes */ if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ ) == 0 ) { if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, cache, node, &node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) { if( libfdata_tree_read_sub_nodes( internal_tree_node->tree, file_io_handle, cache, node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub nodes.", function ); return( -1 ); } } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ; } if( libcdata_array_get_number_of_entries( internal_tree_node->sub_nodes, number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub nodes array.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific sub node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_sub_node_by_index( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int sub_node_index, libfdata_tree_node_t **sub_node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; intptr_t *node_value = NULL; static char *function = "libfdata_tree_node_get_sub_node_by_index"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - node is a leaf.", function ); return( -1 ); } if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) == 0 ) ) { /* Make sure the node data is read before the sub nodes */ if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ ) == 0 ) { if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, cache, node, &node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) { if( libfdata_tree_read_sub_nodes( internal_tree_node->tree, file_io_handle, cache, node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub nodes.", function ); return( -1 ); } } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ; } if( libcdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Sets the offset and size of a specific sub node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_sub_node_by_index( libfdata_tree_node_t *node, int sub_node_index, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; static char *function = "libfdata_tree_node_set_sub_node_by_index"; off64_t previous_node_offset = 0; size64_t previous_node_size = 0; uint32_t previous_node_flags = 0; int previous_node_file_index = -1; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - node is a leaf.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } if( sub_node == NULL ) { if( libfdata_tree_node_initialize( &sub_node, internal_tree_node->tree, node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub node.", function ); return( -1 ); } if( libcdata_array_set_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t *) sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub node: %d in sub nodes array.", function, sub_node_index ); libfdata_tree_node_free( &sub_node, NULL ); return( -1 ); } } else { if( libfdata_tree_node_get_data_range( sub_node, &previous_node_file_index, &previous_node_offset, &previous_node_size, &previous_node_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d data range.", function, sub_node_index ); return( -1 ); } } if( libfdata_tree_node_set_data_range( sub_node, node_file_index, node_offset, node_size, node_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub node: %d data range.", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Appends a sub node offset and size * Returns 1 if successful or -1 on error */ int libfdata_tree_node_append_sub_node( libfdata_tree_node_t *node, int *sub_node_index, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; static char *function = "libfdata_tree_node_append_sub_node"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - node is a leaf.", function ); return( -1 ); } if( libfdata_tree_node_initialize( &sub_node, internal_tree_node->tree, node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub node.", function ); goto on_error; } if( libfdata_tree_node_set_data_range( sub_node, node_file_index, node_offset, node_size, node_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub node data range.", function ); goto on_error; } if( libcdata_array_append_entry( internal_tree_node->sub_nodes, sub_node_index, (intptr_t *) sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append sub node to sub nodes array.", function ); goto on_error; } return( 1 ); on_error: if( sub_node != NULL ) { libfdata_tree_node_free( &sub_node, NULL ); } return( -1 ); } /* Inserts a sub node offset and size * * Uses the node_value_compare_function to determine the order of the sub nodes * The node_value_compare_function should return LIBFDATA_COMPARE_LESS, * LIBFDATA_COMPARE_EQUAL, LIBFDATA_COMPARE_GREATER if successful or -1 on error * * Duplicate entries are allowed by default and inserted after the last duplicate entry. * Only allowing unique entries can be enforced by setting the flag LIBFDATA_TREE_NODE_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the node already exists or -1 on error */ int libfdata_tree_node_insert_sub_node( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int *sub_node_index, int node_file_index, off64_t node_offset, size64_t node_size, uint32_t node_flags, int (*node_value_compare_function)( intptr_t *first_node_value, intptr_t *second_node_value, libcerror_error_t **error ), uint8_t insert_flags, uint8_t read_flags, libcerror_error_t **error ) { libfcache_cache_t *insert_cache = NULL; libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *insert_sub_node = NULL; libfdata_tree_node_t *sub_node = NULL; intptr_t *insert_sub_node_value = NULL; intptr_t *sub_node_value = NULL; static char *function = "libfdata_tree_node_insert_sub_node"; int number_of_sub_nodes = 0; int result = 0; int sub_node_iterator = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( sub_node_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub node index.", function ); return( -1 ); } if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - node is a leaf.", function ); return( -1 ); } if( node_value_compare_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node value compare function.", function ); return( -1 ); } if( ( insert_flags & ~( LIBFDATA_TREE_NODE_INSERT_FLAG_UNIQUE_SUB_NODE_VALUES ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported insert flags: 0x%02" PRIx8 ".", function, insert_flags ); return( -1 ); } if( libfdata_tree_node_initialize( &insert_sub_node, internal_tree_node->tree, node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create insert sub node.", function ); goto on_error; } if( libfdata_tree_node_set_data_range( insert_sub_node, node_file_index, node_offset, node_size, node_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set insert sub node data range.", function ); goto on_error; } if( libcdata_array_get_number_of_entries( internal_tree_node->sub_nodes, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub nodes array.", function ); goto on_error; } if( libfcache_cache_initialize( &insert_cache, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create insert cache.", function ); goto on_error; } if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, insert_cache, insert_sub_node, &insert_sub_node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve insert sub node value.", function ); goto on_error; } for( sub_node_iterator = 0; sub_node_iterator < number_of_sub_nodes; sub_node_iterator++ ) { if( libcdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_iterator, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_iterator ); goto on_error; } if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, cache, sub_node, &sub_node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node value: %d.", function, sub_node_iterator ); goto on_error; } result = node_value_compare_function( insert_sub_node_value, sub_node_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare sub node value: %d.", function, sub_node_iterator ); goto on_error; } else if( result == LIBFDATA_COMPARE_EQUAL ) { if( ( insert_flags & LIBFDATA_TREE_NODE_INSERT_FLAG_UNIQUE_SUB_NODE_VALUES ) != 0 ) { if( libfcache_cache_free( &insert_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the insert cache.", function ); goto on_error; } if( libfdata_tree_node_free( &insert_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the insert sub node.", function ); goto on_error; } return( 0 ); } } else if( result == LIBFDATA_COMPARE_LESS ) { break; } else if( result != LIBFDATA_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported node value compare function return value: %d.", function, result ); goto on_error; } } if( libfcache_cache_free( &insert_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the insert cache.", function ); goto on_error; } if( ( number_of_sub_nodes > 0 ) && ( result == LIBCDATA_COMPARE_LESS ) ) { *sub_node_index = sub_node_iterator; if( libcdata_array_resize( internal_tree_node->sub_nodes, number_of_sub_nodes + 1, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize sub nodes array.", function ); goto on_error; } for( sub_node_iterator = number_of_sub_nodes; sub_node_iterator > *sub_node_index; sub_node_iterator-- ) { if( libcdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_iterator - 1, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d from sub nodes array.", function, sub_node_iterator - 1 ); goto on_error; } if( libcdata_array_set_entry_by_index( internal_tree_node->sub_nodes, sub_node_iterator, (intptr_t *) sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub node: %d in sub nodes array.", function, sub_node_iterator ); goto on_error; } } if( libcdata_array_set_entry_by_index( internal_tree_node->sub_nodes, *sub_node_index, (intptr_t *) insert_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set insert sub node: %d in sub nodes array.", function, *sub_node_index ); goto on_error; } } else { *sub_node_index = number_of_sub_nodes; if( libcdata_array_resize( internal_tree_node->sub_nodes, number_of_sub_nodes + 1, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize sub nodes array.", function ); goto on_error; } if( libcdata_array_set_entry_by_index( internal_tree_node->sub_nodes, *sub_node_index, (intptr_t *) insert_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set insert sub node: %d in sub nodes array.", function, *sub_node_index ); goto on_error; } } return( 1 ); on_error: if( insert_cache != NULL ) { libfcache_cache_free( &insert_cache, NULL ); } if( insert_sub_node != NULL ) { libfdata_tree_node_free( &insert_sub_node, NULL ); } return( -1 ); } /* Splits the sub nodes * Returns 1 if successful or -1 on error */ int libfdata_tree_node_split_sub_nodes( libfdata_tree_node_t *node, int number_of_splits, libcerror_error_t **error ) { libcdata_array_t *virtual_sub_nodes_array = NULL; libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; libfdata_tree_node_t *virtual_sub_node = NULL; static char *function = "libfdata_tree_node_split_sub_nodes"; int number_of_split_sub_nodes = 0; int number_of_sub_nodes = 0; int result = 1; int last_sub_node_index = 0; int split_sub_node_index = 0; int sub_node_index = 0; int virtual_sub_node_index = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - node is a leaf.", function ); return( -1 ); } if( number_of_splits < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid number of splits value less than zero.", function ); return( -1 ); } if( number_of_splits == 0 ) { return( 1 ); } if( libcdata_array_get_number_of_entries( internal_tree_node->sub_nodes, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub nodes array.", function ); return( -1 ); } number_of_split_sub_nodes = number_of_sub_nodes / number_of_splits; if( number_of_split_sub_nodes < 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: number of sub nodes too small to split in: %d.", function, number_of_splits ); return( -1 ); } if( libcdata_array_initialize( &virtual_sub_nodes_array, number_of_splits, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create virtual sub nodes array.", function ); return( -1 ); } for( virtual_sub_node_index = 0; virtual_sub_node_index < number_of_splits; virtual_sub_node_index++ ) { if( libfdata_tree_node_initialize( &virtual_sub_node, internal_tree_node->tree, node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create virtual sub node: %d.", function, virtual_sub_node_index ); libcdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } ( (libfdata_internal_tree_node_t *) virtual_sub_node )->flags |= LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL; if( libcdata_array_set_entry_by_index( virtual_sub_nodes_array, virtual_sub_node_index, (intptr_t *) virtual_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set virtual sub node: %d in virtual sub nodes array.", function, virtual_sub_node_index ); libfdata_tree_node_free( &virtual_sub_node, NULL ); libcdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } last_sub_node_index = ( number_of_split_sub_nodes * ( virtual_sub_node_index + 1 ) ) - 1; if( virtual_sub_node_index == ( number_of_splits - 1 ) ) { last_sub_node_index += number_of_sub_nodes % number_of_splits; } if( last_sub_node_index > number_of_sub_nodes ) { last_sub_node_index = number_of_sub_nodes - 1; } if( libcdata_array_resize( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->sub_nodes, last_sub_node_index + 1 - sub_node_index, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize sub nodes array of virtual sub node: %d.", function, virtual_sub_node_index ); libcdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } split_sub_node_index = 0; while( sub_node_index <= last_sub_node_index ) { if( libcdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); libcdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } if( split_sub_node_index == 0 ) { if( sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing sub node: %d.", function, sub_node_index ); libcdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } if( ( (libfdata_internal_tree_node_t *) sub_node )->node_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub node: %d - missing node data range.", function, sub_node_index ); libcdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } /* The node data range of a virtual node cannot be set by the set_data_range function */ if( libfdata_tree_node_get_data_range( sub_node, &( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->node_data_range->file_index ), &( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->node_data_range->offset ), &( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->node_data_range->size ), &( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->node_data_range->flags ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set virtual sub node data range.", function ); libcdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } } if( libcdata_array_set_entry_by_index( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->sub_nodes, split_sub_node_index, (intptr_t *) sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in sub nodes array of virtual sub node: %d.", function, split_sub_node_index, virtual_sub_node_index ); libcdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } if( libfdata_tree_node_set_parent_node( sub_node, virtual_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set parent node in sub node: %d.", function, split_sub_node_index ); libcdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } sub_node_index++; split_sub_node_index++; } virtual_sub_node = NULL; } if( result != 1 ) { /* Set the parent values in the sub nodes back to their orginal value */ for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libcdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); continue; } if( libfdata_tree_node_set_parent_node( sub_node, node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set parent node in sub node: %d.", function, sub_node_index ); continue; } } return( -1 ); } if( libcdata_array_free( &( internal_tree_node->sub_nodes ), NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the sub nodes array.", function ); result = -1; } internal_tree_node->sub_nodes = virtual_sub_nodes_array; return( result ); } /* Determines if the node is deleted * Returns 1 if deleted, 0 if not or -1 on error */ int libfdata_tree_node_is_deleted( libfdata_tree_node_t *node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_is_deleted"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_DELETED ) != 0 ) ) { return( 1 ); } return( 0 ); } /* Marks a node as deleted * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_deleted( libfdata_tree_node_t *node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_deleted"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; /* TODO add deleted branch node support */ if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid node - currently only deleted leaf nodes are supported.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_IS_DELETED; if( libfdata_tree_node_set_calculate_leaf_node_values( node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set calculate leaf node values.", function ); return( -1 ); } return( 1 ); } /* Makes a deleted node of a specific sub node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_deleted_sub_node( libfdata_tree_node_t *node, int sub_node_index, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; static char *function = "libfdata_tree_node_set_deleted_sub_node"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( libcdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } if( sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing sub node: %d.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_set_deleted( sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to set deleted in sub node: %d.", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Sets the flag to calculate the leaf node values and propagates this up to its parent node * Returns 1 if the successful or -1 on error */ int libfdata_tree_node_set_calculate_leaf_node_values( libfdata_tree_node_t *node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_calculate_leaf_node_values"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( internal_tree_node->parent_node != NULL ) { if( libfdata_tree_node_set_calculate_leaf_node_values( internal_tree_node->parent_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set calculate leaf node values in parent node.", function ); return( -1 ); } } internal_tree_node->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Reads the leaf node values * Returns 1 if the successful or -1 on error */ int libfdata_tree_node_read_leaf_node_values( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; intptr_t *node_value = NULL; static char *function = "libfdata_tree_node_read_leaf_node_values"; int number_of_deleted_leaf_nodes = 0; int number_of_leaf_nodes = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) == 0 ) ) { /* Make sure the node data is read before the sub nodes */ if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ ) == 0 ) { if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, cache, node, &node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) { if( libfdata_tree_read_sub_nodes( internal_tree_node->tree, file_io_handle, cache, node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub nodes.", function ); return( -1 ); } } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ; } internal_tree_node->number_of_leaf_nodes = 0; internal_tree_node->number_of_deleted_leaf_nodes = 0; if( libcdata_array_get_number_of_entries( internal_tree_node->sub_nodes, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub nodes array.", function ); return( -1 ); } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libcdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_number_of_leaf_nodes( sub_node, file_io_handle, cache, &number_of_leaf_nodes, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf nodes from sub node: %d.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_number_of_deleted_leaf_nodes( sub_node, file_io_handle, cache, &number_of_deleted_leaf_nodes, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of deleted leaf nodes from sub node: %d.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_set_first_leaf_node_index( sub_node, internal_tree_node->number_of_leaf_nodes, internal_tree_node->number_of_deleted_leaf_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set first leaf node index in sub node: %d.", function, sub_node_index ); return( -1 ); } if( ( number_of_leaf_nodes == 0 ) && ( number_of_deleted_leaf_nodes == 0 ) ) { /* It is possible to have branch nodes without leaf nodes */ result = libfdata_tree_node_is_leaf( sub_node, file_io_handle, cache, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub node: %d is a leaf.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { result = libfdata_tree_node_is_deleted( sub_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub node: %d is deleted.", function, sub_node_index ); return( -1 ); } else if( result == 0 ) { internal_tree_node->number_of_leaf_nodes++; } else { internal_tree_node->number_of_deleted_leaf_nodes++; } } } else { internal_tree_node->number_of_leaf_nodes += number_of_leaf_nodes; internal_tree_node->number_of_deleted_leaf_nodes += number_of_deleted_leaf_nodes; } } return( 1 ); } /* Determines if the node is a leaf node * Returns 1 if a leaf node, 0 if not or -1 on error */ int libfdata_tree_node_is_leaf( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; intptr_t *node_value = NULL; static char *function = "libfdata_tree_node_is_leaf"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) == 0 ) ) { /* Make sure the node data is read before the sub nodes */ if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ ) == 0 ) { if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, cache, node, &node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) { if( libfdata_tree_read_sub_nodes( internal_tree_node->tree, file_io_handle, cache, node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub nodes.", function ); return( -1 ); } } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ; } if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { return( 1 ); } return( 0 ); } /* Makes a leaf node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_leaf( libfdata_tree_node_t *node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_leaf"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_RANGE_SET ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - sub nodes range was set.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_IS_LEAF; if( libfdata_tree_node_set_calculate_leaf_node_values( node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set calculate leaf node values.", function ); return( -1 ); } return( 1 ); } /* Makes a leaf node of a specific sub node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_leaf_sub_node( libfdata_tree_node_t *node, int sub_node_index, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; static char *function = "libfdata_tree_node_set_leaf_sub_node"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( libcdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } if( sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing sub node: %d.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_set_leaf( sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to set leaf in sub node: %d.", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Retrieves the number of leaf nodes * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_number_of_leaf_nodes( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int *number_of_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_number_of_leaf_nodes"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( number_of_leaf_nodes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of leaf nodes.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_tree_node_read_leaf_node_values( node, file_io_handle, cache, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); } *number_of_leaf_nodes = internal_tree_node->number_of_leaf_nodes; return( 1 ); } /* Retrieves a specific leaf node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_leaf_node_by_index( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int leaf_node_index, libfdata_tree_node_t **leaf_node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; static char *function = "libfdata_tree_node_get_leaf_node_by_index"; int first_deleted_leaf_node_index = 0; int first_leaf_node_index = 0; int number_of_leaf_nodes = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( leaf_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid leaf node.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_tree_node_read_leaf_node_values( node, file_io_handle, cache, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); } if( libcdata_array_get_number_of_entries( internal_tree_node->sub_nodes, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub nodes array.", function ); return( -1 ); } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libcdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_number_of_leaf_nodes( sub_node, file_io_handle, cache, &number_of_leaf_nodes, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf nodes from sub node: %d.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_first_leaf_node_index( sub_node, &first_leaf_node_index, &first_deleted_leaf_node_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first leaf node index from sub node: %d.", function, sub_node_index ); return( -1 ); } if( number_of_leaf_nodes == 0 ) { /* It is possible to have branch nodes without leaf nodes */ result = libfdata_tree_node_is_leaf( sub_node, file_io_handle, cache, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub node: %d is a leaf.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { result = libfdata_tree_node_is_deleted( sub_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub node: %d is deleted.", function, sub_node_index ); return( -1 ); } else if( result == 0 ) { if( leaf_node_index == first_leaf_node_index ) { *leaf_node = sub_node; break; } } } } else if( ( leaf_node_index >= first_leaf_node_index ) && ( leaf_node_index < ( first_leaf_node_index + number_of_leaf_nodes ) ) ) { /* Note that the first_leaf_node_index is relative for a branch */ if( libfdata_tree_node_get_leaf_node_by_index( sub_node, file_io_handle, cache, leaf_node_index - first_leaf_node_index, leaf_node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node: %d from sub node: %d.", function, leaf_node_index - first_leaf_node_index, sub_node_index ); return( -1 ); } break; } } if( sub_node_index >= number_of_sub_nodes ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid sub node index value out of bounds.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of deleted leaf nodes * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_number_of_deleted_leaf_nodes( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int *number_of_deleted_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_number_of_deleted_leaf_nodes"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( number_of_deleted_leaf_nodes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of deleted leaf nodes.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_tree_node_read_leaf_node_values( node, file_io_handle, cache, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); } *number_of_deleted_leaf_nodes = internal_tree_node->number_of_deleted_leaf_nodes; return( 1 ); } /* Retrieves a specific deleted leaf node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_deleted_leaf_node_by_index( libfdata_tree_node_t *node, intptr_t *file_io_handle, libfcache_cache_t *cache, int deleted_leaf_node_index, libfdata_tree_node_t **deleted_leaf_node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; static char *function = "libfdata_tree_node_get_deleted_leaf_node_by_index"; int first_deleted_leaf_node_index = 0; int first_leaf_node_index = 0; int number_of_deleted_leaf_nodes = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( deleted_leaf_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid deleted leaf node.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_tree_node_read_leaf_node_values( node, file_io_handle, cache, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); } if( libcdata_array_get_number_of_entries( internal_tree_node->sub_nodes, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub nodes array.", function ); return( -1 ); } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libcdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_number_of_deleted_leaf_nodes( sub_node, file_io_handle, cache, &number_of_deleted_leaf_nodes, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf nodes from sub node: %d.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_first_leaf_node_index( sub_node, &first_leaf_node_index, &first_deleted_leaf_node_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first leaf node index from sub node: %d.", function, sub_node_index ); return( -1 ); } if( number_of_deleted_leaf_nodes == 0 ) { /* It is possible to have branch nodes without leaf nodes */ result = libfdata_tree_node_is_leaf( sub_node, file_io_handle, cache, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub node: %d is a leaf.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { result = libfdata_tree_node_is_deleted( sub_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub node: %d is deleted.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { if( deleted_leaf_node_index == first_deleted_leaf_node_index ) { *deleted_leaf_node = sub_node; break; } } } } else if( ( deleted_leaf_node_index >= first_deleted_leaf_node_index ) && ( deleted_leaf_node_index < ( first_deleted_leaf_node_index + number_of_deleted_leaf_nodes ) ) ) { /* Note that the first_deleted_leaf_node_index is relative for a branch */ if( libfdata_tree_node_get_deleted_leaf_node_by_index( sub_node, file_io_handle, cache, deleted_leaf_node_index - first_deleted_leaf_node_index, deleted_leaf_node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve deleted leaf node: %d from sub node: %d.", function, deleted_leaf_node_index - first_deleted_leaf_node_index, sub_node_index ); return( -1 ); } break; } } if( sub_node_index >= number_of_sub_nodes ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid sub node index value out of bounds.", function ); return( -1 ); } return( 1 ); } libevt-20170120/libfdata/libfdata_libcnotify.h0000664000175000017500000000266313040331700023242 0ustar00lordyestalordyesta00000000000000/* * The internal libcnotify header * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_LIBCNOTIFY_H ) #define _LIBFDATA_LIBCNOTIFY_H #include /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify */ #if defined( HAVE_LOCAL_LIBCNOTIFY ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT * before including libcnotify.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCNOTIFY_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCNOTIFY ) */ #endif /* !defined( _LIBFDATA_LIBCNOTIFY_H ) */ libevt-20170120/libfdata/libfdata_notify.c0000664000175000017500000000530413040331700022376 0ustar00lordyestalordyesta00000000000000/* * Notification functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "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 ) */ libevt-20170120/libfdata/libfdata_btree_node.h0000664000175000017500000001672213040331700023207 0ustar00lordyestalordyesta00000000000000/* * The balanced tree node functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_BTREE_NODE_H ) #define _LIBFDATA_INTERNAL_BTREE_NODE_H #include #include #include "libfdata_btree_range.h" #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_btree_node libfdata_internal_btree_node_t; struct libfdata_internal_btree_node { /* The (node) level */ int level; /* The sub node (data) ranges array */ libcdata_array_t *sub_node_ranges_array; /* The number of leaf values in the branch */ int branch_number_of_leaf_values; /* The leaf value (data) ranges array */ libcdata_array_t *leaf_value_ranges_array; /* The flags */ uint8_t flags; }; int libfdata_btree_node_initialize( libfdata_btree_node_t **node, int level, libcerror_error_t **error ); int libfdata_btree_node_free( libfdata_btree_node_t **node, libcerror_error_t **error ); /* Node functions */ LIBFDATA_EXTERN \ int libfdata_btree_node_get_level( libfdata_btree_node_t *node, int *level, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_node_is_branch( libfdata_btree_node_t *node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_node_is_leaf( libfdata_btree_node_t *node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_node_is_root( libfdata_btree_node_t *node, libcerror_error_t **error ); /* Sub node data range functions */ LIBFDATA_EXTERN \ int libfdata_btree_node_get_number_of_sub_nodes( libfdata_btree_node_t *node, int *number_of_sub_nodes, libcerror_error_t **error ); int libfdata_btree_node_get_sub_node_data_range_by_index( libfdata_btree_node_t *node, int sub_node_index, libfdata_btree_range_t **sub_node_data_range, libcerror_error_t **error ); int libfdata_btree_node_get_sub_node_data_range_by_mapped_index( libfdata_btree_node_t *node, int mapped_index, libfdata_btree_range_t **sub_node_data_range, libcerror_error_t **error ); int libfdata_btree_node_get_sub_node_data_range_by_key( libfdata_btree_node_t *node, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), int *sub_node_index, libfdata_btree_range_t **sub_node_data_range, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_node_get_sub_node_by_index( libfdata_btree_node_t *node, int sub_node_index, int *sub_node_data_file_index, off64_t *sub_node_data_offset, size64_t *sub_node_data_size, uint32_t *sub_node_data_flags, intptr_t **key_value, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_node_set_sub_node_by_index( libfdata_btree_node_t *node, int sub_node_index, int sub_node_data_file_index, off64_t sub_node_data_offset, size64_t sub_node_data_size, uint32_t sub_node_data_flags, intptr_t *key_value, int (*free_key_value)( intptr_t **key_value, libcerror_error_t **error ), uint8_t key_value_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_node_append_sub_node( libfdata_btree_node_t *node, int *sub_node_index, int sub_node_data_file_index, off64_t sub_node_data_offset, size64_t sub_node_data_size, uint32_t sub_node_data_flags, intptr_t *key_value, int (*free_key_value)( intptr_t **key_value, libcerror_error_t **error ), uint8_t key_value_flags, libcerror_error_t **error ); /* Branch leaf values functions */ int libfdata_btree_node_get_number_of_leaf_values_in_branch( libfdata_btree_node_t *node, int *number_of_leaf_values, libcerror_error_t **error ); /* Leaf value data range functions */ LIBFDATA_EXTERN \ int libfdata_btree_node_get_number_of_leaf_values( libfdata_btree_node_t *node, int *number_of_leaf_values, libcerror_error_t **error ); int libfdata_btree_node_get_leaf_value_data_range_by_index( libfdata_btree_node_t *node, int leaf_value_index, libfdata_btree_range_t **leaf_value_data_range, libcerror_error_t **error ); int libfdata_btree_node_get_leaf_value_data_range_by_mapped_index( libfdata_btree_node_t *node, int mapped_index, libfdata_btree_range_t **leaf_value_data_range, libcerror_error_t **error ); int libfdata_btree_node_get_leaf_value_data_range_by_key( libfdata_btree_node_t *node, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), libfdata_btree_range_t **leaf_value_data_range, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_node_get_leaf_value_by_index( libfdata_btree_node_t *node, int leaf_value_index, int *leaf_value_data_file_index, off64_t *leaf_value_data_offset, size64_t *leaf_value_data_size, uint32_t *leaf_value_data_flags, intptr_t **key_value, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_node_get_leaf_value_by_key( libfdata_btree_node_t *node, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), int *leaf_value_data_file_index, off64_t *leaf_value_data_offset, size64_t *leaf_value_data_size, uint32_t *leaf_value_data_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_node_set_leaf_value_by_index( libfdata_btree_node_t *node, int leaf_value_index, int leaf_value_data_file_index, off64_t leaf_value_data_offset, size64_t leaf_value_data_size, uint32_t leaf_value_data_flags, intptr_t *key_value, int (*free_key_value)( intptr_t **key_value, libcerror_error_t **error ), uint8_t key_value_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_btree_node_append_leaf_value( libfdata_btree_node_t *node, int *leaf_value_index, int leaf_value_data_file_index, off64_t leaf_value_data_offset, size64_t leaf_value_data_size, uint32_t leaf_value_data_flags, intptr_t *key_value, int (*free_key_value)( intptr_t **key_value, libcerror_error_t **error ), uint8_t key_value_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_INTERNAL_BTREE_NODE_H ) */ libevt-20170120/libfdata/libfdata_list_element.h0000664000175000017500000000770413040331700023565 0ustar00lordyestalordyesta00000000000000/* * The list element functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_LIST_ELEMENT_H ) #define _LIBFDATA_INTERNAL_LIST_ELEMENT_H #include #include #include "libfdata_extern.h" #include "libfdata_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 time stamp */ time_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, libfdata_list_t *list, int element_index, libcerror_error_t **error ); int libfdata_list_element_get_element_index( libfdata_list_element_t *element, int *element_index, libcerror_error_t **error ); int libfdata_list_element_set_element_index( libfdata_list_element_t *element, int element_index, libcerror_error_t **error ); int libfdata_list_element_get_timestamp( libfdata_list_element_t *element, time_t *timestamp, libcerror_error_t **error ); /* Data range functions */ 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, libfcache_cache_t *cache, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_element_set_element_value( libfdata_list_element_t *element, intptr_t *file_io_handle, libfcache_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 ) */ libevt-20170120/libfdata/libfdata_inline.h0000664000175000017500000000211713040331700022350 0ustar00lordyestalordyesta00000000000000/* * The internal inline definition * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_INLINE_H ) #define _LIBFDATA_INTERNAL_INLINE_H #include #if defined( _MSC_VER ) #define LIBFDATA_INLINE _inline #elif defined( __BORLANDC__ ) #define LIBFDATA_INLINE /* inline */ #else #define LIBFDATA_INLINE inline #endif #endif libevt-20170120/libfdata/libfdata_btree.c0000664000175000017500000022403113040331700022167 0ustar00lordyestalordyesta00000000000000/* * The balanced tree functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_btree.h" #include "libfdata_btree_node.h" #include "libfdata_btree_range.h" #include "libfdata_definitions.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_libfcache.h" #include "libfdata_types.h" #include "libfdata_unused.h" /* Creates a tree * Make sure the value tree is referencing, is set to NULL * * If the flag LIBFDATA_DATA_HANDLE_FLAG_MANAGED is set the tree * 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_btree_initialize( libfdata_btree_t **tree, 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_node)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_btree_node_t *node, int node_data_file_index, off64_t node_data_offset, size64_t node_data_size, uint32_t node_data_flags, intptr_t *key_value, uint8_t read_flags, libcerror_error_t **error ), int (*read_leaf_value)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_btree_t *tree, libfcache_cache_t *cache, int leaf_value_index, int leaf_value_data_file_index, off64_t leaf_value_data_offset, size64_t leaf_value_data_size, uint32_t leaf_value_data_flags, intptr_t *key_value, uint8_t read_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_btree_t *internal_tree = NULL; static char *function = "libfdata_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 ); } internal_tree = memory_allocate_structure( libfdata_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( libfdata_internal_btree_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear tree.", function ); goto on_error; } if( libfdata_btree_range_initialize( &( internal_tree->root_node_data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create root node data range.", function ); goto on_error; } if( libfcache_date_time_get_timestamp( &( internal_tree->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_tree->flags |= flags; internal_tree->calculate_node_cache_entry_index = &libfdata_btree_calculate_node_cache_entry_index; internal_tree->calculate_leaf_value_cache_entry_index = &libfdata_btree_calculate_leaf_value_cache_entry_index; internal_tree->data_handle = data_handle; internal_tree->free_data_handle = free_data_handle; internal_tree->clone_data_handle = clone_data_handle; internal_tree->read_node = read_node; internal_tree->read_leaf_value = read_leaf_value; *tree = (libfdata_btree_t *) internal_tree; return( 1 ); on_error: if( internal_tree != NULL ) { if( internal_tree->root_node_data_range != NULL ) { libfdata_btree_range_free( &( internal_tree->root_node_data_range ), NULL ); } memory_free( internal_tree ); } return( -1 ); } /* Frees a tree * Returns 1 if successful or -1 on error */ int libfdata_btree_free( libfdata_btree_t **tree, libcerror_error_t **error ) { libfdata_internal_btree_t *internal_tree = NULL; static char *function = "libfdata_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 = (libfdata_internal_btree_t *) *tree; *tree = NULL; if( libfdata_btree_range_free( &( internal_tree->root_node_data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free root node data range.", function ); result = -1; } if( ( internal_tree->flags & LIBFDATA_DATA_HANDLE_FLAG_MANAGED ) != 0 ) { if( internal_tree->data_handle != NULL ) { if( internal_tree->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_tree->free_data_handle( &( internal_tree->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_tree ); } return( result ); } /* Clones (duplicates) the tree * Returns 1 if successful or -1 on error */ int libfdata_btree_clone( libfdata_btree_t **destination_tree, libfdata_btree_t *source_tree, libcerror_error_t **error ) { libfdata_internal_btree_t *internal_destination_tree = NULL; libfdata_internal_btree_t *internal_source_tree = NULL; intptr_t *destination_data_handle = NULL; static char *function = "libfdata_btree_clone"; if( destination_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination tree.", function ); return( -1 ); } if( *destination_tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination tree value already set.", function ); return( -1 ); } if( source_tree == NULL ) { *destination_tree = NULL; return( 1 ); } internal_source_tree = (libfdata_internal_btree_t *) source_tree; if( internal_source_tree->data_handle != NULL ) { if( internal_source_tree->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source tree - missing free data handle function.", function ); goto on_error; } if( internal_source_tree->clone_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source tree - missing clone data handle function.", function ); goto on_error; } if( internal_source_tree->clone_data_handle( &destination_data_handle, internal_source_tree->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; } } internal_destination_tree = memory_allocate_structure( libfdata_internal_btree_t ); if( internal_destination_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination tree.", function ); goto on_error; } if( memory_set( internal_destination_tree, 0, sizeof( libfdata_internal_btree_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear destination tree.", function ); memory_free( internal_destination_tree ); return( -1 ); } if( internal_source_tree->data_handle != NULL ) { if( internal_source_tree->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source tree - missing free data handle function.", function ); goto on_error; } if( internal_source_tree->clone_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source tree - missing clone data handle function.", function ); goto on_error; } if( internal_source_tree->clone_data_handle( &( internal_destination_tree->data_handle ), internal_source_tree->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; } } if( libfdata_btree_range_clone( &( internal_destination_tree->root_node_data_range ), internal_source_tree->root_node_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination root node data range.", function ); goto on_error; } if( libfcache_date_time_get_timestamp( &( internal_destination_tree->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; } *destination_tree = (libfdata_btree_t *) internal_destination_tree; return( 1 ); on_error: if( internal_destination_tree != NULL ) { if( internal_destination_tree->root_node_data_range != NULL ) { libfdata_btree_range_free( &( internal_destination_tree->root_node_data_range ), NULL ); } if( ( internal_destination_tree->data_handle != NULL ) && ( internal_source_tree->free_data_handle != NULL ) ) { internal_source_tree->free_data_handle( &( internal_destination_tree->data_handle ), NULL ); } memory_free( internal_destination_tree ); } return( -1 ); } /* Cache entry functions */ /* Calculated the node cache entry index * Returns 1 if successful or -1 on error */ int libfdata_btree_calculate_node_cache_entry_index( libfdata_btree_t *tree, libfcache_cache_t *cache, int level LIBFDATA_ATTRIBUTE_UNUSED, int node_data_file_index LIBFDATA_ATTRIBUTE_UNUSED, off64_t node_data_offset, size64_t node_data_size LIBFDATA_ATTRIBUTE_UNUSED, uint32_t node_data_flags LIBFDATA_ATTRIBUTE_UNUSED, int *cache_entry_index, libcerror_error_t **error ) { static char *function = "libfdata_btree_calculate_node_cache_entry_index"; int number_of_cache_entries = 0; LIBFDATA_UNREFERENCED_PARAMETER( level ); LIBFDATA_UNREFERENCED_PARAMETER( node_data_file_index ); LIBFDATA_UNREFERENCED_PARAMETER( node_data_size ); LIBFDATA_UNREFERENCED_PARAMETER( node_data_flags ); if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( cache_entry_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache entry index.", function ); return( -1 ); } if( libfcache_cache_get_number_of_entries( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } /* TODO improve cache entry index calculation */ if( number_of_cache_entries <= 4 ) { *cache_entry_index = node_data_offset % number_of_cache_entries; } else if( level == 0 ) { *cache_entry_index = 0; } else { *cache_entry_index = 1; /* Use 3/4 of the cache for the nodes */ number_of_cache_entries = ( ( number_of_cache_entries - 1 ) / 4 ) * 3; *cache_entry_index += node_data_offset % number_of_cache_entries; } return( 1 ); } /* Calculated the leaf value cache entry index * Returns 1 if successful or -1 on error */ int libfdata_btree_calculate_leaf_value_cache_entry_index( libfdata_btree_t *tree, libfcache_cache_t *cache, int leaf_value_index LIBFDATA_ATTRIBUTE_UNUSED, int leaf_value_data_file_index LIBFDATA_ATTRIBUTE_UNUSED, off64_t leaf_value_data_offset, size64_t leaf_value_data_size LIBFDATA_ATTRIBUTE_UNUSED, uint32_t leaf_value_data_flags LIBFDATA_ATTRIBUTE_UNUSED, int *cache_entry_index, libcerror_error_t **error ) { static char *function = "libfdata_btree_calculate_leaf_value_cache_entry_index"; int number_of_cache_entries = 0; LIBFDATA_UNREFERENCED_PARAMETER( leaf_value_index ); LIBFDATA_UNREFERENCED_PARAMETER( leaf_value_data_file_index ); LIBFDATA_UNREFERENCED_PARAMETER( leaf_value_data_size ); LIBFDATA_UNREFERENCED_PARAMETER( leaf_value_data_flags ); if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( cache_entry_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache entry index.", function ); return( -1 ); } if( libfcache_cache_get_number_of_entries( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } /* TODO improve cache entry index calculation */ if( number_of_cache_entries <= 4 ) { *cache_entry_index = leaf_value_data_offset % number_of_cache_entries; } else { /* Use 1/4 of the cache for the leaf values */ *cache_entry_index = ( ( number_of_cache_entries - 1 ) / 4 ) * 3; number_of_cache_entries = ( number_of_cache_entries - 1 ) / 4; *cache_entry_index += leaf_value_data_offset % number_of_cache_entries; } return( 1 ); } /* Root node functions */ /* Retrieves the root node * Returns 1 if successful or -1 on error */ int libfdata_btree_get_root_node( libfdata_btree_t *tree, int *node_data_file_index, off64_t *node_data_offset, size64_t *node_data_size, uint32_t *node_data_flags, libcerror_error_t **error ) { libfdata_internal_btree_t *internal_tree = NULL; static char *function = "libfdata_btree_get_root_node"; intptr_t *key_value = NULL; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_btree_t *) tree; if( libfdata_btree_range_get( internal_tree->root_node_data_range, node_data_file_index, node_data_offset, node_data_size, node_data_flags, &key_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root node data range.", function ); return( -1 ); } return( 1 ); } /* Sets the root node * Returns 1 if successful or -1 on error */ int libfdata_btree_set_root_node( libfdata_btree_t *tree, int node_data_file_index, off64_t node_data_offset, size64_t node_data_size, uint32_t node_data_flags, libcerror_error_t **error ) { libfdata_internal_btree_t *internal_tree = NULL; intptr_t *key_value = NULL; static char *function = "libfdata_btree_set_root_node"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_btree_t *) tree; if( node_data_file_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid node data file index less than zero.", function ); return( -1 ); } if( node_data_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid node data offset value less than zero.", function ); return( -1 ); } if( node_data_size > (size64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid node data size value exceeds maximum.", function ); return( -1 ); } if( libfdata_btree_range_set( internal_tree->root_node_data_range, node_data_file_index, node_data_offset, node_data_size, node_data_flags, key_value, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set root node data range.", function ); return( -1 ); } if( libfcache_date_time_get_timestamp( &( internal_tree->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 ); } /* Leaf value functions */ /* Reads the leaf value identified by the data range * Returns 1 if successful or -1 on error */ int libfdata_btree_read_leaf_value( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *leaf_value_data_range, intptr_t **leaf_value, uint8_t read_flags, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; intptr_t *key_value = NULL; static char *function = "libfdata_btree_read_leaf_value"; off64_t cache_value_offset = 0; off64_t leaf_value_data_offset = 0; size64_t leaf_value_data_size = 0; time_t cache_value_timestamp = 0; uint32_t leaf_value_data_flags = 0; int cache_entry_index = -1; int cache_value_file_index = -1; int leaf_value_data_file_index = -1; int leaf_value_index = -1; int result = 0; if( internal_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( internal_tree->read_leaf_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree - missing read leaf value function.", function ); return( -1 ); } if( leaf_value_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree leaf value data range.", function ); return( -1 ); } leaf_value_index = leaf_value_data_range->mapped_first_leaf_value_index; if( libfdata_btree_range_get( leaf_value_data_range, &leaf_value_data_file_index, &leaf_value_data_offset, &leaf_value_data_size, &leaf_value_data_flags, &key_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value data range values.", function ); return( -1 ); } if( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) { if( internal_tree->calculate_leaf_value_cache_entry_index( (libfdata_btree_t *) internal_tree, cache, leaf_value_index, leaf_value_data_file_index, leaf_value_data_offset, leaf_value_data_size, leaf_value_data_flags, &cache_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate cache entry index.", function ); return( -1 ); } if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfcache_cache_value_get_identifier( cache_value, &cache_value_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( ( leaf_value_data_file_index == cache_value_file_index ) && ( leaf_value_data_offset == cache_value_offset ) && ( internal_tree->timestamp == cache_value_timestamp ) ) { result = 1; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( result == 0 ) { libcnotify_printf( "%s: cache: 0x%08" PRIjx " miss (entry: %d, want: %" PRIi64 ", got: %" PRIi64 ")\n", function, (intptr_t) cache, cache_entry_index, leaf_value_data_offset, cache_value_offset ); } else { libcnotify_printf( "%s: cache: 0x%08" PRIjx " hit (entry: %d)\n", function, (intptr_t) cache, cache_entry_index ); } } #endif } if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading leaf value at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIu64 "\n", function, leaf_value_data_offset, leaf_value_data_offset, leaf_value_data_size ); } #endif if( internal_tree->read_leaf_value( internal_tree->data_handle, file_io_handle, (libfdata_btree_t *) internal_tree, cache, leaf_value_index, leaf_value_data_file_index, leaf_value_data_offset, leaf_value_data_size, leaf_value_data_flags, key_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read leaf value at offset: %" PRIi64 ".", function, leaf_value_data_offset ); return( -1 ); } if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfcache_cache_value_get_identifier( cache_value, &cache_value_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( ( leaf_value_data_file_index != cache_value_file_index ) || ( leaf_value_data_offset != cache_value_offset ) || ( internal_tree->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, leaf_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value.", function ); return( -1 ); } return( 1 ); } /* Reads the node identified by the data range * Returns 1 if successful or -1 on error */ int libfdata_btree_read_node( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *node_data_range, int level, libfdata_btree_node_t **node, uint8_t read_flags, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; intptr_t *key_value = NULL; static char *function = "libfdata_btree_read_node"; off64_t cache_value_offset = 0; off64_t node_data_offset = 0; size64_t node_data_size = 0; time_t cache_value_timestamp = 0; uint32_t node_data_flags = 0; int cache_entry_index = -1; int cache_value_file_index = -1; int node_data_file_index = -1; int result = 0; if( internal_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( internal_tree->read_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree - missing read node function.", function ); return( -1 ); } if( node_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree node data range.", function ); return( -1 ); } if( level < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid level value out of bounds.", function ); return( -1 ); } if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } *node = NULL; if( libfdata_btree_range_get( node_data_range, &node_data_file_index, &node_data_offset, &node_data_size, &node_data_flags, &key_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node data range values.", function ); goto on_error; } if( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) { if( internal_tree->calculate_node_cache_entry_index( (libfdata_btree_t *) internal_tree, cache, level, node_data_file_index, node_data_offset, node_data_size, node_data_flags, &cache_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate cache entry index.", function ); goto on_error; } if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); goto on_error; } 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 ); goto on_error; } } if( ( node_data_file_index == cache_value_file_index ) && ( node_data_offset == cache_value_offset ) && ( internal_tree->timestamp == cache_value_timestamp ) ) { result = 1; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( result == 0 ) { libcnotify_printf( "%s: cache: 0x%08" PRIjx " miss (entry: %d, want: %" PRIi64 ", got: %" PRIi64 ")\n", function, (intptr_t) cache, cache_entry_index, node_data_offset, cache_value_offset ); } else { libcnotify_printf( "%s: cache: 0x%08" PRIjx " hit (entry: %d)\n", function, (intptr_t) cache, cache_entry_index ); } } #endif } if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading node at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIu64 "\n", function, node_data_offset, node_data_offset, node_data_size ); } #endif if( libfdata_btree_node_initialize( node, level, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create node at level: %d.", function, level ); goto on_error; } if( internal_tree->read_node( internal_tree->data_handle, file_io_handle, *node, node_data_file_index, node_data_offset, node_data_size, node_data_flags, key_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read node at offset: %" PRIi64 ".", function, node_data_offset ); goto on_error; } if( ( read_flags & LIBFDATA_READ_FLAG_NO_CACHE ) == 0 ) { if( internal_tree->calculate_node_cache_entry_index( (libfdata_btree_t *) internal_tree, cache, level, node_data_file_index, node_data_offset, node_data_size, node_data_flags, &cache_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate cache entry index.", function ); goto on_error; } if( libfcache_cache_set_value_by_index( cache, cache_entry_index, node_data_file_index, node_data_offset, internal_tree->timestamp, (intptr_t *) *node, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_btree_node_free, LIBFCACHE_CACHE_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set node in cache entry: %d.", function, cache_entry_index ); goto on_error; } } } else { if( libfcache_cache_value_get_value( cache_value, (intptr_t **) node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value from cache.", function ); *node = NULL; goto on_error; } if( ( read_flags & LIBFDATA_READ_FLAG_NO_CACHE ) != 0 ) { /* Remove the node from the cache */ 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 entry.", function ); *node = NULL; goto on_error; } } } return( 1 ); on_error: if( *node != NULL ) { libfdata_btree_node_free( node, NULL ); } return( -1 ); } /* Reads the sub tree * Returns 1 if successful or -1 on error */ int libfdata_btree_read_sub_tree( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *node_data_range, int level, int mapped_first_leaf_value_index, libfdata_btree_node_t **node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_btree_range_t *leaf_value_data_range = NULL; libfdata_btree_range_t *sub_node_data_range = NULL; libfdata_btree_node_t *sub_node = NULL; intptr_t *key_value = NULL; static char *function = "libfdata_btree_read_sub_tree"; off64_t node_data_offset = 0; size64_t node_data_size = 0; uint32_t node_data_flags = 0; int branch_number_of_leaf_values = 0; int cache_entry_index = -1; int leaf_value_index = 0; int node_data_file_index = -1; int number_of_leaf_values = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( internal_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( level < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid level value out of bounds.", function ); return( -1 ); } if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node.", function ); return( -1 ); } /* Note that the node data range can be cached out later in the function. */ if( libfdata_btree_range_get( node_data_range, &node_data_file_index, &node_data_offset, &node_data_size, &node_data_flags, &key_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range from tree node.", function ); goto on_error; } /* Make sure to not have the node cached here to prevent it from * being freed during recursing the sub tree. */ if( libfdata_btree_read_node( internal_tree, file_io_handle, cache, node_data_range, level, node, read_flags | LIBFDATA_READ_FLAG_NO_CACHE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read node.", function ); goto on_error; } if( *node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node.", function ); goto on_error; } if( ( ( (libfdata_internal_btree_node_t *) *node )->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { result = libfdata_btree_node_is_leaf( *node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if node is a leaf node.", function, sub_node_index ); goto on_error; } else if( result != 0 ) { if( libfdata_btree_node_get_number_of_leaf_values( *node, &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.", function ); goto on_error; } for( leaf_value_index = 0; leaf_value_index < number_of_leaf_values; leaf_value_index++ ) { if( libfdata_btree_node_get_leaf_value_data_range_by_index( *node, leaf_value_index, &leaf_value_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value: %d data range.", function, leaf_value_index ); goto on_error; } if( leaf_value_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing leaf value: %d data range.", function, leaf_value_index ); goto on_error; } leaf_value_data_range->mapped_first_leaf_value_index = mapped_first_leaf_value_index; leaf_value_data_range->mapped_last_leaf_value_index = -1; leaf_value_data_range->mapped_number_of_leaf_values = 1; mapped_first_leaf_value_index++; } branch_number_of_leaf_values = number_of_leaf_values; /* TODO*/ level++; } else { if( libfdata_btree_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; } level++; for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libfdata_btree_node_get_sub_node_data_range_by_index( *node, sub_node_index, &sub_node_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d data range.", function, sub_node_index ); goto on_error; } if( sub_node_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing sub node: %d data range.", function, sub_node_index ); goto on_error; } if( libfdata_btree_read_sub_tree( internal_tree, file_io_handle, cache, sub_node_data_range, level, mapped_first_leaf_value_index, &sub_node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub node: %d sub tree.", function, sub_node_index ); goto on_error; } if( libfdata_btree_node_get_number_of_leaf_values_in_branch( sub_node, &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 in branch.", function ); goto on_error; } sub_node_data_range->mapped_first_leaf_value_index = mapped_first_leaf_value_index; mapped_first_leaf_value_index += number_of_leaf_values; sub_node_data_range->mapped_last_leaf_value_index = mapped_first_leaf_value_index - 1; sub_node_data_range->mapped_number_of_leaf_values = number_of_leaf_values; branch_number_of_leaf_values += number_of_leaf_values; } } ( (libfdata_internal_btree_node_t *) *node )->branch_number_of_leaf_values = branch_number_of_leaf_values; ( (libfdata_internal_btree_node_t *) *node )->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); } if( internal_tree->calculate_node_cache_entry_index( (libfdata_btree_t *) internal_tree, cache, level, node_data_file_index, node_data_offset, node_data_size, node_data_flags, &cache_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate cache entry index.", function ); goto on_error; } if( libfcache_cache_set_value_by_index( cache, cache_entry_index, node_data_file_index, node_data_offset, internal_tree->timestamp, (intptr_t *) *node, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_btree_node_free, LIBFCACHE_CACHE_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set node in cache entry: %d.", function, cache_entry_index ); goto on_error; } return( 1 ); on_error: if( *node != NULL ) { libfdata_btree_node_free( node, NULL ); } return( -1 ); } /* Retrieves a leaf node the contains a specific leaf value index * Returns 1 if successful or -1 on error */ int libfdata_btree_get_leaf_node_by_index( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *node_data_range, int level, int leaf_value_index, libfdata_btree_node_t **node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_btree_range_t *sub_node_data_range = NULL; static char *function = "libfdata_btree_get_leaf_node_by_index"; int result = 0; if( internal_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( node_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node data range.", function ); return( -1 ); } if( level < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid level value out of bounds.", function ); return( -1 ); } if( leaf_value_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid leaf value index value out of bounds.", function ); return( -1 ); } if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node.", function ); return( -1 ); } if( libfdata_btree_read_sub_tree( internal_tree, file_io_handle, cache, node_data_range, level, node_data_range->mapped_first_leaf_value_index, node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read node sub tree.", function ); return( -1 ); } if( *node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node.", function ); return( -1 ); } result = libfdata_btree_node_is_leaf( *node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if node is a leaf node.", function ); return( -1 ); } else if( result != 0 ) { return( 1 ); } if( libfdata_btree_node_get_sub_node_data_range_by_mapped_index( *node, leaf_value_index, &sub_node_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node data range for leaf value: %d..", function, leaf_value_index ); return( -1 ); } *node = NULL; if( libfdata_btree_get_leaf_node_by_index( internal_tree, file_io_handle, cache, sub_node_data_range, level + 1, leaf_value_index, node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node for leaf value: %d.", function, leaf_value_index ); return( -1 ); } return( 1 ); } /* Retrieves a leaf node for a specific key value * * Uses the key_value_compare_function to determine the similarity of the key values * The key_value_compare_function should return LIBFDATA_COMPARE_LESS, * LIBFDATA_COMPARE_LESS_EQUAL, LIBFDATA_COMPARE_EQUAL, LIBFDATA_COMPARE_GREATER, * LIBFDATA_COMPARE_GREATER_EQUAL if successful or -1 on error * * Returns 1 if successful, 0 if no such value or -1 on error */ int libfdata_btree_get_leaf_node_by_key( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *node_data_range, int maximum_node_level, int current_node_level, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), int *node_index, libfdata_btree_node_t **node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_btree_range_t *sub_node_data_range = NULL; static char *function = "libfdata_btree_get_leaf_node_by_key"; int result = 0; int sub_node_index = 0; if( internal_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( node_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node data range.", function ); return( -1 ); } if( maximum_node_level < -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid maximum node level value out of bounds.", function ); return( -1 ); } if( current_node_level < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid current node level value out of bounds.", function ); return( -1 ); } if( node_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node index.", function ); return( -1 ); } if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node.", function ); return( -1 ); } if( libfdata_btree_read_sub_tree( internal_tree, file_io_handle, cache, node_data_range, current_node_level, node_data_range->mapped_first_leaf_value_index, node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read node sub tree.", function ); return( -1 ); } if( *node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node.", function ); return( -1 ); } result = libfdata_btree_node_is_leaf( *node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if node is a leaf node.", function ); return( -1 ); } else if( result != 0 ) { return( 1 ); } if( ( maximum_node_level != LIBFDATA_BTREE_NODE_LEVEL_UNLIMITED ) && ( current_node_level >= maximum_node_level ) ) { return( 1 ); } result = libfdata_btree_node_get_sub_node_data_range_by_key( *node, key_value, key_value_compare_function, &sub_node_index, &sub_node_data_range, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node data range by key.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } *node_index = sub_node_index; *node = NULL; result = libfdata_btree_get_leaf_node_by_key( internal_tree, file_io_handle, cache, sub_node_data_range, maximum_node_level, current_node_level + 1, key_value, key_value_compare_function, node_index, node, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node by key.", function ); return( -1 ); } return( result ); } /* Retrieves the next leaf node for a specific key value * * This function will try to determine the next node based * on the node_index and node values. * * Uses the key_value_compare_function to determine the similarity of the key values * The key_value_compare_function should return LIBFDATA_COMPARE_LESS, * LIBFDATA_COMPARE_LESS_EQUAL, LIBFDATA_COMPARE_EQUAL, LIBFDATA_COMPARE_GREATER, * LIBFDATA_COMPARE_GREATER_EQUAL if successful or -1 on error * * Returns 1 if successful, 0 if no such value or -1 on error */ int libfdata_btree_get_next_leaf_node_by_key( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *node_data_range, int node_index, libfdata_btree_node_t *node, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), int *next_node_index, libfdata_btree_node_t **next_node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_btree_node_t *branch_node = NULL; libfdata_btree_range_t *sub_node_data_range = NULL; static char *function = "libfdata_btree_get_next_leaf_node_by_key"; int branch_node_index = 0; int branch_node_level = 0; int node_level = 0; int number_of_sub_nodes = 0; int result = 0; if( internal_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( node_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid node index value out of bounds.", function ); return( -1 ); } if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node.", function ); return( -1 ); } if( libfdata_btree_node_get_level( node, &node_level, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node level.", function ); return( -1 ); } if( node_level == 0 ) { return( 0 ); } branch_node_level = node_level; while( branch_node_level > 0 ) { branch_node_level--; result = libfdata_btree_get_leaf_node_by_key( internal_tree, file_io_handle, cache, node_data_range, branch_node_level, 0, key_value, key_value_compare_function, &branch_node_index, &branch_node, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve branch node at level: %d.", function, branch_node_level ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( libfdata_btree_node_get_number_of_sub_nodes( branch_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( ( node_index < 0 ) || ( node_index >= number_of_sub_nodes ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid node index value out of bounds.", function ); return( -1 ); } node_index++; if( node_index < number_of_sub_nodes ) { if( libfdata_btree_node_get_sub_node_data_range_by_index( branch_node, node_index, &sub_node_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next sub node: %d data range.", function, node_index ); return( -1 ); } result = libfdata_btree_get_leaf_node_by_key( internal_tree, file_io_handle, cache, sub_node_data_range, LIBFDATA_BTREE_NODE_LEVEL_UNLIMITED, branch_node_level + 1, key_value, key_value_compare_function, next_node_index, next_node, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve branch node at level: %d.", function, branch_node_level ); return( -1 ); } return( result ); } /* If no next leaf node is available try the next branch */ node_index = branch_node_index; } return( 0 ); } /* Retrieves the previous leaf node for a specific key value * * This function will try to determine the previous node based * on the node_index and node values. * * Uses the key_value_compare_function to determine the similarity of the key values * The key_value_compare_function should return LIBFDATA_COMPARE_LESS, * LIBFDATA_COMPARE_LESS_EQUAL, LIBFDATA_COMPARE_EQUAL, LIBFDATA_COMPARE_GREATER, * LIBFDATA_COMPARE_GREATER_EQUAL if successful or -1 on error * * Returns 1 if successful, 0 if no such value or -1 on error */ int libfdata_btree_get_previous_leaf_node_by_key( libfdata_internal_btree_t *internal_tree, intptr_t *file_io_handle, libfcache_cache_t *cache, libfdata_btree_range_t *node_data_range, int node_index, libfdata_btree_node_t *node, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), int *previous_node_index, libfdata_btree_node_t **previous_node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_btree_node_t *branch_node = NULL; libfdata_btree_range_t *sub_node_data_range = NULL; static char *function = "libfdata_btree_get_previous_leaf_node_by_key"; int branch_node_index = 0; int branch_node_level = 0; int node_level = 0; int number_of_sub_nodes = 0; int result = 0; if( internal_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( node_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid node index value out of bounds.", function ); return( -1 ); } if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node.", function ); return( -1 ); } if( libfdata_btree_node_get_level( node, &node_level, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node level.", function ); return( -1 ); } if( node_level == 0 ) { return( 0 ); } branch_node_level = node_level; while( branch_node_level > 0 ) { branch_node_level--; result = libfdata_btree_get_leaf_node_by_key( internal_tree, file_io_handle, cache, node_data_range, branch_node_level, 0, key_value, key_value_compare_function, &branch_node_index, &branch_node, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve branch node at level: %d.", function, branch_node_level ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( libfdata_btree_node_get_number_of_sub_nodes( branch_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( ( node_index < 0 ) || ( node_index >= number_of_sub_nodes ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid node index value out of bounds.", function ); return( -1 ); } node_index--; if( node_index >= 0 ) { if( libfdata_btree_node_get_sub_node_data_range_by_index( branch_node, node_index, &sub_node_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous sub node: %d data range.", function, node_index ); return( -1 ); } result = libfdata_btree_get_leaf_node_by_key( internal_tree, file_io_handle, cache, sub_node_data_range, LIBFDATA_BTREE_NODE_LEVEL_UNLIMITED, branch_node_level + 1, key_value, key_value_compare_function, previous_node_index, previous_node, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve branch node at level: %d.", function, branch_node_level ); return( -1 ); } return( result ); } /* If no previous leaf node is available try the previous branch */ node_index = branch_node_index; } return( 0 ); } /* Retrieves the number of leaf values in the tree * Returns 1 if successful or -1 on error */ int libfdata_btree_get_number_of_leaf_values( libfdata_btree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int *number_of_values, uint8_t read_flags, libcerror_error_t **error ) { libfdata_btree_node_t *root_node = NULL; libfdata_internal_btree_t *internal_tree = NULL; static char *function = "libfdata_btree_get_number_of_leaf_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 = (libfdata_internal_btree_t *) tree; if( internal_tree->root_node_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree - missing root node data range.", function ); return( -1 ); } if( libfdata_btree_read_sub_tree( internal_tree, file_io_handle, cache, internal_tree->root_node_data_range, 0, 0, &root_node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read root node sub tree.", function ); return( -1 ); } if( libfdata_btree_node_get_number_of_leaf_values_in_branch( root_node, number_of_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf values in branch.", function ); return( -1 ); } return( 1 ); } /* Retrieves a leaf value at a specific index * Returns 1 if successful or -1 on error */ int libfdata_btree_get_leaf_value_by_index( libfdata_btree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, int leaf_value_index, intptr_t **value, uint8_t read_flags, libcerror_error_t **error ) { libfdata_btree_node_t *node = NULL; libfdata_btree_range_t *leaf_value_data_range = NULL; libfdata_internal_btree_t *internal_tree = NULL; static char *function = "libfdata_btree_get_leaf_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 = (libfdata_internal_btree_t *) tree; if( internal_tree->root_node_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree - missing root node data range.", function ); return( -1 ); } if( libfdata_btree_get_leaf_node_by_index( internal_tree, file_io_handle, cache, internal_tree->root_node_data_range, 0, leaf_value_index, &node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node.", function ); return( -1 ); } if( libfdata_btree_node_get_leaf_value_data_range_by_mapped_index( node, leaf_value_index, &leaf_value_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value data range.", function ); return( -1 ); } if( libfdata_btree_read_leaf_value( internal_tree, file_io_handle, cache, leaf_value_data_range, value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read leaf value.", function ); return( -1 ); } return( 1 ); } /* Sets a specific leaf value * * If the flag LIBFDATA_BTREE_LEAF_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_btree_set_leaf_value_by_index( libfdata_btree_t *tree, intptr_t *file_io_handle LIBFDATA_ATTRIBUTE_UNUSED, libfcache_cache_t *cache, int leaf_value_index, intptr_t *leaf_value, int (*free_leaf_value)( intptr_t **leaf_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ) { libfdata_btree_node_t *node = NULL; libfdata_btree_range_t *leaf_value_data_range = NULL; libfdata_internal_btree_t *internal_tree = NULL; intptr_t *key_value = NULL; static char *function = "libfdata_btree_set_leaf_value_by_index"; off64_t leaf_value_data_offset = 0; size64_t leaf_value_data_size = 0; uint32_t leaf_value_data_flags = 0; int cache_entry_index = -1; int leaf_value_data_file_index = -1; LIBFDATA_UNREFERENCED_PARAMETER( file_io_handle ) if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_btree_t *) tree; if( internal_tree->root_node_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree - missing root node data range.", function ); return( -1 ); } if( libfdata_btree_get_leaf_node_by_index( internal_tree, file_io_handle, cache, internal_tree->root_node_data_range, 0, leaf_value_index, &node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node.", function ); return( -1 ); } if( libfdata_btree_node_get_leaf_value_data_range_by_mapped_index( node, leaf_value_index, &leaf_value_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value data range.", function ); return( -1 ); } if( libfdata_btree_range_get( leaf_value_data_range, &leaf_value_data_file_index, &leaf_value_data_offset, &leaf_value_data_size, &leaf_value_data_flags, &key_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value data range values.", function ); return( -1 ); } if( internal_tree->calculate_leaf_value_cache_entry_index( (libfdata_btree_t *) internal_tree, cache, leaf_value_index, leaf_value_data_file_index, leaf_value_data_offset, leaf_value_data_size, leaf_value_data_flags, &cache_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate cache entry index.", function ); return( -1 ); } if( libfcache_cache_set_value_by_index( cache, cache_entry_index, leaf_value_data_file_index, leaf_value_data_offset, internal_tree->timestamp, leaf_value, free_leaf_value, write_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set leaf value in cache entry: %d.", function, cache_entry_index ); return( -1 ); } return( 1 ); } /* Retrieves a leaf value for a specific key value * * Uses the key_value_compare_function to determine the similarity of the key values * The key_value_compare_function should return LIBFDATA_COMPARE_LESS, * LIBFDATA_COMPARE_LESS_EQUAL, LIBFDATA_COMPARE_EQUAL, LIBFDATA_COMPARE_GREATER, * LIBFDATA_COMPARE_GREATER_EQUAL if successful or -1 on error * * Returns 1 if successful, 0 if no such value or -1 on error */ int libfdata_btree_get_leaf_value_by_key( libfdata_btree_t *tree, intptr_t *file_io_handle, libfcache_cache_t *cache, intptr_t *key_value, int (*key_value_compare_function)( intptr_t *first_key_value, intptr_t *second_key_value, libcerror_error_t **error ), uint8_t search_flags, intptr_t **value, uint8_t read_flags, libcerror_error_t **error ) { libfdata_btree_node_t *leaf_node = NULL; libfdata_btree_range_t *leaf_value_data_range = NULL; libfdata_internal_btree_t *internal_tree = NULL; static char *function = "libfdata_btree_get_leaf_value_by_key"; int leaf_node_index = 0; int leaf_node_level = 0; int node_index = 0; int result = 0; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_btree_t *) tree; if( internal_tree->root_node_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree - missing root node data range.", function ); return( -1 ); } if( ( search_flags & ~( LIBFDATA_BTREE_SEARCH_FLAG_SCAN_PREVIOUS_NODE | LIBFDATA_BTREE_SEARCH_FLAG_SCAN_NEXT_NODE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported search flags.", function ); return( -1 ); } result = libfdata_btree_get_leaf_node_by_key( internal_tree, file_io_handle, cache, internal_tree->root_node_data_range, LIBFDATA_BTREE_NODE_LEVEL_UNLIMITED, 0, key_value, key_value_compare_function, &node_index, &leaf_node, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( libfdata_btree_node_get_level( leaf_node, &leaf_node_level, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node level.", function ); return( -1 ); } result = libfdata_btree_node_get_leaf_value_data_range_by_key( leaf_node, key_value, key_value_compare_function, &leaf_value_data_range, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value data range.", function ); return( -1 ); } if( ( result == 0 ) && ( ( search_flags & LIBFDATA_BTREE_SEARCH_FLAG_SCAN_PREVIOUS_NODE ) != 0 ) ) { result = libfdata_btree_get_previous_leaf_node_by_key( internal_tree, file_io_handle, cache, internal_tree->root_node_data_range, node_index, leaf_node, key_value, key_value_compare_function, &leaf_node_index, &leaf_node, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous leaf node.", function ); return( -1 ); } else if( result != 0 ) { result = libfdata_btree_node_get_leaf_value_data_range_by_key( leaf_node, key_value, key_value_compare_function, &leaf_value_data_range, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous leaf value data range.", function ); return( -1 ); } } } if( ( result == 0 ) && ( ( search_flags & LIBFDATA_BTREE_SEARCH_FLAG_SCAN_NEXT_NODE ) != 0 ) ) { result = libfdata_btree_get_next_leaf_node_by_key( internal_tree, file_io_handle, cache, internal_tree->root_node_data_range, node_index, leaf_node, key_value, key_value_compare_function, &leaf_node_index, &leaf_node, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next leaf node.", function ); return( -1 ); } else if( result != 0 ) { result = libfdata_btree_node_get_leaf_value_data_range_by_key( leaf_node, key_value, key_value_compare_function, &leaf_value_data_range, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next leaf value data range.", function ); return( -1 ); } } } if( result != 0 ) { if( libfdata_btree_read_leaf_value( internal_tree, file_io_handle, cache, leaf_value_data_range, value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read leaf value.", function ); return( -1 ); } } return( result ); } libevt-20170120/libfdata/libfdata_unused.h0000664000175000017500000000254613040331701022404 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_UNUSED_H ) #define _LIBFDATA_INTERNAL_UNUSED_H #include #if !defined( LIBFDATA_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFDATA_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFDATA_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFDATA_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFDATA_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBFDATA_INTERNAL_UNUSED_H ) */ libevt-20170120/libfdata/libfdata_error.h0000664000175000017500000000340513040331700022224 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_ERROR_H ) #define _LIBFDATA_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFDATA ) #include #endif #include "libfdata_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFDATA ) LIBFDATA_EXTERN \ void libfdata_error_free( libfdata_error_t **error ); LIBFDATA_EXTERN \ int libfdata_error_fprint( libfdata_error_t *error, FILE *stream ); LIBFDATA_EXTERN \ int libfdata_error_sprint( libfdata_error_t *error, char *string, size_t size ); LIBFDATA_EXTERN \ int libfdata_error_backtrace_fprint( libfdata_error_t *error, FILE *stream ); LIBFDATA_EXTERN \ int libfdata_error_backtrace_sprint( libfdata_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_INTERNAL_ERROR_H ) */ libevt-20170120/libfdata/Makefile.in0000664000175000017500000010530613040342657021161 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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_btree.c libfdata_btree.h libfdata_btree_node.c \ libfdata_btree_node.h libfdata_btree_range.c \ libfdata_btree_range.h libfdata_cache.c libfdata_cache.h \ libfdata_definitions.h libfdata_error.c libfdata_error.h \ libfdata_extern.h libfdata_inline.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_tree.c libfdata_tree.h \ libfdata_tree_node.c libfdata_tree_node.h libfdata_types.h \ libfdata_unused.h libfdata_vector.c libfdata_vector.h @HAVE_LOCAL_LIBFDATA_TRUE@am_libfdata_la_OBJECTS = libfdata_area.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_btree.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_btree_node.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_btree_range.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 libfdata_tree.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_tree_node.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_vector.lo libfdata_la_OBJECTS = $(am_libfdata_la_OBJECTS) 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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFDATA_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFDATA_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFDATA_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFDATA_TRUE@ @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_btree.c libfdata_btree.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_btree_node.c libfdata_btree_node.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_btree_range.c libfdata_btree_range.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_inline.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_tree.c libfdata_tree.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_tree_node.c libfdata_tree_node.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_types.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_unused.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_vector.c libfdata_vector.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfdata/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfdata/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_btree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_btree_node.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_btree_range.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_cache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_list_element.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_mapped_range.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_notify.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_range.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_range_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_segments_array.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_tree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_tree_node.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_vector.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdata_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libfdata/libfdata_cache.h0000664000175000017500000000272513040331700022142 0ustar00lordyestalordyesta00000000000000/* * Cache functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_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 ) */ libevt-20170120/libfdata/libfdata_stream.c0000664000175000017500000017550013040331701022370 0ustar00lordyestalordyesta00000000000000/* * The stream functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #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->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->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: 0x%08" PRIx64 "\n", function, 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: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, search_segment_index, segment_file_index, segment_offset, segment_offset + segment_size, segment_size ); } #endif 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: 0x%08" PRIx64 ".", function, 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; libfdata_range_t *segment_data_range = 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( ( buffer_size == 0 ) || ( (size64_t) internal_stream->current_offset >= stream_size ) ) { return( 0 ); } if( (size64_t) ( internal_stream->current_offset + buffer_size ) > stream_size ) { buffer_size = (size_t) ( stream_size - internal_stream->current_offset ); } if( libcdata_array_get_entry_by_index( internal_stream->segments_array, internal_stream->current_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, internal_stream->current_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, 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; 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 ".", function, internal_stream->current_segment_index, segment_offset ); return( -1 ); } 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: 0x%08" PRIx64 ".", function, internal_stream->current_segment_index, segment_offset ); return( -1 ); } internal_stream->current_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->segment_data_offset = 0; if( libcdata_array_get_entry_by_index( internal_stream->segments_array, internal_stream->current_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, internal_stream->current_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, 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 ".", function, internal_stream->current_segment_index, segment_offset ); return( -1 ); } } } 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; libfdata_range_t *segment_data_range = 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( libcdata_array_get_entry_by_index( internal_stream->segments_array, internal_stream->current_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, internal_stream->current_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, 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->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; } 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 ".", function, internal_stream->current_segment_index, segment_offset ); return( -1 ); } 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: 0x%08" PRIx64 ".", function, internal_stream->current_segment_index, segment_offset + internal_stream->segment_data_offset ); return( -1 ); } internal_stream->current_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->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 **) &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( 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 ".", function, internal_stream->current_segment_index, segment_offset ); return( -1 ); } } } 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 ".\n", function, offset ); } #endif if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: offset value out of bounds.", function ); return( -1 ); } if( offset < (off64_t) 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: 0x%08" PRIx64 ".", function, 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_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 ); } libevt-20170120/libfdata/libfdata_segments_array.c0000664000175000017500000005143113040331701024114 0ustar00lordyestalordyesta00000000000000/* * The segments array functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_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 ); } libevt-20170120/libfdata/libfdata_mapped_range.c0000664000175000017500000001525413040331700023515 0ustar00lordyestalordyesta00000000000000/* * The (data) mapped range functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_libcerror.h" #include "libfdata_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 ); } libevt-20170120/libfdata/libfdata_definitions.h0000664000175000017500000001550213040331700023407 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_DEFINITIONS_H ) #define _LIBFDATA_INTERNAL_DEFINITIONS_H #include /* Define HAVE_LOCAL_LIBFDATA for local use of libfdata */ #if !defined( HAVE_LOCAL_LIBFDATA ) #include /* The definitions in are copied here * for local use of libfdata */ #else #define LIBFDATA_VERSION 20170112 /* The libfdata version string */ #define LIBFDATA_VERSION_STRING "20170112" /* 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 btree search flag definitions */ enum LIBFDATA_BTREE_SEARCH_FLAGS { /* Flag to additionally scan the previous node */ LIBFDATA_BTREE_SEARCH_FLAG_SCAN_PREVIOUS_NODE = 0x01, /* Flag to additionally scan the next node */ LIBFDATA_BTREE_SEARCH_FLAG_SCAN_NEXT_NODE = 0x02 }; /* 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 /* The btree node flag definitions */ enum LIBFDATA_BTREE_NODE_FLAGS { /* The node is a branch */ LIBFDATA_BTREE_NODE_FLAG_IS_BRANCH = 0x02, /* The node is a leaf */ LIBFDATA_BTREE_NODE_FLAG_IS_LEAF = 0x04 }; #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 libevt-20170120/libfdata/libfdata_range.c0000664000175000017500000001575713040331700022177 0ustar00lordyestalordyesta00000000000000/* * The range functions * * Copyright (C) 2010-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_libcerror.h" #include "libfdata_range.h" /* 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 ); } libevt-20170120/libcdata/0000775000175000017500000000000013040343016017072 5ustar00lordyestalordyesta00000000000000libevt-20170120/libcdata/libcdata_array.c0000664000175000017500000013332613040331675022217 0ustar00lordyestalordyesta00000000000000/* * Array functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "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 */ 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) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entries size value exceeds maximum.", function ); goto on_error; } 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 intialize 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 * 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; } 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 * 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_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 ) { 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 ) { 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; } } } return( result ); } /* Clears an array and frees its entries * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int 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; int result = 1; 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( libcdata_array_initialize( 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( *destination_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination array.", function ); goto on_error; } internal_destination_array = (libcdata_internal_array_t *) *destination_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 ); goto on_error; } #endif 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 ) { result = entry_clone_function( &( internal_destination_array->entries[ entry_iterator ] ), internal_source_array->entries[ entry_iterator ], error ); if( result != 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 ); break; } } } } #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 ); goto on_error; } #endif if( result != 1 ) { goto on_error; } return( 1 ); on_error: if( *destination_array != NULL ) { libcdata_array_free( 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 ) { void *reallocation = NULL; static char *function = "libcdata_internal_array_resize"; 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( 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 */ 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) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entries size value exceeds maximum.", function ); return( -1 ); } reallocation = memory_reallocate( 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; if( memory_set( &( internal_array->entries[ internal_array->number_of_allocated_entries ] ), 0, sizeof( intptr_t * ) * ( number_of_allocated_entries - internal_array->number_of_allocated_entries ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array entries.", function ); result = -1; } 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( 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 if( internal_array->entries != NULL ) { 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( 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 ); } #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 ); return( -1 ); } #endif return( 1 ); } /* 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; 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, internal_array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); goto on_error; } if( internal_array->number_of_entries > 1 ) { for( entry_iterator = internal_array->number_of_entries - 2; entry_iterator >= 0; entry_iterator-- ) { internal_array->entries[ entry_iterator + 1 ] = internal_array->entries[ entry_iterator ]; } } internal_array->entries[ 0 ] = 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 ); return( -1 ); } #endif return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_write( internal_array->read_write_lock, NULL ); #endif return( -1 ); } /* 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"; 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( 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 *entry_index = internal_array->number_of_entries; if( libcdata_internal_array_resize( internal_array, internal_array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); goto on_error; } 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 ); return( -1 ); } #endif return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_write( internal_array->read_write_lock, NULL ); #endif return( -1 ); } /* Inserts an entry in the array * * Uses the entry_compare_function to determine the order of the entries * The entry_compare_function should return 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 * * 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_tree_node_insert_node"; int compare_result = 0; int entry_iterator = 0; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } internal_array = (libcdata_internal_array_t *) array; 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 if( internal_array->entries != NULL ) { 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 ); goto on_error; } 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 ) { 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 ); goto on_error; } } } if( result != 0 ) { if( ( internal_array->entries != NULL ) && ( compare_result == LIBCDATA_COMPARE_LESS ) ) { *entry_index = entry_iterator; if( libcdata_internal_array_resize( internal_array, internal_array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); goto on_error; } 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 ] = entry; } else { *entry_index = internal_array->number_of_entries; if( libcdata_internal_array_resize( internal_array, internal_array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); goto on_error; } if( internal_array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); goto on_error; } 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 ); 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_array->read_write_lock, NULL ); #endif return( -1 ); } /* 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; 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( ( 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_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 *entry = internal_array->entries[ entry_index ]; if( entry_index == ( internal_array->number_of_entries - 1 ) ) { internal_array->entries[ entry_index ] = NULL; } else { for( entry_iterator = ( internal_array->number_of_entries - 1 ); entry_iterator > entry_index; entry_iterator-- ) { internal_array->entries[ entry_iterator - 1 ] = internal_array->entries[ entry_iterator ]; internal_array->entries[ entry_iterator ] = NULL; } } if( libcdata_internal_array_resize( internal_array, internal_array->number_of_entries - 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); goto on_error; } #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 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_write( internal_array->read_write_lock, NULL ); #endif return( -1 ); } libevt-20170120/libcdata/libcdata_tree_node.c0000664000175000017500000014511113040331675023040 0ustar00lordyestalordyesta00000000000000/* * Tree functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcdata_definitions.h" #include "libcdata_libcerror.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 ); goto on_error; } *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; 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_free"; int number_of_sub_nodes = 0; int result = 1; 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 ); } 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 ); } 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 ); return( -1 ); } 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 ); return( -1 ); } 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--; 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 ); return( -1 ); } } 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 ); return( -1 ); } 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( 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 ); *node = NULL; } 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 *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( 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; 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 ); return( -1 ); } 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 ); return( -1 ); } 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--; 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 ); return( -1 ); } } 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 ); return( -1 ); } 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; } return( result ); } /* Clones the tree node and its sub nodes * * The values are cloned using the value_clone_function * On error the values are freed using the value_free_function * * Returns 1 if successful or -1 on error */ int 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 *source_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( libcdata_tree_node_initialize( destination_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination tree node.", function ); return( -1 ); } if( *destination_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination tree node.", function ); return( -1 ); } internal_destination_node = (libcdata_internal_tree_node_t *) *destination_node; 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 */ source_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( source_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in source sub node: %d.", function, sub_node_index ); goto on_error; } if( libcdata_tree_node_clone( &destination_sub_node, source_sub_node, value_free_function, value_clone_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to create destination sub node: %d.", function, sub_node_index ); goto on_error; } if( libcdata_tree_node_append_node( *destination_node, destination_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append sub node: %d to destination tree node.", function, sub_node_index ); goto on_error; } destination_sub_node = NULL; if( libcdata_tree_node_get_next_node( source_sub_node, &source_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next node of source sub node: %d.", function, sub_node_index ); goto on_error; } } return( 1 ); on_error: if( destination_sub_node != NULL ) { libcdata_tree_node_free( &destination_sub_node, value_free_function, NULL ); } if( destination_node != NULL ) { libcdata_tree_node_free( destination_node, value_free_function, NULL ); } return( -1 ); } /* Retrieves the value from the tree node * Returns 1 if successful or -1 on error */ int 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 ); } *value = internal_node->value; 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( 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; internal_node->value = value; return( 1 ); } /* 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 ); } *parent_node = internal_node->parent_node; 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( 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; internal_node->parent_node = parent_node; return( 1 ); } /* 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 ); } *previous_node = internal_node->previous_node; 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( 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; internal_node->previous_node = previous_node; return( 1 ); } /* 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 ); } *next_node = internal_node->next_node; 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( 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; internal_node->next_node = next_node; return( 1 ); } /* 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 ); } *parent_node = internal_node->parent_node; *previous_node = internal_node->previous_node; *next_node = internal_node->next_node; 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( 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; internal_node->parent_node = parent_node; internal_node->previous_node = previous_node; internal_node->next_node = next_node; return( 1 ); } /* Appends a tree node to the parent node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_append_node( libcdata_tree_node_t *parent_node, libcdata_tree_node_t *node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; libcdata_internal_tree_node_t *internal_parent_node = NULL; static char *function = "libcdata_tree_node_append_node"; if( parent_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid parent node.", function ); return( -1 ); } internal_parent_node = (libcdata_internal_tree_node_t *) 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( ( 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 - node is already part of a tree.", function ); return( -1 ); } internal_node->parent_node = parent_node; if( internal_parent_node->number_of_sub_nodes == 0 ) { if( internal_parent_node->first_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: corruption detected - first sub node already set.", function ); return( -1 ); } if( internal_parent_node->last_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: corruption detected - last sub node already set.", function ); return( -1 ); } internal_parent_node->first_sub_node = node; internal_parent_node->last_sub_node = node; } else { if( internal_parent_node->first_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first sub node.", function ); return( -1 ); } if( internal_parent_node->last_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last sub node.", function ); return( -1 ); } if( libcdata_tree_node_set_next_node( internal_parent_node->last_sub_node, 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 ); return( -1 ); } internal_node->previous_node = internal_parent_node->last_sub_node; internal_parent_node->last_sub_node = node; } internal_parent_node->number_of_sub_nodes++; return( 1 ); } /* Appends a value to the parent node * Creates a new tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_append_value( libcdata_tree_node_t *parent_node, intptr_t *value, libcerror_error_t **error ) { libcdata_tree_node_t *tree_node = NULL; static char *function = "libcdata_tree_node_append_value"; if( libcdata_tree_node_initialize( &tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create tree node.", function ); goto on_error; } if( libcdata_tree_node_append_node( parent_node, tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append tree node.", function ); goto on_error; } if( libcdata_tree_node_set_value( tree_node, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to set value in tree node.", function ); goto on_error; } return( 1 ); on_error: if( tree_node != NULL ) { libcdata_tree_node_free( &tree_node, NULL, NULL ); } return( -1 ); } /* Inserts a tree node in the parent node * * Uses the entry_compare_function to determine the order of the entries * The entry_compare_function should return 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 * * Returns 1 if successful, 0 if the node already exists or -1 on error */ int libcdata_tree_node_insert_node( libcdata_tree_node_t *parent_node, libcdata_tree_node_t *node, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; libcdata_internal_tree_node_t *internal_parent_node = NULL; libcdata_tree_node_t *previous_node = NULL; libcdata_tree_node_t *sub_node = NULL; intptr_t *sub_node_value = NULL; static char *function = "libcdata_tree_node_insert_node"; int result = -1; int sub_node_index = 0; if( parent_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid parent node.", function ); return( -1 ); } internal_parent_node = (libcdata_internal_tree_node_t *) 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( ( 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 - node is already part of a tree.", 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( internal_parent_node->number_of_sub_nodes == 0 ) { if( internal_parent_node->first_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: corruption detected - first sub node already set.", function ); return( -1 ); } if( internal_parent_node->last_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: corruption detected - last sub node already set.", function ); return( -1 ); } internal_parent_node->first_sub_node = node; internal_parent_node->last_sub_node = node; } else { if( internal_parent_node->first_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first sub node.", function ); return( -1 ); } if( internal_parent_node->last_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last sub node.", function ); return( -1 ); } sub_node = internal_parent_node->first_sub_node; for( sub_node_index = 0; sub_node_index < internal_parent_node->number_of_sub_nodes; sub_node_index++ ) { if( libcdata_tree_node_get_value( sub_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, sub_node_index ); return( -1 ); } result = value_compare_function( internal_node->value, sub_node_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare sub node: %d.", function, sub_node_index ); return( -1 ); } else if( result == LIBCDATA_COMPARE_EQUAL ) { if( ( insert_flags & LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES ) != 0 ) { return( 0 ); } } 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_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 ); return( -1 ); } } if( result == LIBCDATA_COMPARE_LESS ) { 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 of sub node: %d.", function, sub_node_index ); return( -1 ); } internal_node->previous_node = previous_node; internal_node->next_node = sub_node; if( sub_node == internal_parent_node->first_sub_node ) { internal_parent_node->first_sub_node = node; } else { if( previous_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing previous node in sub node: %d.", function, sub_node_index ); return( -1 ); } if( libcdata_tree_node_set_next_node( previous_node, node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next node of sub node: %d.", function, sub_node_index - 1 ); return( -1 ); } } if( libcdata_tree_node_set_previous_node( sub_node, 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: %d.", function, sub_node_index ); return( -1 ); } } else { if( libcdata_tree_node_set_next_node( internal_parent_node->last_sub_node, 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 ); return( -1 ); } internal_node->previous_node = internal_parent_node->last_sub_node; internal_parent_node->last_sub_node = node; } } internal_node->parent_node = parent_node; internal_parent_node->number_of_sub_nodes++; return( 1 ); } /* Inserts a value in the parent node * * Creates a new tree node * * Uses the entry_compare_function to determine the order of the entries * The entry_compare_function should return 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 * * Returns 1 if successful, 0 if the node already exists or -1 on error */ int libcdata_tree_node_insert_value( libcdata_tree_node_t *parent_node, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { libcdata_tree_node_t *tree_node = NULL; static char *function = "libcdata_tree_node_insert_value"; int result = 0; if( libcdata_tree_node_initialize( &tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create tree node.", function ); goto on_error; } if( libcdata_tree_node_set_value( tree_node, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to set value in tree node.", function ); goto on_error; } result = libcdata_tree_node_insert_node( parent_node, tree_node, value_compare_function, insert_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert node.", function ); goto on_error; } else if( result == 0 ) { if( libcdata_tree_node_free( &tree_node, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free tree node.", function ); goto on_error; } } return( result ); on_error: if( tree_node != NULL ) { libcdata_tree_node_free( &tree_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_internal_tree_node_t *internal_replacement_node = NULL; libcdata_tree_node_t *first_sub_node = NULL; libcdata_tree_node_t *last_sub_node = NULL; libcdata_tree_node_t *sub_node = NULL; intptr_t *value = NULL; static char *function = "libcdata_tree_node_replace_node"; int number_of_sub_nodes = 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( replacement_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid replacement node.", function ); return( -1 ); } internal_replacement_node = (libcdata_internal_tree_node_t *) replacement_node; 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( ( internal_replacement_node->parent_node != NULL ) || ( internal_replacement_node->previous_node != NULL ) || ( internal_replacement_node->next_node != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid replacement node - node is already part of a tree.", function ); return( -1 ); } value = internal_node->value; first_sub_node = internal_node->first_sub_node; last_sub_node = internal_node->last_sub_node; number_of_sub_nodes = internal_node->number_of_sub_nodes; internal_node->value = internal_replacement_node->value; internal_node->first_sub_node = internal_replacement_node->first_sub_node; internal_node->last_sub_node = internal_replacement_node->last_sub_node; internal_node->number_of_sub_nodes = internal_replacement_node->number_of_sub_nodes; internal_replacement_node->value = value; internal_replacement_node->first_sub_node = first_sub_node; internal_replacement_node->last_sub_node = last_sub_node; internal_replacement_node->number_of_sub_nodes = number_of_sub_nodes; 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( libcdata_tree_node_set_parent_node( sub_node, node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set parent node value of sub node: %d.", function, sub_node_index ); return( -1 ); } 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 ); return( -1 ); } } return( 1 ); } /* Removes a tree node from the parent node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_remove_node( libcdata_tree_node_t *parent_node, libcdata_tree_node_t *node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; libcdata_internal_tree_node_t *internal_parent_node = NULL; static char *function = "libcdata_tree_node_remove_node"; if( parent_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid parent node.", function ); return( -1 ); } internal_parent_node = (libcdata_internal_tree_node_t *) 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 != internal_node->parent_node ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid node - parent node mismatch.", function ); return( -1 ); } if( internal_parent_node->number_of_sub_nodes == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid parent node - missing number of sub nodes.", function ); return( -1 ); } if( internal_parent_node->first_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid parent node - missing first sub node.", function ); return( -1 ); } if( internal_parent_node->last_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid parent node - missing last sub node.", function ); return( -1 ); } if( internal_parent_node->first_sub_node == node ) { internal_parent_node->first_sub_node = internal_node->next_node; } if( internal_parent_node->last_sub_node == node ) { internal_parent_node->last_sub_node = internal_node->previous_node; } if( internal_node->next_node != NULL ) { if( libcdata_tree_node_set_previous_node( internal_node->next_node, internal_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 ); return( -1 ); } } if( internal_node->previous_node != NULL ) { if( libcdata_tree_node_set_next_node( internal_node->previous_node, internal_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 ); return( -1 ); } } internal_node->parent_node = NULL; internal_node->previous_node = NULL; internal_node->next_node = NULL; internal_parent_node->number_of_sub_nodes--; return( 1 ); } /* 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 ); } *number_of_sub_nodes = internal_node->number_of_sub_nodes; return( 1 ); } /* Retrieves a specific sub node from the tree node * Returns 1 if successful or -1 on error */ int 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; 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 ); } /* 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 ) ) { *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( *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_iterator ); return( -1 ); } } } else { *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( *sub_node, 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 ); return( -1 ); } } } return( result ); } /* 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 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( *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 ); return( -1 ); } } /* Traverse the sub nodes */ if( internal_node->number_of_sub_nodes > 0 ) { 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 ); return( -1 ); } 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 ); return( -1 ); } 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 ); return( -1 ); } } } else if( internal_node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing value.", function ); return( -1 ); } else if( 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 ); return( -1 ); } return( 1 ); } libevt-20170120/libcdata/libcdata_libcthreads.h0000664000175000017500000000361013040331675023362 0ustar00lordyestalordyesta00000000000000/* * The internal libcthreads header * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcdata/libcdata_range_list_value.h0000664000175000017500000000505113040331675024422 0ustar00lordyestalordyesta00000000000000/* * Range list value * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_RANGE_LIST_VALUE_H ) */ libevt-20170120/libcdata/libcdata_unused.h0000664000175000017500000000254613040331675022410 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDATA_INTERNAL_UNUSED_H ) #define _LIBCDATA_INTERNAL_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_INTERNAL_UNUSED_H ) */ libevt-20170120/libcdata/libcdata_range_list.h0000664000175000017500000001560513040331675023234 0ustar00lordyestalordyesta00000000000000/* * Range list * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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_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; }; 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 ); 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 ); int libcdata_range_list_set_first_element( libcdata_range_list_t *range_list, libcdata_list_element_t *element, libcerror_error_t **error ); int libcdata_range_list_set_last_element( libcdata_range_list_t *range_list, libcdata_list_element_t *element, libcerror_error_t **error ); int libcdata_range_list_append_element( libcdata_range_list_t *range_list, libcdata_list_element_t *element, libcerror_error_t **error ); int libcdata_range_list_append_value( libcdata_range_list_t *range_list, libcdata_range_list_value_t *value, 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_range_list_insert_element( libcdata_range_list_t *range_list, libcdata_list_element_t *range_list_element, libcdata_list_element_t *element, libcerror_error_t **error ); int libcdata_range_list_insert_value( libcdata_range_list_t *range_list, libcdata_list_element_t *range_list_element, libcdata_range_list_value_t *range_list_value, libcerror_error_t **error ); int libcdata_range_list_remove_element( libcdata_range_list_t *range_list, libcdata_list_element_t *element, 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_range_list_get_element_by_index( libcdata_range_list_t *range_list, int element_index, libcdata_list_element_t **element, libcerror_error_t **error ); int libcdata_range_list_get_element_at_offset( libcdata_range_list_t *range_list, uint64_t range_offset, libcdata_list_element_t **element, libcerror_error_t **error ); int libcdata_range_list_get_value_by_index( libcdata_range_list_t *range_list, int element_index, libcdata_range_list_value_t **range_list_value, libcerror_error_t **error ); int libcdata_range_list_get_value_at_offset( libcdata_range_list_t *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_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 ) */ libevt-20170120/libcdata/Makefile.am0000664000175000017500000000172713012271456021144 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBCDATA AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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_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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcdata_la_SOURCES) libevt-20170120/libcdata/libcdata_range_list.c0000664000175000017500000024205413040331675023227 0ustar00lordyestalordyesta00000000000000/* * Range list * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcdata_definitions.h" #include "libcdata_libcerror.h" #include "libcdata_list_element.h" #include "libcdata_range_list.h" #include "libcdata_range_list_value.h" #include "libcdata_types.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 ); goto on_error; } *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 ) { 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 ) { result = libcdata_range_list_empty( *range_list, value_free_function, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty range list.", function ); } memory_free( *range_list ); *range_list = NULL; } 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; libcdata_range_list_value_t *range_list_value = 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( 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 ); return( -1 ); } 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--; 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 ); return( -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 ); 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 ); 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: %d.", function, element_index ); result = -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: %d.", function, element_index ); result = -1; } list_element = next_element; } internal_range_list->current_element = NULL; internal_range_list->current_element_index = 0; } 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_range_list_t *source_internal_range_list = NULL; libcdata_list_element_t *source_list_element = NULL; libcdata_range_list_value_t *destination_range_list_value = NULL; libcdata_range_list_value_t *source_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 ); } source_internal_range_list = (libcdata_internal_range_list_t *) source_range_list; if( libcdata_range_list_initialize( 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( *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; } source_list_element = source_internal_range_list->first_element; for( element_index = 0; element_index < source_internal_range_list->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 ); goto on_error; } if( libcdata_range_list_value_clone( &destination_range_list_value, source_range_list_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_range_list_append_value( *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 set value of destination element: %d.", function, element_index ); goto on_error; } destination_range_list_value = NULL; 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 list element: %d.", function, element_index ); goto on_error; } } return( 1 ); on_error: if( destination_range_list_value != NULL ) { libcdata_range_list_value_free( &destination_range_list_value, value_free_function, NULL ); } if( *destination_range_list != NULL ) { libcdata_range_list_free( 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 ); } *number_of_elements = internal_range_list->number_of_elements; return( 1 ); } /* Sets the first element in the range list * Returns 1 if successful or -1 on error */ int libcdata_range_list_set_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_set_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 ) { 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 list element.", function ); return( -1 ); } } 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 ); return( -1 ); } } internal_range_list->first_element = element; return( 1 ); } /* Sets the last element in the list * Returns 1 if successful or -1 on error */ int libcdata_range_list_set_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_list_set_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 ) { 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 list element.", function ); return( -1 ); } } 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 ); return( -1 ); } } internal_range_list->last_element = element; return( 1 ); } /* Append a list element to the list * Returns 1 if successful or -1 on error */ int libcdata_range_list_append_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_append_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 list element.", function ); return( -1 ); } if( internal_range_list->first_element == NULL ) { internal_range_list->first_element = element; } if( libcdata_range_list_set_last_element( 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++; return( 1 ); } /* Append a value to the list * Creates a new list element * Returns 1 if successful or -1 on error */ int libcdata_range_list_append_value( libcdata_range_list_t *range_list, libcdata_range_list_value_t *value, libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; static char *function = "libcdata_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_range_list_append_element( 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 list.", 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; } return( 1 ); on_error: if( list_element != NULL ) { libcdata_list_element_free( &list_element, NULL, 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, 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 *last_element = NULL; libcdata_list_element_t *list_element = NULL; libcdata_list_element_t *next_element = NULL; libcdata_list_element_t *previous_element = NULL; libcdata_range_list_value_t *next_range_list_value = NULL; libcdata_range_list_value_t *new_range_list_value = NULL; libcdata_range_list_value_t *range_list_value = NULL; libcdata_range_list_value_t *previous_range_list_value = NULL; static char *function = "libcdata_range_list_insert_range"; uint64_t range_end = 0; int create_element = 0; int element_index = 0; int merge_next_element_check = 0; int merge_previous_element_check = 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 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 ); goto on_error; } create_element = 1; if( internal_range_list->number_of_elements > 0 ) { /* Check the last element first, most often the list will be filled linear */ list_element = internal_range_list->last_element; element_index = internal_range_list->number_of_elements - 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 ); 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: %d.", function, element_index ); goto on_error; } /* 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 ) ) { if( range_end > range_list_value->end ) { range_list_value->size += range_end - range_list_value->end; range_list_value->end = range_end; } create_element = 0; merge_next_element_check = 1; } /* Check if the range overlaps at the beginning of the existing range */ else if( ( range_end >= range_list_value->start ) && ( range_end <= range_list_value->end ) ) { if( range_start < range_list_value->start ) { range_list_value->size += range_list_value->start - range_start; range_list_value->start = range_start; } create_element = 0; merge_previous_element_check = 1; } /* Check if the range overlaps the existing range entirely */ else if( ( range_start < range_list_value->start ) && ( range_end > range_list_value->end ) ) { range_list_value->start = range_start; range_list_value->size = range_size; range_list_value->end = range_end; create_element = 0; merge_previous_element_check = 1; } /* Check if the range is after the existing range */ else if( range_end > range_list_value->end ) { last_element = list_element; } else if( internal_range_list->number_of_elements > 1 ) { if( range_end > ( range_list_value->end / 2 ) ) { 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; } for( element_index = ( internal_range_list->number_of_elements - 2 ); element_index >= 0; 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_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 ); goto on_error; } /* 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 ) ) { if( range_end > range_list_value->end ) { range_list_value->size += range_end - range_list_value->end; range_list_value->end = range_end; } create_element = 0; merge_next_element_check = 1; } /* Check if the range overlaps at the beginning of the existing range */ else if( ( range_end >= range_list_value->start ) && ( range_end <= range_list_value->end ) ) { if( range_start < range_list_value->start ) { range_list_value->size += range_list_value->start - range_start; range_list_value->start = range_start; } create_element = 0; merge_previous_element_check = 1; } /* Check if the range overlaps the existing range entirely */ else if( ( range_start < range_list_value->start ) && ( range_end > range_list_value->end ) ) { range_list_value->start = range_start; range_list_value->size = range_size; range_list_value->end = range_end; create_element = 0; merge_next_element_check = 1; merge_previous_element_check = 1; } if( create_element == 0 ) { break; } /* Check if the range is after the existing range */ if( range_end > range_list_value->end ) { last_element = list_element; break; } last_element = list_element; 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; } } } else { list_element = internal_range_list->first_element; for( element_index = 0; element_index < ( internal_range_list->number_of_elements - 1 ); 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_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 ); goto on_error; } /* 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 ) ) { if( range_end > range_list_value->end ) { range_list_value->size += range_end - range_list_value->end; range_list_value->end = range_end; } create_element = 0; merge_next_element_check = 1; } /* Check if the range overlaps at the beginning of the existing range */ else if( ( range_end >= range_list_value->start ) && ( range_end <= range_list_value->end ) ) { if( range_start < range_list_value->start ) { range_list_value->size += range_list_value->start - range_start; range_list_value->start = range_start; } create_element = 0; merge_previous_element_check = 1; } /* Check if the range overlaps the existing range entirely */ else if( ( range_start < range_list_value->start ) && ( range_end > range_list_value->end ) ) { range_list_value->start = range_start; range_list_value->size = range_size; range_list_value->end = range_end; create_element = 0; merge_next_element_check = 1; merge_previous_element_check = 1; } if( create_element == 0 ) { break; } /* Check if the range belongs before the existing range */ if( range_end < range_list_value->end ) { if( libcdata_list_element_get_previous_element( list_element, &last_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; } break; } last_element = list_element; 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; } } } } /* Check if the current range should be merged with the previous range */ if( merge_previous_element_check != 0 ) { 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: %d.", function, element_index ); goto on_error; } if( previous_element != NULL ) { if( libcdata_list_element_get_value( previous_element, (intptr_t **) &previous_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 - 1 ); goto on_error; } if( previous_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 - 1 ); goto on_error; } if( range_list_value->start <= previous_range_list_value->end ) { /* Merge range with previous */ if( libcdata_range_list_value_merge( range_list_value, previous_range_list_value, value_merge_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to merge range list value with previous.", function ); goto on_error; } /* Remove previous list element */ if( libcdata_range_list_remove_element( range_list, previous_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove list element: %d.", function, element_index - 1 ); goto on_error; } if( libcdata_list_element_free( &previous_element, NULL, 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 - 1 ); libcdata_range_list_value_free( &previous_range_list_value, value_free_function, NULL ); goto on_error; } if( libcdata_range_list_value_free( &previous_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 previous range list value: %d.", function, element_index ); goto on_error; } } } } /* Check if the current range should be merged with the next range */ if( merge_next_element_check != 0 ) { 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 ); goto on_error; } if( next_element != NULL ) { if( libcdata_list_element_get_value( next_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 list element: %d.", function, element_index + 1 ); goto on_error; } if( next_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 + 1 ); goto on_error; } if( range_list_value->end >= next_range_list_value->start ) { /* Merge range with next */ if( libcdata_range_list_value_merge( range_list_value, next_range_list_value, value_merge_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to merge range list value with next.", function ); goto on_error; } /* Remove next list element */ if( libcdata_range_list_remove_element( range_list, next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove list element: %d.", function, element_index + 1 ); goto on_error; } if( libcdata_list_element_free( &next_element, NULL, 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 + 1 ); libcdata_range_list_value_free( &next_range_list_value, value_free_function, NULL ); goto on_error; } if( libcdata_range_list_value_free( &next_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 next range list value: %d.", function, element_index + 1 ); goto on_error; } } } } } if( create_element != 0 ) { 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; } 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_size; new_range_list_value->end = range_end; new_range_list_value->value = value; if( libcdata_range_list_insert_value( range_list, last_element, new_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 in range list.", function ); goto on_error; } new_range_list_value = NULL; } else if( value != NULL ) { if( range_list_value->value == NULL ) { range_list_value->value = value; } else { 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_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( range_list_value->value, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to merge value.", function ); return( -1 ); } if( value_free_function( &value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to free value.", function ); return( -1 ); } } } return( 1 ); on_error: if( new_range_list_value != NULL ) { libcdata_range_list_value_free( &new_range_list_value, value_free_function, NULL ); } return( -1 ); } /* 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_internal_range_list_t *source_internal_range_list = NULL; 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; 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 ); } source_internal_range_list = (libcdata_internal_range_list_t *) source_range_list; source_list_element = source_internal_range_list->first_element; for( element_index = 0; element_index < source_internal_range_list->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 ); } if( 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 ) != 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 ); } /* Inserts the element in the range list after the range list element * If range_list_element is NULL the element is inserted before the first element in the list * Returns 1 if successful, or -1 on error */ int libcdata_range_list_insert_element( libcdata_range_list_t *range_list, libcdata_list_element_t *range_list_element, libcdata_list_element_t *element, libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; libcdata_list_element_t *next_element = NULL; libcdata_list_element_t *previous_element = NULL; static char *function = "libcdata_range_list_insert_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( 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_range_list_set_first_element( 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++; return( 1 ); } /* Inserts the range list value in the range list after the range list element * Returns 1 if successful, or -1 on error */ int libcdata_range_list_insert_value( libcdata_range_list_t *range_list, libcdata_list_element_t *range_list_element, libcdata_range_list_value_t *range_list_value, libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; static char *function = "libcdata_range_list_insert_value"; 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( 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 *) 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( libcdata_range_list_insert_element( 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 list element in range list.", 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 ); } /* Removes an element from the range list * Returns 1 if successful, or -1 on error */ int libcdata_range_list_remove_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; libcdata_list_element_t *next_element = NULL; libcdata_list_element_t *previous_element = NULL; static char *function = "libcdata_range_list_remove_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( 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( element == internal_range_list->first_element ) { internal_range_list->first_element = next_element; } if( 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( 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 list element.", function ); return( -1 ); } internal_range_list->number_of_elements--; 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_list_element_t *list_element = NULL; libcdata_range_list_value_t *range_list_value = NULL; libcdata_range_list_value_t *split_range_list_value = NULL; intptr_t *split_value = NULL; static char *function = "libcdata_range_list_remove_range"; uint64_t next_range_start = 0; uint64_t range_end = 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( 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 ); goto on_error; } while( range_start < range_end ) { result = libcdata_range_list_get_element_at_offset( 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 next list element.", function ); goto on_error; } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing next range list value element.", function ); goto on_error; } /* The specified range is not defined in the range list */ if( range_list_value->start >= range_end ) { break; } range_start = range_list_value->start; } else { 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; } } next_range_start = range_list_value->end; 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 ); goto on_error; } if( value_split_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value split function.", function ); goto on_error; } } if( range_list_value->start == range_start ) { if( range_list_value->end <= range_end ) { /* If the range marked for removal overlaps with the current range, * remove the current range entirely. */ if( libcdata_range_list_remove_element( 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 ); goto on_error; } 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 ); libcdata_range_list_value_free( &range_list_value, value_free_function, NULL ); goto on_error; } 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 ); goto on_error; } } else { /* If the range marked for removal is smaller than the current range, * split off of the part that remains after removal and remove the rest. */ if( range_list_value->value != NULL ) { if( value_split_function( &split_value, range_list_value->value, range_end, 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, range_end ); 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; } range_list_value->start = range_end; range_list_value->size = range_list_value->end - range_list_value->start; } } else { if( range_list_value->end <= range_end ) { if( range_list_value->value != NULL ) { if( value_split_function( &split_value, range_list_value->value, range_start, 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, range_start ); goto on_error; } if( value_free_function( &split_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to free value.", function ); goto on_error; } } range_list_value->end = range_start; range_list_value->size = range_list_value->end - range_list_value->start; } else { /* If the range marked for removal is smaller than the current range, * split off of the part that remains after removal and remove the rest. */ 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; } split_range_list_value->start = range_end; split_range_list_value->size = range_list_value->end - range_end; split_range_list_value->end = range_list_value->end; if( range_list_value->value != NULL ) { if( value_split_function( &( split_range_list_value->value ), range_list_value->value, range_end, 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, range_end ); goto on_error; } if( value_split_function( &split_value, range_list_value->value, range_start, 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, range_start ); goto on_error; } if( value_free_function( &split_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to free value.", function ); goto on_error; } } range_list_value->size = range_start - range_list_value->start; range_list_value->end = range_start; if( libcdata_range_list_insert_value( range_list, 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 in range list.", function ); goto on_error; } split_range_list_value = NULL; } } range_start = next_range_start; } 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 ); } /* Retrieves a specific element from the range list * Returns 1 if successful or -1 on error */ int libcdata_range_list_get_element_by_index( libcdata_range_list_t *range_list, int element_index, 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_element_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( ( 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 ); } if( ( internal_range_list->current_element != NULL ) && ( internal_range_list->current_element_index != element_index ) ) { if( element_index < internal_range_list->current_element_index ) { if( ( internal_range_list->current_element_index - element_index ) < ( internal_range_list->number_of_elements / 2 ) ) { while( internal_range_list->current_element_index > element_index ) { if( libcdata_list_element_get_previous_element( internal_range_list->current_element, &( internal_range_list->current_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, internal_range_list->current_element_index ); return( -1 ); } internal_range_list->current_element_index--; } } } else { if( ( element_index - internal_range_list->current_element_index ) < ( internal_range_list->number_of_elements / 2 ) ) { while( internal_range_list->current_element_index < element_index ) { if( libcdata_list_element_get_next_element( internal_range_list->current_element, &( internal_range_list->current_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, internal_range_list->current_element_index ); return( -1 ); } internal_range_list->current_element_index++; } } } } if( ( internal_range_list->current_element == NULL ) || ( internal_range_list->current_element_index != element_index ) ) { if( element_index < ( internal_range_list->number_of_elements / 2 ) ) { internal_range_list->current_element = internal_range_list->first_element; for( internal_range_list->current_element_index = 0; internal_range_list->current_element_index < element_index; internal_range_list->current_element_index++ ) { if( libcdata_list_element_get_next_element( internal_range_list->current_element, &( internal_range_list->current_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, internal_range_list->current_element_index ); return( -1 ); } } } else { internal_range_list->current_element = internal_range_list->last_element; for( internal_range_list->current_element_index = ( internal_range_list->number_of_elements - 1 ); internal_range_list->current_element_index > element_index; internal_range_list->current_element_index-- ) { if( libcdata_list_element_get_previous_element( internal_range_list->current_element, &( internal_range_list->current_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, internal_range_list->current_element_index ); return( -1 ); } } } } *element = internal_range_list->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_range_list_get_element_at_offset( libcdata_range_list_t *range_list, uint64_t range_offset, libcdata_list_element_t **element, 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_element_at_offset"; int element_index = 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_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 */ *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( *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 ) ) { return( 1 ); } if( libcdata_list_element_get_next_element( *element, 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 ); } } return( 0 ); } /* Retrieves a specific value from the range list * Returns 1 if successful or -1 on error */ int libcdata_range_list_get_value_by_index( libcdata_range_list_t *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_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_range_list_get_element_by_index( 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_range_list_get_value_at_offset( libcdata_range_list_t *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_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_range_list_get_element_at_offset( 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_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_range_list_get_range_by_index"; 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( libcdata_range_list_get_value_by_index( 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 ); 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 ); } *range_start = range_list_value->start; *range_size = range_list_value->size; *value = range_list_value->value; 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_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_range_list_get_range_at_offset"; int result = 0; 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 ); } result = libcdata_range_list_get_value_at_offset( 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 ); return( -1 ); } 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 ); return( -1 ); } *range_start = range_list_value->start; *range_size = range_list_value->size; *value = range_list_value->value; } return( result ); } /* Determines if a certain range is present * Returns 1 if present, 0 if not present 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; 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 > (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 ); } 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 ); } /* 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 ); return( -1 ); } if( range_end < range_list_value->start ) { break; } if( ( range_start >= range_list_value->start ) && ( range_end <= range_list_value->end ) ) { 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, element_index ); return( -1 ); } } return( 0 ); } /* 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_range_list_value_t *range_list_value = NULL; libcdata_internal_range_list_t *internal_range_list = NULL; static char *function = "libcdata_range_list_get_spanning_range"; int element_index = 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( internal_range_list->number_of_elements == 0 ) { return( 0 ); } if( libcdata_range_list_get_value_by_index( 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 ); 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: 0.", function ); return( -1 ); } *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_range_list_get_value_by_index( 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 ); 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 ); } } *range_size = range_list_value->end - *range_start; return( 1 ); } libevt-20170120/libcdata/libcdata_extern.h0000664000175000017500000000254513040331675022411 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) /* If libtool DLL support is enabled set LIBCDATA_DLL_EXPORT * before including libcdata/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCDATA_DLL_EXPORT #endif #include #else #define LIBCDATA_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBCDATA ) */ #endif /* !defined( _LIBCDATA_INTERNAL_EXTERN_H ) */ libevt-20170120/libcdata/libcdata_support.c0000664000175000017500000000220213040331675022601 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "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 ) */ libevt-20170120/libcdata/libcdata_list_element.h0000664000175000017500000000667413040331675023577 0ustar00lordyestalordyesta00000000000000/* * List element functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 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 ); 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 ); 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 ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_LIST_ELEMENT_H ) */ libevt-20170120/libcdata/libcdata_range_list_value.c0000664000175000017500000002240013040331675024412 0ustar00lordyestalordyesta00000000000000/* * Range list value * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "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 ); } libevt-20170120/libcdata/libcdata_libcerror.h0000664000175000017500000000264113040331675023064 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcdata/libcdata_error.c0000664000175000017500000000554013040331675022226 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "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 ) */ libevt-20170120/libcdata/libcdata_error.h0000664000175000017500000000340513040331675022231 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcdata/libcdata_support.h0000664000175000017500000000232013040331675022607 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcdata/libcdata_list.c0000664000175000017500000014670613040331675022062 0ustar00lordyestalordyesta00000000000000/* * List functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "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 intialize 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 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 if( libcdata_internal_list_empty( 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; } memory_free( internal_list ); } return( result ); } /* Empties a list and frees the elements * Uses the value_free_function to free the element value * This function is not multi-thread safe acquire write lock before call * Returns 1 if successful or -1 on error */ int libcdata_internal_list_empty( libcdata_internal_list_t *internal_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; libcdata_list_element_t *next_element = NULL; static char *function = "libcdata_internal_list_empty"; int element_index = 0; int number_of_elements = 0; int result = 1; if( internal_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } 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 ); return( -1 ); } internal_list->first_element = next_element; if( internal_list->last_element == list_element ) { internal_list->last_element = next_element; } internal_list->number_of_elements--; 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 ); return( -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 ); return( -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 ); return( -1 ); } list_element = next_element; } } 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; static char *function = "libcdata_list_empty"; 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( libcdata_internal_list_empty( 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_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 ); return( -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_source_list = NULL; libcdata_list_element_t *source_list_element = NULL; intptr_t *destination_value = NULL; intptr_t *source_value = NULL; static char *function = "libcdata_list_clone"; int element_index = 0; int result = 1; 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( libcdata_list_initialize( destination_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination list.", function ); goto on_error; } if( *destination_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination list.", function ); goto on_error; } #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 ); goto on_error; } #endif source_list_element = internal_source_list->first_element; for( element_index = 0; element_index < internal_source_list->number_of_elements; element_index++ ) { result = libcdata_list_element_get_value( source_list_element, &source_value, error ); if( result != 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 ); break; } result = value_clone_function( &destination_value, source_value, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination value: %d.", function, element_index ); break; } result = libcdata_list_append_value( *destination_list, destination_value, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append destination value to destination list.", function ); break; } destination_value = NULL; result = libcdata_list_element_get_next_element( source_list_element, &source_list_element, error ); if( result != 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 ); break; } } #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 ); goto on_error; } #endif if( result != 1 ) { goto on_error; } return( 1 ); on_error: if( destination_value != NULL ) { value_free_function( &destination_value, NULL ); } if( *destination_list != NULL ) { libcdata_list_free( destination_list, value_free_function, error ); } return( -1 ); } /* Retrieves the number of elements in the list * Returns 1 if successful or -1 on error */ int 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 * This function is not multi-thread safe acquire write lock before call * 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 ) { 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 ); } 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 list element.", function ); return( -1 ); } } 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 ); return( -1 ); } } internal_list->first_element = element; return( 1 ); } /* Sets the first element in the list * Returns 1 if successful or -1 on error */ int libcdata_list_set_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_set_first_element"; 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( libcdata_internal_list_set_first_element( internal_list, element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set first 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 ); return( -1 ); } #endif return( result ); } /* 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 * This function is not multi-thread safe acquire write lock before call * 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 ) { 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 ); } 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 list element.", function ); return( -1 ); } } 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 ); return( -1 ); } } internal_list->last_element = element; return( 1 ); } /* Sets the last element in the list * Returns 1 if successful or -1 on error */ int libcdata_list_set_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_set_last_element"; 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( libcdata_internal_list_set_last_element( internal_list, element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set last 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 ); return( -1 ); } #endif return( result ); } /* 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; static char *function = "libcdata_list_prepend_element"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } 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 list element.", 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 ); } #endif if( internal_list->last_element == NULL ) { internal_list->last_element = element; } if( libcdata_internal_list_set_first_element( internal_list, element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set first element.", function ); goto on_error; } internal_list->number_of_elements++; #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 ); return( -1 ); } #endif return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_write( internal_list->read_write_lock, NULL ); #endif return( -1 ); } /* 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; static char *function = "libcdata_list_append_element"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libcdata_internal_list_t *) list; 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_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->first_element == NULL ) { internal_list->first_element = element; } if( libcdata_internal_list_set_last_element( internal_list, 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; } internal_list->number_of_elements++; #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 ); return( -1 ); } #endif return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_write( internal_list->read_write_lock, NULL ); #endif return( -1 ); } /* 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 *list_element = NULL; static char *function = "libcdata_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_append_element( list, list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append element to list.", function ); goto on_error; } if( 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 ); } /* 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, 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_list_t *internal_list = NULL; libcdata_list_element_t *list_element = NULL; libcdata_list_element_t *next_element = NULL; libcdata_list_element_t *previous_element = NULL; intptr_t *element_value = NULL; intptr_t *list_element_value = NULL; static char *function = "libcdata_list_insert_element"; int compare_result = 0; int element_index = 0; int result = 1; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } 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 list element.", 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_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( libcdata_list_element_get_value( element, &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.", 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 ); } #endif 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 ); goto on_error; } 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 ); goto on_error; } internal_list->first_element = element; internal_list->last_element = element; internal_list->number_of_elements++; } 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.", function ); goto on_error; } if( internal_list->last_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last.", function ); goto on_error; } list_element = internal_list->first_element; for( element_index = 0; element_index < internal_list->number_of_elements; 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, element_index ); goto on_error; } compare_result = value_compare_function( element_value, 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, element_index ); goto on_error; } 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 ) { 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 value compare function return value: %d.", function, compare_result ); 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; } } if( result != 0 ) { if( compare_result == LIBCDATA_COMPARE_LESS ) { 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: %d.", function, element_index ); goto on_error; } if( libcdata_list_element_set_elements( element, 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 list element.", function ); goto on_error; } if( list_element == internal_list->first_element ) { internal_list->first_element = element; } else { if( libcdata_list_element_set_next_element( previous_element, element, 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 - 1 ); goto on_error; } } if( libcdata_list_element_set_previous_element( list_element, element, 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 ); goto on_error; } } else { if( libcdata_internal_list_set_last_element( internal_list, 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; } } internal_list->number_of_elements++; } } #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 ); 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_list->read_write_lock, NULL ); #endif return( -1 ); } /* Inserts a value to the list * * Creates a new list element * * Uses the value_compare_function to determine the order of the entries * The value_compare_function should return 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 ) { libcdata_list_element_t *list_element = NULL; static char *function = "libcdata_list_insert_value"; int result = 0; 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 ); return( -1 ); } 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; } result = libcdata_list_insert_element( list, list_element, value_compare_function, insert_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert element to list.", function ); goto on_error; } else if( result == 0 ) { if( 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 ); goto on_error; } } return( result ); on_error: if( list_element != NULL ) { libcdata_list_element_free( &list_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, 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"; 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 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( element == internal_list->first_element ) { internal_list->first_element = next_element; } if( element == internal_list->last_element ) { internal_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( 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 list element.", function ); return( -1 ); } internal_list->number_of_elements--; return( 1 ); } libevt-20170120/libcdata/libcdata_tree_node.h0000664000175000017500000001417313040331675023050 0ustar00lordyestalordyesta00000000000000/* * Tree functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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_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; }; 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_append_node( libcdata_tree_node_t *parent_node, libcdata_tree_node_t *node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_append_value( libcdata_tree_node_t *parent_node, intptr_t *value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_insert_node( libcdata_tree_node_t *parent_node, libcdata_tree_node_t *node, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_insert_value( libcdata_tree_node_t *parent_node, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); 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 *parent_node, libcdata_tree_node_t *node, 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 ) */ libevt-20170120/libcdata/libcdata_list.h0000664000175000017500000001265713040331675022064 0ustar00lordyestalordyesta00000000000000/* * List functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ); int libcdata_internal_list_empty( libcdata_internal_list_t *internal_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 ); int libcdata_list_set_first_element( libcdata_list_t *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 ); int libcdata_list_set_last_element( libcdata_list_t *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 ); LIBCDATA_EXTERN \ int libcdata_list_insert_element( libcdata_list_t *list, libcdata_list_element_t *element, int (*value_compare_function)( intptr_t *first, intptr_t *second, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); 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_remove_element( libcdata_list_t *list, libcdata_list_element_t *element, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_LIST_H ) */ libevt-20170120/libcdata/libcdata_types.h0000664000175000017500000000367213040331675022252 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcdata/libcdata_list_element.c0000664000175000017500000004423413040331675023564 0ustar00lordyestalordyesta00000000000000/* * List element functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "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 intialize 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 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( 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 ); } #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 ); return( -1 ); } #endif return( 1 ); } /* 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( 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 ); } #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 ); return( -1 ); } #endif return( 1 ); } /* 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( 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 ); } #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 ); return( -1 ); } #endif return( 1 ); } /* 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( 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 ); } #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 ); return( -1 ); } #endif return( 1 ); } libevt-20170120/libcdata/Makefile.in0000664000175000017500000010051513040342657021153 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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_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 libcdata_error.lo \ @HAVE_LOCAL_LIBCDATA_TRUE@ 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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ 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$(top_srcdir)/include \ @HAVE_LOCAL_LIBCDATA_TRUE@ -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_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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_btree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_list_element.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_range_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_range_list_value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_tree_node.Plo@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @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: libevt-20170120/libcdata/libcdata_array.h0000664000175000017500000001216113040331675022215 0ustar00lordyestalordyesta00000000000000/* * Array functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 ) */ libevt-20170120/libcdata/libcdata_btree.h0000664000175000017500000001224613040331675022204 0ustar00lordyestalordyesta00000000000000/* * Balanced tree type functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCDATA_BTREE_H ) #define _LIBCDATA_BTREE_H #include #include #include "libcdata_extern.h" #include "libcdata_libcerror.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; }; 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 ); int libcdata_btree_free_values_list( libcdata_list_t **values_list, libcerror_error_t **error ); /* TODO clone function */ 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_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 ); 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 ) */ libevt-20170120/libcdata/libcdata_definitions.h0000664000175000017500000000362313040331675023415 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. 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 20170116 /* The libcdata version string */ #define LIBCDATA_VERSION_STRING "20170116" /* 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 ) */ #endif libevt-20170120/libcdata/libcdata_btree.c0000664000175000017500000015770613040331675022212 0ustar00lordyestalordyesta00000000000000/* * Balanced tree type functions * * Copyright (C) 2006-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcdata_array.h" #include "libcdata_btree.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" /* 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; *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( libcdata_tree_node_free( &( internal_tree->root_node ), (int (*)(intptr_t **, libcerror_error_t **)) &libcdata_btree_free_values_list, 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 ); } /* Frees a values list * Returns 1 if successful or -1 on error */ int libcdata_btree_free_values_list( libcdata_list_t **values_list, libcerror_error_t **error ) { static char *function = "libcdata_btree_free_values_list"; 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 ); } /* TODO add clone function ? */ /* 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; 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( 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; 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 ) { 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( libcdata_tree_node_get_sub_node_by_index( node, 0, 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 ); } } if( number_of_values_list_elements == 0 ) { *values_list_element = NULL; return( 0 ); } 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 ); 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( *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 ) { if( value == values_list_value ) { return( 1 ); } } else { result = value_compare_function( value, values_list_value, error ); 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 ) { 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( *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 ); return( -1 ); } if( number_of_sub_nodes != 0 ) { 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 from sub node: %d.", function, sub_node_index ); return( -1 ); } sub_node_index++; } } 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 ); } /* 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 *previous_values_list_element = 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_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 remaining sub node from node.", function ); return( -1 ); } if( libcdata_tree_node_free( &sub_node, (int (*)(intptr_t **, libcerror_error_t **)) &libcdata_btree_free_values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free remaining sub 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_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 values list 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 values list element.", 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 tree */ if( number_of_sub_nodes == 1 ) { if( libcdata_tree_node_get_sub_node_by_index( node, 0, &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve remaining 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 remaining 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 remaining sub node.", function ); libcdata_tree_node_append_node( node, sub_node, NULL ); 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_tree_node_free( &sub_node, (int (*)(intptr_t **, libcerror_error_t **)) &libcdata_btree_free_values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free remaining sub node.", 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_list_element_get_previous_element( values_list_element, &previous_values_list_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_values_list_element != NULL ) { if( libcdata_list_element_get_value( previous_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 previous 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 values list 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 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_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( 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 ); } /* 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 ); } libevt-20170120/acinclude.m40000664000175000017500000000261313040334225017524 0ustar00lordyestalordyesta00000000000000dnl Function to detect if libevt dependencies are available AC_DEFUN([AX_LIBEVT_CHECK_LOCAL], [dnl Check for internationalization functions in libevt/libevt_i18n.c AC_CHECK_FUNCS([bindtextdomain]) dnl Check if library should be build with verbose output AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT dnl Check if library should be build with debug output AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT dnl Check if DLL support is needed AS_IF( [test "x$enable_shared" = xyes], [AS_CASE( [$host], [*cygwin* | *mingw*], [AC_DEFINE( [HAVE_DLLMAIN], [1], [Define to 1 to enable the DllMain function.]) AC_SUBST( [HAVE_DLLMAIN], [1]) ]) ]) ]) dnl Function to detect if evttools dependencies are available AC_DEFUN([AX_EVTTOOLS_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 Check if tools should be build as static executables AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES dnl Check if DLL support is needed AS_IF( [test "x$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno], [AS_CASE( [$host], [*cygwin* | *mingw*], [AC_SUBST( [LIBEVT_DLL_IMPORT], ["-DLIBEVT_DLL_IMPORT"]) ]) ]) ]) libevt-20170120/libcsplit/0000775000175000017500000000000013040343016017314 5ustar00lordyestalordyesta00000000000000libevt-20170120/libcsplit/libcsplit_types.h0000664000175000017500000000322113040331676022705 0ustar00lordyestalordyesta00000000000000/* * The internal type definitions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_INTERNAL_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 ) */ libevt-20170120/libcsplit/libcsplit_wide_string.h0000664000175000017500000000270113040331676024061 0ustar00lordyestalordyesta00000000000000/* * Wide character string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_WIDE_STRING_H ) #define _LIBCSPLIT_WIDE_STRING_H #include #include #include "libcsplit_extern.h" #include "libcsplit_libcerror.h" #include "libcsplit_types.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBCSPLIT_EXTERN \ int libcsplit_wide_string_split( const wchar_t *string, size_t string_size, wchar_t delimiter, libcsplit_wide_split_string_t **split_string, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCSPLIT_WIDE_STRING_H ) */ libevt-20170120/libcsplit/libcsplit_error.h0000664000175000017500000000343413040331676022700 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_INTERNAL_ERROR_H ) #define _LIBCSPLIT_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBCSPLIT ) #include #endif #include "libcsplit_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCSPLIT ) LIBCSPLIT_EXTERN \ void libcsplit_error_free( libcsplit_error_t **error ); LIBCSPLIT_EXTERN \ int libcsplit_error_fprint( libcsplit_error_t *error, FILE *stream ); LIBCSPLIT_EXTERN \ int libcsplit_error_sprint( libcsplit_error_t *error, char *string, size_t size ); LIBCSPLIT_EXTERN \ int libcsplit_error_backtrace_fprint( libcsplit_error_t *error, FILE *stream ); LIBCSPLIT_EXTERN \ int libcsplit_error_backtrace_sprint( libcsplit_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCSPLIT_INTERNAL_ERROR_H ) */ libevt-20170120/libcsplit/libcsplit_support.h0000664000175000017500000000233013040331676023255 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_SUPPORT_H ) #define _LIBCSPLIT_SUPPORT_H #include #include #include "libcsplit_extern.h" #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 ) */ libevt-20170120/libcsplit/libcsplit_narrow_split_string.c0000664000175000017500000003313113040331676025650 0ustar00lordyestalordyesta00000000000000/* * Split narrow string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "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 ); } libevt-20170120/libcsplit/libcsplit_narrow_split_string.h0000664000175000017500000000544313040331676025662 0ustar00lordyestalordyesta00000000000000/* * Split narrow string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_INTERNAL_NARROW_SPLIT_STRING_H ) #define _LIBCSPLIT_INTERNAL_NARROW_SPLIT_STRING_H #include #include #include "libcsplit_extern.h" #include "libcsplit_libcerror.h" #include "libcsplit_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcsplit_internal_narrow_split_string libcsplit_internal_narrow_split_string_t; struct libcsplit_internal_narrow_split_string { /* The number of string segments */ int number_of_segments; /* The string */ char *string; /* The string size */ size_t string_size; /* The segments */ char **segments; /* The segment sizes */ size_t *segment_sizes; }; int libcsplit_narrow_split_string_initialize( libcsplit_narrow_split_string_t **split_string, const char *string, size_t string_size, int number_of_segments, libcerror_error_t **error ); LIBCSPLIT_EXTERN \ int libcsplit_narrow_split_string_free( libcsplit_narrow_split_string_t **split_string, libcerror_error_t **error ); LIBCSPLIT_EXTERN \ int libcsplit_narrow_split_string_get_string( libcsplit_narrow_split_string_t *split_string, char **string, size_t *string_size, libcerror_error_t **error ); LIBCSPLIT_EXTERN \ int libcsplit_narrow_split_string_get_number_of_segments( libcsplit_narrow_split_string_t *split_string, int *number_of_segments, libcerror_error_t **error ); LIBCSPLIT_EXTERN \ int libcsplit_narrow_split_string_get_segment_by_index( libcsplit_narrow_split_string_t *split_string, int segment_index, char **string_segment, size_t *string_segment_size, libcerror_error_t **error ); LIBCSPLIT_EXTERN \ int libcsplit_narrow_split_string_set_segment_by_index( libcsplit_narrow_split_string_t *split_string, int segment_index, char *string_segment, size_t string_segment_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCSPLIT_INTERNAL_NARROW_SPLIT_STRING_H ) */ libevt-20170120/libcsplit/Makefile.am0000664000175000017500000000152013012271472021353 0ustar00lordyestalordyesta00000000000000if HAVE_LOCAL_LIBCSPLIT AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -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 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcsplit ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcsplit_la_SOURCES) libevt-20170120/libcsplit/libcsplit_wide_split_string.c0000664000175000017500000003317113040331676025274 0ustar00lordyestalordyesta00000000000000/* * Split wide string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "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 ) */ libevt-20170120/libcsplit/libcsplit_narrow_string.h0000664000175000017500000000255413040331676024447 0ustar00lordyestalordyesta00000000000000/* * Narrow character string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_NARROW_STRING_H ) #define _LIBCSPLIT_NARROW_STRING_H #include #include #include "libcsplit_extern.h" #include "libcsplit_libcerror.h" #include "libcsplit_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBCSPLIT_EXTERN \ int libcsplit_narrow_string_split( const char *string, size_t string_size, char delimiter, libcsplit_narrow_split_string_t **split_string, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCSPLIT_NARROW_STRING_H ) */ libevt-20170120/libcsplit/libcsplit_unused.h0000664000175000017500000000255613040331676023056 0ustar00lordyestalordyesta00000000000000/* * The internal unused definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_INTERNAL_UNUSED_H ) #define _LIBCSPLIT_INTERNAL_UNUSED_H #include #if !defined( LIBCSPLIT_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCSPLIT_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCSPLIT_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCSPLIT_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCSPLIT_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBCSPLIT_INTERNAL_UNUSED_H ) */ libevt-20170120/libcsplit/libcsplit_wide_string.c0000664000175000017500000001452013040331676024056 0ustar00lordyestalordyesta00000000000000/* * Wide character string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcsplit_libcerror.h" #include "libcsplit_wide_split_string.h" #include "libcsplit_wide_string.h" #include "libcsplit_types.h" #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Splits a wide character string * 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; static char *function = "libcsplit_wide_string_split"; ssize_t segment_length = 0; int number_of_segments = 0; int segment_index = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string size value exceeds maximum.", function ); return( -1 ); } if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } if( *split_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid split string already set.", function ); return( -1 ); } /* An empty string has no segments */ if( ( string_size == 0 ) || ( string[ 0 ] == 0 ) ) { return( 1 ); } /* Determine the number of segments */ segment_start = (wchar_t *) string; string_end = (wchar_t *) &( string[ string_size - 1 ] ); do { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end > string_end ) { break; } segment_index++; if( segment_end == NULL ) { break; } if( segment_end == segment_start ) { segment_start++; } else if( segment_end != string ) { segment_start = segment_end + 1; } } while( segment_end != NULL ); number_of_segments = segment_index; if( libcsplit_wide_split_string_initialize( split_string, string, string_size, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to intialize split string.", function ); goto on_error; } if( *split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing split string.", function ); goto on_error; } /* Do not bother splitting empty strings */ if( number_of_segments == 0 ) { return( 1 ); } /* Determine the segments * empty segments are stored as strings only containing the end of character */ if( libcsplit_wide_split_string_get_string( *split_string, &segment_start, &string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve split string.", function ); goto on_error; } if( segment_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing segment start.", function ); goto on_error; } if( string_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string size value out of bounds.", function ); goto on_error; } string_end = &( segment_start[ string_size - 1 ] ); for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end == NULL ) { segment_length = (ssize_t) ( string_end - segment_start ); } else { segment_length = (ssize_t) ( segment_end - segment_start ); } if( segment_length >= 0 ) { segment_start[ segment_length ] = 0; if( libcsplit_wide_split_string_set_segment_by_index( *split_string, segment_index, segment_start, segment_length + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set split string segment: %d.", function, segment_index ); goto on_error; } } if( segment_end == NULL ) { break; } if( segment_end == ( (libcsplit_internal_wide_split_string_t *) *split_string )->string ) { segment_start++; } if( segment_end != ( (libcsplit_internal_wide_split_string_t *) *split_string )->string ) { segment_start = segment_end + 1; } } return( 1 ); on_error: if( *split_string != NULL ) { libcsplit_wide_split_string_free( split_string, NULL ); } return( -1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libevt-20170120/libcsplit/libcsplit_narrow_string.c0000664000175000017500000001440313040331676024436 0ustar00lordyestalordyesta00000000000000/* * Narrow character string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcsplit_libcerror.h" #include "libcsplit_narrow_split_string.h" #include "libcsplit_narrow_string.h" #include "libcsplit_types.h" /* Splits a narrow character string * 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; static char *function = "libcsplit_narrow_string_split"; ssize_t segment_length = 0; int number_of_segments = 0; int segment_index = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string size value exceeds maximum.", function ); return( -1 ); } if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } if( *split_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid split string already set.", function ); return( -1 ); } /* An empty string has no segments */ if( ( string_size == 0 ) || ( string[ 0 ] == 0 ) ) { return( 1 ); } /* Determine the number of segments */ segment_start = (char *) string; string_end = (char *) &( string[ string_size - 1 ] ); do { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end > string_end ) { break; } segment_index++; if( segment_end == NULL ) { break; } if( segment_end == segment_start ) { segment_start++; } else if( segment_end != string ) { segment_start = segment_end + 1; } } while( segment_end != NULL ); number_of_segments = segment_index; if( libcsplit_narrow_split_string_initialize( split_string, string, string_size, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to intialize split string.", function ); goto on_error; } if( *split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing split string.", function ); goto on_error; } /* Do not bother splitting empty strings */ if( number_of_segments == 0 ) { return( 1 ); } /* Determine the segments * empty segments are stored as strings only containing the end of character */ if( libcsplit_narrow_split_string_get_string( *split_string, &segment_start, &string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve split string.", function ); goto on_error; } if( segment_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing segment start.", function ); goto on_error; } if( string_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string size value out of bounds.", function ); goto on_error; } string_end = &( segment_start[ string_size - 1 ] ); for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end == NULL ) { segment_length = (ssize_t) ( string_end - segment_start ); } else { segment_length = (ssize_t) ( segment_end - segment_start ); } if( segment_length >= 0 ) { segment_start[ segment_length ] = 0; if( libcsplit_narrow_split_string_set_segment_by_index( *split_string, segment_index, segment_start, segment_length + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set split string segment: %d.", function, segment_index ); goto on_error; } } if( segment_end == NULL ) { break; } if( segment_end == ( (libcsplit_internal_narrow_split_string_t *) *split_string )->string ) { segment_start++; } if( segment_end != ( (libcsplit_internal_narrow_split_string_t *) *split_string )->string ) { segment_start = segment_end + 1; } } return( 1 ); on_error: if( *split_string != NULL ) { libcsplit_narrow_split_string_free( split_string, NULL ); } return( -1 ); } libevt-20170120/libcsplit/Makefile.in0000664000175000017500000007735213040342657021411 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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__depfiles_maybe = depfiles 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__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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBCSPLIT_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ @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 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcsplit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcsplit/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_narrow_split_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_narrow_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_wide_split_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_wide_string.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcsplit ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcsplit_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libevt-20170120/libcsplit/libcsplit_wide_split_string.h0000664000175000017500000000555213040331676025303 0ustar00lordyestalordyesta00000000000000/* * Split wide string functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_INTERNAL_WIDE_SPLIT_STRING_H ) #define _LIBCSPLIT_INTERNAL_WIDE_SPLIT_STRING_H #include #include #include "libcsplit_extern.h" #include "libcsplit_libcerror.h" #include "libcsplit_types.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_WIDE_CHARACTER_TYPE ) typedef struct libcsplit_internal_wide_split_string libcsplit_internal_wide_split_string_t; struct libcsplit_internal_wide_split_string { /* The number of string segments */ int number_of_segments; /* The string */ wchar_t *string; /* The string size */ size_t string_size; /* The segments */ wchar_t **segments; /* The segment sizes */ size_t *segment_sizes; }; int libcsplit_wide_split_string_initialize( libcsplit_wide_split_string_t **split_string, const wchar_t *string, size_t string_size, int number_of_segments, libcerror_error_t **error ); 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 ) */ libevt-20170120/libcsplit/libcsplit_definitions.h0000664000175000017500000000252213040331676024057 0ustar00lordyestalordyesta00000000000000/* * The internal definitions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBCSPLIT_INTERNAL_DEFINITIONS_H ) #define LIBCSPLIT_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCSPLIT for local use of libcsplit */ #if !defined( HAVE_LOCAL_LIBCSPLIT ) #include /* The definitions in are copied here * for local use of libcsplit */ #else #define LIBCSPLIT_VERSION 20170109 /* The libcsplit version string */ #define LIBCSPLIT_VERSION_STRING "20170109" #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */ #endif libevt-20170120/libcsplit/libcsplit_error.c0000664000175000017500000000555613040331676022702 0ustar00lordyestalordyesta00000000000000/* * Error functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcsplit_error.h" #include "libcsplit_libcerror.h" #if !defined( HAVE_LOCAL_LIBCSPLIT ) /* Free an error and its elements */ void libcsplit_error_free( libcsplit_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcsplit_error_fprint( libcsplit_error_t *error, FILE *stream ) { 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 ) */ libevt-20170120/libcsplit/libcsplit_support.c0000664000175000017500000000221013040331676023245 0ustar00lordyestalordyesta00000000000000/* * Support functions * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcsplit_definitions.h" #include "libcsplit_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 ) */ libevt-20170120/libcsplit/libcsplit_libcerror.h0000664000175000017500000000264413040331676023534 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_LIBCERROR_H ) #define _LIBCSPLIT_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBCSPLIT_LIBCERROR_H ) */ libevt-20170120/libcsplit/libcsplit_extern.h0000664000175000017500000000256113040331676023054 0ustar00lordyestalordyesta00000000000000/* * The internal extern definition * * Copyright (C) 2008-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_INTERNAL_EXTERN_H ) #define _LIBCSPLIT_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCSPLIT for local use of libcsplit */ #if !defined( HAVE_LOCAL_LIBCSPLIT ) /* If libtool DLL support is enabled set LIBCSPLIT_DLL_EXPORT * before including libcsplit/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCSPLIT_DLL_EXPORT #endif #include #else #define LIBCSPLIT_EXTERN /* extern */ #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */ #endif /* !defined( _LIBCSPLIT_INTERNAL_EXTERN_H ) */ libevt-20170120/evttools/0000775000175000017500000000000013040343017017207 5ustar00lordyestalordyesta00000000000000libevt-20170120/evttools/info_handle.c0000664000175000017500000003170313040331673021632 0ustar00lordyestalordyesta00000000000000/* * Info handle * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include #include "evtinput.h" #include "evttools_libcerror.h" #include "evttools_libclocale.h" #include "evttools_libevt.h" #include "info_handle.h" #define INFO_HANDLE_NOTIFY_STREAM stdout /* 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( libevt_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 )->event_log_type = EVTTOOLS_EVENT_LOG_TYPE_UNKNOWN; ( *info_handle )->ascii_codepage = LIBEVT_CODEPAGE_WINDOWS_1252; ( *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( libevt_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( libevt_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 ); } /* Sets the event log type from the filename * Returns 1 if successful or -1 on error */ int info_handle_set_event_log_type_from_filename( info_handle_t *info_handle, const system_character_t *filename, libcerror_error_t **error ) { static char *function = "info_handle_set_event_log_type_from_filename"; int result = 0; if( info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid info handle.", function ); return( -1 ); } result = evtinput_determine_event_log_type_from_filename( filename, &( info_handle->event_log_type ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine event log type from filename.", function ); return( -1 ); } return( result ); } /* Opens the input * Returns 1 if successful or -1 on error */ int info_handle_open_input( info_handle_t *info_handle, const system_character_t *filename, libcerror_error_t **error ) { static char *function = "info_handle_open_input"; if( info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid info handle.", function ); return( -1 ); } if( libevt_file_set_ascii_codepage( info_handle->input_file, info_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set ASCII codepage in input file.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libevt_file_open_wide( info_handle->input_file, filename, LIBEVT_OPEN_READ, error ) != 1 ) #else if( libevt_file_open( info_handle->input_file, filename, LIBEVT_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 input * Returns the 0 if succesful or -1 on error */ int info_handle_close_input( info_handle_t *info_handle, libcerror_error_t **error ) { static char *function = "info_handle_close_input"; if( info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid info handle.", function ); return( -1 ); } if( libevt_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 file information * Returns 1 if successful or -1 on error */ int info_handle_file_fprint( info_handle_t *info_handle, libcerror_error_t **error ) { const system_character_t *event_log_type = NULL; static char *function = "info_handle_file_fprint"; uint32_t flags = 0; uint32_t major_version = 0; uint32_t minor_version = 0; int is_corrupted = 0; int number_of_recovered_records = 0; int number_of_records = 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( libevt_file_get_format_version( info_handle->input_file, &major_version, &minor_version, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve format version.", function ); return( -1 ); } if( libevt_file_get_flags( info_handle->input_file, &flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve flags.", function ); return( -1 ); } is_corrupted = libevt_file_is_corrupted( info_handle->input_file, error ); if( is_corrupted == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if file is corrupted.", function ); return( -1 ); } if( libevt_file_get_number_of_records( info_handle->input_file, &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 ); return( -1 ); } if( libevt_file_get_number_of_recovered_records( info_handle->input_file, &number_of_recovered_records, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered records.", function ); return( -1 ); } fprintf( info_handle->notify_stream, "Windows Event Log (EVT) information:\n" ); fprintf( info_handle->notify_stream, "\tVersion\t\t\t\t: %" PRIu32 ".%" PRIu32 "\n", major_version, minor_version ); fprintf( info_handle->notify_stream, "\tNumber of records\t\t: %d\n", number_of_records ); fprintf( info_handle->notify_stream, "\tNumber of recovered records\t: %d\n", number_of_recovered_records ); switch( info_handle->event_log_type ) { case EVTTOOLS_EVENT_LOG_TYPE_APPLICATION: event_log_type = _SYSTEM_STRING( "Application" ); break; case EVTTOOLS_EVENT_LOG_TYPE_INTERNET_EXPLORER: event_log_type = _SYSTEM_STRING( "Internet Explorer" ); break; case EVTTOOLS_EVENT_LOG_TYPE_SECURITY: event_log_type = _SYSTEM_STRING( "Security" ); break; case EVTTOOLS_EVENT_LOG_TYPE_SYSTEM: event_log_type = _SYSTEM_STRING( "System" ); break; } if( event_log_type != NULL ) { fprintf( info_handle->notify_stream, "\tLog type\t\t\t: %" PRIs_SYSTEM "\n", event_log_type ); } if( is_corrupted != 0 ) { fprintf( info_handle->notify_stream, "\tIs corrupted\n" ); } if( flags != 0 ) { fprintf( info_handle->notify_stream, "\tFlags:\n" ); if( ( flags & LIBEVT_FILE_FLAG_IS_DIRTY ) != 0 ) { fprintf( info_handle->notify_stream, "\t\tIs dirty\n" ); } if( ( flags & LIBEVT_FILE_FLAG_HAS_WRAPPED ) != 0 ) { fprintf( info_handle->notify_stream, "\t\tHas wrapped\n" ); } if( ( flags & LIBEVT_FILE_FLAG_IS_FULL ) != 0 ) { fprintf( info_handle->notify_stream, "\t\tIs full\n" ); } if( ( flags & LIBEVT_FILE_FLAG_ARCHIVE ) != 0 ) { fprintf( info_handle->notify_stream, "\t\tShould be archived\n" ); } } fprintf( info_handle->notify_stream, "\n" ); return( 1 ); } libevt-20170120/evttools/evttools_libcsplit.h0000664000175000017500000000266413040331673023321 0ustar00lordyestalordyesta00000000000000/* * The internal libcsplit header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBCSPLIT_H ) #define _EVTTOOLS_LIBCSPLIT_H #include /* Define HAVE_LOCAL_LIBCSPLIT for local use of libcsplit */ #if defined( HAVE_LOCAL_LIBCSPLIT ) #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSPLIT_DLL_IMPORT * before including libcsplit.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSPLIT_DLL_IMPORT #endif #include #endif #endif libevt-20170120/evttools/evttools_signal.h0000664000175000017500000000331313040331673022601 0ustar00lordyestalordyesta00000000000000/* * Signal handling functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_SIGNAL_H ) #define _EVTTOOLS_SIGNAL_H #include #include #include "evttools_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 evttools_signal_t; #else typedef int evttools_signal_t; #endif /* defined( WINAPI ) */ #if defined( WINAPI ) BOOL WINAPI evttools_signal_handler( evttools_signal_t signal ); #if defined( _MSC_VER ) void evttools_signal_initialize_memory_debug( void ); #endif /* defined( _MSC_VER ) */ #endif /* defined( WINAPI ) */ int evttools_signal_attach( void (*signal_handler)( evttools_signal_t ), libcerror_error_t **error ); int evttools_signal_detach( libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _EVTTOOLS_SIGNAL_H ) */ libevt-20170120/evttools/evttools_output.c0000664000175000017500000000767313040337425022675 0ustar00lordyestalordyesta00000000000000/* * Common output functions for the evttools * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "evttools_i18n.h" #include "evttools_libbfio.h" #include "evttools_libcerror.h" #include "evttools_libfdatetime.h" #include "evttools_libfwnt.h" #include "evttools_libevt.h" #include "evttools_libuna.h" #include "evttools_output.h" /* Initializes output settings * Returns 1 if successful or -1 on error */ int evttools_output_initialize( int stdio_mode, libcerror_error_t **error ) { static char *function = "evttools_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 evtoutput_copyright_fprint( FILE *stream ) { if( stream == NULL ) { return; } /* TRANSLATORS: This is a proper name. */ fprintf( stream, _( "Copyright (C) 2011-2017, %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 version information */ void evtoutput_version_fprint( FILE *stream, const char *program ) { if( stream == NULL ) { return; } if( program == NULL ) { return; } fprintf( stream, "%s %s\n\n", program, LIBEVT_VERSION_STRING ); } /* Prints the detailed version information */ void evtoutput_version_detailed_fprint( FILE *stream, const char *program ) { if( stream == NULL ) { return; } if( program == NULL ) { return; } fprintf( stream, "%s %s (libevt %s", program, LIBEVT_VERSION_STRING, LIBEVT_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, ", libfwnt %s", LIBFWNT_VERSION_STRING ); fprintf( stream, ")\n\n" ); } libevt-20170120/evttools/evttools_libcnotify.h0000664000175000017500000000273213040331673023472 0ustar00lordyestalordyesta00000000000000/* * The internal libcnotify header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBCNOTIFY_H ) #define _EVTTOOLS_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( _EVTTOOLS_LIBCNOTIFY_H ) */ libevt-20170120/evttools/evtexport.c0000664000175000017500000003162513040332252021421 0ustar00lordyestalordyesta00000000000000/* * Extracts items from a Windows Event Log (EVT) file * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "evtinput.h" #include "evttools_getopt.h" #include "evttools_libcerror.h" #include "evttools_libclocale.h" #include "evttools_libcnotify.h" #include "evttools_libevt.h" #include "evttools_signal.h" #include "evttools_output.h" #include "evttools_unused.h" #include "export_handle.h" #include "log_handle.h" export_handle_t *evtexport_export_handle = NULL; int evtexport_abort = 0; /* Prints the executable usage information */ void usage_fprint( FILE *stream ) { if( stream == NULL ) { return; } fprintf( stream, "Use evtexport to export items stored in a Windows Event\n" "Log (EVT) file.\n\n" ); fprintf( stream, "Usage: evtexport [ -c codepage ] [ -l log_file ] [ -m mode ]\n" " [ -p resource_files_path ] [ -r registy_files_path ]\n" " [ -s system_file ] [ -S software_file ]\n" " [ -t event_log_type ] [ -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-949, windows-950,\n" "\t windows-1250, windows-1251, windows-1252 (default),\n" "\t windows-1253, windows-1254, windows-1255, windows-1256\n" "\t 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, items (default), recovered\n" "\t 'all' exports the (allocated) items and recovered items,\n" "\t 'items' exports the (allocated) items and 'recovered' exports\n" "\t the recovered items\n" ); fprintf( stream, "\t-p: search PATH for the resource files (default is the current\n" "\t working directory)\n" ); fprintf( stream, "\t-r: name of the directory containing the SOFTWARE and SYSTEM\n" "\t (Windows) Registry file\n" ); fprintf( stream, "\t-s: filename of the SYSTEM (Windows) Registry file.\n" "\t This option overrides the path provided by -r\n" ); fprintf( stream, "\t-S: filename of the SOFTWARE (Windows) Registry file.\n" "\t This option overrides the path provided by -r\n" ); fprintf( stream, "\t-t: event log type, options: application, security, system\n" "\t if not specified the event log type is determined based\n" "\t on the filename.\n" ); fprintf( stream, "\t-v: verbose output to stderr\n" ); fprintf( stream, "\t-V: print version\n" ); } /* Signal handler for evtexport */ void evtexport_signal_handler( evttools_signal_t signal EVTTOOLS_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "evtexport_signal_handler"; EVTTOOLS_UNREFERENCED_PARAMETER( signal ) evtexport_abort = 1; if( evtexport_export_handle != NULL ) { if( export_handle_signal_abort( evtexport_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 { libcerror_error_t *error = NULL; log_handle_t *log_handle = NULL; system_character_t *option_ascii_codepage = NULL; system_character_t *option_event_log_type = NULL; system_character_t *option_export_mode = NULL; system_character_t *option_log_filename = NULL; system_character_t *option_resource_files_path = NULL; system_character_t *option_preferred_language = NULL; system_character_t *option_registry_directory_name = NULL; system_character_t *option_software_registry_filename = NULL; system_character_t *option_system_registry_filename = NULL; system_character_t *source = NULL; char *program = "evtexport"; system_integer_t option = 0; int result = 0; int verbose = 0; libcnotify_stream_set( stderr, NULL ); libcnotify_verbose_set( 1 ); if( libclocale_initialize( "evttools", &error ) != 1 ) { fprintf( stderr, "Unable to initialize locale values.\n" ); goto on_error; } if( evttools_output_initialize( _IONBF, &error ) != 1 ) { fprintf( stderr, "Unable to initialize output settings.\n" ); goto on_error; } evtoutput_version_fprint( stdout, program ); while( ( option = evttools_getopt( argc, argv, _SYSTEM_STRING( "c:hl:m:p:r:s:S: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': option_log_filename = optarg; break; case (system_integer_t) 'm': option_export_mode = optarg; break; case (system_integer_t) 'p': option_resource_files_path = optarg; break; case (system_integer_t) 'r': option_registry_directory_name = optarg; break; case (system_integer_t) 's': option_system_registry_filename = optarg; break; case (system_integer_t) 'S': option_software_registry_filename = optarg; break; case (system_integer_t) 't': option_event_log_type = optarg; break; case (system_integer_t) 'v': verbose = 1; break; case (system_integer_t) 'V': evtoutput_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 ); libevt_notify_set_stream( stderr, NULL ); libevt_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( &evtexport_export_handle, &error ) != 1 ) { fprintf( stderr, "Unable to initialize export handle.\n" ); goto on_error; } if( option_ascii_codepage != NULL ) { result = export_handle_set_ascii_codepage( evtexport_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( option_event_log_type != NULL ) { result = export_handle_set_event_log_type( evtexport_export_handle, option_event_log_type, &error ); if( result == -1 ) { fprintf( stderr, "Unable to set event log type in export handle.\n" ); goto on_error; } } if( option_export_mode != NULL ) { result = export_handle_set_export_mode( evtexport_export_handle, option_export_mode, &error ); if( result == -1 ) { fprintf( stderr, "Unable to set export mode.\n" ); goto on_error; } else if( result == 0 ) { fprintf( stderr, "Unsupported export mode defaulting to: items.\n" ); } } if( ( option_event_log_type == NULL ) || ( result == 0 ) ) { result = export_handle_set_event_log_type_from_filename( evtexport_export_handle, source, &error ); if( result == -1 ) { fprintf( stderr, "Unable to set event log type from filename in export handle.\n" ); goto on_error; } } if( option_resource_files_path != NULL ) { if( export_handle_set_resource_files_path( evtexport_export_handle, option_resource_files_path, &error ) != 1 ) { fprintf( stderr, "Unable to set resource files path in export handle.\n" ); goto on_error; } } if( option_software_registry_filename != NULL ) { if( export_handle_set_software_registry_filename( evtexport_export_handle, option_software_registry_filename, &error ) != 1 ) { fprintf( stderr, "Unable to set software registry filename in export handle.\n" ); goto on_error; } } if( option_system_registry_filename != NULL ) { if( export_handle_set_system_registry_filename( evtexport_export_handle, option_system_registry_filename, &error ) != 1 ) { fprintf( stderr, "Unable to set system registry filename in export handle.\n" ); goto on_error; } } if( option_registry_directory_name != NULL ) { if( export_handle_set_registry_directory_name( evtexport_export_handle, option_registry_directory_name, &error ) != 1 ) { fprintf( stderr, "Unable to set registry directory name in export handle.\n" ); goto on_error; } } if( option_preferred_language != NULL ) { /* TODO set preferred language identifier from input */ if( export_handle_set_preferred_language_identifier( evtexport_export_handle, 0x0409, &error ) != 1 ) { fprintf( stderr, "Unable to set preferred language identifier in export handle.\n" ); goto on_error; } } if( log_handle_open( log_handle, option_log_filename, &error ) != 1 ) { fprintf( stderr, "Unable to open log file: %" PRIs_SYSTEM ".\n", option_log_filename ); goto on_error; } if( export_handle_open_input( evtexport_export_handle, source, &error ) != 1 ) { fprintf( stderr, "Unable to open: %" PRIs_SYSTEM ".\n", source ); goto on_error; } result = export_handle_export_file( evtexport_export_handle, log_handle, &error ); if( result == -1 ) { fprintf( stderr, "Unable to export file.\n" ); goto on_error; } if( export_handle_close_input( evtexport_export_handle, &error ) != 0 ) { fprintf( stderr, "Unable to close export handle.\n" ); goto on_error; } if( export_handle_free( &evtexport_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( result == 0 ) { fprintf( stdout, "No records to export.\n" ); } return( EXIT_SUCCESS ); on_error: if( error != NULL ) { libcnotify_print_error_backtrace( error ); libcerror_error_free( &error ); } if( evtexport_export_handle != NULL ) { export_handle_free( &evtexport_export_handle, NULL ); } if( log_handle != NULL ) { log_handle_free( &log_handle, NULL ); } return( EXIT_FAILURE ); } libevt-20170120/evttools/evttools_libuna.h0000664000175000017500000000330413040331673022576 0ustar00lordyestalordyesta00000000000000/* * The libuna header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBUNA_H ) #define _EVTTOOLS_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( _EVTTOOLS_LIBUNA_H ) */ libevt-20170120/evttools/evttools_libbfio.h0000664000175000017500000000332013040331673022730 0ustar00lordyestalordyesta00000000000000/* * The libbfio header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBBFIO_H ) #define _EVTTOOLS_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( _EVTTOOLS_LIBBFIO_H ) */ libevt-20170120/evttools/evttools_libfwnt.h0000664000175000017500000000316513040331673022776 0ustar00lordyestalordyesta00000000000000/* * The libfwnt header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBFWNT_H ) #define _EVTTOOLS_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 #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( _EVTTOOLS_LIBFWNT_H ) */ libevt-20170120/evttools/evttools_libcpath.h0000664000175000017500000000257613040331673023124 0ustar00lordyestalordyesta00000000000000/* * The internal libcpath header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBCPATH_H ) #define _EVTTOOLS_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( _EVTTOOLS_LIBCPATH_H ) */ libevt-20170120/evttools/Makefile.am0000664000175000017500000000604013040337602021246 0ustar00lordyestalordyesta00000000000000AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @LIBFCACHE_CPPFLAGS@ \ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFVALUE_CPPFLAGS@ \ @LIBFWEVT_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @LIBEXE_CPPFLAGS@ \ @LIBREGF_CPPFLAGS@ \ @LIBWRC_CPPFLAGS@ \ @LIBCDIRECTORY_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ \ @LIBEVT_DLL_IMPORT@ AM_LDFLAGS = @STATIC_LDFLAGS@ bin_PROGRAMS = \ evtexport \ evtinfo evtexport_SOURCES = \ export_handle.c export_handle.h \ evtexport.c \ evtinput.c evtinput.h \ evttools_getopt.c evttools_getopt.h \ evttools_i18n.h \ evttools_libbfio.h \ evttools_libcdirectory.h \ evttools_libcerror.h \ evttools_libclocale.h \ evttools_libcnotify.h \ evttools_libcpath.h \ evttools_libcsplit.h \ evttools_libfcache.h \ evttools_libfdatetime.h \ evttools_libfwnt.h \ evttools_libevt.h \ evttools_libexe.h \ evttools_libregf.h \ evttools_libuna.h \ evttools_libwrc.h \ evttools_output.c evttools_output.h \ evttools_signal.c evttools_signal.h \ evttools_system_split_string.h \ evttools_unused.h \ evttools_wide_string.c evttools_wide_string.h \ log_handle.c log_handle.h \ message_handle.c message_handle.h \ message_string.c message_string.h \ path_handle.c path_handle.h \ registry_file.c registry_file.h \ resource_file.c resource_file.h evtexport_LDADD = \ @LIBREGF_LIBADD@ \ @LIBWRC_LIBADD@ \ @LIBEXE_LIBADD@ \ @LIBFVALUE_LIBADD@ \ @LIBFWNT_LIBADD@ \ @LIBFWEVT_LIBADD@ \ @LIBFGUID_LIBADD@ \ @LIBFDATETIME_LIBADD@ \ @LIBFDATA_LIBADD@ \ @LIBFCACHE_LIBADD@ \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCDIRECTORY_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libevt/libevt.la \ @LIBCTHREADS_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBINTL@ \ @PTHREAD_LIBADD@ evtinfo_SOURCES = \ evtinfo.c \ evtinput.c evtinput.h \ evttools_getopt.c evttools_getopt.h \ evttools_i18n.h \ evttools_libcerror.h \ evttools_libclocale.h \ evttools_libcnotify.h \ evttools_libfdatetime.h \ evttools_libfwnt.h \ evttools_libevt.h \ evttools_libuna.h \ evttools_output.c evttools_output.h \ evttools_signal.c evttools_signal.h \ evttools_unused.h \ evttools_wide_string.c evttools_wide_string.h \ info_handle.c info_handle.h evtinfo_LDADD = \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ ../libevt/libevt.la \ @LIBCTHREADS_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBINTL@ \ @PTHREAD_LIBADD@ MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on evtexport ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(evtexport_SOURCES) @echo "Running splint on evtinfo ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(evtinfo_SOURCES) libevt-20170120/evttools/message_handle.c0000664000175000017500000030504013040331673022321 0ustar00lordyestalordyesta00000000000000/* * Message handle * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #if defined( TIME_WITH_SYS_TIME ) #include #include #elif defined( HAVE_SYS_TIME_H ) #include #else #include #endif #include "evttools_libcdirectory.h" #include "evttools_libcerror.h" #include "evttools_libcpath.h" #include "evttools_libcsplit.h" #include "evttools_libevt.h" #include "evttools_libfcache.h" #include "evttools_libregf.h" #include "evttools_libwrc.h" #include "evttools_system_split_string.h" #include "evttools_wide_string.h" #include "message_handle.h" #include "message_string.h" #include "path_handle.h" #include "registry_file.h" #include "resource_file.h" /* Creates a message handle * Make sure the value message_handle is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int message_handle_initialize( message_handle_t **message_handle, libcerror_error_t **error ) { static char *function = "message_handle_initialize"; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( *message_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid message handle value already set.", function ); return( -1 ); } *message_handle = memory_allocate_structure( message_handle_t ); if( *message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create message handle.", function ); goto on_error; } if( memory_set( *message_handle, 0, sizeof( message_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear message handle.", function ); memory_free( *message_handle ); *message_handle = NULL; return( -1 ); } if( path_handle_initialize( &( ( *message_handle )->path_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create path handle.", function ); goto on_error; } if( libfcache_cache_initialize( &( ( *message_handle )->resource_file_cache ), 16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create resource file cache.", function ); goto on_error; } if( libfcache_cache_initialize( &( ( *message_handle )->mui_resource_file_cache ), 16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create MUI resource file cache.", function ); goto on_error; } ( *message_handle )->ascii_codepage = LIBREGF_CODEPAGE_WINDOWS_1252; ( *message_handle )->preferred_language_identifier = 0x00000409UL; return( 1 ); on_error: if( *message_handle != NULL ) { if( ( *message_handle )->resource_file_cache != NULL ) { libfcache_cache_free( &( ( *message_handle )->resource_file_cache ), NULL ); } if( ( *message_handle )->path_handle != NULL ) { path_handle_free( &( ( *message_handle )->path_handle ), NULL ); } memory_free( *message_handle ); *message_handle = NULL; } return( -1 ); } /* Frees a message handle * Returns 1 if successful or -1 on error */ int message_handle_free( message_handle_t **message_handle, libcerror_error_t **error ) { static char *function = "message_handle_free"; int result = 1; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( *message_handle != NULL ) { if( ( *message_handle )->software_registry_filename != NULL ) { memory_free( ( *message_handle )->software_registry_filename ); } if( ( *message_handle )->system_registry_filename != NULL ) { memory_free( ( *message_handle )->system_registry_filename ); } if( ( *message_handle )->registry_directory_name != NULL ) { memory_free( ( *message_handle )->registry_directory_name ); } if( ( *message_handle )->software_registry_file != NULL ) { if( registry_file_free( &( ( *message_handle )->software_registry_file ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free software registry file.", function ); result = -1; } } if( ( *message_handle )->system_root_path != NULL ) { memory_free( ( *message_handle )->system_root_path ); } if( ( *message_handle )->windows_directory_path != NULL ) { memory_free( ( *message_handle )->windows_directory_path ); } if( ( *message_handle )->system_registry_file != NULL ) { if( registry_file_free( &( ( *message_handle )->system_registry_file ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free system registry file.", function ); result = -1; } } if( path_handle_free( &( ( *message_handle )->path_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free path handle.", function ); result = -1; } if( libfcache_cache_free( &( ( *message_handle )->resource_file_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free resource file cache.", function ); result = -1; } if( libfcache_cache_free( &( ( *message_handle )->mui_resource_file_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free MUI resource file cache.", function ); result = -1; } if( ( *message_handle )->winevt_publishers_key != NULL ) { if( libregf_key_free( &( ( *message_handle )->winevt_publishers_key ), NULL ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free winevt publishers key.", function ); result = -1; } } if( ( *message_handle )->control_set_1_eventlog_services_key != NULL ) { if( libregf_key_free( &( ( *message_handle )->control_set_1_eventlog_services_key ), NULL ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free control set 1 eventlog services key.", function ); result = -1; } } if( ( *message_handle )->control_set_2_eventlog_services_key != NULL ) { if( libregf_key_free( &( ( *message_handle )->control_set_2_eventlog_services_key ), NULL ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free control set 2 key.", function ); result = -1; } } memory_free( *message_handle ); *message_handle = NULL; } return( result ); } /* Signals the message handle to abort * Returns 1 if successful or -1 on error */ int message_handle_signal_abort( message_handle_t *message_handle, libcerror_error_t **error ) { static char *function = "message_handle_signal_abort"; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( message_handle->software_registry_file != NULL ) { if( registry_file_signal_abort( message_handle->software_registry_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to signal software registry file to abort.", function ); return( -1 ); } } if( message_handle->system_registry_file != NULL ) { if( registry_file_signal_abort( message_handle->system_registry_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to signal system registry file to abort.", function ); return( -1 ); } } return( 1 ); } /* Sets the ascii codepage * Returns 1 if successful or -1 on error */ int message_handle_set_ascii_codepage( message_handle_t *message_handle, int ascii_codepage, libcerror_error_t **error ) { static char *function = "message_handle_set_ascii_codepage"; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } message_handle->ascii_codepage = ascii_codepage; return( 1 ); } /* Sets the preferred language identifier * Returns 1 if successful or -1 on error */ int message_handle_set_preferred_language_identifier( message_handle_t *message_handle, uint32_t preferred_language_identifier, libcerror_error_t **error ) { static char *function = "message_handle_set_preferred_language_identifier"; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } message_handle->preferred_language_identifier = preferred_language_identifier; return( 1 ); } /* Sets the name of the software registry file * Returns 1 if successful or -1 error */ int message_handle_set_software_registry_filename( message_handle_t *message_handle, const system_character_t *filename, libcerror_error_t **error ) { static char *function = "message_handle_set_software_registry_filename"; size_t filename_length = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", 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 ); } filename_length = system_string_length( filename ); if( filename_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid filename length value out of bounds.", function ); goto on_error; } if( message_handle->software_registry_filename != NULL ) { memory_free( message_handle->software_registry_filename ); message_handle->software_registry_filename = NULL; } message_handle->software_registry_filename_size = filename_length + 1; message_handle->software_registry_filename = system_string_allocate( message_handle->software_registry_filename_size ); if( message_handle->software_registry_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create software registry filename.", function ); goto on_error; } if( system_string_copy( message_handle->software_registry_filename, filename, filename_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy software registry filename.", function ); goto on_error; } ( message_handle->software_registry_filename )[ filename_length ] = 0; return( 1 ); on_error: if( message_handle->software_registry_filename != NULL ) { memory_free( message_handle->software_registry_filename ); message_handle->software_registry_filename = NULL; } message_handle->software_registry_filename_size = 0; return( -1 ); } /* Sets the name of the system registry file * Returns 1 if successful or -1 error */ int message_handle_set_system_registry_filename( message_handle_t *message_handle, const system_character_t *filename, libcerror_error_t **error ) { static char *function = "message_handle_set_system_registry_filename"; size_t filename_length = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", 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 ); } filename_length = system_string_length( filename ); if( filename_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid filename length value out of bounds.", function ); goto on_error; } if( message_handle->system_registry_filename != NULL ) { memory_free( message_handle->system_registry_filename ); message_handle->system_registry_filename = NULL; } message_handle->system_registry_filename_size = filename_length + 1; message_handle->system_registry_filename = system_string_allocate( message_handle->system_registry_filename_size ); if( message_handle->system_registry_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create system registry filename.", function ); goto on_error; } if( system_string_copy( message_handle->system_registry_filename, filename, filename_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy system registry filename.", function ); goto on_error; } ( message_handle->system_registry_filename )[ filename_length ] = 0; return( 1 ); on_error: if( message_handle->system_registry_filename != NULL ) { memory_free( message_handle->system_registry_filename ); message_handle->system_registry_filename = NULL; } message_handle->system_registry_filename_size = 0; return( -1 ); } /* Sets the name of the directory containing the software and system registry file * Returns 1 if successful or -1 error */ int message_handle_set_registry_directory_name( message_handle_t *message_handle, const system_character_t *name, libcerror_error_t **error ) { static char *function = "message_handle_set_registry_directory_name"; size_t name_length = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message 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 ); } name_length = system_string_length( name ); if( name_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid name length value out of bounds.", function ); goto on_error; } if( message_handle->registry_directory_name != NULL ) { memory_free( message_handle->registry_directory_name ); message_handle->registry_directory_name = NULL; } message_handle->registry_directory_name_size = name_length + 1; message_handle->registry_directory_name = system_string_allocate( message_handle->registry_directory_name_size ); if( message_handle->registry_directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create registry directory name.", function ); goto on_error; } if( system_string_copy( message_handle->registry_directory_name, name, name_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy registry directory name.", function ); goto on_error; } ( message_handle->registry_directory_name )[ name_length ] = 0; return( 1 ); on_error: if( message_handle->registry_directory_name != NULL ) { memory_free( message_handle->registry_directory_name ); message_handle->registry_directory_name = NULL; } message_handle->registry_directory_name_size = 0; return( -1 ); } /* Sets the resource files (search) path * Returns 1 if successful or -1 error */ int message_handle_set_resource_files_path( message_handle_t *message_handle, const system_character_t *path, libcerror_error_t **error ) { static char *function = "message_handle_set_resource_files_path"; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } message_handle->resource_files_path = path; return( 1 ); } /* Opens the software registry file * Returns 1 if successful, 0 if not available or -1 on error */ int message_handle_open_software_registry_file( message_handle_t *message_handle, libcerror_error_t **error ) { system_character_t *key_path = NULL; system_character_t *software_filename = NULL; libregf_key_t *sub_key = NULL; libregf_value_t *value = NULL; const char *sub_key_path = NULL; const char *value_name = NULL; static char *function = "message_handle_open_software_registry_file"; size_t key_path_length = 0; size_t value_name_length = 0; int result = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( ( message_handle->software_registry_filename == NULL ) && ( message_handle->registry_directory_name != NULL ) ) { software_filename = system_string_allocate( 9 ); if( software_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create software filename.", function ); goto on_error; } if( system_string_copy( software_filename, _SYSTEM_STRING( "SOFTWARE" ), 8 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to set software filename.", function ); goto on_error; } software_filename[ 8 ] = 0; result = path_handle_get_directory_entry_name_by_name_no_case( message_handle->path_handle, message_handle->registry_directory_name, message_handle->registry_directory_name_size - 1, software_filename, 9, LIBCDIRECTORY_ENTRY_TYPE_FILE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if directory has entry: %" PRIs_SYSTEM ".", function, software_filename ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libcpath_path_join_wide( &( message_handle->software_registry_filename ), &( message_handle->software_registry_filename_size ), message_handle->registry_directory_name, message_handle->registry_directory_name_size - 1, software_filename, 8, error ); #else result = libcpath_path_join( &( message_handle->software_registry_filename ), &( message_handle->software_registry_filename_size ), message_handle->registry_directory_name, message_handle->registry_directory_name_size - 1, software_filename, 8, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create software registry filename.", function ); return( -1 ); } memory_free( software_filename ); software_filename = NULL; } if( message_handle->software_registry_filename != NULL ) { if( registry_file_initialize( &( message_handle->software_registry_file ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize software registry file.", function ); return( -1 ); } if( registry_file_set_ascii_codepage( message_handle->software_registry_file, message_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set ASCII codepage in software registry file.", function ); return( -1 ); } if( registry_file_open( message_handle->software_registry_file, message_handle->software_registry_filename, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open software registry file.", function ); return( -1 ); } /* Get the value of %SystemRoot% from: * SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRoot */ key_path = _SYSTEM_STRING( "Microsoft\\Windows NT\\CurrentVersion" ); key_path_length = system_string_length( key_path ); result = registry_file_get_key_by_path( message_handle->software_registry_file, key_path, key_path_length, &sub_key, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key: %" PRIs_SYSTEM ".", function, sub_key_path ); goto on_error; } else if( result != 0 ) { value_name = "SystemRoot"; value_name_length = narrow_string_length( value_name ); result = libregf_key_get_value_by_utf8_name( sub_key, (uint8_t *) value_name, value_name_length, &value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %s.", function, value_name ); goto on_error; } else if( result != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libregf_value_get_value_utf16_string_size( value, &( message_handle->system_root_path_size ), error ); #else result = libregf_value_get_value_utf8_string_size( value, &( message_handle->system_root_path_size ), error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %s string size.", function, value_name ); goto on_error; } if( ( result != 0 ) && ( message_handle->system_root_path_size > 0 ) ) { if( ( message_handle->system_root_path_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * message_handle->system_root_path_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system root path string size value exceeds maximum.", function ); goto on_error; } message_handle->system_root_path = system_string_allocate( message_handle->system_root_path_size ); if( message_handle->system_root_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create system root path string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libregf_value_get_value_utf16_string( value, (uint16_t *) message_handle->system_root_path, message_handle->system_root_path_size, error ); #else result = libregf_value_get_value_utf8_string( value, (uint8_t *) message_handle->system_root_path, message_handle->system_root_path_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %s string.", function, value_name ); memory_free( message_handle->system_root_path ); message_handle->system_root_path = NULL; message_handle->system_root_path_size = 0; goto on_error; } } if( libregf_value_free( &value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); goto on_error; } } } if( libregf_key_free( &sub_key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub key.", function ); goto on_error; } } /* Check if %SystemRoot% contains a sane value */ /* TODO what if system root constists of multiple paths */ if( message_handle->system_root_path != NULL ) { if( ( message_handle->system_root_path_size < 4 ) || ( ( message_handle->system_root_path )[ 1 ] != (system_character_t) ':' ) || ( ( message_handle->system_root_path )[ 2 ] != (system_character_t) '\\' ) ) { memory_free( message_handle->system_root_path ); message_handle->system_root_path = NULL; message_handle->system_root_path_size = 0; } } /* If no usable %SystemRoot% was found use the default: C:\Windows */ if( message_handle->system_root_path == NULL ) { message_handle->system_root_path_size = 11; message_handle->system_root_path = system_string_allocate( message_handle->system_root_path_size ); if( message_handle->system_root_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create system root path string.", function ); goto on_error; } if( system_string_copy( message_handle->system_root_path, _SYSTEM_STRING( "C:\\Windows" ), 10 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy default value to system root path string.", function ); memory_free( message_handle->system_root_path ); message_handle->system_root_path = NULL; message_handle->system_root_path_size = 0; goto on_error; } ( message_handle->system_root_path )[ 10 ] = 0; } /* TODO for now %WinDir% is a copy of %SystemRoot% */ if( message_handle->windows_directory_path == NULL ) { message_handle->windows_directory_path_size = message_handle->system_root_path_size; message_handle->windows_directory_path = system_string_allocate( message_handle->windows_directory_path_size ); if( message_handle->windows_directory_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create windows directory path string.", function ); goto on_error; } if( system_string_copy( message_handle->windows_directory_path, message_handle->system_root_path, message_handle->windows_directory_path_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy default value to windows directory path string.", function ); memory_free( message_handle->windows_directory_path ); message_handle->windows_directory_path = NULL; message_handle->windows_directory_path_size = 0; goto on_error; } ( message_handle->windows_directory_path )[ message_handle->windows_directory_path_size - 1 ] = 0; } return( 1 ); on_error: if( value != NULL ) { libregf_value_free( &value, NULL ); } if( sub_key != NULL ) { libregf_key_free( &sub_key, NULL ); } if( software_filename != NULL ) { memory_free( software_filename ); } return( -1 ); } /* Opens the system registry file * Returns 1 if successful, 0 if not available or -1 on error */ int message_handle_open_system_registry_file( message_handle_t *message_handle, const char *eventlog_key_name, libcerror_error_t **error ) { system_character_t *key_path = NULL; system_character_t *system_filename = NULL; libregf_key_t *sub_key = NULL; static char *function = "message_handle_open_system_registry_file"; size_t eventlog_key_name_length = 0; size_t key_path_length = 0; int result = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( eventlog_key_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid eventlog key name.", function ); return( -1 ); } eventlog_key_name_length = narrow_string_length( eventlog_key_name ); if( ( message_handle->system_registry_filename == NULL ) && ( message_handle->registry_directory_name != NULL ) ) { system_filename = system_string_allocate( 7 ); if( system_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create system filename.", function ); goto on_error; } if( system_string_copy( system_filename, _SYSTEM_STRING( "SYSTEM" ), 6 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to set system filename.", function ); goto on_error; } system_filename[ 6 ] = 0; result = path_handle_get_directory_entry_name_by_name_no_case( message_handle->path_handle, message_handle->registry_directory_name, message_handle->registry_directory_name_size - 1, system_filename, 7, LIBCDIRECTORY_ENTRY_TYPE_FILE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if directory has entry: %" PRIs_SYSTEM ".", function, system_filename ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libcpath_path_join_wide( &( message_handle->system_registry_filename ), &( message_handle->system_registry_filename_size ), message_handle->registry_directory_name, message_handle->registry_directory_name_size - 1, system_filename, 6, error ); #else result = libcpath_path_join( &( message_handle->system_registry_filename ), &( message_handle->system_registry_filename_size ), message_handle->registry_directory_name, message_handle->registry_directory_name_size - 1, system_filename, 6, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create system registry filename.", function ); return( -1 ); } memory_free( system_filename ); system_filename = NULL; } if( message_handle->system_registry_filename == NULL ) { return( 0 ); } if( registry_file_initialize( &( message_handle->system_registry_file ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize system registry file.", function ); return( -1 ); } if( registry_file_set_ascii_codepage( message_handle->system_registry_file, message_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set ASCII codepage in system registry file.", function ); return( -1 ); } if( registry_file_open( message_handle->system_registry_file, message_handle->system_registry_filename, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open system registry file.", function ); return( -1 ); } /* Get the winevt providers key * SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers */ key_path = _SYSTEM_STRING( "Microsoft\\Windows\\CurrentVersion\\WINEVT\\Publishers" ); key_path_length = system_string_length( key_path ); result = registry_file_get_key_by_path( message_handle->software_registry_file, key_path, key_path_length, &( message_handle->winevt_publishers_key ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key: %" PRIs_SYSTEM ".", function, key_path ); goto on_error; } /* Get the control set 1 eventlog services key: * SYSTEM\ControlSet001\Services\Eventlog */ key_path = _SYSTEM_STRING( "ControlSet001\\Services\\Eventlog" ); key_path_length = system_string_length( key_path ); result = registry_file_get_key_by_path( message_handle->system_registry_file, key_path, key_path_length, &sub_key, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key: %" PRIs_SYSTEM ".", function, key_path ); goto on_error; } else if( result != 0 ) { result = libregf_key_get_sub_key_by_utf8_name( sub_key, (uint8_t *) eventlog_key_name, eventlog_key_name_length, &( message_handle->control_set_1_eventlog_services_key ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key: %s.", function, eventlog_key_name ); goto on_error; } } if( libregf_key_free( &sub_key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub key.", function ); goto on_error; } /* Get the control set 2 eventlog services key: * SYSTEM\ControlSet002\Services\Eventlog */ key_path = _SYSTEM_STRING( "ControlSet002\\Services\\Eventlog" ); key_path_length = system_string_length( key_path ); result = registry_file_get_key_by_path( message_handle->system_registry_file, key_path, key_path_length, &sub_key, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key: %" PRIs_SYSTEM ".", function, key_path ); goto on_error; } else if( result != 0 ) { result = libregf_key_get_sub_key_by_utf8_name( sub_key, (uint8_t *) eventlog_key_name, eventlog_key_name_length, &( message_handle->control_set_2_eventlog_services_key ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key: %s.", function, eventlog_key_name ); goto on_error; } } if( libregf_key_free( &sub_key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub key.", function ); goto on_error; } return( 1 ); on_error: if( sub_key != NULL ) { libregf_key_free( &sub_key, NULL ); } if( system_filename != NULL ) { memory_free( system_filename ); } return( -1 ); } /* Opens the input * Returns 1 if successful or -1 on error */ int message_handle_open_input( message_handle_t *message_handle, const char *eventlog_key_name, libcerror_error_t **error ) { static char *function = "message_handle_open_input"; int result = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } result = message_handle_open_software_registry_file( message_handle, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open software registry file.", function ); return( -1 ); } result = message_handle_open_system_registry_file( message_handle, eventlog_key_name, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open system registry file.", function ); return( -1 ); } return( 1 ); } /* Closes the input * Returns the 0 if succesful or -1 on error */ int message_handle_close_input( message_handle_t *message_handle, libcerror_error_t **error ) { static char *function = "message_handle_close_input"; int result = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( message_handle->software_registry_file != NULL ) { if( registry_file_close( message_handle->software_registry_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close software registry file.", function ); result = -1; } } if( message_handle->system_registry_file != NULL ) { if( registry_file_close( message_handle->system_registry_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close system registry file.", function ); result = -1; } } if( libfcache_cache_empty( message_handle->resource_file_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty resource file cache.", function ); result = -1; } if( libfcache_cache_empty( message_handle->mui_resource_file_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty MUI resource file cache.", function ); result = -1; } return( result ); } /* Retrieves a value for a specific event source * The value is retrieved from the event source key in the SYSTEM Windows Registry File if available * Returns 1 if successful, 0 if such event source or -1 error */ int message_handle_get_value_by_event_source( message_handle_t *message_handle, const system_character_t *event_source, size_t event_source_length, const system_character_t *value_name, size_t value_name_length, system_character_t **value_string, size_t *value_string_size, libcerror_error_t **error ) { libregf_key_t *key = NULL; libregf_value_t *value = NULL; static char *function = "message_handle_get_value_by_event_source"; int result = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value string.", function ); return( -1 ); } if( *value_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid value string value already set.", function ); return( -1 ); } if( value_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value string size.", function ); return( -1 ); } if( message_handle->control_set_1_eventlog_services_key != NULL ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libregf_key_get_sub_key_by_utf16_name( message_handle->control_set_1_eventlog_services_key, (uint16_t *) event_source, event_source_length, &key, error ); #else result = libregf_key_get_sub_key_by_utf8_name( message_handle->control_set_1_eventlog_services_key, (uint8_t *) event_source, event_source_length, &key, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key: %" PRIs_SYSTEM ".", function, event_source ); goto on_error; } } if( result == 0 ) { if( message_handle->control_set_2_eventlog_services_key != NULL ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libregf_key_get_sub_key_by_utf16_name( message_handle->control_set_2_eventlog_services_key, (uint16_t *) event_source, event_source_length, &key, error ); #else result = libregf_key_get_sub_key_by_utf8_name( message_handle->control_set_2_eventlog_services_key, (uint8_t *) event_source, event_source_length, &key, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key: %" PRIs_SYSTEM ".", function, event_source ); goto on_error; } } } if( result != 0 ) { result = libregf_key_get_value_by_utf8_name( key, (uint8_t *) value_name, value_name_length, &value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %" PRIs_SYSTEM ".", function, value_name ); goto on_error; } else if( result != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libregf_value_get_value_utf16_string_size( value, value_string_size, error ); #else result = libregf_value_get_value_utf8_string_size( 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 value string size.", function ); goto on_error; } if( *value_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value string.", 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 = libregf_value_get_value_utf16_string( value, (uint16_t *) *value_string, *value_string_size, error ); #else result = libregf_value_get_value_utf8_string( 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.", function ); goto on_error; } if( libregf_value_free( &value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); goto on_error; } } if( libregf_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; } } return( result ); on_error: if( value != NULL ) { libregf_value_free( &value, NULL ); } if( key != NULL ) { libregf_key_free( &key, NULL ); } if( *value_string != NULL ) { memory_free( *value_string ); *value_string = NULL; } *value_string_size = 0; return( -1 ); } /* Retrieves a value for a specific provider identifier * The value is retrieved from the WINEVT provider key in the SOFTWARE Windows Registry File if available * Returns 1 if successful, 0 if such event source or -1 error */ int message_handle_get_value_by_provider_identifier( message_handle_t *message_handle, const system_character_t *provider_identifier, size_t provider_identifier_length, const system_character_t *value_name, size_t value_name_length, system_character_t **value_string, size_t *value_string_size, libcerror_error_t **error ) { libregf_key_t *key = NULL; libregf_value_t *value = NULL; static char *function = "message_handle_get_value_by_provider_identifier"; int result = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value string.", function ); return( -1 ); } if( *value_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid value string value already set.", function ); return( -1 ); } if( value_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value string size.", function ); return( -1 ); } if( message_handle->winevt_publishers_key != NULL ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libregf_key_get_sub_key_by_utf16_name( message_handle->winevt_publishers_key, (uint16_t *) provider_identifier, provider_identifier_length, &key, error ); #else result = libregf_key_get_sub_key_by_utf8_name( message_handle->winevt_publishers_key, (uint8_t *) provider_identifier, provider_identifier_length, &key, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key: %" PRIs_SYSTEM ".", function, provider_identifier ); goto on_error; } } if( result != 0 ) { result = libregf_key_get_value_by_utf8_name( key, (uint8_t *) value_name, value_name_length, &value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %" PRIs_SYSTEM ".", function, value_name ); goto on_error; } else if( result != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libregf_value_get_value_utf16_string_size( value, value_string_size, error ); #else result = libregf_value_get_value_utf8_string_size( 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 value string size.", function ); goto on_error; } if( *value_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value string.", 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 = libregf_value_get_value_utf16_string( value, (uint16_t *) *value_string, *value_string_size, error ); #else result = libregf_value_get_value_utf8_string( 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.", function ); goto on_error; } if( libregf_value_free( &value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); goto on_error; } } if( libregf_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; } } return( result ); on_error: if( value != NULL ) { libregf_value_free( &value, NULL ); } if( key != NULL ) { libregf_key_free( &key, NULL ); } if( *value_string != NULL ) { memory_free( *value_string ); *value_string = NULL; } *value_string_size = 0; return( -1 ); } /* Retrieves the path of the resource file based on the resource filename * Returns 1 if successful, 0 if not available or -1 error */ int message_handle_get_resource_file_path( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, const system_character_t *language_string, size_t language_string_length, system_character_t **resource_file_path, size_t *resource_file_path_size, libcerror_error_t **error ) { system_character_t *resource_filename_string_segment = NULL; system_character_t *mui_string = NULL; system_split_string_t *resource_filename_split_string = NULL; static char *function = "message_handle_get_resource_file_path"; size_t resource_file_path_index = 0; size_t resource_files_path_length = 0; size_t resource_filename_directory_name_index = 0; size_t resource_filename_string_segment_size = 0; size_t mui_string_size = 0; uint8_t directory_entry_type = 0; int resource_filename_number_of_segments = 0; int resource_filename_segment_index = 0; int result = 0; #if defined( WINAPI ) const system_character_t *volume_letter = NULL; #endif if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( message_handle->system_root_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid message handle - missing system root path.", function ); goto on_error; } if( ( message_handle->system_root_path_size < 4 ) || ( message_handle->system_root_path_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid message handle - system root path size value out of bounds.", function ); return( -1 ); } if( resource_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource filename.", function ); return( -1 ); } if( resource_filename_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid resource filename length is zero.", function ); return( -1 ); } if( resource_filename_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid resource filename length value exceeds maximum.", function ); return( -1 ); } if( language_string != NULL ) { if( language_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid language string length value exceeds maximum.", function ); return( -1 ); } } if( resource_file_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file path.", function ); return( -1 ); } if( *resource_file_path != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid resource file path value already set.", function ); return( -1 ); } if( resource_file_path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file path size.", function ); return( -1 ); } if( resource_filename_length > 2 ) { /* Check if the resource filename starts with a volume letter */ if( ( resource_filename[ 1 ] == (system_character_t) ':' ) && ( ( ( resource_filename[ 0 ] >= (system_character_t) 'A' ) && ( resource_filename[ 0 ] <= (system_character_t) 'Z' ) ) || ( ( resource_filename[ 0 ] >= (system_character_t) 'a' ) && ( resource_filename[ 0 ] <= (system_character_t) 'z' ) ) ) ) { resource_filename_directory_name_index = 2; if( ( resource_filename_length >= 3 ) && ( resource_filename[ 2 ] == (system_character_t) '\\' ) ) { resource_filename_directory_name_index += 1; } #if defined( WINAPI ) volume_letter = resource_filename; #endif } } if( system_string_split( &( resource_filename[ resource_filename_directory_name_index ] ), resource_filename_length - resource_filename_directory_name_index + 1, (system_character_t) '\\', &resource_filename_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split resource filename.", function ); goto on_error; } if( system_split_string_get_number_of_segments( resource_filename_split_string, &resource_filename_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of resource filename string segments.", function ); goto on_error; } *resource_file_path_size = 0; for( resource_filename_segment_index = 0; resource_filename_segment_index < resource_filename_number_of_segments; resource_filename_segment_index++ ) { if( system_split_string_get_segment_by_index( resource_filename_split_string, resource_filename_segment_index, &resource_filename_string_segment, &resource_filename_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource filename string segment: %d.", function, resource_filename_segment_index ); goto on_error; } if( resource_filename_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing resource filename string segment: %d.", function, resource_filename_segment_index ); goto on_error; } if( resource_filename_string_segment_size == 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported empty resource filename string segment: %d.", function, resource_filename_segment_index ); goto on_error; } else if( ( resource_filename_string_segment_size == 2 ) && ( resource_filename_string_segment[ 0 ] == (system_character_t) '.' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported relative path in resource filename string segment: %d.", function, resource_filename_segment_index ); goto on_error; } else if( ( resource_filename_string_segment_size == 3 ) && ( resource_filename_string_segment[ 0 ] == (system_character_t) '.' ) && ( resource_filename_string_segment[ 1 ] == (system_character_t) '.' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported relative path in resource filename string segment: %d.", function, resource_filename_segment_index ); goto on_error; } else if( ( resource_filename_string_segment[ 0 ] == (system_character_t) '%' ) && ( resource_filename_string_segment[ resource_filename_string_segment_size - 2 ] == (system_character_t) '%' ) ) { if( resource_filename_string_segment_size == 9 ) { /* Expand %WinDir% to WINDOWS */ if( system_string_compare_no_case( resource_filename_string_segment, _SYSTEM_STRING( "%WinDir%" ), 8 ) == 0 ) { resource_filename_string_segment_size = 8; #if defined( WINAPI ) volume_letter = message_handle->windows_directory_path; #endif } } else if( resource_filename_string_segment_size == 13 ) { /* Expand %SystemRoot% */ if( system_string_compare_no_case( resource_filename_string_segment, _SYSTEM_STRING( "%SystemRoot%" ), 12 ) == 0 ) { resource_filename_string_segment_size = message_handle->system_root_path_size - 3; #if defined( WINAPI ) volume_letter = message_handle->system_root_path; #endif } } } *resource_file_path_size += resource_filename_string_segment_size; } if( language_string != NULL ) { /* Add: /.mui */ *resource_file_path_size += language_string_length + 5; } if( message_handle->resource_files_path != NULL ) { resource_files_path_length = system_string_length( message_handle->resource_files_path ); } if( ( message_handle->resource_files_path != NULL ) && ( resource_files_path_length > 0 ) ) { *resource_file_path_size += resource_files_path_length; if( message_handle->resource_files_path[ resource_files_path_length - 1 ] != (system_character_t) LIBCPATH_SEPARATOR ) { *resource_file_path_size += 1; } } #if defined( WINAPI ) else if( volume_letter != NULL ) { *resource_file_path_size += 3; } #endif else { *resource_file_path_size += 2; } *resource_file_path_size += 1; *resource_file_path = system_string_allocate( *resource_file_path_size ); if( *resource_file_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource file path.", function ); goto on_error; } resource_file_path_index = 0; if( ( message_handle->resource_files_path != NULL ) && ( resource_files_path_length > 0 ) ) { if( system_string_copy( &( ( *resource_file_path )[ resource_file_path_index ] ), message_handle->resource_files_path, resource_files_path_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy resource files path to resource file path.", function ); goto on_error; } resource_file_path_index += resource_files_path_length; if( message_handle->resource_files_path[ resource_files_path_length - 1 ] != (system_character_t) LIBCPATH_SEPARATOR ) { ( *resource_file_path )[ resource_file_path_index++ ] = (system_character_t) LIBCPATH_SEPARATOR; } } #if defined( WINAPI ) else if( volume_letter != NULL ) { ( *resource_file_path )[ resource_file_path_index++ ] = volume_letter[ 0 ]; ( *resource_file_path )[ resource_file_path_index++ ] = (system_character_t) ':'; ( *resource_file_path )[ resource_file_path_index++ ] = (system_character_t) LIBCPATH_SEPARATOR; } #endif else { ( *resource_file_path )[ resource_file_path_index++ ] = (system_character_t) '.'; ( *resource_file_path )[ resource_file_path_index++ ] = (system_character_t) LIBCPATH_SEPARATOR; } for( resource_filename_segment_index = 0; resource_filename_segment_index < resource_filename_number_of_segments; resource_filename_segment_index++ ) { if( ( language_string != NULL ) && ( resource_filename_segment_index == ( resource_filename_number_of_segments - 1 ) ) ) { /* Make a copy of the language string so it can be written to */ mui_string_size = language_string_length + 1; mui_string = system_string_allocate( mui_string_size ); if( mui_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create MUI language string.", function ); goto on_error; } if( system_string_copy( mui_string, language_string, language_string_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy MUI language string.", function ); goto on_error; } mui_string[ language_string_length ] = 0; ( *resource_file_path )[ resource_file_path_index ] = 0; result = path_handle_get_directory_entry_name_by_name_no_case( message_handle->path_handle, *resource_file_path, resource_file_path_index + 1, mui_string, mui_string_size, LIBCDIRECTORY_ENTRY_TYPE_DIRECTORY, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if directory has entry: %" PRIs_SYSTEM ".", function, mui_string ); goto on_error; } else if( result != 0 ) { if( system_string_copy( &( ( *resource_file_path )[ resource_file_path_index ] ), mui_string, language_string_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set MUI language string in resource file path.", function ); goto on_error; } resource_file_path_index += language_string_length; ( *resource_file_path )[ resource_file_path_index++ ] = (system_character_t) LIBCPATH_SEPARATOR; } memory_free( mui_string ); mui_string = NULL; if( result == 0 ) { break; } } if( system_split_string_get_segment_by_index( resource_filename_split_string, resource_filename_segment_index, &resource_filename_string_segment, &resource_filename_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource filename string segment: %d.", function, resource_filename_segment_index ); goto on_error; } if( resource_filename_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing resource filename string segment: %d.", function, resource_filename_segment_index ); goto on_error; } if( ( resource_filename_string_segment[ 0 ] == (system_character_t) '%' ) && ( resource_filename_string_segment[ resource_filename_string_segment_size - 2 ] == (system_character_t) '%' ) ) { if( resource_filename_string_segment_size == 9 ) { /* Expand %WinDir% */ if( system_string_compare_no_case( resource_filename_string_segment, _SYSTEM_STRING( "%WinDir%" ), 8 ) == 0 ) { resource_filename_string_segment = &( ( message_handle->windows_directory_path )[ 3 ] ); resource_filename_string_segment_size = message_handle->windows_directory_path_size - 3; } } else if( resource_filename_string_segment_size == 13 ) { /* Expand %SystemRoot% */ if( system_string_compare_no_case( resource_filename_string_segment, _SYSTEM_STRING( "%SystemRoot%" ), 12 ) == 0 ) { resource_filename_string_segment = &( ( message_handle->system_root_path )[ 3 ] ); resource_filename_string_segment_size = message_handle->system_root_path_size - 3; } } } if( resource_filename_segment_index < ( resource_filename_number_of_segments - 1 ) ) { directory_entry_type = LIBCDIRECTORY_ENTRY_TYPE_DIRECTORY; } else { if( language_string != NULL ) { /* Add .mui to the filename */ mui_string = system_string_allocate( resource_filename_string_segment_size + 4 ); if( mui_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create MUI resource filename string.", function ); goto on_error; } resource_filename_string_segment_size--; if( system_string_copy( mui_string, resource_filename_string_segment, resource_filename_string_segment_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy MUI resource filename string.", function ); goto on_error; } mui_string[ resource_filename_string_segment_size++ ] = (system_character_t) '.'; mui_string[ resource_filename_string_segment_size++ ] = (system_character_t) 'm'; mui_string[ resource_filename_string_segment_size++ ] = (system_character_t) 'u'; mui_string[ resource_filename_string_segment_size++ ] = (system_character_t) 'i'; mui_string[ resource_filename_string_segment_size++ ] = 0; resource_filename_string_segment = mui_string; } directory_entry_type = LIBCDIRECTORY_ENTRY_TYPE_FILE; } ( *resource_file_path )[ resource_file_path_index ] = 0; result = path_handle_get_directory_entry_name_by_name_no_case( message_handle->path_handle, *resource_file_path, resource_file_path_index + 1, resource_filename_string_segment, resource_filename_string_segment_size, directory_entry_type, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if directory has entry: %" PRIs_SYSTEM ".", function, resource_filename_string_segment ); goto on_error; } else if( result != 0 ) { if( system_string_copy( &( ( *resource_file_path )[ resource_file_path_index ] ), resource_filename_string_segment, resource_filename_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set resource filename string segment: %d in resource file path.", function, resource_filename_segment_index ); goto on_error; } resource_file_path_index += resource_filename_string_segment_size - 1; ( *resource_file_path )[ resource_file_path_index++ ] = (system_character_t) LIBCPATH_SEPARATOR; } if( mui_string != NULL ) { memory_free( mui_string ); mui_string = NULL; } if( result == 0 ) { break; } } ( *resource_file_path )[ resource_file_path_index - 1 ] = 0; if( system_split_string_free( &resource_filename_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free resource filename split string.", function ); goto on_error; } return( result ); on_error: if( mui_string != NULL ) { memory_free( mui_string ); } if( resource_filename_split_string != NULL ) { system_split_string_free( &resource_filename_split_string, NULL ); } if( *resource_file_path != NULL ) { memory_free( *resource_file_path ); *resource_file_path = NULL; } *resource_file_path_size = 0; return( -1 ); } /* Retrieves a specific resource file and adds it to the cache * Returns 1 if successful, 0 if resource file was not found or -1 error */ int message_handle_get_resource_file( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, const system_character_t *resource_file_path, resource_file_t **resource_file, libcerror_error_t **error ) { static char *function = "message_handle_get_resource_file"; time_t timestamp = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( resource_file_initialize( resource_file, message_handle->preferred_language_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create resource file.", function ); goto on_error; } if( resource_file_set_name( *resource_file, resource_filename, resource_filename_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name in resource file.", function ); goto on_error; } if( resource_file_open( *resource_file, resource_file_path, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open resource file: %" PRIs_SYSTEM ".", function, resource_file_path ); goto on_error; } if( libfcache_date_time_get_timestamp( ×tamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache timestamp.", function ); return( -1 ); } if( libfcache_cache_set_value_by_index( message_handle->resource_file_cache, message_handle->next_resource_file_cache_index, 0, message_handle->next_resource_file_cache_index, timestamp, (intptr_t *) *resource_file, (int (*)(intptr_t **, libcerror_error_t **)) &resource_file_free, LIBFCACHE_CACHE_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set resource file in cache entry: %d.", function, message_handle->next_resource_file_cache_index ); goto on_error; } message_handle->next_resource_file_cache_index++; if( message_handle->next_resource_file_cache_index == 16 ) { message_handle->next_resource_file_cache_index = 0; } return( 1 ); on_error: if( *resource_file != NULL ) { resource_file_free( resource_file, NULL ); } return( -1 ); } /* Retrieves a specific resource file from the cache * Returns 1 if successful, 0 if not available or -1 error */ int message_handle_get_resource_file_from_cache( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, resource_file_t **resource_file, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; static char *function = "message_handle_get_resource_file_from_cache"; int cache_index = 0; int result = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } for( cache_index = 0; cache_index < 16; cache_index++ ) { if( libfcache_cache_get_value_by_index( message_handle->resource_file_cache, cache_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value: %d.", function, cache_index ); return( -1 ); } if( cache_value != NULL ) { if( libfcache_cache_value_get_value( cache_value, (intptr_t **) resource_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource file from cache value: %d.", function, cache_index ); return( -1 ); } } if( *resource_file != NULL ) { if( ( resource_filename_length + 1 ) != ( *resource_file )->name_size ) { *resource_file = NULL; } else if( system_string_compare( resource_filename, ( *resource_file )->name, resource_filename_length ) != 0 ) { *resource_file = NULL; } } if( *resource_file != NULL ) { result = 1; break; } } if( result == 0 ) { *resource_file = NULL; } return( result ); } /* Retrieves a specific MUI resource file and adds it to the cache * Returns 1 if successful, 0 if resource file was not found or -1 error */ int message_handle_get_mui_resource_file( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, const system_character_t *resource_file_path, resource_file_t **resource_file, libcerror_error_t **error ) { static char *function = "message_handle_get_mui_resource_file"; time_t timestamp = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( resource_file_initialize( resource_file, message_handle->preferred_language_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create resource file.", function ); goto on_error; } if( resource_file_set_name( *resource_file, resource_filename, resource_filename_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name in resource file.", function ); goto on_error; } if( resource_file_open( *resource_file, resource_file_path, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open resource file: %" PRIs_SYSTEM ".", function, resource_file_path ); goto on_error; } if( libfcache_date_time_get_timestamp( ×tamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache timestamp.", function ); return( -1 ); } if( libfcache_cache_set_value_by_index( message_handle->mui_resource_file_cache, message_handle->next_mui_resource_file_cache_index, 0, message_handle->next_mui_resource_file_cache_index, timestamp, (intptr_t *) *resource_file, (int (*)(intptr_t **, libcerror_error_t **)) &resource_file_free, LIBFCACHE_CACHE_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set resource file in cache entry: %d.", function, message_handle->next_mui_resource_file_cache_index ); goto on_error; } message_handle->next_mui_resource_file_cache_index++; if( message_handle->next_mui_resource_file_cache_index == 16 ) { message_handle->next_mui_resource_file_cache_index = 0; } return( 1 ); on_error: if( resource_file != NULL ) { resource_file_free( resource_file, NULL ); } return( -1 ); } /* Retrieves a specific MUI resource file from the cache * Returns 1 if successful, 0 if resource file was not found or -1 error */ int message_handle_get_mui_resource_file_from_cache( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, resource_file_t **resource_file, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; static char *function = "message_handle_get_mui_resource_file_from_cache"; int cache_index = 0; int result = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } for( cache_index = 0; cache_index < 16; cache_index++ ) { if( libfcache_cache_get_value_by_index( message_handle->mui_resource_file_cache, cache_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value: %d.", function, cache_index ); return( -1 ); } if( cache_value != NULL ) { if( libfcache_cache_value_get_value( cache_value, (intptr_t **) resource_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource file from cache value: %d.", function, cache_index ); return( -1 ); } } if( *resource_file != NULL ) { if( ( resource_filename_length + 1 ) != ( *resource_file )->name_size ) { *resource_file = NULL; } else if( system_string_compare( resource_filename, ( *resource_file )->name, resource_filename_length ) != 0 ) { *resource_file = NULL; } } if( *resource_file != NULL ) { result = 1; break; } } return( result ); } /* Retrieves the message string from a specific resource file * Returns 1 if successful, 0 if not available or -1 error */ int message_handle_get_message_string_from_resource_file( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, uint32_t message_identifier, message_string_t **message_string, libcerror_error_t **error ) { system_character_t *resource_file_path = NULL; system_character_t *mui_resource_file_path = NULL; resource_file_t *resource_file = NULL; static char *function = "message_handle_get_message_string_from_resource_file"; size_t resource_file_path_size = 0; size_t mui_resource_file_path_size = 0; uint32_t mui_file_type = 0; int result = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( resource_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource filename.", function ); return( -1 ); } if( ( resource_filename_length == 0 ) || ( resource_filename_length > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid resource filename length value out of bounds.", function ); return( -1 ); } if( message_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message string.", function ); return( -1 ); } result = message_handle_get_resource_file_from_cache( message_handle, resource_filename, resource_filename_length, &resource_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource file from cache.", function ); goto on_error; } if( result == 0 ) { result = message_handle_get_resource_file_path( message_handle, resource_filename, resource_filename_length, NULL, 0, &resource_file_path, &resource_file_path_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource file path.", function ); goto on_error; } else if( result != 0 ) { if( message_handle_get_resource_file( message_handle, resource_filename, resource_filename_length, resource_file_path, &resource_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource file: %" PRIs_SYSTEM ".", function, resource_file_path ); goto on_error; } } } if( resource_file != NULL ) { result = resource_file_get_message_string( resource_file, message_identifier, message_string, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message string: 0x%08" PRIx32 ".", function, message_identifier ); goto on_error; } else if( result == 0 ) { result = resource_file_get_mui_file_type( resource_file, &mui_file_type, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI file type.", function ); goto on_error; } else if( result != 0 ) { if( mui_file_type != 0x00000011UL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported MUI file type: 0x%08" PRIx32 ".", function, mui_file_type ); } resource_file = NULL; result = message_handle_get_mui_resource_file_from_cache( message_handle, resource_filename, resource_filename_length, &resource_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI resource file from cache.", function ); goto on_error; } else if( result == 0 ) { /* TODO add support to determine language string */ /* The MUI resource file path is: %PATH%/%LANGUAGE%/%FILENAME%.mui */ result = message_handle_get_resource_file_path( message_handle, resource_filename, resource_filename_length, _SYSTEM_STRING( "en-US" ), 5, &mui_resource_file_path, &mui_resource_file_path_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI resource file path.", function ); goto on_error; } else if( result != 0 ) { if( message_handle_get_mui_resource_file( message_handle, resource_filename, resource_filename_length, mui_resource_file_path, &resource_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI resource file: %" PRIs_SYSTEM ".", function, mui_resource_file_path ); goto on_error; } memory_free( mui_resource_file_path ); mui_resource_file_path = NULL; } } if( resource_file != NULL ) { result = resource_file_get_message_string( resource_file, message_identifier, message_string, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message string: 0x%08" PRIx32 ".", function, message_identifier ); goto on_error; } } } } } if( resource_file_path != NULL ) { memory_free( resource_file_path ); resource_file_path = NULL; } return( result ); on_error: if( mui_resource_file_path != NULL ) { memory_free( mui_resource_file_path ); } if( resource_file_path != NULL ) { memory_free( resource_file_path ); } if( *message_string != NULL ) { message_string_free( message_string, NULL ); } return( -1 ); } /* Retrieves the message string from one or more specified resource files * Returns 1 if successful, 0 if not available or -1 error */ int message_handle_get_message_string( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, uint32_t message_identifier, message_string_t **message_string, libcerror_error_t **error ) { system_character_t *resource_filename_string_segment = NULL; system_split_string_t *resource_filename_split_string = NULL; static char *function = "message_handle_get_message_string"; size_t resource_filename_string_segment_size = 0; int resource_filename_number_of_segments = 0; int resource_filename_segment_index = 0; int result = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( message_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message string.", function ); return( -1 ); } /* The resource filename can contain multiple file names separated by ; */ if( system_string_split( resource_filename, resource_filename_length + 1, (system_character_t) ';', &resource_filename_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split resource filename.", function ); goto on_error; } if( system_split_string_get_number_of_segments( resource_filename_split_string, &resource_filename_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of resource filename string segments.", function ); goto on_error; } for( resource_filename_segment_index = 0; resource_filename_segment_index < resource_filename_number_of_segments; resource_filename_segment_index++ ) { if( system_split_string_get_segment_by_index( resource_filename_split_string, resource_filename_segment_index, &resource_filename_string_segment, &resource_filename_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource filename string segment: %d.", function, resource_filename_segment_index ); goto on_error; } if( resource_filename_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing resource filename string segment: %d.", function, resource_filename_segment_index ); goto on_error; } result = message_handle_get_message_string_from_resource_file( message_handle, resource_filename_string_segment, resource_filename_string_segment_size - 1, message_identifier, message_string, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message string: 0x%08" PRIx32 " from: %" PRIs_SYSTEM ".", function, message_identifier, resource_filename_string_segment ); goto on_error; } else if( result != 0 ) { break; } } if( system_split_string_free( &resource_filename_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free resource filename split string.", function ); goto on_error; } return( result ); on_error: if( resource_filename_split_string != NULL ) { system_split_string_free( &resource_filename_split_string, NULL ); } if( *message_string != NULL ) { message_string_free( message_string, NULL ); } return( -1 ); } /* Retrieves a specific resource file by provider identifier * Returns 1 if successful, 0 if not available or -1 error */ int message_handle_get_resource_file_by_provider_identifier( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, const uint8_t *provider_identifier, size_t provider_identifier_size, resource_file_t **resource_file, libcerror_error_t **error ) { libwrc_wevt_provider_t *provider = NULL; system_character_t *resource_filename_string_segment = NULL; system_character_t *resource_file_path = NULL; system_split_string_t *resource_filename_split_string = NULL; static char *function = "message_handle_get_resource_file_by_provider_identifier"; size_t resource_filename_string_segment_size = 0; size_t resource_file_path_size = 0; int resource_filename_number_of_segments = 0; int resource_filename_segment_index = 0; int result = 0; if( message_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message handle.", function ); return( -1 ); } if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } /* The resource filename can contain multiple file names separated by ; */ if( system_string_split( resource_filename, resource_filename_length + 1, (system_character_t) ';', &resource_filename_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split resource filename.", function ); goto on_error; } if( system_split_string_get_number_of_segments( resource_filename_split_string, &resource_filename_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of resource filename string segments.", function ); goto on_error; } for( resource_filename_segment_index = 0; resource_filename_segment_index < resource_filename_number_of_segments; resource_filename_segment_index++ ) { if( system_split_string_get_segment_by_index( resource_filename_split_string, resource_filename_segment_index, &resource_filename_string_segment, &resource_filename_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource filename string segment: %d.", function, resource_filename_segment_index ); goto on_error; } result = message_handle_get_resource_file_from_cache( message_handle, resource_filename_string_segment, resource_filename_string_segment_size - 1, resource_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource file: %d from cache.", function, resource_filename_segment_index ); goto on_error; } if( result == 0 ) { result = message_handle_get_resource_file_path( message_handle, resource_filename_string_segment, resource_filename_string_segment_size - 1, NULL, 0, &resource_file_path, &resource_file_path_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource file path.", function ); goto on_error; } else if( result != 0 ) { if( message_handle_get_resource_file( message_handle, resource_filename, resource_filename_length, resource_file_path, resource_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource file: %" PRIs_SYSTEM ".", function, resource_file_path ); goto on_error; } memory_free( resource_file_path ); resource_file_path = NULL; } } if( resource_file != NULL ) { result = resource_file_get_provider( *resource_file, provider_identifier, provider_identifier_size, &provider, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve provider.", function ); goto on_error; } else if( result != 0 ) { if( libwrc_wevt_provider_free( &provider, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free provider.", function ); goto on_error; } break; } } } if( system_split_string_free( &resource_filename_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free resource filename split string.", function ); goto on_error; } return( result ); on_error: if( resource_file_path != NULL ) { memory_free( resource_file_path ); } if( resource_filename_split_string != NULL ) { system_split_string_free( &resource_filename_split_string, NULL ); } return( -1 ); } libevt-20170120/evttools/evttools_wide_string.h0000644000175000017500000000323013040331673023636 0ustar00lordyestalordyesta00000000000000/* * Wide character string functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_WIDE_STRING_H ) #define _EVTTOOLS_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 ) \ evttools_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 evttools_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( _EVTTOOLS_WIDE_STRING_H ) */ libevt-20170120/evttools/evttools_system_split_string.h0000664000175000017500000000543113040331673025454 0ustar00lordyestalordyesta00000000000000/* * Split system string functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_SYSTEM_SPLIT_STRING_H ) #define _EVTTOOLS_SYSTEM_SPLIT_STRING_H #include #include #include "evttools_libcsplit.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) #define system_split_string_t \ libcsplit_wide_split_string_t #define system_split_string_free( split_string, error ) \ libcsplit_wide_split_string_free( split_string, error ) #define system_split_string_get_number_of_segments( split_string, number_of_segments, error ) \ libcsplit_wide_split_string_get_number_of_segments( split_string, number_of_segments, error ) #define system_split_string_get_segment_by_index( split_string, segment_index, string_segment, string_segment_size, error ) \ libcsplit_wide_split_string_get_segment_by_index( split_string, segment_index, string_segment, string_segment_size, error ) #define system_string_split( string, string_size, delimiter, split_string, error ) \ libcsplit_wide_string_split( string, string_size, (wchar_t) delimiter, split_string, error ) #else #define system_split_string_t \ libcsplit_narrow_split_string_t #define system_split_string_free( split_string, error ) \ libcsplit_narrow_split_string_free( split_string, error ) #define system_split_string_get_number_of_segments( split_string, number_of_segments, error ) \ libcsplit_narrow_split_string_get_number_of_segments( split_string, number_of_segments, error ) #define system_split_string_get_segment_by_index( split_string, segment_index, string_segment, string_segment_size, error ) \ libcsplit_narrow_split_string_get_segment_by_index( split_string, segment_index, string_segment, string_segment_size, error ) #define system_string_split( string, string_size, delimiter, split_string, error ) \ libcsplit_narrow_string_split( string, string_size, (char) delimiter, split_string, error ) #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _EVTTOOLS_SYSTEM_SPLIT_STRING_H ) */ libevt-20170120/evttools/log_handle.h0000664000175000017500000000321213040331673021457 0ustar00lordyestalordyesta00000000000000/* * Log handle * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LOG_HANDLE_H ) #define _LOG_HANDLE_H #include #include #include #include "evttools_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 ) */ libevt-20170120/evttools/evttools_getopt.h0000664000175000017500000000341513040331673022631 0ustar00lordyestalordyesta00000000000000/* * GetOpt functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_GETOPT_H ) #define _EVTTOOLS_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 evttools_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 evttools_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( _EVTTOOLS_GETOPT_H ) */ libevt-20170120/evttools/resource_file.h0000664000175000017500000001124113040331673022212 0ustar00lordyestalordyesta00000000000000/* * Resource file * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _RESOURCE_FILE_H ) #define _RESOURCE_FILE_H #include #include #include "evttools_libbfio.h" #include "evttools_libcerror.h" #include "evttools_libexe.h" #include "evttools_libfcache.h" #include "evttools_libwrc.h" #include "message_string.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct resource_file resource_file_t; struct resource_file { /* The name */ system_character_t *name; /* The name size */ size_t name_size; /* The libexe file */ libexe_file_t *exe_file; /* The libexe resource (.rsrc) section */ libexe_section_t *resource_section; /* The resource (.rsrc) section file IO handle */ libbfio_handle_t *resource_section_file_io_handle; /* The libwrc resource stream */ libwrc_stream_t *resource_stream; /* The preferred language identifier */ uint32_t preferred_language_identifier; /* The libwrc message table resource */ libwrc_resource_t *message_table_resource; /* The libwrc MUI resource */ libwrc_resource_t *mui_resource; /* The libwrc WEVT_TEMPLATE resource */ libwrc_resource_t *wevt_template_resource; /* The message string cache */ libfcache_cache_t *message_string_cache; /* The next available message string cache index */ int next_message_string_cache_index; /* Value to indicate if the message file is open */ int is_open; }; int resource_file_initialize( resource_file_t **resource_file, uint32_t preferred_language_identifier, libcerror_error_t **error ); int resource_file_free( resource_file_t **resource_file, libcerror_error_t **error ); int resource_file_open( resource_file_t *resource_file, const system_character_t *filename, libcerror_error_t **error ); int resource_file_close( resource_file_t *resource_file, libcerror_error_t **error ); int resource_file_get_resource_available_languague_identifier( resource_file_t *resource_file, libwrc_resource_t *resource, uint32_t *language_identifier, libcerror_error_t **error ); int resource_file_set_name( resource_file_t *resource_file, const system_character_t *name, size_t name_length, libcerror_error_t **error ); int resource_file_get_message_string_from_cache( resource_file_t *resource_file, uint32_t message_string_identifier, message_string_t **message_string, libcerror_error_t **error ); int resource_file_get_message_string( resource_file_t *resource_file, uint32_t message_string_identifier, message_string_t **message_string, libcerror_error_t **error ); int resource_file_get_mui_file_type( resource_file_t *resource_file, uint32_t *file_type, libcerror_error_t **error ); int resource_file_get_provider( resource_file_t *resource_file, const uint8_t *provider_identifier, size_t provider_identifier_size, libwrc_wevt_provider_t **provider, libcerror_error_t **error ); int resource_file_get_event( resource_file_t *resource_file, const uint8_t *provider_identifier, size_t provider_identifier_size, uint32_t event_identifier, libwrc_wevt_provider_t **provider, libwrc_wevt_event_t **event, libcerror_error_t **error ); int resource_file_get_template_definition( resource_file_t *resource_file, const uint8_t *provider_identifier, size_t provider_identifier_size, uint32_t event_identifier, libwrc_wevt_provider_t **provider, libwrc_wevt_event_t **event, libwrc_wevt_template_definition_t **template_definition, libcerror_error_t **error ); int resource_file_get_event_message_identifier( resource_file_t *resource_file, const uint8_t *provider_identifier, size_t provider_identifier_size, uint32_t event_identifier, uint32_t *message_identifier, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _RESOURCE_FILE_H ) */ libevt-20170120/evttools/evttools_libcdirectory.h0000664000175000017500000000263013040331673024163 0ustar00lordyestalordyesta00000000000000/* * The internal libcdirectory header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBCDIRECTORY_H ) #define _EVTTOOLS_LIBCDIRECTORY_H #include /* Define HAVE_LOCAL_LIBCDIRECTORY for local use of libcdirectory */ #if defined( HAVE_LOCAL_LIBCDIRECTORY ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCDIRECTORY_DLL_IMPORT * before including libcdirectory.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCDIRECTORY_DLL_IMPORT #endif #include #endif #endif libevt-20170120/evttools/evttools_unused.h0000664000175000017500000000267113040331673022635 0ustar00lordyestalordyesta00000000000000/* * The unused definition * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_UNUSED_H ) #define _EVTTOOLS_UNUSED_H #include #if !defined( EVTTOOLS_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define EVTTOOLS_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define EVTTOOLS_ATTRIBUTE_UNUSED #endif /* defined( __GNUC__ ) && __GNUC__ >= 3 */ #endif /* !defined( EVTTOOLS_ATTRIBUTE_UNUSED ) */ #if defined( _MSC_VER ) #define EVTTOOLS_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define EVTTOOLS_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif /* defined( _MSC_VER ) */ #endif /* !defined( _EVTTOOLS_UNUSED_H ) */ libevt-20170120/evttools/evttools_libclocale.h0000664000175000017500000000273513040331673023424 0ustar00lordyestalordyesta00000000000000/* * The internal libclocale header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBCLOCALE_H ) #define _EVTTOOLS_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( _EVTTOOLS_LIBCLOCALE_H ) */ libevt-20170120/evttools/evttools_wide_string.c0000644000175000017500000000365713040331673023646 0ustar00lordyestalordyesta00000000000000/* * Wide character string functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_WCTYPE_H ) #include #endif #include "evttools_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 evttools_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 ) */ libevt-20170120/evttools/evtinfo.c0000664000175000017500000001566413040332233021037 0ustar00lordyestalordyesta00000000000000/* * Shows information obtained from a Windows Event Log (EVT) file * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "evttools_getopt.h" #include "evttools_libcerror.h" #include "evttools_libclocale.h" #include "evttools_libcnotify.h" #include "evttools_libevt.h" #include "evttools_output.h" #include "evttools_signal.h" #include "evttools_unused.h" #include "info_handle.h" info_handle_t *evtinfo_info_handle = NULL; int evtinfo_abort = 0; /* Prints the executable usage information */ void usage_fprint( FILE *stream ) { if( stream == NULL ) { return; } fprintf( stream, "Use evtinfo to determine information about a Windows Event\n" "Log (EVT) file.\n\n" ); fprintf( stream, "Usage: evtinfo [ -c codepage ] [ -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-949, windows-950,\n" "\t windows-1250, windows-1251, windows-1252 (default),\n" "\t windows-1253, windows-1254, windows-1255, windows-1256\n" "\t windows-1257 or windows-1258\n" ); fprintf( stream, "\t-h: shows this help\n" ); fprintf( stream, "\t-v: verbose output to stderr\n" ); fprintf( stream, "\t-V: print version\n" ); } /* Signal handler for evtinfo */ void evtinfo_signal_handler( evttools_signal_t signal EVTTOOLS_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "evtinfo_signal_handler"; EVTTOOLS_UNREFERENCED_PARAMETER( signal ) evtinfo_abort = 1; if( evtinfo_info_handle != NULL ) { if( info_handle_signal_abort( evtinfo_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 { libcerror_error_t *error = NULL; system_character_t *option_ascii_codepage = NULL; system_character_t *source = NULL; char *program = "evtinfo"; system_integer_t option = 0; int result = 0; int verbose = 0; libcnotify_stream_set( stderr, NULL ); libcnotify_verbose_set( 1 ); if( libclocale_initialize( "evttools", &error ) != 1 ) { fprintf( stderr, "Unable to initialize locale values.\n" ); goto on_error; } if( evttools_output_initialize( _IONBF, &error ) != 1 ) { fprintf( stderr, "Unable to initialize output settings.\n" ); goto on_error; } evtoutput_version_fprint( stdout, program ); while( ( option = evttools_getopt( argc, argv, _SYSTEM_STRING( "c: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) 'c': option_ascii_codepage = optarg; break; case (system_integer_t) 'h': usage_fprint( stdout ); return( EXIT_SUCCESS ); case (system_integer_t) 'v': verbose = 1; break; case (system_integer_t) 'V': evtoutput_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 ); libevt_notify_set_stream( stderr, NULL ); libevt_notify_set_verbose( verbose ); if( info_handle_initialize( &evtinfo_info_handle, &error ) != 1 ) { fprintf( stderr, "Unable to initialize info handle.\n" ); goto on_error; } if( option_ascii_codepage != NULL ) { result = info_handle_set_ascii_codepage( evtinfo_info_handle, option_ascii_codepage, &error ); if( result == -1 ) { fprintf( stderr, "Unable to set ASCII codepage in info handle.\n" ); goto on_error; } else if( result == 0 ) { fprintf( stderr, "Unsupported ASCII codepage defaulting to: windows-1252.\n" ); } } result = info_handle_set_event_log_type_from_filename( evtinfo_info_handle, source, &error ); if( result == -1 ) { fprintf( stderr, "Unable to set event log type from filename in info handle.\n" ); goto on_error; } if( info_handle_open_input( evtinfo_info_handle, source, &error ) != 1 ) { fprintf( stderr, "Unable to open: %" PRIs_SYSTEM ".\n", source ); goto on_error; } if( info_handle_file_fprint( evtinfo_info_handle, &error ) != 1 ) { fprintf( stderr, "Unable to print file information.\n" ); goto on_error; } if( info_handle_close_input( evtinfo_info_handle, &error ) != 0 ) { fprintf( stderr, "Unable to close info handle.\n" ); goto on_error; } if( info_handle_free( &evtinfo_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( evtinfo_info_handle != NULL ) { info_handle_free( &evtinfo_info_handle, NULL ); } return( EXIT_FAILURE ); } libevt-20170120/evttools/evttools_libexe.h0000664000175000017500000000245013040331673022575 0ustar00lordyestalordyesta00000000000000/* * The libexe header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBEXE_H ) #define _EVTTOOLS_LIBEXE_H #include /* Define HAVE_LOCAL_LIBEXE for local use of libexe */ #if defined( HAVE_LOCAL_LIBEXE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBEXE_DLL_IMPORT * before including libexe.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBEXE_DLL_IMPORT #endif #include #endif #endif libevt-20170120/evttools/message_handle.h0000664000175000017500000002076613040331673022337 0ustar00lordyestalordyesta00000000000000/* * Message handle * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _MESSAGE_HANDLE_H ) #define _MESSAGE_HANDLE_H #include #include #include "evttools_libcerror.h" #include "evttools_libfcache.h" #include "evttools_libregf.h" #include "message_string.h" #include "path_handle.h" #include "registry_file.h" #include "resource_file.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct message_handle message_handle_t; struct message_handle { /* The SOFTWARE registry filename */ system_character_t *software_registry_filename; /* The SOFTWARE registry filename size */ size_t software_registry_filename_size; /* The SYSTEM registry filename */ system_character_t *system_registry_filename; /* The SYSTEM registry filename size */ size_t system_registry_filename_size; /* The name of the directory containing the SOFTWARE and SYSTEM registry filename */ system_character_t *registry_directory_name; /* The size of the name of the directory containing the SOFTWARE and SYSTEM registry filename */ size_t registry_directory_name_size; /* The SOFTWARE registry file */ registry_file_t *software_registry_file; /* The %SystemRoot% path */ system_character_t *system_root_path; /* The %SystemRoot% path size */ size_t system_root_path_size; /* The %WinDir% path */ system_character_t *windows_directory_path; /* The %WinDir% path size */ size_t windows_directory_path_size; /* The SYSTEM registry file */ registry_file_t *system_registry_file; /* The path handle */ path_handle_t *path_handle; /* The current control set */ uint32_t current_control_set; /* The SOFTWARE WinEvt publishers key */ libregf_key_t *winevt_publishers_key; /* The SYSTEM (control set 1) eventlog services key */ libregf_key_t *control_set_1_eventlog_services_key; /* The SYSTEM (control set 2) eventlog services key */ libregf_key_t *control_set_2_eventlog_services_key; /* The resource files path */ const system_character_t *resource_files_path; /* The resource file cache */ libfcache_cache_t *resource_file_cache; /* The next available resource file cache index */ int next_resource_file_cache_index; /* The MUI resource file cache */ libfcache_cache_t *mui_resource_file_cache; /* The next available MUI resource file cache index */ int next_mui_resource_file_cache_index; /* The ascii codepage */ int ascii_codepage; /* The preferred language identifier */ uint32_t preferred_language_identifier; }; int message_handle_initialize( message_handle_t **message_handle, libcerror_error_t **error ); int message_handle_free( message_handle_t **message_handle, libcerror_error_t **error ); int message_handle_signal_abort( message_handle_t *message_handle, libcerror_error_t **error ); int message_handle_set_ascii_codepage( message_handle_t *message_handle, int ascii_codepage, libcerror_error_t **error ); int message_handle_set_preferred_language_identifier( message_handle_t *message_handle, uint32_t preferred_language_identifier, libcerror_error_t **error ); int message_handle_set_event_log_type_from_filename( message_handle_t *message_handle, const system_character_t *filename, libcerror_error_t **error ); int message_handle_set_software_registry_filename( message_handle_t *message_handle, const system_character_t *filename, libcerror_error_t **error ); int message_handle_set_system_registry_filename( message_handle_t *message_handle, const system_character_t *filename, libcerror_error_t **error ); int message_handle_set_registry_directory_name( message_handle_t *message_handle, const system_character_t *name, libcerror_error_t **error ); int message_handle_set_resource_files_path( message_handle_t *message_handle, const system_character_t *path, libcerror_error_t **error ); int message_handle_open_software_registry_file( message_handle_t *message_handle, libcerror_error_t **error ); int message_handle_open_system_registry_file( message_handle_t *message_handle, const char *eventlog_key_name, libcerror_error_t **error ); int message_handle_open_input( message_handle_t *message_handle, const char *eventlog_key_name, libcerror_error_t **error ); int message_handle_close_input( message_handle_t *message_handle, libcerror_error_t **error ); int message_handle_get_value_by_event_source( message_handle_t *message_handle, const system_character_t *event_source, size_t event_source_length, const system_character_t *value_name, size_t value_name_length, system_character_t **value_string, size_t *value_string_size, libcerror_error_t **error ); int message_handle_get_value_by_provider_identifier( message_handle_t *message_handle, const system_character_t *provider_identifier, size_t provider_identifier_length, const system_character_t *value_name, size_t value_name_length, system_character_t **value_string, size_t *value_string_size, libcerror_error_t **error ); int message_handle_get_resource_file_path( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, const system_character_t *language_string, size_t language_string_length, system_character_t **resource_file_path, size_t *resource_file_path_size, libcerror_error_t **error ); int message_handle_get_resource_file( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, const system_character_t *resource_file_path, resource_file_t **resource_file, libcerror_error_t **error ); int message_handle_get_resource_file_from_cache( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, resource_file_t **resource_file, libcerror_error_t **error ); int message_handle_get_mui_resource_file_path( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, system_character_t **resource_file_path, size_t *resource_file_path_size, libcerror_error_t **error ); int message_handle_get_mui_resource_file( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, const system_character_t *resource_file_path, resource_file_t **resource_file, libcerror_error_t **error ); int message_handle_get_mui_resource_file_from_cache( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, resource_file_t **resource_file, libcerror_error_t **error ); int message_handle_get_message_string_from_resource_file( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, uint32_t message_identifier, message_string_t **message_string, libcerror_error_t **error ); int message_handle_get_message_string( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, uint32_t message_identifier, message_string_t **message_string, libcerror_error_t **error ); int message_handle_get_resource_file_by_provider_identifier( message_handle_t *message_handle, const system_character_t *resource_filename, size_t resource_filename_length, const uint8_t *provider_identifier, size_t provider_identifier_size, resource_file_t **resource_file, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _MESSAGE_HANDLE_H ) */ libevt-20170120/evttools/export_handle.h0000664000175000017500000001217413040331673022226 0ustar00lordyestalordyesta00000000000000/* * Export handle * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EXPORT_HANDLE_H ) #define _EXPORT_HANDLE_H #include #include #include #include "evttools_libcerror.h" #include "evttools_libevt.h" #include "log_handle.h" #include "message_handle.h" #include "message_string.h" #if defined( __cplusplus ) extern "C" { #endif enum EXPORT_MODES { EXPORT_MODE_ALL = (int) 'a', EXPORT_MODE_ITEMS = (int) 'i', EXPORT_MODE_RECOVERED = (int) 'r' }; typedef struct export_handle export_handle_t; struct export_handle { /* The export mode */ uint8_t export_mode; /* The libevt input file */ libevt_file_t *input_file; /* The message handle */ message_handle_t *message_handle; /* The event log type */ int event_log_type; /* Value to indicate the input is open */ int input_is_open; /* The ascii codepage */ int ascii_codepage; /* The notification output stream */ FILE *notify_stream; /* Value to indicate if abort was signalled */ int abort; }; const char *export_handle_get_event_log_key_name( int event_log_type ); const char *export_handle_get_event_type( uint16_t event_type ); 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_preferred_language_identifier( export_handle_t *export_handle, uint32_t preferred_language_identifier, libcerror_error_t **error ); int export_handle_set_event_log_type( export_handle_t *export_handle, const system_character_t *string, libcerror_error_t **error ); int export_handle_set_event_log_type_from_filename( export_handle_t *export_handle, const system_character_t *filename, libcerror_error_t **error ); int export_handle_set_software_registry_filename( export_handle_t *export_handle, const system_character_t *filename, libcerror_error_t **error ); int export_handle_set_system_registry_filename( export_handle_t *export_handle, const system_character_t *filename, libcerror_error_t **error ); int export_handle_set_registry_directory_name( export_handle_t *export_handle, const system_character_t *name, libcerror_error_t **error ); int export_handle_set_resource_files_path( export_handle_t *export_handle, const system_character_t *path, libcerror_error_t **error ); int export_handle_open_input( export_handle_t *export_handle, const system_character_t *filename, libcerror_error_t **error ); int export_handle_close_input( export_handle_t *export_handle, libcerror_error_t **error ); /* Record specific export functions */ int export_handle_export_record_event_category( export_handle_t *export_handle, libevt_record_t *record, const system_character_t *event_source, size_t event_source_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_record_event_message( export_handle_t *export_handle, libevt_record_t *record, const system_character_t *event_source, size_t event_source_length, uint32_t event_identifier, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_record( export_handle_t *export_handle, libevt_record_t *record, log_handle_t *log_handle, libcerror_error_t **error ); /* File export functions */ int export_handle_export_records( export_handle_t *export_handle, libevt_file_t *file, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_recovered_records( export_handle_t *export_handle, libevt_file_t *file, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_file( export_handle_t *export_handle, log_handle_t *log_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _EXPORT_HANDLE_H ) */ libevt-20170120/evttools/evttools_libfdatetime.h0000664000175000017500000000334713040331673023764 0ustar00lordyestalordyesta00000000000000/* * The libfdatetime header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBFDATETIME_H ) #define _EVTTOOLS_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( _EVTTOOLS_LIBFDATETIME_H ) */ libevt-20170120/evttools/evttools_libregf.h0000664000175000017500000000255313040331673022743 0ustar00lordyestalordyesta00000000000000/* * The libregf header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBREGF_H ) #define _EVTTOOLS_LIBREGF_H #include /* Define HAVE_LOCAL_LIBREGF for local use of libregf */ #if defined( HAVE_LOCAL_LIBREGF ) #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBREGF_DLL_IMPORT * before including libregf.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBREGF_DLL_IMPORT #endif #include #endif #endif libevt-20170120/evttools/message_string.c0000664000175000017500000003605613040331673022404 0ustar00lordyestalordyesta00000000000000/* * Message string * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include #include "evttools_libcerror.h" #include "evttools_libevt.h" #include "evttools_libwrc.h" #include "message_string.h" /* Creates a message string * Make sure the value message_string is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int message_string_initialize( message_string_t **message_string, uint32_t message_string_identifier, libcerror_error_t **error ) { static char *function = "message_string_initialize"; if( message_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message string.", function ); return( -1 ); } if( *message_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid message string value already set.", function ); return( -1 ); } *message_string = memory_allocate_structure( message_string_t ); if( *message_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create message string.", function ); goto on_error; } if( memory_set( *message_string, 0, sizeof( message_string_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear message string.", function ); memory_free( *message_string ); *message_string = NULL; return( -1 ); } ( *message_string )->identifier = message_string_identifier; return( 1 ); on_error: if( *message_string != NULL ) { memory_free( *message_string ); *message_string = NULL; } return( -1 ); } /* Frees a message string * Returns 1 if successful or -1 on error */ int message_string_free( message_string_t **message_string, libcerror_error_t **error ) { static char *function = "message_string_free"; int result = 1; if( message_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message string.", function ); return( -1 ); } if( *message_string != NULL ) { if( ( *message_string )->string != NULL ) { memory_free( ( *message_string )->string ); } memory_free( *message_string ); *message_string = NULL; } return( result ); } /* Retrieve the message string from the message table resource * Returns 1 if successful, 0 if not available or -1 on error */ int message_string_get_from_message_table_resource( message_string_t *message_string, libwrc_resource_t *message_table_resource, uint32_t language_identifier, libcerror_error_t **error ) { static char *function = "message_string_get_from_message_table_resource"; int message_index = 0; int result = 0; if( message_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message string.", function ); return( -1 ); } if( message_string->string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid message string - string value already set.", function ); return( -1 ); } result = libwrc_message_table_get_index_by_identifier( message_table_resource, language_identifier, message_string->identifier, &message_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message index for identifier: 0x%08" PRIx32 ".", function, message_string->identifier ); goto on_error; } else if( result != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libwrc_message_table_get_utf16_string_size( message_table_resource, language_identifier, message_index, &( message_string->string_size ), error ); #else result = libwrc_message_table_get_utf8_string_size( message_table_resource, language_identifier, message_index, &( message_string->string_size ), error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message: %d size.", function, message_index ); goto on_error; } message_string->string = system_string_allocate( message_string->string_size ); if( message_string->string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create message string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libwrc_message_table_get_utf16_string( message_table_resource, language_identifier, message_index, (uint16_t *) message_string->string, message_string->string_size, error ); #else result = libwrc_message_table_get_utf8_string( message_table_resource, language_identifier, message_index, (uint8_t *) message_string->string, message_string->string_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message string: %d.", function, message_index ); goto on_error; } } return( result ); on_error: if( message_string->string != NULL ) { memory_free( message_string->string ); message_string->string = NULL; } message_string->string_size = 0; return( -1 ); } /* Prints the message string to a FILE stream * Returns 1 if successful or -1 on error */ int message_string_fprint( message_string_t *message_string, libevt_record_t *record, FILE *stream, libcerror_error_t **error ) { system_character_t *value_string = NULL; static char *function = "message_string_fprint"; size_t conversion_specifier_length = 0; size_t message_string_length = 0; size_t message_string_index = 0; size_t value_string_size = 0; system_character_t last_character = 0; int number_of_strings = 0; int result = 0; int value_string_index = 0; if( message_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message string.", function ); return( -1 ); } if( libevt_record_get_number_of_strings( record, &number_of_strings, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of strings in record.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) fprintf( stream, "Message format string\t\t: %" PRIs_SYSTEM "\n", message_string->string ); #endif fprintf( stream, "Message string\t\t\t: " ); message_string_length = message_string->string_size - 1; message_string_index = 0; while( message_string_index < message_string_length ) { if( ( ( message_string->string )[ message_string_index ] == (system_character_t) '%' ) && ( ( message_string_index + 1 ) < message_string_length ) ) { /* TODO add support for more conversion specifiers */ /* Ignore %0 = end of string, %r = cariage return */ if( ( ( message_string->string )[ message_string_index + 1 ] == (system_character_t) '0' ) || ( ( message_string->string )[ message_string_index + 1 ] == (system_character_t) 'r' ) ) { message_string_index += 2; continue; } /* Replace: * % = * %! = ! * %% = % * %. = . */ if( ( ( message_string->string )[ message_string_index + 1 ] == (system_character_t) ' ' ) || ( ( message_string->string )[ message_string_index + 1 ] == (system_character_t) '!' ) || ( ( message_string->string )[ message_string_index + 1 ] == (system_character_t) '%' ) || ( ( message_string->string )[ message_string_index + 1 ] == (system_character_t) '.' ) ) { last_character = ( message_string->string )[ message_string_index + 1 ]; fprintf( stream, "%c", last_character ); message_string_index += 2; continue; } /* Replace %b = space */ if( ( message_string->string )[ message_string_index + 1 ] == (system_character_t) 'b' ) { last_character = (system_character_t) ' '; fprintf( stream, "%c", last_character ); message_string_index += 2; continue; } /* Replace %n = new line */ if( ( message_string->string )[ message_string_index + 1 ] == (system_character_t) 'n' ) { if( last_character != (system_character_t) '\n' ) { last_character = (system_character_t) '\n'; fprintf( stream, "%c", last_character ); } message_string_index += 2; continue; } /* Replace %t = tab */ if( ( message_string->string )[ message_string_index + 1 ] == (system_character_t) 't' ) { last_character = (system_character_t) '\t'; fprintf( stream, "%c", last_character ); message_string_index += 2; continue; } if( ( ( message_string->string )[ message_string_index + 1 ] < (system_character_t) '1' ) || ( ( message_string->string )[ message_string_index + 1 ] > (system_character_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported conversion specifier: %" PRIs_SYSTEM ".", function, &( ( message_string->string )[ message_string_index ] ) ); goto on_error; } value_string_index = (int) ( message_string->string )[ message_string_index + 1 ] - (int) '0'; conversion_specifier_length = 2; if( ( ( message_string_index + 3 ) < message_string_length ) && ( ( message_string->string )[ message_string_index + 2 ] >= (system_character_t) '0' ) && ( ( message_string->string )[ message_string_index + 2 ] <= (system_character_t) '9' ) ) { value_string_index *= 10; value_string_index += (int) ( message_string->string )[ message_string_index + 2 ] - (int) '0'; conversion_specifier_length += 1; } value_string_index -= 1; if( ( ( message_string_index + conversion_specifier_length + 3 ) < message_string_length ) && ( ( message_string->string )[ message_string_index + conversion_specifier_length ] == (system_character_t) '!' ) ) { if( ( ( message_string->string )[ message_string_index + conversion_specifier_length + 1 ] != (system_character_t) 's' ) || ( ( message_string->string )[ message_string_index + conversion_specifier_length + 2 ] != (system_character_t) '!' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported conversion specifier: %" PRIs_SYSTEM ".", function, &( ( message_string->string )[ message_string_index ] ) ); goto on_error; } conversion_specifier_length += 3; } /* TODO remove index check after user data support */ if( value_string_index < number_of_strings ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libevt_record_get_utf16_string_size( record, value_string_index, &value_string_size, error ); #else result = libevt_record_get_utf8_string_size( record, value_string_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 string: %d size.", function, value_string_index ); 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 value string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libevt_record_get_utf16_string( record, value_string_index, (uint16_t *) value_string, value_string_size, error ); #else result = libevt_record_get_utf8_string( record, value_string_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 string: %d.", function, value_string_index ); goto on_error; } fprintf( stream, "%" PRIs_SYSTEM "", value_string ); memory_free( value_string ); value_string = NULL; } message_string_index += conversion_specifier_length; } else { do { fprintf( stream, "%" PRIc_SYSTEM "", ( message_string->string )[ message_string_index++ ] ); conversion_specifier_length--; } while( conversion_specifier_length > 0 ); last_character = ( message_string->string )[ message_string_index ]; } } else { if( ( message_string->string )[ message_string_index ] != 0 ) { if( ( message_string->string )[ message_string_index ] == (system_character_t) '\r' ) { /* Ignore \r characters */ } else if( ( ( message_string->string )[ message_string_index ] == (system_character_t) '\n' ) && ( last_character == (system_character_t) '\n' ) ) { /* Ignore multiple \n characters */ } else { fprintf( stream, "%" PRIc_SYSTEM "", ( message_string->string )[ message_string_index ] ); last_character = ( message_string->string )[ message_string_index ]; } } message_string_index += 1; } } fprintf( stream, "\n" ); return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } libevt-20170120/evttools/registry_file.h0000664000175000017500000000537013040331673022241 0ustar00lordyestalordyesta00000000000000/* * Registry file * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _REGISTRY_FILE_H ) #define _REGISTRY_FILE_H #include #include #include "evttools_libcerror.h" #include "evttools_libregf.h" #if defined( __cplusplus ) extern "C" { #endif /* TODO add more types */ enum REGISTRY_FILE_TYPES { REGISTRY_FILE_TYPE_NTUSER_DAT, REGISTRY_FILE_TYPE_SAM, REGISTRY_FILE_TYPE_SECURITY, REGISTRY_FILE_TYPE_SOFTWARE, REGISTRY_FILE_TYPE_SYSTEM }; typedef struct registry_file registry_file_t; struct registry_file { /* The libregf file */ libregf_file_t *regf_file; /* The registry file type */ uint8_t type; /* The libregf root key */ libregf_key_t *root_key; /* The libregf base key */ libregf_key_t *base_key; /* The current control set */ uint32_t current_control_set; /* The current control set key */ libregf_key_t *current_control_set_key; /* The control set 1 key */ libregf_key_t *control_set1_key; /* The control set 2 key */ libregf_key_t *control_set2_key; /* Value to indicate if the message file is open */ int is_open; }; int registry_file_initialize( registry_file_t **registry_file, libcerror_error_t **error ); int registry_file_free( registry_file_t **registry_file, libcerror_error_t **error ); int registry_file_signal_abort( registry_file_t *registry_file, libcerror_error_t **error ); int registry_file_set_ascii_codepage( registry_file_t *registry_file, int ascii_codepage, libcerror_error_t **error ); int registry_file_open( registry_file_t *registry_file, const system_character_t *filename, libcerror_error_t **error ); int registry_file_close( registry_file_t *registry_file, libcerror_error_t **error ); int registry_file_get_key_by_path( registry_file_t *registry_file, const system_character_t *key_path, size_t key_path_length, libregf_key_t **key, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _REGISTRY_FILE_H ) */ libevt-20170120/evttools/evttools_output.h0000664000175000017500000000263613040337372022675 0ustar00lordyestalordyesta00000000000000/* * Common output functions for the evttools * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_OUTPUT_H ) #define _EVTTOOLS_OUTPUT_H #include #include #include #include "evttools_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int evttools_output_initialize( int stdio_mode, libcerror_error_t **error ); void evtoutput_copyright_fprint( FILE *stream ); void evtoutput_version_fprint( FILE *stream, const char *program ); void evtoutput_version_detailed_fprint( FILE *stream, const char *program ); #if defined( __cplusplus ) } #endif #endif /* !defined( _EVTTOOLS_OUTPUT_H ) */ libevt-20170120/evttools/log_handle.c0000664000175000017500000001351113040331673021455 0ustar00lordyestalordyesta00000000000000/* * Log handle * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #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 "evttools_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 libevt-20170120/evttools/registry_file.c0000664000175000017500000004627013040331673022240 0ustar00lordyestalordyesta00000000000000/* * Registry file * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include "evttools_libcerror.h" #include "evttools_libregf.h" #include "evttools_wide_string.h" #include "registry_file.h" /* Creates a registry file * Make sure the value registry_file is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int registry_file_initialize( registry_file_t **registry_file, libcerror_error_t **error ) { static char *function = "registry_file_initialize"; if( registry_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid registry file.", function ); return( -1 ); } if( *registry_file != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid registry file value already set.", function ); return( -1 ); } *registry_file = memory_allocate_structure( registry_file_t ); if( *registry_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create registry file.", function ); goto on_error; } if( memory_set( *registry_file, 0, sizeof( registry_file_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear registry file.", function ); memory_free( *registry_file ); *registry_file = NULL; return( -1 ); } if( libregf_file_initialize( &( ( *registry_file )->regf_file ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize REGF file.", function ); goto on_error; } return( 1 ); on_error: if( *registry_file != NULL ) { memory_free( *registry_file ); *registry_file = NULL; } return( -1 ); } /* Frees a registry file * Returns 1 if successful or -1 on error */ int registry_file_free( registry_file_t **registry_file, libcerror_error_t **error ) { static char *function = "registry_file_free"; int result = 1; if( registry_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid registry file.", function ); return( -1 ); } if( *registry_file != NULL ) { if( ( *registry_file )->is_open != 0 ) { if( registry_file_close( *registry_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close registry file.", function ); result = -1; } } if( libregf_file_free( &( ( *registry_file )->regf_file ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free REGF file.", function ); result = -1; } memory_free( *registry_file ); *registry_file = NULL; } return( result ); } /* Signals the registry file to abort * Returns 1 if successful or -1 on error */ int registry_file_signal_abort( registry_file_t *registry_file, libcerror_error_t **error ) { static char *function = "registry_file_signal_abort"; if( registry_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid registry file.", function ); return( -1 ); } if( registry_file->regf_file != NULL ) { if( libregf_file_signal_abort( registry_file->regf_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to signal REGF file to abort.", function ); return( -1 ); } } return( 1 ); } /* Sets the ascii codepage * Returns 1 if successful or -1 on error */ int registry_file_set_ascii_codepage( registry_file_t *registry_file, int ascii_codepage, libcerror_error_t **error ) { static char *function = "registry_file_set_ascii_codepage"; if( registry_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid registry file.", function ); return( -1 ); } if( libregf_file_set_ascii_codepage( registry_file->regf_file, ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set ASCII codepage in REGF file.", function ); return( -1 ); } return( 1 ); } /* Opens the registry file * Returns 1 if successful or -1 on error */ int registry_file_open( registry_file_t *registry_file, const system_character_t *filename, libcerror_error_t **error ) { system_character_t *name = NULL; libregf_key_t *sub_key = NULL; libregf_value_t *value = NULL; static char *function = "registry_file_open"; const char *sub_key_path = NULL; const char *value_name = NULL; size_t name_size = 0; size_t sub_key_path_length = 0; size_t value_name_length = 0; int number_of_sub_keys = 0; int result = 0; if( registry_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid registry file.", function ); return( -1 ); } if( registry_file->is_open != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid registry file already open.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libregf_file_open_wide( registry_file->regf_file, filename, LIBREGF_OPEN_READ, error ) != 1 ) #else if( libregf_file_open( registry_file->regf_file, filename, LIBREGF_OPEN_READ, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open REGF file.", function ); goto on_error; } if( libregf_file_get_root_key( registry_file->regf_file, &( registry_file->root_key ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root key.", function ); goto on_error; } if( libregf_key_get_number_of_sub_keys( registry_file->root_key, &number_of_sub_keys, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub keys.", function ); goto on_error; } if( number_of_sub_keys == 1 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libregf_key_get_utf16_name_size( registry_file->root_key, &name_size, error ); #else result = libregf_key_get_utf8_name_size( registry_file->root_key, &name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root key name size.", function ); goto on_error; } if( ( result != 0 ) && ( name_size > 0 ) ) { if( ( name_size > (size_t) SSIZE_MAX ) || ( ( sizeof( system_character_t ) * name_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid name size value exceeds maximum.", function ); goto on_error; } name = system_string_allocate( name_size ); if( name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create name string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libregf_key_get_utf16_name( registry_file->root_key, (uint16_t *) name, name_size, error ); #else result = libregf_key_get_utf8_name( registry_file->root_key, (uint8_t *) name, name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root key name.", function ); goto on_error; } result = 0; /* TODO what about Windows NT4 */ if( name_size == 13 ) { /* Root key used by Windows 2000, XP, 2003 */ if( system_string_compare_no_case( name, _SYSTEM_STRING( "$$$PROTO.HIV" ), 12 ) == 0 ) { result = 1; } } else if( name_size == 53 ) { /* Root key used by Windows Vista, 2008, 7 */ if( system_string_compare_no_case( name, _SYSTEM_STRING( "CMI-CreateHive{" ), 15 ) == 0 ) { if( name[ 51 ] == (system_character_t) '}' ) { result = 1; } } } else if( name_size == 58 ) { /* Root key used by Windows 8 */ if( system_string_compare_no_case( name, _SYSTEM_STRING( "CsiTool-CreateHive-{" ), 20 ) == 0 ) { if( name[ 56 ] == (system_character_t) '}' ) { result = 1; } } } memory_free( name ); name = NULL; } if( result != 0 ) { if( libregf_key_get_sub_key( registry_file->root_key, 0, &( registry_file->base_key ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve base key.", function ); goto on_error; } } } else if( number_of_sub_keys > 1 ) { registry_file->base_key = registry_file->root_key; } if( libregf_key_get_number_of_sub_keys( registry_file->base_key, &number_of_sub_keys, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub keys.", function ); goto on_error; } /* Get the current control set from: * SYSTEM\Select\Current */ sub_key_path = "Select"; sub_key_path_length = narrow_string_length( sub_key_path ); result = libregf_key_get_sub_key_by_utf8_path( registry_file->base_key, (uint8_t *) sub_key_path, sub_key_path_length, &sub_key, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key: %s.", function, sub_key_path ); goto on_error; } else if( result != 0 ) { value_name = "Current"; value_name_length = narrow_string_length( value_name ); result = libregf_key_get_value_by_utf8_name( sub_key, (uint8_t *) value_name, value_name_length, &value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %s.", function, value_name ); goto on_error; } else if( result != 0 ) { if( libregf_value_get_value_32bit( value, &( registry_file->current_control_set ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve 32-bit value: %s.", function, value_name ); goto on_error; } if( libregf_value_free( &value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); goto on_error; } } } if( libregf_key_free( &sub_key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub key.", function ); goto on_error; } /* Retrieve the control set 1 key: SYSTEM\ControlSet001 */ sub_key_path = "ControlSet001"; sub_key_path_length = narrow_string_length( sub_key_path ); result = libregf_key_get_sub_key_by_utf8_path( registry_file->base_key, (uint8_t *) sub_key_path, sub_key_path_length, &( registry_file->control_set1_key ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key: %s.", function, sub_key_path ); goto on_error; } /* Retrieve the control set 2 key: SYSTEM\ControlSet002 */ sub_key_path = "ControlSet002"; sub_key_path_length = narrow_string_length( sub_key_path ); result = libregf_key_get_sub_key_by_utf8_path( registry_file->base_key, (uint8_t *) sub_key_path, sub_key_path_length, &( registry_file->control_set2_key ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub key: %s.", function, sub_key_path ); goto on_error; } if( ( registry_file->current_control_set != 0 ) || ( registry_file->control_set1_key != NULL ) || ( registry_file->control_set2_key != NULL ) ) { if( ( registry_file->current_control_set != 1 ) && ( registry_file->current_control_set != 2 ) ) { /* TODO print debug notification */ registry_file->current_control_set = 1; } if( ( registry_file->current_control_set == 1 ) && ( registry_file->control_set1_key != NULL ) ) { registry_file->current_control_set_key = registry_file->control_set1_key; } else if( ( registry_file->current_control_set == 2 ) && ( registry_file->control_set2_key != NULL ) ) { registry_file->current_control_set_key = registry_file->control_set2_key; } } registry_file->is_open = 1; return( 1 ); on_error: if( value != NULL ) { libregf_value_free( &value, NULL ); } if( sub_key != NULL ) { libregf_key_free( &sub_key, NULL ); } if( registry_file->control_set2_key != NULL ) { libregf_key_free( &( registry_file->control_set2_key ), NULL ); } if( registry_file->control_set1_key != NULL ) { libregf_key_free( &( registry_file->control_set1_key ), NULL ); } if( ( registry_file->base_key != NULL ) && ( registry_file->base_key != registry_file->root_key ) ) { libregf_key_free( &( registry_file->base_key ), NULL ); } if( name != NULL ) { memory_free( name ); } if( registry_file->root_key != NULL ) { libregf_key_free( &( registry_file->root_key ), NULL ); } libregf_file_close( registry_file->regf_file, NULL ); return( -1 ); } /* Closes the registry file * Returns the 0 if succesful or -1 on error */ int registry_file_close( registry_file_t *registry_file, libcerror_error_t **error ) { static char *function = "registry_file_close"; int result = 0; if( registry_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid registry file.", function ); return( -1 ); } if( registry_file->is_open != 0 ) { if( registry_file->control_set2_key != NULL ) { if( libregf_key_free( &( registry_file->control_set2_key ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free control set 2 key.", function ); result = -1; } } if( registry_file->control_set1_key != NULL ) { if( libregf_key_free( &( registry_file->control_set1_key ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free control set 1 key.", function ); result = -1; } } if( ( registry_file->base_key != NULL ) && ( registry_file->base_key != registry_file->root_key ) ) { if( libregf_key_free( &( registry_file->base_key ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free base key.", function ); result = -1; } } if( registry_file->root_key != NULL ) { if( libregf_key_free( &( registry_file->root_key ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free root key.", function ); result = -1; } } if( libregf_file_close( registry_file->regf_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close REGF file.", function ); result = -1; } registry_file->is_open = 0; } return( result ); } /* Retrieves the key specified by the path * Returns 1 if successful or -1 on error */ int registry_file_get_key_by_path( registry_file_t *registry_file, const system_character_t *key_path, size_t key_path_length, libregf_key_t **key, libcerror_error_t **error ) { static char *function = "registry_file_get_key_by_path"; int result = 0; if( registry_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid registry file.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libregf_key_get_sub_key_by_utf16_path( registry_file->base_key, (uint16_t *) key_path, key_path_length, key, error ); #else result = libregf_key_get_sub_key_by_utf8_path( registry_file->base_key, (uint8_t *) key_path, key_path_length, key, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key by path: %" PRIs_SYSTEM ".", function, key_path ); return( -1 ); } return( result ); } libevt-20170120/evttools/evtinput.c0000664000175000017500000001153413040336531021240 0ustar00lordyestalordyesta00000000000000/* * Common input functions for the evttools * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "evtinput.h" #include "evttools_libcerror.h" #include "evttools_libcpath.h" #include "evttools_libevt.h" #include "evttools_wide_string.h" /* Determines the event log type from a string * Returns 1 if successful, 0 if unsupported value or -1 on error */ int evtinput_determine_event_log_type( const system_character_t *string, int *event_log_type, libcerror_error_t **error ) { static char *function = "evtinput_determine_event_log_type"; size_t string_length = 0; int result = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( event_log_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event log type.", function ); return( -1 ); } string_length = system_string_length( string ); if( string_length == 6 ) { if( system_string_compare_no_case( string, _SYSTEM_STRING( "system" ), 6 ) == 0 ) { *event_log_type = EVTTOOLS_EVENT_LOG_TYPE_SYSTEM; result = 1; } } else if( string_length == 8 ) { if( system_string_compare_no_case( string, _SYSTEM_STRING( "security" ), 8 ) == 0 ) { *event_log_type = EVTTOOLS_EVENT_LOG_TYPE_SECURITY; result = 1; } } else if( string_length == 11 ) { if( system_string_compare_no_case( string, _SYSTEM_STRING( "application" ), 11 ) == 0 ) { *event_log_type = EVTTOOLS_EVENT_LOG_TYPE_APPLICATION; result = 1; } } return( result ); } /* Determines the event log type from the filename * Returns 1 if successful, 0 if unsupported value or -1 on error */ int evtinput_determine_event_log_type_from_filename( const system_character_t *filename, int *event_log_type, libcerror_error_t **error ) { const system_character_t *path_separator = NULL; static char *function = "evtinput_determine_event_log_type_from_filename"; 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 ); } if( event_log_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event log type.", function ); return( -1 ); } filename_length = system_string_length( filename ); path_separator = system_string_search_character_reverse( filename, (system_character_t) LIBCPATH_SEPARATOR, filename_length ); if( path_separator == NULL ) { path_separator = filename; } else { path_separator++; filename_length = system_string_length( path_separator ); } if( filename_length == 12 ) { if( system_string_compare_no_case( path_separator, _SYSTEM_STRING( "AppEvent.Evt" ), 12 ) == 0 ) { *event_log_type = EVTTOOLS_EVENT_LOG_TYPE_APPLICATION; result = 1; } else if( system_string_compare_no_case( path_separator, _SYSTEM_STRING( "Internet.Evt" ), 12 ) == 0 ) { *event_log_type = EVTTOOLS_EVENT_LOG_TYPE_INTERNET_EXPLORER; result = 1; } else if( system_string_compare_no_case( path_separator, _SYSTEM_STRING( "SecEvent.Evt" ), 12 ) == 0 ) { *event_log_type = EVTTOOLS_EVENT_LOG_TYPE_SECURITY; result = 1; } else if( system_string_compare_no_case( path_separator, _SYSTEM_STRING( "SysEvent.Evt" ), 12 ) == 0 ) { *event_log_type = EVTTOOLS_EVENT_LOG_TYPE_SYSTEM; result = 1; } } return( result ); } libevt-20170120/evttools/evttools_signal.c0000664000175000017500000001303513040331673022576 0ustar00lordyestalordyesta00000000000000/* * Signal handling functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_SIGNAL_H ) #include #endif #if defined( _MSC_VER ) #include #endif #include "evttools_libcerror.h" #include "evttools_signal.h" #if defined( WINAPI ) void (*evttools_signal_signal_handler)( evttools_signal_t ) = NULL; /* Signal handler for Ctrl+C or Ctrl+Break signals */ BOOL WINAPI evttools_signal_handler( unsigned long signal ) { static char *function = "evttools_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( evttools_signal_signal_handler != NULL ) { evttools_signal_signal_handler( signal ); } return( TRUE ); default: break; } return( FALSE ); } #if defined( _MSC_VER ) /* Initialize memory usage and leakage debugging */ void evttools_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 evttools_signal_attach( void (*signal_handler)( evttools_signal_t ), libcerror_error_t **error ) { static char *function = "evttools_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 ); } evttools_signal_signal_handler = signal_handler; if( SetConsoleCtrlHandler( evttools_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 ) evttools_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 evttools_signal_detach( libcerror_error_t **error ) { static char *function = "evttools_signal_detach"; if( SetConsoleCtrlHandler( evttools_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 ); } evttools_signal_signal_handler = NULL; return( 1 ); } #else /* Attaches a signal handler for SIGINT * Returns 1 if successful or -1 on error */ int evttools_signal_attach( void (*signal_handler)( evttools_signal_t ), libcerror_error_t **error ) { static char *function = "evttools_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 evttools_signal_detach( libcerror_error_t **error ) { static char *function = "evttools_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 ) */ libevt-20170120/evttools/evttools_libevt.h0000664000175000017500000000224313040331673022612 0ustar00lordyestalordyesta00000000000000/* * The internal libevt header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBEVT_H ) #define _EVTTOOLS_LIBEVT_H #include /* If Cygwin libtool DLL support is enabled set LIBEVT_DLL_IMPORT * before including libevt.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBEVT_DLL_IMPORT #endif #include #endif /* !defined( _EVTTOOLS_LIBEVT_H ) */ libevt-20170120/evttools/export_handle.c0000664000175000017500000013346713040331673022232 0ustar00lordyestalordyesta00000000000000/* * Export handle * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "evtinput.h" #include "evttools_libcerror.h" #include "evttools_libcnotify.h" #include "evttools_libclocale.h" #include "evttools_libevt.h" #include "evttools_libfdatetime.h" #include "export_handle.h" #include "log_handle.h" #include "message_handle.h" #include "message_string.h" #include "resource_file.h" #define EXPORT_HANDLE_NOTIFY_STREAM stdout const char *export_handle_get_event_log_key_name( int event_log_type ) { switch( event_log_type ) { case EVTTOOLS_EVENT_LOG_TYPE_APPLICATION: return( "Application" ); case EVTTOOLS_EVENT_LOG_TYPE_INTERNET_EXPLORER: return( "Internet Explorer" ); case EVTTOOLS_EVENT_LOG_TYPE_SECURITY: return( "Security" ); case EVTTOOLS_EVENT_LOG_TYPE_SYSTEM: return( "System" ); case EVTTOOLS_EVENT_LOG_TYPE_WINDOWS_POWERSHELL: return( "Windows PowerShell" ); default: break; } return( "(Unknown)" ); } const char *export_handle_get_event_type( uint16_t event_type ) { switch( event_type ) { case LIBEVT_EVENT_TYPE_ERROR: return( "Error event" ); case LIBEVT_EVENT_TYPE_WARNING: return( "Warning event" ); case LIBEVT_EVENT_TYPE_INFORMATION: return( "Information event" ); case LIBEVT_EVENT_TYPE_AUDIT_SUCCESS: return( "Success Audit event" ); case LIBEVT_EVENT_TYPE_AUDIT_FAILURE: return( "Failure Audit event" ); default: break; } return( "(Unknown)" ); } /* 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( message_handle_initialize( &( ( *export_handle )->message_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create message handle.", function ); goto on_error; } if( libevt_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_ITEMS; ( *export_handle )->event_log_type = EVTTOOLS_EVENT_LOG_TYPE_UNKNOWN; ( *export_handle )->ascii_codepage = LIBEVT_CODEPAGE_WINDOWS_1252; ( *export_handle )->notify_stream = EXPORT_HANDLE_NOTIFY_STREAM; return( 1 ); on_error: if( *export_handle != NULL ) { if( ( *export_handle )->message_handle != NULL ) { message_handle_free( &( ( *export_handle )->message_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( ( *export_handle )->input_is_open != 0 ) { if( export_handle_close_input( *export_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close export handle.", function ); result = -1; } } if( message_handle_free( &( ( *export_handle )->message_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free message handle.", function ); result = -1; } if( libevt_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; } 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; if( message_handle_signal_abort( export_handle->message_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to signal message handle to abort.", function ); return( -1 ); } if( export_handle->input_file != NULL ) { if( libevt_file_signal_abort( export_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 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 == 5 ) { if( system_string_compare( string, _SYSTEM_STRING( "items" ), 5 ) == 0 ) { export_handle->export_mode = EXPORT_MODE_ITEMS; result = 1; } } else if( string_length == 9 ) { if( system_string_compare( string, _SYSTEM_STRING( "recovered" ), 9 ) == 0 ) { export_handle->export_mode = EXPORT_MODE_RECOVERED; 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 ); } else if( result != 0 ) { if( message_handle_set_ascii_codepage( export_handle->message_handle, export_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set ASCII codepage in message handle.", function ); return( -1 ); } } return( result ); } /* Sets the preferred language identifier * Returns 1 if successful or -1 on error */ int export_handle_set_preferred_language_identifier( export_handle_t *export_handle, uint32_t preferred_language_identifier, libcerror_error_t **error ) { static char *function = "export_handle_set_preferred_language_identifier"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( message_handle_set_preferred_language_identifier( export_handle->message_handle, preferred_language_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set preferred language identifier in message handle.", function ); return( -1 ); } return( 1 ); } /* Sets the event log type * Returns 1 if successful or -1 on error */ int export_handle_set_event_log_type( export_handle_t *export_handle, const system_character_t *string, libcerror_error_t **error ) { static char *function = "export_handle_set_event_log_type"; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } result = evtinput_determine_event_log_type( string, &( export_handle->event_log_type ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine event log type.", function ); return( -1 ); } return( result ); } /* Sets the event log type from the filename * Returns 1 if successful or -1 on error */ int export_handle_set_event_log_type_from_filename( export_handle_t *export_handle, const system_character_t *filename, libcerror_error_t **error ) { static char *function = "export_handle_set_event_log_type_from_filename"; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } result = evtinput_determine_event_log_type_from_filename( filename, &( export_handle->event_log_type ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine event log type from filename.", function ); return( -1 ); } return( result ); } /* Sets the name of the software registry file * Returns 1 if successful or -1 error */ int export_handle_set_software_registry_filename( export_handle_t *export_handle, const system_character_t *filename, libcerror_error_t **error ) { static char *function = "export_handle_set_software_registry_filename"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( message_handle_set_software_registry_filename( export_handle->message_handle, filename, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set SOFTWARE registry filename in message handle.", function ); return( -1 ); } return( 1 ); } /* Sets the name of the system registry file * Returns 1 if successful or -1 error */ int export_handle_set_system_registry_filename( export_handle_t *export_handle, const system_character_t *filename, libcerror_error_t **error ) { static char *function = "export_handle_set_system_registry_filename"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( message_handle_set_system_registry_filename( export_handle->message_handle, filename, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set SYSTEM registry filename in message handle.", function ); return( -1 ); } return( 1 ); } /* Sets the name of the directory containing the software and system registry file * Returns 1 if successful or -1 error */ int export_handle_set_registry_directory_name( export_handle_t *export_handle, const system_character_t *name, libcerror_error_t **error ) { static char *function = "export_handle_set_registry_directory_name"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( message_handle_set_registry_directory_name( export_handle->message_handle, name, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set registry directory name in message handle.", function ); return( -1 ); } return( 1 ); } /* Sets the path of the resource files * Returns 1 if successful or -1 error */ int export_handle_set_resource_files_path( export_handle_t *export_handle, const system_character_t *path, libcerror_error_t **error ) { static char *function = "export_handle_set_resource_files_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( message_handle_set_resource_files_path( export_handle->message_handle, path, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set resource files path in message handle.", function ); return( -1 ); } return( 1 ); } /* Opens the input * Returns 1 if successful or -1 on error */ int export_handle_open_input( export_handle_t *export_handle, const system_character_t *filename, libcerror_error_t **error ) { static char *function = "export_handle_open_input"; 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->input_is_open != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid export handle input is already open.", function ); return( -1 ); } if( message_handle_open_input( export_handle->message_handle, export_handle_get_event_log_key_name( export_handle->event_log_type ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open input of message handle.", function ); return( -1 ); } if( libevt_file_set_ascii_codepage( export_handle->input_file, export_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set ASCII codepage in input file.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libevt_file_open_wide( export_handle->input_file, filename, LIBEVT_OPEN_READ, error ) != 1 ) #else if( libevt_file_open( export_handle->input_file, filename, LIBEVT_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 ); } export_handle->input_is_open = 1; return( 1 ); } /* Closes the input * Returns the 0 if succesful or -1 on error */ int export_handle_close_input( export_handle_t *export_handle, libcerror_error_t **error ) { static char *function = "export_handle_close_input"; 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->input_is_open != 0 ) { if( message_handle_close_input( export_handle->message_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close input of message handle.", function ); result = -1; } if( libevt_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 ); result = -1; } export_handle->input_is_open = 0; } return( result ); } /* Exports the record event category * Returns 1 if successful or -1 on error */ int export_handle_export_record_event_category( export_handle_t *export_handle, libevt_record_t *record, const system_character_t *event_source, size_t event_source_length, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t *message_filename = NULL; message_string_t *message_string = NULL; static char *function = "export_handle_export_record_event_category"; size_t message_filename_size = 0; size_t message_string_index = 0; uint16_t event_category = 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( libevt_record_get_event_category( record, &event_category, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve event category.", function ); goto on_error; } if( event_source != NULL ) { result = message_handle_get_value_by_event_source( export_handle->message_handle, event_source, event_source_length, _SYSTEM_STRING( "CategoryMessageFile" ), 19, &message_filename, &message_filename_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve category message filename.", function ); goto on_error; } else if( result != 0 ) { fprintf( export_handle->notify_stream, "Category message filename\t: %" PRIs_SYSTEM "\n", message_filename ); result = message_handle_get_message_string( export_handle->message_handle, message_filename, message_filename_size - 1, (uint32_t) event_category, &message_string, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message string: 0x%08" PRIx32 " from: %" PRIs_SYSTEM ".", function, (uint32_t) event_category, message_filename ); goto on_error; } memory_free( message_filename ); message_filename = NULL; } } if( message_string != NULL ) { for( message_string_index = 0; message_string_index < message_string->string_size; message_string_index++ ) { if( ( ( message_string->string )[ message_string_index ] == (system_character_t) '\n' ) || ( ( message_string->string )[ message_string_index ] == (system_character_t) '\r' ) ) { ( message_string->string )[ message_string_index ] = 0; } } fprintf( export_handle->notify_stream, "Event category\t\t\t: %" PRIs_SYSTEM " (%" PRIu16 ")\n", message_string->string, event_category ); } else { fprintf( export_handle->notify_stream, "Event category\t\t\t: %" PRIu16 "\n", event_category ); } return( 1 ); on_error: if( message_filename != NULL ) { memory_free( message_filename ); } return( -1 ); } /* Exports the record event message * Returns 1 if successful or -1 on error */ int export_handle_export_record_event_message( export_handle_t *export_handle, libevt_record_t *record, const system_character_t *event_source, size_t event_source_length, uint32_t event_identifier, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t *message_filename = NULL; message_string_t *message_string = NULL; system_character_t *value_string = NULL; static char *function = "export_handle_export_record_event_message"; size_t message_filename_size = 0; size_t value_string_size = 0; int number_of_strings = 0; int result = 0; int value_string_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( event_source != NULL ) { result = message_handle_get_value_by_event_source( export_handle->message_handle, event_source, event_source_length, _SYSTEM_STRING( "EventMessageFile" ), 16, &message_filename, &message_filename_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message filename.", function ); goto on_error; } else if( result != 0 ) { fprintf( export_handle->notify_stream, "Message filename\t\t: %" PRIs_SYSTEM "\n", message_filename ); result = message_handle_get_message_string( export_handle->message_handle, message_filename, message_filename_size - 1, event_identifier, &message_string, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message string: 0x%08" PRIx32 " from: %" PRIs_SYSTEM ".", function, event_identifier, message_filename ); goto on_error; } memory_free( message_filename ); message_filename = NULL; } } if( libevt_record_get_number_of_strings( record, &number_of_strings, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of strings in record.", function ); goto on_error; } fprintf( export_handle->notify_stream, "Number of strings\t\t: %d\n", number_of_strings ); for( value_string_index = 0; value_string_index < number_of_strings; value_string_index++ ) { fprintf( export_handle->notify_stream, "String: %d\t\t\t: ", value_string_index + 1 ); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libevt_record_get_utf16_string_size( record, value_string_index, &value_string_size, error ); #else result = libevt_record_get_utf8_string_size( record, value_string_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 string: %d size.", function, value_string_index ); 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 value string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libevt_record_get_utf16_string( record, value_string_index, (uint16_t *) value_string, value_string_size, error ); #else result = libevt_record_get_utf8_string( record, value_string_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 string: %d.", function, value_string_index ); goto on_error; } fprintf( export_handle->notify_stream, "%" PRIs_SYSTEM "", value_string ); memory_free( value_string ); value_string = NULL; } fprintf( export_handle->notify_stream, "\n" ); } if( message_string != NULL ) { if( message_string_fprint( message_string, record, export_handle->notify_stream, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print message string.", function ); goto on_error; } } return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } if( message_filename != NULL ) { memory_free( message_filename ); } return( -1 ); } /* Exports the record * Returns 1 if successful or -1 on error */ int export_handle_export_record( export_handle_t *export_handle, libevt_record_t *record, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t posix_time_string[ 32 ]; system_character_t *source_name = NULL; system_character_t *value_string = NULL; libfdatetime_posix_time_t *posix_time = NULL; static char *function = "export_handle_export_record"; size_t source_name_size = 0; size_t value_string_size = 0; uint32_t event_identifier = 0; uint32_t value_32bit = 0; uint16_t event_type = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( libfdatetime_posix_time_initialize( &posix_time, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create POSIX time.", function ); goto on_error; } if( libevt_record_get_identifier( record, &value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); goto on_error; } fprintf( export_handle->notify_stream, "Event number\t\t\t: %" PRIu32 "\n", value_32bit ); if( libevt_record_get_creation_time( record, &value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve creation time.", function ); goto on_error; } if( libfdatetime_posix_time_copy_from_32bit( posix_time, value_32bit, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to copy POSIX time from 32-bit.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfdatetime_posix_time_copy_to_utf16_string( posix_time, (uint16_t *) posix_time_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, error ); #else result = libfdatetime_posix_time_copy_to_utf8_string( posix_time, (uint8_t *) posix_time_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to copy POSIX time to string.", function ); goto on_error; } fprintf( export_handle->notify_stream, "Creation time\t\t\t: %" PRIs_SYSTEM " UTC\n", posix_time_string ); if( libevt_record_get_written_time( record, &value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve written time.", function ); goto on_error; } if( libfdatetime_posix_time_copy_from_32bit( posix_time, value_32bit, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to copy POSIX time from 32-bit.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfdatetime_posix_time_copy_to_utf16_string( posix_time, (uint16_t *) posix_time_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, error ); #else result = libfdatetime_posix_time_copy_to_utf8_string( posix_time, (uint8_t *) posix_time_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to copy POSIX time to string.", function ); goto on_error; } fprintf( export_handle->notify_stream, "Written time\t\t\t: %" PRIs_SYSTEM " UTC\n", posix_time_string ); if( libfdatetime_posix_time_free( &posix_time, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free POSIX time.", function ); goto on_error; } if( libevt_record_get_event_type( record, &event_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve event type.", function ); goto on_error; } fprintf( export_handle->notify_stream, "Event type\t\t\t: %s (%" PRIu16 ")\n", export_handle_get_event_type( event_type ), event_type ); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libevt_record_get_utf16_user_security_identifier_size( record, &value_string_size, error ); #else result = libevt_record_get_utf8_user_security_identifier_size( record, &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 user security identifier size.", function ); goto on_error; } if( ( result != 0 ) && ( 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 value string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libevt_record_get_utf16_user_security_identifier( record, (uint16_t *) value_string, value_string_size, error ); #else result = libevt_record_get_utf8_user_security_identifier( record, (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 user security identifier.", function ); goto on_error; } fprintf( export_handle->notify_stream, "User security identifier\t: %" PRIs_SYSTEM "\n", value_string ); memory_free( value_string ); value_string = NULL; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libevt_record_get_utf16_computer_name_size( record, &value_string_size, error ); #else result = libevt_record_get_utf8_computer_name_size( record, &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 computer name size.", function ); goto on_error; } if( ( result != 0 ) && ( 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 value string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libevt_record_get_utf16_computer_name( record, (uint16_t *) value_string, value_string_size, error ); #else result = libevt_record_get_utf8_computer_name( record, (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 computer name.", function ); goto on_error; } fprintf( export_handle->notify_stream, "Computer name\t\t\t: %" PRIs_SYSTEM "\n", value_string ); memory_free( value_string ); value_string = NULL; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libevt_record_get_utf16_source_name_size( record, &source_name_size, error ); #else result = libevt_record_get_utf8_source_name_size( record, &source_name_size, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve source name size.", function ); goto on_error; } if( ( result != 0 ) && ( source_name_size > 0 ) ) { source_name = system_string_allocate( source_name_size ); if( source_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create event source.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libevt_record_get_utf16_source_name( record, (uint16_t *) source_name, source_name_size, error ); #else result = libevt_record_get_utf8_source_name( record, (uint8_t *) source_name, source_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve source name.", function ); goto on_error; } fprintf( export_handle->notify_stream, "Source name\t\t\t: %" PRIs_SYSTEM "\n", source_name ); } if( export_handle_export_record_event_category( export_handle, record, source_name, source_name_size - 1, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export event category.", function ); goto on_error; } if( libevt_record_get_event_identifier( record, &event_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve event identifier.", function ); goto on_error; } fprintf( export_handle->notify_stream, "Event identifier\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", event_identifier, event_identifier ); if( export_handle_export_record_event_message( export_handle, record, source_name, source_name_size - 1, event_identifier, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export event message.", function ); goto on_error; } fprintf( export_handle->notify_stream, "\n" ); if( source_name != NULL ) { memory_free( source_name ); source_name = NULL; } return( 1 ); on_error: if( source_name != NULL ) { memory_free( source_name ); } if( value_string != NULL ) { memory_free( value_string ); } if( posix_time != NULL ) { libfdatetime_posix_time_free( &posix_time, NULL ); } return( -1 ); } /* Exports the records * Returns the 1 if succesful, 0 if no records are available or -1 on error */ int export_handle_export_records( export_handle_t *export_handle, libevt_file_t *file, log_handle_t *log_handle, libcerror_error_t **error ) { libevt_record_t *record = NULL; static char *function = "export_handle_export_records"; int number_of_records = 0; int record_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( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } if( libevt_file_get_number_of_records( file, &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 ); return( -1 ); } if( number_of_records == 0 ) { return( 0 ); } for( record_index = 0; record_index < number_of_records; record_index++ ) { if( export_handle->abort != 0 ) { return( -1 ); } if( libevt_file_get_record( file, record_index, &record, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record: %d.", function, record_index ); return( -1 ); } if( export_handle_export_record( export_handle, record, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record: %d.", function, record_index ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( libevt_record_free( &record, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free record: %d.", function, record_index ); return( -1 ); } } return( 1 ); } /* Exports the recovered records * Returns the 1 if succesful, 0 if no records are available or -1 on error */ int export_handle_export_recovered_records( export_handle_t *export_handle, libevt_file_t *file, log_handle_t *log_handle, libcerror_error_t **error ) { libevt_record_t *record = NULL; static char *function = "export_handle_export_recovered_records"; int number_of_records = 0; int record_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( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } if( libevt_file_get_number_of_recovered_records( file, &number_of_records, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered records.", function ); return( -1 ); } if( number_of_records == 0 ) { return( 0 ); } for( record_index = 0; record_index < number_of_records; record_index++ ) { if( export_handle->abort != 0 ) { return( -1 ); } if( libevt_file_get_recovered_record( file, record_index, &record, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recovered record: %d.", function, record_index ); return( -1 ); } if( export_handle_export_record( export_handle, record, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export recovered record: %d.", function, record_index ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( libevt_record_free( &record, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free record: %d.", function, record_index ); return( -1 ); } } return( 1 ); } /* Exports the records from the file * Returns the 1 if succesful, 0 if no records are available or -1 on error */ int export_handle_export_file( export_handle_t *export_handle, log_handle_t *log_handle, libcerror_error_t **error ) { static char *function = "export_handle_export_file"; int result_recovered_records = 0; int result_records = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( export_handle->export_mode != EXPORT_MODE_RECOVERED ) { result_records = export_handle_export_records( export_handle, export_handle->input_file, log_handle, error ); if( result_records == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export records.", function ); return( -1 ); } } if( export_handle->export_mode != EXPORT_MODE_ITEMS ) { result_recovered_records = export_handle_export_recovered_records( export_handle, export_handle->input_file, log_handle, error ); if( result_recovered_records == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export recovered records.", function ); return( -1 ); } } if( ( result_records != 0 ) || ( result_recovered_records != 0 ) ) { return( 1 ); } return( 0 ); } libevt-20170120/evttools/info_handle.h0000664000175000017500000000451713040331673021642 0ustar00lordyestalordyesta00000000000000/* * Info handle * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _INFO_HANDLE_H ) #define _INFO_HANDLE_H #include #include #include #include "evttools_libcerror.h" #include "evttools_libevt.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct info_handle info_handle_t; struct info_handle { /* The libevt input file */ libevt_file_t *input_file; /* The event log type */ int event_log_type; /* The ascii codepage */ int ascii_codepage; /* The notification output stream */ FILE *notify_stream; /* Value to indicate if abort was signalled */ int abort; }; 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_set_event_log_type_from_filename( info_handle_t *info_handle, const system_character_t *filename, libcerror_error_t **error ); int info_handle_open_input( info_handle_t *info_handle, const system_character_t *filename, libcerror_error_t **error ); int info_handle_close_input( info_handle_t *info_handle, 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 ) */ libevt-20170120/evttools/Makefile.in0000664000175000017500000010754613040342657021302 0ustar00lordyestalordyesta00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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 = evtexport$(EXEEXT) evtinfo$(EXEEXT) subdir = evttools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/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/libcdirectory.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/libexe.m4 \ $(top_srcdir)/m4/libfcache.m4 $(top_srcdir)/m4/libfdata.m4 \ $(top_srcdir)/m4/libfdatetime.m4 $(top_srcdir)/m4/libfguid.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwevt.m4 \ $(top_srcdir)/m4/libfwnt.m4 $(top_srcdir)/m4/libregf.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/libwrc.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_evtexport_OBJECTS = export_handle.$(OBJEXT) evtexport.$(OBJEXT) \ evtinput.$(OBJEXT) evttools_getopt.$(OBJEXT) \ evttools_output.$(OBJEXT) evttools_signal.$(OBJEXT) \ evttools_wide_string.$(OBJEXT) log_handle.$(OBJEXT) \ message_handle.$(OBJEXT) message_string.$(OBJEXT) \ path_handle.$(OBJEXT) registry_file.$(OBJEXT) \ resource_file.$(OBJEXT) evtexport_OBJECTS = $(am_evtexport_OBJECTS) evtexport_DEPENDENCIES = ../libevt/libevt.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_evtinfo_OBJECTS = evtinfo.$(OBJEXT) evtinput.$(OBJEXT) \ evttools_getopt.$(OBJEXT) evttools_output.$(OBJEXT) \ evttools_signal.$(OBJEXT) evttools_wide_string.$(OBJEXT) \ info_handle.$(OBJEXT) evtinfo_OBJECTS = $(am_evtinfo_OBJECTS) evtinfo_DEPENDENCIES = ../libevt/libevt.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__depfiles_maybe = depfiles 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 = $(evtexport_SOURCES) $(evtinfo_SOURCES) DIST_SOURCES = $(evtexport_SOURCES) $(evtinfo_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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)` ETAGS = etags CTAGS = ctags 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@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_LIBCDIRECTORY = @HAVE_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LIBEXE@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWEVT = @HAVE_LIBFWEVT@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBREGF = @HAVE_LIBREGF@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LIBWRC = @HAVE_LIBWRC@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ HAVE_LOCAL_LIBCDIRECTORY = @HAVE_LOCAL_LIBCDIRECTORY@ 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_LIBEXE = @HAVE_LOCAL_LIBEXE@ 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_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWEVT = @HAVE_LOCAL_LIBFWEVT@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBREGF = @HAVE_LOCAL_LIBREGF@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_LOCAL_LIBWRC = @HAVE_LOCAL_LIBWRC@ 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@ LIBCDIRECTORY_CPPFLAGS = @LIBCDIRECTORY_CPPFLAGS@ LIBCDIRECTORY_LIBADD = @LIBCDIRECTORY_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@ LIBEVT_DLL_IMPORT = @LIBEVT_DLL_IMPORT@ LIBEXE_CPPFLAGS = @LIBEXE_CPPFLAGS@ LIBEXE_LIBADD = @LIBEXE_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWEVT_CPPFLAGS = @LIBFWEVT_CPPFLAGS@ LIBFWEVT_LIBADD = @LIBFWEVT_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREGF_CPPFLAGS = @LIBREGF_CPPFLAGS@ LIBREGF_LIBADD = @LIBREGF_LIBADD@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIBWRC_CPPFLAGS = @LIBWRC_CPPFLAGS@ LIBWRC_LIBADD = @LIBWRC_LIBADD@ 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@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PWD = @PWD@ PYTHON = @PYTHON@ PYTHON2 = @PYTHON2@ PYTHON2_CONFIG = @PYTHON2_CONFIG@ PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@ PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@ PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@ PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@ PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@ PYTHON2_PLATFORM = @PYTHON2_PLATFORM@ PYTHON2_PREFIX = @PYTHON2_PREFIX@ PYTHON2_VERSION = @PYTHON2_VERSION@ PYTHON3 = @PYTHON3@ PYTHON3_CONFIG = @PYTHON3_CONFIG@ PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@ PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@ PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@ PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ PYTHON3_PREFIX = @PYTHON3_PREFIX@ PYTHON3_VERSION = @PYTHON3_VERSION@ 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@ PYTHON_VERSION = @PYTHON_VERSION@ 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_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_libcdirectory_pc_libs_private = @ax_libcdirectory_pc_libs_private@ ax_libcdirectory_spec_build_requires = @ax_libcdirectory_spec_build_requires@ ax_libcdirectory_spec_requires = @ax_libcdirectory_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_libexe_pc_libs_private = @ax_libexe_pc_libs_private@ ax_libexe_spec_build_requires = @ax_libexe_spec_build_requires@ ax_libexe_spec_requires = @ax_libexe_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_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_libfwevt_pc_libs_private = @ax_libfwevt_pc_libs_private@ ax_libfwevt_spec_build_requires = @ax_libfwevt_spec_build_requires@ ax_libfwevt_spec_requires = @ax_libfwevt_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_libregf_pc_libs_private = @ax_libregf_pc_libs_private@ ax_libregf_spec_build_requires = @ax_libregf_spec_build_requires@ ax_libregf_spec_requires = @ax_libregf_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_libwrc_pc_libs_private = @ax_libwrc_pc_libs_private@ ax_libwrc_spec_build_requires = @ax_libwrc_spec_build_requires@ ax_libwrc_spec_requires = @ax_libwrc_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@ libcdirectory_CFLAGS = @libcdirectory_CFLAGS@ libcdirectory_LIBS = @libcdirectory_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@ libevt_spec_build_requires = @libevt_spec_build_requires@ libevt_spec_requires = @libevt_spec_requires@ libevt_tools_spec_build_requires = @libevt_tools_spec_build_requires@ libexe_CFLAGS = @libexe_CFLAGS@ libexe_LIBS = @libexe_LIBS@ 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@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwevt_CFLAGS = @libfwevt_CFLAGS@ libfwevt_LIBS = @libfwevt_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libregf_CFLAGS = @libregf_CFLAGS@ libregf_LIBS = @libregf_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ libwrc_CFLAGS = @libwrc_CFLAGS@ libwrc_LIBS = @libwrc_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@ pyexecdir2 = @pyexecdir2@ pyexecdir3 = @pyexecdir3@ pythondir = @pythondir@ pythondir2 = @pythondir2@ pythondir3 = @pythondir3@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @LIBFCACHE_CPPFLAGS@ \ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFVALUE_CPPFLAGS@ \ @LIBFWEVT_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @LIBEXE_CPPFLAGS@ \ @LIBREGF_CPPFLAGS@ \ @LIBWRC_CPPFLAGS@ \ @LIBCDIRECTORY_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ \ @LIBEVT_DLL_IMPORT@ AM_LDFLAGS = @STATIC_LDFLAGS@ evtexport_SOURCES = \ export_handle.c export_handle.h \ evtexport.c \ evtinput.c evtinput.h \ evttools_getopt.c evttools_getopt.h \ evttools_i18n.h \ evttools_libbfio.h \ evttools_libcdirectory.h \ evttools_libcerror.h \ evttools_libclocale.h \ evttools_libcnotify.h \ evttools_libcpath.h \ evttools_libcsplit.h \ evttools_libfcache.h \ evttools_libfdatetime.h \ evttools_libfwnt.h \ evttools_libevt.h \ evttools_libexe.h \ evttools_libregf.h \ evttools_libuna.h \ evttools_libwrc.h \ evttools_output.c evttools_output.h \ evttools_signal.c evttools_signal.h \ evttools_system_split_string.h \ evttools_unused.h \ evttools_wide_string.c evttools_wide_string.h \ log_handle.c log_handle.h \ message_handle.c message_handle.h \ message_string.c message_string.h \ path_handle.c path_handle.h \ registry_file.c registry_file.h \ resource_file.c resource_file.h evtexport_LDADD = \ @LIBREGF_LIBADD@ \ @LIBWRC_LIBADD@ \ @LIBEXE_LIBADD@ \ @LIBFVALUE_LIBADD@ \ @LIBFWNT_LIBADD@ \ @LIBFWEVT_LIBADD@ \ @LIBFGUID_LIBADD@ \ @LIBFDATETIME_LIBADD@ \ @LIBFDATA_LIBADD@ \ @LIBFCACHE_LIBADD@ \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCDIRECTORY_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libevt/libevt.la \ @LIBCTHREADS_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBINTL@ \ @PTHREAD_LIBADD@ evtinfo_SOURCES = \ evtinfo.c \ evtinput.c evtinput.h \ evttools_getopt.c evttools_getopt.h \ evttools_i18n.h \ evttools_libcerror.h \ evttools_libclocale.h \ evttools_libcnotify.h \ evttools_libfdatetime.h \ evttools_libfwnt.h \ evttools_libevt.h \ evttools_libuna.h \ evttools_output.c evttools_output.h \ evttools_signal.c evttools_signal.h \ evttools_unused.h \ evttools_wide_string.c evttools_wide_string.h \ info_handle.c info_handle.h evtinfo_LDADD = \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ ../libevt/libevt.la \ @LIBCTHREADS_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBINTL@ \ @PTHREAD_LIBADD@ MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu evttools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu evttools/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @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 evtexport$(EXEEXT): $(evtexport_OBJECTS) $(evtexport_DEPENDENCIES) $(EXTRA_evtexport_DEPENDENCIES) @rm -f evtexport$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evtexport_OBJECTS) $(evtexport_LDADD) $(LIBS) evtinfo$(EXEEXT): $(evtinfo_OBJECTS) $(evtinfo_DEPENDENCIES) $(EXTRA_evtinfo_DEPENDENCIES) @rm -f evtinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evtinfo_OBJECTS) $(evtinfo_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtexport.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtinput.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evttools_getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evttools_output.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evttools_signal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evttools_wide_string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/export_handle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_handle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_handle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/message_handle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/message_string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/path_handle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/registry_file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_file.Po@am__quote@ .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 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: $(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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on evtexport ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(evtexport_SOURCES) @echo "Running splint on evtinfo ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(evtinfo_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: libevt-20170120/evttools/evtinput.h0000664000175000017500000000314313040331673021244 0ustar00lordyestalordyesta00000000000000/* * Common input functions for the evttools * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTINPUT_H ) #define _EVTINPUT_H #include #include #include "evttools_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif enum EVTTOOLS_EVENT_LOG_TYPES { EVTTOOLS_EVENT_LOG_TYPE_UNKNOWN, EVTTOOLS_EVENT_LOG_TYPE_APPLICATION, EVTTOOLS_EVENT_LOG_TYPE_INTERNET_EXPLORER, EVTTOOLS_EVENT_LOG_TYPE_SECURITY, EVTTOOLS_EVENT_LOG_TYPE_SYSTEM, EVTTOOLS_EVENT_LOG_TYPE_WINDOWS_POWERSHELL, }; int evtinput_determine_event_log_type( const system_character_t *string, int *event_log_type, libcerror_error_t **error ); int evtinput_determine_event_log_type_from_filename( const system_character_t *filename, int *event_log_type, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _EVTINPUT_H ) */ libevt-20170120/evttools/evttools_libcerror.h0000664000175000017500000000271013040331673023307 0ustar00lordyestalordyesta00000000000000/* * The internal libcerror header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBCERROR_H ) #define _EVTTOOLS_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( _EVTTOOLS_LIBCERROR_H ) */ libevt-20170120/evttools/evttools_libfcache.h0000664000175000017500000000271313040331673023227 0ustar00lordyestalordyesta00000000000000/* * The internal libfcache header * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBFCACHE_H ) #define _EVTTOOLS_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 ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBFCACHE_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBFCACHE ) */ #endif /* !defined( _EVTTOOLS_LIBFCACHE_H ) */ libevt-20170120/evttools/evttools_i18n.h0000664000175000017500000000227113040331673022105 0ustar00lordyestalordyesta00000000000000/* * Internationalization (i18n) functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_I18N_H ) #define _EVTTOOLS_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( _EVTTOOLS_I18N_H ) */ libevt-20170120/evttools/path_handle.c0000664000175000017500000002176113040331673021636 0ustar00lordyestalordyesta00000000000000/* * Path handle * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #include "evttools_libcdirectory.h" #include "evttools_libcerror.h" #include "path_handle.h" /* Creates a path handle * Make sure the value path_handle is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int path_handle_initialize( path_handle_t **path_handle, libcerror_error_t **error ) { static char *function = "path_handle_initialize"; if( path_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path handle.", function ); return( -1 ); } if( *path_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid path handle value already set.", function ); return( -1 ); } *path_handle = memory_allocate_structure( path_handle_t ); if( *path_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create path handle.", function ); goto on_error; } if( memory_set( *path_handle, 0, sizeof( path_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear path handle.", function ); goto on_error; } return( 1 ); on_error: if( *path_handle != NULL ) { memory_free( *path_handle ); *path_handle = NULL; } return( -1 ); } /* Frees a path handle * Returns 1 if successful or -1 on error */ int path_handle_free( path_handle_t **path_handle, libcerror_error_t **error ) { static char *function = "path_handle_free"; int result = 1; if( path_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path handle.", function ); return( -1 ); } if( *path_handle != NULL ) { if( ( *path_handle )->system_root_path != NULL ) { memory_free( ( *path_handle )->system_root_path ); } memory_free( *path_handle ); *path_handle = NULL; } return( result ); } /* Retrieves the name of a directory entry by name ignoring case * If a corresponding entry is found entry name is update * This function is needed to find case insensitive directory entries on a case sensitive system * Return 1 if successful, 0 if no corresponding entry was found or -1 on error */ int path_handle_get_directory_entry_name_by_name_no_case( path_handle_t *path_handle, const system_character_t *path, size_t path_length, system_character_t *entry_name, size_t entry_name_size, uint8_t entry_type, libcerror_error_t **error ) { libcdirectory_directory_t *directory = NULL; libcdirectory_directory_entry_t *directory_entry = NULL; system_character_t *directory_entry_name = NULL; static char *function = "path_handle_get_directory_entry_name_by_name_no_case"; size_t directory_entry_name_length = 0; int result = 0; if( path_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path handle.", function ); return( -1 ); } if( path_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid path length value exceeds maximum.", function ); return( -1 ); } if( entry_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry name.", function ); return( -1 ); } if( entry_name_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entry name size value exceeds maximum.", function ); return( -1 ); } if( entry_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry name.", function ); return( -1 ); } if( libcdirectory_directory_initialize( &directory, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create directory.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libcdirectory_directory_open_wide( directory, path, error ); #else result = libcdirectory_directory_open( directory, path, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open directory: %" PRIs_SYSTEM ".", function, path ); goto on_error; } if( libcdirectory_directory_entry_initialize( &directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create directory entry.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libcdirectory_directory_has_entry_wide( directory, directory_entry, entry_name, entry_name_size - 1, entry_type, LIBCDIRECTORY_COMPARE_FLAG_NO_CASE, error ); #else result = libcdirectory_directory_has_entry( directory, directory_entry, entry_name, entry_name_size - 1, entry_type, LIBCDIRECTORY_COMPARE_FLAG_NO_CASE, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if directory has entry: %" PRIs_SYSTEM ".", function, entry_name ); goto on_error; } else if( result != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libcdirectory_directory_entry_get_name_wide( directory_entry, (wchar_t **) &directory_entry_name, error ); #else result = libcdirectory_directory_entry_get_name( directory_entry, (char **) &directory_entry_name, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve directory entry name.", function ); goto on_error; } directory_entry_name_length = system_string_length( directory_entry_name ); if( ( directory_entry_name_length + 1 ) != entry_name_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: entry name length value out of bounds.", function ); goto on_error; } if( system_string_copy( entry_name, directory_entry_name, directory_entry_name_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry name.", function ); goto on_error; } } if( libcdirectory_directory_entry_free( &directory_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free directory entry.", function ); goto on_error; } if( libcdirectory_directory_close( directory, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close directory.", function ); goto on_error; } if( libcdirectory_directory_free( &directory, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free directory.", function ); goto on_error; } return( result ); on_error: if( directory_entry != NULL ) { libcdirectory_directory_entry_free( &directory_entry, NULL ); } if( directory != NULL ) { libcdirectory_directory_free( &directory, NULL ); } return( -1 ); } libevt-20170120/evttools/message_string.h0000664000175000017500000000367213040331673022407 0ustar00lordyestalordyesta00000000000000/* * Message string * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _MESSAGE_STRING_H ) #define _MESSAGE_STRING_H #include #include #include #include "evttools_libcerror.h" #include "evttools_libevt.h" #include "evttools_libwrc.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct message_string message_string_t; struct message_string { /* The identifier */ uint32_t identifier; /* The string */ system_character_t *string; /* The string size */ size_t string_size; }; int message_string_initialize( message_string_t **message_string, uint32_t message_string_identifier, libcerror_error_t **error ); int message_string_free( message_string_t **message_string, libcerror_error_t **error ); int message_string_get_from_message_table_resource( message_string_t *message_string, libwrc_resource_t *message_table_resource, uint32_t language_identifier, libcerror_error_t **error ); int message_string_fprint( message_string_t *message_string, libevt_record_t *record, FILE *stream, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _MESSAGE_STRING_H ) */ libevt-20170120/evttools/evttools_getopt.c0000664000175000017500000001016413040331673022623 0ustar00lordyestalordyesta00000000000000/* * GetOpt functions * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "evttools_getopt.h" #include "evttools_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; /* 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 evttools_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 = "evttools_getopt"; size_t options_string_length = 0; if( optind >= argument_count ) { return( (system_integer_t) -1 ); } argument_value = argument_values[ optind ]; /* Check if the argument value is not an empty string */ if( *argument_value == 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++; } } /* 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 ) */ libevt-20170120/evttools/resource_file.c0000664000175000017500000010321613040331673022211 0ustar00lordyestalordyesta00000000000000/* * Resource file * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include #if defined( TIME_WITH_SYS_TIME ) #include #include #elif defined( HAVE_SYS_TIME_H ) #include #else #include #endif #include "evttools_libbfio.h" #include "evttools_libcerror.h" #include "evttools_libexe.h" #include "evttools_libfcache.h" #include "evttools_libwrc.h" #include "message_string.h" #include "resource_file.h" /* Creates a resource file * Make sure the value resource_file is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int resource_file_initialize( resource_file_t **resource_file, uint32_t preferred_language_identifier, libcerror_error_t **error ) { static char *function = "resource_file_initialize"; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( *resource_file != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid resource file value already set.", function ); return( -1 ); } *resource_file = memory_allocate_structure( resource_file_t ); if( *resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create resource file.", function ); goto on_error; } if( memory_set( *resource_file, 0, sizeof( resource_file_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear resource file.", function ); memory_free( *resource_file ); *resource_file = NULL; return( -1 ); } if( libexe_file_initialize( &( ( *resource_file )->exe_file ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create EXE file.", function ); goto on_error; } if( libwrc_stream_initialize( &( ( *resource_file )->resource_stream ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create resource stream.", function ); goto on_error; } if( libfcache_cache_initialize( &( ( *resource_file )->message_string_cache ), 16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create message string cache.", function ); goto on_error; } ( *resource_file )->preferred_language_identifier = preferred_language_identifier; return( 1 ); on_error: if( *resource_file != NULL ) { if( ( *resource_file )->resource_stream != NULL ) { libwrc_stream_free( &( ( *resource_file )->resource_stream ), NULL ); } if( ( *resource_file )->exe_file != NULL ) { libexe_file_free( &( ( *resource_file )->exe_file ), NULL ); } memory_free( *resource_file ); *resource_file = NULL; } return( -1 ); } /* Frees a resource file * Returns 1 if successful or -1 on error */ int resource_file_free( resource_file_t **resource_file, libcerror_error_t **error ) { static char *function = "resource_file_free"; int result = 1; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( *resource_file != NULL ) { if( ( *resource_file )->is_open != 0 ) { if( resource_file_close( *resource_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close resource file.", function ); result = -1; } } if( libfcache_cache_free( &( ( *resource_file )->message_string_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free message string cache.", function ); result = -1; } if( libwrc_stream_free( &( ( *resource_file )->resource_stream ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free resource stream.", function ); result = -1; } if( libexe_file_free( &( ( *resource_file )->exe_file ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free EXE file.", function ); result = -1; } if( ( *resource_file )->name != NULL ) { memory_free( ( *resource_file )->name ); } memory_free( *resource_file ); *resource_file = NULL; } return( result ); } /* Opens the resource file * Returns 1 if successful or -1 on error */ int resource_file_open( resource_file_t *resource_file, const system_character_t *filename, libcerror_error_t **error ) { static char *function = "resource_file_open"; uint32_t virtual_address = 0; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( resource_file->is_open != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid resource file already open.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libexe_file_open_wide( resource_file->exe_file, filename, LIBEXE_OPEN_READ, error ) != 1 ) #else if( libexe_file_open( resource_file->exe_file, filename, LIBEXE_OPEN_READ, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open EXE file.", function ); goto on_error; } if( libexe_file_get_section_by_name( resource_file->exe_file, ".rsrc", 5, &( resource_file->resource_section ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource section.", function ); goto on_error; } if( libexe_section_get_virtual_address( resource_file->resource_section, &virtual_address, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource section virtual adress.", function ); goto on_error; } if( libexe_section_get_data_file_io_handle( resource_file->resource_section, &( resource_file->resource_section_file_io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve resource section file IO handle.", function ); goto on_error; } if( libwrc_stream_set_virtual_address( resource_file->resource_stream, virtual_address, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set resource stream virtual adress.", function ); goto on_error; } if( libwrc_stream_open_file_io_handle( resource_file->resource_stream, resource_file->resource_section_file_io_handle, LIBWRC_OPEN_READ, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open resource stream.", function ); goto on_error; } resource_file->is_open = 1; return( 1 ); on_error: if( resource_file->resource_section_file_io_handle != NULL ) { libbfio_handle_free( &( resource_file->resource_section_file_io_handle ), NULL ); } if( resource_file->resource_section != NULL ) { libexe_section_free( &( resource_file->resource_section ), NULL ); } libexe_file_close( resource_file->exe_file, NULL ); return( -1 ); } /* Closes the resource file * Returns the 0 if succesful or -1 on error */ int resource_file_close( resource_file_t *resource_file, libcerror_error_t **error ) { static char *function = "resource_file_close"; int result = 0; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( resource_file->is_open != 0 ) { if( libfcache_cache_empty( resource_file->message_string_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty message string cache.", function ); result = -1; } if( resource_file->message_table_resource != NULL ) { if( libwrc_resource_free( &( resource_file->message_table_resource ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free message table resource.", function ); result = -1; } } if( resource_file->mui_resource != NULL ) { if( libwrc_resource_free( &( resource_file->mui_resource ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free MUI resource.", function ); result = -1; } } if( resource_file->wevt_template_resource != NULL ) { if( libwrc_resource_free( &( resource_file->wevt_template_resource ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free WEVT_TEMPLATE resource.", function ); result = -1; } } if( libwrc_stream_close( resource_file->resource_stream, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close resource stream.", function ); result = -1; } if( resource_file->resource_section_file_io_handle != NULL ) { if( libbfio_handle_free( &( resource_file->resource_section_file_io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free resource section file IO handle.", function ); result = -1; } } if( resource_file->resource_section != NULL ) { if( libexe_section_free( &( resource_file->resource_section ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free resource section.", function ); result = -1; } } if( libexe_file_close( resource_file->exe_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close EXE file.", function ); result = -1; } resource_file->is_open = 0; } return( result ); } /* Retrieves an available language identifier from the resource * This function will look for the preferred languague identifier otherwise default to the first * Returns 1 if successful or -1 on error */ int resource_file_get_resource_available_languague_identifier( resource_file_t *resource_file, libwrc_resource_t *resource, uint32_t *language_identifier, libcerror_error_t **error ) { static char *function = "resource_file_get_resource_available_languague_identifier"; uint32_t resource_language_identifier = 0; int language_index = 0; int number_of_languages = 0; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( language_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid language identifier.", function ); return( -1 ); } if( libwrc_resource_get_number_of_languages( resource, &number_of_languages, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of languages.", function ); return( -1 ); } if( libwrc_resource_get_language_identifier( resource, language_index, language_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve language identifier: %d.", function, language_index ); return( -1 ); } for( language_index = 1; language_index < number_of_languages; language_index++ ) { if( libwrc_resource_get_language_identifier( resource, language_index, &resource_language_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve language identifier: %d.", function, language_index ); return( -1 ); } if( ( resource_file->preferred_language_identifier & 0x000003ffUL ) == ( resource_language_identifier & 0x000003ffUL ) ) { *language_identifier = resource_language_identifier; break; } } return( 1 ); } /* Sets the name * Returns 1 if successful or -1 error */ int resource_file_set_name( resource_file_t *resource_file, const system_character_t *name, size_t name_length, libcerror_error_t **error ) { static char *function = "resource_file_set_name"; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( resource_file->is_open != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid resource file already open.", 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 > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid name length value exceeds maximum.", function ); return( -1 ); } if( resource_file->name != NULL ) { memory_free( resource_file->name ); resource_file->name = NULL; } resource_file->name_size = name_length + 1; resource_file->name = system_string_allocate( resource_file->name_size ); if( resource_file->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create name.", function ); goto on_error; } if( system_string_copy( resource_file->name, name, name_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy name.", function ); goto on_error; } ( resource_file->name )[ name_length ] = 0; return( 1 ); on_error: if( resource_file->name != NULL ) { memory_free( resource_file->name ); resource_file->name = NULL; } resource_file->name_size = 0; return( -1 ); } /* Retrieves a message string from the cache * Returns 1 if successful, 0 if not available or -1 error */ int resource_file_get_message_string_from_cache( resource_file_t *resource_file, uint32_t message_string_identifier, message_string_t **message_string, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; static char *function = "resource_file_get_message_string_from_cache"; int cache_index = 0; int result = 0; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( message_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message string.", function ); return( -1 ); } for( cache_index = 0; cache_index < 16; cache_index++ ) { if( libfcache_cache_get_value_by_index( resource_file->message_string_cache, cache_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value: %d.", function, cache_index ); return( -1 ); } if( cache_value != NULL ) { if( libfcache_cache_value_get_value( cache_value, (intptr_t **) message_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message string from cache value: %d.", function, cache_index ); return( -1 ); } } if( ( *message_string != NULL ) && ( message_string_identifier == ( *message_string )->identifier ) ) { result = 1; break; } } if( result == 0 ) { *message_string = NULL; } return( result ); } /* Retrieves a specific message string * Returns 1 if successful, 0 if no such message string or -1 error */ int resource_file_get_message_string( resource_file_t *resource_file, uint32_t message_string_identifier, message_string_t **message_string, libcerror_error_t **error ) { static char *function = "resource_file_get_message_string"; uint32_t language_identifier = 0; time_t timestamp = 0; int result = 0; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( message_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message string.", function ); return( -1 ); } if( resource_file->message_table_resource == NULL ) { result = libwrc_stream_get_resource_by_type( resource_file->resource_stream, LIBWRC_RESOURCE_TYPE_MESSAGE_TABLE, &( resource_file->message_table_resource ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message table resource.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } } result = resource_file_get_message_string_from_cache( resource_file, message_string_identifier, message_string, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message string from cache.", function ); return( -1 ); } else if( result == 0 ) { if( resource_file_get_resource_available_languague_identifier( resource_file, resource_file->message_table_resource, &language_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve an available language identifier.", function ); return( -1 ); } *message_string = NULL; if( message_string_initialize( message_string, message_string_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create message string.", function ); return( -1 ); } result = message_string_get_from_message_table_resource( *message_string, resource_file->message_table_resource, language_identifier, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message string: 0x%08" PRIx32 ".", function, message_string_identifier ); message_string_free( message_string, NULL ); return( -1 ); } else if( result != 0 ) { if( libfcache_date_time_get_timestamp( ×tamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache timestamp.", function ); message_string_free( message_string, NULL ); return( -1 ); } if( libfcache_cache_set_value_by_index( resource_file->message_string_cache, resource_file->next_message_string_cache_index, 0, resource_file->next_message_string_cache_index, timestamp, (intptr_t *) *message_string, (int (*)(intptr_t **, libcerror_error_t **)) &message_string_free, LIBFCACHE_CACHE_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set message string in cache entry: %d.", function, resource_file->next_message_string_cache_index ); message_string_free( message_string, NULL ); return( -1 ); } resource_file->next_message_string_cache_index++; if( resource_file->next_message_string_cache_index == 16 ) { resource_file->next_message_string_cache_index = 0; } message_string = NULL; } if( message_string != NULL ) { if( message_string_free( message_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free message string.", function ); return( -1 ); } } } return( result ); } /* Retrieves the MUI file type * Returns 1 if successful, 0 if not available or -1 error */ int resource_file_get_mui_file_type( resource_file_t *resource_file, uint32_t *file_type, libcerror_error_t **error ) { static char *function = "resource_file_get_mui_file_type"; uint32_t language_identifier = 0; int result = 0; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( resource_file->mui_resource == NULL ) { result = libwrc_stream_get_resource_by_utf8_name( resource_file->resource_stream, (uint8_t *) "MUI", 3, &( resource_file->mui_resource ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve MUI resource.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } } if( resource_file_get_resource_available_languague_identifier( resource_file, resource_file->mui_resource, &language_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve an available language identifier.", function ); return( -1 ); } if( libwrc_mui_get_file_type( resource_file->mui_resource, language_identifier, file_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve file type.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific provider from the WEVT_TEMPLATE resource * Returns 1 if successful, 0 if not available or -1 error */ int resource_file_get_provider( resource_file_t *resource_file, const uint8_t *provider_identifier, size_t provider_identifier_size, libwrc_wevt_provider_t **provider, libcerror_error_t **error ) { static char *function = "resource_file_get_provider"; uint32_t language_identifier = 0; int result = 0; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( resource_file->wevt_template_resource == NULL ) { result = libwrc_stream_get_resource_by_utf8_name( resource_file->resource_stream, (uint8_t *) "WEVT_TEMPLATE", 13, &( resource_file->wevt_template_resource ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve WEVT_TEMPLATE resource.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } } if( resource_file_get_resource_available_languague_identifier( resource_file, resource_file->wevt_template_resource, &language_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve an available language identifier.", function ); return( -1 ); } result = libwrc_wevt_template_get_provider_by_identifier( resource_file->wevt_template_resource, language_identifier, provider_identifier, provider_identifier_size, provider, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve provider.", function ); return( -1 ); } return( result ); } /* Retrieves a specific event from a a specific provider from the WEVT_TEMPLATE resource * Returns 1 if successful, 0 if not available or -1 error */ int resource_file_get_event( resource_file_t *resource_file, const uint8_t *provider_identifier, size_t provider_identifier_size, uint32_t event_identifier, libwrc_wevt_provider_t **provider, libwrc_wevt_event_t **event, libcerror_error_t **error ) { static char *function = "resource_file_get_event_message_identifier"; int result = 0; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } result = resource_file_get_provider( resource_file, provider_identifier, provider_identifier_size, provider, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve provider.", function ); goto on_error; } else if( result != 0 ) { result = libwrc_wevt_provider_get_event_by_identifier( *provider, event_identifier, event, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve event.", function ); goto on_error; } } return( result ); on_error: if( *provider != NULL ) { libwrc_wevt_provider_free( provider, NULL ); } return( -1 ); } /* Retrieves the template definition from a specific event from a a specific provider from the WEVT_TEMPLATE resource * Returns 1 if successful, 0 if not available or -1 error */ int resource_file_get_template_definition( resource_file_t *resource_file, const uint8_t *provider_identifier, size_t provider_identifier_size, uint32_t event_identifier, libwrc_wevt_provider_t **provider, libwrc_wevt_event_t **event, libwrc_wevt_template_definition_t **template_definition, libcerror_error_t **error ) { static char *function = "resource_file_get_template_definition"; int result = 0; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } if( provider == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid provider.", function ); return( -1 ); } if( event == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid event.", function ); return( -1 ); } result = resource_file_get_event( resource_file, provider_identifier, provider_identifier_size, event_identifier, provider, event, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve event.", function ); goto on_error; } else if( result != 0 ) { result = libwrc_wevt_event_get_template_definition( *event, template_definition, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template definition.", function ); goto on_error; } } return( 1 ); on_error: if( *event != NULL ) { libwrc_wevt_event_free( event, NULL ); } if( *provider != NULL ) { libwrc_wevt_provider_free( provider, NULL ); } return( -1 ); } /* Retrieves the message identifier from a specific event from a a specific provider from the WEVT_TEMPLATE resource * Returns 1 if successful, 0 if not available or -1 error */ int resource_file_get_event_message_identifier( resource_file_t *resource_file, const uint8_t *provider_identifier, size_t provider_identifier_size, uint32_t event_identifier, uint32_t *message_identifier, libcerror_error_t **error ) { libwrc_wevt_event_t *event = NULL; libwrc_wevt_provider_t *provider = NULL; static char *function = "resource_file_get_event_message_identifier"; int result = 0; if( resource_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid resource file.", function ); return( -1 ); } result = resource_file_get_event( resource_file, provider_identifier, provider_identifier_size, event_identifier, &provider, &event, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve event.", function ); goto on_error; } else if( result != 0 ) { if( libwrc_wevt_event_get_message_identifier( event, message_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message identifier.", function ); goto on_error; } if( libwrc_wevt_event_free( &event, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free event.", function ); goto on_error; } if( libwrc_wevt_provider_free( &provider, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free provider.", function ); goto on_error; } } return( result ); on_error: if( event != NULL ) { libwrc_wevt_event_free( &event, NULL ); } if( provider != NULL ) { libwrc_wevt_provider_free( &provider, NULL ); } return( -1 ); } libevt-20170120/evttools/evttools_libwrc.h0000664000175000017500000000340513040331673022610 0ustar00lordyestalordyesta00000000000000/* * The libwrc header wrapper * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EVTTOOLS_LIBWRC_H ) #define _EVTTOOLS_LIBWRC_H #include /* Define HAVE_LOCAL_LIBWRC for local use of libwrc */ #if defined( HAVE_LOCAL_LIBWRC ) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBWRC_DLL_IMPORT * before including libwrc.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBWRC_DLL_IMPORT #endif #include #endif #endif libevt-20170120/evttools/path_handle.h0000664000175000017500000000330213040331673021632 0ustar00lordyestalordyesta00000000000000/* * Path handle * * Copyright (C) 2011-2017, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PATH_HANDLE_H ) #define _PATH_HANDLE_H #include #include #include "evttools_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct path_handle path_handle_t; struct path_handle { /* The %SystemRoot% path */ system_character_t *system_root_path; /* The %SystemRoot% path size */ size_t system_root_path_size; }; int path_handle_initialize( path_handle_t **path_handle, libcerror_error_t **error ); int path_handle_free( path_handle_t **path_handle, libcerror_error_t **error ); int path_handle_get_directory_entry_name_by_name_no_case( path_handle_t *path_handle, const system_character_t *path, size_t path_length, system_character_t *entry_name, size_t entry_name_size, uint8_t entry_type, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PATH_HANDLE_H ) */ libevt-20170120/configure.ac0000664000175000017500000002124513040334476017633 0ustar00lordyestalordyesta00000000000000AC_PREREQ( 2.59 ) AC_INIT( [libevt], [20170120], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( [include/libevt.h.in]) AM_INIT_AUTOMAKE([gnu 1.6 tar-ustar]) AC_CONFIG_MACRO_DIR([m4]) dnl Check for host type AC_CANONICAL_HOST dnl Check for large file support AC_SYS_LARGEFILE dnl Check for libtool DLL support AC_LIBTOOL_WIN32_DLL dnl Checks for programs AC_PROG_CC AC_PROG_GCC_TRADITIONAL AC_PROG_MAKE_SET AC_PROG_INSTALL dnl Check for libtool AC_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) dnl Check for pkg-config AC_PATH_PROG(PKGCONFIG,[pkg-config]) dnl Support of internationalization (i18n) AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.18.1]) dnl Check for compiler language support AC_C_CONST AC_C_VOLATILE dnl Check if WINAPI support should be enabled AX_COMMON_CHECK_ENABLE_WINAPI dnl Check if wide character type should be enabled AX_COMMON_CHECK_ENABLE_WIDE_CHARACTER_TYPE dnl Check for type definitions AX_TYPES_CHECK_LOCAL dnl Checks for libraries and library functions AX_COMMON_CHECK_LOCAL dnl Check for enabling libcerror for cross-platform C error functions AX_LIBCERROR_CHECK_ENABLE dnl Check for enabling libcthreads for cross-platform C threads functions AX_LIBCTHREADS_CHECK_ENABLE dnl Check for enabling libcdata for cross-platform C generic data functions AX_LIBCDATA_CHECK_ENABLE dnl Check for enabling libclocale for cross-platform C locale functions AX_LIBCLOCALE_CHECK_ENABLE dnl Check for enabling libcnotify for cross-platform C notification functions AX_LIBCNOTIFY_CHECK_ENABLE dnl Check for enabling libcsplit for cross-platform C split string functions AX_LIBCSPLIT_CHECK_ENABLE dnl Check for enabling libuna for Unicode string support AX_LIBUNA_CHECK_ENABLE dnl Check for enabling libcfile for cross-platform C file functions AX_LIBCFILE_CHECK_ENABLE dnl Check for enabling libcpath for cross-platform C path functions AX_LIBCPATH_CHECK_ENABLE dnl Check for enabling libbfio for basic file IO support AX_LIBBFIO_CHECK_ENABLE dnl Check for enabling libfdatetime for date and time formats support AX_LIBFDATETIME_CHECK_ENABLE dnl Check for enabling libfguid for GUID/UUID format support AX_LIBFGUID_CHECK_ENABLE dnl Check for enabling libfvalue for file value support AX_LIBFVALUE_CHECK_ENABLE dnl Check for enabling libfwnt for file Windows NT type support AX_LIBFWNT_CHECK_ENABLE dnl Check for library function support AX_LIBEVT_CHECK_LOCAL dnl Check for enabling libfcache for file value cache support AX_LIBFCACHE_CHECK_ENABLE dnl Check for enabling libfdata for file data types support AX_LIBFDATA_CHECK_ENABLE dnl Check for enabling libfwevt for Windows Event Log binary XML support AX_LIBFWEVT_CHECK_ENABLE dnl Check for enabling libexe for MZ, PE/COFF executable support AX_LIBEXE_CHECK_ENABLE dnl Check for enabling libregf for Windows Registry file support AX_LIBREGF_CHECK_ENABLE dnl Check for enabling libwrc for Windows Resource support AX_LIBWRC_CHECK_ENABLE dnl Check for enabling libcpath for cross-platform C directory functions AX_LIBCDIRECTORY_CHECK_ENABLE dnl Check for evttools function support AX_EVTTOOLS_CHECK_LOCAL dnl Check if libevt python bindings (pyevt) should be build AX_PYTHON_CHECK_PYPREFIX AX_PYTHON_CHECK_ENABLE AX_PYTHON2_CHECK_ENABLE AX_PYTHON3_CHECK_ENABLE AM_CONDITIONAL( HAVE_PYTHON_TESTS, [test "x${ac_cv_enable_python}" != xno || test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno]) dnl Headers included in various places 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 for test function support AX_TESTS_CHECK_LOCAL 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( [libevt_spec_requires], [Requires:]) AC_SUBST( [libevt_spec_build_requires], [BuildRequires:]) ]) AS_IF( [test "x$ac_cv_libexe" = xyes || test "x$ac_cv_libregf" = xyes || test "x$ac_cv_libwrc" = xyes || test "x$ac_cv_libcdirectory" = xyes], [AC_SUBST( [libevt_tools_spec_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 Set the current working directory for PackageMaker files AC_SUBST( [PWD], [`pwd`]) dnl Have configure make the 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([libevt/Makefile]) AC_CONFIG_FILES([libfwevt/Makefile]) AC_CONFIG_FILES([libexe/Makefile]) AC_CONFIG_FILES([libregf/Makefile]) AC_CONFIG_FILES([libwrc/Makefile]) AC_CONFIG_FILES([libcdirectory/Makefile]) AC_CONFIG_FILES([evttools/Makefile]) AC_CONFIG_FILES([pyevt/Makefile]) AC_CONFIG_FILES([pyevt-python2/Makefile]) AC_CONFIG_FILES([pyevt-python3/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([msvscpp/Makefile]) dnl Have configure make the include files AC_CONFIG_FILES([include/libevt.h]) AC_CONFIG_FILES([include/libevt/definitions.h]) AC_CONFIG_FILES([include/libevt/features.h]) AC_CONFIG_FILES([include/libevt/types.h]) AC_CONFIG_FILES([libevt/libevt_definitions.h]) dnl Have configure make distribution specific files AC_CONFIG_FILES([common/types.h]) AC_CONFIG_FILES([dpkg/changelog]) AC_CONFIG_FILES([dpkg/copyright]) AC_CONFIG_FILES([libevt/libevt.rc]) AC_CONFIG_FILES([libevt.pc]) AC_CONFIG_FILES([libevt.spec]) dnl Have configure write its configuration 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 libfwevt support: $ac_cv_libfwevt libexe support: $ac_cv_libexe libregf support: $ac_cv_libregf libwrc support: $ac_cv_libwrc libcdirectory support: $ac_cv_libcdirectory Features: Multi-threading support: $ac_cv_libcthreads_multi_threading Wide character type support: $ac_cv_enable_wide_character_type evttools are build as static executables: $ac_cv_enable_static_executables Python (pyevt) support: $ac_cv_enable_python Python version 2 (pyevt) support: $ac_cv_enable_python2 Python version 3 (pyevt) support: $ac_cv_enable_python3 Verbose output: $ac_cv_enable_verbose_output Debug output: $ac_cv_enable_debug_output ]);