• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • kdecore
  • localization
  • probers
nsPkgInt.h
Go to the documentation of this file.
1/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/* -*- C++ -*-
3* Copyright (C) 1998 <developer@mozilla.org>
4*
5*
6* Permission is hereby granted, free of charge, to any person obtaining
7* a copy of this software and associated documentation files (the
8* "Software"), to deal in the Software without restriction, including
9* without limitation the rights to use, copy, modify, merge, publish,
10* distribute, sublicense, and/or sell copies of the Software, and to
11* permit persons to whom the Software is furnished to do so, subject to
12* the following conditions:
13*
14* The above copyright notice and this permission notice shall be included
15* in all copies or substantial portions of the Software.
16*
17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24*/
25
26#ifndef nsPkgInt_h__
27#define nsPkgInt_h__
28
29namespace kencodingprober {
30typedef enum {
31 eIdxSft4bits = 3,
32 eIdxSft8bits = 2,
33 eIdxSft16bits = 1
34} nsIdxSft;
35
36typedef enum {
37 eSftMsk4bits = 7,
38 eSftMsk8bits = 3,
39 eSftMsk16bits = 1
40} nsSftMsk;
41
42typedef enum {
43 eBitSft4bits = 2,
44 eBitSft8bits = 3,
45 eBitSft16bits = 4
46} nsBitSft;
47
48typedef enum {
49 eUnitMsk4bits = 0x0000000FL,
50 eUnitMsk8bits = 0x000000FFL,
51 eUnitMsk16bits = 0x0000FFFFL
52} nsUnitMsk;
53
54typedef struct nsPkgInt {
55 nsIdxSft idxsft;
56 nsSftMsk sftmsk;
57 nsBitSft bitsft;
58 nsUnitMsk unitmsk;
59 unsigned int *data;
60} nsPkgInt;
61}
62
63#define PCK16BITS(a,b) ((unsigned int)(((b) << 16) | (a)))
64
65#define PCK8BITS(a,b,c,d) PCK16BITS( ((unsigned int)(((b) << 8) | (a))), \
66 ((unsigned int)(((d) << 8) | (c))))
67
68#define PCK4BITS(a,b,c,d,e,f,g,h) PCK8BITS( ((unsigned int)(((b) << 4) | (a))), \
69 ((unsigned int)(((d) << 4) | (c))), \
70 ((unsigned int)(((f) << 4) | (e))), \
71 ((unsigned int)(((h) << 4) | (g))) )
72
73#define GETFROMPCK(i, c) \
74 (((((c).data)[(i)>>(c).idxsft])>>(((i)&(c).sftmsk)<<(c).bitsft))&(c).unitmsk)
75
76#endif /* nsPkgInt_h__ */
77
kencodingprober
Definition: CharDistribution.cpp:37
kencodingprober::nsBitSft
nsBitSft
Definition: nsPkgInt.h:42
kencodingprober::eBitSft4bits
@ eBitSft4bits
Definition: nsPkgInt.h:43
kencodingprober::eBitSft8bits
@ eBitSft8bits
Definition: nsPkgInt.h:44
kencodingprober::eBitSft16bits
@ eBitSft16bits
Definition: nsPkgInt.h:45
kencodingprober::nsIdxSft
nsIdxSft
Definition: nsPkgInt.h:30
kencodingprober::eIdxSft8bits
@ eIdxSft8bits
Definition: nsPkgInt.h:32
kencodingprober::eIdxSft4bits
@ eIdxSft4bits
Definition: nsPkgInt.h:31
kencodingprober::eIdxSft16bits
@ eIdxSft16bits
Definition: nsPkgInt.h:33
kencodingprober::nsUnitMsk
nsUnitMsk
Definition: nsPkgInt.h:48
kencodingprober::eUnitMsk16bits
@ eUnitMsk16bits
Definition: nsPkgInt.h:51
kencodingprober::eUnitMsk8bits
@ eUnitMsk8bits
Definition: nsPkgInt.h:50
kencodingprober::eUnitMsk4bits
@ eUnitMsk4bits
Definition: nsPkgInt.h:49
kencodingprober::nsSftMsk
nsSftMsk
Definition: nsPkgInt.h:36
kencodingprober::eSftMsk4bits
@ eSftMsk4bits
Definition: nsPkgInt.h:37
kencodingprober::eSftMsk8bits
@ eSftMsk8bits
Definition: nsPkgInt.h:38
kencodingprober::eSftMsk16bits
@ eSftMsk16bits
Definition: nsPkgInt.h:39
kencodingprober::nsPkgInt
Definition: nsPkgInt.h:54
kencodingprober::nsPkgInt::bitsft
nsBitSft bitsft
Definition: nsPkgInt.h:57
kencodingprober::nsPkgInt::data
unsigned int * data
Definition: nsPkgInt.h:59
kencodingprober::nsPkgInt::unitmsk
nsUnitMsk unitmsk
Definition: nsPkgInt.h:58
kencodingprober::nsPkgInt::sftmsk
nsSftMsk sftmsk
Definition: nsPkgInt.h:56
kencodingprober::nsPkgInt::idxsft
nsIdxSft idxsft
Definition: nsPkgInt.h:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal