ReactOS 0.4.16-dev-106-g10b08aa
initterm.c
Go to the documentation of this file.
1#include <precomp.h>
2
5
6
7/*********************************************************************
8 * _initterm (MSVCRT.@)
9 */
11{
13
14 TRACE("(%p,%p)\n",start,end);
15 while (current<end)
16 {
17 if (*current)
18 {
19 TRACE("Call init function %p\n",*current);
20 (**current)();
21 TRACE("returned\n");
22 }
23 current++;
24 }
25}
26
27/*********************************************************************
28 * _initterm_e (MSVCRT.@)
29 *
30 * call an array of application initialization functions and report the return value
31 */
33{
34 int res = 0;
35
36 TRACE("(%p, %p)\n", table, end);
37
38 while (!res && table < end) {
39 if (*table) {
40 TRACE("calling %p\n", **table);
41 res = (**table)();
42 if (res)
43 TRACE("function %p failed: 0x%x\n", *table, res);
44
45 }
46 table++;
47 }
48 return res;
49}
#define CDECL
Definition: compat.h:29
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLuint start
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
GLuint res
Definition: glext.h:9613
int(CDECL * _INITTERM_E_FN)(void)
Definition: initterm.c:4
int CDECL _initterm_e(_INITTERM_E_FN *table, _INITTERM_E_FN *end)
Definition: initterm.c:32
void(CDECL * _INITTERMFUN)(void)
Definition: initterm.c:3
void CDECL _initterm(_INITTERMFUN *start, _INITTERMFUN *end)
Definition: initterm.c:10
struct task_struct * current
Definition: linux.c:32
#define TRACE(s)
Definition: solgame.cpp:4