* infrun.c (IN_SOLIB_TRAMPOLINE): Correct comment, trampolines
[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 #include <nwpre.h>
16 #include "libhooks.h"
17
18 static int NLMID;
19
20
21 void _Stop( void )
22 {
23 _TerminateNLM(NLMID, NULL, TERMINATE_BY_UNLOAD);
24 }
25
26 int _cstart_( void )
27 {
28 return _SetupArgv(main);
29 }
30
31 int _Prelude
32 (
33 int NLMHandle,
34 int initErrorScreenID,
35 char *commandLine,
36 char *loadDirectoryPath,
37 int uninitializedDataLength,
38 int NLMFileHandle,
39 int (*readRoutineP)(),
40 int customDataOffset,
41 int customDataSize
42 )
43 {
44 int rc;
45
46 rc = _StartNLM(NLMHandle,
47 initErrorScreenID,
48 commandLine,
49 loadDirectoryPath,
50 uninitializedDataLength,
51 NLMFileHandle,
52 readRoutineP,
53 customDataOffset,
54 customDataSize,
55 &NLMID,
56 _cstart_);
57
58 if (!rc)
59 rc = _NWRegisterNLMLibraryUser(NLMID, _GetCLibNLMLibHandle());
60
61 return rc;
62 }