fsw_strfunc.h revision 1e9e76e4273dcc2e3d560a0f3605c46f0013eb7b
/* $Id$ */
/** @file
*/
/*
* Copyright (C) 2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
/* fsw_strfunc.h generated by mk_fsw_strfunc.py */
{
int i;
for (i = 0; i < len; i++) {
}
return 0;
}
return 1;
}
#ifndef HOST_EFI
{
int i;
for (i = 0; i < len; i++) {
return 0;
}
return 1;
}
#endif
{
int i;
for (i = 0; i < len; i++) {
return 0;
}
return 1;
}
{
int i;
for (i = 0; i < len; i++) {
}
return 0;
}
return 1;
}
{
int i;
for (i = 0; i < len; i++) {
}
return 0;
}
return 1;
}
{
int i;
for (i = 0; i < len; i++) {
return 0;
}
return 1;
}
{
int i;
fsw_u32 c;
if (status)
return status;
for (i = 0; i < srclen; i++) {
c = *sp++;
if ((c & 0xe0) == 0xc0) {
} else if ((c & 0xf0) == 0xe0) {
c |= (*sp++ & 0x3f);
} else if ((c & 0xf8) == 0xf0) {
c |= (*sp++ & 0x3f);
}
}
return FSW_SUCCESS;
}
static fsw_status_t fsw_strcoerce_UTF16_ISO88591(void *srcdata, int srclen, struct fsw_string *dest)
{
int i;
fsw_u32 c;
if (status)
return status;
for (i = 0; i < srclen; i++) {
c = *sp++;
}
return FSW_SUCCESS;
}
static fsw_status_t fsw_strcoerce_UTF16_SWAPPED_ISO88591(void *srcdata, int srclen, struct fsw_string *dest)
{
int i;
fsw_u32 c;
if (status)
return status;
for (i = 0; i < srclen; i++) {
c = *sp++; c = FSW_SWAPVALUE_U16(c);
}
return FSW_SUCCESS;
}
static fsw_status_t fsw_strcoerce_ISO88591_UTF16(void *srcdata, int srclen, struct fsw_string *dest)
{
int i;
fsw_u32 c;
if (status)
return status;
for (i = 0; i < srclen; i++) {
c = *sp++;
}
return FSW_SUCCESS;
}
{
int i;
fsw_u32 c;
if (status)
return status;
for (i = 0; i < srclen; i++) {
c = *sp++;
if ((c & 0xe0) == 0xc0) {
} else if ((c & 0xf0) == 0xe0) {
c |= (*sp++ & 0x3f);
} else if ((c & 0xf8) == 0xf0) {
c |= (*sp++ & 0x3f);
}
}
return FSW_SUCCESS;
}
static fsw_status_t fsw_strcoerce_UTF16_SWAPPED_UTF16(void *srcdata, int srclen, struct fsw_string *dest)
{
int i;
fsw_u32 c;
if (status)
return status;
for (i = 0; i < srclen; i++) {
c = *sp++; c = FSW_SWAPVALUE_U16(c);
}
return FSW_SUCCESS;
}
{
int i, destsize;
fsw_u32 c;
destsize = 0;
for (i = 0; i < srclen; i++) {
c = *sp++;
if (c < 0x000080)
destsize++;
else if (c < 0x000800)
destsize += 2;
else if (c < 0x010000)
destsize += 3;
else
destsize += 4;
}
if (status)
return status;
for (i = 0; i < srclen; i++) {
c = *sp++;
if (c < 0x000080) {
} else if (c < 0x000800) {
} else if (c < 0x010000) {
} else {
}
}
return FSW_SUCCESS;
}
{
int i, destsize;
fsw_u32 c;
destsize = 0;
for (i = 0; i < srclen; i++) {
c = *sp++;
if (c < 0x000080)
destsize++;
else if (c < 0x000800)
destsize += 2;
else if (c < 0x010000)
destsize += 3;
else
destsize += 4;
}
if (status)
return status;
for (i = 0; i < srclen; i++) {
c = *sp++;
if (c < 0x000080) {
} else if (c < 0x000800) {
} else if (c < 0x010000) {
} else {
}
}
return FSW_SUCCESS;
}
static fsw_status_t fsw_strcoerce_UTF16_SWAPPED_UTF8(void *srcdata, int srclen, struct fsw_string *dest)
{
int i, destsize;
fsw_u32 c;
destsize = 0;
for (i = 0; i < srclen; i++) {
c = *sp++; c = FSW_SWAPVALUE_U16(c);
if (c < 0x000080)
destsize++;
else if (c < 0x000800)
destsize += 2;
else if (c < 0x010000)
destsize += 3;
else
destsize += 4;
}
if (status)
return status;
for (i = 0; i < srclen; i++) {
c = *sp++; c = FSW_SWAPVALUE_U16(c);
if (c < 0x000080) {
} else if (c < 0x000800) {
} else if (c < 0x010000) {
} else {
}
}
return FSW_SUCCESS;
}