mirror of
https://github.com/reactos/reactos.git
synced 2025-06-19 21:55:27 +00:00
Create a branch for audio work
svn path=/branches/audio-bringup/; revision=49478
This commit is contained in:
parent
26c20f3857
commit
5eb25b5c24
20759 changed files with 0 additions and 1141005 deletions
71
lib/nls/scripts/scripts.h
Normal file
71
lib/nls/scripts/scripts.h
Normal file
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright (c) 2008, KJK::Hyperion
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* - Neither the name of the ReactOS Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
|
||||
struct SCRIPTS_Script
|
||||
{
|
||||
WCHAR ScriptName[4];
|
||||
WCHAR Separator;
|
||||
|
||||
static int Compare(const SCRIPTS_Script * x, const SCRIPTS_Script * y)
|
||||
{
|
||||
for(unsigned i = 0; i < 4; ++ i)
|
||||
{
|
||||
int comparison = (int)x->ScriptName[i] - (int)y->ScriptName[i];
|
||||
|
||||
if(comparison)
|
||||
return comparison;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int Compare(const void * x, const void * y)
|
||||
{
|
||||
return Compare(static_cast<const SCRIPTS_Script *>(x), static_cast<const SCRIPTS_Script *>(y));
|
||||
}
|
||||
};
|
||||
|
||||
C_ASSERT(sizeof(SCRIPTS_Script) == 5 * sizeof(WCHAR));
|
||||
|
||||
extern "C" bool SCRIPTS_GetCharScriptCode(UChar32 c, int32_t * code);
|
||||
extern "C" bool SCRIPTS_GetScriptCode(const SCRIPTS_Script * pScript, int32_t * code);
|
||||
extern "C" void SCRIPTS_GetScriptName(int32_t code, SCRIPTS_Script * pScript);
|
||||
|
||||
/* EOF */
|
Loading…
Add table
Add a link
Reference in a new issue