diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2010-01-06 16:32:59 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2010-01-06 16:32:59 +0000 |
commit | f3a77d3c00c095a53f37aa7efb39d56168799596 (patch) | |
tree | 0bd2269afe0edd5018c5d231c95a5011002c83cf /rufl_character_set_test.c | |
parent | 628079a91ca6d86a7915906d266e6fe5593bb846 (diff) | |
download | librufl-f3a77d3c00c095a53f37aa7efb39d56168799596.tar.gz librufl-f3a77d3c00c095a53f37aa7efb39d56168799596.tar.bz2 |
Port to core buildsystem.
The python module (and associated make runes) need some love (as does non-GCC building with the core buildsystem in general)
svn path=/trunk/rufl/; revision=9792
Diffstat (limited to 'rufl_character_set_test.c')
-rw-r--r-- | rufl_character_set_test.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/rufl_character_set_test.c b/rufl_character_set_test.c deleted file mode 100644 index 45fbcaf..0000000 --- a/rufl_character_set_test.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of RUfl - * Licensed under the MIT License, - * http://www.opensource.org/licenses/mit-license - * Copyright 2005 James Bursa <james@semichrome.net> - */ - -#include "rufl_internal.h" - - -/** - * Test if a character set contains a character. - * - * \param charset character set - * \param c character code - * \return true if present, false if absent - */ - -bool rufl_character_set_test(struct rufl_character_set *charset, - unsigned int c) -{ - unsigned int block = c >> 8; - unsigned int byte = (c >> 3) & 31; - unsigned int bit = c & 7; - - if (256 <= block) - return false; - - if (charset->index[block] == BLOCK_EMPTY) - return false; - else if (charset->index[block] == BLOCK_FULL) - return true; - else { - unsigned char z = charset->block[charset->index[block]][byte]; - return z & (1 << bit); - } -} |