Commit c4c129dc authored by James Juran's avatar James Juran Committed by Alexandre Julliard

Document use of "init" in build-spec.txt, and make build.c print a

warning if someone tries to use "init" in a Win16 spec file.
parent a21fe345
Spec file format
----------------
name NAME
type win16|win32
[file WINFILENAME]
[base ORDINAL]
[heap SIZE]
[init FUNCTION]
[import DLL]
ORDINAL VARTYPE EXPORTNAME (DATA [DATA [DATA [...]]])
......@@ -36,6 +40,9 @@ modules); default is no local heap.
builtin. <name>.DLL is assumed if none is given. (This is important
for kernel, which lives in the Windows file KRNL386.EXE).
"init" specifies a function which will be called when this dll
is loaded. This is only valid for Win32 modules.
"import" names a module that this one depends on (only for Win32
modules at the present). The import declaration can be present several
times.
......
......@@ -749,8 +749,17 @@ static int ParseTopLevel(void)
else if (strcmp(token, "init") == 0)
{
strcpy(DLLInitFunc, GetToken());
if (SpecType == SPEC_WIN16)
{
fprintf(stderr, "%s:%d: init cannot be used for Win16 spec files\n",
SpecName, Line);
return -1;
}
if (!DLLInitFunc[0])
{
fprintf(stderr, "%s:%d: Expected function name after init\n", SpecName, Line);
return -1;
}
}
else if (strcmp(token, "import") == 0)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment