Changeset 21916 for trunk/include


Ignore:
Timestamp:
Dec 18, 2011, 10:28:22 PM (14 years ago)
Author:
dmik
Message:

Merge branch gcc-kmk to trunk.

Location:
trunk
Files:
34 deleted
59 edited
7 copied

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 bin
        2 Makefile.inc
         1env.cmd
         2LocalConfig.kmk
    • Property svn:mergeinfo set to
      /branches/gcc-kmkmergedeligible
  • trunk/include/HandleManager.h

    r21301 r21916  
    6767 *****************************************************************************/
    6868
     69#ifdef __cplusplus
     70extern "C" {
     71#endif
    6972
    7073/*****************************************************************************
     
    120123 *****************************************************************************/
    121124
    122 // enable C linkage to avoid parameter mangling
    123 #ifdef __cplusplus__
    124 extern "C" {
    125 #endif
    126 
    127125HANDLE HMCreateEvent                (LPSECURITY_ATTRIBUTES      lpsa,
    128126                                     BOOL                       bManualReset,
     
    154152                                     LPCSTR                    lpName);
    155153
    156 BOOL   HMSetHandleInformation       (HANDLE hObject, 
     154BOOL   HMSetHandleInformation       (HANDLE hObject,
    157155                                     DWORD  dwMask,
    158156                                     DWORD  dwFlags);
     
    349347BOOL HMGetFileNameFromHandle(HANDLE hFile, LPSTR lpszFileName, DWORD cbFileName);
    350348
    351 #ifdef __cplusplus__
    352   }
     349#ifdef __cplusplus
     350} // extern "C"
    353351#endif
    354352
  • trunk/include/_ras.h

    r21301 r21916  
    1515#ifdef RAS
    1616
     17#ifdef __cplusplus
     18extern "C" {
     19#endif
     20
    1721/* The RAS subsystem initialization/deinitialization */
    1822
     
    2024                 HMODULE hmod                    /* the custom dll handle */
    2125             );
    22              
     26
    2327void WIN32API RasUninitialize (
    2428                  void
     
    3337                  ULONG cb                       /* size of event specific data */
    3438              );
    35              
     39
    3640/* RAS events */
    3741#define RAS_EVENT_Kernel32InitComplete  (1)
     
    4347typedef void WIN32API FNCLF (ULONG h);
    4448typedef void WIN32API FNWL (ULONG h, char *buf, ULONG buflen);
    45  
     49
    4650/* Tracked objects logging functions typedefs */
    47 typedef void WIN32API FNRASLOG_EXTERNAL (char *fmt, ...);
     51typedef void WIN32API_VA FNRASLOG_EXTERNAL (const char *fmt, ...);
    4852
    4953typedef ULONG WIN32API FNLOC (ULONG objident, ULONG objhandle, void *objdata, ULONG cbobjdata, FNRASLOG_EXTERNAL *pRasLog);
     
    6266void WIN32API RasRegisterObjectTracking (
    6367                  RAS_TRACK_HANDLE *ph,           /* returned handle */
    64                   char *objname,                  /* arbitrary distinguishable object name */
     68                  const char *objname,            /* arbitrary distinguishable object name */
    6569                  ULONG cbuserdata,               /* extra data size */
    6670                  ULONG flags,                    /* object tracking flags */
     
    6872                  FNCOC *pfnCompareObjectContent  /* custom function to compare two objects */
    6973              );
    70              
     74
    7175void WIN32API RasDeregisterObjectTracking (
    7276                  RAS_TRACK_HANDLE h              /* handle previously returned by RasRegisterObjectTracking */
    7377              );
    74              
     78
    7579ULONG WIN32API RasAddObject (                     /* returns unique object ident */
    7680                  RAS_TRACK_HANDLE h,             /* handle previously returned by RasRegisterObjectTracking */
     
    7983                  ULONG cbobjdata                 /* size of object */
    8084              );
    81              
     85
    8286void WIN32API RasTrackMemAlloc (
    8387                  RAS_TRACK_HANDLE h,             /* handle previously returned by RasRegisterObjectTracking */
    8488                  ULONG size
    8589              );
    86              
     90
    8791void WIN32API RasTrackMemRealloc (
    8892                  RAS_TRACK_HANDLE h,             /* handle previously returned by RasRegisterObjectTracking */
     
    9094                  ULONG newsize
    9195              );
    92              
     96
    9397void WIN32API RasTrackMemFree (
    9498                  RAS_TRACK_HANDLE h,             /* handle previously returned by RasRegisterObjectTracking */
    9599                  ULONG size
    96100              );
    97              
     101
    98102void WIN32API RasRemoveObject (
    99103                  RAS_TRACK_HANDLE h,             /* handle previously returned by RasRegisterObjectTracking */
    100104                  ULONG objhandle                 /* distinctive handle of the object */
    101105              );
    102              
     106
    103107void WIN32API RasSetObjectUserData (
    104108                  RAS_TRACK_HANDLE h,             /* handle previously returned by RasRegisterObjectTracking */
     
    108112                  ULONG *pcbdataret               /* returned size of data actually saved */
    109113              );
    110              
     114
    111115void WIN32API RasQueryObjectUserData (
    112116                  RAS_TRACK_HANDLE h,             /* handle previously returned by RasRegisterObjectTracking */
     
    127131
    128132/* RAS logging channels */
    129 typedef struct _RAS_LOG_CHANNEL;
    130133typedef struct _RAS_LOG_CHANNEL *RAS_LOG_CHANNEL_H;
    131134
     
    135138                  const char *filename             /* file name to log to */
    136139              );
    137              
     140
    138141void WIN32API RasWriteLogChannel (
    139142                  RAS_LOG_CHANNEL_H hchannel,      /* log channel handle returned by RasOpenLogChannel */
     
    147150
    148151/* RAS logging functions */
    149 void WIN32API RasLog (
    150                   char *fmt,                       /* 'printf' style format string */
    151                   ...
    152               );
    153 
    154 void WIN32API RasLogNoEOL (
    155                   char *fmt,                       /* 'printf' style format string */
     152void WIN32API_VA RasLog (
     153                  const char *fmt,                 /* 'printf' style format string */
     154                  ...
     155              );
     156
     157void WIN32API_VA RasLogNoEOL (
     158                  const char *fmt,                 /* 'printf' style format string */
    156159                  ...
    157160              );
     
    162165                  ULONG parm2                      /* message parameter 2 */
    163166              );
    164        
     167
    165168#define RAS_FLAG_LOG_OBJECTS (0x1)
    166169
     
    170173              );
    171174
    172 void WIN32API RasLog2 (
     175void WIN32API_VA RasLog2 (
    173176                  RAS_LOG_CHANNEL_H hchannel,      /* log channel to log to */
    174177                  char *fmt,                       /* 'printf' style format string */
     
    176179              );
    177180
    178 void WIN32API RasLogNoEOL2 (
     181void WIN32API_VA RasLogNoEOL2 (
    179182                  RAS_LOG_CHANNEL_H hchannel,      /* log channel to log to */
    180                   char *fmt,                       /* 'printf' style format string */ 
     183                  char *fmt,                       /* 'printf' style format string */
    181184                  ...
    182185              );
     
    188191                  ULONG parm2                      /* message parameter 2 */
    189192              );
    190        
     193
    191194/* RAS replacement for C runtime sprintf function */
     195#ifdef __GNUC__
     196int WIN32API_VA ras_snprintf (
     197#else
    192198int WIN32API snprintf (
     199#endif
    193200                  char *buf,                       /* memory buffer for formatted string */
    194201                  int n,                           /* length of memeory buffer */
    195                   const char *fmt,                 /* 'printf' style format string */ 
     202                  const char *fmt,                 /* 'printf' style format string */
    196203                  ...
    197204             );
    198              
     205
    199206/* Tracked object counting function */
    200207void WIN32API RasCountObjects (
     
    215222 * any external API (OS/2 and or C runtime functions).
    216223 */
    217  
     224
    218225typedef struct _RASCONTEXT
    219226{
     
    238245              );
    239246
     247#ifdef __cplusplus
     248} // extern "C"
     249#endif
    240250
    241251/* RAS entries that are passed to plugin to use
     
    245255    ULONG cb;
    246256
    247     void  (* WIN32API RasRegisterObjectTracking) (RAS_TRACK_HANDLE *ph, char *objname, ULONG cbuserdata, ULONG flags, FNLOC *pfnLogObjectContent, FNCOC *pfnCompareObjectContent);
     257    void  (* WIN32API RasRegisterObjectTracking) (RAS_TRACK_HANDLE *ph, const char *objname, ULONG cbuserdata, ULONG flags, FNLOC *pfnLogObjectContent, FNCOC *pfnCompareObjectContent);
    248258    void  (* WIN32API RasDeregisterObjectTracking) (RAS_TRACK_HANDLE h);
    249259    ULONG (* WIN32API RasAddObject) (RAS_TRACK_HANDLE h, ULONG objhandle, void *objdata, ULONG cbobjdata);
     
    256266    void  (* WIN32API RasWriteLogChannel) (RAS_LOG_CHANNEL_H hchannel, const char *msg, ULONG length);
    257267    void  (* WIN32API RasCloseLogChannel) (RAS_LOG_CHANNEL_H hchannel);
    258     void  (* WIN32API RasLog) (RAS_LOG_CHANNEL_H hchannel, char *fmt, ...);
    259     void  (* WIN32API RasLogNoEOL) (RAS_LOG_CHANNEL_H hchannel, char *fmt, ...);
     268    void  (* WIN32API_VA RasLog) (RAS_LOG_CHANNEL_H hchannel, char *fmt, ...);
     269    void  (* WIN32API_VA RasLogNoEOL) (RAS_LOG_CHANNEL_H hchannel, char *fmt, ...);
    260270    void  (* WIN32API RasLogMsg) (RAS_LOG_CHANNEL_H hchannel, ULONG msg, ULONG parm1, ULONG parm2);
    261     int   (* WIN32API snprintf) (char *buf, int n, const char *fmt, ...);
     271    int   (* WIN32API_VA snprintf) (char *buf, int n, const char *fmt, ...);
    262272    void  (* WIN32API RasSaveContext) (RASCONTEXT *pcontext);
    263273    void  (* WIN32API RasRestoreContext) (RASCONTEXT *pcontext);
     
    269279    void  (* WIN32API RasTrackMemFree) (RAS_TRACK_HANDLE h, ULONG size);
    270280    RAS_TRACK_HANDLE (* WIN32API RasGetTrackHandle) (const char *objname);
    271              
     281
    272282} RasEntryTable;
    273283
     
    286296
    287297/* RAS breakpoint support */
     298#if defined(__GNUC__)
     299#include <sys/builtin.h>
     300#else
    288301#include <builtin.h>
     302#endif
    289303
    290304#ifdef __cplusplus
     
    299313#define RasDebugInt3_x(a, b, c) RasBreakPoint(__FILE__, __FUNCTION__, __LINE__, a, b, c)
    300314
    301 void __INLINE RasBreakPoint (char *szFile, char *szFunction, int iLine, ULONG msg, ULONG parm1, ULONG parm2)
     315void __INLINE RasBreakPoint (const char *szFile, const char *szFunction, int iLine, ULONG msg, ULONG parm1, ULONG parm2)
    302316{
    303317    RasLog ("BreakPoint at %s(%d)::%s", szFile, iLine, szFunction);
  • trunk/include/auxthread.h

    r21596 r21916  
    1515#endif
    1616
     17#ifdef __cplusplus
     18extern "C" {
     19#endif
     20
    1721typedef PVOID (* PAUXTHREADFN)(PVOID arg1, PVOID arg2, PVOID arg3, PVOID arg4);
    1822
     
    2529VOID StopAuxThread();
    2630
     31#ifdef __cplusplus
     32} // extern "C"
     33#endif
     34
    2735#endif //__AUXTHREAD_H__
  • trunk/include/cpuhlp.h

    r8991 r21916  
    3939#if (__IBMC__ >= 360) || (__IBMCPP__ >= 360)
    4040#define CONTROL87(a,b)  __control87(a, b)
    41 #else
    42 #if (__IBMCPP__ == 300) || (__IBMC__ == 300)
     41#elif (__IBMCPP__ == 300) || (__IBMC__ == 300)
    4342#define CONTROL87(a,b)  _control87(a, b)
    44 #else
    45 #ifdef __WATCOMC__
     43#elif defined(__WATCOMC__) || defined(__GNUC__)
    4644#define CONTROL87(a,b)  _control87(a, b)
    4745#else
    4846#error  CONTROL87 undefined
    49 #endif
    50 #endif
    5147#endif
    5248
  • trunk/include/custombuild.h

    r21327 r21916  
    22#define __CUSTOMBUILD_H__
    33
    4 #include <win\peexe.h>
     4#include <win/peexe.h>
    55#include <initdll.h>
    66
     
    3434typedef BOOL (WIN32API *PFN_ENDCUSTOMIZE)();
    3535typedef BOOL (WIN32API *PFN_ISPESTUBLOADER)(char *pszProgram);
     36
     37typedef ULONG (APIENTRY *PFN_INITDLL)(ULONG hModule, ULONG ulFlag);
     38typedef void  (APIENTRY *PFN_CLEANUPDLL)(ULONG ulReason);
    3639
    3740typedef struct {
     
    139142
    140143} CUSTOMBUILD_COMMON;
     144
     145#ifdef __cplusplus
     146extern "C" {
     147#endif
    141148
    142149BOOL WIN32API LoadCustomEnvironment(CUSTOMBUILD_COMMON *CustomBuild);
     
    251258//Override std class names used in Odin
    252259void  WIN32API SetCustomStdClassName(LPSTR pszStdClassName);
    253 char *WIN32API QueryCustomStdClassName();
     260const char *WIN32API QueryCustomStdClassName();
    254261
    255262//Turn off ASPI
     
    509516
    510517//PE headers of system dlls
    511 #ifdef __cplusplus
    512 extern "C" {
    513 #endif
    514518extern IMAGE_FILE_HEADER nt_ntdll_header;
    515519extern IMAGE_FILE_HEADER nt_gdi32_header;
     
    552556extern IMAGE_FILE_HEADER nt_winscard_header;
    553557extern IMAGE_FILE_HEADER nt_shdocvw_header;
     558
    554559#ifdef __cplusplus
    555 }
     560} // extern "C"
    556561#endif
    557562
  • trunk/include/dbglog.h

    r21601 r21916  
    7878
    7979
    80 int  SYSTEM WriteLog(char *tekst, ...);
    81 int  SYSTEM WriteLogNoEOL(char *tekst, ...);
    82 int  SYSTEM WritePrivateLog(void *logfile, char *tekst, ...);
     80int  SYSTEM WriteLog(const char *tekst, ...);
     81int  SYSTEM WriteLogNoEOL(const char *tekst, ...);
     82int  SYSTEM WritePrivateLog(void *logfile, const char *tekst, ...);
    8383
    8484void SYSTEM DecreaseLogCount();
     
    9999
    100100/* enable support for the _interrupt() statement */
    101 #if (defined(__IBMCPP__) || defined(__IBMC__))
     101#if defined(__IBMCPP__) || defined(__IBMC__) || defined(__GNUC__)
     102
     103#ifndef __GNUC__
    102104#  include <builtin.h>
     105#endif
     106
    103107#ifdef DEBUG
     108
    104109#ifdef __cplusplus
    105110
    106 #define DebugInt3() BreakPoint(__FILE__, __FUNCTION__, __LINE__)
     111#ifdef PRIVATE_LOGGING
     112#define DebugInt3() do { \
     113    dprintf((LOG, "BREAKPOINT %s %s %d", __FILE__, __FUNCTION__, __LINE__)); \
     114    _interrupt(3); \
     115} while (0)
     116#else
     117#define DebugInt3() do { \
     118    dprintf(("BREAKPOINT %s %s %d", __FILE__, __FUNCTION__, __LINE__)); \
     119    _interrupt(3); \
     120} while (0)
     121#endif
    107122
    108 void inline BreakPoint(char *szFile, char *szFunction, int iLine)
    109 {
    110     dprintf(("BREAKPOINT %s %s %d", szFile, szFunction, iLine));
    111     _interrupt(3);
    112 }
    113 
    114 #else
     123#else /* __cplusplus */
    115124  #define DebugInt3()   _interrupt(3)
    116125#endif
    117 #else
     126
     127#else /* DEBUG */
    118128  #define DebugInt3()
    119129#endif
    120130
    121 #else
     131#else /* defined(__IBMCPP__) || defined(__IBMC__) || defined(__GNUC__) */
     132
    122133#ifdef DEBUG
    123134  #define DebugInt3()   _asm int 3;
     
    126137#endif
    127138
    128 #endif
     139#endif /* defined(__IBMCPP__) || defined(__IBMC__) || defined(__GNUC__) */
    129140
    130141#ifdef __cplusplus
  • trunk/include/exceptions.h

    r3124 r21916  
    1818 * Exception codes
    1919 */
    20  
     20
    2121#define STATUS_SUCCESS                   0x00000000
    2222#define STATUS_WAIT_0                    0x00000000
     
    2525#define STATUS_TIMEOUT                   0x00000102
    2626#define STATUS_PENDING                   0x00000103
    27 #define STATUS_GUARD_PAGE_VIOLATION      0x80000001   
     27#define STATUS_GUARD_PAGE_VIOLATION      0x80000001
    2828#define STATUS_DATATYPE_MISALIGNMENT     0x80000002
    2929#define STATUS_BREAKPOINT                0x80000003
     
    8989#define WINCONTEXT_i386      0x00010000
    9090#define WINCONTEXT_i486      WINCONTEXT_i386
    91 #define WINCONTEXT_CONTROL   (WINCONTEXT_i386 | 0x0001) 
    92 #define WINCONTEXT_INTEGER   (WINCONTEXT_i386 | 0x0002) 
    93 #define WINCONTEXT_SEGMENTS  (WINCONTEXT_i386 | 0x0004) 
    94 #define WINCONTEXT_FLOATING_POINT  (WINCONTEXT_i386 | 0x0008L) 
    95 #define WINCONTEXT_DEBUG_REGISTERS (WINCONTEXT_i386 | 0x0010L) 
     91#define WINCONTEXT_CONTROL   (WINCONTEXT_i386 | 0x0001)
     92#define WINCONTEXT_INTEGER   (WINCONTEXT_i386 | 0x0002)
     93#define WINCONTEXT_SEGMENTS  (WINCONTEXT_i386 | 0x0004)
     94#define WINCONTEXT_FLOATING_POINT  (WINCONTEXT_i386 | 0x0008L)
     95#define WINCONTEXT_DEBUG_REGISTERS (WINCONTEXT_i386 | 0x0010L)
    9696#define WINCONTEXT_FULL (WINCONTEXT_CONTROL | WINCONTEXT_INTEGER | WINCONTEXT_SEGMENTS)
    9797
     
    145145
    146146
    147 #define WINEXCEPTION_NONCONTINUABLE     0x1   
    148 #define WINEXCEPTION_MAXIMUM_PARAMETERS 15     
     147#define WINEXCEPTION_NONCONTINUABLE     0x1
     148#define WINEXCEPTION_MAXIMUM_PARAMETERS 15
    149149
    150150typedef struct _WINEXCEPTION_RECORD {
     
    197197 * Return values from filters in except() and from UnhandledExceptionFilter
    198198 */
    199  
     199
    200200#define WINEXCEPTION_EXECUTE_HANDLER        1
    201201#define WINEXCEPTION_CONTINUE_SEARCH        0
     
    206206#pragma pack()
    207207
     208#ifdef __cplusplus
     209extern "C" {
     210#endif
     211
    208212DWORD RtlDispatchException(WINEXCEPTION_RECORD *pRecord, WINCONTEXT *pContext);
    209213
     214#ifdef __cplusplus
     215} // extern "C"
    210216#endif
     217
     218#endif
  • trunk/include/heapshared.h

    r21301 r21916  
    1818
    1919#ifdef DEBUG
    20     void * _System _debug_smalloc(int size, char *pszFile, int linenr);
    21     void * _System _debug_smallocfill(int size, int filler, char *pszFile, int linenr);
    22     void   _System _debug_sfree(void *chunk, char *pszFile, int linenr);
     20    void * _System _debug_smalloc(int size, const char *pszFile, int linenr);
     21    void * _System _debug_smallocfill(int size, int filler, const char *pszFile, int linenr);
     22    void   _System _debug_sfree(void *chunk, const char *pszFile, int linenr);
    2323
    2424    #define _smalloc(a)         _debug_smalloc((a),__FILE__,__LINE__)
  • trunk/include/heapstring.h

    r10192 r21916  
    99#include <odin.h>
    1010
    11 #include <wine\unicode.h>
     11#include <wine/unicode.h>
    1212//SvL: strcase -> case insensitive!
    1313#define strncasecmp lstrncmpiA
     
    8888  {                                                                      \
    8989    int len = MultiByteToWideChar( CP_ACP, 0, strA, -1, NULL, 0);        \
    90     strW = (LPWSTR)_alloca( len*sizeof(WCHAR) );                         \
     90    strW = (LPWSTR)alloca( len*sizeof(WCHAR) );                          \
    9191    MultiByteToWideChar(CP_ACP, 0, strA, -1, strW, len);                 \
    9292  }
     
    9797  {                                                                      \
    9898      int len = WideCharToMultiByte( CP_ACP, 0, strW, -1, NULL, 0, 0, NULL);\
    99       strA = (LPSTR)_alloca(len);                                        \
     99      strA = (LPSTR)alloca(len);                                         \
    100100      WideCharToMultiByte(CP_ACP, 0, strW, -1, strA, len, 0, NULL );     \
    101101  }
     
    104104  {                                                                      \
    105105    int iLength = lstrlenA(strSrc) + 1;                                  \
    106     strDest = (LPSTR)_alloca( iLength );                                 \
     106    strDest = (LPSTR)alloca( iLength );                                  \
    107107    memcpy( strDest, strSrc, iLength);                                   \
    108108  }
     
    111111  {                                                                      \
    112112    int iLength = lstrlenW(strSrc) + 1;                                  \
    113     strDest = (LPWSTR)_alloca( iLength * sizeof(WCHAR) );                \
     113    strDest = (LPWSTR)alloca( iLength * sizeof(WCHAR) );                 \
    114114    memcpy( strDest, strSrc, iLength * sizeof(WCHAR) );                  \
    115115  }
  • trunk/include/initdll.h

    r21654 r21916  
     1/** @file
     2 *
     3 * INITDLL library interface.
     4 *
     5 * Project Odin Software License can be found in LICENSE.TXT
     6 */
     7
    18#ifndef __INITDLL_H__
    29#define __INITDLL_H__
    310
    4 #if (defined(__IBMCPP__) || defined(__IBMC__) || defined(__INNOTEK_LIBC__))
     11#include <odin.h>
     12#include <win32type.h>
    513
    6 #define DLLENTRYPOINT_CCONV SYSTEM
    7 #define DLLENTRYPOINT_NAME  _DLL_InitTerm
     14#ifndef MAYBE_WEAK
     15#define MAYBE_WEAK
     16#endif
     17
     18/**
     19 * Called to initialize resources of the DLL module when it is loaded.
     20 *
     21 * This callback function is implemented by modules that link to initldll.lib
     22 * and want to override the default DLL initialization procedure called when the
     23 * DLL is loaded by the system (according to the INIT/TERM policy specified in
     24 * the LIBRARY statement in the .DEF file). See DLL_InitDefault() for more
     25 * information about the default initialization procedure.
     26 *
     27 * On success, the returned value must be the DosExitList() order code (high
     28 * byte of the low word) that defines the order in which DLL_Term() will be
     29 * called WRT other uninitialization routines and exit list handlers. Returning
     30 * 0 will cause DLL_Term() to be called first. Note that if several handlers
     31 * use the same order code they are called in LIFO order. For DLLs, this means
     32 * that DLL_Term() will be called in the order opposite to DLL_Init().
     33 *
     34 * @param hModule DLL module handle.
     35 * @return Exit list order on success or -1 to indicate a failure.
     36 */
     37ULONG SYSTEM DLL_Init(ULONG hModule) MAYBE_WEAK;
     38
     39/**
     40 * Called to free resources of the DLL module when it is unloaded.
     41 *
     42 * This callback function is implemented by modules that link to initldll.lib
     43 * and want to override the default DLL uninitialization procedure called when
     44 * the DLL is unloaded by the system (according to the INIT/TERM policy
     45 * specified in the LIBRARY statement in the .DEF file). See DLL_TermDefault()
     46 * for more information about the default uninitialization procedure.
     47 *
     48 * @param hModule DLL module handle.
     49 */
     50void SYSTEM DLL_Term(ULONG hModule) MAYBE_WEAK;
     51
     52/**
     53 * Default DLL initialization procedure.
     54 *
     55 * This procedure is called if your module does not implement the DLL_Init()
     56 * callback function. It performs steps necessary to initializes the C/C++
     57 * runtime.
     58 *
     59 * You may call this procedure from your DLL_Init() implementation to perform
     60 * the standard initialization steps described above.
     61 *
     62 * @param hModule DLL module handle.
     63 * @return 0 on success or -1 to indicate a failure.
     64 */
     65ULONG SYSTEM DLL_InitDefault(ULONG hModule);
     66
     67/**
     68 * Default DLL uninitialization procedure.
     69 *
     70 * This procedure is called if your module does not implement the DLL_Term()
     71 * callback function. It performs steps necessary to terminate the C/C++
     72 * runtime.
     73 *
     74 * You may call this procedure from your DLL_Uniit() implementation to perform
     75 * the standard initialization steps described above.
     76 *
     77 * @param hModule DLL module handle.
     78 */
     79void SYSTEM DLL_TermDefault(ULONG hModule);
    880
    981#ifdef __cplusplus
     
    1183#endif
    1284
     85#if defined(__IBMCPP__) || defined(__IBMC__)
     86
     87/**
     88 * C run-time environment initialization function.
     89 * Returns 0 to indicate success and -1 to indicate failure.
     90 */
     91int  _Optlink _CRT_init(void);
     92
     93/**
     94 * C run-time environment termination function.
     95 * It only needs to be called when the C run-time functions are statically
     96 * linked.
     97 */
     98void _Optlink _CRT_term(void);
     99
    13100#if (__IBMCPP__ == 300) || (__IBMC__ == 300)
    14 void _Optlink __ctordtorInit( void );
    15 #define ctordtorInit()  __ctordtorInit()
    16101
    17 void _Optlink __ctordtorTerm( void );
    18 #define ctordtorTerm()  __ctordtorTerm()
     102void _Optlink __ctordtorInit(void);
     103void _Optlink __ctordtorTerm(void);
    19104
    20105#elif (__IBMCPP__ == 360) || (__IBMC__ == 360) || (__IBMC__ == 430)
    21 void _Optlink __ctordtorInit( int flag );
    22 #define ctordtorInit()  __ctordtorInit(0)
    23106
    24 void _Optlink __ctordtorTerm( int flag );
    25 #define ctordtorTerm()  __ctordtorTerm(0)
     107void _Optlink __ctordtorInit(int flag);
     108#define __ctordtorInit()  __ctordtorInit(0)
    26109
    27 #elif defined(__INNOTEK_LIBC__)
     110void _Optlink __ctordtorTerm(int flag);
     111#define __ctordtorTerm()  __ctordtorTerm(0)
    28112
    29 extern void __ctordtorInit(void);
    30 extern void __ctordtorTerm(void);
     113#else
     114#error "Unknown VAC compiler version!"
     115#endif
     116
     117#elif defined(__EMX__)
     118
     119int  _CRT_init(void);
     120void _CRT_term(void);
     121
     122void __ctordtorInit(void);
     123void __ctordtorTerm(void);
     124
     125#elif defined(__WATCOMC__)
     126
     127#define _DLL_InitTerm LibMain
     128
     129int  _Optlink _CRT_init(void);
     130void _Optlink _CRT_term(void);
     131
     132#define __ctordtorInit()
     133#define __ctordtorTerm()
     134
     135//prevent Watcom from mucking with this name
     136extern DWORD _Resource_PEResTab;
     137#pragma aux _Resource_PEResTab "*";
    31138
    32139#else
     
    34141#endif
    35142
    36 #ifndef __INNOTEK_LIBC__
    37 
    38 /*-------------------------------------------------------------------*/
    39 /* _CRT_init is the C run-time environment initialization function.  */
    40 /* It will return 0 to indicate success and -1 to indicate failure.  */
    41 /*-------------------------------------------------------------------*/
    42 int  _Optlink _CRT_init(void);
    43 
    44 /*-------------------------------------------------------------------*/
    45 /* _CRT_term is the C run-time environment termination function.     */
    46 /* It only needs to be called when the C run-time functions are      */
    47 /* statically linked.                                                */
    48 /*-------------------------------------------------------------------*/
    49 void _Optlink _CRT_term(void);
    50 #endif // __INNOTEK_LIBC__
    51 
     143BOOL APIENTRY InitializeKernel32();
     144VOID APIENTRY ReportFatalDllInitError(LPCSTR pszModName);
    52145
    53146#ifdef __cplusplus
    54 }
    55 #endif
    56 
    57 #elif defined(__WATCOMC__)
    58 
    59 #define DLLENTRYPOINT_CCONV APIENTRY
    60 #define DLLENTRYPOINT_NAME  LibMain
    61 
    62 #define ctordtorInit()
    63 #define ctordtorTerm()
    64 
    65 #ifdef __cplusplus
    66 extern "C" {
    67 //prevent Watcom from mucking with this name
    68 extern DWORD _Resource_PEResTab;
    69 #pragma aux _Resource_PEResTab "*";
    70 }
    71 #endif
    72 
    73 #endif  /* IBM CPP Compiler */
    74 
    75 #ifdef __cplusplus
    76 extern "C" {
    77 #endif
    78 
    79 typedef ULONG (APIENTRY *PFN_INITDLL)(ULONG hModule, ULONG ulFlag);
    80 typedef void  (APIENTRY *PFN_CLEANUPDLL)(ULONG ulReason);
    81 
    82 ULONG APIENTRY inittermKernel32(ULONG hModule, ULONG ulFlag);
    83 void  APIENTRY cleanupKernel32(ULONG ulReason);
    84 
    85 ULONG APIENTRY inittermUser32(ULONG hModule, ULONG ulFlag);
    86 void  APIENTRY cleanupUser32(ULONG ulReason);
    87 ULONG APIENTRY inittermOdinCtrl(ULONG hModule, ULONG ulFlag);
    88 
    89 //NOTE!!!!!!!!!!!!!!!!!
    90 //if this list is extended, then update our custombuild code!!!!
    91 //NOTE!!!!!!!!!!!!!!!!!
    92 ULONG APIENTRY inittermWinmm(ULONG hModule, ULONG ulFlag);
    93 ULONG APIENTRY inittermShell32(ULONG hModule, ULONG ulFlag);
    94 ULONG APIENTRY inittermOle32(ULONG hModule, ULONG ulFlag);
    95 ULONG APIENTRY inittermComdlg32(ULONG hModule, ULONG ulFlag);
    96 ULONG APIENTRY inittermComctl32(ULONG hModule, ULONG ulFlag);
    97 ULONG APIENTRY inittermGdi32(ULONG hModule, ULONG ulFlag);
    98 ULONG APIENTRY inittermNTDLL(ULONG hModule, ULONG ulFlag);
    99 ULONG APIENTRY inittermWsock32(ULONG hModule, ULONG ulFlag);
    100 ULONG APIENTRY inittermWininet(ULONG hModule, ULONG ulFlag);
    101 ULONG APIENTRY inittermRpcrt4(ULONG hModule, ULONG ulFlag);
    102 ULONG APIENTRY inittermAvifil32(ULONG hModule, ULONG ulFlag);
    103 ULONG APIENTRY inittermQuartz(ULONG hModule, ULONG ulFlag);
    104 ULONG APIENTRY inittermRiched32(ULONG hModule, ULONG ulFlag);
    105 ULONG APIENTRY inittermWnaspi32(ULONG hModule, ULONG ulFlag);
    106 ULONG APIENTRY inittermUxTheme(ULONG hModule, ULONG ulFlag);
    107 ULONG APIENTRY inittermDInput(ULONG hModule, ULONG ulFlag);
    108 ULONG APIENTRY inittermDSound(ULONG hModule, ULONG ulFlag);
    109 ULONG APIENTRY inittermWinSpool(ULONG hModule, ULONG ulFlag);
    110 ULONG APIENTRY inittermDDraw(ULONG hModule, ULONG ulFlag);
    111 ULONG APIENTRY inittermNTDLL(ULONG hModule, ULONG ulFlag);
    112 ULONG APIENTRY inittermMSVCRT(ULONG hModule, ULONG ulFlag);
    113 ULONG APIENTRY inittermImm32(ULONG hModule, ULONG ulFlag);
    114 ULONG APIENTRY inittermCrypt32(ULONG hModule, ULONG ulFlag);
    115 ULONG APIENTRY inittermOleacc(ULONG hModule, ULONG ulFlag);
    116 ULONG APIENTRY inittermmscms(ULONG hModule, ULONG ulFlag);
    117 ULONG APIENTRY inittermRsaenh(ULONG hModule, ULONG ulFlag);
    118 ULONG APIENTRY inittermSecur32(ULONG hModule, ULONG ulFlag);
    119 
    120 ULONG APIENTRY InitializeKernel32();
    121 
    122 VOID APIENTRY ReportFatalDllInitError(CHAR *pszModName);
    123 
    124 #ifdef __cplusplus
    125 }
     147} // extern "C"
    126148#endif
    127149
  • trunk/include/kbdhook.h

    r10383 r21916  
    2929#define PMKBDHK_HOOK_TERM   "_hookKill@0"
    3030
     31#ifdef __cplusplus
     32extern "C" {
     33#endif
    3134
    3235typedef BOOL  (* WIN32API PFN_HOOKINIT)(ULONG hab, char *lpszWindowClass);
     
    3639BOOL WIN32API hookKill(ULONG hab);
    3740
     41#ifdef __cplusplus
     42} // extern "C"
     43#endif
     44
    3845#endif  // __KBDHOOK_H
    3946
  • trunk/include/memmap.h

    r10376 r21916  
    11#ifndef __MEMMAP_H
    22#define __MEMMAP_H
     3
     4#ifdef __cplusplus
     5extern "C" {
     6#endif
    37
    48#ifndef _DEF_PFNEXCEPTIONNOTIFY
     
    1014BOOL WIN32API MMAP_UnregisterMemoryRange(LPVOID lpViewAddr);
    1115
     16#ifdef __cplusplus
     17} // extern "C"
     18#endif
     19
    1220#endif  /*__MEMMAP_H */
    1321
  • trunk/include/objhandle.h

    r10338 r21916  
    4646//...
    4747
     48#ifdef __cplusplus
     49extern "C" {
     50#endif
     51
    4852typedef ULONG OBJHANDLE;
    4953
     
    6468#define ObjWinToOS2Region(a)    ObjQueryHandleData(a, HNDL_REGION)
    6569
     70#ifdef __cplusplus
     71} // extern "C"
     72#endif
     73
    6674#endif //__OBJHANDLE_H__
  • trunk/include/odin.h

    r21597 r21916  
    8181  #endif
    8282  #define CDECL     _cdecl
    83   #define EXPORT    _export
     83  #define EXPORT    __attribute__ ((dllexport))
    8484  #define WIN32API  __stdcall
    8585  #define WINAPI    __stdcall
     
    9393  #ifdef __INNOTEK_LIBC__
    9494  #define SYSTEM    _System
     95  #define _LNK_CONV
    9596  #else
    9697  #define SYSTEM    CDECL
    9798  #endif
     99
     100  #define min(a,b) \
     101    ({ __typeof__ (a) _a = (a); \
     102      __typeof__ (b) _b = (b); \
     103      _a < _b ? _a : _b; })
     104  #define max(a,b) \
     105    ({ __typeof__ (a) _a = (a); \
     106      __typeof__ (b) _b = (b); \
     107      _a > _b ? _a : _b; })
     108
     109  #define _interrupt(n) __asm__ __volatile__ ("int" #n "\n\tnop")
    98110
    99111#else
     
    160172#endif
    161173
    162 
     174#ifdef __GNUC__
     175// __stdcall in GCC for OS/2 incorrectly mangles vararg functions; according to
     176// MSDN, they should be equal to __cdecl instead of getting the @N suffix
     177#define WIN32API_VA __cdecl
     178#else
     179#define WIN32API_VA WIN32API
     180#endif
    163181
    164182#endif /* _ODIN_H_*/
  • trunk/include/odinapi.h

    r21301 r21916  
    2828#endif
    2929
     30#ifdef __cplusplus
     31extern "C" {
     32#endif
     33
    3034/**
    3135 * Gets the type of an object.
     
    3741unsigned WIN32API HMQueryObjectType(HANDLE hObject);
    3842
     43#ifdef __cplusplus
     44} // extern "C"
     45#endif
     46
    3947/** @} */
    4048
  • trunk/include/odinbuild.h

    r21685 r21916  
    1212#define _ODINBUILD_H_
    1313
     14#ifdef __cplusplus
     15extern "C" {
     16#endif
     17
    1418/*
    1519 * API for querying the build number of Odin32. Well.. Kernel32 really...
     
    1721#ifdef WIN32API
    1822int     WIN32API Odin32GetBuildNumber(void);
     23#endif
     24
     25#ifdef __cplusplus
     26} // extern "C"
    1927#endif
    2028
  • trunk/include/odincrt.h

    r21425 r21916  
    1717} CRITICAL_SECTION_OS2, *PCRITICAL_SECTION_OS2;
    1818
     19#ifndef OS2_INCLUDED
     20typedef const char *PCSZ;
     21#endif
     22
     23#ifdef __cplusplus
     24extern "C" {
     25#endif
     26
    1927ULONG WIN32API DosValidateCriticalSection (CRITICAL_SECTION_OS2 *crit);
    2028ULONG WIN32API DosDeleteCriticalSection(CRITICAL_SECTION_OS2 *);
    2129ULONG WIN32API DosEnterCriticalSection(CRITICAL_SECTION_OS2 *, ULONG ulTimeout = SEM_INDEFINITE_WAIT);
    22 ULONG WIN32API DosInitializeCriticalSection(CRITICAL_SECTION_OS2 *, char *pszSemName, BOOL fShared = FALSE);
    23 ULONG WIN32API DosAccessCriticalSection(CRITICAL_SECTION_OS2 *, char *pszSemName);
     30ULONG WIN32API DosInitializeCriticalSection(CRITICAL_SECTION_OS2 *, PCSZ pszSemName, BOOL fShared = FALSE);
     31ULONG WIN32API DosAccessCriticalSection(CRITICAL_SECTION_OS2 *, PCSZ pszSemName);
    2432ULONG WIN32API DosLeaveCriticalSection(CRITICAL_SECTION_OS2 *);
    2533
     
    3442#endif
    3543
     44#ifdef __cplusplus
     45} // extern "C"
     46#endif
     47
    3648#endif //__ODINCRT_H__
  • trunk/include/odinlx.h

    r21393 r21916  
    1414#define _ODINLX_H
    1515
    16 #include <win\peexe.h>
     16#include <win/peexe.h>
    1717#include <versionos2.h>
    1818
  • trunk/include/odinwrap.h

    r7357 r21916  
    3737
    3838#ifdef DEBUG
    39 #  define ODINDEBUGCHANNEL(a) static char* pszOdinDebugChannel=#a;
    40 #  define ODINDEBUGCHANNEL1(a) static char* pszOdinDebugChannel1=#a;
     39#  define ODINDEBUGCHANNEL(a) static const char *pszOdinDebugChannel = #a;
     40#  define ODINDEBUGCHANNEL1(a) static const char *pszOdinDebugChannel1 = #a;
    4141#else
    4242#  define ODINDEBUGCHANNEL(a)
     
    6161#include <odin.h>
    6262
     63#ifdef __cplusplus
     64extern "C" {
     65#endif
     66
    6367// ---------------------------------------------------------------------------
    6468#ifdef __WATCOMC__
     
    7175extern void              WIN32API dbg_IncThreadCallDepth(void); // kernel32
    7276extern void              WIN32API dbg_DecThreadCallDepth(void); // kernel32
    73 extern void              WIN32API dbg_ThreadPushCall(char *pszCaller);
     77extern void              WIN32API dbg_ThreadPushCall(const char *pszCaller);
    7478extern void              WIN32API dbg_ThreadPopCall();
    7579extern char*             WIN32API dbg_GetLastCallerName();
    7680
    77 
     81#ifdef __cplusplus
     82} // extern "C"
     83#endif
    7884
    7985// ---------------------------------------------------------------------------
     
    13451351#define ODINPROCEDURE14(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11,t12,a12,t13,a13,t14,a14)  \
    13461352  void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12,t13 a13,t14 a14)    \
    1347  
     1353
    13481354#define ODINFUNCTIONNODBG0   ODINFUNCTION0
    13491355#define ODINFUNCTIONNODBG1   ODINFUNCTION1
  • trunk/include/os2newapi.h

    r21380 r21916  
    77#ifndef __OS2NEWAPI_H__
    88#define __OS2NEWAPI_H__
     9
     10#ifdef __cplusplus
     11extern "C" {
     12#endif
    913
    1014#ifdef INCL_WIN
     
    4246USHORT APIENTRY16 DosSizeSeg(SEL sel, PULONG pcbSize);
    4347
     48#ifndef __EMX__
    4449#define DosSelToFlat Dos32SelToFlat
     50#endif
    4551ULONG _Optlink DosSelToFlat(ULONG seladdr);
    4652
     53#ifndef __EMX__
    4754#define DosFlatToSel Dos32FlatToSel
     55#endif
    4856ULONG _Optlink DosFlatToSel(ULONG lin);
    4957
     
    6775                                   ULONG   ulSubFunction);
    6876
     77#ifdef __cplusplus
     78} // extern "C"
     79#endif
     80
    6981#endif //__OS2SEL_H__
  • trunk/include/os2sel.h

    r21350 r21916  
    3636
    3737#ifndef __WATCOMC__
    38 #ifdef  __EMX__
     38#if defined(__GNUC__)
     39// note that we also define the exported variants of these in asmutil.asm
    3940static inline unsigned short GetFS(void)
    4041{
     
    4950}
    5051
    51 static inline int RestoreOS2FS(void)
     52static inline short RestoreOS2FS(void)
    5253{
    5354 int __res, xx = 0x0150b;
     
    6061}
    6162
     63static inline short SetReturnFS(unsigned short sel)
     64{
     65 int __res;
     66
     67 __asm__ __volatile__(
     68   "mov   %%fs,%0      \n\t"
     69   "mov   %%eax,%%fs   \n\t"
     70   : "=&r" (__res) : "a" (sel));
     71 return(__res);
     72}
    6273
    6374#else
     
    6778void           _System SetFS       (unsigned short selector);
    6879unsigned short _System SetReturnFS (unsigned short selector);
    69 //SvL: Checks if thread FS & exception structure are valid
    70 int            _System CheckCurFS(void);
    7180#endif
    7281#endif
    7382
    74  
    75  
     83//SvL: Checks if thread FS & exception structure are valid
     84int            _System CheckCurFS(void);
     85
     86
    7687#ifdef __cplusplus
    7788}
  • trunk/include/os2wrap.h

    r21597 r21916  
    44
    55#ifdef __EMX__
    6 #define OS2EMX_PLAIN_CHAR
    7 #endif
     6
     7#ifndef USE_OS2_TOOLKIT_HEADERS
     8
     9// be compatible with the toolkit
     10#define OS2_INCLUDED
     11#define OS2DEF_INCLUDED
     12#define WIN_INCLUDED
     13#define __OS2_H__
     14
     15// add missing declarations
     16typedef unsigned short APIRET16;
     17#define APIENTRY16 _Far16 _Pascal
     18
     19#define INCL_LONGLONG_STRUCTS
     20
     21#else // ifndef USE_OS2_TOOLKIT_HEADERS
     22
     23#undef _Pascal
     24#define _Pascal _System // For Vio/Kbd/Mou
     25
     26#endif // ifndef USE_OS2_TOOLKIT_HEADERS
     27
     28#endif // ifdef __EMX__
    829
    930#include <os2.h>
     
    1839#endif
    1940
     41#ifdef __cplusplus
     42extern "C" {
     43#endif
     44
    2045#ifdef INCL_DOSMEMMGR
    2146
     
    47824807 USHORT sel = RestoreOS2FS();
    47834808
    4784     yyrc = VIO16ASSOCIATE(a, b);
    4785     SetFS(sel);
    4786 
    4787     return yyrc;
    4788 } 
     4809    yyrc = VioAssociate(a, b);
     4810    SetFS(sel);
     4811
     4812    return yyrc;
     4813}
    47894814
    47904815#undef  VioAssociate
     
    47964821 USHORT sel = RestoreOS2FS();
    47974822
    4798     yyrc = VIO16CREATELOGFONT(a, b, c, d);
    4799     SetFS(sel);
    4800 
    4801     return yyrc;
    4802 } 
     4823    yyrc = VioCreateLogFont(a, b, c, d);
     4824    SetFS(sel);
     4825
     4826    return yyrc;
     4827}
    48034828
    48044829#undef  VioCreateLogFont
     
    48104835 USHORT sel = RestoreOS2FS();
    48114836
    4812     yyrc = VIO16CREATEPS(a, b, c, d, e, f);
    4813     SetFS(sel);
    4814 
    4815     return yyrc;
    4816 } 
     4837    yyrc = VioCreatePS(a, b, c, d, e, f);
     4838    SetFS(sel);
     4839
     4840    return yyrc;
     4841}
    48174842
    48184843#undef  VioCreatePS
     
    48244849 USHORT sel = RestoreOS2FS();
    48254850
    4826     yyrc = VIO16DELETESETID(a, b);
    4827     SetFS(sel);
    4828 
    4829     return yyrc;
    4830 } 
     4851    yyrc = VioDeleteSetId(a, b);
     4852    SetFS(sel);
     4853
     4854    return yyrc;
     4855}
    48314856
    48324857#undef  VioDeleteSetId
     
    48384863 USHORT sel = RestoreOS2FS();
    48394864
    4840     yyrc = VIO16DESTROYPS(a);
    4841     SetFS(sel);
    4842 
    4843     return yyrc;
    4844 } 
     4865    yyrc = VioDestroyPS(a);
     4866    SetFS(sel);
     4867
     4868    return yyrc;
     4869}
    48454870
    48464871#undef  VioDestroyPS
     
    48524877 USHORT sel = RestoreOS2FS();
    48534878
    4854     yyrc = VIO16GETDEVICECELLSIZE(a, b, c);
    4855     SetFS(sel);
    4856 
    4857     return yyrc;
    4858 } 
     4879    yyrc = VioGetDeviceCellSize(a, b, c);
     4880    SetFS(sel);
     4881
     4882    return yyrc;
     4883}
    48594884
    48604885#undef  VioGetDeviceCellSize
     
    48664891 USHORT sel = RestoreOS2FS();
    48674892
    4868     yyrc = VIO16GETORG(a, b, c);
    4869     SetFS(sel);
    4870 
    4871     return yyrc;
    4872 } 
     4893    yyrc = VioGetOrg(a, b, c);
     4894    SetFS(sel);
     4895
     4896    return yyrc;
     4897}
    48734898
    48744899#undef  VioGetOrg
     
    48804905 USHORT sel = RestoreOS2FS();
    48814906
    4882     yyrc = VIO16QUERYFONTS(a, b, c, d, e, f, g);
    4883     SetFS(sel);
    4884 
    4885     return yyrc;
    4886 } 
     4907    yyrc = VioQueryFonts(a, b, c, d, e, f, g);
     4908    SetFS(sel);
     4909
     4910    return yyrc;
     4911}
    48874912
    48884913#undef  VioQueryFonts
     
    48944919 USHORT sel = RestoreOS2FS();
    48954920
    4896     yyrc = VIO16QUERYSETIDS(a, b, c, d, e);
    4897     SetFS(sel);
    4898 
    4899     return yyrc;
    4900 } 
     4921    yyrc = VioQuerySetIds(a, b, c, d, e);
     4922    SetFS(sel);
     4923
     4924    return yyrc;
     4925}
    49014926
    49024927#undef  VioQuerySetIds
     
    49084933 USHORT sel = RestoreOS2FS();
    49094934
    4910     yyrc = VIO16SETDEVICECELLSIZE(a, b, c);
    4911     SetFS(sel);
    4912 
    4913     return yyrc;
    4914 } 
     4935    yyrc = VioSetDeviceCellSize(a, b, c);
     4936    SetFS(sel);
     4937
     4938    return yyrc;
     4939}
    49154940
    49164941#undef  VioSetDeviceCellSize
     
    49224947 USHORT sel = RestoreOS2FS();
    49234948
    4924     yyrc = VIO16SETORG(a, b, c);
    4925     SetFS(sel);
    4926 
    4927     return yyrc;
    4928 } 
     4949    yyrc = VioSetOrg(a, b, c);
     4950    SetFS(sel);
     4951
     4952    return yyrc;
     4953}
    49294954
    49304955#undef  VioSetOrg
     
    49364961 USHORT sel = RestoreOS2FS();
    49374962
    4938     yyrc = VIO16SHOWPS(a, b, c, d);
    4939     SetFS(sel);
    4940 
    4941     return yyrc;
    4942 } 
     4963    yyrc = VioShowPS(a, b, c, d);
     4964    SetFS(sel);
     4965
     4966    return yyrc;
     4967}
    49434968
    49444969#undef  VioShowPS
     
    49544979
    49554980    return yyrc;
    4956 } 
     4981}
    49574982
    49584983#undef  WinDefAVioWindowProc
     
    49704995
    49714996    return yyrc;
    4972 } 
     4997}
    49734998
    49744999#undef  KbdCharIn
     
    49845009
    49855010    return yyrc;
    4986 } 
     5011}
    49875012
    49885013#undef  KbdClose
     
    49985023
    49995024    return yyrc;
    5000 } 
     5025}
    50015026
    50025027#undef  KbdDeRegister
     
    50125037
    50135038    return yyrc;
    5014 } 
     5039}
    50155040
    50165041#undef  KbdFlushBuffer
     
    50265051
    50275052    return yyrc;
    5028 } 
     5053}
    50295054
    50305055#undef  KbdFreeFocus
     
    50405065
    50415066    return yyrc;
    5042 } 
     5067}
    50435068
    50445069#undef  KbdGetCp
     
    50545079
    50555080    return yyrc;
    5056 } 
     5081}
    50575082
    50585083#undef  KbdGetFocus
     
    50685093
    50695094    return yyrc;
    5070 } 
     5095}
    50715096
    50725097#undef  KbdGetHWID
     
    50825107
    50835108    return yyrc;
    5084 } 
     5109}
    50855110
    50865111#undef  KbdGetStatus
     
    50965121
    50975122    return yyrc;
    5098 } 
     5123}
    50995124
    51005125#undef  KbdOpen
     
    51105135
    51115136    return yyrc;
    5112 } 
     5137}
    51135138
    51145139#undef  KbdPeek
     
    51245149
    51255150    return yyrc;
    5126 } 
     5151}
    51275152
    51285153#undef  KbdRegister
     
    51385163
    51395164    return yyrc;
    5140 } 
     5165}
    51415166
    51425167#undef  KbdSetCp
     
    51525177
    51535178    return yyrc;
    5154 } 
     5179}
    51555180
    51565181#undef  KbdSetCustXt
     
    51665191
    51675192    return yyrc;
    5168 } 
     5193}
    51695194
    51705195#undef  KbdSetFgnd
     
    51805205
    51815206    return yyrc;
    5182 } 
     5207}
    51835208
    51845209#undef  KbdSetHWID
     
    51945219
    51955220    return yyrc;
    5196 } 
     5221}
    51975222
    51985223#undef  KbdSetStatus
     
    52085233
    52095234    return yyrc;
    5210 } 
     5235}
    52115236
    52125237#undef  KbdStringIn
     
    52225247
    52235248    return yyrc;
    5224 } 
     5249}
    52255250
    52265251#undef  KbdSynch
     
    52365261
    52375262    return yyrc;
    5238 } 
     5263}
    52395264
    52405265#undef  KbdXlate
     
    52485273 USHORT sel = RestoreOS2FS();
    52495274
    5250     yyrc = VIO16CHECKCHARTYPE(a, b, c, d);
    5251     SetFS(sel);
    5252 
    5253     return yyrc;
    5254 } 
     5275    yyrc = VioCheckCharType(a, b, c, d);
     5276    SetFS(sel);
     5277
     5278    return yyrc;
     5279}
    52555280
    52565281#undef  VioCheckCharType
     
    52625287 USHORT sel = RestoreOS2FS();
    52635288
    5264     yyrc = VIO16DEREGISTER();
    5265     SetFS(sel);
    5266 
    5267     return yyrc;
    5268 } 
     5289    yyrc = VioDeRegister();
     5290    SetFS(sel);
     5291
     5292    return yyrc;
     5293}
    52695294
    52705295#undef  VioDeRegister
     
    52765301 USHORT sel = RestoreOS2FS();
    52775302
    5278     yyrc = VIO16ENDPOPUP(a);
    5279     SetFS(sel);
    5280 
    5281     return yyrc;
    5282 } 
     5303    yyrc = VioEndPopUp(a);
     5304    SetFS(sel);
     5305
     5306    return yyrc;
     5307}
    52835308
    52845309#undef  VioEndPopUp
     
    52905315 USHORT sel = RestoreOS2FS();
    52915316
    5292     yyrc = VIO16GETANSI(a, b);
    5293     SetFS(sel);
    5294 
    5295     return yyrc;
    5296 } 
     5317    yyrc = VioGetAnsi(a, b);
     5318    SetFS(sel);
     5319
     5320    return yyrc;
     5321}
    52975322
    52985323#undef  VioGetAnsi
     
    53045329 USHORT sel = RestoreOS2FS();
    53055330
    5306     yyrc = VIO16GETBUF(a, b, c);
    5307     SetFS(sel);
    5308 
    5309     return yyrc;
    5310 } 
     5331    yyrc = VioGetBuf(a, b, c);
     5332    SetFS(sel);
     5333
     5334    return yyrc;
     5335}
    53115336
    53125337#undef  VioGetBuf
     
    53185343 USHORT sel = RestoreOS2FS();
    53195344
    5320     yyrc = VIO16GETCONFIG(a, b, c);
    5321     SetFS(sel);
    5322 
    5323     return yyrc;
    5324 } 
     5345    yyrc = VioGetConfig(a, b, c);
     5346    SetFS(sel);
     5347
     5348    return yyrc;
     5349}
    53255350
    53265351#undef  VioGetConfig
     
    53325357 USHORT sel = RestoreOS2FS();
    53335358
    5334     yyrc = VIO16GETCP(a, b, c);
    5335     SetFS(sel);
    5336 
    5337     return yyrc;
    5338 } 
     5359    yyrc = VioGetCp(a, b, c);
     5360    SetFS(sel);
     5361
     5362    return yyrc;
     5363}
    53395364
    53405365#undef  VioGetCp
     
    53465371 USHORT sel = RestoreOS2FS();
    53475372
    5348     yyrc = VIO16GETCURPOS(a, b, c);
    5349     SetFS(sel);
    5350 
    5351     return yyrc;
    5352 } 
     5373    yyrc = VioGetCurPos(a, b, c);
     5374    SetFS(sel);
     5375
     5376    return yyrc;
     5377}
    53535378
    53545379#undef  VioGetCurPos
     
    53605385 USHORT sel = RestoreOS2FS();
    53615386
    5362     yyrc = VIO16GETCURTYPE(a, b);
    5363     SetFS(sel);
    5364 
    5365     return yyrc;
    5366 } 
     5387    yyrc = VioGetCurType(a, b);
     5388    SetFS(sel);
     5389
     5390    return yyrc;
     5391}
    53675392
    53685393#undef  VioGetCurType
     
    53745399 USHORT sel = RestoreOS2FS();
    53755400
    5376     yyrc = VIO16GETFONT(a, b);
    5377     SetFS(sel);
    5378 
    5379     return yyrc;
    5380 } 
     5401    yyrc = VioGetFont(a, b);
     5402    SetFS(sel);
     5403
     5404    return yyrc;
     5405}
    53815406
    53825407#undef  VioGetFont
     
    53885413 USHORT sel = RestoreOS2FS();
    53895414
    5390     yyrc = VIO16GETMODE(a, b);
    5391     SetFS(sel);
    5392 
    5393     return yyrc;
    5394 } 
     5415    yyrc = VioGetMode(a, b);
     5416    SetFS(sel);
     5417
     5418    return yyrc;
     5419}
    53955420
    53965421#undef  VioGetMode
     
    54025427 USHORT sel = RestoreOS2FS();
    54035428
    5404     yyrc = VIO16GETPHYSBUF(a, b);
    5405     SetFS(sel);
    5406 
    5407     return yyrc;
    5408 } 
     5429    yyrc = VioGetPhysBuf(a, b);
     5430    SetFS(sel);
     5431
     5432    return yyrc;
     5433}
    54095434
    54105435#undef  VioGetPhysBuf
     
    54165441 USHORT sel = RestoreOS2FS();
    54175442
    5418     yyrc = VIO16GETSTATE(a, b);
    5419     SetFS(sel);
    5420 
    5421     return yyrc;
    5422 } 
     5443    yyrc = VioGetState(a, b);
     5444    SetFS(sel);
     5445
     5446    return yyrc;
     5447}
    54235448
    54245449#undef  VioGetState
     
    54305455 USHORT sel = RestoreOS2FS();
    54315456
    5432     yyrc = VIO16MODEUNDO(a, b, c);
    5433     SetFS(sel);
    5434 
    5435     return yyrc;
    5436 } 
     5457    yyrc = VioModeUndo(a, b, c);
     5458    SetFS(sel);
     5459
     5460    return yyrc;
     5461}
    54375462
    54385463#undef  VioModeUndo
     
    54445469 USHORT sel = RestoreOS2FS();
    54455470
    5446     yyrc = VIO16MODEWAIT(a, b, c);
    5447     SetFS(sel);
    5448 
    5449     return yyrc;
    5450 } 
     5471    yyrc = VioModeWait(a, b, c);
     5472    SetFS(sel);
     5473
     5474    return yyrc;
     5475}
    54515476
    54525477#undef  VioModeWait
     
    54585483 USHORT sel = RestoreOS2FS();
    54595484
    5460     yyrc = VIO16POPUP(a, b);
    5461     SetFS(sel);
    5462 
    5463     return yyrc;
    5464 } 
     5485    yyrc = VioPopUp(a, b);
     5486    SetFS(sel);
     5487
     5488    return yyrc;
     5489}
    54655490
    54665491#undef  VioPopUp
     
    54725497 USHORT sel = RestoreOS2FS();
    54735498
    5474     yyrc = VIO16PRTSC(a);
    5475     SetFS(sel);
    5476 
    5477     return yyrc;
    5478 } 
     5499    yyrc = VioPrtSc(a);
     5500    SetFS(sel);
     5501
     5502    return yyrc;
     5503}
    54795504
    54805505#undef  VioPrtSc
     
    54865511 USHORT sel = RestoreOS2FS();
    54875512
    5488     yyrc = VIO16PRTSCTOGGLE(a);
    5489     SetFS(sel);
    5490 
    5491     return yyrc;
    5492 } 
     5513    yyrc = VioPrtScToggle(a);
     5514    SetFS(sel);
     5515
     5516    return yyrc;
     5517}
    54935518
    54945519#undef  VioPrtScToggle
     
    55005525 USHORT sel = RestoreOS2FS();
    55015526
    5502     yyrc = VIO16READCELLSTR(a, b, c, d, e);
    5503     SetFS(sel);
    5504 
    5505     return yyrc;
    5506 } 
     5527    yyrc = VioReadCellStr(a, b, c, d, e);
     5528    SetFS(sel);
     5529
     5530    return yyrc;
     5531}
    55075532
    55085533#undef  VioReadCellStr
     
    55145539 USHORT sel = RestoreOS2FS();
    55155540
    5516     yyrc = VIO16READCHARSTR(a, b, c, d, e);
    5517     SetFS(sel);
    5518 
    5519     return yyrc;
    5520 } 
     5541    yyrc = VioReadCharStr(a, b, c, d, e);
     5542    SetFS(sel);
     5543
     5544    return yyrc;
     5545}
    55215546
    55225547#undef  VioReadCharStr
     
    55285553 USHORT sel = RestoreOS2FS();
    55295554
    5530     yyrc = VIO16REGISTER(a, b, c, d);
    5531     SetFS(sel);
    5532 
    5533     return yyrc;
    5534 } 
     5555    yyrc = VioRegister(a, b, c, d);
     5556    SetFS(sel);
     5557
     5558    return yyrc;
     5559}
    55355560
    55365561#undef  VioRegister
     
    55425567 USHORT sel = RestoreOS2FS();
    55435568
    5544     yyrc = VIO16SAVREDRAWUNDO(a, b, c);
    5545     SetFS(sel);
    5546 
    5547     return yyrc;
    5548 } 
     5569    yyrc = VioSavRedrawUndo(a, b, c);
     5570    SetFS(sel);
     5571
     5572    return yyrc;
     5573}
    55495574
    55505575#undef  VioSavRedrawUndo
     
    55565581 USHORT sel = RestoreOS2FS();
    55575582
    5558     yyrc = VIO16SAVREDRAWWAIT(a, b, c);
    5559     SetFS(sel);
    5560 
    5561     return yyrc;
    5562 } 
     5583    yyrc = VioSavRedrawWait(a, b, c);
     5584    SetFS(sel);
     5585
     5586    return yyrc;
     5587}
    55635588
    55645589#undef  VioSavRedrawWait
     
    55705595 USHORT sel = RestoreOS2FS();
    55715596
    5572     yyrc = VIO16SCRLOCK(a, b, c);
    5573     SetFS(sel);
    5574 
    5575     return yyrc;
    5576 } 
     5597    yyrc = VioScrLock(a, b, c);
     5598    SetFS(sel);
     5599
     5600    return yyrc;
     5601}
    55775602
    55785603#undef  VioScrLock
     
    55845609 USHORT sel = RestoreOS2FS();
    55855610
    5586     yyrc = VIO16SCROLLDN(a, b, c, d, e, f, g);
    5587     SetFS(sel);
    5588 
    5589     return yyrc;
    5590 } 
     5611    yyrc = VioScrollDn(a, b, c, d, e, f, g);
     5612    SetFS(sel);
     5613
     5614    return yyrc;
     5615}
    55915616
    55925617#undef  VioScrollDn
     
    55985623 USHORT sel = RestoreOS2FS();
    55995624
    5600     yyrc = VIO16SCROLLLF(a, b, c, d, e, f, g);
    5601     SetFS(sel);
    5602 
    5603     return yyrc;
    5604 } 
     5625    yyrc = VioScrollLf(a, b, c, d, e, f, g);
     5626    SetFS(sel);
     5627
     5628    return yyrc;
     5629}
    56055630
    56065631#undef  VioScrollLf
     
    56125637 USHORT sel = RestoreOS2FS();
    56135638
    5614     yyrc = VIO16SCROLLRT(a, b, c, d, e, f, g);
    5615     SetFS(sel);
    5616 
    5617     return yyrc;
    5618 } 
     5639    yyrc = VioScrollRt(a, b, c, d, e, f, g);
     5640    SetFS(sel);
     5641
     5642    return yyrc;
     5643}
    56195644
    56205645#undef  VioScrollRt
     
    56265651 USHORT sel = RestoreOS2FS();
    56275652
    5628     yyrc = VIO16SCROLLUP(a, b, c, d, e, f, g);
    5629     SetFS(sel);
    5630 
    5631     return yyrc;
    5632 } 
     5653    yyrc = VioScrollUp(a, b, c, d, e, f, g);
     5654    SetFS(sel);
     5655
     5656    return yyrc;
     5657}
    56335658
    56345659#undef  VioScrollUp
     
    56405665 USHORT sel = RestoreOS2FS();
    56415666
    5642     yyrc = VIO16SCRUNLOCK(a);
    5643     SetFS(sel);
    5644 
    5645     return yyrc;
    5646 } 
     5667    yyrc = VioScrUnLock(a);
     5668    SetFS(sel);
     5669
     5670    return yyrc;
     5671}
    56475672
    56485673#undef  VioScrUnLock
     
    56545679 USHORT sel = RestoreOS2FS();
    56555680
    5656     yyrc = VIO16SETANSI(a, b);
    5657     SetFS(sel);
    5658 
    5659     return yyrc;
    5660 } 
     5681    yyrc = VioSetAnsi(a, b);
     5682    SetFS(sel);
     5683
     5684    return yyrc;
     5685}
    56615686
    56625687#undef  VioSetAnsi
     
    56685693 USHORT sel = RestoreOS2FS();
    56695694
    5670     yyrc = VIO16SETCP(a, b, c);
    5671     SetFS(sel);
    5672 
    5673     return yyrc;
    5674 } 
     5695    yyrc = VioSetCp(a, b, c);
     5696    SetFS(sel);
     5697
     5698    return yyrc;
     5699}
    56755700
    56765701#undef  VioSetCp
     
    56825707 USHORT sel = RestoreOS2FS();
    56835708
    5684     yyrc = VIO16SETCURPOS(a, b, c);
    5685     SetFS(sel);
    5686 
    5687     return yyrc;
    5688 } 
     5709    yyrc = VioSetCurPos(a, b, c);
     5710    SetFS(sel);
     5711
     5712    return yyrc;
     5713}
    56895714
    56905715#undef  VioSetCurPos
     
    56965721 USHORT sel = RestoreOS2FS();
    56975722
    5698     yyrc = VIO16SETCURTYPE(a, b);
    5699     SetFS(sel);
    5700 
    5701     return yyrc;
    5702 } 
     5723    yyrc = VioSetCurType(a, b);
     5724    SetFS(sel);
     5725
     5726    return yyrc;
     5727}
    57035728
    57045729#undef  VioSetCurType
     
    57105735 USHORT sel = RestoreOS2FS();
    57115736
    5712     yyrc = VIO16SETFONT(a, b);
    5713     SetFS(sel);
    5714 
    5715     return yyrc;
    5716 } 
     5737    yyrc = VioSetFont(a, b);
     5738    SetFS(sel);
     5739
     5740    return yyrc;
     5741}
    57175742
    57185743#undef  VioSetFont
     
    57245749 USHORT sel = RestoreOS2FS();
    57255750
    5726     yyrc = VIO16SETMODE(a, b);
    5727     SetFS(sel);
    5728 
    5729     return yyrc;
    5730 } 
     5751    yyrc = VioSetMode(a, b);
     5752    SetFS(sel);
     5753
     5754    return yyrc;
     5755}
    57315756
    57325757#undef  VioSetMode
     
    57385763 USHORT sel = RestoreOS2FS();
    57395764
    5740     yyrc = VIO16SETSTATE(a, b);
    5741     SetFS(sel);
    5742 
    5743     return yyrc;
    5744 } 
     5765    yyrc = VioSetState(a, b);
     5766    SetFS(sel);
     5767
     5768    return yyrc;
     5769}
    57455770
    57465771#undef  VioSetState
     
    57525777 USHORT sel = RestoreOS2FS();
    57535778
    5754     yyrc = VIO16SHOWBUF(a, b, c);
    5755     SetFS(sel);
    5756 
    5757     return yyrc;
    5758 } 
     5779    yyrc = VioShowBuf(a, b, c);
     5780    SetFS(sel);
     5781
     5782    return yyrc;
     5783}
    57595784
    57605785#undef  VioShowBuf
     
    57665791 USHORT sel = RestoreOS2FS();
    57675792
    5768     yyrc = VIO16WRTCELLSTR(a, b, c, d, e);
    5769     SetFS(sel);
    5770 
    5771     return yyrc;
    5772 } 
     5793    yyrc = VioWrtCellStr(a, b, c, d, e);
     5794    SetFS(sel);
     5795
     5796    return yyrc;
     5797}
    57735798
    57745799#undef  VioWrtCellStr
     
    57805805 USHORT sel = RestoreOS2FS();
    57815806
    5782     yyrc = VIO16WRTCHARSTR(a, b, c, d, e);
    5783     SetFS(sel);
    5784 
    5785     return yyrc;
    5786 } 
     5807    yyrc = VioWrtCharStr(a, b, c, d, e);
     5808    SetFS(sel);
     5809
     5810    return yyrc;
     5811}
    57875812
    57885813#undef  VioWrtCharStr
     
    57945819 USHORT sel = RestoreOS2FS();
    57955820
    5796     yyrc = VIO16WRTCHARSTRATT(a, b, c, d, e, f);
    5797     SetFS(sel);
    5798 
    5799     return yyrc;
    5800 } 
     5821    yyrc = VioWrtCharStrAtt(a, b, c, d, e, f);
     5822    SetFS(sel);
     5823
     5824    return yyrc;
     5825}
    58015826
    58025827#undef  VioWrtCharStrAtt
     
    58085833 USHORT sel = RestoreOS2FS();
    58095834
    5810     yyrc = VIO16WRTNATTR(a, b, c, d, e);
    5811     SetFS(sel);
    5812 
    5813     return yyrc;
    5814 } 
     5835    yyrc = VioWrtNAttr(a, b, c, d, e);
     5836    SetFS(sel);
     5837
     5838    return yyrc;
     5839}
    58155840
    58165841#undef  VioWrtNAttr
     
    58225847 USHORT sel = RestoreOS2FS();
    58235848
    5824     yyrc = VIO16WRTNCELL(a, b, c, d, e);
    5825     SetFS(sel);
    5826 
    5827     return yyrc;
    5828 } 
     5849    yyrc = VioWrtNCell(a, b, c, d, e);
     5850    SetFS(sel);
     5851
     5852    return yyrc;
     5853}
    58295854
    58305855#undef  VioWrtNCell
     
    58365861 USHORT sel = RestoreOS2FS();
    58375862
    5838     yyrc = VIO16WRTNCHAR(a, b, c, d, e);
    5839     SetFS(sel);
    5840 
    5841     return yyrc;
    5842 } 
     5863    yyrc = VioWrtNChar(a, b, c, d, e);
     5864    SetFS(sel);
     5865
     5866    return yyrc;
     5867}
    58435868
    58445869#undef  VioWrtNChar
     
    58505875 USHORT sel = RestoreOS2FS();
    58515876
    5852     yyrc = VIO16WRTTTY(a, b, c);
    5853     SetFS(sel);
    5854 
    5855     return yyrc;
    5856 } 
     5877    yyrc = VioWrtTTY(a, b, c);
     5878    SetFS(sel);
     5879
     5880    return yyrc;
     5881}
    58575882
    58585883#undef  VioWrtTTY
     
    58665891 USHORT sel = RestoreOS2FS();
    58675892
    5868     yyrc = MOU16CLOSE(a);
    5869     SetFS(sel);
    5870 
    5871     return yyrc;
    5872 } 
     5893    yyrc = MouClose(a);
     5894    SetFS(sel);
     5895
     5896    return yyrc;
     5897}
    58735898
    58745899#undef  MouClose
     
    58805905 USHORT sel = RestoreOS2FS();
    58815906
    5882     yyrc = MOU16DEREGISTER();
    5883     SetFS(sel);
    5884 
    5885     return yyrc;
    5886 } 
     5907    yyrc = MouDeRegister();
     5908    SetFS(sel);
     5909
     5910    return yyrc;
     5911}
    58875912
    58885913#undef  MouDeRegister
     
    58945919 USHORT sel = RestoreOS2FS();
    58955920
    5896     yyrc = MOU16DRAWPTR(a);
    5897     SetFS(sel);
    5898 
    5899     return yyrc;
    5900 } 
     5921    yyrc = MouDrawPtr(a);
     5922    SetFS(sel);
     5923
     5924    return yyrc;
     5925}
    59015926
    59025927#undef  MouDrawPtr
     
    59085933 USHORT sel = RestoreOS2FS();
    59095934
    5910     yyrc = MOU16FLUSHQUE(a);
    5911     SetFS(sel);
    5912 
    5913     return yyrc;
    5914 } 
     5935    yyrc = MouFlushQue(a);
     5936    SetFS(sel);
     5937
     5938    return yyrc;
     5939}
    59155940
    59165941#undef  MouFlushQue
     
    59225947 USHORT sel = RestoreOS2FS();
    59235948
    5924     yyrc = MOU16GETDEVSTATUS(a, b);
    5925     SetFS(sel);
    5926 
    5927     return yyrc;
    5928 } 
     5949    yyrc = MouGetDevStatus(a, b);
     5950    SetFS(sel);
     5951
     5952    return yyrc;
     5953}
    59295954
    59305955#undef  MouGetDevStatus
     
    59365961 USHORT sel = RestoreOS2FS();
    59375962
    5938     yyrc = MOU16GETEVENTMASK(a, b);
    5939     SetFS(sel);
    5940 
    5941     return yyrc;
    5942 } 
     5963    yyrc = MouGetEventMask(a, b);
     5964    SetFS(sel);
     5965
     5966    return yyrc;
     5967}
    59435968
    59445969#undef  MouGetEventMask
     
    59505975 USHORT sel = RestoreOS2FS();
    59515976
    5952     yyrc = MOU16GETNUMBUTTONS(a, b);
    5953     SetFS(sel);
    5954 
    5955     return yyrc;
    5956 } 
     5977    yyrc = MouGetNumButtons(a, b);
     5978    SetFS(sel);
     5979
     5980    return yyrc;
     5981}
    59575982
    59585983#undef  MouGetNumButtons
     
    59645989 USHORT sel = RestoreOS2FS();
    59655990
    5966     yyrc = MOU16GETNUMMICKEYS(a, b);
    5967     SetFS(sel);
    5968 
    5969     return yyrc;
    5970 } 
     5991    yyrc = MouGetNumMickeys(a, b);
     5992    SetFS(sel);
     5993
     5994    return yyrc;
     5995}
    59715996
    59725997#undef  MouGetNumMickeys
     
    59786003 USHORT sel = RestoreOS2FS();
    59796004
    5980     yyrc = MOU16GETNUMQUEEL(a, b);
    5981     SetFS(sel);
    5982 
    5983     return yyrc;
    5984 } 
     6005    yyrc = MouGetNumQueEl(a, b);
     6006    SetFS(sel);
     6007
     6008    return yyrc;
     6009}
    59856010
    59866011#undef  MouGetNumQueEl
     
    59926017 USHORT sel = RestoreOS2FS();
    59936018
    5994     yyrc = MOU16GETPTRPOS(a, b);
    5995     SetFS(sel);
    5996 
    5997     return yyrc;
    5998 } 
     6019    yyrc = MouGetPtrPos(a, b);
     6020    SetFS(sel);
     6021
     6022    return yyrc;
     6023}
    59996024
    60006025#undef  MouGetPtrPos
     
    60066031 USHORT sel = RestoreOS2FS();
    60076032
    6008     yyrc = MOU16GETPTRSHAPE(a, b, c);
    6009     SetFS(sel);
    6010 
    6011     return yyrc;
    6012 } 
     6033    yyrc = MouGetPtrShape(a, b, c);
     6034    SetFS(sel);
     6035
     6036    return yyrc;
     6037}
    60136038
    60146039#undef  MouGetPtrShape
     
    60206045 USHORT sel = RestoreOS2FS();
    60216046
    6022     yyrc = MOU16GETSCALEFACT(a, b);
    6023     SetFS(sel);
    6024 
    6025     return yyrc;
    6026 } 
     6047    yyrc = MouGetScaleFact(a, b);
     6048    SetFS(sel);
     6049
     6050    return yyrc;
     6051}
    60276052
    60286053#undef  MouGetScaleFact
     
    60346059 USHORT sel = RestoreOS2FS();
    60356060
    6036     yyrc = MOU16GETTHRESHOLD(a, b);
    6037     SetFS(sel);
    6038 
    6039     return yyrc;
    6040 } 
     6061    yyrc = MouGetThreshold(a, b);
     6062    SetFS(sel);
     6063
     6064    return yyrc;
     6065}
    60416066
    60426067#undef  MouGetThreshold
     
    60486073 USHORT sel = RestoreOS2FS();
    60496074
    6050     yyrc = MOU16INITREAL(a);
    6051     SetFS(sel);
    6052 
    6053     return yyrc;
    6054 } 
     6075    yyrc = MouInitReal(a);
     6076    SetFS(sel);
     6077
     6078    return yyrc;
     6079}
    60556080
    60566081#undef  MouInitReal
     
    60626087 USHORT sel = RestoreOS2FS();
    60636088
    6064     yyrc = MOU16OPEN(a, b);
    6065     SetFS(sel);
    6066 
    6067     return yyrc;
    6068 } 
     6089    yyrc = MouOpen(a, b);
     6090    SetFS(sel);
     6091
     6092    return yyrc;
     6093}
    60696094
    60706095#undef  MouOpen
     
    60766101 USHORT sel = RestoreOS2FS();
    60776102
    6078     yyrc = MOU16READEVENTQUE(a, b, c);
    6079     SetFS(sel);
    6080 
    6081     return yyrc;
    6082 } 
     6103    yyrc = MouReadEventQue(a, b, c);
     6104    SetFS(sel);
     6105
     6106    return yyrc;
     6107}
    60836108
    60846109#undef  MouReadEventQue
     
    60906115 USHORT sel = RestoreOS2FS();
    60916116
    6092     yyrc = MOU16REGISTER(a, b, c);
    6093     SetFS(sel);
    6094 
    6095     return yyrc;
    6096 } 
     6117    yyrc = MouRegister(a, b, c);
     6118    SetFS(sel);
     6119
     6120    return yyrc;
     6121}
    60976122
    60986123#undef  MouRegister
     
    61046129 USHORT sel = RestoreOS2FS();
    61056130
    6106     yyrc = MOU16REMOVEPTR(a, b);
    6107     SetFS(sel);
    6108 
    6109     return yyrc;
    6110 } 
     6131    yyrc = MouRemovePtr(a, b);
     6132    SetFS(sel);
     6133
     6134    return yyrc;
     6135}
    61116136
    61126137#undef  MouRemovePtr
     
    61186143 USHORT sel = RestoreOS2FS();
    61196144
    6120     yyrc = MOU16SETDEVSTATUS(a, b);
    6121     SetFS(sel);
    6122 
    6123     return yyrc;
    6124 } 
     6145    yyrc = MouSetDevStatus(a, b);
     6146    SetFS(sel);
     6147
     6148    return yyrc;
     6149}
    61256150
    61266151#undef  MouSetDevStatus
     
    61326157 USHORT sel = RestoreOS2FS();
    61336158
    6134     yyrc = MOU16SETEVENTMASK(a, b);
    6135     SetFS(sel);
    6136 
    6137     return yyrc;
    6138 } 
     6159    yyrc = MouSetEventMask(a, b);
     6160    SetFS(sel);
     6161
     6162    return yyrc;
     6163}
    61396164
    61406165#undef  MouSetEventMask
     
    61466171 USHORT sel = RestoreOS2FS();
    61476172
    6148     yyrc = MOU16SETPTRPOS(a, b);
    6149     SetFS(sel);
    6150 
    6151     return yyrc;
    6152 } 
     6173    yyrc = MouSetPtrPos(a, b);
     6174    SetFS(sel);
     6175
     6176    return yyrc;
     6177}
    61536178
    61546179#undef  MouSetPtrPos
     
    61606185 USHORT sel = RestoreOS2FS();
    61616186
    6162     yyrc = MOU16SETPTRSHAPE(a, b, c);
    6163     SetFS(sel);
    6164 
    6165     return yyrc;
    6166 } 
     6187    yyrc = MouSetPtrShape(a, b, c);
     6188    SetFS(sel);
     6189
     6190    return yyrc;
     6191}
    61676192
    61686193#undef  MouSetPtrShape
     
    61746199 USHORT sel = RestoreOS2FS();
    61756200
    6176     yyrc = MOU16SETSCALEFACT(a, b);
    6177     SetFS(sel);
    6178 
    6179     return yyrc;
    6180 } 
     6201    yyrc = MouSetScaleFact(a, b);
     6202    SetFS(sel);
     6203
     6204    return yyrc;
     6205}
    61816206
    61826207#undef  MouSetScaleFact
     
    61886213 USHORT sel = RestoreOS2FS();
    61896214
    6190     yyrc = MOU16SETTHRESHOLD(a, b);
    6191     SetFS(sel);
    6192 
    6193     return yyrc;
    6194 } 
     6215    yyrc = MouSetThreshold(a, b);
     6216    SetFS(sel);
     6217
     6218    return yyrc;
     6219}
    61956220
    61966221#undef  MouSetThreshold
     
    62026227 USHORT sel = RestoreOS2FS();
    62036228
    6204     yyrc = MOU16SYNCH(a);
    6205     SetFS(sel);
    6206 
    6207     return yyrc;
    6208 } 
     6229    yyrc = MouSynch(a);
     6230    SetFS(sel);
     6231
     6232    return yyrc;
     6233}
    62096234
    62106235#undef  MouSynch
     
    62136238#endif
    62146239
    6215 #endif
     6240#ifdef __cplusplus
     6241} // extern "C"
     6242#endif
     6243
     6244#endif
  • trunk/include/os2wrap2.h

    r21635 r21916  
    791791#define os2_CCHMAXPATH 260
    792792#define os2_CCHMAXPATHCOMP 256
     793#define os2_FILE_BEGIN 0
     794#define os2_FILE_CURRENT 1
     795#define os2_FILE_END 2
     796#define os2_FILE_SECTOR 0x8000
     797#define os2_FILE_NORMAL 0x0000
     798#define os2_FILE_READONLY 0x0001
     799#define os2_FILE_HIDDEN 0x0002
     800#define os2_FILE_SYSTEM 0x0004
     801#define os2_FILE_DIRECTORY 0x0010
     802#define os2_FILE_ARCHIVED 0x0020
     803#define os2_FILE_IGNORE 0x10000
     804#define os2_FILE_EXISTED 0x0001
     805#define os2_FILE_CREATED 0x0002
     806#define os2_FILE_TRUNCATED 0x0003
     807#define os2_FILE_OPEN 0x0001
     808#define os2_FILE_TRUNCATE 0x0002
     809#define os2_FILE_CREATE 0x0010
     810#define os2_MUST_HAVE_READONLY (os2_FILE_READONLY       | (os2_FILE_READONLY  << 8))
     811#define os2_MUST_HAVE_HIDDEN (os2_FILE_HIDDEN   | (os2_FILE_HIDDEN        << 8))
     812#define os2_MUST_HAVE_SYSTEM (os2_FILE_SYSTEM   | (os2_FILE_SYSTEM        << 8))
     813#define os2_MUST_HAVE_DIRECTORY (os2_FILE_DIRECTORY | (os2_FILE_DIRECTORY << 8))
     814#define os2_MUST_HAVE_ARCHIVED (os2_FILE_ARCHIVED       | (os2_FILE_ARCHIVED  << 8))
    793815#define HFILE os2_HFILE
    794816#define PHFILE os2_PHFILE
     
    33583380#undef CCHMAXPATH
    33593381#undef CCHMAXPATHCOMP
     3382#undef FILE_BEGIN
     3383#undef FILE_CURRENT
     3384#undef FILE_END
     3385#undef FILE_SECTOR
     3386#undef FILE_NORMAL
     3387#undef FILE_READONLY
     3388#undef FILE_HIDDEN
     3389#undef FILE_SYSTEM
     3390#undef FILE_DIRECTORY
     3391#undef FILE_ARCHIVED
     3392#undef FILE_IGNORE
     3393#undef FILE_EXISTED
     3394#undef FILE_CREATED
     3395#undef FILE_TRUNCATED
     3396#undef FILE_OPEN
     3397#undef FILE_TRUNCATE
     3398#undef FILE_CREATE
     3399#undef MUST_HAVE_READONLY
     3400#undef MUST_HAVE_HIDDEN
     3401#undef MUST_HAVE_SYSTEM
     3402#undef MUST_HAVE_DIRECTORY
     3403#undef MUST_HAVE_ARCHIVED
    33603404#undef HFILE
    33613405#undef PHFILE
  • trunk/include/os2wrap2_gen.sh

    r21635 r21916  
    5252  :a;/\\$/{N;ba}
    5353  s/([^A-Za-z0-9_])(MAKE[A-Z0-9]+)([^A-Za-z0-9_])/\1 \2 \3/g
    54   s/([^A-Za-z0-9_])(((BM|CLR|CONTEXT|CREATE|CS|DM|DT|EH|ERROR|EXCEPTION|EXLST|FDM|FNTM|HWND|LM|MB|MIA|MM|NP|OBJ|PAG|QS|QSV|RGN|RT|SEM|SEVERITY|SIS|SV|SWP|TA|WC|WM|WS|XCPT|(WIN|GPI|DEV|SPL)ERR)_([A-Z0-9_]+))|((P?VOID|(API|EXP)ENTRY|P(CMD|CHR|MSE)MSG|ERRORID|NO_ERROR|PCMDMSG|SEL|HWND|MPARAM|MRESULT|LHANDLE|SHANDLE|BOOL|(LO|HI|P)?U?(LONG|SHORT|CHAR|BYTE)|(CCH|MPFROM|MAKE)[A-Z0-9]+)([^A-Za-z0-9_])))/\1os2_\2/g
     54  s/([^A-Za-z0-9_])(((BM|CLR|CONTEXT|CREATE|CS|DM|DT|EH|ERROR|EXCEPTION|EXLST|FILE|FDM|FNTM|HWND|LM|MB|MIA|MM|NP|OBJ|PAG|QS|QSV|RGN|RT|SEM|SEVERITY|SIS|SV|SWP|TA|WC|WM|WS|XCPT|(WIN|GPI|DEV|SPL)ERR)_([A-Z0-9_]+))|((P?VOID|(API|EXP)ENTRY|P(CMD|CHR|MSE)MSG|ERRORID|NO_ERROR|PCMDMSG|SEL|HWND|MPARAM|MRESULT|LHANDLE|SHANDLE|BOOL|(LO|HI|P)?U?(LONG|SHORT|CHAR|BYTE)|(CCH|MPFROM|MAKE)[A-Z0-9]+)([^A-Za-z0-9_])))/\1os2_\2/g
    5555  tb;bd
    5656  :b
     
    9595  :a;/\\$/{N;ba}
    9696  s/([^A-Za-z0-9_])(MAKE[A-Z0-9]+)([^A-Za-z0-9_])/\1 \2 \3/g
    97   s/([^A-Za-z0-9_])(((BM|CLR|CONTEXT|CREATE|CS|DM|DT|EH|ERROR|EXCEPTION|EXLST|FDM|FNTM|HWND|LM|MB|MIA|MM|NP|OBJ|PAG|QS|QSV|RGN|RT|SEM|SEVERITY|SIS|SV|SWP|TA|WC|WM|WS|XCPT|(WIN|GPI|DEV|SPL)ERR)_([A-Z0-9_]+))|((P?VOID|(API|EXP)ENTRY|P(CMD|CHR|MSE)MSG|ERRORID|NO_ERROR|PCMDMSG|SEL|HWND|MPARAM|MRESULT|LHANDLE|SHANDLE|BOOL|(LO|HI|P)?U?(LONG|SHORT|CHAR|BYTE)|(CCH|MPFROM|MAKE)[A-Z0-9]+)([^A-Za-z0-9_])))/\1os2_\2/g
     97  s/([^A-Za-z0-9_])(((BM|CLR|CONTEXT|CREATE|CS|DM|DT|EH|ERROR|EXCEPTION|EXLST|FILE|FDM|FNTM|HWND|LM|MB|MIA|MM|NP|OBJ|PAG|QS|QSV|RGN|RT|SEM|SEVERITY|SIS|SV|SWP|TA|WC|WM|WS|XCPT|(WIN|GPI|DEV|SPL)ERR)_([A-Z0-9_]+))|((P?VOID|(API|EXP)ENTRY|P(CMD|CHR|MSE)MSG|ERRORID|NO_ERROR|PCMDMSG|SEL|HWND|MPARAM|MRESULT|LHANDLE|SHANDLE|BOOL|(LO|HI|P)?U?(LONG|SHORT|CHAR|BYTE)|(CCH|MPFROM|MAKE)[A-Z0-9]+)([^A-Za-z0-9_])))/\1os2_\2/g
    9898  tb;bd
    9999  :b
  • trunk/include/overlappedio.h

    r8838 r21916  
    146146     LPASYNCIOREQUEST     pending[NR_ASYNC_OPERATIONS];
    147147
    148      friend      DWORD CALLBACK OverlappedIOThread(LPVOID lpThreadParam);
     148     static DWORD CALLBACK OverlappedIOThread(LPVOID lpThreadParam);
    149149};
    150150
  • trunk/include/stats.h

    r21301 r21916  
    55
    66//Get memory statistics from odincrt
    7 void _LNK_CONV getcrtstat(unsigned long *pnrcalls_malloc,
    8                           unsigned long *pnrcalls_free,
    9                           unsigned long *ptotalmemalloc);
     7void SYSTEM getcrtstat(unsigned long *pnrcalls_malloc,
     8                       unsigned long *pnrcalls_free,
     9                       unsigned long *ptotalmemalloc);
     10#ifdef __cplusplus
     11extern "C" {
     12#endif
    1013
    1114#ifdef OS2_INCLUDED
     
    99102#endif
    100103
     104#ifdef __cplusplus
     105} // extern "C"
    101106#endif
     107
     108#endif
  • trunk/include/vmutex.h

    r8200 r21916  
    1111#include <odincrt.h>
    1212
    13 class VMutex
     13class __declspec(dllexport) VMutex
    1414{
    1515public:
  • trunk/include/win/commdlg.h

    r21497 r21916  
    182182        HWND            hInstance;
    183183        DWORD           rgbResult;
    184         LPDWORD         *lpCustColors;
     184        LPDWORD         lpCustColors;
    185185        DWORD           Flags;
    186186        DWORD           lCustData;
  • trunk/include/win/dde.h

    r7869 r21916  
    2828#define WM_DDE_LAST       WM_DDE_EXECUTE
    2929#define WM_DDE_FIRST      WM_DDE_INITIATE
     30
     31#ifdef __cplusplus
     32extern "C" {
     33#endif
    3034
    3135/* DDEACK: wStatus in WM_DDE_ACK message */
     
    7579LPARAM      WINAPI ReuseDDElParam(LPARAM,UINT,UINT,UINT,UINT);
    7680
     81#ifdef __cplusplus
     82} // extern "C"
     83#endif
     84
    7785#endif /* __WINE_DDE_H */
  • trunk/include/win/debugtools.h

    r21352 r21916  
    99
    1010#ifndef __MISC_H__
     11
     12#ifdef __cplusplus
     13extern "C" {
     14#endif
    1115
    1216#ifdef DEBUG
     
    4751#endif
    4852
    49 int  SYSTEM WriteLog(char *tekst, ...);
    50 int  SYSTEM WritePrivateLog(void *logfile, char *tekst, ...);
     53int  SYSTEM WriteLog(const char *tekst, ...);
     54int  SYSTEM WritePrivateLog(void *logfile, const char *tekst, ...);
    5155
    5256void SYSTEM DecreaseLogCount();
    5357void SYSTEM IncreaseLogCount();
     58
     59#ifdef __cplusplus
     60} // extern "C"
     61#endif
    5462
    5563#endif //__MISC_H__
     
    169177#  define MESSAGE WriteLog
    170178#else
    171 #  define TRACE 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
    172 #  define TRACE_(ch) 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
    173 #  define FIXME 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
    174 #  define FIXME_(ch) 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
    175 #  define WARN  1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
    176 #  define WARN_(ch) 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
    177 #  define ERR_(ch) 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
    178 #  define ERR  1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
    179 #  define DPRINTF   1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
    180 #  define MESSAGE   1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
     179#ifdef __GNUC__
     180#  define TRACE 1 ? (void) 0 : (void)
     181#  define TRACE_(ch) 1 ? (void) 0 : (void)
     182#  define FIXME  1 ? (void) 0 : (void)
     183#  define FIXME_(ch) 1 ? (void) 0 : (void)
     184#  define WARN 1 ? (void) 0 : (void)
     185#  define WARN_(ch) 1 ? (void) 0 : (void)
     186#  define ERR_(ch) 1 ? (void) 0 : (void)
     187#  define ERR 1 ? (void) 0 : (void)
     188#  define DPRINTF 1 ? (void) 0 : (void)
     189#  define MESSAGE 1 ? (void) 0 : (void)
     190#else
     191#  define TRACE 1 ? (void)0 : (void)((int (*)(const char *, ...)) NULL)
     192#  define TRACE_(ch) 1 ? (void)0 : (void)((int (*)(const char *, ...)) NULL)
     193#  define FIXME 1 ? (void)0 : (void)((int (*)(const char *, ...)) NULL)
     194#  define FIXME_(ch) 1 ? (void)0 : (void)((int (*)(constchar *, ...)) NULL)
     195#  define WARN  1 ? (void)0 : (void)((int (*)(const char *, ...)) NULL)
     196#  define WARN_(ch) 1 ? (void)0 : (void)((int (*)(const char *, ...)) NULL)
     197#  define ERR_(ch) 1 ? (void)0 : (void)((int (*)(const char *, ...)) NULL)
     198#  define ERR  1 ? (void)0 : (void)((int (*)(const char *, ...)) NULL)
     199#  define DPRINTF   1 ? (void)0 : (void)((int (*)(const char *, ...)) NULL)
     200#  define MESSAGE   1 ? (void)0 : (void)((int (*)(const char *, ...)) NULL)
     201#endif
    181202#endif
    182203#undef __GET_DEBUGGING
  • trunk/include/win/dsound.h

    r21572 r21916  
    181181typedef LPVOID* LPLPVOID;
    182182
    183 typedef BOOL (* CALLBACK LPDSENUMCALLBACKW)(LPGUID,LPWSTR,LPWSTR,LPVOID);
    184 typedef BOOL (* CALLBACK LPDSENUMCALLBACKA)(LPGUID,LPSTR,LPSTR,LPVOID);
     183typedef BOOL (* CALLBACK LPDSENUMCALLBACKW)(LPGUID,LPCWSTR,LPCWSTR,LPVOID);
     184typedef BOOL (* CALLBACK LPDSENUMCALLBACKA)(LPGUID,LPCSTR,LPCSTR,LPVOID);
    185185DECL_WINELIB_TYPE_AW(LPDSENUMCALLBACK)
    186186
  • trunk/include/win/global.h

    r4 r21916  
    1818    int shmid;
    1919} SHMDATA;
     20
     21#ifdef __cplusplus
     22extern "C" {
     23#endif
    2024
    2125/* memory/global.c */
     
    4549extern BOOL ATOM_Init( WORD globalTableSel );
    4650
     51#ifdef __cplusplus
     52} // extern "C"
     53#endif
     54
    4755#endif  /* __WINE_GLOBAL_H */
  • trunk/include/win/guiddef.h

    r21520 r21916  
    3333#ifndef __LPCGUID_DEFINED__
    3434#define __LPCGUID_DEFINED__
     35typedef const GUID *PCGUID;
    3536typedef const GUID *LPCGUID;
    3637#endif
  • trunk/include/win/minivcrt.h

    r21506 r21916  
    107107
    108108#define swprintf    NTDLL_swprintf
     109#define snwprintf   NTDLL_snwprintf
    109110#define swscanf     NTDLL_swscanf
    110111
    111112int         swprintf(WCHAR*,const WCHAR*,...);
     113int         snwprintf(WCHAR*,unsigned int,const WCHAR*,...);
    112114int         swscanf(const WCHAR*,const WCHAR*,...);
    113115
  • trunk/include/win/monitor.h

    r1859 r21916  
    1010
    1111//#include "windef.h"
     12
     13#ifdef __cplusplus
     14extern "C" {
     15#endif
    1216
    1317struct tagMONITOR_DRIVER;
     
    4650extern void MONITOR_SetScreenSaveTimeout(MONITOR *pMonitor, int nTimeout);
    4751
     52#ifdef __cplusplus
     53} // extern "C"
     54#endif
     55
    4856#endif /* __WINE_MONITOR_H */
    4957
  • trunk/include/win/ntddk.h

    r21327 r21916  
    876876
    877877/*      mathematics */
    878 #if defined(__WIN32OS2__) && defined(__IBMC__)
     878#if defined(__WIN32OS2__) && defined(WINE_LARGE_INTEGER) && !defined(WINE_LONGLONG)
     879
    879880LARGE_INTEGER  WINAPI RtlpConvertLongToLargeInteger( LONG a );
    880881LARGE_INTEGER  WINAPI RtlpEnlargedIntegerMultiply( INT a, INT b );
  • trunk/include/win/ntdef.h

    r21419 r21916  
    99#endif
    1010
    11 #define NTAPI   __stdcall 
     11#define NTAPI   __stdcall
    1212
    1313#ifndef IN
     
    2727#endif
    2828
     29#ifndef WINE_NTSTATUS_DECLARED
     30#define WINE_NTSTATUS_DECLARED
    2931typedef LONG NTSTATUS;
     32#endif
     33#ifndef WINE_PNTSTATUS_DECLARED
     34#define WINE_PNTSTATUS_DECLARED
    3035typedef NTSTATUS *PNTSTATUS;
     36#endif
    3137
     38typedef char *PSZ;
    3239typedef CONST char *PCSZ;
    3340
    3441typedef short CSHORT;
    35 typedef CSHORT *PCSHORT; 
     42typedef CSHORT *PCSHORT;
    3643
    3744/* NT lowlevel Strings (handled by Rtl* functions in NTDLL)
     
    7380#define OBJ_VALID_ATTRIBUTES    0x000003F2L
    7481
    75 typedef struct _OBJECT_ATTRIBUTES 
     82typedef struct _OBJECT_ATTRIBUTES
    7683{   ULONG Length;
    7784    HANDLE RootDirectory;
  • trunk/include/win/pe_image.h

    r4124 r21916  
    3232extern HGLOBAL PE_LoadResource(struct _wine_modref *wm,HRSRC);
    3333extern HMODULE PE_LoadImage( HFILE hFile, OFSTRUCT *ofs, LPCSTR *modName );
    34 extern struct _wine_modref *PE_CreateModule( HMODULE hModule, OFSTRUCT *ofs, 
     34extern struct _wine_modref *PE_CreateModule( HMODULE hModule, OFSTRUCT *ofs,
    3535                                             DWORD flags, BOOL builtin );
    36 extern BOOL PE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line, LPCSTR env, 
     36extern BOOL PE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line, LPCSTR env,
    3737                              LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
    3838                              BOOL inherit, LPSTARTUPINFOA startup,
     
    4848
    4949typedef struct {
    50         WORD    popl    WINE_PACKED;    /* 0x8f 0x05 */
    51         DWORD   addr_popped WINE_PACKED;/* ...  */
    52         BYTE    pushl1  WINE_PACKED;    /* 0x68 */
    53         DWORD   newret WINE_PACKED;     /* ...  */
    54         BYTE    pushl2  WINE_PACKED;    /* 0x68 */
    55         DWORD   origfun WINE_PACKED;    /* original function */
    56         BYTE    ret1    WINE_PACKED;    /* 0xc3 */
    57         WORD    addesp  WINE_PACKED;    /* 0x83 0xc4 */
    58         BYTE    nrofargs WINE_PACKED;   /* nr of arguments to add esp, */
    59         BYTE    pushl3  WINE_PACKED;    /* 0x68 */
    60         DWORD   oldret  WINE_PACKED;    /* Filled out from popl above  */
    61         BYTE    ret2    WINE_PACKED;    /* 0xc3 */
    62 } ELF_STDCALL_STUB;
     50        WORD    popl;       /* 0x8f 0x05 */
     51        DWORD   addr_popped;/* ...  */
     52        BYTE    pushl1;     /* 0x68 */
     53        DWORD   newret;     /* ...  */
     54        BYTE    pushl2;     /* 0x68 */
     55        DWORD   origfun;    /* original function */
     56        BYTE    ret1;       /* 0xc3 */
     57        WORD    addesp;     /* 0x83 0xc4 */
     58        BYTE    nrofargs;       /* nr of arguments to add esp, */
     59        BYTE    pushl3;     /* 0x68 */
     60        DWORD   oldret;     /* Filled out from popl above  */
     61        BYTE    ret2;       /* 0xc3 */
     62} WINE_PACKED ELF_STDCALL_STUB;
    6363
    6464typedef struct {
  • trunk/include/win/setupapi.h

    r9402 r21916  
    2929    unsigned short Data3;
    3030    unsigned char Data4[8];
    31 } GUID, *PGUID, *LPGUID;
     31} GUID;
     32#endif
     33#ifndef __LPCGUID_DEFINED__
     34#define __LPCGUID_DEFINED__
     35typedef const GUID *PCGUID;
     36typedef const GUID *LPCGUID;
    3237#endif
    3338#include <wtypes.h>
  • trunk/include/win/shellapi.h

    r21510 r21916  
    33
    44#include "windef.h"
     5
     6#ifdef __cplusplus
     7extern "C" {
     8#endif
    59
    610#pragma pack(1)
     
    166170typedef WORD PRINTEROP_FLAGS;
    167171
    168 typedef struct _SHNAMEMAPPINGW { 
    169     LPWSTR pszOldPath; 
    170     LPWSTR pszNewPath; 
    171     int   cchOldPath; 
    172     int   cchNewPath; 
    173 } SHNAMEMAPPINGW, *LPSHNAMEMAPPINGW; 
     172typedef struct _SHNAMEMAPPINGW {
     173    LPWSTR pszOldPath;
     174    LPWSTR pszNewPath;
     175    int   cchOldPath;
     176    int   cchNewPath;
     177} SHNAMEMAPPINGW, *LPSHNAMEMAPPINGW;
    174178
    175179typedef struct _SHFILEOPSTRUCTA
     
    292296#pragma pack(4)
    293297
     298#ifdef __cplusplus
     299} // extern "C"
     300#endif
     301
    294302#endif /* _WINE_SHELLAPI_H */
  • trunk/include/win/task.h

    r2651 r21916  
    6060
    6161  /* Task database. See 'Windows Internals' p. 226.
    62    * Note that 16-bit OLE 2 libs like to read it directly 
    63    * so we have to keep entry offsets as they are. 
     62   * Note that 16-bit OLE 2 libs like to read it directly
     63   * so we have to keep entry offsets as they are.
    6464   */
    6565typedef struct _TDB
     
    104104    DWORD     dlls_to_init;               /* ac Ptr to DLLs to initialize */
    105105    HANDLE16  hCSAlias;                   /* b0 Code segment for this TDB */
    106     THUNKS    thunks WINE_PACKED;         /* b2 Make proc instance thunks */
     106    THUNKS    thunks;                     /* b2 Make proc instance thunks */
    107107    WORD      more_thunks[6*4];           /* c2 Space for 6 more thunks */
    108108    BYTE      module_name[8];             /* f2 Module name for task */
  • trunk/include/win/vfw.h

    r6387 r21916  
    5050
    5151/* Installable Compressor Manager */
    52 
    53 DECLARE_HANDLE(HIC);
    5452
    5553#ifdef __WINE__
  • trunk/include/win/virtual.h

    r7566 r21916  
    88#define __VIRTUAL_H
    99
     10#ifdef __cplusplus
     11extern "C" {
     12#endif
     13
    1014HANDLE WINAPI VIRTUAL_MapFileA( LPCSTR name , LPVOID *lpMapping, BOOL fReadIntoMemory = FALSE);
    1115HANDLE WINAPI VIRTUAL_MapFileW( LPCWSTR name , LPVOID *lpMapping, BOOL fReadIntoMemory = FALSE);
     
    1418                          DWORD  fdwProtect, LPSTR name);
    1519
     20#ifdef __cplusplus
     21} // extern "C"
     22#endif
     23
    1624#endif  /* __VIRTUAL_H */
  • trunk/include/win/wine/debug.h

    r8208 r21916  
    2222#define __WINE_WINE_DEBUG_H
    2323
    24 #include <win\debugtools.h>
     24#include <win/debugtools.h>
    2525#include <stdarg.h>
    2626
  • trunk/include/win/wine/obj_base.h

    r21493 r21916  
    703703typedef struct IMalloc16 IMalloc16,*LPMALLOC16;
    704704typedef struct IMalloc IMalloc,*LPMALLOC;
     705typedef const IMalloc *LPCMALLOC;
    705706
    706707DEFINE_OLEGUID(IID_IUnknown,            0x00000000L, 0, 0);
  • trunk/include/win/wine/obj_surrogate.h

    r641 r21916  
    4646#endif // __WINE_WINE_OBJ_SURROGATE_H
    4747
    48 
     48
  • trunk/include/win/wine/winbase16.h

    r641 r21916  
    171171DWORD       WINAPI RegCreateKey16(HKEY,LPCSTR,LPHKEY);
    172172DWORD       WINAPI RegDeleteKey16(HKEY,LPCSTR);
    173 DWORD       WINAPI RegDeleteValue16(HKEY,LPSTR);
     173DWORD       WINAPI RegDeleteValue16(HKEY,LPCSTR);
    174174DWORD       WINAPI RegEnumKey16(HKEY,DWORD,LPSTR,DWORD);
    175175DWORD       WINAPI RegEnumValue16(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
     
    178178DWORD       WINAPI RegQueryValueEx16(HKEY,LPSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
    179179DWORD       WINAPI RegSetValue16(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
    180 DWORD       WINAPI RegSetValueEx16(HKEY,LPSTR,DWORD,DWORD,LPBYTE,DWORD);
     180DWORD       WINAPI RegSetValueEx16(HKEY,LPSTR,DWORD,DWORD,const BYTE *,DWORD);
    181181BOOL16      WINAPI RemoveDirectory16(LPCSTR);
    182182BOOL16      WINAPI SetCurrentDirectory16(LPCSTR);
  • trunk/include/win/winnls.h

    r21360 r21916  
    560560 */
    561561
     562#ifdef __cplusplus
     563extern "C" {
     564#endif
     565
    562566UINT        WINAPI CompareStringA(LCID,DWORD,LPCSTR,DWORD,LPCSTR,DWORD);
    563567UINT        WINAPI CompareStringW(LCID,DWORD,LPCWSTR,DWORD,LPCWSTR,DWORD);
     
    633637INT         WINAPI WideCharToMultiByte(UINT,DWORD,LPCWSTR,INT,LPSTR,INT,LPCSTR,LPBOOL);
    634638
     639#ifdef __cplusplus
     640} // extern "C"
     641#endif
     642
    635643#endif //#ifndef OS2_INCLUDED
    636644
  • trunk/include/win/winprocess.h

    r8771 r21916  
    186186#define  GPD_USERDATA            (  0)
    187187
     188#ifdef __cplusplus
     189extern "C" {
     190#endif
     191
    188192extern DWORD WINAPI GetProcessDword( DWORD dwProcessID, INT offset );
    189193void WINAPI SetProcessDword( DWORD dwProcessID, INT offset, DWORD value );
     
    214218extern DWORD DEBUG_SendUnloadDLLEvent( HMODULE module );
    215219
     220#ifdef __cplusplus
     221} // extern "C"
     222#endif
     223
    216224#include <wprocess.h>
    217225
  • trunk/include/win/winreg.h

    r21327 r21916  
    124124    DWORD       ve_type;
    125125} VALENTW, *PVALENTW;
     126
     127#ifdef __cplusplus
     128extern "C" {
     129#endif
    126130
    127131BOOL      WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,LPVOID);
     
    195199LONG       WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
    196200#define     RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
    197 LONG       WINAPI RegDeleteValueA(HKEY,LPSTR);
    198 LONG       WINAPI RegDeleteValueW(HKEY,LPWSTR);
     201LONG       WINAPI RegDeleteValueA(HKEY,LPCSTR);
     202LONG       WINAPI RegDeleteValueW(HKEY,LPCWSTR);
    199203#define     RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
    200204LSTATUS   WINAPI RegDeleteTreeA(HKEY,LPCSTR);
     
    219223LONG       WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
    220224#define     RegSetValue WINELIB_NAME_AW(RegSetValue)
    221 LONG       WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,LPBYTE,DWORD);
    222 LONG       WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,LPBYTE,DWORD);
     225LONG       WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE *,DWORD);
     226LONG       WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE *,DWORD);
    223227#define     RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
    224228
     
    227231#define     RegQueryMultipleValues WINELIB_NAME_AW(RegQueryMultipleValues)
    228232
     233#ifdef __cplusplus
     234} // extern "C"
     235#endif
     236
    229237#endif  /* __WINE_WINREG_H */
  • trunk/include/win/winuser.h

    r21553 r21916  
    32053205#define DI_DEFAULTSIZE          8
    32063206
    3207   /* misc messages */
     3207/* misc messages */
    32083208#define WM_NULL             0x0000
    3209 #define WM_CPL_LAUNCH       (WM_USER + 1000)
    3210 #define WM_CPL_LAUNCHED     (WM_USER + 1001)
    32113209
    32123210/* WM_NOTIFYFORMAT commands and return values */
  • trunk/include/win32api.h

    r21602 r21916  
    1111#include <win32type.h>
    1212#include <winconst.h>
     13
     14#ifdef __cplusplus
     15extern "C" {
     16#endif
    1317
    1418void   WIN32API SetLastError(DWORD dwError);
     
    2529LONG   WIN32API RegDeleteKeyA(HKEY,LPCSTR);
    2630LONG   WIN32API RegDeleteKeyW(HKEY,LPWSTR);
    27 LONG   WIN32API RegDeleteValueA(HKEY,LPSTR);
    28 LONG   WIN32API RegDeleteValueW(HKEY,LPWSTR);
     31LONG   WIN32API RegDeleteValueA(HKEY,LPCSTR);
     32LONG   WIN32API RegDeleteValueW(HKEY,LPCWSTR);
    2933LONG   WIN32API RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
    3034LONG   WIN32API RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
     
    3741LONG   WIN32API RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
    3842LONG   WIN32API RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
    39 LONG   WIN32API RegQueryValueExA(HKEY,LPSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
    40 LONG   WIN32API RegQueryValueExW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
     43LONG   WIN32API RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
     44LONG   WIN32API RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
    4145LONG   WIN32API RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
    4246LONG   WIN32API RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
    43 LONG   WIN32API RegSetValueExA(HKEY,LPSTR,DWORD,DWORD,LPBYTE,DWORD);
    44 LONG   WIN32API RegSetValueExW(HKEY,LPWSTR,DWORD,DWORD,LPBYTE,DWORD);
     47LONG   WIN32API RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE *,DWORD);
     48LONG   WIN32API RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE *,DWORD);
    4549
    4650DWORD  WIN32API GetModuleFileNameA(HMODULE,LPSTR,DWORD);
     
    263267BOOL      WINAPI IsDBCSLeadByte(BYTE);
    264268
     269#ifdef __cplusplus
     270} // extern "C"
    265271#endif
     272
     273#endif
  • trunk/include/wingdi32.h

    r10316 r21916  
    1717
    1818VOID WIN32API UnselectGDIObjects(HDC hdc);
    19 BOOL OSLibGpiSetCp(HDC hdc, ULONG codepage);
    2019void WIN32API ConvertRGB555to565(LPVOID dest, LPVOID src, UINT imgsize);
    2120
     21BOOL SYSTEM OSLibGpiSetCp(HDC hdc, ULONG codepage);
     22
    2223#endif //__WINGDI32_H__
  • trunk/include/winkeyboard.h

    r7314 r21916  
    1010#define __WINKEYBOARD_H__
    1111
     12#ifdef __cplusplus
     13extern "C" {
     14#endif
    1215
    13 
    14 BYTE WIN32API KeyTranslatePMToWin(BYTE key);
    15 void WIN32API KeyTranslatePMToWinBuf(BYTE *pmkey, BYTE *winkey, int nrkeys);
    16 void WIN32API KeyTranslatePMScanToWinVKey(BYTE bPMScan,
     16void WIN32API KeyTranslatePMToWinBuf(PUCHAR pmkey, PUCHAR winkey, int nrkeys);
     17void WIN32API KeyTranslatePMScanToWinVKey(UCHAR uchPMScan,
    1718                                          BOOL bNumLock,
    18                                           PBYTE pbWinVKey,
    19                                           WORD* pwWinScan,
     19                                          PUCHAR puchWinVKey,
     20                                          WORD *pwWinScan,
    2021                                          PBOOL pfExtended);
    21 BYTE WIN32API KeyTranslateWinVKeyToPMScan(BYTE bWinVKey, BOOL fExtended);
    22 BYTE WIN32API KeyTranslateWinScanToPMScan(BYTE bWinScan, BOOL fExtended);
     22UCHAR WIN32API KeyTranslateWinVKeyToPMScan(UCHAR uchWinVKey, BOOL fExtended);
     23UCHAR WIN32API KeyTranslateWinScanToPMScan(UCHAR uchWinScan, BOOL fExtended);
    2324
    2425#define KEYOVERLAYSTATE_DONTCARE 0
     
    2930                                    char nState);
    3031
     32#ifdef __cplusplus
     33} // extern "C"
     34#endif
    3135
    3236#endif //__WINKEYBOARD_H__
  • trunk/include/winos2def.h

    r223 r21916  
    3131#endif
    3232
    33 #ifndef PSZ
    34 #  define PSZ char *
    35 #endif
     33typedef char *PSZ;
     34typedef const char *PCSZ;
    3635
    3736
     
    5554
    5655    return yyrc;
    57 } 
     56}
    5857
    5958#undef  WinPostMsg
     
    6968
    7069    return yyrc;
    71 } 
     70}
    7271
    7372#undef  DosSleep
     
    116115
    117116    return yyrc;
    118 } 
     117}
    119118
    120119#undef  DosQueryCtryInfo
  • trunk/include/winres.h

    r9849 r21916  
    1111#define __WINRES_H__
    1212
     13#ifdef __cplusplus
     14extern "C" {
     15#endif
     16
    1317PVOID WIN32API ConvertResourceToOS2(HINSTANCE hInstance, LPSTR restype, HRSRC hResource);
    1418ULONG WIN32API QueryConvertedResourceSize(HINSTANCE hInstance, LPSTR restype, HRSRC hResource);
     
    1923void *WIN32API ConvertIconGroupIndirect(void *lpIconData, DWORD iconsize, DWORD *ressize);
    2024
     25#ifdef __cplusplus
     26} // extern "C"
    2127#endif
     28
     29#endif
  • trunk/include/winuser32.h

    r10435 r21916  
    1212#include <dcdata.h>
    1313
     14#ifdef __cplusplus
     15extern "C" {
     16#endif
     17
    1418ULONG OSLibGetScreenHeight();
    1519ULONG OSLibGetScreenWidth();
     
    2428LONG WIN32API clientHeight(HWND hwnd, pDCData pHps);
    2529int  WIN32API setMapModeDC(pDCData pHps, int mode);
     30
     31#ifdef __cplusplus
     32} // extern "C"
     33#endif
     34
     35#endif
     36
     37#ifdef __cplusplus
     38extern "C" {
    2639#endif
    2740
     
    98111} POSTMSG_PACKET;
    99112
     113#ifdef __cplusplus
     114} // extern "C"
     115#endif
     116
    100117#endif //__WINUSER32_H__
  • trunk/include/wprocess.h

    r21381 r21916  
    2929#define ODIN_GetCurrentThreadId()    MAKE_THREADID(fibGetPid(), fibGetTid())
    3030#define ODIN_GetCurrentProcessId()   fibGetPid()
     31
     32#ifdef __cplusplus
     33extern "C" {
     34#endif
    3135
    3236TEB   *WIN32API CreateTEB(HANDLE hThread, DWORD dwThreadId);
     
    8488UINT WIN32API GetProcModuleFileNameA(ULONG lpvAddress, LPSTR lpszFileName, UINT cchFileNameMax);
    8589
     90#ifdef __cplusplus
     91} // extern "C"
    8692#endif
     93
     94#endif
Note: See TracChangeset for help on using the changeset viewer.