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.
This commit is contained in:
James Juran 1999-08-15 14:17:50 +00:00 committed by Alexandre Julliard
parent a21fe34596
commit c4c129dc50
2 changed files with 16 additions and 0 deletions

View File

@ -1,8 +1,12 @@
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.

View File

@ -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)
{