Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e16d457 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

staging: csr: remove csr_utf16.c



Only one function was being used in the file, so move it to where it was
being called and delete the rest of the file, and csr_unicode.h as it's
no longer needed as well.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eaae2e92
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -71,6 +71,5 @@ csr_helper-y := csr_time.o \
		csr_framework_ext.o		\
		csr_wifi_serialize_primitive_types.o	\
		csr_serialize_primitive_types.o	\
		csr_utf16.o			\
		csr_msgconv.o			\
		csr_panic.o
+0 −1
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
#include <linux/types.h>
#include "csr_prim_defs.h"
#include "csr_sched.h"
#include "csr_unicode.h"

#ifdef __cplusplus
extern "C" {
+28 −0
Original line number Diff line number Diff line
@@ -15,6 +15,34 @@
#include "csr_macro.h"
#include "csr_lib.h"

/********************************************************************************
*
*   Name:           CsrUtf16StrLen
*
*   Description:    The function returns the number of 16 bit elements present
*                   in the 0-terminated string.
*
*   Input:          0-terminated string of 16 bit unicoded characters.
*
*   Output:         The number of 16 bit elements in the string.
*
*********************************************************************************/
static u32 CsrUtf16StrLen(const u16 *unicodeString)
{
    u32 length;

    length = 0;
    if (unicodeString != NULL)
    {
        while (*unicodeString)
        {
            length++;
            unicodeString++;
        }
    }
    return length;
}

void CsrUint8Des(u8 *value, u8 *buffer, size_t *offset)
{
    *value = buffer[*offset];

drivers/staging/csr/csr_unicode.h

deleted100644 → 0
+0 −87
Original line number Diff line number Diff line
#ifndef CSR_UNICODE_H__
#define CSR_UNICODE_H__
/*****************************************************************************

            (c) Cambridge Silicon Radio Limited 2010
            All rights reserved and confidential information of CSR

            Refer to LICENSE.txt included with this source for details
            on the license terms.

*****************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

u16 *CsrUint32ToUtf16String(u32 number);

u32 CsrUtf16StringToUint32(const u16 *unicodeString);
u32 CsrUtf16StrLen(const u16 *unicodeString);

u8 *CsrUtf16String2Utf8(const u16 *source);

u16 *CsrUtf82Utf16String(const u8 *utf8String);

u16 *CsrUtf16StrCpy(u16 *target, const u16 *source);
u16 *CsrUtf16StringDuplicate(const u16 *source);

u16 CsrUtf16StrICmp(const u16 *string1, const u16 *string2);
u16 CsrUtf16StrNICmp(const u16 *string1, const u16 *string2, u32 count);

u16 *CsrUtf16MemCpy(u16 *dest, const u16 *src, u32 count);
u16 *CsrUtf16ConcatenateTexts(const u16 *inputText1, const u16 *inputText2,
    const u16 *inputText3, const u16 *inputText4);

u16 *CsrUtf16String2XML(u16 *str);
u16 *CsrXML2Utf16String(u16 *str);

u32 CsrUtf8StringLengthInBytes(const u8 *string);

/*******************************************************************************

    NAME
        CsrUtf8StrTruncate

    DESCRIPTION
        In-place truncate a string on a UTF-8 character boundary by writing a
        null character somewhere in the range target[count - 3]:target[count].

        Please note that memory passed must be at least of length count + 1, to
        ensure space for a full length string that is terminated at
        target[count], in the event that target[count - 1] is the final byte of
        a UTF-8 character.

    PARAMETERS
        target - Target string to truncate.
        count - The desired length, in bytes, of the resulting string. Depending
                on the contents, the resulting string length will be between
                count - 3 and count.

    RETURNS
        Returns target

*******************************************************************************/
u8 *CsrUtf8StrTruncate(u8 *target, size_t count);

/*
 * UCS2
 *
 * D-13157
 */
typedef u8 CsrUcs2String;

size_t CsrUcs2ByteStrLen(const CsrUcs2String *ucs2String);
size_t CsrConverterUcs2ByteStrLen(const CsrUcs2String *str);

u8 *CsrUcs2ByteString2Utf8(const CsrUcs2String *ucs2String);
CsrUcs2String *CsrUtf82Ucs2ByteString(const u8 *utf8String);

u8 *CsrUtf16String2Ucs2ByteString(const u16 *source);
u16 *CsrUcs2ByteString2Utf16String(const u8 *source);

#ifdef __cplusplus
}
#endif

#endif

drivers/staging/csr/csr_utf16.c

deleted100644 → 0
+0 −1055

File deleted.

Preview size limit exceeded, changes collapsed.

Loading