source: vendor/emx/current/src/os2/wrapper.c

Last change on this file was 18, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.9 KB
Line 
1/* wrapper.c -- 32-bit wrappers for 16-bit functions
2 Copyright (c) 1994-1995 by Eberhard Mattes
3
4This file is part of emx.
5
6emx is free software; you can redistribute it and/or modify it
7under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11emx is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with emx; see the file COPYING. If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA.
20
21As special exception, emx.dll can be distributed without source code
22unless it has been changed. If you modify emx.dll, this exception
23no longer applies and you must remove this paragraph from all source
24files for emx.dll. */
25
26
27#include <os2emx.h>
28#include "wrapper.h"
29
30USHORT _THUNK_FUNCTION (Dos16FlagProcess) ();
31
32USHORT DosFlagProcess (PID pid, USHORT fScope, USHORT usFlagNum,
33 USHORT usFlagArg)
34{
35 return ((USHORT)
36 (_THUNK_PROLOG (2+2+2+2);
37 _THUNK_SHORT (pid);
38 _THUNK_SHORT (fScope);
39 _THUNK_SHORT (usFlagNum);
40 _THUNK_SHORT (usFlagArg);
41 _THUNK_CALL (Dos16FlagProcess)));
42}
43
44
45USHORT _THUNK_FUNCTION (Dos16SetSigHandler) ();
46
47USHORT DosSetSigHandler (_far16ptr pfnSigHandler, _far16ptr *ppfnPrev,
48 PUSHORT pfAction, USHORT fAction, USHORT usSigNum)
49{
50 return ((USHORT)
51 (_THUNK_PROLOG (4+4+4+2+2);
52 _THUNK_FAR16 (pfnSigHandler);
53 _THUNK_FLAT (ppfnPrev);
54 _THUNK_FLAT (pfAction);
55 _THUNK_SHORT (fAction);
56 _THUNK_SHORT (usSigNum);
57 _THUNK_CALL (Dos16SetSigHandler)));
58}
Note: See TracBrowser for help on using the repository browser.