| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#include <common.h> |
| 23 |
#include <types.h> |
| 24 |
|
| 25 |
#include "libcpath_definitions.h" |
| 26 |
#include "libcpath_libcerror.h" |
| 27 |
#include "libcpath_libclocale.h" |
| 28 |
#include "libcpath_support.h" |
| 29 |
|
| 30 |
#if !defined( HAVE_LOCAL_LIBCPATH ) |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
const char *libcpath_get_version( |
| 35 |
void ) |
| 36 |
{ |
| 37 |
return( (const char *) LIBCPATH_VERSION_STRING ); |
| 38 |
} |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
int libcpath_get_codepage( |
| 45 |
int *codepage, |
| 46 |
libcerror_error_t **error ) |
| 47 |
{ |
| 48 |
static char *function = "libcpath_get_codepage"; |
| 49 |
|
| 50 |
if( libclocale_codepage_get( |
| 51 |
codepage, |
| 52 |
error ) != 1 ) |
| 53 |
{ |
| 54 |
libcerror_error_set( |
| 55 |
error, |
| 56 |
LIBCERROR_ERROR_DOMAIN_RUNTIME, |
| 57 |
LIBCERROR_RUNTIME_ERROR_GET_FAILED, |
| 58 |
"%s: unable to retrieve codepage.", |
| 59 |
function ); |
| 60 |
|
| 61 |
return( -1 ); |
| 62 |
} |
| 63 |
return( 1 ); |
| 64 |
} |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
int libcpath_set_codepage( |
| 71 |
int codepage, |
| 72 |
libcerror_error_t **error ) |
| 73 |
{ |
| 74 |
static char *function = "libcpath_set_codepage"; |
| 75 |
|
| 76 |
if( libclocale_codepage_set( |
| 77 |
codepage, |
| 78 |
error ) != 1 ) |
| 79 |
{ |
| 80 |
libcerror_error_set( |
| 81 |
error, |
| 82 |
LIBCERROR_ERROR_DOMAIN_RUNTIME, |
| 83 |
LIBCERROR_RUNTIME_ERROR_SET_FAILED, |
| 84 |
"%s: unable to set codepage.", |
| 85 |
function ); |
| 86 |
|
| 87 |
return( -1 ); |
| 88 |
} |
| 89 |
return( 1 ); |
| 90 |
} |
| 91 |
|
| 92 |
#endif |
| 93 |
|