source: trunk/kLdr/kLdrHlp.h@ 2821

Last change on this file since 2821 was 2821, checked in by bird, 19 years ago

kLdr backup commit.

File size: 1.9 KB
Line 
1/* $Id: $ */
2/** @file
3 *
4 * kLdr - The Dynamic Loader, Helper Functions.
5 *
6 * Copyright (c) 2006 knut st. osmundsen <bird@anduin.net>
7 *
8 *
9 * This file is part of kLdr.
10 *
11 * kLdr is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * kLdr is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with kLdr; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 *
25 */
26
27
28#ifndef __kLdrHlp_h__
29#define __kLdrHlp_h__
30
31#ifdef __OS2__
32
33int kldrSemInit(void);
34int kldrSemTerm(void);
35int kldrSemRequest(void);
36int kldrSemRelease(void);
37int kldrSemGlobalRequest(void);
38int kldrSemGlobalRelease(void);
39
40/** Loader file handle. */
41typedef unsigned long KLDRFILE;
42/** Pointer to a loader file handle. */
43typedef KLDRFILE *PKLDRFILE;
44
45int kldrFileOpen(const char *pszFilename, PKLDRFILE pFile);
46int kldrFileClose(KLDRFILE File);
47int kldrFileRead(KLDRFILE File, off_t off, void *pv, size_t cb);
48
49int kldrGetEnv(const char *pszVar, char *pszVar, size_t *pcchVar)
50
51void *kldrAlloc(size_t cb);
52void kldrFree(void *pv);
53
54int kldrPrivateAlloc(void *pv, size_t cb, unsigned fFlags, void **ppv);
55int kldrPrivateFree(void *pv, size_t cb);
56int kldrSharedAlloc(void *pv, size_t cb, unsigned fFlags, const char *pszFilename, KLDRFILE File, void **ppv);
57int kldrSharedFree(void *pv, size_t cb);
58
59void kldrExit(int rc);
60
61/* #elif __WIN__ */
62
63#else
64
65
66
67#endif
68
69
70#endif /* __kLdrHlp_h__ */
Note: See TracBrowser for help on using the repository browser.