~ubuntu-branches/ubuntu/trusty/tla/trusty

« back to all changes in this revision

Viewing changes to src/hackerlab/unidata/db-macros.h

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Suffield
  • Date: 2004-05-30 20:13:29 UTC
  • Revision ID: james.westby@ubuntu.com-20040530201329-mgovd2u99mkxi0hf
Tags: upstream-1.2
ImportĀ upstreamĀ versionĀ 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* tag: Tom Lord Tue Dec  4 14:41:45 2001 (db-macros.h)
 
2
 */
 
3
/* db-macros.h -
 
4
 *
 
5
 ****************************************************************
 
6
 * Copyright (C) 2000 Tom Lord
 
7
 * 
 
8
 * See the file "COPYING" for further information about
 
9
 * the copyright and warranty status of this work.
 
10
 */
 
11
 
 
12
#ifndef INCLUDE__UNIDATA__DB_MACROS_H
 
13
#define INCLUDE__UNIDATA__DB_MACROS_H
 
14
 
 
15
 
 
16
 
 
17
 
 
18
#define unidata__assemble_db(ASSIGNED, DEC, M, BC, GC) \
 
19
  ((((ASSIGNED) & 1)  << 15) | (((DEC) & 0xf) << 11) | (((M) & 1) << 10) | (((BC) & 0x1f) << 5) | (((GC) & 0x1f) << 0))
 
20
 
 
21
#define unidata__db_is_assigned_code_point(DBV)         ((DBV) & 0x8000)
 
22
#define unidata__db_decimal_digit_value(DBV)            (((DBV) >> 11) & 0xf)
 
23
#define unidata__db_is_mirrored(DBV)                    (((DBV) >> 10) & 1)
 
24
#define unidata__db_bidi_category(DBV)                  (((DBV) >> 5) & 0x1f)
 
25
#define unidata__db_general_category(DBV)               (((DBV) >> 0) & 0x1f)
 
26
 
 
27
 
 
28
 
 
29
 
 
30
/* automatically generated __STDC__ prototypes */
 
31
#endif  /* INCLUDE__UNIDATA__DB_MACROS_H */