os/ossrv/genericopenlibs/openenvcore/libc/src/iconv.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/libc/src/iconv.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,54 @@
     1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// Name        : iconv.CPP
    1.18 +// Part of     : LIBC
    1.19 +// Contains the source for character set conversion
    1.20 +// Version     : 
    1.21 +//
    1.22 +
    1.23 +
    1.24 +
    1.25 +#include "sysreent.h"
    1.26 +#include <errno.h>
    1.27 +#include <iconv.h>
    1.28 +#include <stdio.h>
    1.29 +#include <stdlib.h>
    1.30 +#include <string.h>
    1.31 +#include <charconv.h>
    1.32 +#include <f32file.h>
    1.33 +#include <_ansi.h>
    1.34 +#include "sysif.h"
    1.35 +
    1.36 +
    1.37 +extern "C" {
    1.38 +
    1.39 +EXPORT_C iconv_t iconv_open(const char *tocode, const char *fromcode)
    1.40 +{
    1.41 +	return _iconv_open_r(&errno, tocode, fromcode);
    1.42 +	}
    1.43 +
    1.44 +
    1.45 +EXPORT_C int iconv_close(iconv_t cd)
    1.46 +	{
    1.47 +	return _iconv_close_r(&errno, cd);
    1.48 +	}
    1.49 +
    1.50 +
    1.51 +EXPORT_C size_t iconv(iconv_t cd,  const char **inbuf, size_t *inbytesleft,
    1.52 +	    char **outbuf, size_t *outbytesleft)
    1.53 +	{
    1.54 +	return _iconv_r(&errno, cd, inbuf, inbytesleft, outbuf, outbytesleft);
    1.55 +	}
    1.56 +
    1.57 +} //extern "C"