This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/7801: Internal compiler error in cp_expr_size, at cp/cp-lang.c


>     Could you please provide a self-contained preprocessed file
>     as per the detailed bug reportting instructions at
>     http://gcc.gnu.org/bugs.html#detailed ?

Surely.  

Files are attached.
# 1 "kkeyserver_x11.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "kkeyserver_x11.cpp"
# 1 "/opt/qt/3.0.4/include/qnamespace.h" 1
# 42 "/opt/qt/3.0.4/include/qnamespace.h"
# 1 "/opt/qt/3.0.4/include/qglobal.h" 1
# 483 "/opt/qt/3.0.4/include/qglobal.h"
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned uint;
typedef unsigned long ulong;
typedef char *pchar;
typedef uchar *puchar;
typedef const char *pcchar;







const bool FALSE = 0;
const bool TRUE = !0;
# 528 "/opt/qt/3.0.4/include/qglobal.h"
inline int qRound( double d )
{
    return int( d >= 0.0 ? d + 0.5 : d - 0.5 );
}
# 548 "/opt/qt/3.0.4/include/qglobal.h"
typedef signed char Q_INT8;
typedef unsigned char Q_UINT8;
typedef short Q_INT16;
typedef unsigned short Q_UINT16;
typedef int Q_INT32;
typedef unsigned int Q_UINT32;






typedef long Q_LONG;
typedef unsigned long Q_ULONG;
# 575 "/opt/qt/3.0.4/include/qglobal.h"
class QDataStream;
# 606 "/opt/qt/3.0.4/include/qglobal.h"
# 1 "/opt/qt/3.0.4/include/qconfig.h" 1
# 607 "/opt/qt/3.0.4/include/qglobal.h" 2
# 616 "/opt/qt/3.0.4/include/qglobal.h"
# 1 "/opt/qt/3.0.4/include/qmodules.h" 1
# 617 "/opt/qt/3.0.4/include/qglobal.h" 2
# 665 "/opt/qt/3.0.4/include/qglobal.h"
# 1 "/opt/qt/3.0.4/include/qfeatures.h" 1
# 666 "/opt/qt/3.0.4/include/qglobal.h" 2
# 709 "/opt/qt/3.0.4/include/qglobal.h"
 const char *qVersion();
 bool qSysInfo( int *wordSize, bool *bigEndian );
# 789 "/opt/qt/3.0.4/include/qglobal.h"
 void qDebug( const char *, ... )

    __attribute__ ((format (printf, 1, 2)))

;

 void qWarning( const char *, ... )

    __attribute__ ((format (printf, 1, 2)))

;

 void qFatal( const char *, ... )

    __attribute__ ((format (printf, 1, 2)))

;

 void qSystemWarning( const char *, int code = -1 );
# 855 "/opt/qt/3.0.4/include/qglobal.h"
 bool qt_check_pointer( bool c, const char *, int );
# 871 "/opt/qt/3.0.4/include/qglobal.h"
enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg };

typedef void (*QtMsgHandler)(QtMsgType, const char *);
 QtMsgHandler qInstallMsgHandler( QtMsgHandler );






 void qSuppressObsoleteWarnings( bool = TRUE );

 void qObsolete( const char *obj, const char *oldfunc,
                   const char *newfunc );
 void qObsolete( const char *obj, const char *oldfunc );
 void qObsolete( const char *message );
# 43 "/opt/qt/3.0.4/include/qnamespace.h" 2



class QColor;
class QCursor;


class Qt {
public:
    static const QColor & color0;
    static const QColor & color1;
    static const QColor & black;
    static const QColor & white;
    static const QColor & darkGray;
    static const QColor & gray;
    static const QColor & lightGray;
    static const QColor & red;
    static const QColor & green;
    static const QColor & blue;
    static const QColor & cyan;
    static const QColor & magenta;
    static const QColor & yellow;
    static const QColor & darkRed;
    static const QColor & darkGreen;
    static const QColor & darkBlue;
    static const QColor & darkCyan;
    static const QColor & darkMagenta;
    static const QColor & darkYellow;


    enum ButtonState {
        NoButton = 0x0000,
        LeftButton = 0x0001,
        RightButton = 0x0002,
        MidButton = 0x0004,
        MouseButtonMask = 0x00ff,
        ShiftButton = 0x0100,
        ControlButton = 0x0200,
        AltButton = 0x0400,
        MetaButton = 0x0800,
        KeyButtonMask = 0x0fff,
        Keypad = 0x4000
    };



    enum Orientation {
        Horizontal = 0,
        Vertical
    };






    enum AlignmentFlags {
        AlignAuto = 0x0000,
        AlignLeft = 0x0001,
        AlignRight = 0x0002,
        AlignHCenter = 0x0004,
        AlignJustify = 0x0008,
        AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify,
        AlignTop = 0x0010,
        AlignBottom = 0x0020,
        AlignVCenter = 0x0040,
        AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter,
        AlignCenter = AlignVCenter | AlignHCenter
    };


    enum TextFlags {
        SingleLine = 0x0080,
        DontClip = 0x0100,
        ExpandTabs = 0x0200,
        ShowPrefix = 0x0400,
        WordBreak = 0x0800,
        BreakAnywhere = 0x1000,
        DontPrint = 0x2000,
        NoAccel = 0x4000
    };


    typedef uint WState;


    enum WidgetState {
        WState_Created = 0x00000001,
        WState_Disabled = 0x00000002,
        WState_Visible = 0x00000004,
        WState_ForceHide = 0x00000008,
        WState_OwnCursor = 0x00000010,
        WState_MouseTracking = 0x00000020,
        WState_CompressKeys = 0x00000040,
        WState_BlockUpdates = 0x00000080,
        WState_InPaintEvent = 0x00000100,
        WState_Reparented = 0x00000200,
        WState_ConfigPending = 0x00000400,
        WState_Resized = 0x00000800,
        WState_AutoMask = 0x00001000,
        WState_Polished = 0x00002000,
        WState_DND = 0x00004000,
        WState_Reserved0 = 0x00008000,
        WState_Reserved1 = 0x00010000,
        WState_Reserved2 = 0x00020000,
        WState_Reserved3 = 0x00040000,
        WState_Maximized = 0x00080000,
        WState_Minimized = 0x00100000,
        WState_ForceDisabled = 0x00200000,
        WState_Exposed = 0x00400000,
        WState_HasMouse = 0x00800000
    };


    typedef uint WFlags;


    enum WidgetFlags {
        WType_TopLevel = 0x00000001,
        WType_Dialog = 0x00000002,
        WType_Popup = 0x00000004,
        WType_Desktop = 0x00000008,
        WType_Mask = 0x0000000f,

        WStyle_Customize = 0x00000010,
        WStyle_NormalBorder = 0x00000020,
        WStyle_DialogBorder = 0x00000040,
        WStyle_NoBorder = 0x00002000,
        WStyle_Title = 0x00000080,
        WStyle_SysMenu = 0x00000100,
        WStyle_Minimize = 0x00000200,
        WStyle_Maximize = 0x00000400,
        WStyle_MinMax = WStyle_Minimize | WStyle_Maximize,
        WStyle_Tool = 0x00000800,
        WStyle_StaysOnTop = 0x00001000,
        WStyle_ContextHelp = 0x00004000,
        WStyle_Reserved = 0x00008000,
        WStyle_Mask = 0x0000fff0,

        WDestructiveClose = 0x00010000,
        WPaintDesktop = 0x00020000,
        WPaintUnclipped = 0x00040000,
        WPaintClever = 0x00080000,
        WResizeNoErase = 0x00100000,
        WMouseNoMask = 0x00200000,
        WStaticContents = 0x00400000,
        WRepaintNoErase = 0x00800000,

        WX11BypassWM = 0x01000000,
        WWinOwnDC = 0x00000000,




        WGroupLeader = 0x02000000,
        WShowModal = 0x04000000,
        WNoMousePropagation = 0x08000000,
        WSubWindow = 0x10000000







    };





    enum ImageConversionFlags {
        ColorMode_Mask = 0x00000003,
        AutoColor = 0x00000000,
        ColorOnly = 0x00000003,
        MonoOnly = 0x00000002,


        AlphaDither_Mask = 0x0000000c,
        ThresholdAlphaDither = 0x00000000,
        OrderedAlphaDither = 0x00000004,
        DiffuseAlphaDither = 0x00000008,
        NoAlpha = 0x0000000c,

        Dither_Mask = 0x00000030,
        DiffuseDither = 0x00000000,
        OrderedDither = 0x00000010,
        ThresholdDither = 0x00000020,


        DitherMode_Mask = 0x000000c0,
        AutoDither = 0x00000000,
        PreferDither = 0x00000040,
        AvoidDither = 0x00000080
    };


    enum BGMode {
        TransparentMode,
        OpaqueMode
    };
# 259 "/opt/qt/3.0.4/include/qnamespace.h"
    enum GUIStyle {
        WindowsStyle = 1,
        MotifStyle = 4
    };
# 274 "/opt/qt/3.0.4/include/qnamespace.h"
    enum Modifier {
        SHIFT = 0x00200000,
        CTRL = 0x00400000,
        ALT = 0x00800000,
        MODIFIER_MASK = 0x00e00000,
        UNICODE_ACCEL = 0x10000000,

        ASCII_ACCEL = UNICODE_ACCEL
    };


    enum Key {
        Key_Escape = 0x1000,
        Key_Tab = 0x1001,
        Key_Backtab = 0x1002, Key_BackTab = Key_Backtab,
        Key_Backspace = 0x1003, Key_BackSpace = Key_Backspace,
        Key_Return = 0x1004,
        Key_Enter = 0x1005,
        Key_Insert = 0x1006,
        Key_Delete = 0x1007,
        Key_Pause = 0x1008,
        Key_Print = 0x1009,
        Key_SysReq = 0x100a,
        Key_Home = 0x1010,
        Key_End = 0x1011,
        Key_Left = 0x1012,
        Key_Up = 0x1013,
        Key_Right = 0x1014,
        Key_Down = 0x1015,
        Key_Prior = 0x1016, Key_PageUp = Key_Prior,
        Key_Next = 0x1017, Key_PageDown = Key_Next,
        Key_Shift = 0x1020,
        Key_Control = 0x1021,
        Key_Meta = 0x1022,
        Key_Alt = 0x1023,
        Key_CapsLock = 0x1024,
        Key_NumLock = 0x1025,
        Key_ScrollLock = 0x1026,
        Key_F1 = 0x1030,
        Key_F2 = 0x1031,
        Key_F3 = 0x1032,
        Key_F4 = 0x1033,
        Key_F5 = 0x1034,
        Key_F6 = 0x1035,
        Key_F7 = 0x1036,
        Key_F8 = 0x1037,
        Key_F9 = 0x1038,
        Key_F10 = 0x1039,
        Key_F11 = 0x103a,
        Key_F12 = 0x103b,
        Key_F13 = 0x103c,
        Key_F14 = 0x103d,
        Key_F15 = 0x103e,
        Key_F16 = 0x103f,
        Key_F17 = 0x1040,
        Key_F18 = 0x1041,
        Key_F19 = 0x1042,
        Key_F20 = 0x1043,
        Key_F21 = 0x1044,
        Key_F22 = 0x1045,
        Key_F23 = 0x1046,
        Key_F24 = 0x1047,
        Key_F25 = 0x1048,
        Key_F26 = 0x1049,
        Key_F27 = 0x104a,
        Key_F28 = 0x104b,
        Key_F29 = 0x104c,
        Key_F30 = 0x104d,
        Key_F31 = 0x104e,
        Key_F32 = 0x104f,
        Key_F33 = 0x1050,
        Key_F34 = 0x1051,
        Key_F35 = 0x1052,
        Key_Super_L = 0x1053,
        Key_Super_R = 0x1054,
        Key_Menu = 0x1055,
        Key_Hyper_L = 0x1056,
        Key_Hyper_R = 0x1057,
        Key_Help = 0x1058,
        Key_Direction_L = 0x1059,
        Key_Direction_R = 0x1060,
        Key_Space = 0x20,
        Key_Any = Key_Space,
        Key_Exclam = 0x21,
        Key_QuoteDbl = 0x22,
        Key_NumberSign = 0x23,
        Key_Dollar = 0x24,
        Key_Percent = 0x25,
        Key_Ampersand = 0x26,
        Key_Apostrophe = 0x27,
        Key_ParenLeft = 0x28,
        Key_ParenRight = 0x29,
        Key_Asterisk = 0x2a,
        Key_Plus = 0x2b,
        Key_Comma = 0x2c,
        Key_Minus = 0x2d,
        Key_Period = 0x2e,
        Key_Slash = 0x2f,
        Key_0 = 0x30,
        Key_1 = 0x31,
        Key_2 = 0x32,
        Key_3 = 0x33,
        Key_4 = 0x34,
        Key_5 = 0x35,
        Key_6 = 0x36,
        Key_7 = 0x37,
        Key_8 = 0x38,
        Key_9 = 0x39,
        Key_Colon = 0x3a,
        Key_Semicolon = 0x3b,
        Key_Less = 0x3c,
        Key_Equal = 0x3d,
        Key_Greater = 0x3e,
        Key_Question = 0x3f,
        Key_At = 0x40,
        Key_A = 0x41,
        Key_B = 0x42,
        Key_C = 0x43,
        Key_D = 0x44,
        Key_E = 0x45,
        Key_F = 0x46,
        Key_G = 0x47,
        Key_H = 0x48,
        Key_I = 0x49,
        Key_J = 0x4a,
        Key_K = 0x4b,
        Key_L = 0x4c,
        Key_M = 0x4d,
        Key_N = 0x4e,
        Key_O = 0x4f,
        Key_P = 0x50,
        Key_Q = 0x51,
        Key_R = 0x52,
        Key_S = 0x53,
        Key_T = 0x54,
        Key_U = 0x55,
        Key_V = 0x56,
        Key_W = 0x57,
        Key_X = 0x58,
        Key_Y = 0x59,
        Key_Z = 0x5a,
        Key_BracketLeft = 0x5b,
        Key_Backslash = 0x5c,
        Key_BracketRight = 0x5d,
        Key_AsciiCircum = 0x5e,
        Key_Underscore = 0x5f,
        Key_QuoteLeft = 0x60,
        Key_BraceLeft = 0x7b,
        Key_Bar = 0x7c,
        Key_BraceRight = 0x7d,
        Key_AsciiTilde = 0x7e,



        Key_nobreakspace = 0x0a0,
        Key_exclamdown = 0x0a1,
        Key_cent = 0x0a2,
        Key_sterling = 0x0a3,
        Key_currency = 0x0a4,
        Key_yen = 0x0a5,
        Key_brokenbar = 0x0a6,
        Key_section = 0x0a7,
        Key_diaeresis = 0x0a8,
        Key_copyright = 0x0a9,
        Key_ordfeminine = 0x0aa,
        Key_guillemotleft = 0x0ab,
        Key_notsign = 0x0ac,
        Key_hyphen = 0x0ad,
        Key_registered = 0x0ae,
        Key_macron = 0x0af,
        Key_degree = 0x0b0,
        Key_plusminus = 0x0b1,
        Key_twosuperior = 0x0b2,
        Key_threesuperior = 0x0b3,
        Key_acute = 0x0b4,
        Key_mu = 0x0b5,
        Key_paragraph = 0x0b6,
        Key_periodcentered = 0x0b7,
        Key_cedilla = 0x0b8,
        Key_onesuperior = 0x0b9,
        Key_masculine = 0x0ba,
        Key_guillemotright = 0x0bb,
        Key_onequarter = 0x0bc,
        Key_onehalf = 0x0bd,
        Key_threequarters = 0x0be,
        Key_questiondown = 0x0bf,
        Key_Agrave = 0x0c0,
        Key_Aacute = 0x0c1,
        Key_Acircumflex = 0x0c2,
        Key_Atilde = 0x0c3,
        Key_Adiaeresis = 0x0c4,
        Key_Aring = 0x0c5,
        Key_AE = 0x0c6,
        Key_Ccedilla = 0x0c7,
        Key_Egrave = 0x0c8,
        Key_Eacute = 0x0c9,
        Key_Ecircumflex = 0x0ca,
        Key_Ediaeresis = 0x0cb,
        Key_Igrave = 0x0cc,
        Key_Iacute = 0x0cd,
        Key_Icircumflex = 0x0ce,
        Key_Idiaeresis = 0x0cf,
        Key_ETH = 0x0d0,
        Key_Ntilde = 0x0d1,
        Key_Ograve = 0x0d2,
        Key_Oacute = 0x0d3,
        Key_Ocircumflex = 0x0d4,
        Key_Otilde = 0x0d5,
        Key_Odiaeresis = 0x0d6,
        Key_multiply = 0x0d7,
        Key_Ooblique = 0x0d8,
        Key_Ugrave = 0x0d9,
        Key_Uacute = 0x0da,
        Key_Ucircumflex = 0x0db,
        Key_Udiaeresis = 0x0dc,
        Key_Yacute = 0x0dd,
        Key_THORN = 0x0de,
        Key_ssharp = 0x0df,
        Key_agrave = 0x0e0,
        Key_aacute = 0x0e1,
        Key_acircumflex = 0x0e2,
        Key_atilde = 0x0e3,
        Key_adiaeresis = 0x0e4,
        Key_aring = 0x0e5,
        Key_ae = 0x0e6,
        Key_ccedilla = 0x0e7,
        Key_egrave = 0x0e8,
        Key_eacute = 0x0e9,
        Key_ecircumflex = 0x0ea,
        Key_ediaeresis = 0x0eb,
        Key_igrave = 0x0ec,
        Key_iacute = 0x0ed,
        Key_icircumflex = 0x0ee,
        Key_idiaeresis = 0x0ef,
        Key_eth = 0x0f0,
        Key_ntilde = 0x0f1,
        Key_ograve = 0x0f2,
        Key_oacute = 0x0f3,
        Key_ocircumflex = 0x0f4,
        Key_otilde = 0x0f5,
        Key_odiaeresis = 0x0f6,
        Key_division = 0x0f7,
        Key_oslash = 0x0f8,
        Key_ugrave = 0x0f9,
        Key_uacute = 0x0fa,
        Key_ucircumflex = 0x0fb,
        Key_udiaeresis = 0x0fc,
        Key_yacute = 0x0fd,
        Key_thorn = 0x0fe,
        Key_ydiaeresis = 0x0ff,

        Key_unknown = 0xffff
    };


    enum ArrowType {
        UpArrow,
        DownArrow,
        LeftArrow,
        RightArrow
    };


    enum RasterOp {
        CopyROP,
        OrROP,
        XorROP,
        NotAndROP, EraseROP=NotAndROP,
        NotCopyROP,
        NotOrROP,
        NotXorROP,
        AndROP, NotEraseROP=AndROP,
        NotROP,
        ClearROP,
        SetROP,
        NopROP,
        AndNotROP,
        OrNotROP,
        NandROP,
        NorROP, LastROP=NorROP
    };


    enum PenStyle {
        NoPen,
        SolidLine,
        DashLine,
        DotLine,
        DashDotLine,
        DashDotDotLine,
        MPenStyle = 0x0f
    };


    enum PenCapStyle {
        FlatCap = 0x00,
        SquareCap = 0x10,
        RoundCap = 0x20,
        MPenCapStyle = 0x30
    };


    enum PenJoinStyle {
        MiterJoin = 0x00,
        BevelJoin = 0x40,
        RoundJoin = 0x80,
        MPenJoinStyle = 0xc0
    };


    enum BrushStyle {
        NoBrush,
        SolidPattern,
        Dense1Pattern,
        Dense2Pattern,
        Dense3Pattern,
        Dense4Pattern,
        Dense5Pattern,
        Dense6Pattern,
        Dense7Pattern,
        HorPattern,
        VerPattern,
        CrossPattern,
        BDiagPattern,
        FDiagPattern,
        DiagCrossPattern,
        CustomPattern=24
    };


    enum WindowsVersion {
        WV_32s = 0x0001,
        WV_95 = 0x0002,
        WV_98 = 0x0003,
        WV_Me = 0x0004,
        WV_DOS_based = 0x000f,

        WV_NT = 0x0010,
        WV_2000 = 0x0020,
        WV_XP = 0x0030,
        WV_NT_based = 0x00f0
    };


    enum UIEffect {
        UI_General,
        UI_AnimateMenu,
        UI_FadeMenu,
        UI_AnimateCombo,
        UI_AnimateTooltip,
        UI_FadeTooltip
    };


    enum CursorShape {
        ArrowCursor,
        UpArrowCursor,
        CrossCursor,
        WaitCursor,
        IbeamCursor,
        SizeVerCursor,
        SizeHorCursor,
        SizeBDiagCursor,
        SizeFDiagCursor,
        SizeAllCursor,
        BlankCursor,
        SplitVCursor,
        SplitHCursor,
        PointingHandCursor,
        ForbiddenCursor,
        WhatsThisCursor,
        LastCursor = WhatsThisCursor,
        BitmapCursor = 24
    };



    static const QCursor & arrowCursor;
    static const QCursor & upArrowCursor;
    static const QCursor & crossCursor;
    static const QCursor & waitCursor;
    static const QCursor & ibeamCursor;
    static const QCursor & sizeVerCursor;
    static const QCursor & sizeHorCursor;
    static const QCursor & sizeBDiagCursor;
    static const QCursor & sizeFDiagCursor;
    static const QCursor & sizeAllCursor;
    static const QCursor & blankCursor;
    static const QCursor & splitVCursor;

    static const QCursor & splitHCursor;

    static const QCursor & pointingHandCursor;
    static const QCursor & forbiddenCursor;
    static const QCursor & whatsThisCursor;


    enum TextFormat {
        PlainText,
        RichText,
        AutoText
    };


    enum Dock {
        DockUnmanaged,
        DockTornOff,
        DockTop,
        DockBottom,
        DockRight,
        DockLeft,
        DockMinimized
# 696 "/opt/qt/3.0.4/include/qnamespace.h"
    };

    typedef Dock ToolBarDock;


    enum DateFormat {
        TextDate,
        ISODate,
        LocalDate
    };


    enum BackgroundMode {
        FixedColor,
        FixedPixmap,
        NoBackground,
        PaletteForeground,
        PaletteButton,
        PaletteLight,
        PaletteMidlight,
        PaletteDark,
        PaletteMid,
        PaletteText,
        PaletteBrightText,
        PaletteBase,
        PaletteBackground,
        PaletteShadow,
        PaletteHighlight,
        PaletteHighlightedText,
        PaletteButtonText,
        PaletteLink,
        PaletteLinkVisited,
        X11ParentRelative
    };

    typedef uint ComparisonFlags;


    enum StringComparisonMode {
        CaseSensitive = 0x00001,
        BeginsWith = 0x00002,
        EndsWith = 0x00004,
        Contains = 0x00008,
        ExactMatch = 0x00010
    };
# 749 "/opt/qt/3.0.4/include/qnamespace.h"
    typedef unsigned long HANDLE;



};


class QInternal {
public:
    enum PaintDeviceFlags {
        UndefinedDevice = 0x00,
        Widget = 0x01,
        Pixmap = 0x02,
        Printer = 0x03,
        Picture = 0x04,
        System = 0x05,
        DeviceTypeMask = 0x0f,
        ExternalDevice = 0x10,

        CompatibilityMode = 0x20
    };
};
# 2 "kkeyserver_x11.cpp" 2
# 1 "/opt/qt/3.0.4/include/qwindowdefs.h" 1
# 43 "/opt/qt/3.0.4/include/qwindowdefs.h"
# 1 "/opt/qt/3.0.4/include/qobjectdefs.h" 1
# 71 "/opt/qt/3.0.4/include/qobjectdefs.h"
struct QUObject;
# 151 "/opt/qt/3.0.4/include/qobjectdefs.h"
class QObject;
class QMetaObject;
class QSignal;
class QConnection;
class QEvent;
struct QMetaData;
class QConnectionList;
class QConnectionListIt;
class QSignalVec;
class QObjectList;
class QObjectListIt;
class QMemberDict;
# 44 "/opt/qt/3.0.4/include/qwindowdefs.h" 2
# 1 "/opt/qt/3.0.4/include/qstring.h" 1
# 43 "/opt/qt/3.0.4/include/qstring.h"
# 1 "/opt/qt/3.0.4/include/qcstring.h" 1
# 43 "/opt/qt/3.0.4/include/qcstring.h"
# 1 "/opt/qt/3.0.4/include/qmemarray.h" 1
# 42 "/opt/qt/3.0.4/include/qmemarray.h"
# 1 "/opt/qt/3.0.4/include/qgarray.h" 1
# 42 "/opt/qt/3.0.4/include/qgarray.h"
# 1 "/opt/qt/3.0.4/include/qshared.h" 1
# 46 "/opt/qt/3.0.4/include/qshared.h"
struct QShared
{
    QShared() { count = 1; }
    void ref() { count++; }
    bool deref() { return !--count; }
    uint count;
};
# 43 "/opt/qt/3.0.4/include/qgarray.h" 2



class QGArray
{
friend class QBuffer;
public:

    struct array_data : public QShared {
        array_data() { data=0; len=0; }
        char *data;
        uint len;
    };
    QGArray();
protected:
    QGArray( int, int );
    QGArray( int size );
    QGArray( const QGArray &a );
    virtual ~QGArray();

    QGArray &operator=( const QGArray &a ) { return assign( a ); }

    virtual void detach() { duplicate(*this); }

    char *data() const { return shd->data; }
    uint nrefs() const { return shd->count; }
    uint size() const { return shd->len; }
    bool isEqual( const QGArray &a ) const;

    bool resize( uint newsize );

    bool fill( const char *d, int len, uint sz );

    QGArray &assign( const QGArray &a );
    QGArray &assign( const char *d, uint len );
    QGArray &duplicate( const QGArray &a );
    QGArray &duplicate( const char *d, uint len );
    void store( const char *d, uint len );

    array_data *sharedBlock() const { return shd; }
    void setSharedBlock( array_data *p ) { shd=(array_data*)p; }

    QGArray &setRawData( const char *d, uint len );
    void resetRawData( const char *d, uint len );

    int find( const char *d, uint index, uint sz ) const;
    int contains( const char *d, uint sz ) const;

    void sort( uint sz );
    int bsearch( const char *d, uint sz ) const;

    char *at( uint index ) const;

    bool setExpand( uint index, const char *d, uint sz );

protected:
    virtual array_data *newData();
    virtual void deleteData( array_data *p );

private:
    static void msg_index( uint );
    array_data *shd;
};


inline char *QGArray::at( uint index ) const
{

    if ( index >= size() ) {
        msg_index( index );
        index = 0;
    }

    return &shd->data[index];
}
# 43 "/opt/qt/3.0.4/include/qmemarray.h" 2



template<class type>
class QMemArray
: public QGArray
{
public:
    typedef type* Iterator;
    typedef const type* ConstIterator;
    typedef type ValueType;

protected:
    QMemArray( int, int ) : QGArray( 0, 0 ) {}

public:
    QMemArray() {}
    QMemArray( int size ) : QGArray(size*sizeof(type)) {}
    QMemArray( const QMemArray<type> &a ) : QGArray(a) {}
   ~QMemArray() {}
    QMemArray<type> &operator=(const QMemArray<type> &a)
                                { return (QMemArray<type>&)QGArray::assign(a); }
    type *data() const { return (type *)QGArray::data(); }
    uint nrefs() const { return QGArray::nrefs(); }
    uint size() const { return QGArray::size()/sizeof(type); }
    uint count() const { return size(); }
    bool isEmpty() const { return QGArray::size() == 0; }
    bool isNull() const { return QGArray::data() == 0; }
    bool resize( uint size ) { return QGArray::resize(size*sizeof(type)); }
    bool truncate( uint pos ) { return QGArray::resize(pos*sizeof(type)); }
    bool fill( const type &d, int size = -1 )
        { return QGArray::fill((char*)&d,size,sizeof(type) ); }
    void detach() { QGArray::detach(); }
    QMemArray<type> copy() const
        { QMemArray<type> tmp; return tmp.duplicate(*this); }
    QMemArray<type>& assign( const QMemArray<type>& a )
        { return (QMemArray<type>&)QGArray::assign(a); }
    QMemArray<type>& assign( const type *a, uint n )
        { return (QMemArray<type>&)QGArray::assign((char*)a,n*sizeof(type)); }
    QMemArray<type>& duplicate( const QMemArray<type>& a )
        { return (QMemArray<type>&)QGArray::duplicate(a); }
    QMemArray<type>& duplicate( const type *a, uint n )
        { return (QMemArray<type>&)QGArray::duplicate((char*)a,n*sizeof(type)); }
    QMemArray<type>& setRawData( const type *a, uint n )
        { return (QMemArray<type>&)QGArray::setRawData((char*)a,
                                                     n*sizeof(type)); }
    void resetRawData( const type *a, uint n )
        { QGArray::resetRawData((char*)a,n*sizeof(type)); }
    int find( const type &d, uint i=0 ) const
        { return QGArray::find((char*)&d,i,sizeof(type)); }
    int contains( const type &d ) const
        { return QGArray::contains((char*)&d,sizeof(type)); }
    void sort() { QGArray::sort(sizeof(type)); }
    int bsearch( const type &d ) const
        { return QGArray::bsearch((const char*)&d,sizeof(type)); }
    type& operator[]( int i ) const
        { return (type &)(*(type *)QGArray::at(i*sizeof(type))); }
    type& at( uint i ) const
        { return (type &)(*(type *)QGArray::at(i*sizeof(type))); }
         operator const type*() const { return (const type *)QGArray::data(); }
    bool operator==( const QMemArray<type> &a ) const { return isEqual(a); }
    bool operator!=( const QMemArray<type> &a ) const { return !isEqual(a); }
    Iterator begin() { return data(); }
    Iterator end() { return data() + size(); }
    ConstIterator begin() const { return data(); }
    ConstIterator end() const { return data() + size(); }
};
# 44 "/opt/qt/3.0.4/include/qcstring.h" 2


# 1 "/usr/include/string.h" 1 3
# 26 "/usr/include/string.h" 3
# 1 "/usr/include/features.h" 1 3
# 283 "/usr/include/features.h" 3
# 1 "/usr/include/sys/cdefs.h" 1 3
# 284 "/usr/include/features.h" 2 3
# 312 "/usr/include/features.h" 3
# 1 "/usr/include/gnu/stubs.h" 1 3
# 313 "/usr/include/features.h" 2 3
# 27 "/usr/include/string.h" 2 3

extern "C" {




# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3
# 201 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 3
typedef unsigned int size_t;
# 34 "/usr/include/string.h" 2 3



extern void *memcpy (void *__restrict __dest,
                     __const void *__restrict __src, size_t __n) throw ();


extern void *memmove (void *__dest, __const void *__src, size_t __n)
     throw ();





extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
                      int __c, size_t __n)
     throw ();




extern void *memset (void *__s, int __c, size_t __n) throw ();


extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
     throw () __attribute__ ((__pure__));


extern void *memchr (__const void *__s, int __c, size_t __n)
      throw () __attribute__ ((__pure__));




extern void *rawmemchr (__const void *__s, int __c) throw () __attribute__ ((__pure__));


extern void *memrchr (__const void *__s, int __c, size_t __n)
      throw () __attribute__ ((__pure__));




extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
     throw ();

extern char *strncpy (char *__restrict __dest,
                      __const char *__restrict __src, size_t __n) throw ();


extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
     throw ();

extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
                      size_t __n) throw ();


extern int strcmp (__const char *__s1, __const char *__s2)
     throw () __attribute__ ((__pure__));

extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
     throw () __attribute__ ((__pure__));


extern int strcoll (__const char *__s1, __const char *__s2)
     throw () __attribute__ ((__pure__));

extern size_t strxfrm (char *__restrict __dest,
                       __const char *__restrict __src, size_t __n) throw ();





# 1 "/usr/include/xlocale.h" 1 3
# 28 "/usr/include/xlocale.h" 3
typedef struct __locale_struct
{

  struct locale_data *__locales[13];


  const unsigned short int *__ctype_b;
  const int *__ctype_tolower;
  const int *__ctype_toupper;
} *__locale_t;
# 109 "/usr/include/string.h" 2 3


extern int __strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
     throw () __attribute__ ((__pure__));

extern size_t __strxfrm_l (char *__dest, __const char *__src, size_t __n,
                           __locale_t __l) throw ();




extern char *strdup (__const char *__s) throw () __attribute__ ((__malloc__));






extern char *strndup (__const char *__string, size_t __n)
     throw () __attribute__ ((__malloc__));
# 155 "/usr/include/string.h" 3
extern char *strchr (__const char *__s, int __c) throw () __attribute__ ((__pure__));

extern char *strrchr (__const char *__s, int __c) throw () __attribute__ ((__pure__));




extern char *strchrnul (__const char *__s, int __c) throw () __attribute__ ((__pure__));




extern size_t strcspn (__const char *__s, __const char *__reject)
     throw () __attribute__ ((__pure__));


extern size_t strspn (__const char *__s, __const char *__accept)
     throw () __attribute__ ((__pure__));

extern char *strpbrk (__const char *__s, __const char *__accept)
     throw () __attribute__ ((__pure__));

extern char *strstr (__const char *__haystack, __const char *__needle)
     throw () __attribute__ ((__pure__));



extern char *strcasestr (__const char *__haystack, __const char *__needle)
     throw () __attribute__ ((__pure__));



extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
     throw ();



extern char *__strtok_r (char *__restrict __s,
                         __const char *__restrict __delim,
                         char **__restrict __save_ptr) throw ();

extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
                       char **__restrict __save_ptr) throw ();






extern void *memmem (__const void *__haystack, size_t __haystacklen,
                     __const void *__needle, size_t __needlelen)
     throw () __attribute__ ((__pure__));



extern void *__mempcpy (void *__restrict __dest,
                        __const void *__restrict __src, size_t __n) throw ();
extern void *mempcpy (void *__restrict __dest,
                      __const void *__restrict __src, size_t __n) throw ();




extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__));




extern size_t strnlen (__const char *__string, size_t __maxlen)
     throw () __attribute__ ((__pure__));




extern char *strerror (int __errnum) throw ();



extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw ();




extern void __bzero (void *__s, size_t __n) throw ();



extern void bcopy (__const void *__src, void *__dest, size_t __n) throw ();


extern void bzero (void *__s, size_t __n) throw ();


extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
     throw () __attribute__ ((__pure__));


extern char *index (__const char *__s, int __c) throw () __attribute__ ((__pure__));


extern char *rindex (__const char *__s, int __c) throw () __attribute__ ((__pure__));



extern int ffs (int __i) throw () __attribute__ ((__const__));




extern int ffsl (long int __l) throw () __attribute__ ((__const__));

__extension__ extern int ffsll (long long int __ll)
     throw () __attribute__ ((__const__));




extern int strcasecmp (__const char *__s1, __const char *__s2)
     throw () __attribute__ ((__pure__));


extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
     throw () __attribute__ ((__pure__));





extern int __strcasecmp_l (__const char *__s1, __const char *__s2,
                           __locale_t __loc) throw () __attribute__ ((__pure__));

extern int __strncasecmp_l (__const char *__s1, __const char *__s2,
                            size_t __n, __locale_t __loc)
     throw () __attribute__ ((__pure__));





extern char *strsep (char **__restrict __stringp,
                     __const char *__restrict __delim) throw ();




extern int strverscmp (__const char *__s1, __const char *__s2)
     throw () __attribute__ ((__pure__));


extern char *strsignal (int __sig) throw ();


extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
     throw ();
extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
     throw ();



extern char *__stpncpy (char *__restrict __dest,
                        __const char *__restrict __src, size_t __n) throw ();
extern char *stpncpy (char *__restrict __dest,
                      __const char *__restrict __src, size_t __n) throw ();


extern char *strfry (char *__string) throw ();


extern void *memfrob (void *__s, size_t __n) throw ();






extern char *basename (__const char *__filename) throw ();
# 364 "/usr/include/string.h" 3
}
# 47 "/opt/qt/3.0.4/include/qcstring.h" 2






 void *qmemmove( void *dst, const void *src, uint len );

 char *qstrdup( const char * );

 inline uint qstrlen( const char *str )
{ return str ? (uint)strlen(str) : 0; }

 inline char *qstrcpy( char *dst, const char *src )
{ return src ? strcpy(dst, src) : 0; }

 char *qstrncpy( char *dst, const char *src, uint len );

 inline int qstrcmp( const char *str1, const char *str2 )
{
    return ( str1 && str2 ) ? strcmp( str1, str2 )
                            : ( str1 ? 1 : ( str2 ? -1 : 0 ) );
}

 inline int qstrncmp( const char *str1, const char *str2, uint len )
{
    return ( str1 && str2 ) ? strncmp( str1, str2, len )
                            : ( str1 ? 1 : ( str2 ? -1 : 0 ) );
}

 int qstricmp( const char *, const char * );

 int qstrnicmp( const char *, const char *, uint len );
# 98 "/opt/qt/3.0.4/include/qcstring.h"
 Q_UINT16 qChecksum( const char *s, uint len );
# 120 "/opt/qt/3.0.4/include/qcstring.h"
typedef QMemArray<char> QByteArray;






 QDataStream &operator<<( QDataStream &, const QByteArray & );
 QDataStream &operator>>( QDataStream &, QByteArray & );
# 137 "/opt/qt/3.0.4/include/qcstring.h"
class QRegExp;

class QCString : public QByteArray
{
public:
    QCString() {}
    QCString( int size );
    QCString( const QCString &s ) : QByteArray( s ) {}
    QCString( const char *str );
    QCString( const char *str, uint maxlen );
    ~QCString();

    QCString &operator=( const QCString &s );
    QCString &operator=( const char *str );

    bool isNull() const;
    bool isEmpty() const;
    uint length() const;
    bool resize( uint newlen );
    bool truncate( uint pos );
    bool fill( char c, int len = -1 );

    QCString copy() const;

    QCString &sprintf( const char *format, ... );

    int find( char c, int index=0, bool cs=TRUE ) const;
    int find( const char *str, int index=0, bool cs=TRUE ) const;

    int find( const QRegExp &, int index=0 ) const;

    int findRev( char c, int index=-1, bool cs=TRUE) const;
    int findRev( const char *str, int index=-1, bool cs=TRUE) const;

    int findRev( const QRegExp &, int index=-1 ) const;

    int contains( char c, bool cs=TRUE ) const;
    int contains( const char *str, bool cs=TRUE ) const;

    int contains( const QRegExp & ) const;

    QCString left( uint len ) const;
    QCString right( uint len ) const;
    QCString mid( uint index, uint len=0xffffffff) const;

    QCString leftJustify( uint width, char fill=' ', bool trunc=FALSE)const;
    QCString rightJustify( uint width, char fill=' ',bool trunc=FALSE)const;

    QCString lower() const;
    QCString upper() const;

    QCString stripWhiteSpace() const;
    QCString simplifyWhiteSpace() const;

    QCString &insert( uint index, const char * );
    QCString &insert( uint index, char );
    QCString &append( const char * );
    QCString &prepend( const char * );
    QCString &remove( uint index, uint len );
    QCString &replace( uint index, uint len, const char * );

    QCString &replace( const QRegExp &, const char * );

    short toShort( bool *ok=0 ) const;
    ushort toUShort( bool *ok=0 ) const;
    int toInt( bool *ok=0 ) const;
    uint toUInt( bool *ok=0 ) const;
    long toLong( bool *ok=0 ) const;
    ulong toULong( bool *ok=0 ) const;
    float toFloat( bool *ok=0 ) const;
    double toDouble( bool *ok=0 ) const;

    QCString &setStr( const char *s );
    QCString &setNum( short );
    QCString &setNum( ushort );
    QCString &setNum( int );
    QCString &setNum( uint );
    QCString &setNum( long );
    QCString &setNum( ulong );
    QCString &setNum( float, char f='g', int prec=6 );
    QCString &setNum( double, char f='g', int prec=6 );

    bool setExpand( uint index, char c );

                operator const char *() const;
    QCString &operator+=( const char *str );
    QCString &operator+=( char c );
};






 QDataStream &operator<<( QDataStream &, const QCString & );
 QDataStream &operator>>( QDataStream &, QCString & );






inline QCString &QCString::operator=( const QCString &s )
{ return (QCString&)assign( s ); }

inline QCString &QCString::operator=( const char *str )
{ return (QCString&)duplicate( str, qstrlen(str)+1 ); }

inline bool QCString::isNull() const
{ return data() == 0; }

inline bool QCString::isEmpty() const
{ return data() == 0 || *data() == '\0'; }

inline uint QCString::length() const
{ return qstrlen( data() ); }

inline bool QCString::truncate( uint pos )
{ return resize(pos+1); }

inline QCString QCString::copy() const
{ return QCString( data() ); }

inline QCString &QCString::prepend( const char *s )
{ return insert(0,s); }

inline QCString &QCString::append( const char *s )
{ return operator+=(s); }

inline QCString &QCString::setNum( short n )
{ return setNum((long)n); }

inline QCString &QCString::setNum( ushort n )
{ return setNum((ulong)n); }

inline QCString &QCString::setNum( int n )
{ return setNum((long)n); }

inline QCString &QCString::setNum( uint n )
{ return setNum((ulong)n); }

inline QCString &QCString::setNum( float n, char f, int prec )
{ return setNum((double)n,f,prec); }

inline QCString::operator const char *() const
{ return (const char *)data(); }






 inline bool operator==( const QCString &s1, const QCString &s2 )
{ return qstrcmp(s1.data(),s2.data()) == 0; }

 inline bool operator==( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) == 0; }

 inline bool operator==( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) == 0; }

 inline bool operator!=( const QCString &s1, const QCString &s2 )
{ return qstrcmp(s1.data(),s2.data()) != 0; }

 inline bool operator!=( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) != 0; }

 inline bool operator!=( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) != 0; }

 inline bool operator<( const QCString &s1, const QCString& s2 )
{ return qstrcmp(s1.data(),s2.data()) < 0; }

 inline bool operator<( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) < 0; }

 inline bool operator<( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) < 0; }

 inline bool operator<=( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) <= 0; }

 inline bool operator<=( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) <= 0; }

 inline bool operator>( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) > 0; }

 inline bool operator>( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) > 0; }

 inline bool operator>=( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) >= 0; }

 inline bool operator>=( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) >= 0; }

 inline const QCString operator+( const QCString &s1, const QCString &s2 )
{
    QCString tmp( s1.data() );
    tmp += s2;
    return tmp;
}

 inline const QCString operator+( const QCString &s1, const char *s2 )
{
    QCString tmp( s1.data() );
    tmp += s2;
    return tmp;
}

 inline const QCString operator+( const char *s1, const QCString &s2 )
{
    QCString tmp( s1 );
    tmp += s2;
    return tmp;
}

 inline const QCString operator+( const QCString &s1, char c2 )
{
    QCString tmp( s1.data() );
    tmp += c2;
    return tmp;
}

 inline const QCString operator+( char c1, const QCString &s2 )
{
    QCString tmp;
    tmp += c1;
    tmp += s2;
    return tmp;
}
# 44 "/opt/qt/3.0.4/include/qstring.h" 2







class QRegExp;
class QString;
class QCharRef;

class QChar {
public:
    QChar();
    QChar( char c );
    QChar( uchar c );
    QChar( uchar c, uchar r );
    QChar( const QChar& c );
    QChar( ushort rc );
    QChar( short rc );
    QChar( uint rc );
    QChar( int rc );

    static const QChar null;
    static const QChar replacement;
    static const QChar byteOrderMark;
    static const QChar byteOrderSwapped;
    static const QChar nbsp;



    enum Category
    {
        NoCategory,

        Mark_NonSpacing,
        Mark_SpacingCombining,
        Mark_Enclosing,

        Number_DecimalDigit,
        Number_Letter,
        Number_Other,

        Separator_Space,
        Separator_Line,
        Separator_Paragraph,

        Other_Control,
        Other_Format,
        Other_Surrogate,
        Other_PrivateUse,
        Other_NotAssigned,

        Letter_Uppercase,
        Letter_Lowercase,
        Letter_Titlecase,
        Letter_Modifier,
        Letter_Other,

        Punctuation_Connector,
        Punctuation_Dash,
        Punctuation_Dask = Punctuation_Dash,
        Punctuation_Open,
        Punctuation_Close,
        Punctuation_InitialQuote,
        Punctuation_FinalQuote,
        Punctuation_Other,

        Symbol_Math,
        Symbol_Currency,
        Symbol_Modifier,
        Symbol_Other
    };

    enum Direction
    {
        DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON,
        DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN
    };

    enum Decomposition
    {
        Single, Canonical, Font, NoBreak, Initial, Medial,
        Final, Isolated, Circle, Super, Sub, Vertical,
        Wide, Narrow, Small, Square, Compat, Fraction
    };

    enum Joining
    {
        OtherJoining, Dual, Right, Center
    };

    enum CombiningClass
    {
        Combining_BelowLeftAttached = 200,
        Combining_BelowAttached = 202,
        Combining_BelowRightAttached = 204,
        Combining_LeftAttached = 208,
        Combining_RightAttached = 210,
        Combining_AboveLeftAttached = 212,
        Combining_AboveAttached = 214,
        Combining_AboveRightAttached = 216,

        Combining_BelowLeft = 218,
        Combining_Below = 220,
        Combining_BelowRight = 222,
        Combining_Left = 224,
        Combining_Right = 226,
        Combining_AboveLeft = 228,
        Combining_Above = 230,
        Combining_AboveRight = 232,

        Combining_DoubleBelow = 233,
        Combining_DoubleAbove = 234,
        Combining_IotaSubscript = 240
    };



    int digitValue() const;
    QChar lower() const;
    QChar upper() const;

    Category category() const;
    Direction direction() const;
    Joining joining() const;
    bool mirrored() const;
    QChar mirroredChar() const;
    const QString &decomposition() const;
    Decomposition decompositionTag() const;
    unsigned char combiningClass() const;

    char latin1() const { return ucs > 0xff ? 0 : (char) ucs; }
    ushort unicode() const { return ucs; }
    ushort &unicode() { return ucs; }


    operator char() const { return latin1(); }


    bool isNull() const { return unicode()==0; }
    bool isPrint() const;
    bool isPunct() const;
    bool isSpace() const;
    bool isMark() const;
    bool isLetter() const;
    bool isNumber() const;
    bool isLetterOrNumber() const;
    bool isDigit() const;
    bool isSymbol() const;

    uchar cell() const { return ((uchar) ucs & 0xff); }
    uchar row() const { return ((uchar) (ucs>>8)&0xff); }
    void setCell( uchar cell ) { ucs = (ucs & 0xff00) + cell; }
    void setRow( uchar row ) { ucs = (((ushort) row)<<8) + (ucs&0xff); }

    static bool networkOrdered() {
        int wordSize;
        bool bigEndian = FALSE;
        qSysInfo( &wordSize, &bigEndian );
        return bigEndian;
    }

    friend inline bool operator==( char ch, QChar c );
    friend inline bool operator==( QChar c, char ch );
    friend inline bool operator==( QChar c1, QChar c2 );
    friend inline bool operator!=( QChar c1, QChar c2 );
    friend inline bool operator!=( char ch, QChar c );
    friend inline bool operator!=( QChar c, char ch );
    friend inline bool operator<=( QChar c, char ch );
    friend inline bool operator<=( char ch, QChar c );
    friend inline bool operator<=( QChar c1, QChar c2 );

private:
    ushort ucs;



} ;

inline QChar::QChar()
{
    ucs = 0;



}
inline QChar::QChar( char c )
{
    ucs = (uchar)c;



}
inline QChar::QChar( uchar c )
{
    ucs = c;



}
inline QChar::QChar( uchar c, uchar r )
{
    ucs = (r << 8) | c;



}
inline QChar::QChar( const QChar& c )
{
    ucs = c.ucs;



}

inline QChar::QChar( ushort rc )
{
    ucs = rc;



}
inline QChar::QChar( short rc )
{
    ucs = (ushort) rc;



}
inline QChar::QChar( uint rc )
{
    ucs = (ushort ) (rc & 0xffff);



}
inline QChar::QChar( int rc )
{
    ucs = (ushort) (rc & 0xffff);



}


inline bool operator==( char ch, QChar c )
{
    return ((uchar) ch) == c.ucs;
}

inline bool operator==( QChar c, char ch )
{
    return ((uchar) ch) == c.ucs;
}

inline bool operator==( QChar c1, QChar c2 )
{
    return c1.ucs == c2.ucs;
}

inline bool operator!=( QChar c1, QChar c2 )
{
    return c1.ucs != c2.ucs;
}

inline bool operator!=( char ch, QChar c )
{
    return ((uchar)ch) != c.ucs;
}

inline bool operator!=( QChar c, char ch )
{
    return ((uchar) ch) != c.ucs;
}

inline bool operator<=( QChar c, char ch )
{
    return c.ucs <= ((uchar) ch);
}

inline bool operator<=( char ch, QChar c )
{
    return ((uchar) ch) <= c.ucs;
}

inline bool operator<=( QChar c1, QChar c2 )
{
    return c1.ucs <= c2.ucs;
}

inline bool operator>=( QChar c, char ch ) { return ch <= c; }
inline bool operator>=( char ch, QChar c ) { return c <= ch; }
inline bool operator>=( QChar c1, QChar c2 ) { return c2 <= c1; }
inline bool operator<( QChar c, char ch ) { return !(ch<=c); }
inline bool operator<( char ch, QChar c ) { return !(c<=ch); }
inline bool operator<( QChar c1, QChar c2 ) { return !(c2<=c1); }
inline bool operator>( QChar c, char ch ) { return !(ch>=c); }
inline bool operator>( char ch, QChar c ) { return !(c>=ch); }
inline bool operator>( QChar c1, QChar c2 ) { return !(c2>=c1); }


struct QStringData : public QShared {
    QStringData() :
        unicode(0), ascii(0), len(0), simpletext(1), maxl(0), dirty(0) { ref(); }
    QStringData(QChar *u, uint l, uint m) :
        unicode(u), ascii(0), len(l), simpletext(1), maxl(m), dirty(1) { }

    ~QStringData() { if ( unicode ) delete[] ((char*)unicode);
                     if ( ascii ) delete[] ascii; }

    void deleteSelf();
    QChar *unicode;
    char *ascii;
    void setDirty() {
        if ( ascii ) {
            delete [] ascii;
            ascii = 0;
        }
        dirty = 1;
    }



    uint len : 30;

    uint simpletext : 1;



    uint maxl : 30;

    uint dirty : 1;
};


class QString
{
public:
    QString();
    QString( QChar );
    QString( const QString & );
    QString( const QByteArray& );
    QString( const QChar* unicode, uint length );

    QString( const char *str );

    ~QString();

    QString &operator=( const QString & );

    QString &operator=( const char * );

    QString &operator=( const QCString& );
    QString &operator=( QChar c );
    QString &operator=( char c );

    static const QString null;

    bool isNull() const;
    bool isEmpty() const;
    uint length() const;
    void truncate( uint pos );

    QString & fill( QChar c, int len = -1 );

    QString copy() const;

    QString arg( long a, int fieldwidth=0, int base=10 ) const;
    QString arg( ulong a, int fieldwidth=0, int base=10 ) const;
    QString arg( int a, int fieldwidth=0, int base=10 ) const;
    QString arg( uint a, int fieldwidth=0, int base=10 ) const;
    QString arg( short a, int fieldwidth=0, int base=10 ) const;
    QString arg( ushort a, int fieldwidth=0, int base=10 ) const;
    QString arg( char a, int fieldwidth=0 ) const;
    QString arg( QChar a, int fieldwidth=0 ) const;
    QString arg( const QString& a, int fieldwidth=0 ) const;
    QString arg( double a, int fieldwidth=0, char fmt='g', int prec=-1 ) const;


    QString &sprintf( const char* format, ... )

        __attribute__ ((format (printf, 2, 3)))

        ;


    int find( QChar c, int index=0, bool cs=TRUE ) const;
    int find( char c, int index=0, bool cs=TRUE ) const;
    int find( const QString &str, int index=0, bool cs=TRUE ) const;

    int find( const QRegExp &, int index=0 ) const;


    int find( const char* str, int index=0 ) const;

    int findRev( QChar c, int index=-1, bool cs=TRUE) const;
    int findRev( char c, int index=-1, bool cs=TRUE) const;
    int findRev( const QString &str, int index=-1, bool cs=TRUE) const;

    int findRev( const QRegExp &, int index=-1 ) const;


    int findRev( const char* str, int index=-1 ) const;

    int contains( QChar c, bool cs=TRUE ) const;
    int contains( char c, bool cs=TRUE ) const
                    { return contains(QChar(c), cs); }

    int contains( const char* str, bool cs=TRUE ) const;

    int contains( const QString &str, bool cs=TRUE ) const;

    int contains( const QRegExp & ) const;


    enum SectionFlags {
        SectionDefault = 0x00,
        SectionSkipEmpty = 0x01,
        SectionIncludeLeadingSep = 0x02,
        SectionIncludeTrailingSep = 0x04,
        SectionCaseInsensitiveSeps = 0x08
    };
    QString section( QChar sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const;
    QString section( char sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const;

    QString section( const char *in_sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const;

    QString section( const QString &in_sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const;

    QString section( const QRegExp &reg, int start, int end = 0xffffffff, int flags = SectionDefault ) const;


    QString left( uint len ) const;
    QString right( uint len ) const;
    QString mid( uint index, uint len=0xffffffff) const;

    QString leftJustify( uint width, QChar fill=' ', bool trunc=FALSE)const;
    QString rightJustify( uint width, QChar fill=' ',bool trunc=FALSE)const;

    QString lower() const;
    QString upper() const;

    QString stripWhiteSpace() const;
    QString simplifyWhiteSpace() const;

    QString &insert( uint index, const QString & );
    QString &insert( uint index, const QChar*, uint len );
    QString &insert( uint index, QChar );
    QString &insert( uint index, char c ) { return insert(index,QChar(c)); }
    QString &append( char );
    QString &append( QChar );
    QString &append( const QString & );
    QString &prepend( char );
    QString &prepend( QChar );
    QString &prepend( const QString & );
    QString &remove( uint index, uint len );
    QString &replace( uint index, uint len, const QString & );
    QString &replace( uint index, uint len, const QChar*, uint clen );

    QString &replace( const QRegExp &, const QString & );

    short toShort( bool *ok=0, int base=10 ) const;
    ushort toUShort( bool *ok=0, int base=10 ) const;
    int toInt( bool *ok=0, int base=10 ) const;
    uint toUInt( bool *ok=0, int base=10 ) const;
    long toLong( bool *ok=0, int base=10 ) const;
    ulong toULong( bool *ok=0, int base=10 ) const;
    float toFloat( bool *ok=0 ) const;
    double toDouble( bool *ok=0 ) const;

    QString &setNum( short, int base=10 );
    QString &setNum( ushort, int base=10 );
    QString &setNum( int, int base=10 );
    QString &setNum( uint, int base=10 );
    QString &setNum( long, int base=10 );
    QString &setNum( ulong, int base=10 );
    QString &setNum( float, char f='g', int prec=6 );
    QString &setNum( double, char f='g', int prec=6 );

    static QString number( long, int base=10 );
    static QString number( ulong, int base=10);
    static QString number( int, int base=10 );
    static QString number( uint, int base=10);
    static QString number( double, char f='g', int prec=6 );

    void setExpand( uint index, QChar c );

    QString &operator+=( const QString &str );
    QString &operator+=( QChar c );
    QString &operator+=( char c );

    QChar at( uint i ) const
        { return i < d->len ? d->unicode[i] : QChar::null; }
    QChar operator[]( int i ) const { return at((uint)i); }
    QCharRef at( uint i );
    QCharRef operator[]( int i );

    QChar constref(uint i) const
        { return at(i); }
    QChar& ref(uint i)
        {
            if ( d->count != 1 || i >= d->len )
                subat( i );
            d->setDirty();
            return d->unicode[i];
        }

    const QChar* unicode() const { return d->unicode; }
    const char* ascii() const { return latin1(); }
    const char* latin1() const;
    static QString fromLatin1(const char*, int len=-1);

    QCString utf8() const;
    static QString fromUtf8(const char*, int len=-1);

    QCString local8Bit() const;
    static QString fromLocal8Bit(const char*, int len=-1);
    bool operator!() const;




    QString &setUnicode( const QChar* unicode, uint len );
    QString &setUnicodeCodes( const ushort* unicode_as_ushorts, uint len );
    QString &setLatin1( const char*, int len=-1 );

    int compare( const QString& s ) const;
    static int compare( const QString& s1, const QString& s2 )
    { return s1.compare( s2 ); }

    int localeAwareCompare( const QString& s ) const;
    static int localeAwareCompare( const QString& s1, const QString& s2 )
    { return s1.localeAwareCompare( s2 ); }


    friend QDataStream &operator>>( QDataStream &, QString & );


    void compose();





    bool startsWith( const QString& ) const;
    bool endsWith( const QString& ) const;

    void setLength( uint newLength );

    bool simpleText() const { if ( d->dirty ) checkSimpleText(); return (bool)d->simpletext; }
    bool isRightToLeft() const;

private:
# 607 "/opt/qt/3.0.4/include/qstring.h"
    QString& replace( const QString &, const QString & ) { return *this; }

    QString( int size, bool );

    void deref();
    void real_detach();
    void subat( uint );
    bool findArg(int& pos, int& len) const;

    void checkSimpleText() const;

    static QChar* asciiToUnicode( const char*, uint * len, uint maxlen=(uint)-1 );
    static QChar* asciiToUnicode( const QByteArray&, uint * len );
    static char* unicodeToAscii( const QChar*, uint len );

    QStringData *d;
    static QStringData* shared_null;
    static QStringData* makeSharedNull();

    friend class QConstString;
    friend class QTextStream;
    QString( QStringData* dd, bool ) : d(dd) { }
};

class QCharRef {
    friend class QString;
    QString& s;
    uint p;
    QCharRef(QString* str, uint pos) : s(*str), p(pos) { }

public:




    ushort unicode() const { return s.constref(p).unicode(); }
    char latin1() const { return s.constref(p).latin1(); }


    QCharRef operator=(char c ) { s.ref(p)=c; return *this; }
    QCharRef operator=(uchar c ) { s.ref(p)=c; return *this; }
    QCharRef operator=(QChar c ) { s.ref(p)=c; return *this; }
    QCharRef operator=(const QCharRef& c ) { s.ref(p)=c.unicode(); return *this; }
    QCharRef operator=(ushort rc ) { s.ref(p)=rc; return *this; }
    QCharRef operator=(short rc ) { s.ref(p)=rc; return *this; }
    QCharRef operator=(uint rc ) { s.ref(p)=rc; return *this; }
    QCharRef operator=(int rc ) { s.ref(p)=rc; return *this; }

    operator QChar () const { return s.constref(p); }


    bool isNull() const { return unicode()==0; }
    bool isPrint() const { return s.constref(p).isPrint(); }
    bool isPunct() const { return s.constref(p).isPunct(); }
    bool isSpace() const { return s.constref(p).isSpace(); }
    bool isMark() const { return s.constref(p).isMark(); }
    bool isLetter() const { return s.constref(p).isLetter(); }
    bool isNumber() const { return s.constref(p).isNumber(); }
    bool isLetterOrNumber() { return s.constref(p).isLetterOrNumber(); }
    bool isDigit() const { return s.constref(p).isDigit(); }

    int digitValue() const { return s.constref(p).digitValue(); }
    QChar lower() const { return s.constref(p).lower(); }
    QChar upper() const { return s.constref(p).upper(); }

    QChar::Category category() const { return s.constref(p).category(); }
    QChar::Direction direction() const { return s.constref(p).direction(); }
    QChar::Joining joining() const { return s.constref(p).joining(); }
    bool mirrored() const { return s.constref(p).mirrored(); }
    QChar mirroredChar() const { return s.constref(p).mirroredChar(); }
    const QString &decomposition() const { return s.constref(p).decomposition(); }
    QChar::Decomposition decompositionTag() const { return s.constref(p).decompositionTag(); }
    unsigned char combiningClass() const { return s.constref(p).combiningClass(); }


    uchar cell() const { return s.constref(p).cell(); }
    uchar row() const { return s.constref(p).row(); }

};

inline QCharRef QString::at( uint i ) { return QCharRef(this,i); }
inline QCharRef QString::operator[]( int i ) { return at((uint)i); }


class QConstString : private QString {
public:
    QConstString( const QChar* unicode, uint length );
    ~QConstString();
    const QString& string() const { return *this; }
};






 QDataStream &operator<<( QDataStream &, const QString & );
 QDataStream &operator>>( QDataStream &, QString & );
# 716 "/opt/qt/3.0.4/include/qstring.h"
inline QString::QString() :
    d(shared_null ? shared_null : makeSharedNull())
{
    d->ref();
}

inline QString::~QString()
{
    if ( d->deref() ) {
        if ( d == shared_null )
            shared_null = 0;
        d->deleteSelf();
    }
}

inline QString QString::section( QChar sep, int start, int end, int flags ) const
{ return section(QString(sep), start, end, flags); }

inline QString QString::section( char sep, int start, int end, int flags ) const
{ return section(QChar(sep), start, end, flags); }


inline QString QString::section( const char *in_sep, int start, int end, int flags ) const
{ return section(QString(in_sep), start, end, flags); }


inline QString &QString::operator=( QChar c )
{ return *this = QString(c); }

inline QString &QString::operator=( char c )
{ return *this = QString(QChar(c)); }

inline bool QString::isNull() const
{ return unicode() == 0; }

inline bool QString::operator!() const
{ return isNull(); }

inline uint QString::length() const
{ return d->len; }

inline bool QString::isEmpty() const
{ return length() == 0; }

inline QString QString::copy() const
{ return QString( *this ); }

inline QString &QString::prepend( const QString & s )
{ return insert(0,s); }

inline QString &QString::prepend( QChar c )
{ return insert(0,c); }

inline QString &QString::prepend( char c )
{ return insert(0,c); }

inline QString &QString::append( const QString & s )
{ return operator+=(s); }

inline QString &QString::append( QChar c )
{ return operator+=(c); }

inline QString &QString::append( char c )
{ return operator+=(c); }

inline QString &QString::setNum( short n, int base )
{ return setNum((long)n, base); }

inline QString &QString::setNum( ushort n, int base )
{ return setNum((ulong)n, base); }

inline QString &QString::setNum( int n, int base )
{ return setNum((long)n, base); }

inline QString &QString::setNum( uint n, int base )
{ return setNum((ulong)n, base); }

inline QString &QString::setNum( float n, char f, int prec )
{ return setNum((double)n,f,prec); }

inline QString QString::arg(int a, int fieldwidth, int base) const
{ return arg((long)a, fieldwidth, base); }

inline QString QString::arg(uint a, int fieldwidth, int base) const
{ return arg((ulong)a, fieldwidth, base); }

inline QString QString::arg(short a, int fieldwidth, int base) const
{ return arg((long)a, fieldwidth, base); }

inline QString QString::arg(ushort a, int fieldwidth, int base) const
{ return arg((ulong)a, fieldwidth, base); }

inline int QString::find( char c, int index, bool cs ) const
{ return find(QChar(c), index, cs); }

inline int QString::findRev( char c, int index, bool cs) const
{ return findRev( QChar(c), index, cs ); }



inline int QString::find( const char* str, int index ) const
{ return find(QString::fromLatin1(str), index); }

inline int QString::findRev( const char* str, int index ) const
{ return findRev(QString::fromLatin1(str), index); }







 bool operator!=( const QString &s1, const QString &s2 );
 bool operator<( const QString &s1, const QString &s2 );
 bool operator<=( const QString &s1, const QString &s2 );
 bool operator==( const QString &s1, const QString &s2 );
 bool operator>( const QString &s1, const QString &s2 );
 bool operator>=( const QString &s1, const QString &s2 );

 bool operator!=( const QString &s1, const char *s2 );
 bool operator<( const QString &s1, const char *s2 );
 bool operator<=( const QString &s1, const char *s2 );
 bool operator==( const QString &s1, const char *s2 );
 bool operator>( const QString &s1, const char *s2 );
 bool operator>=( const QString &s1, const char *s2 );
 bool operator!=( const char *s1, const QString &s2 );
 bool operator<( const char *s1, const QString &s2 );
 bool operator<=( const char *s1, const QString &s2 );
 bool operator==( const char *s1, const QString &s2 );

 bool operator>=( const char *s1, const QString &s2 );


 inline const QString operator+( const QString &s1, const QString &s2 )
{
    QString tmp( s1 );
    tmp += s2;
    return tmp;
}


 inline const QString operator+( const QString &s1, const char *s2 )
{
    QString tmp( s1 );
    tmp += QString::fromLatin1(s2);
    return tmp;
}

 inline const QString operator+( const char *s1, const QString &s2 )
{
    QString tmp = QString::fromLatin1( s1 );
    tmp += s2;
    return tmp;
}


 inline const QString operator+( const QString &s1, QChar c2 )
{
    QString tmp( s1 );
    tmp += c2;
    return tmp;
}

 inline const QString operator+( const QString &s1, char c2 )
{
    QString tmp( s1 );
    tmp += c2;
    return tmp;
}

 inline const QString operator+( QChar c1, const QString &s2 )
{
    QString tmp;
    tmp += c1;
    tmp += s2;
    return tmp;
}

 inline const QString operator+( char c1, const QString &s2 )
{
    QString tmp;
    tmp += c1;
    tmp += s2;
    return tmp;
}
# 45 "/opt/qt/3.0.4/include/qwindowdefs.h" 2



# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/limits.h" 1 3
# 11 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/limits.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/syslimits.h" 1 3






# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/limits.h" 1 3
# 132 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/limits.h" 3
# 1 "/usr/include/limits.h" 1 3
# 144 "/usr/include/limits.h" 3
# 1 "/usr/include/bits/posix1_lim.h" 1 3
# 126 "/usr/include/bits/posix1_lim.h" 3
# 1 "/usr/include/bits/local_lim.h" 1 3
# 36 "/usr/include/bits/local_lim.h" 3
# 1 "/usr/include/linux/limits.h" 1 3
# 37 "/usr/include/bits/local_lim.h" 2 3
# 127 "/usr/include/bits/posix1_lim.h" 2 3
# 145 "/usr/include/limits.h" 2 3



# 1 "/usr/include/bits/posix2_lim.h" 1 3
# 149 "/usr/include/limits.h" 2 3



# 1 "/usr/include/bits/xopen_lim.h" 1 3
# 34 "/usr/include/bits/xopen_lim.h" 3
# 1 "/usr/include/bits/stdio_lim.h" 1 3
# 35 "/usr/include/bits/xopen_lim.h" 2 3
# 136 "/usr/include/bits/xopen_lim.h" 3
# 1 "/usr/include/bits/wordsize.h" 1 3
# 137 "/usr/include/bits/xopen_lim.h" 2 3
# 153 "/usr/include/limits.h" 2 3
# 133 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/limits.h" 2 3
# 8 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/syslimits.h" 2 3
# 12 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/limits.h" 2 3
# 49 "/opt/qt/3.0.4/include/qwindowdefs.h" 2



class QPaintDevice;
class QPaintDeviceMetrics;
class QWidget;
class QWidgetMapper;
class QDialog;
class QColor;
class QColorGroup;
class QPalette;
class QCursor;
class QPoint;
class QSize;
class QRect;
class QPointArray;
class QPainter;
class QRegion;
class QFont;
class QFontMetrics;
class QFontInfo;
class QPen;
class QBrush;
class QWMatrix;
class QPixmap;
class QBitmap;
class QMovie;
class QImage;
class QImageIO;
class QPicture;
class QPrinter;
class QAccel;
class QTimer;
class QTime;
class QClipboard;




class QWidgetList;
class QWidgetListIt;
# 139 "/opt/qt/3.0.4/include/qwindowdefs.h"
typedef struct _XDisplay Display;
typedef union _XEvent XEvent;
typedef struct _XGC *GC;
typedef struct _XRegion *Region;
typedef unsigned long WId;

 Display *qt_xdisplay();
 int qt_xscreen();
 WId qt_xrootwin();
 GC qt_xget_readonly_gc( int scrn, bool monochrome );
 GC qt_xget_temp_gc( int scrn, bool monochrome );
# 161 "/opt/qt/3.0.4/include/qwindowdefs.h"
class QApplication;







typedef Q_INT32 QCOORD;
const QCOORD QCOORD_MAX = 2147483647;
const QCOORD QCOORD_MIN = -QCOORD_MAX - 1;

typedef unsigned int QRgb;

 const char *qAppName();



typedef void (*QtCleanUpFunction)();
 void qAddPostRoutine( QtCleanUpFunction );
 void qRemovePostRoutine( QtCleanUpFunction );







 void *qt_find_obj_child( QObject *, const char *, const char * );
# 3 "kkeyserver_x11.cpp" 2



# 1 "kkeyserver_x11.h" 1



# 1 "kshortcut.h" 1
# 23 "kshortcut.h"
# 1 "/opt/qt/3.0.4/include/qkeysequence.h" 1
# 50 "/opt/qt/3.0.4/include/qkeysequence.h"
class QKeySequencePrivate;

class QKeySequence : public Qt
{
public:
    QKeySequence();
    QKeySequence( const QString& key );
    QKeySequence( int key );

    operator QString() const;
    operator int () const;

    QKeySequence( const QKeySequence& );
    QKeySequence &operator=( const QKeySequence & );
    ~QKeySequence();
    bool operator==( const QKeySequence& ) const;
    bool operator!= ( const QKeySequence& ) const;

private:
    QKeySequencePrivate* d;

};





 QDataStream &operator<<( QDataStream &, const QKeySequence & );
 QDataStream &operator>>( QDataStream &, QKeySequence & );
# 24 "kshortcut.h" 2


class QKeyEvent;
class KKeyNative;
# 36 "kshortcut.h"
class KKey
{
 public:
        enum { MOD_FLAG_COUNT = 4 };
        enum { QtWIN = (Qt::ALT << 1) };
        enum ModFlag {
                SHIFT = 0x01,
                CTRL = 0x02,
                ALT = 0x04,
                WIN = 0x08
        };

        KKey();
        KKey( int keyQt );
        KKey( const QKeySequence& );
        KKey( const QKeyEvent* );
        KKey( const KKey& );
        KKey( const QString& );



        KKey( uint key, uint mod );
        ~KKey();


        void clear();
        bool init( int keyQt );
        bool init( const QKeySequence& );
        bool init( const QKeyEvent* );
        bool init( const KKey& );
        bool init( const QString& );



        bool init( uint key, uint mod );

        KKey& operator =( const KKey& key )
                { init( key ); return *this; }


        bool isNull() const;
        bool isValidQt() const;
        bool isValidNative() const;




        uint sym() const;



        uint modFlags() const;


        int compare( const KKey& ) const;
        bool operator == ( const KKey& key ) const
                { return compare( key ) == 0; }
        bool operator != ( const KKey& key ) const
                { return compare( key ) != 0; }
        bool operator < ( const KKey& key ) const
                { return compare( key ) < 0; }


        int keyCodeQt() const;
        QString toString() const;
        QString toStringInternal() const;


        void simplify();

        static KKey& null();
        static QString modFlagLabel( ModFlag );

 private:
# 120 "kshortcut.h"
        uint m_sym;



        uint m_mod;

 private:
        friend class KKeyNative;
};







class KKeySequence
{
 public:
        enum { MAX_KEYS = 4 };

        KKeySequence();
        KKeySequence( const QKeySequence& );
        KKeySequence( const KKey& );
        KKeySequence( const KKeyNative& );
        KKeySequence( const KKeySequence& );
        KKeySequence( const QString& );
        ~KKeySequence();

        void clear();
        bool init( const QKeySequence& );
        bool init( const KKey& );
        bool init( const KKeyNative& );
        bool init( const KKeySequence& );
        bool init( const QString& );

        KKeySequence& operator =( const KKeySequence& seq )
                { init( seq ); return *this; }

        uint count() const;
        const KKey& key( uint i ) const;
        bool isTriggerOnRelease() const;

        bool setKey( uint i, const KKey& );
        void setTriggerOnRelease( bool );

        bool isNull() const;
        bool startsWith( const KKeySequence& ) const;
        int compare( const KKeySequence& ) const;
        bool operator == ( const KKeySequence& seq ) const
                { return compare( seq ) == 0; }
        bool operator != ( const KKeySequence& seq ) const
                { return compare( seq ) != 0; }
        bool operator < ( const KKeySequence& seq ) const
                { return compare( seq ) < 0; }

        QKeySequence qt() const;
        int keyCodeQt() const;
        QString toString() const;
        QString toStringInternal() const;

        static KKeySequence& null();

 protected:
        uchar m_nKeys;
        uchar m_bTriggerOnRelease;
        KKey m_rgvar[MAX_KEYS];

 private:
        class KKeySequencePrivate* d;
        friend class KKeyNative;
};
# 201 "kshortcut.h"
class KShortcut
{
 public:
        enum { MAX_SEQUENCES = 2 };

        KShortcut();
        KShortcut( int keyQt );
        KShortcut( const QKeySequence& );
        KShortcut( const KKey& );
        KShortcut( const KKeySequence& );
        KShortcut( const KShortcut& );
        KShortcut( const char* );
        KShortcut( const QString& );
        ~KShortcut();

        void clear();
        bool init( int keyQt );
        bool init( const QKeySequence& );
        bool init( const KKey& );
        bool init( const KKeySequence& );
        bool init( const KShortcut& );
        bool init( const QString& );

        KShortcut& operator =( const KShortcut& cut )
                { init( cut ); return *this; }

        uint count() const;
        const KKeySequence& seq( uint i ) const;
        int keyCodeQt() const;

        bool isNull() const;
        int compare( const KShortcut& ) const;
        bool operator == ( const KShortcut& cut ) const
                { return compare( cut ) == 0; }
        bool operator != ( const KShortcut& cut ) const
                { return compare( cut ) != 0; }
        bool operator < ( const KShortcut& cut ) const
                { return compare( cut ) < 0; }

        bool contains( const KKey& ) const;
        bool contains( const KKeyNative& ) const;
        bool contains( const KKeySequence& ) const;
        bool setSeq( uint i, const KKeySequence& );
        bool append( const KKeySequence& );

        operator QKeySequence () const;
        QString toString() const;
        QString toStringInternal( const KShortcut* pcutDefault = 0 ) const;

        static KShortcut& null();

 protected:
        uint m_nSeqs;
        KKeySequence m_rgseq[MAX_SEQUENCES];

 private:
        class KShortcutPrivate* d;
        friend class KKeyNative;


 public:
        operator int () const { return keyCodeQt(); }

};
# 5 "kkeyserver_x11.h" 2
# 1 "kkeynative.h" 1
# 25 "kkeynative.h"
typedef union _XEvent XEvent;

class KKeyNativePrivate;

class KKeyNative
{
 public:
        KKeyNative();
        KKeyNative( const XEvent* );
        KKeyNative( const KKey& );
        KKeyNative( const KKeyNative& );



        KKeyNative( uint code, uint mod, uint sym );
        ~KKeyNative();

        void clear();
        bool init( const XEvent* );
        bool init( const KKey& );
        bool init( const KKeyNative& );

        KKeyNative& operator =( const KKeyNative& key )
                { init( key ); return *this; }

        int keyCodeQt() const;
        KKey key() const;
        operator KKey() const { return key(); }

        uint code() const;
        uint mod() const;
        uint sym() const;

        bool isNull() const;
        int compare( const KKeyNative& ) const;
        bool operator == ( const KKeyNative& key ) const
                { return compare( key ) == 0; }
        bool operator != ( const KKeyNative& key ) const
                { return compare( key ) != 0; }
        bool operator < ( const KKeyNative& key ) const
                { return compare( key ) < 0; }

        static KKeyNative& null();


        static bool keyboardHasWinKey();
        static uint modX( KKey::ModFlag modFlag );




        static uint accelModMaskX();

 private:
        uint m_code, m_mod, m_sym;
        KKeyNativePrivate* d;
};
# 6 "kkeyserver_x11.h" 2

namespace KKeyServer
{
        struct CodeMod { int code, mod; };

        struct Sym
        {
         public:
                uint m_sym;

                Sym()
                        { m_sym = 0; }
                Sym( uint sym )
                        { m_sym = sym; }
                Sym( const QString& s )
                        { init( s ); }

                bool initQt( int keyQt );
                bool init( const QString& );

                int qt() const;
                QString toStringInternal() const;
                QString toString() const;

                uint getModsRequired() const;
                uint getSymVariation() const;

                operator uint() const { return m_sym; }
                Sym& operator =( uint sym ) { m_sym = sym; return *this; }

         private:
                QString toString( bool bUserSpace ) const;

                static void capitalizeKeyname( QString& );
        };

        struct Key
        {
                enum { CODE_FOR_QT = 256 };

                uint m_code;
                uint m_mod;
                uint m_sym;

                bool init( const KKey& key, bool bQt );

                bool isNative() const { return m_code != CODE_FOR_QT; }

                uint code() const { return m_code; }
                uint mod() const { return m_mod; }
                uint sym() const { return m_sym; }
                int keyCodeQt() const { return (int) m_sym; }

                void setKeycodeQt( int keyQt )
                        { m_code = CODE_FOR_QT; m_sym = keyQt; }

                Key& operator =( const KKeyNative& key );
                int compare( const Key& ) const;

                bool operator ==( const Key& b ) const
                        { return compare( b ) == 0; }
                bool operator <( const Key& b ) const
                        { return compare( b ) < 0; }

                KKey key() const;
        };

        struct Variations
        {
                enum { MAX_VARIATIONS = 4 };

                Key m_rgkey[MAX_VARIATIONS];
                uint m_nVariations;

                Variations() { m_nVariations = 0; }

                void init( const KKey&, bool bQt );

                uint count() const { return m_nVariations; }
                const Key& key( uint i ) const { return m_rgkey[i]; }
        };

        bool initializeMods();




        uint modX( KKey::ModFlag );




        bool keyboardHasWinKey();
        uint modXShift();
        uint modXLock();
        uint modXCtrl();
        uint modXAlt();
        uint modXNumLock();
        uint modXWin();
        uint modXScrollLock();




        uint accelModMaskX();

        bool keyQtToSym( int keyQt, uint& sym );
        bool keyQtToMod( int keyQt, uint& mod );
        bool symToKeyQt( uint sym, int& keyQt );

        bool modToModQt( uint mod, int& modQt );
        bool modToModX( uint mod, uint& modX );
        bool modXToModQt( uint modX, int& modQt );
        bool modXToMod( uint modX, uint& mod );

        bool codeXToSym( uchar codeX, uint modX, uint& symX );

        QString modToStringInternal( uint mod );
        QString modToStringUser( uint mod );

        bool stringToSymMod( const QString&, uint& sym, uint& mod );

        void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
};
# 7 "kkeyserver_x11.cpp" 2



# 1 "kconfig.h" 1
# 27 "kconfig.h"
class QTimer;

# 1 "kconfigbase.h" 1
# 28 "kconfigbase.h"
# 1 "/opt/qt/3.0.4/include/qobject.h" 1
# 45 "/opt/qt/3.0.4/include/qobject.h"
# 1 "/opt/qt/3.0.4/include/qevent.h" 1
# 43 "/opt/qt/3.0.4/include/qevent.h"
# 1 "/opt/qt/3.0.4/include/qregion.h" 1
# 43 "/opt/qt/3.0.4/include/qregion.h"
# 1 "/opt/qt/3.0.4/include/qrect.h" 1
# 42 "/opt/qt/3.0.4/include/qrect.h"
# 1 "/opt/qt/3.0.4/include/qsize.h" 1
# 42 "/opt/qt/3.0.4/include/qsize.h"
# 1 "/opt/qt/3.0.4/include/qpoint.h" 1
# 46 "/opt/qt/3.0.4/include/qpoint.h"
class QPoint
{
public:
    QPoint();
    QPoint( int xpos, int ypos );

    bool isNull() const;

    int x() const;
    int y() const;
    void setX( int x );
    void setY( int y );

    int manhattanLength() const;

    QCOORD &rx();
    QCOORD &ry();

    QPoint &operator+=( const QPoint &p );
    QPoint &operator-=( const QPoint &p );
    QPoint &operator*=( int c );
    QPoint &operator*=( double c );
    QPoint &operator/=( int c );
    QPoint &operator/=( double c );

    friend inline bool operator==( const QPoint &, const QPoint & );
    friend inline bool operator!=( const QPoint &, const QPoint & );
    friend inline const QPoint operator+( const QPoint &, const QPoint & );
    friend inline const QPoint operator-( const QPoint &, const QPoint & );
    friend inline const QPoint operator*( const QPoint &, int );
    friend inline const QPoint operator*( int, const QPoint & );
    friend inline const QPoint operator*( const QPoint &, double );
    friend inline const QPoint operator*( double, const QPoint & );
    friend inline const QPoint operator-( const QPoint & );
    friend inline const QPoint operator/( const QPoint &, int );
    friend inline const QPoint operator/( const QPoint &, double );

private:
    static void warningDivByZero();





    QCOORD xp;
    QCOORD yp;

};






 QDataStream &operator<<( QDataStream &, const QPoint & );
 QDataStream &operator>>( QDataStream &, QPoint & );






inline QPoint::QPoint()
{ xp=0; yp=0; }

inline QPoint::QPoint( int xpos, int ypos )
{ xp=(QCOORD)xpos; yp=(QCOORD)ypos; }

inline bool QPoint::isNull() const
{ return xp == 0 && yp == 0; }

inline int QPoint::x() const
{ return xp; }

inline int QPoint::y() const
{ return yp; }

inline void QPoint::setX( int x )
{ xp = (QCOORD)x; }

inline void QPoint::setY( int y )
{ yp = (QCOORD)y; }

inline QCOORD &QPoint::rx()
{ return xp; }

inline QCOORD &QPoint::ry()
{ return yp; }

inline QPoint &QPoint::operator+=( const QPoint &p )
{ xp+=p.xp; yp+=p.yp; return *this; }

inline QPoint &QPoint::operator-=( const QPoint &p )
{ xp-=p.xp; yp-=p.yp; return *this; }

inline QPoint &QPoint::operator*=( int c )
{ xp*=(QCOORD)c; yp*=(QCOORD)c; return *this; }

inline QPoint &QPoint::operator*=( double c )
{ xp=(QCOORD)(xp*c); yp=(QCOORD)(yp*c); return *this; }

inline bool operator==( const QPoint &p1, const QPoint &p2 )
{ return p1.xp == p2.xp && p1.yp == p2.yp; }

inline bool operator!=( const QPoint &p1, const QPoint &p2 )
{ return p1.xp != p2.xp || p1.yp != p2.yp; }

inline const QPoint operator+( const QPoint &p1, const QPoint &p2 )
{ return QPoint(p1.xp+p2.xp, p1.yp+p2.yp); }

inline const QPoint operator-( const QPoint &p1, const QPoint &p2 )
{ return QPoint(p1.xp-p2.xp, p1.yp-p2.yp); }

inline const QPoint operator*( const QPoint &p, int c )
{ return QPoint(p.xp*c, p.yp*c); }

inline const QPoint operator*( int c, const QPoint &p )
{ return QPoint(p.xp*c, p.yp*c); }

inline const QPoint operator*( const QPoint &p, double c )
{ return QPoint((QCOORD)(p.xp*c), (QCOORD)(p.yp*c)); }

inline const QPoint operator*( double c, const QPoint &p )
{ return QPoint((QCOORD)(p.xp*c), (QCOORD)(p.yp*c)); }

inline const QPoint operator-( const QPoint &p )
{ return QPoint(-p.xp, -p.yp); }

inline QPoint &QPoint::operator/=( int c )
{

    if ( c == 0 )
        warningDivByZero();

    xp/=(QCOORD)c;
    yp/=(QCOORD)c;
    return *this;
}

inline QPoint &QPoint::operator/=( double c )
{

    if ( c == 0.0 )
        warningDivByZero();

    xp=(QCOORD)(xp/c);
    yp=(QCOORD)(yp/c);
    return *this;
}

inline const QPoint operator/( const QPoint &p, int c )
{

    if ( c == 0 )
        QPoint::warningDivByZero();

    return QPoint(p.xp/c, p.yp/c);
}

inline const QPoint operator/( const QPoint &p, double c )
{

    if ( c == 0.0 )
        QPoint::warningDivByZero();

    return QPoint((QCOORD)(p.xp/c), (QCOORD)(p.yp/c));
}
# 43 "/opt/qt/3.0.4/include/qsize.h" 2



class QSize
{
public:
    QSize();
    QSize( int w, int h );

    bool isNull() const;
    bool isEmpty() const;
    bool isValid() const;

    int width() const;
    int height() const;
    void setWidth( int w );
    void setHeight( int h );
    void transpose();

    QSize expandedTo( const QSize & ) const;
    QSize boundedTo( const QSize & ) const;

    QCOORD &rwidth();
    QCOORD &rheight();

    QSize &operator+=( const QSize & );
    QSize &operator-=( const QSize & );
    QSize &operator*=( int c );
    QSize &operator*=( double c );
    QSize &operator/=( int c );
    QSize &operator/=( double c );

    friend inline bool operator==( const QSize &, const QSize & );
    friend inline bool operator!=( const QSize &, const QSize & );
    friend inline const QSize operator+( const QSize &, const QSize & );
    friend inline const QSize operator-( const QSize &, const QSize & );
    friend inline const QSize operator*( const QSize &, int );
    friend inline const QSize operator*( int, const QSize & );
    friend inline const QSize operator*( const QSize &, double );
    friend inline const QSize operator*( double, const QSize & );
    friend inline const QSize operator/( const QSize &, int );
    friend inline const QSize operator/( const QSize &, double );

private:
    static void warningDivByZero();

    QCOORD wd;
    QCOORD ht;
};






 QDataStream &operator<<( QDataStream &, const QSize & );
 QDataStream &operator>>( QDataStream &, QSize & );






inline QSize::QSize()
{ wd = ht = -1; }

inline QSize::QSize( int w, int h )
{ wd=(QCOORD)w; ht=(QCOORD)h; }

inline bool QSize::isNull() const
{ return wd==0 && ht==0; }

inline bool QSize::isEmpty() const
{ return wd<1 || ht<1; }

inline bool QSize::isValid() const
{ return wd>=0 && ht>=0; }

inline int QSize::width() const
{ return wd; }

inline int QSize::height() const
{ return ht; }

inline void QSize::setWidth( int w )
{ wd=(QCOORD)w; }

inline void QSize::setHeight( int h )
{ ht=(QCOORD)h; }

inline QCOORD &QSize::rwidth()
{ return wd; }

inline QCOORD &QSize::rheight()
{ return ht; }

inline QSize &QSize::operator+=( const QSize &s )
{ wd+=s.wd; ht+=s.ht; return *this; }

inline QSize &QSize::operator-=( const QSize &s )
{ wd-=s.wd; ht-=s.ht; return *this; }

inline QSize &QSize::operator*=( int c )
{ wd*=(QCOORD)c; ht*=(QCOORD)c; return *this; }

inline QSize &QSize::operator*=( double c )
{ wd=(QCOORD)(wd*c); ht=(QCOORD)(ht*c); return *this; }

inline bool operator==( const QSize &s1, const QSize &s2 )
{ return s1.wd == s2.wd && s1.ht == s2.ht; }

inline bool operator!=( const QSize &s1, const QSize &s2 )
{ return s1.wd != s2.wd || s1.ht != s2.ht; }

inline const QSize operator+( const QSize & s1, const QSize & s2 )
{ return QSize(s1.wd+s2.wd, s1.ht+s2.ht); }

inline const QSize operator-( const QSize &s1, const QSize &s2 )
{ return QSize(s1.wd-s2.wd, s1.ht-s2.ht); }

inline const QSize operator*( const QSize &s, int c )
{ return QSize(s.wd*c, s.ht*c); }

inline const QSize operator*( int c, const QSize &s )
{ return QSize(s.wd*c, s.ht*c); }

inline const QSize operator*( const QSize &s, double c )
{ return QSize((QCOORD)(s.wd*c), (QCOORD)(s.ht*c)); }

inline const QSize operator*( double c, const QSize &s )
{ return QSize((QCOORD)(s.wd*c), (QCOORD)(s.ht*c)); }

inline QSize &QSize::operator/=( int c )
{

    if ( c == 0 )
        warningDivByZero();

    wd/=(QCOORD)c; ht/=(QCOORD)c;
    return *this;
}

inline QSize &QSize::operator/=( double c )
{

    if ( c == 0.0 )
        warningDivByZero();

    wd=(QCOORD)(wd/c); ht=(QCOORD)(ht/c);
    return *this;
}

inline const QSize operator/( const QSize &s, int c )
{

    if ( c == 0 )
        QSize::warningDivByZero();

    return QSize(s.wd/c, s.ht/c);
}

inline const QSize operator/( const QSize &s, double c )
{

    if ( c == 0.0 )
        QSize::warningDivByZero();

    return QSize((QCOORD)(s.wd/c), (QCOORD)(s.ht/c));
}

inline QSize QSize::expandedTo( const QSize & otherSize ) const
{
    return QSize( ((otherSize.wd) < (wd) ? (wd) : (otherSize.wd)), ((otherSize.ht) < (ht) ? (ht) : (otherSize.ht)) );
}

inline QSize QSize::boundedTo( const QSize & otherSize ) const
{
    return QSize( ((wd) < (otherSize.wd) ? (wd) : (otherSize.wd)), ((ht) < (otherSize.ht) ? (ht) : (otherSize.ht)) );
}
# 43 "/opt/qt/3.0.4/include/qrect.h" 2







class QRect
{
public:
    QRect() { x1 = y1 = 0; x2 = y2 = -1; }
    QRect( const QPoint &topleft, const QPoint &bottomright );
    QRect( const QPoint &topleft, const QSize &size );
    QRect( int left, int top, int width, int height );

    bool isNull() const;
    bool isEmpty() const;
    bool isValid() const;
    QRect normalize() const;

    int left() const;
    int top() const;
    int right() const;
    int bottom() const;

    QCOORD &rLeft();
    QCOORD &rTop();
    QCOORD &rRight();
    QCOORD &rBottom();

    int x() const;
    int y() const;
    void setLeft( int pos );
    void setTop( int pos );
    void setRight( int pos );
    void setBottom( int pos );
    void setX( int x );
    void setY( int y );

    QPoint topLeft() const;
    QPoint bottomRight() const;
    QPoint topRight() const;
    QPoint bottomLeft() const;
    QPoint center() const;

    void rect( int *x, int *y, int *w, int *h ) const;
    void coords( int *x1, int *y1, int *x2, int *y2 ) const;

    void moveTopLeft( const QPoint &p );
    void moveBottomRight( const QPoint &p );
    void moveTopRight( const QPoint &p );
    void moveBottomLeft( const QPoint &p );
    void moveCenter( const QPoint &p );
    void moveBy( int dx, int dy );

    void setRect( int x, int y, int w, int h );
    void setCoords( int x1, int y1, int x2, int y2 );
    void addCoords( int x1, int y1, int x2, int y2 );

    QSize size() const;
    int width() const;
    int height() const;
    void setWidth( int w );
    void setHeight( int h );
    void setSize( const QSize &s );

    QRect operator|(const QRect &r) const;
    QRect operator&(const QRect &r) const;
    QRect& operator|=(const QRect &r);
    QRect& operator&=(const QRect &r);

    bool contains( const QPoint &p, bool proper=FALSE ) const;
    bool contains( int x, int y, bool proper=FALSE ) const;
    bool contains( const QRect &r, bool proper=FALSE ) const;
    QRect unite( const QRect &r ) const;
    QRect intersect( const QRect &r ) const;
    bool intersects( const QRect &r ) const;

    friend bool operator==( const QRect &, const QRect & );
    friend bool operator!=( const QRect &, const QRect & );

private:






    QCOORD x1;
    QCOORD y1;
    QCOORD x2;
    QCOORD y2;

};

 bool operator==( const QRect &, const QRect & );
 bool operator!=( const QRect &, const QRect & );






 QDataStream &operator<<( QDataStream &, const QRect & );
 QDataStream &operator>>( QDataStream &, QRect & );






inline QRect::QRect( int left, int top, int width, int height )
{
    x1 = (QCOORD)left;
    y1 = (QCOORD)top;
    x2 = (QCOORD)(left+width-1);
    y2 = (QCOORD)(top+height-1);
}

inline bool QRect::isNull() const
{ return x2 == x1-1 && y2 == y1-1; }

inline bool QRect::isEmpty() const
{ return x1 > x2 || y1 > y2; }

inline bool QRect::isValid() const
{ return x1 <= x2 && y1 <= y2; }

inline int QRect::left() const
{ return x1; }

inline int QRect::top() const
{ return y1; }

inline int QRect::right() const
{ return x2; }

inline int QRect::bottom() const
{ return y2; }

inline QCOORD &QRect::rLeft()
{ return x1; }

inline QCOORD & QRect::rTop()
{ return y1; }

inline QCOORD & QRect::rRight()
{ return x2; }

inline QCOORD & QRect::rBottom()
{ return y2; }

inline int QRect::x() const
{ return x1; }

inline int QRect::y() const
{ return y1; }

inline void QRect::setLeft( int pos )
{ x1 = (QCOORD)pos; }

inline void QRect::setTop( int pos )
{ y1 = (QCOORD)pos; }

inline void QRect::setRight( int pos )
{ x2 = (QCOORD)pos; }

inline void QRect::setBottom( int pos )
{ y2 = (QCOORD)pos; }

inline void QRect::setX( int x )
{ x1 = (QCOORD)x; }

inline void QRect::setY( int y )
{ y1 = (QCOORD)y; }

inline QPoint QRect::topLeft() const
{ return QPoint(x1, y1); }

inline QPoint QRect::bottomRight() const
{ return QPoint(x2, y2); }

inline QPoint QRect::topRight() const
{ return QPoint(x2, y1); }

inline QPoint QRect::bottomLeft() const
{ return QPoint(x1, y2); }

inline QPoint QRect::center() const
{ return QPoint((x1+x2)/2, (y1+y2)/2); }

inline int QRect::width() const
{ return x2 - x1 + 1; }

inline int QRect::height() const
{ return y2 - y1 + 1; }

inline QSize QRect::size() const
{ return QSize(x2-x1+1, y2-y1+1); }

inline bool QRect::contains( int x, int y, bool proper ) const
{
    if ( proper )
        return x > x1 && x < x2 &&
               y > y1 && y < y2;
    else
        return x >= x1 && x <= x2 &&
               y >= y1 && y <= y2;
}
# 44 "/opt/qt/3.0.4/include/qregion.h" 2



class QRegion
{
public:
    enum RegionType { Rectangle, Ellipse };

    QRegion();
    QRegion( int x, int y, int w, int h, RegionType = Rectangle );
    QRegion( const QRect &, RegionType = Rectangle );
    QRegion( const QPointArray &, bool winding=FALSE );
    QRegion( const QRegion & );
    QRegion( const QBitmap & );
   ~QRegion();
    QRegion &operator=( const QRegion & );

    bool isNull() const;
    bool isEmpty() const;

    bool contains( const QPoint &p ) const;
    bool contains( const QRect &r ) const;

    void translate( int dx, int dy );

    QRegion unite( const QRegion & ) const;
    QRegion intersect( const QRegion &) const;
    QRegion subtract( const QRegion & ) const;
    QRegion eor( const QRegion & ) const;

    QRect boundingRect() const;
    QMemArray<QRect> rects() const;
    void setRects( const QRect *, int );

    const QRegion operator|( const QRegion & ) const;
    const QRegion operator+( const QRegion & ) const;
    const QRegion operator&( const QRegion & ) const;
    const QRegion operator-( const QRegion & ) const;
    const QRegion operator^( const QRegion & ) const;
    QRegion& operator|=( const QRegion & );
    QRegion& operator+=( const QRegion & );
    QRegion& operator&=( const QRegion & );
    QRegion& operator-=( const QRegion & );
    QRegion& operator^=( const QRegion & );

    bool operator==( const QRegion & ) const;
    bool operator!=( const QRegion &r ) const
                        { return !(operator==(r)); }




    Region handle() const { return data->rgn; }
# 105 "/opt/qt/3.0.4/include/qregion.h"
    friend QDataStream &operator<<( QDataStream &, const QRegion & );
    friend QDataStream &operator>>( QDataStream &, QRegion & );

private:
    QRegion( bool );
    QRegion copy() const;
    void detach();



    void exec( const QByteArray &, int ver = 0 );
    struct QRegionData : public QShared {



        QRect rect;
        Region rgn;







        bool is_null;
    } *data;







};
# 158 "/opt/qt/3.0.4/include/qregion.h"
 QDataStream &operator<<( QDataStream &, const QRegion & );
 QDataStream &operator>>( QDataStream &, QRegion & );
# 44 "/opt/qt/3.0.4/include/qevent.h" 2

# 1 "/opt/qt/3.0.4/include/qmime.h" 1
# 43 "/opt/qt/3.0.4/include/qmime.h"
# 1 "/opt/qt/3.0.4/include/qmap.h" 1
# 44 "/opt/qt/3.0.4/include/qmap.h"
# 1 "/opt/qt/3.0.4/include/qdatastream.h" 1
# 42 "/opt/qt/3.0.4/include/qdatastream.h"
# 1 "/opt/qt/3.0.4/include/qiodevice.h" 1
# 95 "/opt/qt/3.0.4/include/qiodevice.h"
class QIODevice
{
public:



    typedef Q_ULONG Offset;


    QIODevice();
    virtual ~QIODevice();

    int flags() const { return ioMode; }
    int mode() const { return ioMode & 0x00ff; }
    int state() const { return ioMode & 0xf000; }

    bool isDirectAccess() const { return ((ioMode & 0x0100) == 0x0100); }
    bool isSequentialAccess() const { return ((ioMode & 0x0200) == 0x0200); }
    bool isCombinedAccess() const { return ((ioMode & 0x0300) == 0x0300); }
    bool isBuffered() const { return ((ioMode & 0x0040) != 0x0040); }
    bool isRaw() const { return ((ioMode & 0x0040) == 0x0040); }
    bool isSynchronous() const { return ((ioMode & 0x0080) != 0x0080); }
    bool isAsynchronous() const { return ((ioMode & 0x0080) == 0x0080); }
    bool isTranslated() const { return ((ioMode & 0x0010) == 0x0010); }
    bool isReadable() const { return ((ioMode & 0x0001) == 0x0001); }
    bool isWritable() const { return ((ioMode & 0x0002) == 0x0002); }
    bool isReadWrite() const { return ((ioMode & 0x0003) == 0x0003); }
    bool isInactive() const { return state() == 0; }
    bool isOpen() const { return state() == 0x1000; }

    int status() const { return ioSt; }
    void resetStatus() { ioSt = 0; }

    virtual bool open( int mode ) = 0;
    virtual void close() = 0;
    virtual void flush() = 0;

    virtual Offset size() const = 0;
    virtual Offset at() const;
    virtual bool at( Offset );
    virtual bool atEnd() const;
    bool reset() { return at(0); }

    virtual Q_LONG readBlock( char *data, Q_ULONG maxlen ) = 0;
    virtual Q_LONG writeBlock( const char *data, Q_ULONG len ) = 0;
    virtual Q_LONG readLine( char *data, Q_ULONG maxlen );
    Q_LONG writeBlock( const QByteArray& data );
    virtual QByteArray readAll();

    virtual int getch() = 0;
    virtual int putch( int ) = 0;
    virtual int ungetch( int ) = 0;

protected:
    void setFlags( int f ) { ioMode = f; }
    void setType( int );
    void setMode( int );
    void setState( int );
    void setStatus( int );
    Offset ioIndex;

private:
    int ioMode;
    int ioSt;

private:

    QIODevice( const QIODevice & );
    QIODevice &operator=( const QIODevice & );

};
# 43 "/opt/qt/3.0.4/include/qdatastream.h" 2




class QDataStream
{
public:
    QDataStream();
    QDataStream( QIODevice * );
    QDataStream( QByteArray, int mode );
    virtual ~QDataStream();

    QIODevice *device() const;
    void setDevice( QIODevice * );
    void unsetDevice();

    bool atEnd() const;
    bool eof() const;

    enum ByteOrder { BigEndian, LittleEndian };
    int byteOrder() const;
    void setByteOrder( int );

    bool isPrintableData() const;
    void setPrintableData( bool );

    int version() const;
    void setVersion( int );

    QDataStream &operator>>( Q_INT8 &i );
    QDataStream &operator>>( Q_UINT8 &i );
    QDataStream &operator>>( Q_INT16 &i );
    QDataStream &operator>>( Q_UINT16 &i );
    QDataStream &operator>>( Q_INT32 &i );
    QDataStream &operator>>( Q_UINT32 &i );
    QDataStream &operator>>( Q_LONG &i );
    QDataStream &operator>>( Q_ULONG &i );

    QDataStream &operator>>( float &f );
    QDataStream &operator>>( double &f );
    QDataStream &operator>>( char *&str );

    QDataStream &operator<<( Q_INT8 i );
    QDataStream &operator<<( Q_UINT8 i );
    QDataStream &operator<<( Q_INT16 i );
    QDataStream &operator<<( Q_UINT16 i );
    QDataStream &operator<<( Q_INT32 i );
    QDataStream &operator<<( Q_UINT32 i );
    QDataStream &operator<<( Q_LONG i );
    QDataStream &operator<<( Q_ULONG i );
    QDataStream &operator<<( float f );
    QDataStream &operator<<( double f );
    QDataStream &operator<<( const char *str );

    QDataStream &readBytes( char *&, uint &len );
    QDataStream &readRawBytes( char *, uint len );

    QDataStream &writeBytes( const char *, uint len );
    QDataStream &writeRawBytes( const char *, uint len );

private:
    QIODevice *dev;
    bool owndev;
    int byteorder;
    bool printable;
    bool noswap;
    int ver;

private:

    QDataStream( const QDataStream & );
    QDataStream &operator=( const QDataStream & );

};






inline QIODevice *QDataStream::device() const
{ return dev; }

inline bool QDataStream::atEnd() const
{ return dev ? dev->atEnd() : TRUE; }

inline bool QDataStream::eof() const
{ return atEnd(); }

inline int QDataStream::byteOrder() const
{ return byteorder; }

inline bool QDataStream::isPrintableData() const
{ return printable; }

inline void QDataStream::setPrintableData( bool p )
{ printable = p; }

inline int QDataStream::version() const
{ return ver; }

inline void QDataStream::setVersion( int v )
{ ver = v; }

inline QDataStream &QDataStream::operator>>( Q_UINT8 &i )
{ return *this >> (Q_INT8&)i; }

inline QDataStream &QDataStream::operator>>( Q_UINT16 &i )
{ return *this >> (Q_INT16&)i; }

inline QDataStream &QDataStream::operator>>( Q_UINT32 &i )
{ return *this >> (Q_INT32&)i; }

inline QDataStream &QDataStream::operator>>( Q_ULONG &i )
{ return *this >> (Q_LONG&)i; }

inline QDataStream &QDataStream::operator<<( Q_UINT8 i )
{ return *this << (Q_INT8)i; }

inline QDataStream &QDataStream::operator<<( Q_UINT16 i )
{ return *this << (Q_INT16)i; }

inline QDataStream &QDataStream::operator<<( Q_UINT32 i )
{ return *this << (Q_INT32)i; }

inline QDataStream &QDataStream::operator<<( Q_ULONG i )
{ return *this << (Q_LONG)i; }
# 45 "/opt/qt/3.0.4/include/qmap.h" 2
# 1 "/opt/qt/3.0.4/include/qpair.h" 1
# 43 "/opt/qt/3.0.4/include/qpair.h"
template <class T1, class T2>
struct QPair
{
    typedef T1 first_type;
    typedef T2 second_type;

    QPair()
        : first( T1() ), second( T2() )
    {}
    QPair( const T1& t1, const T2& t2 )
        : first( t1 ), second( t2 )
    {}

    T1 first;
    T2 second;
};

template <class T1, class T2>
 bool operator==( const QPair<T1, T2>& x, const QPair<T1, T2>& y )
{
    return x.first == y.first && x.second == y.second;
}

template <class T1, class T2>
 bool operator<( const QPair<T1, T2>& x, const QPair<T1, T2>& y )
{



    return x.first < y.first || ( !( y.first < x.first ) && x.second < y.second );
}

template <class T1, class T2>
 QPair<T1, T2> qMakePair( const T1& x, const T2& y )
{
    return QPair<T1, T2>( x, y );
}
# 46 "/opt/qt/3.0.4/include/qmap.h" 2
# 1 "/opt/qt/3.0.4/include/qtl.h" 1
# 43 "/opt/qt/3.0.4/include/qtl.h"
# 1 "/opt/qt/3.0.4/include/qtextstream.h" 1
# 44 "/opt/qt/3.0.4/include/qtextstream.h"
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 1 3
# 39 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
extern "C" {



# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3
# 44 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 2 3

# 1 "/usr/include/bits/types.h" 1 3
# 29 "/usr/include/bits/types.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3
# 30 "/usr/include/bits/types.h" 2 3


typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;

__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;
# 49 "/usr/include/bits/types.h" 3
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;

__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;

typedef __quad_t *__qaddr_t;

typedef __u_quad_t __dev_t;
typedef __u_int __uid_t;
typedef __u_int __gid_t;
typedef __u_long __ino_t;
typedef __u_int __mode_t;
typedef __u_int __nlink_t;
typedef long int __off_t;
typedef __quad_t __loff_t;
typedef int __pid_t;
typedef int __ssize_t;
typedef __u_long __rlim_t;
typedef __u_quad_t __rlim64_t;
typedef __u_int __id_t;

typedef struct
  {
    int __val[2];
  } __fsid_t;


typedef int __daddr_t;
typedef char *__caddr_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
typedef long int __suseconds_t;
typedef long int __swblk_t;

typedef long int __clock_t;


typedef int __clockid_t;


typedef int __timer_t;






typedef int __key_t;


typedef unsigned short int __ipc_pid_t;



typedef long int __blksize_t;




typedef long int __blkcnt_t;
typedef __quad_t __blkcnt64_t;


typedef __u_long __fsblkcnt_t;
typedef __u_quad_t __fsblkcnt64_t;


typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;


typedef __u_quad_t __ino64_t;


typedef __loff_t __off64_t;


typedef long int __t_scalar_t;
typedef unsigned long int __t_uscalar_t;


typedef int __intptr_t;


typedef unsigned int __socklen_t;




# 1 "/usr/include/bits/pthreadtypes.h" 1 3
# 23 "/usr/include/bits/pthreadtypes.h" 3
# 1 "/usr/include/bits/sched.h" 1 3
# 68 "/usr/include/bits/sched.h" 3
struct __sched_param
  {
    int __sched_priority;
  };
# 24 "/usr/include/bits/pthreadtypes.h" 2 3

typedef int __atomic_lock_t;


struct _pthread_fastlock
{
  long int __status;
  __atomic_lock_t __spinlock;

};



typedef struct _pthread_descr_struct *_pthread_descr;





typedef struct __pthread_attr_s
{
  int __detachstate;
  int __schedpolicy;
  struct __sched_param __schedparam;
  int __inheritsched;
  int __scope;
  size_t __guardsize;
  int __stackaddr_set;
  void *__stackaddr;
  size_t __stacksize;
} pthread_attr_t;



typedef struct
{
  struct _pthread_fastlock __c_lock;
  _pthread_descr __c_waiting;
} pthread_cond_t;



typedef struct
{
  int __dummy;
} pthread_condattr_t;


typedef unsigned int pthread_key_t;





typedef struct
{
  int __m_reserved;
  int __m_count;
  _pthread_descr __m_owner;
  int __m_kind;
  struct _pthread_fastlock __m_lock;
} pthread_mutex_t;



typedef struct
{
  int __mutexkind;
} pthread_mutexattr_t;



typedef int pthread_once_t;




typedef struct _pthread_rwlock_t
{
  struct _pthread_fastlock __rw_lock;
  int __rw_readers;
  _pthread_descr __rw_writer;
  _pthread_descr __rw_read_waiting;
  _pthread_descr __rw_write_waiting;
  int __rw_kind;
  int __rw_pshared;
} pthread_rwlock_t;



typedef struct
{
  int __lockkind;
  int __pshared;
} pthread_rwlockattr_t;




typedef volatile int pthread_spinlock_t;


typedef struct {
  struct _pthread_fastlock __ba_lock;
  int __ba_required;
  int __ba_present;
  _pthread_descr __ba_waiting;
} pthread_barrier_t;


typedef struct {
  int __pshared;
} pthread_barrierattr_t;





typedef unsigned long int pthread_t;
# 144 "/usr/include/bits/types.h" 2 3
# 46 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 2 3
# 54 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
typedef struct _IO_FILE FILE;
# 64 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
typedef struct _IO_FILE __FILE;
# 74 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
# 1 "/usr/include/libio.h" 1 3
# 32 "/usr/include/libio.h" 3
# 1 "/usr/include/_G_config.h" 1 3
# 14 "/usr/include/_G_config.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3
# 321 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 3
typedef unsigned int wint_t;
# 15 "/usr/include/_G_config.h" 2 3
# 24 "/usr/include/_G_config.h" 3
# 1 "/usr/include/wchar.h" 1 3
# 48 "/usr/include/wchar.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3
# 49 "/usr/include/wchar.h" 2 3

# 1 "/usr/include/bits/wchar.h" 1 3
# 51 "/usr/include/wchar.h" 2 3
# 67 "/usr/include/wchar.h" 3
typedef struct
{
  int __count;
  union
  {
    wint_t __wch;
    char __wchb[4];
  } __value;
} __mbstate_t;
# 25 "/usr/include/_G_config.h" 2 3

typedef struct
{
  __off_t __pos;
  __mbstate_t __state;
} _G_fpos_t;
typedef struct
{
  __off64_t __pos;
  __mbstate_t __state;
} _G_fpos64_t;
# 44 "/usr/include/_G_config.h" 3
# 1 "/usr/include/gconv.h" 1 3
# 28 "/usr/include/gconv.h" 3
# 1 "/usr/include/wchar.h" 1 3
# 48 "/usr/include/wchar.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3
# 49 "/usr/include/wchar.h" 2 3
# 29 "/usr/include/gconv.h" 2 3


# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3
# 32 "/usr/include/gconv.h" 2 3





enum
{
  __GCONV_OK = 0,
  __GCONV_NOCONV,
  __GCONV_NODB,
  __GCONV_NOMEM,

  __GCONV_EMPTY_INPUT,
  __GCONV_FULL_OUTPUT,
  __GCONV_ILLEGAL_INPUT,
  __GCONV_INCOMPLETE_INPUT,

  __GCONV_ILLEGAL_DESCRIPTOR,
  __GCONV_INTERNAL_ERROR
};



enum
{
  __GCONV_IS_LAST = 0x0001,
  __GCONV_IGNORE_ERRORS = 0x0002
};



struct __gconv_step;
struct __gconv_step_data;
struct __gconv_loaded_object;
struct __gconv_trans_data;



typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
                            __const unsigned char **, __const unsigned char *,
                            unsigned char **, size_t *, int, int);


typedef int (*__gconv_init_fct) (struct __gconv_step *);
typedef void (*__gconv_end_fct) (struct __gconv_step *);



typedef int (*__gconv_trans_fct) (struct __gconv_step *,
                                  struct __gconv_step_data *, void *,
                                  __const unsigned char *,
                                  __const unsigned char **,
                                  __const unsigned char *, unsigned char **,
                                  size_t *);


typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
                                          __const unsigned char *,
                                          unsigned char *, unsigned char *);


typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
                                        size_t *);


typedef int (*__gconv_trans_init_fct) (void **, const char *);
typedef void (*__gconv_trans_end_fct) (void *);

struct __gconv_trans_data
{

  __gconv_trans_fct __trans_fct;
  __gconv_trans_context_fct __trans_context_fct;
  __gconv_trans_end_fct __trans_end_fct;
  void *__data;
  struct __gconv_trans_data *__next;
};



struct __gconv_step
{
  struct __gconv_loaded_object *__shlib_handle;
  __const char *__modname;

  int __counter;

  char *__from_name;
  char *__to_name;

  __gconv_fct __fct;
  __gconv_init_fct __init_fct;
  __gconv_end_fct __end_fct;



  int __min_needed_from;
  int __max_needed_from;
  int __min_needed_to;
  int __max_needed_to;


  int __stateful;

  void *__data;
};



struct __gconv_step_data
{
  unsigned char *__outbuf;
  unsigned char *__outbufend;



  int __flags;



  int __invocation_counter;



  int __internal_use;

  __mbstate_t *__statep;
  __mbstate_t __state;



  struct __gconv_trans_data *__trans;
};



typedef struct __gconv_info
{
  size_t __nsteps;
  struct __gconv_step *__steps;
  __extension__ struct __gconv_step_data __data [];
} *__gconv_t;
# 45 "/usr/include/_G_config.h" 2 3
typedef union
{
  struct __gconv_info __cd;
  struct
  {
    struct __gconv_info __cd;
    struct __gconv_step_data __data;
  } __combined;
} _G_iconv_t;

typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 33 "/usr/include/libio.h" 2 3
# 53 "/usr/include/libio.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdarg.h" 1 3
# 43 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdarg.h" 3
typedef __builtin_va_list __gnuc_va_list;
# 54 "/usr/include/libio.h" 2 3
# 160 "/usr/include/libio.h" 3
struct _IO_jump_t; struct _IO_FILE;
# 170 "/usr/include/libio.h" 3
typedef void _IO_lock_t;





struct _IO_marker {
  struct _IO_marker *_next;
  struct _IO_FILE *_sbuf;



  int _pos;
# 193 "/usr/include/libio.h" 3
};


enum __codecvt_result
{
  __codecvt_ok,
  __codecvt_partial,
  __codecvt_error,
  __codecvt_noconv
};
# 261 "/usr/include/libio.h" 3
struct _IO_FILE {
  int _flags;




  char* _IO_read_ptr;
  char* _IO_read_end;
  char* _IO_read_base;
  char* _IO_write_base;
  char* _IO_write_ptr;
  char* _IO_write_end;
  char* _IO_buf_base;
  char* _IO_buf_end;

  char *_IO_save_base;
  char *_IO_backup_base;
  char *_IO_save_end;

  struct _IO_marker *_markers;

  struct _IO_FILE *_chain;

  int _fileno;
  int _blksize;
  __off_t _old_offset;



  unsigned short _cur_column;
  signed char _vtable_offset;
  char _shortbuf[1];



  _IO_lock_t *_lock;
# 305 "/usr/include/libio.h" 3
  __off64_t _offset;





  void *__pad1;
  void *__pad2;

  int _mode;

  char _unused2[15 * sizeof (int) - 2 * sizeof (void *)];

};





struct _IO_FILE_plus;

extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 344 "/usr/include/libio.h" 3
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);







typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
                                 size_t __n);







typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);


typedef int __io_close_fn (void *__cookie);




typedef __io_read_fn cookie_read_function_t;
typedef __io_write_fn cookie_write_function_t;
typedef __io_seek_fn cookie_seek_function_t;
typedef __io_close_fn cookie_close_function_t;


typedef struct
{
  __io_read_fn *read;
  __io_write_fn *write;
  __io_seek_fn *seek;
  __io_close_fn *close;
} _IO_cookie_io_functions_t;
typedef _IO_cookie_io_functions_t cookie_io_functions_t;

struct _IO_cookie_file;


extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
                             void *__cookie, _IO_cookie_io_functions_t __fns);




extern "C" {


extern int __underflow (_IO_FILE *) throw ();
extern int __uflow (_IO_FILE *) throw ();
extern int __overflow (_IO_FILE *, int) throw ();
extern wint_t __wunderflow (_IO_FILE *) throw ();
extern wint_t __wuflow (_IO_FILE *) throw ();
extern wint_t __woverflow (_IO_FILE *, wint_t) throw ();
# 426 "/usr/include/libio.h" 3
extern int _IO_getc (_IO_FILE *__fp) throw ();
extern int _IO_putc (int __c, _IO_FILE *__fp) throw ();
extern int _IO_feof (_IO_FILE *__fp) throw ();
extern int _IO_ferror (_IO_FILE *__fp) throw ();

extern int _IO_peekc_locked (_IO_FILE *__fp) throw ();





extern void _IO_flockfile (_IO_FILE *) throw ();
extern void _IO_funlockfile (_IO_FILE *) throw ();
extern int _IO_ftrylockfile (_IO_FILE *) throw ();
# 456 "/usr/include/libio.h" 3
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
                        __gnuc_va_list, int *__restrict) throw ();
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
                         __gnuc_va_list) throw ();
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) throw ();
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) throw ();

extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) throw ();
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) throw ();

extern void _IO_free_backup_area (_IO_FILE *) throw ();
# 514 "/usr/include/libio.h" 3
}
# 75 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 2 3




typedef __gnuc_va_list __not_va_list__;
# 89 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
typedef _G_fpos_t fpos_t;




typedef _G_fpos64_t fpos64_t;
# 138 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
# 1 "/usr/include/bits/stdio_lim.h" 1 3
# 139 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 2 3



extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;






extern int remove (__const char *__filename) throw ();

extern int rename (__const char *__old, __const char *__new) throw ();




extern FILE *tmpfile (void) throw ();
# 167 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
extern FILE *tmpfile64 (void) throw ();


extern char *tmpnam (char *__s) throw ();




extern char *tmpnam_r (char *__s) throw ();
# 187 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
extern char *tempnam (__const char *__dir, __const char *__pfx)
     throw () __attribute__ ((__malloc__));




extern int fclose (FILE *__stream) throw ();

extern int fflush (FILE *__stream) throw ();



extern int fflush_unlocked (FILE *__stream) throw ();




extern int fcloseall (void) throw ();





extern FILE *fopen (__const char *__restrict __filename,
                    __const char *__restrict __modes) throw ();

extern FILE *freopen (__const char *__restrict __filename,
                      __const char *__restrict __modes,
                      FILE *__restrict __stream) throw ();
# 231 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
extern FILE *fopen64 (__const char *__restrict __filename,
                      __const char *__restrict __modes) throw ();
extern FILE *freopen64 (__const char *__restrict __filename,
                        __const char *__restrict __modes,
                        FILE *__restrict __stream) throw ();




extern FILE *fdopen (int __fd, __const char *__modes) throw ();





extern FILE *fopencookie (void *__restrict __magic_cookie,
                          __const char *__restrict __modes,
                          _IO_cookie_io_functions_t __io_funcs) throw ();


extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw ();




extern FILE *open_memstream (char **__restrict __bufloc,
                             size_t *__restrict __sizeloc) throw ();





extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();



extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
                    int __modes, size_t __n) throw ();




extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
                       size_t __size) throw ();


extern void setlinebuf (FILE *__stream) throw ();




extern int fprintf (FILE *__restrict __stream,
                    __const char *__restrict __format, ...) throw ();

extern int printf (__const char *__restrict __format, ...) throw ();

extern int sprintf (char *__restrict __s,
                    __const char *__restrict __format, ...) throw ();


extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
                     __gnuc_va_list __arg) throw ();

extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg)
     throw ();

extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
                     __gnuc_va_list __arg) throw ();



extern int snprintf (char *__restrict __s, size_t __maxlen,
                     __const char *__restrict __format, ...)
     throw () __attribute__ ((__format__ (__printf__, 3, 4)));

extern int vsnprintf (char *__restrict __s, size_t __maxlen,
                      __const char *__restrict __format, __gnuc_va_list __arg)
     throw () __attribute__ ((__format__ (__printf__, 3, 0)));





extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
                      __gnuc_va_list __arg)
     throw () __attribute__ ((__format__ (__printf__, 2, 0)));
extern int __asprintf (char **__restrict __ptr,
                       __const char *__restrict __fmt, ...)
     throw () __attribute__ ((__format__ (__printf__, 2, 3)));
extern int asprintf (char **__restrict __ptr,
                     __const char *__restrict __fmt, ...)
     throw () __attribute__ ((__format__ (__printf__, 2, 3)));


extern int vdprintf (int __fd, __const char *__restrict __fmt,
                     __gnuc_va_list __arg)
     throw () __attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
     throw () __attribute__ ((__format__ (__printf__, 2, 3)));




extern int fscanf (FILE *__restrict __stream,
                   __const char *__restrict __format, ...) throw ();

extern int scanf (__const char *__restrict __format, ...) throw ();

extern int sscanf (__const char *__restrict __s,
                   __const char *__restrict __format, ...) throw ();



extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
                    __gnuc_va_list __arg)
     throw () __attribute__ ((__format__ (__scanf__, 2, 0)));


extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
     throw () __attribute__ ((__format__ (__scanf__, 1, 0)));


extern int vsscanf (__const char *__restrict __s,
                    __const char *__restrict __format, __gnuc_va_list __arg)
     throw () __attribute__ ((__format__ (__scanf__, 2, 0)));




extern int fgetc (FILE *__stream) throw ();
extern int getc (FILE *__stream) throw ();


extern int getchar (void) throw ();







extern int getc_unlocked (FILE *__stream) throw ();
extern int getchar_unlocked (void) throw ();




extern int fgetc_unlocked (FILE *__stream) throw ();




extern int fputc (int __c, FILE *__stream) throw ();
extern int putc (int __c, FILE *__stream) throw ();


extern int putchar (int __c) throw ();







extern int fputc_unlocked (int __c, FILE *__stream) throw ();




extern int putc_unlocked (int __c, FILE *__stream) throw ();
extern int putchar_unlocked (int __c) throw ();





extern int getw (FILE *__stream) throw ();


extern int putw (int __w, FILE *__stream) throw ();




extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
     throw ();



extern char *fgets_unlocked (char *__restrict __s, int __n,
                             FILE *__restrict __stream) throw ();




extern char *gets (char *__s) throw ();
# 435 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
extern __ssize_t __getdelim (char **__restrict __lineptr,
                               size_t *__restrict __n, int __delimiter,
                               FILE *__restrict __stream) throw ();
extern __ssize_t getdelim (char **__restrict __lineptr,
                             size_t *__restrict __n, int __delimiter,
                             FILE *__restrict __stream) throw ();


extern __ssize_t getline (char **__restrict __lineptr,
                            size_t *__restrict __n,
                            FILE *__restrict __stream) throw ();




extern int fputs (__const char *__restrict __s, FILE *__restrict __stream)
     throw ();



extern int fputs_unlocked (__const char *__restrict __s,
                           FILE *__restrict __stream) throw ();



extern int puts (__const char *__s) throw ();



extern int ungetc (int __c, FILE *__stream) throw ();



extern size_t fread (void *__restrict __ptr, size_t __size,
                     size_t __n, FILE *__restrict __stream) throw ();

extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
                      size_t __n, FILE *__restrict __s) throw ();



extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
                              size_t __n, FILE *__restrict __stream) throw ();
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
                               size_t __n, FILE *__restrict __stream) throw ();




extern int fseek (FILE *__stream, long int __off, int __whence) throw ();

extern long int ftell (FILE *__stream) throw ();

extern void rewind (FILE *__stream) throw ();
# 498 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
extern int fseeko (FILE *__stream, __off_t __off, int __whence) throw ();

extern __off_t ftello (FILE *__stream) throw ();



extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos)
     throw ();

extern int fsetpos (FILE *__stream, __const fpos_t *__pos) throw ();
# 532 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence) throw ();
extern __off64_t ftello64 (FILE *__stream) throw ();
extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos)
     throw ();
extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos) throw ();



extern void clearerr (FILE *__stream) throw ();

extern int feof (FILE *__stream) throw ();

extern int ferror (FILE *__stream) throw ();



extern void clearerr_unlocked (FILE *__stream) throw ();
extern int feof_unlocked (FILE *__stream) throw ();
extern int ferror_unlocked (FILE *__stream) throw ();




extern void perror (__const char *__s) throw ();





# 1 "/usr/include/bits/sys_errlist.h" 1 3
# 27 "/usr/include/bits/sys_errlist.h" 3
extern int sys_nerr;
extern __const char *__const sys_errlist[];


extern int _sys_nerr;
extern __const char *__const _sys_errlist[];
# 562 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 2 3




extern int fileno (FILE *__stream) throw ();




extern int fileno_unlocked (FILE *__stream) throw ();






extern FILE *popen (__const char *__command, __const char *__modes) throw ();


extern int pclose (FILE *__stream) throw ();





extern char *ctermid (char *__s) throw ();





extern char *cuserid (char *__s) throw ();




struct obstack;


extern int obstack_printf (struct obstack *__restrict __obstack,
                           __const char *__restrict __format, ...) throw ();
extern int obstack_vprintf (struct obstack *__restrict __obstack,
                            __const char *__restrict __format,
                            __gnuc_va_list __args) throw ();







extern void flockfile (FILE *__stream) throw ();



extern int ftrylockfile (FILE *__stream) throw ();


extern void funlockfile (FILE *__stream) throw ();
# 634 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3
# 1 "/usr/include/bits/stdio.h" 1 3
# 33 "/usr/include/bits/stdio.h" 3
inline int
vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) throw ()
{
  return vfprintf (stdout, __fmt, __arg);
}


inline int
getchar (void) throw ()
{
  return _IO_getc (stdin);
}




inline int
getc_unlocked (FILE *__fp) throw ()
{
  return ((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
}


inline int
getchar_unlocked (void) throw ()
{
  return ((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
}




inline int
putchar (int __c) throw ()
{
  return _IO_putc (__c, stdout);
}




inline int
fputc_unlocked (int __c, FILE *__stream) throw ()
{
  return (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}





inline int
putc_unlocked (int __c, FILE *__stream) throw ()
{
  return (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}


inline int
putchar_unlocked (int __c) throw ()
{
  return (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
}





inline __ssize_t
getline (char **__lineptr, size_t *__n, FILE *__stream) throw ()
{
  return __getdelim (__lineptr, __n, '\n', __stream);
}





inline int
feof_unlocked (FILE *__stream) throw ()
{
  return (((__stream)->_flags & 0x10) != 0);
}


inline int
ferror_unlocked (FILE *__stream) throw ()
{
  return (((__stream)->_flags & 0x20) != 0);
}
# 635 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 2 3


}
# 45 "/opt/qt/3.0.4/include/qtextstream.h" 2



class QTextCodec;
class QTextDecoder;

class QTextStreamPrivate;

class QTextStream
{
public:
    enum Encoding { Locale, Latin1, Unicode, UnicodeNetworkOrder,
                    UnicodeReverse, RawUnicode, UnicodeUTF8 };

    void setEncoding( Encoding );

    void setCodec( QTextCodec* );




    QTextStream();
    QTextStream( QIODevice * );
    QTextStream( QString*, int mode );
    QTextStream( QString&, int mode );
    QTextStream( QByteArray, int mode );
    QTextStream( FILE *, int mode );
    virtual ~QTextStream();

    QIODevice *device() const;
    void setDevice( QIODevice * );
    void unsetDevice();

    bool atEnd() const;
    bool eof() const;

    QTextStream &operator>>( QChar & );
    QTextStream &operator>>( char & );
    QTextStream &operator>>( signed short & );
    QTextStream &operator>>( unsigned short & );
    QTextStream &operator>>( signed int & );
    QTextStream &operator>>( unsigned int & );
    QTextStream &operator>>( signed long & );
    QTextStream &operator>>( unsigned long & );
    QTextStream &operator>>( float & );
    QTextStream &operator>>( double & );
    QTextStream &operator>>( char * );
    QTextStream &operator>>( QString & );
    QTextStream &operator>>( QCString & );

    QTextStream &operator<<( QChar );
    QTextStream &operator<<( char );
    QTextStream &operator<<( signed short );
    QTextStream &operator<<( unsigned short );
    QTextStream &operator<<( signed int );
    QTextStream &operator<<( unsigned int );
    QTextStream &operator<<( signed long );
    QTextStream &operator<<( unsigned long );
    QTextStream &operator<<( float );
    QTextStream &operator<<( double );
    QTextStream &operator<<( const char* );
    QTextStream &operator<<( const QString & );
    QTextStream &operator<<( const QCString & );
    QTextStream &operator<<( void * );

    QTextStream &readRawBytes( char *, uint len );
    QTextStream &writeRawBytes( const char* , uint len );

    QString readLine();
    QString read();
    void skipWhiteSpace();

    enum {
        skipws = 0x0001,
        left = 0x0002,
        right = 0x0004,
        internal = 0x0008,
        bin = 0x0010,
        oct = 0x0020,
        dec = 0x0040,
        hex = 0x0080,
        showbase = 0x0100,
        showpoint = 0x0200,
        uppercase = 0x0400,
        showpos = 0x0800,
        scientific= 0x1000,
        fixed = 0x2000
    };

    static const int basefield;
    static const int adjustfield;
    static const int floatfield;

    int flags() const;
    int flags( int f );
    int setf( int bits );
    int setf( int bits, int mask );
    int unsetf( int bits );

    void reset();

    int width() const;
    int width( int );
    int fill() const;
    int fill( int );
    int precision() const;
    int precision( int );

private:
    long input_int();
    void init();
    QTextStream &output_int( int, ulong, bool );
    QIODevice *dev;

    int fflags;
    int fwidth;
    int fillchar;
    int fprec;
    bool doUnicodeHeader;
    bool owndev;
    QTextCodec *mapper;
    QTextStreamPrivate * d;
    QChar unused1;
    bool latin1;
    bool internalOrder;
    bool networkOrder;
    void *unused2;

    QChar eat_ws();
    uint ts_getline( QChar* );
    void ts_ungetc( QChar );
    QChar ts_getc();
    uint ts_getbuf( QChar*, uint );
    void ts_putc(int);
    void ts_putc(QChar);
    bool ts_isspace(QChar);
    bool ts_isdigit(QChar);
    ulong input_bin();
    ulong input_oct();
    ulong input_dec();
    ulong input_hex();
    double input_double();
    QTextStream &writeBlock( const char* p, uint len );
    QTextStream &writeBlock( const QChar* p, uint len );

private:

    QTextStream( const QTextStream & );
    QTextStream &operator=( const QTextStream & );

};

typedef QTextStream QTS;

class QTextIStream : public QTextStream {
public:
    QTextIStream( const QString* s ) :
        QTextStream((QString*)s,0x0001) { }
    QTextIStream( QByteArray ba ) :
        QTextStream(ba,0x0001) { }
    QTextIStream( FILE *f ) :
        QTextStream(f,0x0001) { }
};

class QTextOStream : public QTextStream {
public:
    QTextOStream( QString* s ) :
        QTextStream(s,0x0002) { }
    QTextOStream( QByteArray ba ) :
        QTextStream(ba,0x0002) { }
    QTextOStream( FILE *f ) :
        QTextStream(f,0x0002) { }
};





inline QIODevice *QTextStream::device() const
{ return dev; }

inline bool QTextStream::atEnd() const
{ return dev ? dev->atEnd() : FALSE; }

inline bool QTextStream::eof() const
{ return atEnd(); }

inline int QTextStream::flags() const
{ return fflags; }

inline int QTextStream::flags( int f )
{ int oldf = fflags; fflags = f; return oldf; }

inline int QTextStream::setf( int bits )
{ int oldf = fflags; fflags |= bits; return oldf; }

inline int QTextStream::setf( int bits, int mask )
{ int oldf = fflags; fflags = (fflags & ~mask) | (bits & mask); return oldf; }

inline int QTextStream::unsetf( int bits )
{ int oldf = fflags; fflags &= ~bits; return oldf; }

inline int QTextStream::width() const
{ return fwidth; }

inline int QTextStream::width( int w )
{ int oldw = fwidth; fwidth = w; return oldw; }

inline int QTextStream::fill() const
{ return fillchar; }

inline int QTextStream::fill( int f )
{ int oldc = fillchar; fillchar = f; return oldc; }

inline int QTextStream::precision() const
{ return fprec; }

inline int QTextStream::precision( int p )
{ int oldp = fprec; fprec = p; return oldp; }




inline QChar QTextStream::ts_getc()
{ QChar r; return ( ts_getbuf( &r,1 ) == 1 ? r : QChar((ushort)0xffff) ); }





typedef QTextStream & (*QTSFUNC)(QTextStream &);
typedef int (QTextStream::*QTSMFI)(int);

class QTSManip {
public:
    QTSManip( QTSMFI m, int a ) { mf=m; arg=a; }
    void exec( QTextStream &s ) { (s.*mf)(arg); }
private:
    QTSMFI mf;
    int arg;
};

 inline QTextStream &operator>>( QTextStream &s, QTSFUNC f )
{ return (*f)( s ); }

 inline QTextStream &operator<<( QTextStream &s, QTSFUNC f )
{ return (*f)( s ); }

 inline QTextStream &operator<<( QTextStream &s, QTSManip m )
{ m.exec(s); return s; }

 QTextStream &bin( QTextStream &s );
 QTextStream &oct( QTextStream &s );
 QTextStream &dec( QTextStream &s );
 QTextStream &hex( QTextStream &s );
 QTextStream &endl( QTextStream &s );
 QTextStream &flush( QTextStream &s );
 QTextStream &ws( QTextStream &s );
 QTextStream &reset( QTextStream &s );

 inline QTSManip qSetW( int w )
{
    QTSMFI func = &QTextStream::width;
    return QTSManip(func,w);
}

 inline QTSManip qSetFill( int f )
{
    QTSMFI func = &QTextStream::fill;
    return QTSManip(func,f);
}

 inline QTSManip qSetPrecision( int p )
{
    QTSMFI func = &QTextStream::precision;
    return QTSManip(func,p);
}
# 44 "/opt/qt/3.0.4/include/qtl.h" 2




template <class T>
class QTextOStreamIterator
{
protected:
    QTextOStream& stream;
    QString separator;

public:
    QTextOStreamIterator( QTextOStream& s) : stream( s ) {}
    QTextOStreamIterator( QTextOStream& s, const QString& sep )
        : stream( s ), separator( sep ) {}
    QTextOStreamIterator<T>& operator= ( const T& x ) {
        stream << x;
        if ( !separator.isEmpty() )
            stream << separator;
        return *this;
    }
    QTextOStreamIterator<T>& operator*() { return *this; }
    QTextOStreamIterator<T>& operator++() { return *this; }
    QTextOStreamIterator<T>& operator++(int) { return *this; }
};


template <class InputIterator, class OutputIterator>
inline OutputIterator qCopy( InputIterator _begin, InputIterator _end,
                             OutputIterator _dest )
{
    while( _begin != _end )
        *_dest++ = *_begin++;
    return _dest;
}

template <class BiIterator, class BiOutputIterator>
inline BiOutputIterator qCopyBackward( BiIterator _begin, BiIterator _end,
                                       BiOutputIterator _dest )
{
    while ( _begin != _end )
        *--_dest = *--_end;
    return _dest;
}

template <class InputIterator1, class InputIterator2>
inline bool qEqual( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2 )
{
    for ( ; first1 != last1; ++first1, ++first2 )
        if ( *first1 != *first2 )
            return FALSE;
    return TRUE;
}

template <class ForwardIterator, class T>
inline void qFill( ForwardIterator first, ForwardIterator last, const T& val )
{
    for ( ; first != last; ++first )
        *first = val;
}
# 120 "/opt/qt/3.0.4/include/qtl.h"
template <class InputIterator, class T>
inline InputIterator qFind( InputIterator first, InputIterator last,
                            const T& val )
{
    while ( first != last && *first != val )
        ++first;
    return first;
}

template <class InputIterator, class T, class Size>
inline void qCount( InputIterator first, InputIterator last, const T& value,
                    Size& n )
{
    for ( ; first != last; ++first )
        if ( *first == value )
            ++n;
}

template <class T>
inline void qSwap( T& _value1, T& _value2 )
{
    T tmp = _value1;
    _value1 = _value2;
    _value2 = tmp;
}


template <class InputIterator>
 void qBubbleSort( InputIterator b, InputIterator e )
{

    InputIterator last = e;
    --last;

    if ( last == b )
        return;


    while( b != last ) {
        bool swapped = FALSE;
        InputIterator swap_pos = b;
        InputIterator x = e;
        InputIterator y = x;
        y--;
        do {
            --x;
            --y;
            if ( *x < *y ) {
                swapped = TRUE;
                qSwap( *x, *y );
                swap_pos = y;
            }
        } while( y != b );
        if ( !swapped )
            return;
        b = swap_pos;
        b++;
    }
}


template <class Container>
inline void qBubbleSort( Container &c )
{
  qBubbleSort( c.begin(), c.end() );
}


template <class Value>
 void qHeapSortPushDown( Value* heap, int first, int last )
{
    int r = first;
    while( r <= last/2 ) {

        if ( last == 2*r ) {

            if ( heap[r] > heap[ 2*r ] )
                qSwap( heap[r], heap[ 2*r ] );

            r = last;
        } else {
            if ( heap[r] > heap[ 2*r ] && heap[ 2*r ] <= heap[ 2*r+1 ] ) {

                qSwap( heap[r], heap[ 2*r ] );
                r *= 2;
            } else if ( heap[r] > heap[ 2*r+1 ] &&
                        heap[ 2*r+1 ] < heap[ 2*r ] ) {

                qSwap( heap[r], heap[ 2*r+1 ] );
                r = 2*r+1;
            } else {

                r = last;
            }
        }
    }
}


template <class InputIterator, class Value>
 void qHeapSortHelper( InputIterator b, InputIterator e, Value, uint n )
{

    InputIterator insert = b;
    Value* realheap = new Value[ n ];

    Value* heap = realheap - 1;
    int size = 0;
    for( ; insert != e; ++insert ) {
        heap[++size] = *insert;
        int i = size;
        while( i > 1 && heap[i] < heap[ i / 2 ] ) {
            qSwap( heap[i], heap[ i / 2 ] );
            i /= 2;
        }
    }


    for( uint i = n; i > 0; i-- ) {
        *b++ = heap[1];
        if ( i > 1 ) {
            heap[1] = heap[i];
            qHeapSortPushDown( heap, 1, (int)i - 1 );
        }
    }

    delete[] realheap;
}


template <class InputIterator>
 void qHeapSort( InputIterator b, InputIterator e )
{

    if ( b == e )
        return;


    InputIterator it = b;
    uint n = 0;
    while ( it != e ) {
        ++n;
        ++it;
    }



    qHeapSortHelper( b, e, *b, n );
}


template <class Container>
 void qHeapSort( Container &c )
{
    if ( c.begin() == c.end() )
        return;



    qHeapSortHelper( c.begin(), c.end(), *(c.begin()), (uint)c.count() );
}
# 47 "/opt/qt/3.0.4/include/qmap.h" 2
# 1 "/opt/qt/3.0.4/include/qvaluelist.h" 1
# 58 "/opt/qt/3.0.4/include/qvaluelist.h"
template <class T>
class QValueListNode
{
public:
    QValueListNode( const T& t ) : data( t ) { }
    QValueListNode() { }





    QValueListNode<T>* next;
    QValueListNode<T>* prev;
    T data;
};

template<class T>
class QValueListIterator
{
 public:



    typedef QValueListNode<T>* NodePtr;



    typedef T value_type;
    typedef size_t size_type;



    typedef int difference_type;

    typedef T* pointer;
    typedef T& reference;




    NodePtr node;




    QValueListIterator() : node( 0 ) {}
    QValueListIterator( NodePtr p ) : node( p ) {}
    QValueListIterator( const QValueListIterator<T>& it ) : node( it.node ) {}

    bool operator==( const QValueListIterator<T>& it ) const { return node == it.node; }
    bool operator!=( const QValueListIterator<T>& it ) const { return node != it.node; }
    const T& operator*() const { return node->data; }
    T& operator*() { return node->data; }



    QValueListIterator<T>& operator++() {
        node = node->next;
        return *this;
    }

    QValueListIterator<T> operator++(int) {
        QValueListIterator<T> tmp = *this;
        node = node->next;
        return tmp;
    }

    QValueListIterator<T>& operator--() {
        node = node->prev;
        return *this;
    }

    QValueListIterator<T> operator--(int) {
        QValueListIterator<T> tmp = *this;
        node = node->prev;
        return tmp;
    }
};

template<class T>
class QValueListConstIterator
{
 public:



    typedef QValueListNode<T>* NodePtr;



    typedef T value_type;
    typedef size_t size_type;



    typedef int difference_type;

    typedef const T* pointer;
    typedef const T& reference;




    NodePtr node;




    QValueListConstIterator() : node( 0 ) {}
    QValueListConstIterator( NodePtr p ) : node( p ) {}
    QValueListConstIterator( const QValueListConstIterator<T>& it ) : node( it.node ) {}
    QValueListConstIterator( const QValueListIterator<T>& it ) : node( it.node ) {}

    bool operator==( const QValueListConstIterator<T>& it ) const { return node == it.node; }
    bool operator!=( const QValueListConstIterator<T>& it ) const { return node != it.node; }
    const T& operator*() const { return node->data; }



    QValueListConstIterator<T>& operator++() {
        node = node->next;
        return *this;
    }

    QValueListConstIterator<T> operator++(int) {
        QValueListConstIterator<T> tmp = *this;
        node = node->next;
        return tmp;
    }

    QValueListConstIterator<T>& operator--() {
        node = node->prev;
        return *this;
    }

    QValueListConstIterator<T> operator--(int) {
        QValueListConstIterator<T> tmp = *this;
        node = node->prev;
        return tmp;
    }
};

template <class T>
class QValueListPrivate
    : public QShared
{
public:



    typedef QValueListIterator<T> Iterator;
    typedef QValueListConstIterator<T> ConstIterator;
    typedef QValueListNode<T> Node;
    typedef QValueListNode<T>* NodePtr;
    typedef size_t size_type;




    QValueListPrivate();
    QValueListPrivate( const QValueListPrivate<T>& _p );

    void derefAndDelete()
    {
        if ( deref() )
            delete this;
    }





    ~QValueListPrivate();

    Iterator insert( Iterator it, const T& x );
    Iterator remove( Iterator it );
    NodePtr find( NodePtr start, const T& x ) const;
    int findIndex( NodePtr start, const T& x ) const;
    uint contains( const T& x ) const;
    uint remove( const T& x );
    NodePtr at( size_type i ) const;
    void clear();

    NodePtr node;
    size_type nodes;
};

template <class T>
 QValueListPrivate<T>::QValueListPrivate()
{
    node = new Node; node->next = node->prev = node; nodes = 0;
}

template <class T>
 QValueListPrivate<T>::QValueListPrivate( const QValueListPrivate<T>& _p )
    : QShared()
{
    node = new Node; node->next = node->prev = node; nodes = 0;
    Iterator b( _p.node->next );
    Iterator e( _p.node );
    Iterator i( node );
    while( b != e )
        insert( i, *b++ );
}

template <class T>
 QValueListPrivate<T>::~QValueListPrivate() {
    NodePtr p = node->next;
    while( p != node ) {
        NodePtr x = p->next;
        delete p;
        p = x;
    }
    delete node;
}

template <class T>
 typename QValueListPrivate<T>::Iterator QValueListPrivate<T>::insert( typename QValueListPrivate<T>::Iterator it, const T& x )
{
    NodePtr p = new Node( x );
    p->next = it.node;
    p->prev = it.node->prev;
    it.node->prev->next = p;
    it.node->prev = p;
    nodes++;
    return p;
}

template <class T>
 typename QValueListPrivate<T>::Iterator QValueListPrivate<T>::remove( typename QValueListPrivate<T>::Iterator it )
{
    ((it.node != node) ? (void)0 : qWarning("ASSERT: \"%s\" in %s (%d)","it.node != node","/opt/qt/3.0.4/include/qvaluelist.h",289));
    NodePtr next = it.node->next;
    NodePtr prev = it.node->prev;
    prev->next = next;
    next->prev = prev;
    delete it.node;
    nodes--;
    return Iterator( next );
}

template <class T>
 typename QValueListPrivate<T>::NodePtr QValueListPrivate<T>::find( typename QValueListPrivate<T>::NodePtr start, const T& x ) const
{
    ConstIterator first( start );
    ConstIterator last( node );
    while( first != last) {
        if ( *first == x )
            return first.node;
        ++first;
    }
    return last.node;
}

template <class T>
 int QValueListPrivate<T>::findIndex( typename QValueListPrivate<T>::NodePtr start, const T& x ) const
{
    ConstIterator first( start );
    ConstIterator last( node );
    int pos = 0;
    while( first != last) {
        if ( *first == x )
            return pos;
        ++first;
        ++pos;
    }
    return -1;
}

template <class T>
 uint QValueListPrivate<T>::contains( const T& x ) const
{
    uint result = 0;
    Iterator first = Iterator( node->next );
    Iterator last = Iterator( node );
    while( first != last) {
        if ( *first == x )
            ++result;
        ++first;
    }
    return result;
}

template <class T>
 uint QValueListPrivate<T>::remove( const T& x )
{
    uint result = 0;
    Iterator first = Iterator( node->next );
    Iterator last = Iterator( node );
    while( first != last) {
        if ( *first == x ) {
            first = remove( first );
            ++result;
        } else
            ++first;
    }
    return result;
}

template <class T>
 typename QValueListPrivate<T>::NodePtr QValueListPrivate<T>::at( size_type i ) const
{
    ((i <= nodes) ? (void)0 : qWarning("ASSERT: \"%s\" in %s (%d)","i <= nodes","/opt/qt/3.0.4/include/qvaluelist.h",360));
    NodePtr p = node->next;
    for( size_type x = 0; x < i; ++x )
        p = p->next;
    return p;
}

template <class T>
 void QValueListPrivate<T>::clear()
{
    nodes = 0;
    NodePtr p = node->next;
    while( p != node ) {
        NodePtr next = p->next;
        delete p;
        p = next;
    }
    node->next = node->prev = node;
}
# 393 "/opt/qt/3.0.4/include/qvaluelist.h"
template <class T>
class QValueList
{
public:



    typedef QValueListIterator<T> iterator;
    typedef QValueListConstIterator<T> const_iterator;
    typedef T value_type;
    typedef value_type* pointer;
    typedef const value_type* const_pointer;
    typedef value_type& reference;
    typedef const value_type& const_reference;
    typedef size_t size_type;



    typedef int difference_type;





    QValueList() { sh = new QValueListPrivate<T>; }
    QValueList( const QValueList<T>& l ) { sh = l.sh; sh->ref(); }







    ~QValueList() { sh->derefAndDelete(); }

    QValueList<T>& operator= ( const QValueList<T>& l )
    {
        l.sh->ref();
        sh->derefAndDelete();
        sh = l.sh;
        return *this;
    }
# 457 "/opt/qt/3.0.4/include/qvaluelist.h"
    bool operator== ( const QValueList<T>& l ) const;
    bool operator!= ( const QValueList<T>& l ) const { return !( *this == l ); }
    iterator begin() { detach(); return iterator( sh->node->next ); }
    const_iterator begin() const { return const_iterator( sh->node->next ); }
    iterator end() { detach(); return iterator( sh->node ); }
    const_iterator end() const { return const_iterator( sh->node ); }
    iterator insert( iterator it, const T& x ) { detach(); return sh->insert( it, x ); }
    uint remove( const T& x ) { detach(); return sh->remove( x ); }
    void clear();

    QValueList<T>& operator<< ( const T& x )
    {
        append( x );
        return *this;
    }

    size_type size() const { return sh->nodes; }
    bool empty() const { return sh->nodes == 0; }
    void push_front( const T& x ) { detach(); sh->insert( begin(), x ); }
    void push_back( const T& x ) { detach(); sh->insert( end(), x ); }
    iterator erase( iterator pos ) { detach(); return sh->remove( pos ); }
    iterator erase( iterator first, iterator last );
    reference front() { ; return *begin(); }
    const_reference front() const { ; return *begin(); }
    reference back() { ; return *(--end()); }
    const_reference back() const { ; return *(--end()); }
    void pop_front() { ; erase( begin() ); }
    void pop_back() {
        ;
        iterator tmp = end();
        erase( --tmp );
    }
    void insert( iterator pos, size_type n, const T& x );
# 500 "/opt/qt/3.0.4/include/qvaluelist.h"
    QValueList<T> operator+ ( const QValueList<T>& l ) const;
    QValueList<T>& operator+= ( const QValueList<T>& l );

    iterator fromLast() { detach(); return iterator( sh->node->prev ); }
    const_iterator fromLast() const { return const_iterator( sh->node->prev ); }

    bool isEmpty() const { return ( sh->nodes == 0 ); }

    iterator append( const T& x ) { detach(); return sh->insert( end(), x ); }
    iterator prepend( const T& x ) { detach(); return sh->insert( begin(), x ); }

    iterator remove( iterator it ) { detach(); return sh->remove( it ); }

    T& first() { ; detach(); return sh->node->next->data; }
    const T& first() const { ; return sh->node->next->data; }
    T& last() { ; detach(); return sh->node->prev->data; }
    const T& last() const { ; return sh->node->prev->data; }

    T& operator[] ( size_type i ) { ; detach(); return sh->at(i)->data; }
    const T& operator[] ( size_type i ) const { ; return sh->at(i)->data; }
    iterator at( size_type i ) { ; detach(); return iterator( sh->at(i) ); }
    const_iterator at( size_type i ) const { ; return const_iterator( sh->at(i) ); }
    iterator find ( const T& x ) { detach(); return iterator( sh->find( sh->node->next, x) ); }
    const_iterator find ( const T& x ) const { return const_iterator( sh->find( sh->node->next, x) ); }
    iterator find ( iterator it, const T& x ) { detach(); return iterator( sh->find( it.node, x ) ); }
    const_iterator find ( const_iterator it, const T& x ) const { return const_iterator( sh->find( it.node, x ) ); }
    int findIndex( const T& x ) const { return sh->findIndex( sh->node->next, x) ; }
    size_type contains( const T& x ) const { return sh->contains( x ); }

    size_type count() const { return sh->nodes; }

    QValueList<T>& operator+= ( const T& x )
    {
        append( x );
        return *this;
    }
    typedef QValueListIterator<T> Iterator;
    typedef QValueListConstIterator<T> ConstIterator;
    typedef T ValueType;

protected:



    void detach() { if ( sh->count > 1 ) detachInternal(); }




    QValueListPrivate<T>* sh;

private:
    void detachInternal();
};

template <class T>
 bool QValueList<T>::operator== ( const QValueList<T>& l ) const
{
    if ( size() != l.size() )
        return FALSE;
    const_iterator it2 = begin();
    const_iterator it = l.begin();
    for( ; it != l.end(); ++it, ++it2 )
        if ( !( *it == *it2 ) )
            return FALSE;
    return TRUE;
}

template <class T>
 void QValueList<T>::clear()
{
    if ( sh->count == 1 ) sh->clear(); else { sh->deref(); sh = new QValueListPrivate<T>; }
}

template <class T>
 typename QValueList<T>::iterator QValueList<T>::erase( typename QValueList<T>::iterator first, typename QValueList<T>::iterator last )
{
    while ( first != last )
        erase( first++ );
    return last;
}


template <class T>
 void QValueList<T>::insert( typename QValueList<T>::iterator pos, size_type n, const T& x )
{
    for ( ; n > 0; --n )
        insert( pos, x );
}

template <class T>
 QValueList<T> QValueList<T>::operator+ ( const QValueList<T>& l ) const
{
    QValueList<T> l2( *this );
    for( const_iterator it = l.begin(); it != l.end(); ++it )
        l2.append( *it );
    return l2;
}

template <class T>
 QValueList<T>& QValueList<T>::operator+= ( const QValueList<T>& l )
{
    for( const_iterator it = l.begin(); it != l.end(); ++it )
        append( *it );
    return *this;
}

template <class T>
 void QValueList<T>::detachInternal()
{
    sh->deref(); sh = new QValueListPrivate<T>( *sh );
}


template <class T>
 QDataStream& operator>>( QDataStream& s, QValueList<T>& l )
{
    l.clear();
    Q_UINT32 c;
    s >> c;
    for( Q_UINT32 i = 0; i < c; ++i )
    {
        T t;
        s >> t;
        l.append( t );
        if ( s.atEnd() )
            break;
    }
    return s;
}

template <class T>
 QDataStream& operator<<( QDataStream& s, const QValueList<T>& l )
{
    s << (Q_UINT32)l.size();
    QValueListConstIterator<T> it = l.begin();
    for( ; it != l.end(); ++it )
        s << *it;
    return s;
}
# 48 "/opt/qt/3.0.4/include/qmap.h" 2
# 57 "/opt/qt/3.0.4/include/qmap.h"
struct QMapNodeBase
{
    enum Color { Red, Black };

    QMapNodeBase* left;
    QMapNodeBase* right;
    QMapNodeBase* parent;

    Color color;

    QMapNodeBase* minimum() {
        QMapNodeBase* x = this;
        while ( x->left )
            x = x->left;
        return x;
    }

    QMapNodeBase* maximum() {
        QMapNodeBase* x = this;
        while ( x->right )
            x = x->right;
        return x;
    }
};


template <class K, class T>
struct QMapNode : public QMapNodeBase
{
    QMapNode( const K& _key, const T& _data ) { data = _data; key = _key; }
    QMapNode( const K& _key ) { key = _key; }
    QMapNode( const QMapNode<K,T>& _n ) { key = _n.key; data = _n.data; }
    QMapNode() { }
    T data;
    K key;
};


template<class K, class T>
class QMapIterator
{
 public:



    typedef QMapNode< K, T >* NodePtr;



    typedef T value_type;



    typedef int difference_type;

    typedef T* pointer;
    typedef T& reference;




    QMapNode<K,T>* node;




    QMapIterator() : node( 0 ) {}
    QMapIterator( QMapNode<K,T>* p ) : node( p ) {}
    QMapIterator( const QMapIterator<K,T>& it ) : node( it.node ) {}

    bool operator==( const QMapIterator<K,T>& it ) const { return node == it.node; }
    bool operator!=( const QMapIterator<K,T>& it ) const { return node != it.node; }
    T& operator*() { return node->data; }
    const T& operator*() const { return node->data; }



    const K& key() const { return node->key; }
    T& data() { return node->data; }
    const T& data() const { return node->data; }

private:
    int inc();
    int dec();

public:
    QMapIterator<K,T>& operator++() {
        inc();
        return *this;
    }

    QMapIterator<K,T> operator++(int) {
        QMapIterator<K,T> tmp = *this;
        inc();
        return tmp;
    }

    QMapIterator<K,T>& operator--() {
        dec();
        return *this;
    }

    QMapIterator<K,T> operator--(int) {
        QMapIterator<K,T> tmp = *this;
        dec();
        return tmp;
    }
};

template <class K, class T>
 int QMapIterator<K,T>::inc()
{
    QMapNodeBase* tmp = node;
    if ( tmp->right ) {
        tmp = tmp->right;
        while ( tmp->left )
            tmp = tmp->left;
    } else {
        QMapNodeBase* y = tmp->parent;
        while (tmp == y->right) {
            tmp = y;
            y = y->parent;
        }
        if (tmp->right != y)
            tmp = y;
    }
    node = (NodePtr)tmp;
    return 0;
}

template <class K, class T>
 int QMapIterator<K,T>::dec()
{
    QMapNodeBase* tmp = node;
    if (tmp->color == QMapNodeBase::Red &&
        tmp->parent->parent == tmp ) {
        tmp = tmp->right;
    } else if (tmp->left != 0) {
        QMapNodeBase* y = tmp->left;
        while ( y->right )
            y = y->right;
        tmp = y;
    } else {
        QMapNodeBase* y = tmp->parent;
        while (tmp == y->left) {
            tmp = y;
            y = y->parent;
        }
        tmp = y;
    }
    node = (NodePtr)tmp;
    return 0;
}

template<class K, class T>
class QMapConstIterator
{
 public:



    typedef QMapNode< K, T >* NodePtr;



    typedef T value_type;



    typedef int difference_type;

    typedef const T* pointer;
    typedef const T& reference;





    QMapNode<K,T>* node;




    QMapConstIterator() : node( 0 ) {}
    QMapConstIterator( QMapNode<K,T>* p ) : node( p ) {}
    QMapConstIterator( const QMapConstIterator<K,T>& it ) : node( it.node ) {}
    QMapConstIterator( const QMapIterator<K,T>& it ) : node( it.node ) {}

    bool operator==( const QMapConstIterator<K,T>& it ) const { return node == it.node; }
    bool operator!=( const QMapConstIterator<K,T>& it ) const { return node != it.node; }
    const T& operator*() const { return node->data; }



    const K& key() const { return node->key; }
    const T& data() const { return node->data; }

private:
    int inc();
    int dec();

public:
    QMapConstIterator<K,T>& operator++() {
        inc();
        return *this;
    }

    QMapConstIterator<K,T> operator++(int) {
        QMapConstIterator<K,T> tmp = *this;
        inc();
        return tmp;
    }

    QMapConstIterator<K,T>& operator--() {
        dec();
        return *this;
    }

    QMapConstIterator<K,T> operator--(int) {
        QMapConstIterator<K,T> tmp = *this;
        dec();
        return tmp;
    }
};

template <class K, class T>
 int QMapConstIterator<K,T>::inc()
{
    QMapNodeBase* tmp = node;
    if ( tmp->right ) {
        tmp = tmp->right;
        while ( tmp->left )
            tmp = tmp->left;
    } else {
        QMapNodeBase* y = tmp->parent;
        while (tmp == y->right) {
            tmp = y;
            y = y->parent;
        }
        if (tmp->right != y)
            tmp = y;
    }
    node = (NodePtr)tmp;
    return 0;
}

template <class K, class T>
 int QMapConstIterator<K,T>::dec()
{
    QMapNodeBase* tmp = node;
    if (tmp->color == QMapNodeBase::Red &&
        tmp->parent->parent == tmp ) {
        tmp = tmp->right;
    } else if (tmp->left != 0) {
        QMapNodeBase* y = tmp->left;
        while ( y->right )
            y = y->right;
        tmp = y;
    } else {
        QMapNodeBase* y = tmp->parent;
        while (tmp == y->left) {
            tmp = y;
            y = y->parent;
        }
        tmp = y;
    }
    node = (NodePtr)tmp;
    return 0;
}

class QMapPrivateBase : public QShared
{
public:
    QMapPrivateBase() {
        node_count = 0;
    }
    QMapPrivateBase( const QMapPrivateBase* _map) {
        node_count = _map->node_count;
    }




    void rotateLeft( QMapNodeBase* x, QMapNodeBase*& root);
    void rotateRight( QMapNodeBase* x, QMapNodeBase*& root );
    void rebalance( QMapNodeBase* x, QMapNodeBase*& root );
    QMapNodeBase* removeAndRebalance( QMapNodeBase* z, QMapNodeBase*& root,
                                      QMapNodeBase*& leftmost,
                                      QMapNodeBase*& rightmost );




    int node_count;
};


template <class Key, class T>
class QMapPrivate : public QMapPrivateBase
{
public:



    typedef QMapIterator< Key, T > Iterator;
    typedef QMapConstIterator< Key, T > ConstIterator;
    typedef QMapNode< Key, T > Node;
    typedef QMapNode< Key, T >* NodePtr;




    QMapPrivate();
    QMapPrivate( const QMapPrivate< Key, T >* _map );
    ~QMapPrivate() { clear(); delete header; }

    NodePtr copy( NodePtr p );
    void clear();
    void clear( NodePtr p );

    Iterator begin() { return Iterator( (NodePtr)(header->left ) ); }
    Iterator end() { return Iterator( header ); }
    ConstIterator begin() const { return ConstIterator( (NodePtr)(header->left ) ); }
    ConstIterator end() const { return ConstIterator( header ); }

    ConstIterator find(const Key& k) const;

    void remove( Iterator it ) {
        NodePtr del = (NodePtr) removeAndRebalance( it.node, header->parent, header->left, header->right );
        delete del;
        --node_count;
    }
# 414 "/opt/qt/3.0.4/include/qmap.h"
    Iterator insertSingle( const Key& k );
    Iterator insert( QMapNodeBase* x, QMapNodeBase* y, const Key& k );

protected:



    const Key& key( QMapNodeBase* b ) const { return ((NodePtr)b)->key; }




    NodePtr header;
};


template <class Key, class T>
 QMapPrivate<Key,T>::QMapPrivate() {
    header = new Node;
    header->color = QMapNodeBase::Red;
    header->parent = 0;
    header->left = header->right = header;
}
template <class Key, class T>
 QMapPrivate<Key,T>::QMapPrivate( const QMapPrivate< Key, T >* _map ) : QMapPrivateBase( _map ) {
    header = new Node;
    header->color = QMapNodeBase::Red;
    if ( _map->header->parent == 0 ) {
        header->parent = 0;
        header->left = header->right = header;
    } else {
        header->parent = copy( (NodePtr)(_map->header->parent) );
        header->parent->parent = header;
        header->left = header->parent->minimum();
        header->right = header->parent->maximum();
    }
}

template <class Key, class T>
 typename QMapPrivate<Key,T>::NodePtr QMapPrivate<Key,T>::copy( typename QMapPrivate<Key,T>::NodePtr p )
{
    if ( !p )
        return 0;
    NodePtr n = new Node( *p );
    n->color = p->color;
    if ( p->left ) {
        n->left = copy( (NodePtr)(p->left) );
        n->left->parent = n;
    } else {
        n->left = 0;
    }
    if ( p->right ) {
        n->right = copy( (NodePtr)(p->right) );
        n->right->parent = n;
    } else {
        n->right = 0;
    }
    return n;
}

template <class Key, class T>
 void QMapPrivate<Key,T>::clear()
{
    clear( (NodePtr)(header->parent) );
    header->color = QMapNodeBase::Red;
    header->parent = 0;
    header->left = header->right = header;
    node_count = 0;
}

template <class Key, class T>
 void QMapPrivate<Key,T>::clear( typename QMapPrivate<Key,T>::NodePtr p )
{
    while ( p != 0 ) {
        clear( (NodePtr)p->right );
        NodePtr y = (NodePtr)p->left;
        delete p;
        p = y;
    }
}

template <class Key, class T>
 typename QMapPrivate<Key,T>::ConstIterator QMapPrivate<Key,T>::find(const Key& k) const
{
    QMapNodeBase* y = header;
    QMapNodeBase* x = header->parent;

    while ( x != 0 ) {

        if ( !( key(x) < k ) ) {
            y = x;
            x = x->left;
        } else {
            x = x->right;
        }
    }



    if ( y == header || k < key(y) )
        return ConstIterator( header );
    return ConstIterator( (NodePtr)y );
}

template <class Key, class T>
 typename QMapPrivate<Key,T>::Iterator QMapPrivate<Key,T>::insertSingle( const Key& k )
{

    QMapNodeBase* y = header;
    QMapNodeBase* x = header->parent;
    bool result = TRUE;
    while ( x != 0 ) {
        result = ( k < key(x) );
        y = x;
        x = result ? x->left : x->right;
    }

    Iterator j( (NodePtr)y );
    if ( result ) {

        if ( j == begin() ) {
            return insert(x, y, k );
        } else {

            --j;
        }
    }

    if ( (j.node->key) < k )
        return insert(x, y, k );

    return j;
}


template <class Key, class T>
 typename QMapPrivate<Key,T>::Iterator QMapPrivate<Key,T>::insert( QMapNodeBase* x, QMapNodeBase* y, const Key& k )
{
    NodePtr z = new Node( k );
    if (y == header || x != 0 || k < key(y) ) {
        y->left = z;
        if ( y == header ) {
            header->parent = z;
            header->right = z;
        } else if ( y == header->left )
            header->left = z;
    } else {
        y->right = z;
        if ( y == header->right )
            header->right = z;
    }
    z->parent = y;
    z->left = 0;
    z->right = 0;
    rebalance( z, header->parent );
    ++node_count;
    return Iterator(z);
}
# 587 "/opt/qt/3.0.4/include/qmap.h"
template<class Key, class T>
class QMap
{
public:



    typedef Key key_type;
    typedef T mapped_type;
    typedef QPair<const key_type, mapped_type> value_type;
    typedef value_type* pointer;
    typedef const value_type* const_pointer;
    typedef value_type& reference;
    typedef const value_type& const_reference;



    typedef int difference_type;

    typedef size_t size_type;
    typedef QMapIterator<Key,T> iterator;
    typedef QMapConstIterator<Key,T> const_iterator;
    typedef QPair<iterator,bool> insert_pair;




    QMap()
    {
        sh = new QMapPrivate< Key, T >;
    }
    QMap( const QMap<Key,T>& m )
    {
        sh = m.sh; sh->ref();
    }
# 638 "/opt/qt/3.0.4/include/qmap.h"
    ~QMap()
    {
        if ( sh->deref() )
            delete sh;
    }
    QMap<Key,T>& operator= ( const QMap<Key,T>& m );
# 661 "/opt/qt/3.0.4/include/qmap.h"
    iterator begin() { detach(); return sh->begin(); }
    iterator end() { detach(); return sh->end(); }
    const_iterator begin() const { return ((const Priv*)sh)->begin(); }
    const_iterator end() const { return ((const Priv*)sh)->end(); }
    iterator replace( const Key& k, const T& v )
    {
        remove( k );
        return insert( k, v );
    }

    size_type size() const
    {
        return sh->node_count;
    }
    bool empty() const
    {
        return sh->node_count == 0;
    }
    QPair<iterator,bool> insert( const value_type& x );

    void erase( iterator it )
    {
        detach();
        sh->remove( it );
    }
    void erase( const key_type& k );
    size_type count( const key_type& k ) const;
    T& operator[] ( const Key& k );
    void clear();

    typedef QMapIterator< Key, T > Iterator;
    typedef QMapConstIterator< Key, T > ConstIterator;
    typedef T ValueType;
    typedef QMapPrivate< Key, T > Priv;

    iterator find ( const Key& k )
    {
        detach();
        return iterator( sh->find( k ).node );
    }
    const_iterator find ( const Key& k ) const { return sh->find( k ); }

    const T& operator[] ( const Key& k ) const
        { ; return sh->find( k ).data(); }
    bool contains ( const Key& k ) const
        { return find( k ) != end(); }


    size_type count() const { return sh->node_count; }

    QValueList<Key> keys() const {
        QValueList<Key> r;
        for (const_iterator i=begin(); i!=end(); ++i)
            r.append(i.key());
        return r;
    }

    QValueList<T> values() const {
        QValueList<T> r;
        for (const_iterator i=begin(); i!=end(); ++i)
            r.append(*i);
        return r;
    }

    bool isEmpty() const { return sh->node_count == 0; }

    iterator insert( const Key& key, const T& value, bool overwrite = TRUE );
    void remove( iterator it ) { detach(); sh->remove( it ); }
    void remove( const Key& k );
# 738 "/opt/qt/3.0.4/include/qmap.h"
protected:



    void detach() { if ( sh->count > 1 ) detachInternal(); }

    Priv* sh;
private:
    void detachInternal();
};

template<class Key, class T>
 QMap<Key,T>& QMap<Key,T>::operator= ( const QMap<Key,T>& m )
{
    m.sh->ref();
    if ( sh->deref() )
        delete sh;
    sh = m.sh;
    return *this;
}

template<class Key, class T>
 typename QMap<Key,T>::insert_pair QMap<Key,T>::insert( const typename QMap<Key,T>::value_type& x )
{
    detach();
    size_type n = size();
    iterator it = sh->insertSingle( x.first );
    bool inserted = FALSE;
    if ( n < size() ) {
        inserted = TRUE;
        it.data() = x.second;
    }
    return QPair<iterator,bool>( it, inserted );
}

template<class Key, class T>
 void QMap<Key,T>::erase( const Key& k )
{
    detach();
    iterator it( sh->find( k ).node );
    if ( it != end() )
        sh->remove( it );
}

template<class Key, class T>
 typename QMap<Key,T>::size_type QMap<Key,T>::count( const Key& k ) const
{
    const_iterator it( sh->find( k ).node );
    if ( it != end() ) {
        size_type c = 0;
        while ( it != end() ) {
            ++it;
            ++c;
        }
        return c;
    }
    return 0;
}

template<class Key, class T>
 T& QMap<Key,T>::operator[] ( const Key& k )
{
    detach();
    QMapNode<Key,T>* p = sh->find( k ).node;
    if ( p != sh->end().node )
        return p->data;
    return insert( k, T() ).data();
}

template<class Key, class T>
 void QMap<Key,T>::clear()
{
    if ( sh->count == 1 )
        sh->clear();
    else {
        sh->deref();
        sh = new QMapPrivate<Key,T>;
    }
}

template<class Key, class T>
 typename QMap<Key,T>::iterator QMap<Key,T>::insert( const Key& key, const T& value, bool overwrite )
{
    detach();
    size_type n = size();
    iterator it = sh->insertSingle( key );
    if ( overwrite || n < size() )
        it.data() = value;
    return it;
}

template<class Key, class T>
 void QMap<Key,T>::remove( const Key& k )
{
    detach();
    iterator it( sh->find( k ).node );
    if ( it != end() )
        sh->remove( it );
}

template<class Key, class T>
 void QMap<Key,T>::detachInternal()
{
    sh->deref(); sh = new QMapPrivate<Key,T>( sh );
}



template<class Key, class T>
 QDataStream& operator>>( QDataStream& s, QMap<Key,T>& m ) {
    m.clear();
    Q_UINT32 c;
    s >> c;
    for( Q_UINT32 i = 0; i < c; ++i ) {
        Key k; T t;
        s >> k >> t;
        m.insert( k, t );
        if ( s.atEnd() )
            break;
    }
    return s;
}


template<class Key, class T>
 QDataStream& operator<<( QDataStream& s, const QMap<Key,T>& m ) {
    s << (Q_UINT32)m.size();
    QMapConstIterator<Key,T> it = m.begin();
    for( ; it != m.end(); ++it )
        s << it.key() << it.data();
    return s;
}
# 44 "/opt/qt/3.0.4/include/qmime.h" 2




class QImageDrag;
class QTextDrag;

class QMimeSource
{
    friend class QClipboardData;

public:
    QMimeSource();
    virtual ~QMimeSource();
    virtual const char* format( int n = 0 ) const = 0;
    virtual bool provides( const char* ) const;
    virtual QByteArray encodedData( const char* ) const = 0;
    int serialNumber() const;

private:
    int ser_no;
    enum { NoCache, Text, Graphics } cacheType;
    union
    {
        struct
        {
            QString *str;
            QCString *subtype;
        } txt;
        struct
        {
            QImage *img;
            QPixmap *pix;
        } gfx;
    } cache;
    void clearCache();


    friend class QImageDrag;
    friend class QTextDrag;

};

inline int QMimeSource::serialNumber() const
{ return ser_no; }

class QStringList;
class QMimeSourceFactoryData;

class QMimeSourceFactory {
public:
    QMimeSourceFactory();
    virtual ~QMimeSourceFactory();

    static QMimeSourceFactory* defaultFactory();
    static void setDefaultFactory( QMimeSourceFactory* );
    static QMimeSourceFactory* takeDefaultFactory();
    static void addFactory( QMimeSourceFactory *f );
    static void removeFactory( QMimeSourceFactory *f );

    virtual const QMimeSource* data(const QString& abs_name) const;
    virtual QString makeAbsolute(const QString& abs_or_rel_name, const QString& context) const;
    const QMimeSource* data(const QString& abs_or_rel_name, const QString& context) const;

    virtual void setText( const QString& abs_name, const QString& text );
    virtual void setImage( const QString& abs_name, const QImage& im );
    virtual void setPixmap( const QString& abs_name, const QPixmap& pm );
    virtual void setData( const QString& abs_name, QMimeSource* data );
    virtual void setFilePath( const QStringList& );
    virtual QStringList filePath() const;
    void addFilePath( const QString& );
    virtual void setExtensionType( const QString& ext, const char* mimetype );

private:
    QMimeSource *dataInternal(const QString& abs_name, const QMap<QString, QString> &extensions ) const;
    QMimeSourceFactoryData* d;
};
# 46 "/opt/qt/3.0.4/include/qevent.h" 2



class QEvent: public Qt
{
public:
    enum Type {






        None = 0,


        Timer = 1,
        MouseButtonPress = 2,
        MouseButtonRelease = 3,
        MouseButtonDblClick= 4,
        MouseMove = 5,
        KeyPress = 6,
        KeyRelease = 7,
        FocusIn = 8,
        FocusOut = 9,
        Enter = 10,
        Leave = 11,
        Paint = 12,
        Move = 13,
        Resize = 14,
        Create = 15,
        Destroy = 16,
        Show = 17,
        Hide = 18,
        Close = 19,
        Quit = 20,
        Reparent = 21,
        ShowMinimized = 22,
        ShowNormal = 23,
        WindowActivate = 24,
        WindowDeactivate = 25,
        ShowToParent = 26,
        HideToParent = 27,
        ShowMaximized = 28,
        ShowFullScreen = 29,
        Accel = 30,
        Wheel = 31,
        AccelAvailable = 32,
        CaptionChange = 33,
        IconChange = 34,
        ParentFontChange = 35,
        ApplicationFontChange = 36,
        ParentPaletteChange = 37,
        ApplicationPaletteChange = 38,
        PaletteChange = 39,
        Clipboard = 40,
        Speech = 42,
        SockAct = 50,
        AccelOverride = 51,
        DeferredDelete = 52,
        DragEnter = 60,
        DragMove = 61,
        DragLeave = 62,
        Drop = 63,
        DragResponse = 64,
        ChildInserted = 70,
        ChildRemoved = 71,
        LayoutHint = 72,
        ShowWindowRequest = 73,
        ActivateControl = 80,
        DeactivateControl = 81,
        ContextMenu = 82,
        IMStart = 83,
        IMCompose = 84,
        IMEnd = 85,
        Accessibility = 86,
        Tablet = 87,
        User = 1000,
        MaxUser = 65535
    };


    QEvent( Type type ) : t(type), posted(FALSE), spont(FALSE) {}
    virtual ~QEvent();
    Type type() const { return t; }
    bool spontaneous() const { return spont; }
protected:
    Type t;
private:
    uint posted : 1;
    uint spont : 1;


    friend class QApplication;
    friend class QBaseApplication;
    friend class QETWidget;
};


class QTimerEvent : public QEvent
{
public:
    QTimerEvent( int timerId )
        : QEvent(Timer), id(timerId) {}
    int timerId() const { return id; }
protected:
    int id;
};


class QMouseEvent : public QEvent
{
public:
    QMouseEvent( Type type, const QPoint &pos, int button, int state );

    QMouseEvent( Type type, const QPoint &pos, const QPoint&globalPos,
                 int button, int state )
        : QEvent(type), p(pos), g(globalPos), b((ushort)button),s((ushort)state),accpt(TRUE) {};

    const QPoint &pos() const { return p; }
    const QPoint &globalPos() const { return g; }
    int x() const { return p.x(); }
    int y() const { return p.y(); }
    int globalX() const { return g.x(); }
    int globalY() const { return g.y(); }
    ButtonState button() const { return (ButtonState) b; }
    ButtonState state() const { return (ButtonState) s; }
    ButtonState stateAfter() const;
    bool isAccepted() const { return accpt; }
    void accept() { accpt = TRUE; }
    void ignore() { accpt = FALSE; }
protected:
    QPoint p;
    QPoint g;
    ushort b;
    ushort s;
    uint accpt:1;
};



class QWheelEvent : public QEvent
{
public:
    QWheelEvent( const QPoint &pos, int delta, int state, Orientation orient = Vertical );
    QWheelEvent( const QPoint &pos, const QPoint& globalPos, int delta, int state, Orientation orient = Vertical )
        : QEvent(Wheel), p(pos), g(globalPos), d(delta), s((ushort)state),
          accpt(TRUE), o(orient) {}
    int delta() const { return d; }
    const QPoint &pos() const { return p; }
    const QPoint &globalPos() const { return g; }
    int x() const { return p.x(); }
    int y() const { return p.y(); }
    int globalX() const { return g.x(); }
    int globalY() const { return g.y(); }
    ButtonState state() const { return ButtonState(s); }
    Orientation orientation() const { return o; }
    bool isAccepted() const { return accpt; }
    void accept() { accpt = TRUE; }
    void ignore() { accpt = FALSE; }
protected:
    QPoint p;
    QPoint g;
    int d;
    ushort s;
    bool accpt;
    Orientation o;
};


class QTabletEvent : public QEvent
{
public:
    enum TabletDevice { NoDevice = -1, Puck, Stylus, Eraser };
    QTabletEvent( const QPoint &pos, int device, int pressure, int xTilt,
                  int yTilt, const QPair<int,int> &uId )
        : QEvent( Tablet ), mPos( pos ), mDev( device ), mPress( pressure ),
          mXT( xTilt ), mYT( yTilt ), mType( uId.first ), mPhy( uId.second )
    {}
    QTabletEvent( const QPoint &pos, const QPoint &globalPos, int device,
                  int pressure, int xTilt, int yTilt, const QPair<int,int> &uId )
        : QEvent( Tablet ), mPos( pos ), mGPos( globalPos ), mDev( device ),
          mPress( pressure ), mXT( xTilt ), mYT( yTilt ), mType( uId.first ),
          mPhy( uId.second )
    {}
    int pressure() const { return mPress; }
    int xTilt() const { return mXT; }
    int yTilt() const { return mYT; }
    const QPoint &pos() const { return mPos; }
    const QPoint &globalPos() const { return mGPos; }
    int x() const { return mPos.x(); }
    int y() const { return mPos.y(); }
    int globalX() const { return mGPos.x(); }
    int globalY() const { return mGPos.y(); }
    TabletDevice device() const { return TabletDevice(mDev); }
    int isAccepted() const { return mbAcc; }
    void accept() { mbAcc = TRUE; }
    void ignore() { mbAcc = FALSE; }
    QPair<int,int> uniqueId() { return QPair<int,int>( mType, mPhy); }
protected:
    QPoint mPos;
    QPoint mGPos;
    int mDev,
        mPress,
        mXT,
        mYT,
        mType,
        mPhy;
    bool mbAcc;

};

class QKeyEvent : public QEvent
{
public:
    QKeyEvent( Type type, int key, int ascii, int state,
                const QString& text=QString::null, bool autorep=FALSE, ushort count=1 )
        : QEvent(type), txt(text), k((ushort)key), s((ushort)state),
            a((uchar)ascii), accpt(TRUE), autor(autorep), c(count) {}
    int key() const { return k; }
    int ascii() const { return a; }
    ButtonState state() const { return ButtonState(s); }
    ButtonState stateAfter() const;
    bool isAccepted() const { return accpt; }
    QString text() const { return txt; }
    bool isAutoRepeat() const { return autor; }
    int count() const { return int(c); }
    void accept() { accpt = TRUE; }
    void ignore() { accpt = FALSE; }

protected:
    QString txt;
    ushort k, s;
    uchar a;
    uint accpt:1;
    uint autor:1;
    ushort c;
};


class QFocusEvent : public QEvent
{
public:

    QFocusEvent( Type type )
        : QEvent(type) {}

    bool gotFocus() const { return type() == FocusIn; }
    bool lostFocus() const { return type() == FocusOut; }

    enum Reason { Mouse, Tab, Backtab, ActiveWindow, Popup, Shortcut, Other };
    static Reason reason();
    static void setReason( Reason reason );
    static void resetReason();

private:
    static Reason m_reason;
    static Reason prev_reason;
};


class QPaintEvent : public QEvent
{
public:
    QPaintEvent( const QRegion& paintRegion, bool erased = TRUE)
        : QEvent(Paint),
          rec(paintRegion.boundingRect()),
          reg(paintRegion),
          erase(erased){}
    QPaintEvent( const QRect &paintRect, bool erased = TRUE )
        : QEvent(Paint),
          rec(paintRect),
          reg(paintRect),
          erase(erased){}
    const QRect &rect() const { return rec; }
    const QRegion &region() const { return reg; }
    bool erased() const { return erase; }
protected:
    friend class QApplication;
    friend class QBaseApplication;
    QRect rec;
    QRegion reg;
    bool erase;
};


class QMoveEvent : public QEvent
{
public:
    QMoveEvent( const QPoint &pos, const QPoint &oldPos )
        : QEvent(Move), p(pos), oldp(oldPos) {}
    const QPoint &pos() const { return p; }
    const QPoint &oldPos()const { return oldp;}
protected:
    QPoint p, oldp;
    friend class QApplication;
    friend class QBaseApplication;
};


class QResizeEvent : public QEvent
{
public:
    QResizeEvent( const QSize &size, const QSize &oldSize )
        : QEvent(Resize), s(size), olds(oldSize) {}
    const QSize &size() const { return s; }
    const QSize &oldSize()const { return olds;}
protected:
    QSize s, olds;
    friend class QApplication;
    friend class QBaseApplication;
};


class QCloseEvent : public QEvent
{
public:
    QCloseEvent()
        : QEvent(Close), accpt(FALSE) {}
    bool isAccepted() const { return accpt; }
    void accept() { accpt = TRUE; }
    void ignore() { accpt = FALSE; }
protected:
    bool accpt;
};


class QShowEvent : public QEvent
{
public:
    QShowEvent()
        : QEvent(Show) {}
};


class QHideEvent : public QEvent
{
public:
    QHideEvent()
        : QEvent(Hide) {}
};

class QContextMenuEvent : public QEvent
{
public:
    enum Reason { Mouse, Keyboard, Other };
    QContextMenuEvent( Reason reason, const QPoint &pos, const QPoint &globalPos, int state )
        : QEvent( ContextMenu ), p( pos ), gp( globalPos ), accpt( FALSE ), consum(FALSE),
        reas( reason ), s((ushort)state) {}
    QContextMenuEvent( Reason reason, const QPoint &pos, int state );

    int x() const { return p.x(); }
    int y() const { return p.y(); }
    int globalX() const { return gp.x(); }
    int globalY() const { return gp.y(); }

    const QPoint& pos() const { return p; }
    const QPoint& globalPos() const { return gp; }

    ButtonState state() const { return (ButtonState) s; }
    bool isAccepted() const { return accpt; }
    bool isConsumed() const { return consum; }
    void consume() { consum = TRUE; }
    void accept() { accpt = TRUE; consum = TRUE; }
    void ignore() { accpt = FALSE; consum = FALSE; }

    Reason reason() const { return Reason( reas ); }

protected:
    QPoint p;
    QPoint gp;
    bool accpt;
    bool consum;
    uint reas:8;
    ushort s;
};


class QIMEvent : public QEvent
{
public:
    QIMEvent( Type type, const QString &text, int cursorPosition )
        : QEvent(type), txt(text), cpos(cursorPosition), a(FALSE) {}
    const QString &text() const { return txt; }
    int cursorPos() const { return cpos; }
    bool isAccepted() const { return a; }
    void accept() { a = TRUE; }
    void ignore() { a = FALSE; }
private:
    QString txt;
    int cpos;
    bool a;
};
# 447 "/opt/qt/3.0.4/include/qevent.h"
class QDropEvent : public QEvent, public QMimeSource
{
public:
    QDropEvent( const QPoint& pos, Type typ=Drop )
        : QEvent(typ), p(pos),
          act(0), accpt(0), accptact(0), resv(0),
          d(0)
        {}
    const QPoint &pos() const { return p; }
    bool isAccepted() const { return accpt || accptact; }
    void accept(bool y=TRUE) { accpt = y; }
    void ignore() { accpt = FALSE; }

    bool isActionAccepted() const { return accptact; }
    void acceptAction(bool y=TRUE) { accptact = y; }
    enum Action { Copy, Link, Move, Private, UserAction=100 };
    void setAction( Action a ) { act = (uint)a; }
    Action action() const { return Action(act); }

    QWidget* source() const;
    const char* format( int n = 0 ) const;
    QByteArray encodedData( const char* ) const;
    bool provides( const char* ) const;

    QByteArray data(const char* f) const { return encodedData(f); }

    void setPoint( const QPoint& np ) { p = np; }

protected:
    QPoint p;
    uint act:8;
    uint accpt:1;
    uint accptact:1;
    uint resv:5;
    void * d;
};



class QDragMoveEvent : public QDropEvent
{
public:
    QDragMoveEvent( const QPoint& pos, Type typ=DragMove )
        : QDropEvent(pos,typ),
          rect( pos, QSize( 1, 1 ) ) {}
    QRect answerRect() const { return rect; }
    void accept( bool y=TRUE ) { QDropEvent::accept(y); }
    void accept( const QRect & r) { accpt = TRUE; rect = r; }
    void ignore( const QRect & r) { accpt =FALSE; rect = r; }
    void ignore() { QDropEvent::ignore(); }

protected:
    QRect rect;
};


class QDragEnterEvent : public QDragMoveEvent
{
public:
    QDragEnterEvent( const QPoint& pos ) :
        QDragMoveEvent(pos, DragEnter) { }
};



class QDragResponseEvent : public QEvent
{
public:
    QDragResponseEvent( bool accepted )
        : QEvent(DragResponse), a(accepted) {}
    bool dragAccepted() const { return a; }
protected:
    bool a;
};


class QDragLeaveEvent : public QEvent
{
public:
    QDragLeaveEvent()
        : QEvent(DragLeave) {}
};



class QChildEvent : public QEvent
{
public:
    QChildEvent( Type type, QObject *child )
        : QEvent(type), c(child) {}
    QObject *child() const { return c; }
    bool inserted() const { return t == ChildInserted; }
    bool removed() const { return t == ChildRemoved; }
protected:
    QObject *c;
};


class QCustomEvent : public QEvent
{
public:
    QCustomEvent( int type );
    QCustomEvent( Type type, void *data )
        : QEvent(type), d(data) {};
    void *data() const { return d; }
    void setData( void* data ) { d = data; }
private:
    void *d;
};
# 46 "/opt/qt/3.0.4/include/qobject.h" 2






class QMetaObject;
class QVariant;
class QMetaProperty;
class QPostEventList;
class QObjectPrivate;
struct QUObject;

class QObject: public Qt
{
    public: virtual QMetaObject *metaObject() const { return staticMetaObject(); } virtual const char *className() const; virtual void* qt_cast( const char* ); virtual bool qt_invoke( int, QUObject* ); virtual bool qt_emit( int, QUObject* ); virtual bool qt_property( int, int, QVariant* ); static QMetaObject* staticMetaObject(); QObject* qObject() { return (QObject*)this; } private: static QMetaObject *metaObj;
   

public:
    QObject( QObject *parent=0, const char *name=0 );
    virtual ~QObject();
# 75 "/opt/qt/3.0.4/include/qobject.h"
    virtual bool event( QEvent * );
    virtual bool eventFilter( QObject *, QEvent * );

    bool isA( const char * ) const;
    bool inherits( const char * ) const;

    const char *name() const;
    const char *name( const char * defaultName ) const;

    virtual void setName( const char *name );
    bool isWidgetType() const { return isWidget; }
    bool highPriority() const { return FALSE; }

    bool signalsBlocked() const { return blockSig; }
    void blockSignals( bool b );

    int startTimer( int interval );
    void killTimer( int id );
    void killTimers();

    QObject *child( const char *objName, const char *inheritsClass = 0, bool recursiveSearch = TRUE );
    const QObjectList *children() const { return childObjects; }

    static const QObjectList *objectTrees();

    QObjectList *queryList( const char *inheritsClass = 0,
                                  const char *objName = 0,
                                  bool regexpMatch = TRUE,
                                  bool recursiveSearch = TRUE ) const;

    virtual void insertChild( QObject * );
    virtual void removeChild( QObject * );

    void installEventFilter( const QObject * );
    void removeEventFilter( const QObject * );

    static bool connect( const QObject *sender, const char *signal,
                          const QObject *receiver, const char *member );
    bool connect( const QObject *sender, const char *signal,
                          const char *member ) const;
    static bool disconnect( const QObject *sender, const char *signal,
                             const QObject *receiver, const char *member );
    bool disconnect( const char *signal=0,
                             const QObject *receiver=0, const char *member=0 );
    bool disconnect( const QObject *receiver, const char *member=0 );
    static void connectInternal( const QObject *sender, int signal_index, const QObject *receiver,
                                  int membcode, int member_index );

    void dumpObjectTree();
    void dumpObjectInfo();


    virtual bool setProperty( const char *name, const QVariant& value );
    virtual QVariant property( const char *name ) const;


    static QString tr( const char *sourceText, const char * = 0);

    static QString trUtf8( const char *sourceText, const char * = 0);



protected:
    void destroyed();
    void destroyed( QObject* obj );

public:
    QObject *parent() const { return parentObj; }

public :
    void deleteLater();

private :
    void cleanupEventFilter( QObject* );

protected:
    bool activate_filters( QEvent * );
    QConnectionList *receivers( const char* signal ) const;
    QConnectionList *receivers( int signal ) const;
    void activate_signal( int signal );
    void activate_signal( int signal, int );
    void activate_signal( int signal, double );
    void activate_signal( int signal, QString );
    void activate_signal_bool( int signal, bool );
    void activate_signal( QConnectionList *clist, QUObject *o );

    const QObject *sender();

    virtual void timerEvent( QTimerEvent * );
    virtual void childEvent( QChildEvent * );
    virtual void customEvent( QCustomEvent * );

    virtual void connectNotify( const char *signal );
    virtual void disconnectNotify( const char *signal );
    virtual bool checkConnectArgs( const char *signal, const QObject *receiver,
                                   const char *member );
    static QCString normalizeSignalSlot( const char *signalSlot );

private:
    uint isSignal : 1;
    uint isWidget : 1;
    uint pendTimer : 1;
    uint blockSig : 1;
    uint wasDeleted : 1;
    uint isTree : 1;

    const char *objname;
    QObject *parentObj;
    QObjectList *childObjects;
    QSignalVec *connections;
    QObjectList *senderObjects;
    QObjectList *eventFilters;
    QPostEventList *postedEvents;
    QObjectPrivate* d;

    static QMetaObject* staticQtMetaObject();

    friend class QApplication;
    friend class QBaseApplication;
    friend class QWidget;
    friend class QSignal;
    friend class QSenderObject;

private:

    QObject( const QObject & );
    QObject &operator=( const QObject & );

};


inline bool QObject::connect( const QObject *sender, const char *signal,
                              const char *member ) const
{
    return connect( sender, signal, this, member );
}


inline bool QObject::disconnect( const char *signal,
                                 const QObject *receiver, const char *member )
{
    return disconnect( this, signal, receiver, member );
}


inline bool QObject::disconnect( const QObject *receiver, const char *member )
{
    return disconnect( this, 0, receiver, member );
}


class QSenderObject : public QObject
{
public:
    void setSender( QObject *s );
};


inline QString QObject::tr( const char *sourceText, const char * ) {
    return QString::fromLatin1( sourceText );
}

inline QString QObject::trUtf8( const char *sourceText, const char * ) {
    return QString::fromUtf8( sourceText );
}
# 29 "kconfigbase.h" 2
# 1 "/opt/qt/3.0.4/include/qcolor.h" 1
# 45 "/opt/qt/3.0.4/include/qcolor.h"
const QRgb RGB_MASK = 0x00ffffff;

 inline int qRed( QRgb rgb )
{ return (int)((rgb >> 16) & 0xff); }

 inline int qGreen( QRgb rgb )
{ return (int)((rgb >> 8) & 0xff); }

 inline int qBlue( QRgb rgb )
{ return (int)(rgb & 0xff); }

 inline int qAlpha( QRgb rgb )
{ return (int)((rgb >> 24) & 0xff); }

 inline QRgb qRgb( int r, int g, int b )
{ return (0xff << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }

 inline QRgb qRgba( int r, int g, int b, int a )
{ return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }

 inline int qGray( int r, int g, int b )
{ return (r*11+g*16+b*5)/32; }

 inline int qGray( QRgb rgb )
{ return qGray( qRed(rgb), qGreen(rgb), qBlue(rgb) ); }


class QColor
{
public:
    enum Spec { Rgb, Hsv };

    QColor();
    QColor( int r, int g, int b );
    QColor( int x, int y, int z, Spec );
    QColor( QRgb rgb, uint pixel=0xffffffff);
    QColor( const QString& name );
    QColor( const char *name );
    QColor( const QColor & );
    QColor &operator=( const QColor & );

    bool isValid() const;
    bool isDirty() const;

    QString name() const;

    void setNamedColor( const QString& name );

    void rgb( int *r, int *g, int *b ) const;
    QRgb rgb() const;
    void setRgb( int r, int g, int b );
    void setRgb( QRgb rgb );

    int red() const;
    int green() const;
    int blue() const;

    void hsv( int *h, int *s, int *v ) const;
    void getHsv( int &h, int &s, int &v ) const { hsv( &h, &s, &v ); }
    void setHsv( int h, int s, int v );

    QColor light( int f = 150 ) const;
    QColor dark( int f = 200 ) const;

    bool operator==( const QColor &c ) const;
    bool operator!=( const QColor &c ) const;

    uint alloc();
    uint pixel() const;

    static int maxColors();
    static int numBitPlanes();

    static int enterAllocContext();
    static void leaveAllocContext();
    static int currentAllocContext();
    static void destroyAllocContext( int );
# 131 "/opt/qt/3.0.4/include/qcolor.h"
    static void initialize();
    static void cleanup();

    enum { Dirt = 0x44495254, Invalid = 0x49000000 };

private:
    void setSystemNamedColor( const QString& name );
    void setPixel( uint pixel );
    static void initGlobalColors();
    static uint argbToPix32(QRgb);
    static QColor* globalColors();
    static bool color_init;
    static bool globals_init;



    static enum ColorModel { d8, d32 } colormodel;
    union {
        QRgb argb;
        struct {
            QRgb argb;
            uchar pix;
            uchar invalid;
            uchar dirty;
            uchar direct;
        } d8;
        struct D32 {
            QRgb argb;
            uint pix;
            bool invalid() const { return argb == QColor::Invalid && pix == QColor::Dirt; }
            bool probablyDirty() const { return pix == QColor::Dirt; }
        } d32;
    } d;
};


inline QColor::QColor()
{ d.d32.argb = Invalid; d.d32.pix = Dirt; }

inline QColor::QColor( int r, int g, int b )
{ setRgb( r, g, b ); }

inline QRgb QColor::rgb() const
{ return d.argb; }

inline int QColor::red() const
{ return qRed(d.argb); }

inline int QColor::green() const
{ return qGreen(d.argb); }

inline int QColor::blue() const
{ return qBlue(d.argb); }

inline bool QColor::isValid() const
{
    if ( colormodel == d8 )
        return !d.d8.invalid;
    else
        return !d.d32.invalid();
}

inline bool QColor::operator==( const QColor &c ) const
{
    return d.argb == c.d.argb && isValid() == c.isValid();
}

inline bool QColor::operator!=( const QColor &c ) const
{
    return !operator==(c);
}







 QDataStream &operator<<( QDataStream &, const QColor & );
 QDataStream &operator>>( QDataStream &, QColor & );
# 30 "kconfigbase.h" 2
# 1 "/opt/qt/3.0.4/include/qfont.h" 1
# 47 "/opt/qt/3.0.4/include/qfont.h"
class QFontPrivate;
class QStringList;

class QFont
{
public:
    enum StyleHint {
        Helvetica, SansSerif = Helvetica,
        Times, Serif = Times,
        Courier, TypeWriter = Courier,
        OldEnglish, Decorative = OldEnglish,
        System,
        AnyStyle
    };

    enum StyleStrategy {
        PreferDefault = 0x0001,
        PreferBitmap = 0x0002,
        PreferDevice = 0x0004,
        PreferOutline = 0x0008,
        ForceOutline = 0x0010,
        PreferMatch = 0x0020,
        PreferQuality = 0x0040,
        PreferAntialias = 0x0080,
        NoAntialias = 0x0100
    };

    enum Weight {
        Light = 25,
        Normal = 50,
        DemiBold = 63,
        Bold = 75,
        Black = 87
    };


    QFont();

    QFont( const QString &family, int pointSize = 12, int weight = Normal,
           bool italic = FALSE );

    QFont( const QFont & );

    ~QFont();

    QString family() const;
    void setFamily( const QString &);

    int pointSize() const;
    float pointSizeFloat() const;
    void setPointSize( int );
    void setPointSizeFloat( float );

    int pixelSize() const;
    void setPixelSize( int );
    void setPixelSizeFloat( float );

    int weight() const;
    void setWeight( int );

    bool bold() const;
    void setBold( bool );

    bool italic() const;
    void setItalic( bool );

    bool underline() const;
    void setUnderline( bool );

    bool strikeOut() const;
    void setStrikeOut( bool );

    bool fixedPitch() const;
    void setFixedPitch( bool );

    StyleHint styleHint() const;
    StyleStrategy styleStrategy() const;
    void setStyleHint( StyleHint, StyleStrategy = PreferDefault );
    void setStyleStrategy( StyleStrategy s );


    bool rawMode() const;
    void setRawMode( bool );


    bool exactMatch() const;

    QFont &operator=( const QFont & );
    bool operator==( const QFont & ) const;
    bool operator!=( const QFont & ) const;
    bool isCopyOf( const QFont & ) const;





    Qt::HANDLE handle() const;




    void setRawName( const QString & );
    QString rawName() const;

    QString key() const;


    QString toString() const;
    bool fromString(const QString &);

    static QString substitute(const QString &);
    static QStringList substitutes(const QString &);
    static QStringList substitutions();
    static void insertSubstitution(const QString&, const QString &);
    static void insertSubstitutions(const QString&, const QStringList &);
    static void removeSubstitution(const QString &);

    static void initialize();
    static void cleanup();
    static void cacheStatistics();







    enum Script {

        Latin,
        Greek,
        Cyrillic,
        Armenian,
        Georgian,
        Runic,
        Ogham,
        SpacingModifiers,
        CombiningMarks,


        Hebrew,
        Arabic,
        Syriac,
        Thaana,


        Devanagari,
        Bengali,
        Gurmukhi,
        Gujarati,
        Oriya,
        Tamil,
        Telugu,
        Kannada,
        Malayalam,
        Sinhala,
        Thai,
        Lao,
        Tibetan,
        Myanmar,
        Khmer,


        Han,
        Hiragana,
        Katakana,
        Hangul,
        Bopomofo,
        Yi,


        Ethiopic,
        Cherokee,
        CanadianAboriginal,
        Mongolian,


        CurrencySymbols,
        LetterlikeSymbols,
        NumberForms,
        MathematicalOperators,
        TechnicalSymbols,
        GeometricSymbols,
        MiscellaneousSymbols,
        EnclosedAndSquare,
        Braille,

        Unicode,


        NScripts,
        UnknownScript = NScripts,

        NoScript,






        HanX11,

        LatinBasic = Latin,
        LatinExtendedA_2 = HanX11 + 1,
        LatinExtendedA_3,
        LatinExtendedA_4,
        LatinExtendedA_14,
        LatinExtendedA_15,

        LastPrivateScript
    };

    QString defaultFamily() const;
    QString lastResortFamily() const;
    QString lastResortFont() const;
# 271 "/opt/qt/3.0.4/include/qfont.h"
protected:

    bool dirty() const;
    int deciPointSize() const;


private:
    QFont( QFontPrivate *, bool deep = TRUE );
    QFont( QFontPrivate *, QPaintDevice *pd );

    void detach();
# 293 "/opt/qt/3.0.4/include/qfont.h"
    friend class QFontMetrics;
    friend class QFontInfo;
    friend class QPainter;
    friend class QPSPrinterFont;


    friend QDataStream &operator<<( QDataStream &, const QFont & );
    friend QDataStream &operator>>( QDataStream &, QFont & );


    QFontPrivate *d;
};


inline bool QFont::bold() const
{ return weight() > Normal; }


inline void QFont::setBold( bool enable )
{ setWeight( enable ? Bold : Normal ); }
# 322 "/opt/qt/3.0.4/include/qfont.h"
 QDataStream &operator<<( QDataStream &, const QFont & );
 QDataStream &operator>>( QDataStream &, QFont & );
# 31 "kconfigbase.h" 2
# 1 "/opt/qt/3.0.4/include/qdatetime.h" 1
# 51 "/opt/qt/3.0.4/include/qdatetime.h"
class QDate
{
public:
    QDate() { jd=0; }
    QDate( int y, int m, int d );

    bool isNull() const { return jd == 0; }
    bool isValid() const;

    int year() const;
    int month() const;
    int day() const;
    int dayOfWeek() const;
    int dayOfYear() const;
    int daysInMonth() const;
    int daysInYear() const;






    static QString shortMonthName( int month );
    static QString shortDayName( int weekday );
    static QString longMonthName( int month );
    static QString longDayName( int weekday );


    QString toString( Qt::DateFormat f = Qt::TextDate ) const;

    QString toString( const QString& format ) const;
    bool setYMD( int y, int m, int d );

    QDate addDays( int days ) const;
    QDate addMonths( int months ) const;
    QDate addYears( int years ) const;
    int daysTo( const QDate & ) const;

    bool operator==( const QDate &d ) const { return jd == d.jd; }
    bool operator!=( const QDate &d ) const { return jd != d.jd; }
    bool operator<( const QDate &d ) const { return jd < d.jd; }
    bool operator<=( const QDate &d ) const { return jd <= d.jd; }
    bool operator>( const QDate &d ) const { return jd > d.jd; }
    bool operator>=( const QDate &d ) const { return jd >= d.jd; }

    static QDate currentDate();
    static QDate fromString( const QString& s, Qt::DateFormat f = Qt::TextDate );

    static bool isValid( int y, int m, int d );
    static bool leapYear( int year );

    static uint gregorianToJulian( int y, int m, int d );
    static void julianToGregorian( uint jd, int &y, int &m, int &d );
private:
    uint jd;
    friend class QDateTime;

    friend QDataStream &operator<<( QDataStream &, const QDate & );
    friend QDataStream &operator>>( QDataStream &, QDate & );

};






class QTime
{
public:
    QTime() { ds=0; }
    QTime( int h, int m, int s=0, int ms=0 );

    bool isNull() const { return ds == 0; }
    bool isValid() const;

    int hour() const;
    int minute() const;
    int second() const;
    int msec() const;


    QString toString( Qt::DateFormat f = Qt::TextDate ) const;

    QString toString( const QString& format ) const;

    bool setHMS( int h, int m, int s, int ms=0 );

    QTime addSecs( int secs ) const;
    int secsTo( const QTime & ) const;
    QTime addMSecs( int ms ) const;
    int msecsTo( const QTime & ) const;

    bool operator==( const QTime &d ) const { return ds == d.ds; }
    bool operator!=( const QTime &d ) const { return ds != d.ds; }
    bool operator<( const QTime &d ) const { return ds < d.ds; }
    bool operator<=( const QTime &d ) const { return ds <= d.ds; }
    bool operator>( const QTime &d ) const { return ds > d.ds; }
    bool operator>=( const QTime &d ) const { return ds >= d.ds; }

    static QTime currentTime();
    static QTime fromString( const QString& s, Qt::DateFormat f = Qt::TextDate );
    static bool isValid( int h, int m, int s, int ms=0 );

    void start();
    int restart();
    int elapsed() const;

private:
    static bool currentTime( QTime * );

    uint ds;
    friend class QDateTime;

    friend QDataStream &operator<<( QDataStream &, const QTime & );
    friend QDataStream &operator>>( QDataStream &, QTime & );

};






class QDateTime
{
public:
    QDateTime() {}
    QDateTime( const QDate & );
    QDateTime( const QDate &, const QTime & );

    bool isNull() const { return d.isNull() && t.isNull(); }
    bool isValid() const { return d.isValid() && t.isValid(); }

    QDate date() const { return d; }
    QTime time() const { return t; }
    void setDate( const QDate &date ) { d=date; }
    void setTime( const QTime &time ) { t=time; }
    void setTime_t( uint secsSince1Jan1970UTC );


    QString toString( Qt::DateFormat f = Qt::TextDate ) const;

    QString toString( const QString& format ) const;

    QDateTime addDays( int days ) const;
    QDateTime addMonths( int months ) const;
    QDateTime addYears( int years ) const;
    QDateTime addSecs( int secs ) const;
    int daysTo( const QDateTime & ) const;
    int secsTo( const QDateTime & ) const;

    bool operator==( const QDateTime &dt ) const;
    bool operator!=( const QDateTime &dt ) const;
    bool operator<( const QDateTime &dt ) const;
    bool operator<=( const QDateTime &dt ) const;
    bool operator>( const QDateTime &dt ) const;
    bool operator>=( const QDateTime &dt ) const;

    static QDateTime currentDateTime();
    static QDateTime fromString( const QString& s, Qt::DateFormat f = Qt::TextDate );

private:
    QDate d;
    QTime t;

    friend QDataStream &operator<<( QDataStream &, const QDateTime &);
    friend QDataStream &operator>>( QDataStream &, QDateTime & );

};







 QDataStream &operator<<( QDataStream &, const QDate & );
 QDataStream &operator>>( QDataStream &, QDate & );
 QDataStream &operator<<( QDataStream &, const QTime & );
 QDataStream &operator>>( QDataStream &, QTime & );
 QDataStream &operator<<( QDataStream &, const QDateTime & );
 QDataStream &operator>>( QDataStream &, QDateTime & );
# 32 "kconfigbase.h" 2
# 1 "/opt/qt/3.0.4/include/qstrlist.h" 1
# 43 "/opt/qt/3.0.4/include/qstrlist.h"
# 1 "/opt/qt/3.0.4/include/qptrlist.h" 1
# 42 "/opt/qt/3.0.4/include/qptrlist.h"
# 1 "/opt/qt/3.0.4/include/qglist.h" 1
# 42 "/opt/qt/3.0.4/include/qglist.h"
# 1 "/opt/qt/3.0.4/include/qptrcollection.h" 1
# 44 "/opt/qt/3.0.4/include/qptrcollection.h"
class QGVector;
class QGList;
class QGDict;


class QPtrCollection
{
public:
    bool autoDelete() const { return del_item; }
    void setAutoDelete( bool enable ) { del_item = enable; }

    virtual uint count() const = 0;
    virtual void clear() = 0;

    typedef void *Item;

protected:
    QPtrCollection() { del_item = FALSE; }
    QPtrCollection(const QPtrCollection &) { del_item = FALSE; }
    virtual ~QPtrCollection() {}

    bool del_item;

    virtual Item newItem( Item );
    virtual void deleteItem( Item ) = 0;
};
# 43 "/opt/qt/3.0.4/include/qglist.h" 2


class QLNode
{
friend class QGList;
friend class QGListIterator;
public:
    QPtrCollection::Item getData() { return data; }
private:
    QPtrCollection::Item data;
    QLNode *prev;
    QLNode *next;
    QLNode( QPtrCollection::Item d ) { data = d; }
};

class QGListIteratorList;

class QGList : public QPtrCollection
{
friend class QGListIterator;
friend class QGListIteratorList;
friend class QGVector;
public:
    uint count() const;


    QDataStream &read( QDataStream & );
    QDataStream &write( QDataStream & ) const;

protected:
    QGList();
    QGList( const QGList & );
    virtual ~QGList();

    QGList &operator=( const QGList & );
    bool operator==( const QGList& ) const;

    void inSort( QPtrCollection::Item );
    void append( QPtrCollection::Item );
    bool insertAt( uint index, QPtrCollection::Item );
    void relinkNode( QLNode * );
    bool removeNode( QLNode * );
    bool remove( QPtrCollection::Item = 0 );
    bool removeRef( QPtrCollection::Item = 0 );
    bool removeFirst();
    bool removeLast();
    bool removeAt( uint index );
    QPtrCollection::Item takeNode( QLNode * );
    QPtrCollection::Item take();
    QPtrCollection::Item takeAt( uint index );
    QPtrCollection::Item takeFirst();
    QPtrCollection::Item takeLast();

    void sort();
    void clear();

    int findRef( QPtrCollection::Item, bool = TRUE );
    int find( QPtrCollection::Item, bool = TRUE );

    uint containsRef( QPtrCollection::Item ) const;
    uint contains( QPtrCollection::Item ) const;

    QPtrCollection::Item at( uint index );
    int at() const;
    QLNode *currentNode() const;

    QPtrCollection::Item get() const;

    QPtrCollection::Item cfirst() const;
    QPtrCollection::Item clast() const;
    QPtrCollection::Item first();
    QPtrCollection::Item last();
    QPtrCollection::Item next();
    QPtrCollection::Item prev();

    void toVector( QGVector * ) const;

    virtual int compareItems( QPtrCollection::Item, QPtrCollection::Item );


    virtual QDataStream &read( QDataStream &, QPtrCollection::Item & );
    virtual QDataStream &write( QDataStream &, QPtrCollection::Item ) const;

private:
    void prepend( QPtrCollection::Item );

    void heapSortPushDown( QPtrCollection::Item* heap, int first, int last );

    QLNode *firstNode;
    QLNode *lastNode;
    QLNode *curNode;
    int curIndex;
    uint numNodes;
    QGListIteratorList *iterators;

    QLNode *locate( uint );
    QLNode *unlink();
};


inline uint QGList::count() const
{
    return numNodes;
}

inline bool QGList::removeFirst()
{
    first();
    return remove();
}

inline bool QGList::removeLast()
{
    last();
    return remove();
}

inline int QGList::at() const
{
    return curIndex;
}

inline QPtrCollection::Item QGList::at( uint index )
{
    QLNode *n = locate( index );
    return n ? n->data : 0;
}

inline QLNode *QGList::currentNode() const
{
    return curNode;
}

inline QPtrCollection::Item QGList::get() const
{
    return curNode ? curNode->data : 0;
}

inline QPtrCollection::Item QGList::cfirst() const
{
    return firstNode ? firstNode->data : 0;
}

inline QPtrCollection::Item QGList::clast() const
{
    return lastNode ? lastNode->data : 0;
}







 QDataStream &operator>>( QDataStream &, QGList & );
 QDataStream &operator<<( QDataStream &, const QGList & );






class QGListIterator
{
friend class QGList;
friend class QGListIteratorList;
protected:
    QGListIterator( const QGList & );
    QGListIterator( const QGListIterator & );
    QGListIterator &operator=( const QGListIterator & );
   ~QGListIterator();

    bool atFirst() const;
    bool atLast() const;
    QPtrCollection::Item toFirst();
    QPtrCollection::Item toLast();

    QPtrCollection::Item get() const;
    QPtrCollection::Item operator()();
    QPtrCollection::Item operator++();
    QPtrCollection::Item operator+=(uint);
    QPtrCollection::Item operator--();
    QPtrCollection::Item operator-=(uint);

protected:
    QGList *list;

private:
    QLNode *curNode;
};


inline bool QGListIterator::atFirst() const
{
    return curNode == list->firstNode;
}

inline bool QGListIterator::atLast() const
{
    return curNode == list->lastNode;
}

inline QPtrCollection::Item QGListIterator::get() const
{
    return curNode ? curNode->data : 0;
}
# 43 "/opt/qt/3.0.4/include/qptrlist.h" 2



template<class type>
class QPtrList



        : public QGList

{
public:
    QPtrList() {}
    QPtrList( const QPtrList<type> &l ) : QGList(l) {}
    ~QPtrList() { clear(); }
    QPtrList<type> &operator=(const QPtrList<type> &l)
                        { return (QPtrList<type>&)QGList::operator=(l); }
    bool operator==( const QPtrList<type> &list ) const
    { return QGList::operator==( list ); }
    uint count() const { return QGList::count(); }
    bool isEmpty() const { return QGList::count() == 0; }
    bool insert( uint i, const type *d){ return QGList::insertAt(i,(QPtrCollection::Item)d); }
    void inSort( const type *d ) { QGList::inSort((QPtrCollection::Item)d); }
    void prepend( const type *d ) { QGList::insertAt(0,(QPtrCollection::Item)d); }
    void append( const type *d ) { QGList::append((QPtrCollection::Item)d); }
    bool remove( uint i ) { return QGList::removeAt(i); }
    bool remove() { return QGList::remove((QPtrCollection::Item)0); }
    bool remove( const type *d ) { return QGList::remove((QPtrCollection::Item)d); }
    bool removeRef( const type *d ) { return QGList::removeRef((QPtrCollection::Item)d); }
    void removeNode( QLNode *n ) { QGList::removeNode(n); }
    bool removeFirst() { return QGList::removeFirst(); }
    bool removeLast() { return QGList::removeLast(); }
    type *take( uint i ) { return (type *)QGList::takeAt(i); }
    type *take() { return (type *)QGList::take(); }
    type *takeNode( QLNode *n ) { return (type *)QGList::takeNode(n); }
    void clear() { QGList::clear(); }
    void sort() { QGList::sort(); }
    int find( const type *d ) { return QGList::find((QPtrCollection::Item)d); }
    int findNext( const type *d ) { return QGList::find((QPtrCollection::Item)d,FALSE); }
    int findRef( const type *d ) { return QGList::findRef((QPtrCollection::Item)d); }
    int findNextRef( const type *d ){ return QGList::findRef((QPtrCollection::Item)d,FALSE);}
    uint contains( const type *d ) const { return QGList::contains((QPtrCollection::Item)d); }
    uint containsRef( const type *d ) const
                                        { return QGList::containsRef((QPtrCollection::Item)d); }
    type *at( uint i ) { return (type *)QGList::at(i); }
    int at() const { return QGList::at(); }
    type *current() const { return (type *)QGList::get(); }
    QLNode *currentNode() const { return QGList::currentNode(); }
    type *getFirst() const { return (type *)QGList::cfirst(); }
    type *getLast() const { return (type *)QGList::clast(); }
    type *first() { return (type *)QGList::first(); }
    type *last() { return (type *)QGList::last(); }
    type *next() { return (type *)QGList::next(); }
    type *prev() { return (type *)QGList::prev(); }
    void toVector( QGVector *vec )const{ QGList::toVector(vec); }
# 106 "/opt/qt/3.0.4/include/qptrlist.h"
private:
    void deleteItem( Item d );
};


template<> inline void QPtrList<void>::deleteItem( QPtrCollection::Item )
{
}


template<class type> inline void QPtrList<type>::deleteItem( QPtrCollection::Item d )
{
    if ( del_item ) delete (type *)d;
}

template<class type>
class QPtrListIterator
: public QGListIterator
{
public:
    QPtrListIterator(const QPtrList<type> &l) :QGListIterator((QGList &)l) {}
   ~QPtrListIterator() {}
    uint count() const { return list->count(); }
    bool isEmpty() const { return list->count() == 0; }
    bool atFirst() const { return QGListIterator::atFirst(); }
    bool atLast() const { return QGListIterator::atLast(); }
    type *toFirst() { return (type *)QGListIterator::toFirst(); }
    type *toLast() { return (type *)QGListIterator::toLast(); }
    operator type *() const { return (type *)QGListIterator::get(); }
    type *operator*() { return (type *)QGListIterator::get(); }







    type *current() const { return (type *)QGListIterator::get(); }
    type *operator()() { return (type *)QGListIterator::operator()();}
    type *operator++() { return (type *)QGListIterator::operator++(); }
    type *operator+=(uint j) { return (type *)QGListIterator::operator+=(j);}
    type *operator--() { return (type *)QGListIterator::operator--(); }
    type *operator-=(uint j) { return (type *)QGListIterator::operator-=(j);}
    QPtrListIterator<type>& operator=(const QPtrListIterator<type>&it)
                              { QGListIterator::operator=(it); return *this; }
};
# 44 "/opt/qt/3.0.4/include/qstrlist.h" 2
# 58 "/opt/qt/3.0.4/include/qstrlist.h"
typedef QPtrListIterator<char> QStrListIterator;


class QStrList : public QPtrList<char>
{
public:
    QStrList( bool deepCopies=TRUE ) { dc = deepCopies; del_item = deepCopies; }
    QStrList( const QStrList & );
    ~QStrList() { clear(); }
    QStrList& operator=( const QStrList & );

private:
    QPtrCollection::Item newItem( QPtrCollection::Item d ) { return dc ? qstrdup( (const char*)d ) : d; }
    void deleteItem( QPtrCollection::Item d ) { if ( del_item ) delete[] (char*)d; }
    int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 ) { return qstrcmp((const char*)s1,
                                                         (const char*)s2); }

    QDataStream &read( QDataStream &s, QPtrCollection::Item &d )
                                { s >> (char *&)d; return s; }
    QDataStream &write( QDataStream &s, QPtrCollection::Item d ) const
                                { return s << (const char *)d; }

    bool dc;
};


class QStrIList : public QStrList
{
public:
    QStrIList( bool deepCopies=TRUE ) : QStrList( deepCopies ) {}
    ~QStrIList() { clear(); }
private:
    int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
                                { return qstricmp((const char*)s1,
                                                    (const char*)s2); }
};


inline QStrList & QStrList::operator=( const QStrList &strList )
{
    clear();
    dc = strList.dc;
    del_item = dc;
    QPtrList<char>::operator=( strList );
    return *this;
}

inline QStrList::QStrList( const QStrList &strList )
    : QPtrList<char>( strList )
{
    dc = FALSE;
    operator=( strList );
}
# 33 "kconfigbase.h" 2
# 1 "/opt/qt/3.0.4/include/qstringlist.h" 1
# 49 "/opt/qt/3.0.4/include/qstringlist.h"
class QRegExp;

class QStringList : public QValueList<QString>
{
public:
    QStringList() { }
    QStringList( const QStringList& l ) : QValueList<QString>(l) { }
    QStringList( const QValueList<QString>& l ) : QValueList<QString>(l) { }
    QStringList( const QString& i ) { append(i); }

    QStringList( const char* i ) { append(i); }


    static QStringList fromStrList(const QStrList&);

    void sort();

    static QStringList split( const QString &sep, const QString &str, bool allowEmptyEntries = FALSE );
    static QStringList split( const QChar &sep, const QString &str, bool allowEmptyEntries = FALSE );
    static QStringList split( const QRegExp &sep, const QString &str, bool allowEmptyEntries = FALSE );
    QString join( const QString &sep ) const;

    QStringList grep( const QString &str, bool cs = TRUE ) const;
    QStringList grep( const QRegExp &expr ) const;
};


class QDataStream;
extern QDataStream &operator>>( QDataStream &, QStringList& );
extern QDataStream &operator<<( QDataStream &, const QStringList& );
# 34 "kconfigbase.h" 2
# 1 "/opt/qt/3.0.4/include/qvariant.h" 1
# 46 "/opt/qt/3.0.4/include/qvariant.h"
class QString;
class QCString;
class QFont;
class QPixmap;
class QBrush;
class QRect;
class QPoint;
class QImage;
class QSize;
class QColor;
class QPalette;
class QColorGroup;
class QIconSet;
class QDataStream;
class QPointArray;
class QRegion;
class QBitmap;
class QCursor;
class QStringList;
class QSizePolicy;
class QDate;
class QTime;
class QDateTime;
class QBitArray;
class QKeySequence;

class QVariant;

template <class T> class QValueList;
template <class T> class QValueListConstIterator;
template <class T> class QValueListNode;
template <class Key, class T> class QMap;
template <class Key, class T> class QMapConstIterator;


class QVariant
{
public:
    enum Type {
        Invalid,
        Map,
        List,
        String,
        StringList,
        Font,
        Pixmap,
        Brush,
        Rect,
        Size,
        Color,
        Palette,
        ColorGroup,
        IconSet,
        Point,
        Image,
        Int,
        UInt,
        Bool,
        Double,
        CString,
        PointArray,
        Region,
        Bitmap,
        Cursor,
        SizePolicy,
        Date,
        Time,
        DateTime,
        ByteArray,
        BitArray,
        KeySequence
    };

    QVariant();
    ~QVariant();
    QVariant( const QVariant& );

    QVariant( QDataStream& s );

    QVariant( const QString& );
    QVariant( const QCString& );
    QVariant( const char* );

    QVariant( const QStringList& );

    QVariant( const QFont& );
    QVariant( const QPixmap& );
    QVariant( const QImage& );
    QVariant( const QBrush& );
    QVariant( const QPoint& );
    QVariant( const QRect& );
    QVariant( const QSize& );
    QVariant( const QColor& );
    QVariant( const QPalette& );
    QVariant( const QColorGroup& );
    QVariant( const QIconSet& );
    QVariant( const QPointArray& );
    QVariant( const QRegion& );
    QVariant( const QBitmap& );
    QVariant( const QCursor& );
    QVariant( const QDate& );
    QVariant( const QTime& );
    QVariant( const QDateTime& );
    QVariant( const QByteArray& );
    QVariant( const QBitArray& );
    QVariant( const QKeySequence& );

    QVariant( const QValueList<QVariant>& );
    QVariant( const QMap<QString,QVariant>& );

    QVariant( int );
    QVariant( uint );

    QVariant( bool, int );
    QVariant( double );
    QVariant( QSizePolicy );

    QVariant& operator= ( const QVariant& );
    bool operator==( const QVariant& ) const;
    bool operator!=( const QVariant& ) const;

    Type type() const;
    const char* typeName() const;

    bool canCast( Type ) const;
    bool cast( Type );

    bool isValid() const;

    void clear();

    const QString toString() const;
    const QCString toCString() const;

    const QStringList toStringList() const;

    const QFont toFont() const;
    const QPixmap toPixmap() const;
    const QImage toImage() const;
    const QBrush toBrush() const;
    const QPoint toPoint() const;
    const QRect toRect() const;
    const QSize toSize() const;
    const QColor toColor() const;
    const QPalette toPalette() const;
    const QColorGroup toColorGroup() const;
    const QIconSet toIconSet() const;
    const QPointArray toPointArray() const;
    const QBitmap toBitmap() const;
    const QRegion toRegion() const;
    const QCursor toCursor() const;
    const QDate toDate() const;
    const QTime toTime() const;
    const QDateTime toDateTime() const;
    const QByteArray toByteArray() const;
    const QBitArray toBitArray() const;
    const QKeySequence toKeySequence() const;
    int toInt( bool * ok=0 ) const;
    uint toUInt( bool * ok=0 ) const;
    bool toBool() const;
    double toDouble( bool * ok=0 ) const;

    const QValueList<QVariant> toList() const;
    const QMap<QString,QVariant> toMap() const;

    QSizePolicy toSizePolicy() const;


    QValueListConstIterator<QString> stringListBegin() const;
    QValueListConstIterator<QString> stringListEnd() const;
    QValueListConstIterator<QVariant> listBegin() const;
    QValueListConstIterator<QVariant> listEnd() const;
    QMapConstIterator<QString,QVariant> mapBegin() const;
    QMapConstIterator<QString,QVariant> mapEnd() const;
    QMapConstIterator<QString,QVariant> mapFind( const QString& ) const;

    QString& asString();
    QCString& asCString();

    QStringList& asStringList();

    QFont& asFont();
    QPixmap& asPixmap();
    QImage& asImage();
    QBrush& asBrush();
    QPoint& asPoint();
    QRect& asRect();
    QSize& asSize();
    QColor& asColor();
    QPalette& asPalette();
    QColorGroup& asColorGroup();
    QIconSet& asIconSet();
    QPointArray& asPointArray();
    QBitmap& asBitmap();
    QRegion& asRegion();
    QCursor& asCursor();
    QDate& asDate();
    QTime& asTime();
    QDateTime& asDateTime();
    QByteArray& asByteArray();
    QBitArray& asBitArray();

    QKeySequence& asKeySequence();

    int& asInt();
    uint& asUInt();
    bool& asBool();
    double& asDouble();

    QValueList<QVariant>& asList();
    QMap<QString,QVariant>& asMap();

    QSizePolicy& asSizePolicy();


    void load( QDataStream& );
    void save( QDataStream& ) const;

    static const char* typeToName( Type typ );
    static Type nameToType( const char* name );

private:
    void detach();

    class Private : public QShared
    {
    public:
        Private();
        Private( Private* );
        ~Private();

        void clear();

        Type typ;
        union
        {
            uint u;
            int i;
            bool b;
            double d;
            void *ptr;
        } value;
    };

    Private* d;
};
# 300 "/opt/qt/3.0.4/include/qvariant.h"
inline QVariant::Type QVariant::type() const
{
    return d->typ;
}

inline bool QVariant::isValid() const
{
    return (d->typ != Invalid);
}


inline QValueListConstIterator<QString> QVariant::stringListBegin() const
{
    if ( d->typ != StringList )
        return QValueListConstIterator<QString>();
    return ((const QStringList*)d->value.ptr)->begin();
}

inline QValueListConstIterator<QString> QVariant::stringListEnd() const
{
    if ( d->typ != StringList )
        return QValueListConstIterator<QString>();
    return ((const QStringList*)d->value.ptr)->end();
}

inline QValueListConstIterator<QVariant> QVariant::listBegin() const
{
    if ( d->typ != List )
        return QValueListConstIterator<QVariant>();
    return ((const QValueList<QVariant>*)d->value.ptr)->begin();
}

inline QValueListConstIterator<QVariant> QVariant::listEnd() const
{
    if ( d->typ != List )
        return QValueListConstIterator<QVariant>();
    return ((const QValueList<QVariant>*)d->value.ptr)->end();
}

inline QMapConstIterator<QString,QVariant> QVariant::mapBegin() const
{
    if ( d->typ != Map )
        return QMapConstIterator<QString,QVariant>();
    return ((const QMap<QString,QVariant>*)d->value.ptr)->begin();
}

inline QMapConstIterator<QString,QVariant> QVariant::mapEnd() const
{
    if ( d->typ != Map )
        return QMapConstIterator<QString,QVariant>();
    return ((const QMap<QString,QVariant>*)d->value.ptr)->end();
}

inline QMapConstIterator<QString,QVariant> QVariant::mapFind( const QString& key ) const
{
    if ( d->typ != Map )
        return QMapConstIterator<QString,QVariant>();
    return ((const QMap<QString,QVariant>*)d->value.ptr)->find( key );
}



 QDataStream& operator>> ( QDataStream& s, QVariant& p );
 QDataStream& operator<< ( QDataStream& s, const QVariant& p );
 QDataStream& operator>> ( QDataStream& s, QVariant::Type& p );
 QDataStream& operator<< ( QDataStream& s, const QVariant::Type p );
# 35 "kconfigbase.h" 2


# 1 "kconfigdata.h" 1
# 31 "kconfigdata.h"
struct KEntry
{
  KEntry()
    : mValue(0), bDirty(false), bNLS(false),
      bGlobal(false), bImmutable(false), bDeleted(false), bExpand(false) {}
  QCString mValue;
  bool bDirty :1;
  bool bNLS :1;
  bool bGlobal:1;
  bool bImmutable:1;
  bool bDeleted:1;
  bool bExpand:1;
};






struct KEntryKey
{
  KEntryKey(const QCString& _group = 0,
            const QCString& _key = 0)
      : mGroup(_group), mKey(_key), bLocal(false), bDefault(false),
        c_key(_key.data()) {}
  QCString mGroup;
  QCString mKey;
  bool bLocal :1;
  bool bDefault:1;

  const char *c_key;
};





inline bool operator <(const KEntryKey &k1, const KEntryKey &k2)
{

   int result=qstrcmp(k1.mGroup.data(),k2.mGroup.data());
   if (result!=0)
      return (result<0);

  if (!k1.c_key && k2.c_key)
    return true;

  result = 0;
  if (k1.c_key && k2.c_key)
     result = strcmp(k1.c_key, k2.c_key);
  if (result != 0)
     return result < 0;
  if (!k1.bLocal && k2.bLocal)
    return true;
  if (k1.bLocal && !k2.bLocal)
    return false;
  return (!k1.bDefault && k2.bDefault);
}







typedef QMap<KEntryKey, KEntry> KEntryMap;





typedef QMap<KEntryKey, KEntry>::Iterator KEntryMapIterator;







typedef QMap<KEntryKey, KEntry>::ConstIterator KEntryMapConstIterator;
# 38 "kconfigbase.h" 2

class KConfigBackEnd;
class KConfigBasePrivate;
class KConfigGroup;
# 70 "kconfigbase.h"
class KConfigBase : public QObject
{
  public: virtual QMetaObject *metaObject() const { return staticMetaObject(); } virtual const char *className() const; virtual void* qt_cast( const char* ); virtual bool qt_invoke( int, QUObject* ); virtual bool qt_emit( int, QUObject* ); virtual bool qt_property( int, int, QVariant* ); static QMetaObject* staticMetaObject(); QObject* qObject() { return (QObject*)this; } private: static QMetaObject *metaObj;

  friend class KConfigBackEnd;
  friend class KConfigINIBackEnd;
  friend class KConfigGroup;

public:



  KConfigBase();




  virtual ~KConfigBase();
# 99 "kconfigbase.h"
  void setGroup( const QString& group );





  void setDesktopGroup();







  QString group() const;







  bool hasGroup(const QString &group) const;






  virtual QStringList groupList() const = 0;






  QString locale() const;
# 144 "kconfigbase.h"
   QString readEntry( const QString& pKey,
                     const QString& aDefault = QString::null ) const;
   QString readEntry( const char *pKey,
                     const QString& aDefault = QString::null ) const;
# 163 "kconfigbase.h"
  QVariant readPropertyEntry( const QString& pKey, QVariant::Type ) const;
  QVariant readPropertyEntry( const char *pKey, QVariant::Type ) const;
# 180 "kconfigbase.h"
  QVariant readPropertyEntry( const QString& pKey,
                              const QVariant &adefault) const;
  QVariant readPropertyEntry( const char *pKey,
                              const QVariant &aDefault) const;
# 195 "kconfigbase.h"
  int readListEntry( const QString& pKey, QStrList &list, char sep = ',' ) const;
  int readListEntry( const char *pKey, QStrList &list, char sep = ',' ) const;
# 205 "kconfigbase.h"
  QStringList readListEntry( const QString& pKey, char sep = ',' ) const;
  QStringList readListEntry( const char *pKey, char sep = ',' ) const;







  QValueList<int> readIntListEntry( const QString& pKey ) const;
  QValueList<int> readIntListEntry( const char *pKey ) const;
# 228 "kconfigbase.h"
  QString readPathEntry( const QString& pKey, const QString & aDefault = QString::null ) const;
  QString readPathEntry( const char *pKey, const QString & aDefault = QString::null ) const;
# 242 "kconfigbase.h"
  int readNumEntry( const QString& pKey, int nDefault = 0 ) const;
  int readNumEntry( const char *pKey, int nDefault = 0 ) const;
# 256 "kconfigbase.h"
  unsigned int readUnsignedNumEntry( const QString& pKey, unsigned int nDefault = 0 ) const;
  unsigned int readUnsignedNumEntry( const char *pKey, unsigned int nDefault = 0 ) const;
# 271 "kconfigbase.h"
  long readLongNumEntry( const QString& pKey, long nDefault = 0 ) const;
  long readLongNumEntry( const char *pKey, long nDefault = 0 ) const;
# 285 "kconfigbase.h"
  unsigned long readUnsignedLongNumEntry( const QString& pKey, unsigned long nDefault = 0 ) const;
  unsigned long readUnsignedLongNumEntry( const char *pKey, unsigned long nDefault = 0 ) const;
# 299 "kconfigbase.h"
  double readDoubleNumEntry( const QString& pKey, double nDefault = 0.0 ) const;
  double readDoubleNumEntry( const char *pKey, double nDefault = 0.0 ) const;
# 313 "kconfigbase.h"
  QFont readFontEntry( const QString& pKey, const QFont* pDefault = 0L ) const;
  QFont readFontEntry( const char *pKey, const QFont* pDefault = 0L ) const;
# 327 "kconfigbase.h"
  bool readBoolEntry( const QString& pKey, const bool bDefault = false ) const;
  bool readBoolEntry( const char *pKey, const bool bDefault = false ) const;
# 341 "kconfigbase.h"
  QRect readRectEntry( const QString& pKey, const QRect* pDefault = 0L ) const;
  QRect readRectEntry( const char *pKey, const QRect* pDefault = 0L ) const;
# 355 "kconfigbase.h"
  QPoint readPointEntry( const QString& pKey, const QPoint* pDefault = 0L ) const;
  QPoint readPointEntry( const char *pKey, const QPoint* pDefault = 0L ) const;
# 369 "kconfigbase.h"
  QSize readSizeEntry( const QString& pKey, const QSize* pDefault = 0L ) const;
  QSize readSizeEntry( const char *pKey, const QSize* pDefault = 0L ) const;
# 384 "kconfigbase.h"
  QColor readColorEntry( const QString& pKey, const QColor* pDefault = 0L ) const;
  QColor readColorEntry( const char *pKey, const QColor* pDefault = 0L ) const;
# 399 "kconfigbase.h"
  QDateTime readDateTimeEntry( const QString& pKey, const QDateTime* pDefault = 0L ) const;
  QDateTime readDateTimeEntry( const char *pKey, const QDateTime* pDefault = 0L ) const;
# 410 "kconfigbase.h"
   QString readEntryUntranslated( const QString& pKey,
                     const QString& aDefault = QString::null ) const;
   QString readEntryUntranslated( const char *pKey,
                     const QString& aDefault = QString::null ) const;
# 432 "kconfigbase.h"
  void writeEntry( const QString& pKey, const QString& pValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
  void writeEntry( const char *pKey, const QString& pValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
# 458 "kconfigbase.h"
  void writeEntry( const QString& pKey, const QVariant& rValue,
                    bool bPersistent = true, bool bGlobal = false,
                    bool bNLS = false );
  void writeEntry( const char *pKey, const QVariant& rValue,
                    bool bPersistent = true, bool bGlobal = false,
                    bool bNLS = false );
# 484 "kconfigbase.h"
  void writeEntry( const QString& pKey, const QStrList &rValue,
                   char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
  void writeEntry( const char *pKey, const QStrList &rValue,
                   char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
# 508 "kconfigbase.h"
  void writeEntry( const QString& pKey, const QStringList &rValue,
                   char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
  void writeEntry( const char *pKey, const QStringList &rValue,
                   char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
# 533 "kconfigbase.h"
  void writeEntry( const QString& pKey, const QValueList<int>& rValue,
                   bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
  void writeEntry( const char *pKey, const QValueList<int>& rValue,
                   bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
# 555 "kconfigbase.h"
  void writeEntry( const QString& pKey, const char *pValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false )
    { writeEntry(pKey, QString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
  void writeEntry( const char *pKey, const char *pValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false )
    { writeEntry(pKey, QString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
# 579 "kconfigbase.h"
  void writeEntry( const QString& pKey, int nValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
  void writeEntry( const char *pKey, int nValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
# 601 "kconfigbase.h"
  void writeEntry( const QString& pKey, unsigned int nValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
  void writeEntry( const char *pKey, unsigned int nValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
# 622 "kconfigbase.h"
  void writeEntry( const QString& pKey, long nValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
  void writeEntry( const char *pKey, long nValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
# 643 "kconfigbase.h"
  void writeEntry( const QString& pKey, unsigned long nValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
  void writeEntry( const char *pKey, unsigned long nValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
# 667 "kconfigbase.h"
  void writeEntry( const QString& pKey, double nValue,
                      bool bPersistent = true, bool bGlobal = false,
                      char format = 'g', int precision = 6,
                      bool bNLS = false );
  void writeEntry( const char *pKey, double nValue,
                      bool bPersistent = true, bool bGlobal = false,
                      char format = 'g', int precision = 6,
                      bool bNLS = false );
# 690 "kconfigbase.h"
  void writeEntry( const QString& pKey, bool bValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
  void writeEntry( const char *pKey, bool bValue,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
# 711 "kconfigbase.h"
  void writeEntry( const QString& pKey, const QFont& rFont,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
  void writeEntry( const char *pKey, const QFont& rFont,
                      bool bPersistent = true, bool bGlobal = false,
                      bool bNLS = false );
# 735 "kconfigbase.h"
  void writeEntry( const QString& pKey, const QColor& rColor,
                   bool bPersistent = true, bool bGlobal = false,
                   bool bNLS = false );
  void writeEntry( const char *pKey, const QColor& rColor,
                   bool bPersistent = true, bool bGlobal = false,
                   bool bNLS = false );
# 759 "kconfigbase.h"
  void writeEntry( const QString& pKey, const QDateTime& rDateTime,
                   bool bPersistent = true, bool bGlobal = false,
                   bool bNLS = false );
  void writeEntry( const char *pKey, const QDateTime& rDateTime,
                   bool bPersistent = true, bool bGlobal = false,
                   bool bNLS = false );
# 784 "kconfigbase.h"
  void writeEntry( const QString& pKey, const QRect& rValue,
                   bool bPersistent = true, bool bGlobal = false,
                   bool bNLS = false );
  void writeEntry( const char *pKey, const QRect& rValue,
                   bool bPersistent = true, bool bGlobal = false,
                   bool bNLS = false );
# 808 "kconfigbase.h"
  void writeEntry( const QString& pKey, const QPoint& rValue,
                   bool bPersistent = true, bool bGlobal = false,
                   bool bNLS = false );
  void writeEntry( const char *pKey, const QPoint& rValue,
                   bool bPersistent = true, bool bGlobal = false,
                   bool bNLS = false );
# 832 "kconfigbase.h"
  void writeEntry( const QString& pKey, const QSize& rValue,
                   bool bPersistent = true, bool bGlobal = false,
                   bool bNLS = false );
  void writeEntry( const char *pKey, const QSize& rValue,
                   bool bPersistent = true, bool bGlobal = false,
                   bool bNLS = false );
# 856 "kconfigbase.h"
  void writePathEntry( const QString& pKey, const QString & path,
                       bool bPersistent = true, bool bGlobal = false,
                       bool bNLS = false );
  void writePathEntry( const char *pKey, const QString & path,
                       bool bPersistent = true, bool bGlobal = false,
                       bool bNLS = false );
# 872 "kconfigbase.h"
   void deleteEntry( const QString& pKey,
                   bool bNLS = false, bool bGlobal = false);
   void deleteEntry( const char *pKey,
                   bool bNLS = false, bool bGlobal = false);
# 894 "kconfigbase.h"
  bool deleteGroup( const QString& group, bool bDeep = true, bool bGlobal = false );
# 904 "kconfigbase.h"
  void setDollarExpansion( bool _bExpand = true ) { bExpand = _bExpand; }






  bool isDollarExpansion() const { return bExpand; }
# 927 "kconfigbase.h"
  virtual void rollback( bool bDeep = true );
# 942 "kconfigbase.h"
  virtual void sync();




  bool isDirty() const { return bDirty; }
# 956 "kconfigbase.h"
  virtual void setReadOnly(bool _ro) { bReadOnly = _ro; }






  bool isReadOnly() const { return bReadOnly; }
# 974 "kconfigbase.h"
  bool hasKey( const QString& key ) const;
# 986 "kconfigbase.h"
  virtual QMap<QString, QString> entryMap(const QString &group) const = 0;
# 1000 "kconfigbase.h"
  virtual void reparseConfiguration() = 0;




  bool isImmutable() const;





  bool groupIsImmutable(const QString &group) const;





  bool entryIsImmutable(const QString &key) const;






  enum ConfigState { NoAccess, ReadOnly, ReadWrite };
# 1038 "kconfigbase.h"
  ConfigState getConfigState() const;

protected:





  void setLocale();






  virtual void setDirty(bool _bDirty = true) { bDirty = _bDirty; }






  virtual void parseConfigFiles();
# 1077 "kconfigbase.h"
  virtual KEntryMap internalEntryMap( const QString& pGroup ) const = 0;
# 1090 "kconfigbase.h"
  virtual KEntryMap internalEntryMap() const = 0;
# 1107 "kconfigbase.h"
  virtual void putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup = true) = 0;
# 1123 "kconfigbase.h"
  virtual KEntry lookupData(const KEntryKey &_key) const = 0;

  virtual bool internalHasGroup(const QCString &group) const = 0;




  KConfigBackEnd *backEnd;
public:



  void setGroup( const QCString &pGroup );
  void setGroup( const char *pGroup );
  bool hasGroup(const QCString &_pGroup) const;
  bool hasGroup(const char *_pGroup) const;
  bool hasKey( const char *pKey ) const;

protected:
  QCString readEntryUtf8( const char *pKey) const;



  QCString mGroup;



  QCString aLocaleString;




  bool bDirty;

  bool bLocaleInitialized;
  bool bReadOnly;
  mutable bool bExpand;

protected:
  virtual void virtual_hook( int id, void* data );
private:
  KConfigBasePrivate *d;
};

class KConfigGroupSaverPrivate;
# 1202 "kconfigbase.h"
class KConfigGroupSaver
{
public:
# 1213 "kconfigbase.h"
  KConfigGroupSaver( KConfigBase* config, QString group )
      : _config(config), _oldgroup(config->group())
        { _config->setGroup( group ); }

  KConfigGroupSaver( KConfigBase* config, const char *group )
      : _config(config), _oldgroup(config->group())
        { _config->setGroup( group ); }

  KConfigGroupSaver( KConfigBase* config, const QCString &group )
      : _config(config), _oldgroup(config->group())
        { _config->setGroup( group ); }

  ~KConfigGroupSaver() { _config->setGroup( _oldgroup ); }

    KConfigBase* config() { return _config; };

private:
  KConfigBase* _config;
  QString _oldgroup;

  KConfigGroupSaver(const KConfigGroupSaver&);
  KConfigGroupSaver& operator=(const KConfigGroupSaver&);

  KConfigGroupSaverPrivate *d;
};

class KConfigGroupPrivate;

class KConfigGroup: public KConfigBase
{
public:




   KConfigGroup(KConfigBase *master, const QCString &group);






   KConfigGroup(KConfigBase *master, const QString &group);







   KConfigGroup(KConfigBase *master, const char * group);







   void deleteGroup(bool bGlobal = false);


   virtual void setDirty(bool b);
   virtual void putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup = true);
   virtual KEntry lookupData(const KEntryKey &_key) const;
   virtual void sync();

private:

   void setGroup() { }
   void setDesktopGroup() { }
   void group() { }
   void hasGroup() { }
   void setReadOnly(bool) { }
   void isDirty() { }


   virtual QStringList groupList() const { return QStringList(); }
   virtual void rollback(bool) { }
   virtual void reparseConfiguration() { }
   virtual QMap<QString, QString> entryMap(const QString &) const
    { return QMap<QString,QString>(); }
   virtual KEntryMap internalEntryMap( const QString&) const
    { return KEntryMap(); }
   virtual KEntryMap internalEntryMap() const
    { return KEntryMap(); }
   virtual bool internalHasGroup(const QCString &) const
    { return false; }

   void getConfigState() { }

   KConfigBase *mMaster;
protected:
   virtual void virtual_hook( int id, void* data );
private:
   KConfigGroupPrivate* d;
};
# 30 "kconfig.h" 2

class KConfigPrivate;
# 43 "kconfig.h"
class KConfig : public KConfigBase
{
  public: virtual QMetaObject *metaObject() const { return staticMetaObject(); } virtual const char *className() const; virtual void* qt_cast( const char* ); virtual bool qt_invoke( int, QUObject* ); virtual bool qt_emit( int, QUObject* ); virtual bool qt_property( int, int, QVariant* ); static QMetaObject* staticMetaObject(); QObject* qObject() { return (QObject*)this; } private: static QMetaObject *metaObj;

public:
# 61 "kconfig.h"
  KConfig( const QString& fileName = QString::null,
          bool bReadOnly = false, bool bUseKDEGlobals = true, const char *resType="config");







  virtual ~KConfig();
# 84 "kconfig.h"
  virtual void rollback(bool bDeep = true);





  virtual QStringList groupList() const;
# 103 "kconfig.h"
  virtual QMap<QString, QString> entryMap(const QString &pGroup) const;





  virtual void reparseConfiguration();






  void setFileWriteMode(int mode);






  void setForceGlobal( bool force ) { bForceGlobal = force; }





  bool forceGlobal() const { return bForceGlobal; }
# 142 "kconfig.h"
  void checkUpdate(const QString &id, const QString &updateFile);

protected:







  virtual bool internalHasGroup(const QCString &group) const;
# 164 "kconfig.h"
  virtual KEntryMap internalEntryMap(const QString &pGroup) const;
# 176 "kconfig.h"
   virtual KEntryMap internalEntryMap() const { return aEntryMap; }
# 188 "kconfig.h"
  virtual void putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup=true);
# 198 "kconfig.h"
  virtual KEntry lookupData(const KEntryKey &_key) const;
# 207 "kconfig.h"
  KEntryMap aEntryMap;

private:




  KConfig( const KConfig& );




  KConfig& operator= ( const KConfig& rConfig );

private:
  bool bGroupImmutable : 1;
  bool bFileImmutable : 1;
  bool bForceGlobal : 1;
protected:
  virtual void virtual_hook( int id, void* data );
private:
  KConfigPrivate *d;
};
# 11 "kkeyserver_x11.cpp" 2
# 1 "kdebug.h" 1
# 25 "kdebug.h"
class QWidget;

class kdbgstream;
class kndbgstream;
typedef kdbgstream & (*KDBGFUNC)(kdbgstream &);
typedef kndbgstream & (*KNDBGFUNC)(kndbgstream &);
# 40 "kdebug.h"
class kdbgstreamprivate;
class kdbgstream {
 public:
    kdbgstream(unsigned int _area, unsigned int _level, bool _print = true) :
      area(_area), level(_level), print(_print) { }
    kdbgstream(const char * initialString, unsigned int _area, unsigned int _level, bool _print = true) :
      output(QString::fromLatin1(initialString)), area(_area), level(_level), print(_print) { }
    kdbgstream(kdbgstream &str) :
      output(str.output), area(str.area), level(str.level), print(str.print) { str.output.truncate(0); }
    kdbgstream(const kdbgstream &str) :
      output(str.output), area(str.area), level(str.level), print(str.print) {}
    ~kdbgstream();
    kdbgstream &operator<<(bool i) {
        if (!print) return *this;
        output += QString::fromLatin1(i ? "true" : "false");
        return *this;
    }
    kdbgstream &operator<<(short i) {
        if (!print) return *this;
        QString tmp; tmp.setNum(i); output += tmp;
        return *this;
    }
    kdbgstream &operator<<(unsigned short i) {
        if (!print) return *this;
        QString tmp; tmp.setNum(i); output += tmp;
        return *this;
    }
    kdbgstream &operator<<(char i) {
        if (!print) return *this;
        QString tmp; tmp.setNum(int(i)); output += tmp;
        return *this;
    }
    kdbgstream &operator<<(unsigned char i) {
        if (!print) return *this;
        QString tmp; tmp.setNum(static_cast<unsigned int>(i)); output += tmp;
        return *this;
    }

    kdbgstream &operator<<(int i) {
        if (!print) return *this;
        QString tmp; tmp.setNum(i); output += tmp;
        return *this;
    }
    kdbgstream &operator<<(unsigned int i) {
        if (!print) return *this;
        QString tmp; tmp.setNum(i); output += tmp;
        return *this;
    }
    kdbgstream &operator<<(long i) {
        if (!print) return *this;
        QString tmp; tmp.setNum(i); output += tmp;
        return *this;
    }
    kdbgstream &operator<<(unsigned long i) {
        if (!print) return *this;
        QString tmp; tmp.setNum(i); output += tmp;
        return *this;
    }
    void flush();
    kdbgstream &operator<<(const QString& string) {
        if (!print) return *this;
        output += string;
        if (output.at(output.length() -1 ) == '\n')
            flush();
        return *this;
    }
    kdbgstream &operator<<(const char *string) {
        if (!print) return *this;
        output += QString::fromUtf8(string);
        if (output.at(output.length() - 1) == '\n')
            flush();
        return *this;
    }
    kdbgstream &operator<<(const QCString& string) {
        *this << string.data();
        return *this;
    }
    kdbgstream& operator<<(const void * p) {
        form("%p", p);
        return *this;
    }
    kdbgstream& operator<<(KDBGFUNC f) {
        if (!print) return *this;
        return (*f)(*this);
    }
    kdbgstream& operator<<(double d) {
      QString tmp; tmp.setNum(d); output += tmp;
      return *this;
    }
    kdbgstream &form(const char *format, ...);



    kdbgstream& operator << (QWidget* widget);
 private:
    QString output;
    unsigned int area, level;
    bool print;
    kdbgstreamprivate* d;
};

inline kdbgstream &endl( kdbgstream &s) { s << "\n"; return s; }
inline kdbgstream &flush( kdbgstream &s) { s.flush(); return s; }
kdbgstream &perror( kdbgstream &s);

class kndbgstream {
 public:
    kndbgstream() {}
    ~kndbgstream() {}
    kndbgstream &operator<<(short int ) { return *this; }
    kndbgstream &operator<<(unsigned short int ) { return *this; }
    kndbgstream &operator<<(char ) { return *this; }
    kndbgstream &operator<<(unsigned char ) { return *this; }
    kndbgstream &operator<<(int ) { return *this; }
    kndbgstream &operator<<(unsigned int ) { return *this; }
    void flush() {}
    kndbgstream &operator<<(const QString& ) { return *this; }
    kndbgstream &operator<<(const QCString& ) { return *this; }
    kndbgstream &operator<<(const char *) { return *this; }
    kndbgstream& operator<<(const void *) { return *this; }
    kndbgstream& operator<<(void *) { return *this; }
    kndbgstream& operator<<(double) { return *this; }
    kndbgstream& operator<<(long) { return *this; }
    kndbgstream& operator<<(unsigned long) { return *this; }
    kndbgstream& operator<<(KNDBGFUNC) { return *this; }
    kndbgstream& operator << (QWidget*) { return *this; }
    kndbgstream &form(const char *, ...) { return *this; }
};

inline kndbgstream &endl( kndbgstream & s) { return s; }
inline kndbgstream &flush( kndbgstream & s) { return s; }
inline kndbgstream &perror( kndbgstream & s) { return s; }

kdbgstream kdDebug(int area = 0);
kdbgstream kdDebug(bool cond, int area = 0);
QString kdBacktrace();
QString kdBacktrace(int levels);
inline kndbgstream kndDebug(int = 0) { return kndbgstream(); }
inline kndbgstream kndDebug(bool , int = 0) { return kndbgstream(); }
inline QString kndBacktrace() { return QString::null; }

kdbgstream kdWarning(int area = 0);
kdbgstream kdWarning(bool cond, int area = 0);
kdbgstream kdError(int area = 0);
kdbgstream kdError(bool cond, int area = 0);
kdbgstream kdFatal(int area = 0);
kdbgstream kdFatal(bool cond, int area = 0);
# 12 "kkeyserver_x11.cpp" 2
# 1 "kglobal.h" 1
# 23 "kglobal.h"
class KStandardDirs;
class KConfig;
class KLocale;
class KIconLoader;
class KCharsets;
class QFont;
class KInstance;
class KStringDict;
class KStaticDeleterBase;
class KStaticDeleterList;
# 1 "kinstance.h" 1
# 21 "kinstance.h"
class KStandardDirs;
class KAboutData;
class KConfig;
class KIconLoader;
class KCharsets;
class QFont;
class KInstancePrivate;
class KMimeSourceFactory;
# 42 "kinstance.h"
class KInstance
{
    friend class KStandardDirs;

 public:




    KInstance( const QCString& instanceName) ;
# 64 "kinstance.h"
    KInstance( const KAboutData * aboutData );







    KInstance( KInstance* src );




    virtual ~KInstance();




    KStandardDirs *dirs() const;




    KConfig *config() const;




    KIconLoader *iconLoader() const;




    void newIconLoader() const;

    KCharsets *charsets() const;





    const KAboutData *aboutData() const;




    QCString instanceName() const;






    KMimeSourceFactory* mimeSourceFactory () const;

protected:



    KInstance( const KInstance& );




    void setConfigName(const QString &);

private:
    mutable KStandardDirs *_dirs;

    mutable KConfig *_config;
    mutable KIconLoader *_iconLoader;

    QCString _name;
    const KAboutData *_aboutData;

protected:
    virtual void virtual_hook( int id, void* data );
private:
    KInstancePrivate *d;
};
# 34 "kglobal.h" 2







class KGlobal
{
public:






    static KInstance *instance();




    static KStandardDirs *dirs();




    static KConfig *config();




    static KIconLoader *iconLoader();

    static KLocale *locale();
    static KCharsets *charsets();
# 81 "kglobal.h"
    static const QString &staticQString(const char *);
# 94 "kglobal.h"
    static const QString &staticQString(const QString &);

    static void registerStaticDeleter(KStaticDeleterBase *);
    static void unregisterStaticDeleter(KStaticDeleterBase *);

    static void deleteStaticDeleters();


    static KStringDict *_stringDict;
    static KInstance *_instance;
    static KLocale *_locale;
    static KCharsets *_charsets;
    static KStaticDeleterList *_staticDeleters;






    static void setActiveInstance(KInstance *d);
    static KInstance *activeInstance() { return _activeInstance; }

    static KInstance *_activeInstance;
};
# 133 "kglobal.h"
template<class T>
inline const T& kMin (const T& a, const T& b) { return a < b ? a : b; }

template<class T>
inline const T& kMax (const T& a, const T& b) { return b < a ? a : b; }

template<class T>
inline T kAbs (const T& a) { return a < 0 ? -a : a; }
# 13 "kkeyserver_x11.cpp" 2
# 1 "klocale.h" 1
# 27 "klocale.h"
class QStringList;
class QTextCodec;
class QDate;
class QTime;
class QDateTime;

class KGlobal;
class KConfig;
class KConfigBase;
class KLocalePrivate;
class KCatalogue;
# 54 "klocale.h"
QString i18n(const char *text);







QString i18n(const char *index, const char *text);






QString i18n(const char *singular, const char *plural, unsigned long n);






inline QString tr2i18n(const char* message, const char* =0) {
  return i18n(message);
}
# 92 "klocale.h"
class KLocale
{
  friend class KGlobal;
public:
# 112 "klocale.h"
  KLocale( const QString& catalogue, KConfig *config = 0 );




  KLocale( const KLocale & rhs );




  KLocale& operator= ( const KLocale & rhs );




  ~KLocale();
# 147 "klocale.h"
  QString translate( const char *index ) const;
# 174 "klocale.h"
  QString translate( const char *index, const char *fallback) const;

  QString translate( const char *singular, const char *plural,
                     unsigned long n) const;
# 187 "klocale.h"
  bool setCharset(const QString & charset);
# 197 "klocale.h"
  bool setEncoding(int mibEnum);
# 208 "klocale.h"
  bool setLanguage(const QString & language);
# 219 "klocale.h"
  bool setLanguage(const QStringList & languages);
# 230 "klocale.h"
  bool setCountry(const QString & country);





  enum SignPosition { ParensAround = 0, BeforeQuantityMoney = 1,
                      AfterQuantityMoney = 2,
                      BeforeMoney = 3, AfterMoney = 4 };







  QString decimalSymbol() const;
# 255 "klocale.h"
  QString thousandsSeparator() const;







  QString currencySymbol() const;
# 272 "klocale.h"
  QString monetaryDecimalSymbol() const;
# 281 "klocale.h"
  QString monetaryThousandsSeparator() const;







  QString positiveSign() const;







  QString negativeSign() const;







  int fracDigits() const;







  bool positivePrefixCurrencySymbol() const;







  bool negativePrefixCurrencySymbol() const;
# 330 "klocale.h"
  SignPosition positiveMonetarySignPosition() const;
# 339 "klocale.h"
  SignPosition negativeMonetarySignPosition() const;
# 353 "klocale.h"
  QString formatMoney(double num,
                      const QString & currency = QString::null,
                      int digits = -1) const;
# 366 "klocale.h"
  QString formatMoney(const QString &numStr) const;
# 381 "klocale.h"
  QString formatNumber(double num, int precision = -1) const;
# 392 "klocale.h"
  QString formatNumber(const QString &numStr) const;
# 404 "klocale.h"
  QString formatDate(const QDate &pDate, bool shortFormat = false) const;
# 416 "klocale.h"
  QString formatTime(const QTime &pTime, bool includeSecs = false) const;






  bool use12Clock() const;
# 434 "klocale.h"
  bool weekStartsMonday() const;






  int weekStartDay() const;
# 451 "klocale.h"
  QString monthName(int i, bool shortName = false) const;
# 461 "klocale.h"
  QString weekDayName(int i, bool shortName = false) const;
# 473 "klocale.h"
  QString formatDateTime(const QDateTime &pDateTime,
                         bool shortFormat = true,
                         bool includeSecs = false) const;
# 485 "klocale.h"
  double readMoney(const QString &numStr, bool * ok = 0) const;
# 495 "klocale.h"
  double readNumber(const QString &numStr, bool * ok = 0) const;
# 506 "klocale.h"
  QDate readDate(const QString &str, bool* ok = 0) const;





  QDate readDate( const QString &intstr, const QString &fmt, bool* ok = 0) const;
# 523 "klocale.h"
  QTime readTime(const QString &str, bool* ok = 0) const;
# 532 "klocale.h"
  QString language() const;







  QString country() const;







  QString languages() const;
# 564 "klocale.h"
  QStringList languagesTwoAlpha() const;
# 574 "klocale.h"
  QStringList languageList() const;
# 587 "klocale.h"
  QString charset() const;
# 598 "klocale.h"
  const char * encoding() const;
# 608 "klocale.h"
  int encodingMib() const;
# 617 "klocale.h"
  QTextCodec * codecForEncoding() const;






  void setDateFormat(const QString & format);





  void setDateFormatShort(const QString & format);





  void setTimeFormat(const QString & format);
# 647 "klocale.h"
  void setWeekStartsMonday(bool start);





  void setWeekStartDay(int day);





  QString dateFormat() const;





  QString dateFormatShort() const;





  QString timeFormat() const;






  void setDecimalSymbol(const QString & symbol);





  void setThousandsSeparator(const QString & separator);






  void setPositiveSign(const QString & sign);





  void setNegativeSign(const QString & sign);





  void setPositiveMonetarySignPosition(SignPosition signpos);





  void setNegativeMonetarySignPosition(SignPosition signpos);







  void setPositivePrefixCurrencySymbol(bool prefix);







  void setNegativePrefixCurrencySymbol(bool prefix);





  void setFracDigits(int digits);





  void setMonetaryThousandsSeparator(const QString & separator);






  void setMonetaryDecimalSymbol(const QString & symbol);





  void setCurrencySymbol(const QString & symbol);






  int pageSize() const;






  void setPageSize(int paperFormat);





  enum MeasureSystem { Metric, Imperial };






  MeasureSystem measureSystem() const;






  void setMeasureSystem(MeasureSystem value);
# 796 "klocale.h"
  void insertCatalogue(const QString& catalogue);

  void removeCatalogue(const QString &catalogue);

  void setActiveCatalogue(const QString &catalogue);






  QString translateQt(const char *context,
                      const char *sourceText,
                      const char *message) const;
# 820 "klocale.h"
  static void splitLocale(const QString & str,
                          QString & language,
                          QString & country,
                          QString & charset);
# 834 "klocale.h"
  static void setMainCatalogue(const char *catalogue);







  static QString langLookup(const QString &fname, const char *rtype = "html");






  static QString defaultLanguage();






  static QString defaultCountry();




  static QString _initLanguage(KConfigBase *config);

protected:




  static void initInstance();

private:






  void initFormat(KConfig *config);
# 886 "klocale.h"
  void initLanguage(KConfig * config, bool useEnv);






  void initEncoding(KConfig * config);






  void initCatalogue(const QString & catalogue);





  void initFileNameEncoding(KConfig *config);




  static QCString encodeFileNameUTF8( const QString & fileName );




  static QString decodeFileNameUTF8( const QCString & localFileName );




  QTime readTime(const QString &str, bool seconds, bool *ok) const;




  QDate readDate(const QString &str, bool shortFormat, bool *ok) const;





  void initCatalogue( KCatalogue & catalogue );




  void doBindInit();




  void doFormatInit() const;




  void initFormat();




  QString translate_priv(const char *index,
                         const char *text,
                         const char ** original = 0) const;




  bool useDefaultLanguage() const;




  bool isLanguageInstalled(const QString & language) const;





  static QString catalogueFileName(const QString & language,
                                   const KCatalogue & catalogue);

private:

  QString m_decimalSymbol;
  QString m_thousandsSeparator;
  QString m_currencySymbol;
  QString m_monetaryDecimalSymbol;
  QString m_monetaryThousandsSeparator;
  QString m_positiveSign;
  QString m_negativeSign;
  int m_fracDigits;
  SignPosition m_positiveMonetarySignPosition;
  SignPosition m_negativeMonetarySignPosition;


  QString m_timeFormat;
  QString m_dateFormat;
  QString m_dateFormatShort;

  QString m_language;
  QString m_country;

  bool m_weekStartsMonday;
  bool m_positivePrefixCurrencySymbol;
  bool m_negativePrefixCurrencySymbol;

  KLocalePrivate *d;
};
# 14 "kkeyserver_x11.cpp" 2



# 1 "/usr/X11R6/include/X11/X.h" 1
# 67 "/usr/X11R6/include/X11/X.h"
typedef unsigned long XID;



typedef unsigned long Mask;



typedef unsigned long Atom;

typedef unsigned long VisualID;
typedef unsigned long Time;
# 97 "/usr/X11R6/include/X11/X.h"
typedef XID Window;
typedef XID Drawable;


typedef XID Font;

typedef XID Pixmap;
typedef XID Cursor;
typedef XID Colormap;
typedef XID GContext;
typedef XID KeySym;

typedef unsigned char KeyCode;
# 18 "kkeyserver_x11.cpp" 2
# 1 "/usr/X11R6/include/X11/Xlib.h" 1
# 47 "/usr/X11R6/include/X11/Xlib.h"
# 1 "/usr/include/sys/types.h" 1 3
# 28 "/usr/include/sys/types.h" 3
extern "C" {





typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;




typedef __loff_t loff_t;



typedef __ino_t ino_t;






typedef __ino64_t ino64_t;




typedef __dev_t dev_t;




typedef __gid_t gid_t;




typedef __mode_t mode_t;




typedef __nlink_t nlink_t;




typedef __uid_t uid_t;





typedef __off_t off_t;






typedef __off64_t off64_t;




typedef __pid_t pid_t;




typedef __id_t id_t;




typedef __ssize_t ssize_t;





typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;





typedef __key_t key_t;
# 132 "/usr/include/sys/types.h" 3
# 1 "/usr/include/time.h" 1 3
# 59 "/usr/include/time.h" 3
typedef __clock_t clock_t;
# 70 "/usr/include/time.h" 3
typedef __time_t time_t;
# 82 "/usr/include/time.h" 3
typedef __clockid_t clockid_t;
# 94 "/usr/include/time.h" 3
typedef __timer_t timer_t;
# 133 "/usr/include/sys/types.h" 2 3



typedef __useconds_t useconds_t;



typedef __suseconds_t suseconds_t;





# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3
# 147 "/usr/include/sys/types.h" 2 3



typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 190 "/usr/include/sys/types.h" 3
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));


typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));

typedef int register_t __attribute__ ((__mode__ (__word__)));
# 212 "/usr/include/sys/types.h" 3
# 1 "/usr/include/endian.h" 1 3
# 37 "/usr/include/endian.h" 3
# 1 "/usr/include/bits/endian.h" 1 3
# 38 "/usr/include/endian.h" 2 3
# 213 "/usr/include/sys/types.h" 2 3


# 1 "/usr/include/sys/select.h" 1 3
# 31 "/usr/include/sys/select.h" 3
# 1 "/usr/include/bits/select.h" 1 3
# 32 "/usr/include/sys/select.h" 2 3


# 1 "/usr/include/bits/sigset.h" 1 3
# 23 "/usr/include/bits/sigset.h" 3
typedef int __sig_atomic_t;




typedef struct
  {
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
  } __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3



typedef __sigset_t sigset_t;





# 1 "/usr/include/time.h" 1 3
# 106 "/usr/include/time.h" 3
struct timespec
  {
    __time_t tv_sec;
    long int tv_nsec;
  };
# 45 "/usr/include/sys/select.h" 2 3

# 1 "/usr/include/bits/time.h" 1 3
# 67 "/usr/include/bits/time.h" 3
struct timeval
  {
    __time_t tv_sec;
    __suseconds_t tv_usec;
  };
# 47 "/usr/include/sys/select.h" 2 3
# 55 "/usr/include/sys/select.h" 3
typedef long int __fd_mask;







typedef struct
  {



    __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];





  } fd_set;






typedef __fd_mask fd_mask;
# 95 "/usr/include/sys/select.h" 3
extern "C" {






extern int select (int __nfds, fd_set *__restrict __readfds,
                   fd_set *__restrict __writefds,
                   fd_set *__restrict __exceptfds,
                   struct timeval *__restrict __timeout) throw ();





extern int pselect (int __nfds, fd_set *__restrict __readfds,
                    fd_set *__restrict __writefds,
                    fd_set *__restrict __exceptfds,
                    const struct timespec *__restrict __timeout,
                    const __sigset_t *__restrict __sigmask) throw ();


}
# 216 "/usr/include/sys/types.h" 2 3


# 1 "/usr/include/sys/sysmacros.h" 1 3
# 219 "/usr/include/sys/types.h" 2 3




typedef __blksize_t blksize_t;






typedef __blkcnt_t blkcnt_t;



typedef __fsblkcnt_t fsblkcnt_t;



typedef __fsfilcnt_t fsfilcnt_t;
# 257 "/usr/include/sys/types.h" 3
typedef __blkcnt64_t blkcnt64_t;
typedef __fsblkcnt64_t fsblkcnt64_t;
typedef __fsfilcnt64_t fsfilcnt64_t;


}
# 48 "/usr/X11R6/include/X11/Xlib.h" 2






# 1 "/usr/X11R6/include/X11/Xfuncproto.h" 1
# 55 "/usr/X11R6/include/X11/Xlib.h" 2
# 1 "/usr/X11R6/include/X11/Xosdefs.h" 1
# 56 "/usr/X11R6/include/X11/Xlib.h" 2
# 68 "/usr/X11R6/include/X11/Xlib.h"
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3
# 147 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 3
typedef int ptrdiff_t;
# 69 "/usr/X11R6/include/X11/Xlib.h" 2
# 90 "/usr/X11R6/include/X11/Xlib.h"
typedef char *XPointer;
# 162 "/usr/X11R6/include/X11/Xlib.h"
typedef struct _XExtData {
        int number;
        struct _XExtData *next;
        int (*free_private)(

        struct _XExtData *extension

        );
        XPointer private_data;
} XExtData;




typedef struct {
        int extension;
        int major_opcode;
        int first_event;
        int first_error;
} XExtCodes;





typedef struct {
    int depth;
    int bits_per_pixel;
    int scanline_pad;
} XPixmapFormatValues;





typedef struct {
        int function;
        unsigned long plane_mask;
        unsigned long foreground;
        unsigned long background;
        int line_width;
        int line_style;
        int cap_style;

        int join_style;
        int fill_style;

        int fill_rule;
        int arc_mode;
        Pixmap tile;
        Pixmap stipple;
        int ts_x_origin;
        int ts_y_origin;
        Font font;
        int subwindow_mode;
        int graphics_exposures;
        int clip_x_origin;
        int clip_y_origin;
        Pixmap clip_mask;
        int dash_offset;
        char dashes;
} XGCValues;






typedef struct _XGC







*GC;




typedef struct {
        XExtData *ext_data;
        VisualID visualid;

        int c_class;



        unsigned long red_mask, green_mask, blue_mask;
        int bits_per_rgb;
        int map_entries;
} Visual;




typedef struct {
        int depth;
        int nvisuals;
        Visual *visuals;
} Depth;







struct _XDisplay;

typedef struct {
        XExtData *ext_data;
        struct _XDisplay *display;
        Window root;
        int width, height;
        int mwidth, mheight;
        int ndepths;
        Depth *depths;
        int root_depth;
        Visual *root_visual;
        GC default_gc;
        Colormap cmap;
        unsigned long white_pixel;
        unsigned long black_pixel;
        int max_maps, min_maps;
        int backing_store;
        int save_unders;
        long root_input_mask;
} Screen;




typedef struct {
        XExtData *ext_data;
        int depth;
        int bits_per_pixel;
        int scanline_pad;
} ScreenFormat;




typedef struct {
    Pixmap background_pixmap;
    unsigned long background_pixel;
    Pixmap border_pixmap;
    unsigned long border_pixel;
    int bit_gravity;
    int win_gravity;
    int backing_store;
    unsigned long backing_planes;
    unsigned long backing_pixel;
    int save_under;
    long event_mask;
    long do_not_propagate_mask;
    int override_redirect;
    Colormap colormap;
    Cursor cursor;
} XSetWindowAttributes;

typedef struct {
    int x, y;
    int width, height;
    int border_width;
    int depth;
    Visual *visual;
    Window root;

    int c_class;



    int bit_gravity;
    int win_gravity;
    int backing_store;
    unsigned long backing_planes;
    unsigned long backing_pixel;
    int save_under;
    Colormap colormap;
    int map_installed;
    int map_state;
    long all_event_masks;
    long your_event_mask;
    long do_not_propagate_mask;
    int override_redirect;
    Screen *screen;
} XWindowAttributes;






typedef struct {
        int family;
        int length;
        char *address;
} XHostAddress;




typedef struct _XImage {
    int width, height;
    int xoffset;
    int format;
    char *data;
    int byte_order;
    int bitmap_unit;
    int bitmap_bit_order;
    int bitmap_pad;
    int depth;
    int bytes_per_line;
    int bits_per_pixel;
    unsigned long red_mask;
    unsigned long green_mask;
    unsigned long blue_mask;
    XPointer obdata;
    struct funcs {

        struct _XImage *(*create_image)(
                struct _XDisplay* ,
                Visual* ,
                unsigned int ,
                int ,
                int ,
                char* ,
                unsigned int ,
                unsigned int ,
                int ,
                int );
        int (*destroy_image) (struct _XImage *);
        unsigned long (*get_pixel) (struct _XImage *, int, int);
        int (*put_pixel) (struct _XImage *, int, int, unsigned long);
        struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
        int (*add_pixel) (struct _XImage *, long);
# 408 "/usr/X11R6/include/X11/Xlib.h"
        } f;
} XImage;




typedef struct {
    int x, y;
    int width, height;
    int border_width;
    Window sibling;
    int stack_mode;
} XWindowChanges;




typedef struct {
        unsigned long pixel;
        unsigned short red, green, blue;
        char flags;
        char pad;
} XColor;






typedef struct {
    short x1, y1, x2, y2;
} XSegment;

typedef struct {
    short x, y;
} XPoint;

typedef struct {
    short x, y;
    unsigned short width, height;
} XRectangle;

typedef struct {
    short x, y;
    unsigned short width, height;
    short angle1, angle2;
} XArc;




typedef struct {
        int key_click_percent;
        int bell_percent;
        int bell_pitch;
        int bell_duration;
        int led;
        int led_mode;
        int key;
        int auto_repeat_mode;
} XKeyboardControl;



typedef struct {
        int key_click_percent;
        int bell_percent;
        unsigned int bell_pitch, bell_duration;
        unsigned long led_mask;
        int global_auto_repeat;
        char auto_repeats[32];
} XKeyboardState;



typedef struct {
        Time time;
        short x, y;
} XTimeCoord;



typedef struct {
        int max_keypermod;
        KeyCode *modifiermap;
} XModifierKeymap;
# 502 "/usr/X11R6/include/X11/Xlib.h"
typedef struct _XDisplay Display;


struct _XPrivate;
struct _XrmHashBucketRec;

typedef struct



{
        XExtData *ext_data;
        struct _XPrivate *private1;
        int fd;
        int private2;
        int proto_major_version;
        int proto_minor_version;
        char *vendor;
        XID private3;
        XID private4;
        XID private5;
        int private6;
        XID (*resource_alloc)(

                struct _XDisplay*

        );
        int byte_order;
        int bitmap_unit;
        int bitmap_pad;
        int bitmap_bit_order;
        int nformats;
        ScreenFormat *pixmap_format;
        int private8;
        int release;
        struct _XPrivate *private9, *private10;
        int qlen;
        unsigned long last_request_read;
        unsigned long request;
        XPointer private11;
        XPointer private12;
        XPointer private13;
        XPointer private14;
        unsigned max_request_size;
        struct _XrmHashBucketRec *db;
        int (*private15)(

                struct _XDisplay*

                );
        char *display_name;
        int default_screen;
        int nscreens;
        Screen *screens;
        unsigned long motion_buffer;
        unsigned long private16;
        int min_keycode;
        int max_keycode;
        XPointer private17;
        XPointer private18;
        int private19;
        char *xdefaults;

}



*_XPrivDisplay;
# 578 "/usr/X11R6/include/X11/Xlib.h"
typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        Window root;
        Window subwindow;
        Time time;
        int x, y;
        int x_root, y_root;
        unsigned int state;
        unsigned int keycode;
        int same_screen;
} XKeyEvent;
typedef XKeyEvent XKeyPressedEvent;
typedef XKeyEvent XKeyReleasedEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        Window root;
        Window subwindow;
        Time time;
        int x, y;
        int x_root, y_root;
        unsigned int state;
        unsigned int button;
        int same_screen;
} XButtonEvent;
typedef XButtonEvent XButtonPressedEvent;
typedef XButtonEvent XButtonReleasedEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        Window root;
        Window subwindow;
        Time time;
        int x, y;
        int x_root, y_root;
        unsigned int state;
        char is_hint;
        int same_screen;
} XMotionEvent;
typedef XMotionEvent XPointerMovedEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        Window root;
        Window subwindow;
        Time time;
        int x, y;
        int x_root, y_root;
        int mode;
        int detail;




        int same_screen;
        int focus;
        unsigned int state;
} XCrossingEvent;
typedef XCrossingEvent XEnterWindowEvent;
typedef XCrossingEvent XLeaveWindowEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        int mode;
        int detail;





} XFocusChangeEvent;
typedef XFocusChangeEvent XFocusInEvent;
typedef XFocusChangeEvent XFocusOutEvent;


typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        char key_vector[32];
} XKeymapEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        int x, y;
        int width, height;
        int count;
} XExposeEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Drawable drawable;
        int x, y;
        int width, height;
        int count;
        int major_code;
        int minor_code;
} XGraphicsExposeEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Drawable drawable;
        int major_code;
        int minor_code;
} XNoExposeEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        int state;
} XVisibilityEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window parent;
        Window window;
        int x, y;
        int width, height;
        int border_width;
        int override_redirect;
} XCreateWindowEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window event;
        Window window;
} XDestroyWindowEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window event;
        Window window;
        int from_configure;
} XUnmapEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window event;
        Window window;
        int override_redirect;
} XMapEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window parent;
        Window window;
} XMapRequestEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window event;
        Window window;
        Window parent;
        int x, y;
        int override_redirect;
} XReparentEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window event;
        Window window;
        int x, y;
        int width, height;
        int border_width;
        Window above;
        int override_redirect;
} XConfigureEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window event;
        Window window;
        int x, y;
} XGravityEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        int width, height;
} XResizeRequestEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window parent;
        Window window;
        int x, y;
        int width, height;
        int border_width;
        Window above;
        int detail;
        unsigned long value_mask;
} XConfigureRequestEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window event;
        Window window;
        int place;
} XCirculateEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window parent;
        Window window;
        int place;
} XCirculateRequestEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        Atom atom;
        Time time;
        int state;
} XPropertyEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        Atom selection;
        Time time;
} XSelectionClearEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window owner;
        Window requestor;
        Atom selection;
        Atom target;
        Atom property;
        Time time;
} XSelectionRequestEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window requestor;
        Atom selection;
        Atom target;
        Atom property;
        Time time;
} XSelectionEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        Colormap colormap;

        int c_new;



        int state;
} XColormapEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        Atom message_type;
        int format;
        union {
                char b[20];
                short s[10];
                long l[5];
                } data;
} XClientMessageEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
        int request;

        int first_keycode;
        int count;
} XMappingEvent;

typedef struct {
        int type;
        Display *display;
        XID resourceid;
        unsigned long serial;
        unsigned char error_code;
        unsigned char request_code;
        unsigned char minor_code;
} XErrorEvent;

typedef struct {
        int type;
        unsigned long serial;
        int send_event;
        Display *display;
        Window window;
} XAnyEvent;





typedef union _XEvent {
        int type;
        XAnyEvent xany;
        XKeyEvent xkey;
        XButtonEvent xbutton;
        XMotionEvent xmotion;
        XCrossingEvent xcrossing;
        XFocusChangeEvent xfocus;
        XExposeEvent xexpose;
        XGraphicsExposeEvent xgraphicsexpose;
        XNoExposeEvent xnoexpose;
        XVisibilityEvent xvisibility;
        XCreateWindowEvent xcreatewindow;
        XDestroyWindowEvent xdestroywindow;
        XUnmapEvent xunmap;
        XMapEvent xmap;
        XMapRequestEvent xmaprequest;
        XReparentEvent xreparent;
        XConfigureEvent xconfigure;
        XGravityEvent xgravity;
        XResizeRequestEvent xresizerequest;
        XConfigureRequestEvent xconfigurerequest;
        XCirculateEvent xcirculate;
        XCirculateRequestEvent xcirculaterequest;
        XPropertyEvent xproperty;
        XSelectionClearEvent xselectionclear;
        XSelectionRequestEvent xselectionrequest;
        XSelectionEvent xselection;
        XColormapEvent xcolormap;
        XClientMessageEvent xclient;
        XMappingEvent xmapping;
        XErrorEvent xerror;
        XKeymapEvent xkeymap;
        long pad[24];
} XEvent;







typedef struct {
    short lbearing;
    short rbearing;
    short width;
    short ascent;
    short descent;
    unsigned short attributes;
} XCharStruct;





typedef struct {
    Atom name;
    unsigned long card32;
} XFontProp;

typedef struct {
    XExtData *ext_data;
    Font fid;
    unsigned direction;
    unsigned min_char_or_byte2;
    unsigned max_char_or_byte2;
    unsigned min_byte1;
    unsigned max_byte1;
    int all_chars_exist;
    unsigned default_char;
    int n_properties;
    XFontProp *properties;
    XCharStruct min_bounds;
    XCharStruct max_bounds;
    XCharStruct *per_char;
    int ascent;
    int descent;
} XFontStruct;




typedef struct {
    char *chars;
    int nchars;
    int delta;
    Font font;
} XTextItem;

typedef struct {
    unsigned char byte1;
    unsigned char byte2;
} XChar2b;

typedef struct {
    XChar2b *chars;
    int nchars;
    int delta;
    Font font;
} XTextItem16;


typedef union { Display *display;
                GC gc;
                Visual *visual;
                Screen *screen;
                ScreenFormat *pixmap_format;
                XFontStruct *font; } XEDataObject;

typedef struct {
    XRectangle max_ink_extent;
    XRectangle max_logical_extent;
} XFontSetExtents;





typedef struct _XOM *XOM;
typedef struct _XOC *XOC, *XFontSet;

typedef struct {
    char *chars;
    int nchars;
    int delta;
    XFontSet font_set;
} XmbTextItem;

typedef struct {
    wchar_t *chars;
    int nchars;
    int delta;
    XFontSet font_set;
} XwcTextItem;
# 1112 "/usr/X11R6/include/X11/Xlib.h"
typedef struct {
    int charset_count;
    char **charset_list;
} XOMCharSetList;

typedef enum {
    XOMOrientation_LTR_TTB,
    XOMOrientation_RTL_TTB,
    XOMOrientation_TTB_LTR,
    XOMOrientation_TTB_RTL,
    XOMOrientation_Context
} XOrientation;

typedef struct {
    int num_orientation;
    XOrientation *orientation;
} XOMOrientation;

typedef struct {
    int num_font;
    XFontStruct **font_struct_list;
    char **font_name_list;
} XOMFontInfo;

typedef struct _XIM *XIM;
typedef struct _XIC *XIC;

typedef void (*XIMProc)(

    XIM,
    XPointer,
    XPointer

);

typedef int (*XICProc)(

    XIC,
    XPointer,
    XPointer

);

typedef void (*XIDProc)(

    Display*,
    XPointer,
    XPointer

);

typedef unsigned long XIMStyle;

typedef struct {
    unsigned short count_styles;
    XIMStyle *supported_styles;
} XIMStyles;
# 1231 "/usr/X11R6/include/X11/Xlib.h"
typedef void *XVaNestedList;




typedef struct {
    XPointer client_data;
    XIMProc callback;
} XIMCallback;

typedef struct {
    XPointer client_data;
    XICProc callback;
} XICCallback;

typedef unsigned long XIMFeedback;
# 1258 "/usr/X11R6/include/X11/Xlib.h"
typedef struct _XIMText {
    unsigned short length;
    XIMFeedback *feedback;
    int encoding_is_wchar;
    union {
        char *multi_byte;
        wchar_t *wide_char;
    } string;
} XIMText;

typedef unsigned long XIMPreeditState;





typedef struct _XIMPreeditStateNotifyCallbackStruct {
    XIMPreeditState state;
} XIMPreeditStateNotifyCallbackStruct;

typedef unsigned long XIMResetState;




typedef unsigned long XIMStringConversionFeedback;
# 1292 "/usr/X11R6/include/X11/Xlib.h"
typedef struct _XIMStringConversionText {
    unsigned short length;
    XIMStringConversionFeedback *feedback;
    int encoding_is_wchar;
    union {
        char *mbs;
        wchar_t *wcs;
    } string;
} XIMStringConversionText;

typedef unsigned short XIMStringConversionPosition;

typedef unsigned short XIMStringConversionType;






typedef unsigned short XIMStringConversionOperation;




typedef enum {
    XIMForwardChar, XIMBackwardChar,
    XIMForwardWord, XIMBackwardWord,
    XIMCaretUp, XIMCaretDown,
    XIMNextLine, XIMPreviousLine,
    XIMLineStart, XIMLineEnd,
    XIMAbsolutePosition,
    XIMDontChange
} XIMCaretDirection;

typedef struct _XIMStringConversionCallbackStruct {
    XIMStringConversionPosition position;
    XIMCaretDirection direction;
    XIMStringConversionOperation operation;
    unsigned short factor;
    XIMStringConversionText *text;
} XIMStringConversionCallbackStruct;

typedef struct _XIMPreeditDrawCallbackStruct {
    int caret;
    int chg_first;
    int chg_length;
    XIMText *text;
} XIMPreeditDrawCallbackStruct;

typedef enum {
    XIMIsInvisible,
    XIMIsPrimary,
    XIMIsSecondary
} XIMCaretStyle;

typedef struct _XIMPreeditCaretCallbackStruct {
    int position;
    XIMCaretDirection direction;
    XIMCaretStyle style;
} XIMPreeditCaretCallbackStruct;

typedef enum {
    XIMTextType,
    XIMBitmapType
} XIMStatusDataType;

typedef struct _XIMStatusDrawCallbackStruct {
    XIMStatusDataType type;
    union {
        XIMText *text;
        Pixmap bitmap;
    } data;
} XIMStatusDrawCallbackStruct;

typedef struct _XIMHotKeyTrigger {
    KeySym keysym;
    int modifier;
    int modifier_mask;
} XIMHotKeyTrigger;

typedef struct _XIMHotKeyTriggers {
    int num_hot_key;
    XIMHotKeyTrigger *key;
} XIMHotKeyTriggers;

typedef unsigned long XIMHotKeyState;




typedef struct {
    unsigned short count_values;
    char **supported_values;
} XIMValuesList;

extern "C" {





extern int _Xdebug;

extern XFontStruct *XLoadQueryFont(

    Display* ,
    const char*

);

extern XFontStruct *XQueryFont(

    Display* ,
    XID

);


extern XTimeCoord *XGetMotionEvents(

    Display* ,
    Window ,
    Time ,
    Time ,
    int*

);

extern XModifierKeymap *XDeleteModifiermapEntry(

    XModifierKeymap* ,

    unsigned int ,



    int

);

extern XModifierKeymap *XGetModifierMapping(

    Display*

);

extern XModifierKeymap *XInsertModifiermapEntry(

    XModifierKeymap* ,

    unsigned int ,



    int

);

extern XModifierKeymap *XNewModifiermap(

    int

);

extern XImage *XCreateImage(

    Display* ,
    Visual* ,
    unsigned int ,
    int ,
    int ,
    char* ,
    unsigned int ,
    unsigned int ,
    int ,
    int

);
extern int XInitImage(

    XImage*

);
extern XImage *XGetImage(

    Display* ,
    Drawable ,
    int ,
    int ,
    unsigned int ,
    unsigned int ,
    unsigned long ,
    int

);
extern XImage *XGetSubImage(

    Display* ,
    Drawable ,
    int ,
    int ,
    unsigned int ,
    unsigned int ,
    unsigned long ,
    int ,
    XImage* ,
    int ,
    int

);




extern Display *XOpenDisplay(

    const char*

);

extern void XrmInitialize(

    void

);

extern char *XFetchBytes(

    Display* ,
    int*

);
extern char *XFetchBuffer(

    Display* ,
    int* ,
    int

);
extern char *XGetAtomName(

    Display* ,
    Atom

);
extern int XGetAtomNames(

    Display* ,
    Atom* ,
    int ,
    char**

);
extern char *XGetDefault(

    Display* ,
    const char* ,
    const char*

);
extern char *XDisplayName(

    const char*

);
extern char *XKeysymToString(

    KeySym

);

extern int (*XSynchronize(

    Display* ,
    int

))(

    Display*

);
extern int (*XSetAfterFunction(

    Display* ,
    int (*) (

             Display*

            )

))(

    Display*

);
extern Atom XInternAtom(

    Display* ,
    const char* ,
    int

);
extern int XInternAtoms(

    Display* ,
    char** ,
    int ,
    int ,
    Atom*

);
extern Colormap XCopyColormapAndFree(

    Display* ,
    Colormap

);
extern Colormap XCreateColormap(

    Display* ,
    Window ,
    Visual* ,
    int

);
extern Cursor XCreatePixmapCursor(

    Display* ,
    Pixmap ,
    Pixmap ,
    XColor* ,
    XColor* ,
    unsigned int ,
    unsigned int

);
extern Cursor XCreateGlyphCursor(

    Display* ,
    Font ,
    Font ,
    unsigned int ,
    unsigned int ,
    XColor const * ,
    XColor const *

);
extern Cursor XCreateFontCursor(

    Display* ,
    unsigned int

);
extern Font XLoadFont(

    Display* ,
    const char*

);
extern GC XCreateGC(

    Display* ,
    Drawable ,
    unsigned long ,
    XGCValues*

);
extern GContext XGContextFromGC(

    GC

);
extern void XFlushGC(

    Display* ,
    GC

);
extern Pixmap XCreatePixmap(

    Display* ,
    Drawable ,
    unsigned int ,
    unsigned int ,
    unsigned int

);
extern Pixmap XCreateBitmapFromData(

    Display* ,
    Drawable ,
    const char* ,
    unsigned int ,
    unsigned int

);
extern Pixmap XCreatePixmapFromBitmapData(

    Display* ,
    Drawable ,
    char* ,
    unsigned int ,
    unsigned int ,
    unsigned long ,
    unsigned long ,
    unsigned int

);
extern Window XCreateSimpleWindow(

    Display* ,
    Window ,
    int ,
    int ,
    unsigned int ,
    unsigned int ,
    unsigned int ,
    unsigned long ,
    unsigned long

);
extern Window XGetSelectionOwner(

    Display* ,
    Atom

);
extern Window XCreateWindow(

    Display* ,
    Window ,
    int ,
    int ,
    unsigned int ,
    unsigned int ,
    unsigned int ,
    int ,
    unsigned int ,
    Visual* ,
    unsigned long ,
    XSetWindowAttributes*

);
extern Colormap *XListInstalledColormaps(

    Display* ,
    Window ,
    int*

);
extern char **XListFonts(

    Display* ,
    const char* ,
    int ,
    int*

);
extern char **XListFontsWithInfo(

    Display* ,
    const char* ,
    int ,
    int* ,
    XFontStruct**

);
extern char **XGetFontPath(

    Display* ,
    int*

);
extern char **XListExtensions(

    Display* ,
    int*

);
extern Atom *XListProperties(

    Display* ,
    Window ,
    int*

);
extern XHostAddress *XListHosts(

    Display* ,
    int* ,
    int*

);
extern KeySym XKeycodeToKeysym(

    Display* ,

    unsigned int ,



    int

);
extern KeySym XLookupKeysym(

    XKeyEvent* ,
    int

);
extern KeySym *XGetKeyboardMapping(

    Display* ,

    unsigned int ,



    int ,
    int*

);
extern KeySym XStringToKeysym(

    const char*

);
extern long XMaxRequestSize(

    Display*

);
extern long XExtendedMaxRequestSize(

    Display*

);
extern char *XResourceManagerString(

    Display*

);
extern char *XScreenResourceString(

        Screen*

);
extern unsigned long XDisplayMotionBufferSize(

    Display*

);
extern VisualID XVisualIDFromVisual(

    Visual*

);



extern int XInitThreads(

    void

);

extern void XLockDisplay(

    Display*

);

extern void XUnlockDisplay(

    Display*

);



extern XExtCodes *XInitExtension(

    Display* ,
    const char*

);

extern XExtCodes *XAddExtension(

    Display*

);
extern XExtData *XFindOnExtensionList(

    XExtData** ,
    int

);
extern XExtData **XEHeadOfExtensionList(

    XEDataObject

);


extern Window XRootWindow(

    Display* ,
    int

);
extern Window XDefaultRootWindow(

    Display*

);
extern Window XRootWindowOfScreen(

    Screen*

);
extern Visual *XDefaultVisual(

    Display* ,
    int

);
extern Visual *XDefaultVisualOfScreen(

    Screen*

);
extern GC XDefaultGC(

    Display* ,
    int

);
extern GC XDefaultGCOfScreen(

    Screen*

);
extern unsigned long XBlackPixel(

    Display* ,
    int

);
extern unsigned long XWhitePixel(

    Display* ,
    int

);
extern unsigned long XAllPlanes(

    void

);
extern unsigned long XBlackPixelOfScreen(

    Screen*

);
extern unsigned long XWhitePixelOfScreen(

    Screen*

);
extern unsigned long XNextRequest(

    Display*

);
extern unsigned long XLastKnownRequestProcessed(

    Display*

);
extern char *XServerVendor(

    Display*

);
extern char *XDisplayString(

    Display*

);
extern Colormap XDefaultColormap(

    Display* ,
    int

);
extern Colormap XDefaultColormapOfScreen(

    Screen*

);
extern Display *XDisplayOfScreen(

    Screen*

);
extern Screen *XScreenOfDisplay(

    Display* ,
    int

);
extern Screen *XDefaultScreenOfDisplay(

    Display*

);
extern long XEventMaskOfScreen(

    Screen*

);

extern int XScreenNumberOfScreen(

    Screen*

);

typedef int (*XErrorHandler) (

    Display* ,
    XErrorEvent*

);

extern XErrorHandler XSetErrorHandler (

    XErrorHandler

);


typedef int (*XIOErrorHandler) (

    Display*

);

extern XIOErrorHandler XSetIOErrorHandler (

    XIOErrorHandler

);


extern XPixmapFormatValues *XListPixmapFormats(

    Display* ,
    int*

);
extern int *XListDepths(

    Display* ,
    int ,
    int*

);



extern int XReconfigureWMWindow(

    Display* ,
    Window ,
    int ,
    unsigned int ,
    XWindowChanges*

);

extern int XGetWMProtocols(

    Display* ,
    Window ,
    Atom** ,
    int*

);
extern int XSetWMProtocols(

    Display* ,
    Window ,
    Atom* ,
    int

);
extern int XIconifyWindow(

    Display* ,
    Window ,
    int

);
extern int XWithdrawWindow(

    Display* ,
    Window ,
    int

);
extern int XGetCommand(

    Display* ,
    Window ,
    char*** ,
    int*

);
extern int XGetWMColormapWindows(

    Display* ,
    Window ,
    Window** ,
    int*

);
extern int XSetWMColormapWindows(

    Display* ,
    Window ,
    Window* ,
    int

);
extern void XFreeStringList(

    char**

);
extern int XSetTransientForHint(

    Display* ,
    Window ,
    Window

);



extern int XActivateScreenSaver(

    Display*

);

extern int XAddHost(

    Display* ,
    XHostAddress*

);

extern int XAddHosts(

    Display* ,
    XHostAddress* ,
    int

);

extern int XAddToExtensionList(

    struct _XExtData** ,
    XExtData*

);

extern int XAddToSaveSet(

    Display* ,
    Window

);

extern int XAllocColor(

    Display* ,
    Colormap ,
    XColor*

);

extern int XAllocColorCells(

    Display* ,
    Colormap ,
    int ,
    unsigned long* ,
    unsigned int ,
    unsigned long* ,
    unsigned int

);

extern int XAllocColorPlanes(

    Display* ,
    Colormap ,
    int ,
    unsigned long* ,
    int ,
    int ,
    int ,
    int ,
    unsigned long* ,
    unsigned long* ,
    unsigned long*

);

extern int XAllocNamedColor(

    Display* ,
    Colormap ,
    const char* ,
    XColor* ,
    XColor*

);

extern int XAllowEvents(

    Display* ,
    int ,
    Time

);

extern int XAutoRepeatOff(

    Display*

);

extern int XAutoRepeatOn(

    Display*

);

extern int XBell(

    Display* ,
    int

);

extern int XBitmapBitOrder(

    Display*

);

extern int XBitmapPad(

    Display*

);

extern int XBitmapUnit(

    Display*

);

extern int XCellsOfScreen(

    Screen*

);

extern int XChangeActivePointerGrab(

    Display* ,
    unsigned int ,
    Cursor ,
    Time

);

extern int XChangeGC(

    Display* ,
    GC ,
    unsigned long ,
    XGCValues*

);

extern int XChangeKeyboardControl(

    Display* ,
    unsigned long ,
    XKeyboardControl*

);

extern int XChangeKeyboardMapping(

    Display* ,
    int ,
    int ,
    KeySym* ,
    int

);

extern int XChangePointerControl(

    Display* ,
    int ,
    int ,
    int ,
    int ,
    int

);

extern int XChangeProperty(

    Display* ,
    Window ,
    Atom ,
    Atom ,
    int ,
    int ,
    const unsigned char* ,
    int

);

extern int XChangeSaveSet(

    Display* ,
    Window ,
    int

);

extern int XChangeWindowAttributes(

    Display* ,
    Window ,
    unsigned long ,
    XSetWindowAttributes*

);

extern int XCheckIfEvent(

    Display* ,
    XEvent* ,
    int (*) (

               Display* ,
               XEvent* ,
               XPointer

             ) ,
    XPointer

);

extern int XCheckMaskEvent(

    Display* ,
    long ,
    XEvent*

);

extern int XCheckTypedEvent(

    Display* ,
    int ,
    XEvent*

);

extern int XCheckTypedWindowEvent(

    Display* ,
    Window ,
    int ,
    XEvent*

);

extern int XCheckWindowEvent(

    Display* ,
    Window ,
    long ,
    XEvent*

);

extern int XCirculateSubwindows(

    Display* ,
    Window ,
    int

);

extern int XCirculateSubwindowsDown(

    Display* ,
    Window

);

extern int XCirculateSubwindowsUp(

    Display* ,
    Window

);

extern int XClearArea(

    Display* ,
    Window ,
    int ,
    int ,
    unsigned int ,
    unsigned int ,
    int

);

extern int XClearWindow(

    Display* ,
    Window

);

extern int XCloseDisplay(

    Display*

);

extern int XConfigureWindow(

    Display* ,
    Window ,
    unsigned int ,
    XWindowChanges*

);

extern int XConnectionNumber(

    Display*

);

extern int XConvertSelection(

    Display* ,
    Atom ,
    Atom ,
    Atom ,
    Window ,
    Time

);

extern int XCopyArea(

    Display* ,
    Drawable ,
    Drawable ,
    GC ,
    int ,
    int ,
    unsigned int ,
    unsigned int ,
    int ,
    int

);

extern int XCopyGC(

    Display* ,
    GC ,
    unsigned long ,
    GC

);

extern int XCopyPlane(

    Display* ,
    Drawable ,
    Drawable ,
    GC ,
    int ,
    int ,
    unsigned int ,
    unsigned int ,
    int ,
    int ,
    unsigned long

);

extern int XDefaultDepth(

    Display* ,
    int

);

extern int XDefaultDepthOfScreen(

    Screen*

);

extern int XDefaultScreen(

    Display*

);

extern int XDefineCursor(

    Display* ,
    Window ,
    Cursor

);

extern int XDeleteProperty(

    Display* ,
    Window ,
    Atom

);

extern int XDestroyWindow(

    Display* ,
    Window

);

extern int XDestroySubwindows(

    Display* ,
    Window

);

extern int XDoesBackingStore(

    Screen*

);

extern int XDoesSaveUnders(

    Screen*

);

extern int XDisableAccessControl(

    Display*

);


extern int XDisplayCells(

    Display* ,
    int

);

extern int XDisplayHeight(

    Display* ,
    int

);

extern int XDisplayHeightMM(

    Display* ,
    int

);

extern int XDisplayKeycodes(

    Display* ,
    int* ,
    int*

);

extern int XDisplayPlanes(

    Display* ,
    int

);

extern int XDisplayWidth(

    Display* ,
    int

);

extern int XDisplayWidthMM(

    Display* ,
    int

);

extern int XDrawArc(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    unsigned int ,
    unsigned int ,
    int ,
    int

);

extern int XDrawArcs(

    Display* ,
    Drawable ,
    GC ,
    XArc* ,
    int

);

extern int XDrawImageString(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    const char* ,
    int

);

extern int XDrawImageString16(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    const XChar2b* ,
    int

);

extern int XDrawLine(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    int ,
    int

);

extern int XDrawLines(

    Display* ,
    Drawable ,
    GC ,
    XPoint* ,
    int ,
    int

);

extern int XDrawPoint(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int

);

extern int XDrawPoints(

    Display* ,
    Drawable ,
    GC ,
    XPoint* ,
    int ,
    int

);

extern int XDrawRectangle(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    unsigned int ,
    unsigned int

);

extern int XDrawRectangles(

    Display* ,
    Drawable ,
    GC ,
    XRectangle* ,
    int

);

extern int XDrawSegments(

    Display* ,
    Drawable ,
    GC ,
    XSegment* ,
    int

);

extern int XDrawString(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    const char* ,
    int

);

extern int XDrawString16(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    const XChar2b* ,
    int

);

extern int XDrawText(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    XTextItem* ,
    int

);

extern int XDrawText16(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    XTextItem16* ,
    int

);

extern int XEnableAccessControl(

    Display*

);

extern int XEventsQueued(

    Display* ,
    int

);

extern int XFetchName(

    Display* ,
    Window ,
    char**

);

extern int XFillArc(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    unsigned int ,
    unsigned int ,
    int ,
    int

);

extern int XFillArcs(

    Display* ,
    Drawable ,
    GC ,
    XArc* ,
    int

);

extern int XFillPolygon(

    Display* ,
    Drawable ,
    GC ,
    XPoint* ,
    int ,
    int ,
    int

);

extern int XFillRectangle(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    unsigned int ,
    unsigned int

);

extern int XFillRectangles(

    Display* ,
    Drawable ,
    GC ,
    XRectangle* ,
    int

);

extern int XFlush(

    Display*

);

extern int XForceScreenSaver(

    Display* ,
    int

);

extern int XFree(

    void*

);

extern int XFreeColormap(

    Display* ,
    Colormap

);

extern int XFreeColors(

    Display* ,
    Colormap ,
    unsigned long* ,
    int ,
    unsigned long

);

extern int XFreeCursor(

    Display* ,
    Cursor

);

extern int XFreeExtensionList(

    char**

);

extern int XFreeFont(

    Display* ,
    XFontStruct*

);

extern int XFreeFontInfo(

    char** ,
    XFontStruct* ,
    int

);

extern int XFreeFontNames(

    char**

);

extern int XFreeFontPath(

    char**

);

extern int XFreeGC(

    Display* ,
    GC

);

extern int XFreeModifiermap(

    XModifierKeymap*

);

extern int XFreePixmap(

    Display* ,
    Pixmap

);

extern int XGeometry(

    Display* ,
    int ,
    const char* ,
    const char* ,
    unsigned int ,
    unsigned int ,
    unsigned int ,
    int ,
    int ,
    int* ,
    int* ,
    int* ,
    int*

);

extern int XGetErrorDatabaseText(

    Display* ,
    const char* ,
    const char* ,
    const char* ,
    char* ,
    int

);

extern int XGetErrorText(

    Display* ,
    int ,
    char* ,
    int

);

extern int XGetFontProperty(

    XFontStruct* ,
    Atom ,
    unsigned long*

);

extern int XGetGCValues(

    Display* ,
    GC ,
    unsigned long ,
    XGCValues*

);

extern int XGetGeometry(

    Display* ,
    Drawable ,
    Window* ,
    int* ,
    int* ,
    unsigned int* ,
    unsigned int* ,
    unsigned int* ,
    unsigned int*

);

extern int XGetIconName(

    Display* ,
    Window ,
    char**

);

extern int XGetInputFocus(

    Display* ,
    Window* ,
    int*

);

extern int XGetKeyboardControl(

    Display* ,
    XKeyboardState*

);

extern int XGetPointerControl(

    Display* ,
    int* ,
    int* ,
    int*

);

extern int XGetPointerMapping(

    Display* ,
    unsigned char* ,
    int

);

extern int XGetScreenSaver(

    Display* ,
    int* ,
    int* ,
    int* ,
    int*

);

extern int XGetTransientForHint(

    Display* ,
    Window ,
    Window*

);

extern int XGetWindowProperty(

    Display* ,
    Window ,
    Atom ,
    long ,
    long ,
    int ,
    Atom ,
    Atom* ,
    int* ,
    unsigned long* ,
    unsigned long* ,
    unsigned char**

);

extern int XGetWindowAttributes(

    Display* ,
    Window ,
    XWindowAttributes*

);

extern int XGrabButton(

    Display* ,
    unsigned int ,
    unsigned int ,
    Window ,
    int ,
    unsigned int ,
    int ,
    int ,
    Window ,
    Cursor

);

extern int XGrabKey(

    Display* ,
    int ,
    unsigned int ,
    Window ,
    int ,
    int ,
    int

);

extern int XGrabKeyboard(

    Display* ,
    Window ,
    int ,
    int ,
    int ,
    Time

);

extern int XGrabPointer(

    Display* ,
    Window ,
    int ,
    unsigned int ,
    int ,
    int ,
    Window ,
    Cursor ,
    Time

);

extern int XGrabServer(

    Display*

);

extern int XHeightMMOfScreen(

    Screen*

);

extern int XHeightOfScreen(

    Screen*

);

extern int XIfEvent(

    Display* ,
    XEvent* ,
    int (*) (

               Display* ,
               XEvent* ,
               XPointer

             ) ,
    XPointer

);

extern int XImageByteOrder(

    Display*

);

extern int XInstallColormap(

    Display* ,
    Colormap

);

extern KeyCode XKeysymToKeycode(

    Display* ,
    KeySym

);

extern int XKillClient(

    Display* ,
    XID

);

extern int XLookupColor(

    Display* ,
    Colormap ,
    const char* ,
    XColor* ,
    XColor*

);

extern int XLowerWindow(

    Display* ,
    Window

);

extern int XMapRaised(

    Display* ,
    Window

);

extern int XMapSubwindows(

    Display* ,
    Window

);

extern int XMapWindow(

    Display* ,
    Window

);

extern int XMaskEvent(

    Display* ,
    long ,
    XEvent*

);

extern int XMaxCmapsOfScreen(

    Screen*

);

extern int XMinCmapsOfScreen(

    Screen*

);

extern int XMoveResizeWindow(

    Display* ,
    Window ,
    int ,
    int ,
    unsigned int ,
    unsigned int

);

extern int XMoveWindow(

    Display* ,
    Window ,
    int ,
    int

);

extern int XNextEvent(

    Display* ,
    XEvent*

);

extern int XNoOp(

    Display*

);

extern int XParseColor(

    Display* ,
    Colormap ,
    const char* ,
    XColor*

);

extern int XParseGeometry(

    const char* ,
    int* ,
    int* ,
    unsigned int* ,
    unsigned int*

);

extern int XPeekEvent(

    Display* ,
    XEvent*

);

extern int XPeekIfEvent(

    Display* ,
    XEvent* ,
    int (*) (

               Display* ,
               XEvent* ,
               XPointer

             ) ,
    XPointer

);

extern int XPending(

    Display*

);

extern int XPlanesOfScreen(

    Screen*


);

extern int XProtocolRevision(

    Display*

);

extern int XProtocolVersion(

    Display*

);


extern int XPutBackEvent(

    Display* ,
    XEvent*

);

extern int XPutImage(

    Display* ,
    Drawable ,
    GC ,
    XImage* ,
    int ,
    int ,
    int ,
    int ,
    unsigned int ,
    unsigned int

);

extern int XQLength(

    Display*

);

extern int XQueryBestCursor(

    Display* ,
    Drawable ,
    unsigned int ,
    unsigned int ,
    unsigned int* ,
    unsigned int*

);

extern int XQueryBestSize(

    Display* ,
    int ,
    Drawable ,
    unsigned int ,
    unsigned int ,
    unsigned int* ,
    unsigned int*

);

extern int XQueryBestStipple(

    Display* ,
    Drawable ,
    unsigned int ,
    unsigned int ,
    unsigned int* ,
    unsigned int*

);

extern int XQueryBestTile(

    Display* ,
    Drawable ,
    unsigned int ,
    unsigned int ,
    unsigned int* ,
    unsigned int*

);

extern int XQueryColor(

    Display* ,
    Colormap ,
    XColor*

);

extern int XQueryColors(

    Display* ,
    Colormap ,
    XColor* ,
    int

);

extern int XQueryExtension(

    Display* ,
    const char* ,
    int* ,
    int* ,
    int*

);

extern int XQueryKeymap(

    Display* ,
    char [32]

);

extern int XQueryPointer(

    Display* ,
    Window ,
    Window* ,
    Window* ,
    int* ,
    int* ,
    int* ,
    int* ,
    unsigned int*

);

extern int XQueryTextExtents(

    Display* ,
    XID ,
    const char* ,
    int ,
    int* ,
    int* ,
    int* ,
    XCharStruct*

);

extern int XQueryTextExtents16(

    Display* ,
    XID ,
    const XChar2b* ,
    int ,
    int* ,
    int* ,
    int* ,
    XCharStruct*

);

extern int XQueryTree(

    Display* ,
    Window ,
    Window* ,
    Window* ,
    Window** ,
    unsigned int*

);

extern int XRaiseWindow(

    Display* ,
    Window

);

extern int XReadBitmapFile(

    Display* ,
    Drawable ,
    const char* ,
    unsigned int* ,
    unsigned int* ,
    Pixmap* ,
    int* ,
    int*

);

extern int XReadBitmapFileData(

    const char* ,
    unsigned int* ,
    unsigned int* ,
    unsigned char** ,
    int* ,
    int*

);

extern int XRebindKeysym(

    Display* ,
    KeySym ,
    KeySym* ,
    int ,
    const unsigned char* ,
    int

);

extern int XRecolorCursor(

    Display* ,
    Cursor ,
    XColor* ,
    XColor*

);

extern int XRefreshKeyboardMapping(

    XMappingEvent*

);

extern int XRemoveFromSaveSet(

    Display* ,
    Window

);

extern int XRemoveHost(

    Display* ,
    XHostAddress*

);

extern int XRemoveHosts(

    Display* ,
    XHostAddress* ,
    int

);

extern int XReparentWindow(

    Display* ,
    Window ,
    Window ,
    int ,
    int

);

extern int XResetScreenSaver(

    Display*

);

extern int XResizeWindow(

    Display* ,
    Window ,
    unsigned int ,
    unsigned int

);

extern int XRestackWindows(

    Display* ,
    Window* ,
    int

);

extern int XRotateBuffers(

    Display* ,
    int

);

extern int XRotateWindowProperties(

    Display* ,
    Window ,
    Atom* ,
    int ,
    int

);

extern int XScreenCount(

    Display*

);

extern int XSelectInput(

    Display* ,
    Window ,
    long

);

extern int XSendEvent(

    Display* ,
    Window ,
    int ,
    long ,
    XEvent*

);

extern int XSetAccessControl(

    Display* ,
    int

);

extern int XSetArcMode(

    Display* ,
    GC ,
    int

);

extern int XSetBackground(

    Display* ,
    GC ,
    unsigned long

);

extern int XSetClipMask(

    Display* ,
    GC ,
    Pixmap

);

extern int XSetClipOrigin(

    Display* ,
    GC ,
    int ,
    int

);

extern int XSetClipRectangles(

    Display* ,
    GC ,
    int ,
    int ,
    XRectangle* ,
    int ,
    int

);

extern int XSetCloseDownMode(

    Display* ,
    int

);

extern int XSetCommand(

    Display* ,
    Window ,
    char** ,
    int

);

extern int XSetDashes(

    Display* ,
    GC ,
    int ,
    const char* ,
    int

);

extern int XSetFillRule(

    Display* ,
    GC ,
    int

);

extern int XSetFillStyle(

    Display* ,
    GC ,
    int

);

extern int XSetFont(

    Display* ,
    GC ,
    Font

);

extern int XSetFontPath(

    Display* ,
    char** ,
    int

);

extern int XSetForeground(

    Display* ,
    GC ,
    unsigned long

);

extern int XSetFunction(

    Display* ,
    GC ,
    int

);

extern int XSetGraphicsExposures(

    Display* ,
    GC ,
    int

);

extern int XSetIconName(

    Display* ,
    Window ,
    const char*

);

extern int XSetInputFocus(

    Display* ,
    Window ,
    int ,
    Time

);

extern int XSetLineAttributes(

    Display* ,
    GC ,
    unsigned int ,
    int ,
    int ,
    int

);

extern int XSetModifierMapping(

    Display* ,
    XModifierKeymap*

);

extern int XSetPlaneMask(

    Display* ,
    GC ,
    unsigned long

);

extern int XSetPointerMapping(

    Display* ,
    const unsigned char* ,
    int

);

extern int XSetScreenSaver(

    Display* ,
    int ,
    int ,
    int ,
    int

);

extern int XSetSelectionOwner(

    Display* ,
    Atom ,
    Window ,
    Time

);

extern int XSetState(

    Display* ,
    GC ,
    unsigned long ,
    unsigned long ,
    int ,
    unsigned long

);

extern int XSetStipple(

    Display* ,
    GC ,
    Pixmap

);

extern int XSetSubwindowMode(

    Display* ,
    GC ,
    int

);

extern int XSetTSOrigin(

    Display* ,
    GC ,
    int ,
    int

);

extern int XSetTile(

    Display* ,
    GC ,
    Pixmap

);

extern int XSetWindowBackground(

    Display* ,
    Window ,
    unsigned long

);

extern int XSetWindowBackgroundPixmap(

    Display* ,
    Window ,
    Pixmap

);

extern int XSetWindowBorder(

    Display* ,
    Window ,
    unsigned long

);

extern int XSetWindowBorderPixmap(

    Display* ,
    Window ,
    Pixmap

);

extern int XSetWindowBorderWidth(

    Display* ,
    Window ,
    unsigned int

);

extern int XSetWindowColormap(

    Display* ,
    Window ,
    Colormap

);

extern int XStoreBuffer(

    Display* ,
    const char* ,
    int ,
    int

);

extern int XStoreBytes(

    Display* ,
    const char* ,
    int

);

extern int XStoreColor(

    Display* ,
    Colormap ,
    XColor*

);

extern int XStoreColors(

    Display* ,
    Colormap ,
    XColor* ,
    int

);

extern int XStoreName(

    Display* ,
    Window ,
    const char*

);

extern int XStoreNamedColor(

    Display* ,
    Colormap ,
    const char* ,
    unsigned long ,
    int

);

extern int XSync(

    Display* ,
    int

);

extern int XTextExtents(

    XFontStruct* ,
    const char* ,
    int ,
    int* ,
    int* ,
    int* ,
    XCharStruct*

);

extern int XTextExtents16(

    XFontStruct* ,
    const XChar2b* ,
    int ,
    int* ,
    int* ,
    int* ,
    XCharStruct*

);

extern int XTextWidth(

    XFontStruct* ,
    const char* ,
    int

);

extern int XTextWidth16(

    XFontStruct* ,
    const XChar2b* ,
    int

);

extern int XTranslateCoordinates(

    Display* ,
    Window ,
    Window ,
    int ,
    int ,
    int* ,
    int* ,
    Window*

);

extern int XUndefineCursor(

    Display* ,
    Window

);

extern int XUngrabButton(

    Display* ,
    unsigned int ,
    unsigned int ,
    Window

);

extern int XUngrabKey(

    Display* ,
    int ,
    unsigned int ,
    Window

);

extern int XUngrabKeyboard(

    Display* ,
    Time

);

extern int XUngrabPointer(

    Display* ,
    Time

);

extern int XUngrabServer(

    Display*

);

extern int XUninstallColormap(

    Display* ,
    Colormap

);

extern int XUnloadFont(

    Display* ,
    Font

);

extern int XUnmapSubwindows(

    Display* ,
    Window

);

extern int XUnmapWindow(

    Display* ,
    Window

);

extern int XVendorRelease(

    Display*

);

extern int XWarpPointer(

    Display* ,
    Window ,
    Window ,
    int ,
    int ,
    unsigned int ,
    unsigned int ,
    int ,
    int

);

extern int XWidthMMOfScreen(

    Screen*

);

extern int XWidthOfScreen(

    Screen*

);

extern int XWindowEvent(

    Display* ,
    Window ,
    long ,
    XEvent*

);

extern int XWriteBitmapFile(

    Display* ,
    const char* ,
    Pixmap ,
    unsigned int ,
    unsigned int ,
    int ,
    int

);

extern int XSupportsLocale (void);

extern char *XSetLocaleModifiers(
    const char*
);

extern XOM XOpenOM(

    Display* ,
    struct _XrmHashBucketRec* ,
    const char* ,
    const char*

);

extern int XCloseOM(

    XOM

);

extern char *XSetOMValues(

    XOM ,
    ...

);

extern char *XGetOMValues(

    XOM ,
    ...

);

extern Display *XDisplayOfOM(

    XOM

);

extern char *XLocaleOfOM(

    XOM

);

extern XOC XCreateOC(

    XOM ,
    ...

);

extern void XDestroyOC(

    XOC

);

extern XOM XOMOfOC(

    XOC

);

extern char *XSetOCValues(

    XOC ,
    ...

);

extern char *XGetOCValues(

    XOC ,
    ...

);

extern XFontSet XCreateFontSet(

    Display* ,
    const char* ,
    char*** ,
    int* ,
    char**

);

extern void XFreeFontSet(

    Display* ,
    XFontSet

);

extern int XFontsOfFontSet(

    XFontSet ,
    XFontStruct*** ,
    char***

);

extern char *XBaseFontNameListOfFontSet(

    XFontSet

);

extern char *XLocaleOfFontSet(

    XFontSet

);

extern int XContextDependentDrawing(

    XFontSet

);

extern int XDirectionalDependentDrawing(

    XFontSet

);

extern int XContextualDrawing(

    XFontSet

);

extern XFontSetExtents *XExtentsOfFontSet(

    XFontSet

);

extern int XmbTextEscapement(

    XFontSet ,
    const char* ,
    int

);

extern int XwcTextEscapement(

    XFontSet ,
    const wchar_t* ,
    int

);

extern int Xutf8TextEscapement(

    XFontSet ,
    const char* ,
    int

);

extern int XmbTextExtents(

    XFontSet ,
    const char* ,
    int ,
    XRectangle* ,
    XRectangle*

);

extern int XwcTextExtents(

    XFontSet ,
    const wchar_t* ,
    int ,
    XRectangle* ,
    XRectangle*

);

extern int Xutf8TextExtents(

    XFontSet ,
    const char* ,
    int ,
    XRectangle* ,
    XRectangle*

);

extern int XmbTextPerCharExtents(

    XFontSet ,
    const char* ,
    int ,
    XRectangle* ,
    XRectangle* ,
    int ,
    int* ,
    XRectangle* ,
    XRectangle*

);

extern int XwcTextPerCharExtents(

    XFontSet ,
    const wchar_t* ,
    int ,
    XRectangle* ,
    XRectangle* ,
    int ,
    int* ,
    XRectangle* ,
    XRectangle*

);

extern int Xutf8TextPerCharExtents(

    XFontSet ,
    const char* ,
    int ,
    XRectangle* ,
    XRectangle* ,
    int ,
    int* ,
    XRectangle* ,
    XRectangle*

);

extern void XmbDrawText(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    XmbTextItem* ,
    int

);

extern void XwcDrawText(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    XwcTextItem* ,
    int

);

extern void Xutf8DrawText(

    Display* ,
    Drawable ,
    GC ,
    int ,
    int ,
    XmbTextItem* ,
    int

);

extern void XmbDrawString(

    Display* ,
    Drawable ,
    XFontSet ,
    GC ,
    int ,
    int ,
    const char* ,
    int

);

extern void XwcDrawString(

    Display* ,
    Drawable ,
    XFontSet ,
    GC ,
    int ,
    int ,
    const wchar_t* ,
    int

);

extern void Xutf8DrawString(

    Display* ,
    Drawable ,
    XFontSet ,
    GC ,
    int ,
    int ,
    const char* ,
    int

);

extern void XmbDrawImageString(

    Display* ,
    Drawable ,
    XFontSet ,
    GC ,
    int ,
    int ,
    const char* ,
    int

);

extern void XwcDrawImageString(

    Display* ,
    Drawable ,
    XFontSet ,
    GC ,
    int ,
    int ,
    const wchar_t* ,
    int

);

extern void Xutf8DrawImageString(

    Display* ,
    Drawable ,
    XFontSet ,
    GC ,
    int ,
    int ,
    const char* ,
    int

);

extern XIM XOpenIM(

    Display* ,
    struct _XrmHashBucketRec* ,
    char* ,
    char*

);

extern int XCloseIM(

    XIM

);

extern char *XGetIMValues(

    XIM , ...

);

extern Display *XDisplayOfIM(

    XIM

);

extern char *XLocaleOfIM(

    XIM

);

extern XIC XCreateIC(

    XIM , ...

);

extern void XDestroyIC(

    XIC

);

extern void XSetICFocus(

    XIC

);

extern void XUnsetICFocus(

    XIC

);

extern wchar_t *XwcResetIC(

    XIC

);

extern char *XmbResetIC(

    XIC

);

extern char *Xutf8ResetIC(

    XIC

);

extern char *XSetICValues(

    XIC , ...

);

extern char *XGetICValues(

    XIC , ...

);

extern XIM XIMOfIC(

    XIC

);

extern int XFilterEvent(

    XEvent* ,
    Window

);

extern int XmbLookupString(

    XIC ,
    XKeyPressedEvent* ,
    char* ,
    int ,
    KeySym* ,
    int*

);

extern int XwcLookupString(

    XIC ,
    XKeyPressedEvent* ,
    wchar_t* ,
    int ,
    KeySym* ,
    int*

);

extern int Xutf8LookupString(

    XIC ,
    XKeyPressedEvent* ,
    char* ,
    int ,
    KeySym* ,
    int*

);

extern XVaNestedList XVaCreateNestedList(

    int , ...

);



extern int XRegisterIMInstantiateCallback(

    Display* ,
    struct _XrmHashBucketRec* ,
    char* ,
    char* ,
    XIDProc ,
    XPointer

);

extern int XUnregisterIMInstantiateCallback(

    Display* ,
    struct _XrmHashBucketRec* ,
    char* ,
    char* ,
    XIDProc ,
    XPointer

);

typedef void (*XConnectionWatchProc)(

    Display* ,
    XPointer ,
    int ,
    int ,
    XPointer*

);


extern int XInternalConnectionNumbers(

    Display* ,
    int** ,
    int*

);

extern void XProcessInternalConnection(

    Display* ,
    int

);

extern int XAddConnectionWatch(

    Display* ,
    XConnectionWatchProc ,
    XPointer

);

extern void XRemoveConnectionWatch(

    Display* ,
    XConnectionWatchProc ,
    XPointer

);

extern void XSetAuthorization(

    char * ,
    int ,
    char * ,
    int

);

}
# 19 "kkeyserver_x11.cpp" 2
# 1 "/usr/X11R6/include/X11/Xutil.h" 1
# 70 "/usr/X11R6/include/X11/Xutil.h"
typedef struct {
        long flags;
        int x, y;
        int width, height;
        int min_width, min_height;
        int max_width, max_height;
        int width_inc, height_inc;
        struct {
                int x;
                int y;
        } min_aspect, max_aspect;
        int base_width, base_height;
        int win_gravity;
} XSizeHints;
# 108 "/usr/X11R6/include/X11/Xutil.h"
typedef struct {
        long flags;
        int input;

        int initial_state;
        Pixmap icon_pixmap;
        Window icon_window;
        int icon_x, icon_y;
        Pixmap icon_mask;
        XID window_group;

} XWMHints;
# 152 "/usr/X11R6/include/X11/Xutil.h"
typedef struct {
    unsigned char *value;
    Atom encoding;
    int format;
    unsigned long nitems;
} XTextProperty;





typedef enum {
    XStringStyle,
    XCompoundTextStyle,
    XTextStyle,
    XStdICCTextStyle,

    XUTF8StringStyle
} XICCEncodingStyle;

typedef struct {
        int min_width, min_height;
        int max_width, max_height;
        int width_inc, height_inc;
} XIconSize;

typedef struct {
        char *res_name;
        char *res_class;
} XClassHint;
# 201 "/usr/X11R6/include/X11/Xutil.h"
typedef struct _XComposeStatus {
    XPointer compose_ptr;
    int chars_matched;
} XComposeStatus;
# 234 "/usr/X11R6/include/X11/Xutil.h"
typedef struct _XRegion *Region;
# 248 "/usr/X11R6/include/X11/Xutil.h"
typedef struct {
  Visual *visual;
  VisualID visualid;
  int screen;
  int depth;

  int c_class;



  unsigned long red_mask;
  unsigned long green_mask;
  unsigned long blue_mask;
  int colormap_size;
  int bits_per_rgb;
} XVisualInfo;
# 281 "/usr/X11R6/include/X11/Xutil.h"
typedef struct {
        Colormap colormap;
        unsigned long red_max;
        unsigned long red_mult;
        unsigned long green_max;
        unsigned long green_mult;
        unsigned long blue_max;
        unsigned long blue_mult;
        unsigned long base_pixel;
        VisualID visualid;
        XID killid;
} XStandardColormap;
# 318 "/usr/X11R6/include/X11/Xutil.h"
typedef int XContext;




extern "C" {



extern XClassHint *XAllocClassHint (

    void

);

extern XIconSize *XAllocIconSize (

    void

);

extern XSizeHints *XAllocSizeHints (

    void

);

extern XStandardColormap *XAllocStandardColormap (

    void

);

extern XWMHints *XAllocWMHints (

    void

);

extern int XClipBox(

    Region ,
    XRectangle*

);

extern Region XCreateRegion(

    void

);

extern const char *XDefaultString (void);

extern int XDeleteContext(

    Display* ,
    XID ,
    XContext

);

extern int XDestroyRegion(

    Region

);

extern int XEmptyRegion(

    Region

);

extern int XEqualRegion(

    Region ,
    Region

);

extern int XFindContext(

    Display* ,
    XID ,
    XContext ,
    XPointer*

);

extern int XGetClassHint(

    Display* ,
    Window ,
    XClassHint*

);

extern int XGetIconSizes(

    Display* ,
    Window ,
    XIconSize** ,
    int*

);

extern int XGetNormalHints(

    Display* ,
    Window ,
    XSizeHints*

);

extern int XGetRGBColormaps(

    Display* ,
    Window ,
    XStandardColormap** ,
    int* ,
    Atom

);

extern int XGetSizeHints(

    Display* ,
    Window ,
    XSizeHints* ,
    Atom

);

extern int XGetStandardColormap(

    Display* ,
    Window ,
    XStandardColormap* ,
    Atom

);

extern int XGetTextProperty(

    Display* ,
    Window ,
    XTextProperty* ,
    Atom

);

extern XVisualInfo *XGetVisualInfo(

    Display* ,
    long ,
    XVisualInfo* ,
    int*

);

extern int XGetWMClientMachine(

    Display* ,
    Window ,
    XTextProperty*

);

extern XWMHints *XGetWMHints(

    Display* ,
    Window

);

extern int XGetWMIconName(

    Display* ,
    Window ,
    XTextProperty*

);

extern int XGetWMName(

    Display* ,
    Window ,
    XTextProperty*

);

extern int XGetWMNormalHints(

    Display* ,
    Window ,
    XSizeHints* ,
    long*

);

extern int XGetWMSizeHints(

    Display* ,
    Window ,
    XSizeHints* ,
    long* ,
    Atom

);

extern int XGetZoomHints(

    Display* ,
    Window ,
    XSizeHints*

);

extern int XIntersectRegion(

    Region ,
    Region ,
    Region

);

extern void XConvertCase(

    KeySym ,
    KeySym* ,
    KeySym*

);

extern int XLookupString(

    XKeyEvent* ,
    char* ,
    int ,
    KeySym* ,
    XComposeStatus*

);

extern int XMatchVisualInfo(

    Display* ,
    int ,
    int ,
    int ,
    XVisualInfo*

);

extern int XOffsetRegion(

    Region ,
    int ,
    int

);

extern int XPointInRegion(

    Region ,
    int ,
    int

);

extern Region XPolygonRegion(

    XPoint* ,
    int ,
    int

);

extern int XRectInRegion(

    Region ,
    int ,
    int ,
    unsigned int ,
    unsigned int

);

extern int XSaveContext(

    Display* ,
    XID ,
    XContext ,
    const char*

);

extern int XSetClassHint(

    Display* ,
    Window ,
    XClassHint*

);

extern int XSetIconSizes(

    Display* ,
    Window ,
    XIconSize* ,
    int

);

extern int XSetNormalHints(

    Display* ,
    Window ,
    XSizeHints*

);

extern void XSetRGBColormaps(

    Display* ,
    Window ,
    XStandardColormap* ,
    int ,
    Atom

);

extern int XSetSizeHints(

    Display* ,
    Window ,
    XSizeHints* ,
    Atom

);

extern int XSetStandardProperties(

    Display* ,
    Window ,
    const char* ,
    const char* ,
    Pixmap ,
    char** ,
    int ,
    XSizeHints*

);

extern void XSetTextProperty(

    Display* ,
    Window ,
    XTextProperty* ,
    Atom

);

extern void XSetWMClientMachine(

    Display* ,
    Window ,
    XTextProperty*

);

extern int XSetWMHints(

    Display* ,
    Window ,
    XWMHints*

);

extern void XSetWMIconName(

    Display* ,
    Window ,
    XTextProperty*

);

extern void XSetWMName(

    Display* ,
    Window ,
    XTextProperty*

);

extern void XSetWMNormalHints(

    Display* ,
    Window ,
    XSizeHints*

);

extern void XSetWMProperties(

    Display* ,
    Window ,
    XTextProperty* ,
    XTextProperty* ,
    char** ,
    int ,
    XSizeHints* ,
    XWMHints* ,
    XClassHint*

);

extern void XmbSetWMProperties(

    Display* ,
    Window ,
    const char* ,
    const char* ,
    char** ,
    int ,
    XSizeHints* ,
    XWMHints* ,
    XClassHint*

);

extern void Xutf8SetWMProperties(

    Display* ,
    Window ,
    const char* ,
    const char* ,
    char** ,
    int ,
    XSizeHints* ,
    XWMHints* ,
    XClassHint*

);

extern void XSetWMSizeHints(

    Display* ,
    Window ,
    XSizeHints* ,
    Atom

);

extern int XSetRegion(

    Display* ,
    GC ,
    Region

);

extern void XSetStandardColormap(

    Display* ,
    Window ,
    XStandardColormap* ,
    Atom

);

extern int XSetZoomHints(

    Display* ,
    Window ,
    XSizeHints*

);

extern int XShrinkRegion(

    Region ,
    int ,
    int

);

extern int XStringListToTextProperty(

    char** ,
    int ,
    XTextProperty*

);

extern int XSubtractRegion(

    Region ,
    Region ,
    Region

);

extern int XmbTextListToTextProperty(
    Display* display,
    char** list,
    int count,
    XICCEncodingStyle style,
    XTextProperty* text_prop_return
);

extern int XwcTextListToTextProperty(
    Display* display,
    wchar_t** list,
    int count,
    XICCEncodingStyle style,
    XTextProperty* text_prop_return
);

extern int Xutf8TextListToTextProperty(
    Display* display,
    char** list,
    int count,
    XICCEncodingStyle style,
    XTextProperty* text_prop_return
);

extern void XwcFreeStringList(
    wchar_t** list
);

extern int XTextPropertyToStringList(

    XTextProperty* ,
    char*** ,
    int*

);

extern int XmbTextPropertyToTextList(
    Display* display,
    const XTextProperty* text_prop,
    char*** list_return,
    int* count_return
);

extern int XwcTextPropertyToTextList(
    Display* display,
    const XTextProperty* text_prop,
    wchar_t*** list_return,
    int* count_return
);

extern int Xutf8TextPropertyToTextList(
    Display* display,
    const XTextProperty* text_prop,
    char*** list_return,
    int* count_return
);

extern int XUnionRectWithRegion(

    XRectangle* ,
    Region ,
    Region

);

extern int XUnionRegion(

    Region ,
    Region ,
    Region

);

extern int XWMGeometry(

    Display* ,
    int ,
    const char* ,
    const char* ,
    unsigned int ,
    XSizeHints* ,
    int* ,
    int* ,
    int* ,
    int* ,
    int*

);

extern int XXorRegion(

    Region ,
    Region ,
    Region

);

}
# 20 "kkeyserver_x11.cpp" 2
# 1 "/usr/X11R6/include/X11/keysymdef.h" 1
# 21 "kkeyserver_x11.cpp" 2






namespace KKeyServer
{





struct Mod
{
        int m_mod;
};





struct ModInfo
{
        KKey::ModFlag mod;
        int modQt;
        uint modX;
        const char* psName;
        QString sLabel;
};

struct SymVariation
{
        uint sym, symVariation;
        bool bActive;
};

struct SymName
{
        uint sym;
        const char* psName;
};

struct TransKey {
        int keySymQt;
        uint keySymX;
};





static ModInfo g_rgModInfo[KKey::MOD_FLAG_COUNT] =
{
        { KKey::SHIFT, Qt::SHIFT, (1<<0), ("Shift"), QString() },
        { KKey::CTRL, Qt::CTRL, (1<<2), ("Ctrl"), QString() },
        { KKey::ALT, Qt::ALT, (1<<3), ("Alt"), QString() },
        { KKey::WIN, KKey::QtWIN, (1<<6), ("Win"), QString() }
};

static SymVariation g_rgSymVariation[] =
{
        { '/', 0xFFAF, false },
        { '*', 0xFFAA, false },
        { '-', 0xFFAD, false },
        { '+', 0xFFAB, false },
        { 0xFF0D, 0xFF8D, false },
        { 0, 0, false }
};


static const SymName g_rgSymNames[] = {
        { 0xFE20, "Backtab" },
        { 0xFF08, ("Backspace") },
        { 0xFF15, ("SysReq") },
        { 0xFFE5, ("CapsLock") },
        { 0xFF7F, ("NumLock") },
        { 0xFF14, ("ScrollLock") },
        { 0xFF55, ("PageUp") },
        { 0xFF56, ("PageDown") },
        { 0, 0 }
};




static const TransKey g_rgQtToSymX[] =
{
        { Qt::Key_Escape, 0xFF1B },
        { Qt::Key_Tab, 0xFF09 },
        { Qt::Key_Backtab, 0xFE20 },
        { Qt::Key_Backspace, 0xFF08 },
        { Qt::Key_Return, 0xFF0D },
        { Qt::Key_Enter, 0xFF8D },
        { Qt::Key_Insert, 0xFF63 },
        { Qt::Key_Delete, 0xFFFF },
        { Qt::Key_Pause, 0xFF13 },
        { Qt::Key_Print, 0xFF61 },
        { Qt::Key_SysReq, 0xFF15 },
        { Qt::Key_Home, 0xFF50 },
        { Qt::Key_End, 0xFF57 },
        { Qt::Key_Left, 0xFF51 },
        { Qt::Key_Up, 0xFF52 },
        { Qt::Key_Right, 0xFF53 },
        { Qt::Key_Down, 0xFF54 },
        { Qt::Key_Prior, 0xFF55 },
        { Qt::Key_Next, 0xFF56 },




        { Qt::Key_CapsLock, 0xFFE5 },
        { Qt::Key_NumLock, 0xFF7F },
        { Qt::Key_ScrollLock, 0xFF14 },
        { Qt::Key_F1, 0xFFBE },
        { Qt::Key_F2, 0xFFBF },
        { Qt::Key_F3, 0xFFC0 },
        { Qt::Key_F4, 0xFFC1 },
        { Qt::Key_F5, 0xFFC2 },
        { Qt::Key_F6, 0xFFC3 },
        { Qt::Key_F7, 0xFFC4 },
        { Qt::Key_F8, 0xFFC5 },
        { Qt::Key_F9, 0xFFC6 },
        { Qt::Key_F10, 0xFFC7 },
        { Qt::Key_F11, 0xFFC8 },
        { Qt::Key_F12, 0xFFC9 },
        { Qt::Key_F13, 0xFFCA },
        { Qt::Key_F14, 0xFFCB },
        { Qt::Key_F15, 0xFFCC },
        { Qt::Key_F16, 0xFFCD },
        { Qt::Key_F17, 0xFFCE },
        { Qt::Key_F18, 0xFFCF },
        { Qt::Key_F19, 0xFFD0 },
        { Qt::Key_F20, 0xFFD1 },
        { Qt::Key_F21, 0xFFD2 },
        { Qt::Key_F22, 0xFFD3 },
        { Qt::Key_F23, 0xFFD4 },
        { Qt::Key_F24, 0xFFD5 },
        { Qt::Key_F25, 0xFFD6 },
        { Qt::Key_F26, 0xFFD7 },
        { Qt::Key_F27, 0xFFD8 },
        { Qt::Key_F28, 0xFFD9 },
        { Qt::Key_F29, 0xFFDA },
        { Qt::Key_F30, 0xFFDB },
        { Qt::Key_F31, 0xFFDC },
        { Qt::Key_F32, 0xFFDD },
        { Qt::Key_F33, 0xFFDE },
        { Qt::Key_F34, 0xFFDF },
        { Qt::Key_F35, 0xFFE0 },
        { Qt::Key_Super_L, 0xFFEB },
        { Qt::Key_Super_R, 0xFFEC },
        { Qt::Key_Menu, 0xFF67 },
        { Qt::Key_Hyper_L, 0xFFED },
        { Qt::Key_Hyper_R, 0xFFEE },
        { Qt::Key_Help, 0xFF6A },



        { '/', 0xFFAF },
        { '*', 0xFFAA },
        { '-', 0xFFAD },
        { '+', 0xFFAB },
        { Qt::Key_Return, 0xFF8D }
};




static bool g_bInitializedMods, g_bInitializedVariations, g_bInitializedKKeyLabels;
static bool g_bMacLabels;
static uint g_modXNumLock, g_modXScrollLock;

bool initializeMods()
{
        XModifierKeymap* xmk = XGetModifierMapping( qt_xdisplay() );

        g_rgModInfo[3].modX = g_modXNumLock = g_modXScrollLock = 0;


        for( int i = 4; i < 8; i++ ) {
                uint mask = (1 << i);
                uint keySymX = XKeycodeToKeysym( qt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * i], 0 );
                switch( keySymX ) {
                        case 0xFF7F: g_modXNumLock = mask; break;
                        case 0xFFEB:
                        case 0xFFEC: g_rgModInfo[3].modX = mask; break;
                        case 0xFFE7:
                        case 0xFFE8: if( !g_rgModInfo[3].modX ) g_rgModInfo[3].modX = mask; break;
                        case 0xFF14: g_modXScrollLock = mask; break;
                }
        }

        XFreeModifiermap( xmk );




        g_bInitializedMods = true;

        kndDebug(125) << "KKeyServer::initializeMods(): Win Mod = 0x" << QString::number(g_rgModInfo[3].modX, 16) << endl;
        return true;
}

static void initializeVariations()
{
        for( int i = 0; g_rgSymVariation[i].sym != 0; i++ )
                g_rgSymVariation[i].bActive = (XKeysymToKeycode( qt_xdisplay(), g_rgSymVariation[i].symVariation ) != 0);
        g_bInitializedVariations = true;
}

static void intializeKKeyLabels()
{
        KConfigGroupSaver cgs( KGlobal::config(), "Keyboard" );
        g_rgModInfo[0].sLabel = KGlobal::config()->readEntry( "Label Shift", i18n(g_rgModInfo[0].psName) );
        g_rgModInfo[1].sLabel = KGlobal::config()->readEntry( "Label Ctrl", i18n(g_rgModInfo[1].psName) );
        g_rgModInfo[2].sLabel = KGlobal::config()->readEntry( "Label Alt", i18n(g_rgModInfo[2].psName) );
        g_rgModInfo[3].sLabel = KGlobal::config()->readEntry( "Label Win", i18n(g_rgModInfo[3].psName) );
        g_bMacLabels = (g_rgModInfo[2].sLabel == "Command");
        g_bInitializedKKeyLabels = true;
}
# 255 "kkeyserver_x11.cpp"
bool Sym::initQt( int keyQt )
{
        int symQt = keyQt & 0xffff;

        if( (keyQt & Qt::UNICODE_ACCEL) || symQt < 0x1000 ) {
                m_sym = QChar(symQt).lower();
                return true;
        }

        for( uint i = 0; i < sizeof(g_rgQtToSymX)/sizeof(TransKey); i++ ) {
                if( g_rgQtToSymX[i].keySymQt == symQt ) {
                        m_sym = g_rgQtToSymX[i].keySymX;
                        return true;
                }
        }

        m_sym = 0;
        if( symQt != Qt::Key_Shift && symQt != Qt::Key_Control && symQt != Qt::Key_Alt &&
            symQt != Qt::Key_Meta && symQt != Qt::Key_Direction_L && symQt != Qt::Key_Direction_R )
                kdWarning(125) << "Sym::initQt( " << QString::number(keyQt,16) << " ): failed to convert key." << endl;
        return false;
}

bool Sym::init( const QString& s )
{
        if( s.length() == 1 ) {
                m_sym = s[0].lower().unicode();
                return true;
        }


        for( int i = 0; g_rgSymNames[i].sym != 0; i++ ) {
                if( qstricmp( s.latin1(), g_rgSymNames[i].psName ) == 0 ) {
                        m_sym = g_rgSymNames[i].sym;
                        return true;
                }
        }


        m_sym = XStringToKeysym( s.latin1() );
        if( !m_sym ) {
                m_sym = XStringToKeysym( s.lower().latin1() );
                if( !m_sym ) {
                        QString s2 = s;
                        s2[0] = s2[0].upper();
                        m_sym = XStringToKeysym( s2.latin1() );
                }
        }

        return m_sym != 0;
}

int Sym::qt() const
{
        if( m_sym < 0x1000 ) {
                if( m_sym >= 'a' && m_sym <= 'z' )
                        return QChar(m_sym).upper();
                return m_sym;
        }
        if( m_sym < 0x3000 )
                return m_sym | Qt::UNICODE_ACCEL;

        for( uint i = 0; i < sizeof(g_rgQtToSymX)/sizeof(TransKey); i++ )
                if( g_rgQtToSymX[i].keySymX == m_sym )
                        return g_rgQtToSymX[i].keySymQt;
        return Qt::Key_unknown;
}

QString Sym::toString( bool bUserSpace ) const
{

        if( m_sym < 0x3000 ) {
                QChar c = QChar(m_sym).upper();


                if( (c.latin1() && c.isLetterOrNumber())
                    || (bUserSpace && !c.isSpace()) )
                                return c;
        }


        for( int i = 0; g_rgSymNames[i].sym != 0; i++ ) {
                if( m_sym == g_rgSymNames[i].sym )
                        return bUserSpace ? i18n(g_rgSymNames[i].psName) : QString(g_rgSymNames[i].psName);
        }


        QString s = XKeysymToString( m_sym );
        capitalizeKeyname( s );
        return bUserSpace ? i18n("QAccel", s.latin1()) : s;
}

QString Sym::toStringInternal() const { return toString( false ); }
QString Sym::toString() const { return toString( true ); }

uint Sym::getModsRequired() const
{

        if( m_sym == 0xFF15 ) return KKey::ALT;
        if( m_sym == 0xFF6B ) return KKey::CTRL;

        if( m_sym < 0x3000 ) {
                QChar c(m_sym);
                if( c.isLetter() && c.lower() != c.upper() && m_sym == c.upper().unicode() )
                        return KKey::SHIFT;
        }

        uchar code = XKeysymToKeycode( qt_xdisplay(), m_sym );
        if( !code
            || m_sym == XKeycodeToKeysym( qt_xdisplay(), code, 0 )
            || m_sym == XKeycodeToKeysym( qt_xdisplay(), code, 2 ) )
                return 0;
        else
                return KKey::SHIFT;
}

uint Sym::getSymVariation() const
{
        if( !g_bInitializedVariations )
                initializeVariations();

        for( int i = 0; g_rgSymVariation[i].sym != 0; i++ )
                if( g_rgSymVariation[i].sym == m_sym && g_rgSymVariation[i].bActive )
                        return g_rgSymVariation[i].symVariation;
        return 0;
}

void Sym::capitalizeKeyname( QString& s )
{
        s[0] = s[0].upper();
        int len = s.length();
        if( s.endsWith( "left" ) ) s[len-4] = 'L';
        else if( s.endsWith( "right" ) ) s[len-5] = 'R';
        else if( s == "Sysreq" ) s[len-3] = 'R';
}





uint modX( KKey::ModFlag mod )
{
        if( mod == KKey::WIN && !g_bInitializedMods )
                initializeMods();

        for( uint i = 0; i < KKey::MOD_FLAG_COUNT; i++ ) {
                if( g_rgModInfo[i].mod == mod )
                        return g_rgModInfo[i].modX;
        }
        return 0;
}

bool keyboardHasWinKey() { if( !g_bInitializedMods ) { initializeMods(); } return g_rgModInfo[3].modX != 0; }
uint modXShift() { return (1<<0); }
uint modXLock() { return (1<<1); }
uint modXCtrl() { return (1<<2); }
uint modXAlt() { return (1<<3); }
uint modXNumLock() { if( !g_bInitializedMods ) { initializeMods(); } return g_modXNumLock; }
uint modXWin() { if( !g_bInitializedMods ) { initializeMods(); } return g_rgModInfo[3].modX; }
uint modXScrollLock() { if( !g_bInitializedMods ) { initializeMods(); } return g_modXScrollLock; }

uint accelModMaskX()
{
        if( !g_bInitializedMods )
                initializeMods();
        return (1<<0) | (1<<2) | (1<<3) | g_rgModInfo[3].modX;
}

bool keyQtToSym( int keyQt, uint& keySym )
{
        Sym sym;
        if( sym.initQt( keyQt ) ) {
                keySym = sym.m_sym;
                return true;
        } else
                return false;
}

bool keyQtToMod( int keyQt, uint& mod )
{
        mod = 0;

        if( keyQt & Qt::SHIFT ) mod |= KKey::SHIFT;
        if( keyQt & Qt::CTRL ) mod |= KKey::CTRL;
        if( keyQt & Qt::ALT ) mod |= KKey::ALT;
        if( keyQt & (Qt::ALT<<1) ) mod |= KKey::WIN;

        return true;
}

bool symToKeyQt( uint keySym, int& keyQt )
{
        Sym sym( keySym );
        keyQt = sym.qt();
        return (keyQt != Qt::Key_unknown);
}

bool modToModQt( uint mod, int& modQt )
{
        modQt = 0;
        for( int i = 0; i < KKey::MOD_FLAG_COUNT; i++ ) {
                if( mod & g_rgModInfo[i].mod ) {
                        if( !g_rgModInfo[i].modQt ) {
                                modQt = 0;
                                return false;
                        }
                        modQt |= g_rgModInfo[i].modQt;
                }
        }
        return true;
}

bool modToModX( uint mod, uint& modX )
{
        if( !g_bInitializedMods )
                initializeMods();

        modX = 0;
        for( int i = 0; i < KKey::MOD_FLAG_COUNT; i++ ) {
                if( mod & g_rgModInfo[i].mod ) {
                        if( !g_rgModInfo[i].modX ) {
                                kndDebug(125) << "Invalid modifier flag." << endl;
                                modX = 0;
                                return false;
                        }
                        modX |= g_rgModInfo[i].modX;
                }
        }
        return true;
}

bool modXToModQt( uint modX, int& modQt )
{
        if( !g_bInitializedMods )
                initializeMods();

        modQt = 0;
        for( int i = 0; i < KKey::MOD_FLAG_COUNT; i++ ) {
                if( modX & g_rgModInfo[i].modX ) {
                        if( !g_rgModInfo[i].modQt ) {
                                modQt = 0;
                                return false;
                        }
                        modQt |= g_rgModInfo[i].modQt;
                }
        }
        return true;
}

bool modXToMod( uint modX, uint& mod )
{
        if( !g_bInitializedMods )
                initializeMods();

        mod = 0;
        for( int i = 0; i < KKey::MOD_FLAG_COUNT; i++ ) {
                if( modX & g_rgModInfo[i].modX )
                        mod |= g_rgModInfo[i].mod;
        }
        return true;
}

bool codeXToSym( uchar codeX, uint modX, uint& sym )
{
        XKeyPressedEvent event;

        event.type = 2;
        event.display = qt_xdisplay();
        event.state = modX;
        event.keycode = codeX;

        XLookupString( &event, 0, 0, (KeySym*) &sym, 0 );
        return true;
}

static QString modToString( uint mod, bool bUserSpace )
{
        if( bUserSpace && !g_bInitializedKKeyLabels )
                intializeKKeyLabels();

        QString s;
        for( int i = KKey::MOD_FLAG_COUNT-1; i >= 0; i-- ) {
                if( mod & g_rgModInfo[i].mod ) {
                        if( !s.isEmpty() )
                                s += '+';
                        s += (bUserSpace)
                                  ? g_rgModInfo[i].sLabel
                                  : QString(g_rgModInfo[i].psName);
                }
        }
        return s;
}

QString modToStringInternal( uint mod ) { return modToString( mod, false ); }
QString modToStringUser( uint mod ) { return modToString( mod, true ); }
# 667 "kkeyserver_x11.cpp"
bool Key::init( const KKey& key, bool bQt )
{
        if( bQt ) {
                m_code = CODE_FOR_QT;
                m_sym = key.keyCodeQt();
        } else {
                KKeyNative keyNative( key );
                *this = keyNative;
        }
        return true;
}

KKey Key::key() const
{
        if( m_code == CODE_FOR_QT )
                return KKey( keyCodeQt() );
        else {
                uint mod;
                modXToMod( m_mod, mod );
                return KKey( m_sym, mod );
        }
}

Key& Key::operator =( const KKeyNative& key )
{
        m_code = key.code(); m_mod = key.mod(); m_sym = key.sym();
        return *this;
}

int Key::compare( const Key& b ) const
{
        if( m_code == CODE_FOR_QT )
                return m_sym - b.m_sym;
        if( m_sym != b.m_sym ) return m_sym - b.m_sym;
        if( m_mod != b.m_mod ) return m_mod - b.m_mod;
        return m_code - b.m_code;
}






void Variations::init( const KKey& key, bool bQt )
{
        if( key.isNull() ) {
                m_nVariations = 0;
                return;
        }

        m_nVariations = 1;
        m_rgkey[0] = KKeyNative(key);
        uint symVar = Sym(key.sym()).getSymVariation();
        if( symVar ) {
                uint modReq = Sym(m_rgkey[0].sym()).getModsRequired();
                uint modReqVar = Sym(symVar).getModsRequired();


                if( (key.modFlags() & modReq) == (key.modFlags() & modReqVar) ) {
                        m_rgkey[1] = KKeyNative(KKey(symVar, key.modFlags()));
                        m_nVariations = 2;
                }
        }

        if( bQt ) {
                uint nVariations = 0;
                for( uint i = 0; i < m_nVariations; i++ ) {
                        int keyQt = KKeyNative( m_rgkey[i].code(), m_rgkey[i].mod(), m_rgkey[i].sym() ).keyCodeQt();
                        if( keyQt )
                                m_rgkey[nVariations++].setKeycodeQt( keyQt );
                }
                m_nVariations = nVariations;



                for( uint i = 1; i < m_nVariations; i++ ) {
                        for( uint j = 0; j < i; j++ ) {

                                if( m_rgkey[i].keyCodeQt() == m_rgkey[j].keyCodeQt() ) {
                                        for( uint k = i; k < m_nVariations - 1; k++ )
                                                m_rgkey[k].setKeycodeQt( m_rgkey[k+1].keyCodeQt() );
                                        m_nVariations--;
                                        i--;
                                        break;
                                }
                        }
                }
        }
}

};
# 766 "kkeyserver_x11.cpp"
void KKey::simplify()
{
        if( m_sym == 0xFF15 ) {
                m_sym = 0xFF61;
                m_mod |= ALT;
        } else if( m_sym == 0xFE20 ) {
                m_sym = 0xFF09;
                m_mod |= SHIFT;
        } else {

                m_sym = KKeyNative(*this).sym();
        }


        if( m_sym < 0x3000 && QChar(m_sym).isLetter() )
                m_sym = QChar(m_sym).lower();



        m_mod &= ~KKeyServer::Sym(m_sym).getModsRequired();
}

Attachment: kkeyserver_x11.s
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]