]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/nlm/prelude.c
Initial creation of sourceware repository
[thirdparty/binutils-gdb.git] / gdb / nlm / prelude.c
1 /*===========================================================================
2 = Novell Standard C Library for NetWare Loadable Modules
3 =
4 = Unpublished Copyright (C) 1993 by Novell, Inc. All rights reserved.
5 =
6 = No part of this file may be duplicated, revised, translated, localized or
7 = modified in any manner or compiled, linked or uploaded or downloaded to or
8 = from any computer system without the prior written consent of Novell, Inc.
9 ==============================================================================
10 = The object produced by compiling this file is for use by the client of this
11 = library and is not linked in; Prelude.Obj is therefore one of the files to
12 = be distributed with CLib.NLM and its headers.
13 ==============================================================================
14 */
15
16 #include <stddef.h>
17 #if defined(__netware__) && defined(__i386__)
18 #define TERMINATE_BY_UNLOAD 5
19 #else
20 #include <nwpre.h>
21 #endif
22 /*#include "libhooks.h"*/
23
24 extern int main (int, char **);
25
26 static int NLMID;
27
28
29 void _Stop( void )
30 {
31 _TerminateNLM(NLMID, NULL, TERMINATE_BY_UNLOAD);
32 }
33
34 int _cstart_( void )
35 {
36 return _SetupArgv(main);
37 }
38
39 int _Prelude
40 (
41 int NLMHandle,
42 int initErrorScreenID,
43 char *commandLine,
44 char *loadDirectoryPath,
45 int uninitializedDataLength,
46 int NLMFileHandle,
47 int (*readRoutineP)(),
48 int customDataOffset,
49 int customDataSize
50 )
51 {
52 int rc;
53
54 rc = _StartNLM(NLMHandle,
55 initErrorScreenID,
56 commandLine,
57 loadDirectoryPath,
58 uninitializedDataLength,
59 NLMFileHandle,
60 readRoutineP,
61 customDataOffset,
62 customDataSize,
63 &NLMID,
64 _cstart_);
65
66 return rc;
67 }