os/ossrv/genericopenlibs/openenvcore/libc/src/iconv.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Name        : iconv.CPP
    15 // Part of     : LIBC
    16 // Contains the source for character set conversion
    17 // Version     : 
    18 //
    19 
    20 
    21 
    22 #include "sysreent.h"
    23 #include <errno.h>
    24 #include <iconv.h>
    25 #include <stdio.h>
    26 #include <stdlib.h>
    27 #include <string.h>
    28 #include <charconv.h>
    29 #include <f32file.h>
    30 #include <_ansi.h>
    31 #include "sysif.h"
    32 
    33 
    34 extern "C" {
    35 
    36 EXPORT_C iconv_t iconv_open(const char *tocode, const char *fromcode)
    37 {
    38 	return _iconv_open_r(&errno, tocode, fromcode);
    39 	}
    40 
    41 
    42 EXPORT_C int iconv_close(iconv_t cd)
    43 	{
    44 	return _iconv_close_r(&errno, cd);
    45 	}
    46 
    47 
    48 EXPORT_C size_t iconv(iconv_t cd,  const char **inbuf, size_t *inbytesleft,
    49 	    char **outbuf, size_t *outbytesleft)
    50 	{
    51 	return _iconv_r(&errno, cd, inbuf, inbytesleft, outbuf, outbytesleft);
    52 	}
    53 
    54 } //extern "C"