~ubuntu-branches/debian/squeeze/sword/squeeze

« back to all changes in this revision

Viewing changes to include/swunicod.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Glassey
  • Date: 2004-01-15 15:50:07 UTC
  • Revision ID: james.westby@ubuntu.com-20040115155007-n9mz4x0zxrs1isd3
Tags: upstream-1.5.7
ImportĀ upstreamĀ versionĀ 1.5.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
 
4
 *      CrossWire Bible Society
 
5
 *      P. O. Box 2528
 
6
 *      Tempe, AZ  85280-2528
 
7
 *
 
8
 * This program is free software; you can redistribute it and/or modify it
 
9
 * under the terms of the GNU General Public License as published by the
 
10
 * Free Software Foundation version 2.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful, but
 
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
 * General Public License for more details.
 
16
 *
 
17
 */
 
18
 
 
19
 
 
20
#ifndef SWUNICOD_H
 
21
#define SWUNICOD_H
 
22
 
 
23
#include <defs.h>
 
24
SWORD_NAMESPACE_START
 
25
 
 
26
/** Converts a 32-bit unsigned integer UTF-32 value into a UTF-8 encoded 1-6 byte array
 
27
 * @param utf32 the UTF-32 Unicode code point value
 
28
 * @param utf8 pointer to an array of 6 unsigned chars to contain the UTF-8 value
 
29
 * @return utf8
 
30
 */
 
31
unsigned char* UTF32to8 (unsigned long utf32, unsigned char * utf8);
 
32
 
 
33
 
 
34
/** Converts a UTF-8 encoded 1-6 byte array into a 32-bit unsigned integer UTF-32 value
 
35
 * @param utf8 pointer to an array of 6 unsigned chars containing the UTF-8 value, starting in the utf8[0]
 
36
 * @param utf32 the UTF-32 Unicode code point value
 
37
 * @return utf32
 
38
 */
 
39
unsigned long UTF8to32 (unsigned char * utf8, unsigned long utf32);
 
40
 
 
41
SWORD_NAMESPACE_END
 
42
 
 
43
#endif