forked from Minki/linux
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
eaae2e9223
commit
9e16d45768
@ -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
|
||||
|
@ -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" {
|
||||
|
@ -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];
|
||||
|
@ -1,87 +0,0 @@
|
||||
#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
|
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,6 @@
|
||||
|
||||
#include "csr_prim_defs.h"
|
||||
#include "csr_sched.h"
|
||||
#include "csr_unicode.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include <linux/string.h>
|
||||
#include <linux/slab.h>
|
||||
#include "csr_msgconv.h"
|
||||
#include "csr_unicode.h"
|
||||
|
||||
#ifdef CSR_WIFI_NME_ENABLE
|
||||
#ifdef CSR_WIFI_AP_ENABLE
|
||||
|
@ -12,9 +12,6 @@
|
||||
#include <linux/string.h>
|
||||
#include <linux/slab.h>
|
||||
#include "csr_msgconv.h"
|
||||
#include "csr_unicode.h"
|
||||
|
||||
|
||||
#include "csr_wifi_router_ctrl_prim.h"
|
||||
#include "csr_wifi_router_ctrl_serialize.h"
|
||||
|
||||
|
@ -11,9 +11,6 @@
|
||||
/* Note: this is an auto-generated file. */
|
||||
#include <linux/slab.h>
|
||||
#include "csr_msgconv.h"
|
||||
#include "csr_unicode.h"
|
||||
|
||||
|
||||
#include "csr_wifi_router_prim.h"
|
||||
#include "csr_wifi_router_serialize.h"
|
||||
|
||||
|
@ -12,9 +12,6 @@
|
||||
#include <linux/string.h>
|
||||
#include <linux/slab.h>
|
||||
#include "csr_msgconv.h"
|
||||
#include "csr_unicode.h"
|
||||
|
||||
|
||||
#include "csr_wifi_sme_prim.h"
|
||||
#include "csr_wifi_sme_serialize.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user