~ubuntu-branches/debian/experimental/cuneiform/experimental

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/include/compat_defs.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-07-10 17:58:10 UTC
  • Revision ID: james.westby@ubuntu.com-20090710175810-rqc89d2i3tki9m89
Tags: upstream-0.7.0+dfsg
ImportĀ upstreamĀ versionĀ 0.7.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (c) 2008, 2009 Jussi Pakkanen
 
3
 
 
4
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½,
 
5
ļæ½ļæ½ļæ½ ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½:
 
6
 
 
7
      * ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
8
        ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
9
        ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½.
 
10
      * ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½
 
11
        ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
12
        ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½
 
13
        ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½.
 
14
      * ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ Cognitive Technologies, ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½
 
15
        ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
16
        ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½, ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
17
        ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½.
 
18
 
 
19
ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ "ļæ½ļæ½ļæ½
 
20
ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½" ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½-ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½,
 
21
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ ļæ½ļæ½
 
22
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½. ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
23
ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½
 
24
ļæ½ļæ½ŃØļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½
 
25
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
26
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ (ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½,
 
27
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½-ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
28
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½,
 
29
ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½), ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½
 
30
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½.
 
31
 
 
32
Redistribution and use in source and binary forms, with or without modification,
 
33
are permitted provided that the following conditions are met:
 
34
 
 
35
    * Redistributions of source code must retain the above copyright notice,
 
36
      this list of conditions and the following disclaimer.
 
37
    * Redistributions in binary form must reproduce the above copyright notice,
 
38
      this list of conditions and the following disclaimer in the documentation
 
39
      and/or other materials provided with the distribution.
 
40
    * Neither the name of the Cognitive Technologies nor the names of its
 
41
      contributors may be used to endorse or promote products derived from this
 
42
      software without specific prior written permission.
 
43
 
 
44
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 
45
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
46
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
47
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
 
48
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
49
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 
50
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 
51
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 
52
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 
53
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
54
*/
 
55
 
 
56
/**
 
57
 * \file
 
58
 * Typedefs for the various win32-only variable types.
 
59
 * Only defines those types that are currently undefined. Thus this
 
60
 * can be included after other headers without redefinition errors.
 
61
 *
 
62
 * Most of these are also in c_types.h and/or cttypes.h. I added them
 
63
 * here so as to make changes minimal and isolated. Eventually this
 
64
 * header should be removed altogether.
 
65
 */
 
66
 
 
67
#ifndef compat_typedefs_h_
 
68
#define compat_typedefs_h_
 
69
 
 
70
#if WIN32
 
71
 
 
72
#include<windows.h>
 
73
#include"minmax.h"
 
74
 
 
75
#ifdef _MSC_VER
 
76
#include<crtdbg.h>
 
77
 
 
78
#include <io.h>
 
79
/*
 
80
#define open(a, b, c) _open(a, b, c)
 
81
#define close(a) _close(a)
 
82
#define read(a, b, c) _read(a, b, c)
 
83
#define write(a, b, c) _write(a, b, c)
 
84
#define filelength(a) _filelength(a)
 
85
#define lseek(a, b, c) _lseek(a, b, c)
 
86
*/
 
87
#else
 
88
#ifndef _ASSERT
 
89
#define _ASSERT(a) assert(a)
 
90
#endif
 
91
typedef int (* _CRT_ALLOC_HOOK) (int, void *, int, int, long, const char *, int);
 
92
 
 
93
#endif
 
94
 
 
95
#include "winfuncs.h"
 
96
 
 
97
#else
 
98
 
 
99
#include <time.h>
 
100
#include "minmax.h"
 
101
#include "filestuff.h"
 
102
#include "cttypes.h" /* Most type definitions are here. */
 
103
#include <errno.h>
 
104
 
 
105
#ifdef __cplusplus
 
106
    extern "C" {
 
107
#endif
 
108
 
 
109
#ifndef HANDLE
 
110
#define HANDLE void*
 
111
#endif
 
112
 
 
113
#ifndef FALSE
 
114
#define FALSE 0
 
115
#endif
 
116
 
 
117
#ifndef TRUE
 
118
#define TRUE 1
 
119
#endif
 
120
 
 
121
#ifndef APIENTRY /* Not currently used in Linux. */
 
122
#define APIENTRY
 
123
#endif
 
124
 
 
125
typedef int (* _CRT_ALLOC_HOOK) (int, void *, int, int, long, const char *, int);
 
126
 
 
127
#ifndef HINSTANCE
 
128
#define HINSTANCE void*
 
129
#endif
 
130
 
 
131
#ifndef HMODULE
 
132
#define HMODULE void*
 
133
#endif
 
134
 
 
135
#ifndef HICON
 
136
#define HICON void*
 
137
#endif
 
138
 
 
139
#ifndef HWND
 
140
#define HWND void*
 
141
#endif
 
142
 
 
143
#define _ASSERT assert
 
144
 
 
145
#ifndef HDC
 
146
#define HDC int
 
147
#endif
 
148
 
 
149
#ifndef HGDIOBJ
 
150
#define HGDIOBJ int
 
151
#endif
 
152
 
 
153
#ifndef DECLARE_HANDLE
 
154
#define DECLARE_HANDLE(a)
 
155
#endif
 
156
 
 
157
#ifndef WINAPI
 
158
#define WINAPI
 
159
#endif
 
160
 
 
161
extern int HFILE_ERROR;
 
162
typedef int HFILE;
 
163
 
 
164
typedef struct tagRECT {
 
165
    LONG left;
 
166
    LONG right;
 
167
    LONG top;
 
168
    LONG bottom;
 
169
} RECT;
 
170
 
 
171
typedef RECT* LPRECT;
 
172
typedef DWORD COLORREF;
 
173
typedef DWORD *LPCOLORREF;
 
174
 
 
175
#ifndef HGLOBAL
 
176
#define HGLOBAL void*
 
177
#endif
 
178
 
 
179
#ifndef HMETAFILE
 
180
#define HMETAFILE void*
 
181
#endif
 
182
 
 
183
typedef struct {
 
184
     char * lpszClassName;
 
185
     HINSTANCE hInstance;
 
186
     void * lpfnWndProc;
 
187
     unsigned int style;
 
188
     int hbrBackground;
 
189
     int hCursor;
 
190
     int hIcon;
 
191
     char * lpszMenuName;
 
192
     char *cbClsExtra;
 
193
     char *cbWndExtra;
 
194
} WNDCLASS;
 
195
 
 
196
#pragma pack(push, 2)
 
197
 
 
198
typedef struct tagBITMAPINFOHEADER{
 
199
  DWORD  biSize;
 
200
  LONG   biWidth;
 
201
  LONG   biHeight;
 
202
  WORD   biPlanes;
 
203
  WORD   biBitCount;
 
204
  DWORD  biCompression;
 
205
  DWORD  biSizeImage;
 
206
  LONG   biXPelsPerMeter;
 
207
  LONG   biYPelsPerMeter;
 
208
  DWORD  biClrUsed;
 
209
  DWORD  biClrImportant;
 
210
} BITMAPINFOHEADER, *PBITMAPINFOHEADER;
 
211
 
 
212
typedef struct tagBITMAPCOREHEADER {
 
213
  DWORD   bcSize;
 
214
  WORD    bcWidth;
 
215
  WORD    bcHeight;
 
216
  WORD    bcPlanes;
 
217
  WORD    bcBitCount;
 
218
} BITMAPCOREHEADER, *PBITMAPCOREHEADER;
 
219
 
 
220
#pragma pack(pop)
 
221
 
 
222
struct _finddata_t {
 
223
    unsigned    attrib;
 
224
    time_t    time_create; /*-1forFATfilesystems*/
 
225
    time_t    time_access; /*-1forFATfilesystems */
 
226
    time_t    time_write;
 
227
    unsigned int  size;
 
228
    char    name[260];
 
229
};
 
230
 
 
231
typedef struct tagRGBQUAD {
 
232
  BYTE    rgbBlue;
 
233
  BYTE    rgbGreen;
 
234
  BYTE    rgbRed;
 
235
  BYTE    rgbReserved;
 
236
} RGBQUAD;
 
237
 
 
238
typedef struct tagBITMAPINFO {
 
239
  BITMAPINFOHEADER bmiHeader;
 
240
  RGBQUAD          bmiColors[1];
 
241
} BITMAPINFO, *PBITMAPINFO;
 
242
 
 
243
typedef struct tagRGBTRIPLE {
 
244
  BYTE rgbtBlue;
 
245
  BYTE rgbtGreen;
 
246
  BYTE rgbtRed;
 
247
} RGBTRIPLE;
 
248
 
 
249
typedef BITMAPCOREHEADER* LPBITMAPCOREHEADER;
 
250
typedef BITMAPINFOHEADER* LPBITMAPINFOHEADER;
 
251
typedef BITMAPINFO* LPBITMAPINFO;
 
252
 
 
253
typedef struct tagMETAHEADER {
 
254
  WORD  mtType;
 
255
  WORD  mtHeaderSize;
 
256
  WORD  mtVersion;
 
257
  DWORD mtSize;
 
258
  WORD  mtNoObjects;
 
259
  DWORD mtMaxRecord;
 
260
  WORD  mtNoParameters;
 
261
} METAHEADER, *PMETAHEADER;
 
262
 
 
263
typedef struct tagPALETTEENTRY {
 
264
  BYTE peRed;
 
265
  BYTE peGreen;
 
266
  BYTE peBlue;
 
267
  BYTE peFlags;
 
268
} PALETTEENTRY;
 
269
 
 
270
typedef struct tagLOGPALETTE {
 
271
  WORD         palVersion;
 
272
  WORD         palNumEntries;
 
273
  PALETTEENTRY palPalEntry[1];
 
274
} LOGPALETTE;
 
275
 
 
276
/*
 
277
typedef struct {
 
278
    int x;
 
279
} HPALETTE;
 
280
*/
 
281
 
 
282
typedef BOOL(*WNDENUMPROC)(HWND, int);
 
283
 
 
284
typedef int HPALETTE;
 
285
 
 
286
typedef struct tagPAINTSTRUCT {
 
287
  HDC  hdc;
 
288
  BOOL fErase;
 
289
  RECT rcPaint;
 
290
  BOOL fRestore;
 
291
  BOOL fIncUpdate;
 
292
  unsigned char rgbReserved[32];
 
293
} PAINTSTRUCT, *PPAINTSTRUCT;
 
294
 
 
295
typedef struct tagPOINT {
 
296
  LONG x;
 
297
  LONG y;
 
298
} POINT, *PPOINT;
 
299
 
 
300
typedef struct  tagSIZE{
 
301
    LONG cx;
 
302
    LONG cy;
 
303
} SIZE;
 
304
 
 
305
#pragma pack(push, 2)
 
306
typedef struct tagBITMAPFILEHEADER {
 
307
  WORD    bfType;
 
308
  DWORD   bfSize;
 
309
  WORD    bfReserved1;
 
310
  WORD    bfReserved2;
 
311
  DWORD   bfOffBits;
 
312
} BITMAPFILEHEADER, *PBITMAPFILEHEADER;
 
313
 
 
314
#pragma pack(pop)
 
315
 
 
316
typedef struct tagCOPYDATASTRUCT {
 
317
    ULONG dwData;
 
318
    DWORD cbData;
 
319
    PVOID lpData;
 
320
} COPYDATASTRUCT, *PCOPYDATASTRUCT;
 
321
 
 
322
typedef POINT* LPPOINT;
 
323
typedef SIZE* LPSIZE;
 
324
 
 
325
typedef int HKEY;
 
326
 
 
327
typedef int HFONT;
 
328
 
 
329
typedef int * PHKEY;
 
330
typedef int REGSAM;
 
331
 
 
332
#ifndef _O_BINARY
 
333
#define _O_BINARY O_BINARY
 
334
#endif
 
335
 
 
336
#ifndef _O_CREAT
 
337
#define _O_CREAT O_CREAT
 
338
#endif
 
339
 
 
340
#ifndef _O_EXCL
 
341
#define _O_EXCL O_EXCL
 
342
#endif
 
343
 
 
344
#ifndef _O_RDONLY
 
345
#define _O_RDONLY O_RDONLY
 
346
#endif
 
347
 
 
348
#ifndef _O_RDWR
 
349
#define _O_RDWR O_RDWR
 
350
#endif
 
351
 
 
352
#ifndef _S_IREAD
 
353
#define _S_IREAD S_IREAD
 
354
#endif
 
355
 
 
356
#ifndef _S_IWRITE
 
357
#define _S_IWRITE S_IWRITE
 
358
#endif
 
359
 
 
360
#ifndef WPARAM
 
361
#define WPARAM int
 
362
#endif
 
363
 
 
364
#ifndef COLORONCOLOR
 
365
#define COLORONCOLOR 31
 
366
#endif
 
367
 
 
368
#ifndef DIB_RGB_COLORS
 
369
#define DIB_RGB_COLORS 85
 
370
#endif
 
371
 
 
372
#ifndef SRCCOPY
 
373
#define SRCCOPY 482
 
374
#endif
 
375
 
 
376
#ifndef LPARAM
 
377
#define LPARAM int
 
378
#endif
 
379
 
 
380
#ifndef O_BINARY
 
381
#define O_BINARY 0
 
382
#endif
 
383
 
 
384
#ifndef O_TEXT
 
385
#define O_TEXT 0
 
386
#endif
 
387
 
 
388
#ifndef CREATE_NEW
 
389
#define CREATE_NEW 2
 
390
#endif
 
391
 
 
392
#ifndef RGB
 
393
#define RGB(r,g,b) ((Word32)(((Word8)(r)|((Word16)((Word8)(g))<<8))|(((Word32)(Word8)(b))<<16)))
 
394
#endif
 
395
 
 
396
#ifndef GENERIC_READ
 
397
#define GENERIC_READ 1
 
398
#endif
 
399
 
 
400
#ifndef GENERIC_WRITE
 
401
#define GENERIC_WRITE 2
 
402
#endif
 
403
 
 
404
#ifndef FILE_ATTRIBUTE_NORMAL
 
405
#define FILE_ATTRIBUTE_NORMAL 4
 
406
#endif
 
407
 
 
408
#ifndef INVALID_HANDLE_VALUE
 
409
#define INVALID_HANDLE_VALUE NULL
 
410
#endif
 
411
 
 
412
#ifndef LRESULT
 
413
#define LRESULT int
 
414
#endif
 
415
 
 
416
#define HMENU int
 
417
 
 
418
#include "winfuncs.h"
 
419
/* A bunch of windows DLL initialisation values. I don't know the
 
420
 * real values of these, so I just put in random values. They are not
 
421
 * used anyway, so no harm.
 
422
 */
 
423
 
 
424
#ifndef DLL_PROCESS_ATTACH
 
425
#define DLL_PROCESS_ATTACH 1
 
426
#endif
 
427
 
 
428
#ifndef DLL_PROCESS_DETACH
 
429
#define DLL_PROCESS_DETACH 2
 
430
#endif
 
431
 
 
432
#ifndef DLL_THREAD_ATTACH
 
433
#define DLL_THREAD_ATTACH 3
 
434
#endif
 
435
 
 
436
#ifndef DLL_THREAD_DETACH
 
437
#define DLL_THREAD_DETACH 4
 
438
#endif
 
439
 
 
440
#ifndef GWL_HINSTANCE
 
441
#define GWL_HINSTANCE 42
 
442
#endif
 
443
 
 
444
#ifndef WS_OVERLAPPEDWINDOW
 
445
#define WS_OVERLAPPEDWINDOW 6
 
446
#endif
 
447
 
 
448
#ifndef GRAY_BRUSH
 
449
#define GRAY_BRUSH 1
 
450
#endif
 
451
 
 
452
#ifndef NULL_BRUSH
 
453
#define NULL_BRUSH 0
 
454
#endif
 
455
 
 
456
#ifndef WM_DESTROY
 
457
#define WM_DESTROY 96
 
458
#endif
 
459
 
 
460
#ifndef WM_SIZE
 
461
#define WM_SIZE 10
 
462
#endif
 
463
 
 
464
#ifndef WM_PAINT
 
465
#define WM_PAINT 73
 
466
#endif
 
467
 
 
468
#ifndef WHITE_BRUSH
 
469
#define WHITE_BRUSH 939
 
470
#endif
 
471
 
 
472
#ifndef IDC_ARROW
 
473
#define IDC_ARROW 38
 
474
#endif
 
475
 
 
476
#ifndef IDI_ASTERISK
 
477
#define IDI_ASTERISK 939
 
478
#endif
 
479
 
 
480
#ifndef GHND
 
481
#define GHND 0x42
 
482
#endif
 
483
 
 
484
#ifndef GMEM_DDESHARE
 
485
#define GMEM_DDESHARE 0
 
486
#endif
 
487
 
 
488
#ifndef GMEM_DISCARDABLE
 
489
#define GMEM_DISCARDABLE 0
 
490
#endif
 
491
 
 
492
#ifndef GMEM_FIXED
 
493
#define GMEM_FIXED 0
 
494
#endif
 
495
 
 
496
#ifndef GMEM_LOWER
 
497
#define GMEM_LOWER 0
 
498
#endif
 
499
 
 
500
#ifndef GMEM_MOVEABLE
 
501
#define GMEM_MOVEABLE 0x02
 
502
#endif
 
503
 
 
504
#ifndef GMEM_NOCOMPACT
 
505
#define GMEM_NOCOMPACT 0
 
506
#endif
 
507
 
 
508
#ifndef GMEM_NODISCARD
 
509
#define GMEM_NODISCARD 0
 
510
#endif
 
511
 
 
512
#ifndef GMEM_NOT_BANKED
 
513
#define GMEM_NOT_BANKED 0
 
514
#endif
 
515
 
 
516
#ifndef GMEM_NOTIFY
 
517
#define GMEM_NOTIFY 0
 
518
#endif
 
519
 
 
520
#ifndef GMEM_SHARE
 
521
#define GMEM_SHARE 0
 
522
#endif
 
523
 
 
524
#ifndef GMEM_ZEROINIT
 
525
#define GMEM_ZEROINIT 0x0040
 
526
#endif
 
527
 
 
528
#ifndef GPTR
 
529
#define GPTR 0x40
 
530
#endif
 
531
 
 
532
#ifndef DRIVE_FIXED
 
533
#define DRIVE_FIXED 44
 
534
#endif
 
535
 
 
536
#ifndef ERROR_SUCCESS
 
537
#define ERROR_SUCCESS 0
 
538
#endif
 
539
 
 
540
#ifndef HKEY_CURRENT_USER
 
541
#define HKEY_CURRENT_USER 69
 
542
#endif
 
543
 
 
544
#ifndef KEY_ALL_ACCESS
 
545
#define KEY_ALL_ACCESS 100
 
546
#endif
 
547
 
 
548
#ifndef CP_ACP
 
549
#define CP_ACP 593
 
550
#endif
 
551
 
 
552
#ifndef MAX_COMPUTERNAME_LENGTH
 
553
#define MAX_COMPUTERNAME_LENGTH 100
 
554
#endif
 
555
 
 
556
#ifndef MB_SYSTEMMODAL
 
557
#define MB_SYSTEMMODAL 773
 
558
#endif
 
559
 
 
560
#ifndef ERROR_ALREADY_EXISTS
 
561
#define ERROR_ALREADY_EXISTS EEXIST
 
562
#endif
 
563
 
 
564
#ifndef OUT_DEFAULT_PRECIS
 
565
#define OUT_DEFAULT_PRECIS 253
 
566
#endif
 
567
 
 
568
#ifndef DEFAULT_QUALITY
 
569
#define DEFAULT_QUALITY 49
 
570
#endif
 
571
 
 
572
#ifndef CLIP_DEFAULT_PRECIS
 
573
#define CLIP_DEFAULT_PRECIS 7
 
574
#endif
 
575
 
 
576
#ifndef WM_COPYDATA
 
577
#define WM_COPYDATA 30
 
578
#endif
 
579
 
 
580
#ifndef MB_ICONSTOP
 
581
#define MB_ICONSTOP 888
 
582
#endif
 
583
 
 
584
#ifdef __cplusplus
 
585
    }
 
586
#endif
 
587
 
 
588
#endif /* not WIN32 */
 
589
 
 
590
#endif