Ignore imports and resources when building a .def file.
This commit is contained in:
parent
e8d977011b
commit
add0b5d28f
|
@ -223,7 +223,7 @@ extern void BuildRelays32( FILE *outfile );
|
|||
extern void BuildSpec16File( FILE *outfile );
|
||||
extern void BuildSpec32File( FILE *outfile );
|
||||
extern void BuildDef32File( FILE *outfile );
|
||||
extern SPEC_TYPE ParseTopLevel( FILE *file );
|
||||
extern SPEC_TYPE ParseTopLevel( FILE *file, int def_only );
|
||||
|
||||
/* global variables */
|
||||
|
||||
|
|
|
@ -270,7 +270,7 @@ int main(int argc, char **argv)
|
|||
switch(exec_mode)
|
||||
{
|
||||
case MODE_SPEC:
|
||||
switch (ParseTopLevel( input_file ))
|
||||
switch (ParseTopLevel( input_file, 0 ))
|
||||
{
|
||||
case SPEC_WIN16:
|
||||
BuildSpec16File( output_file );
|
||||
|
@ -282,7 +282,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
break;
|
||||
case MODE_DEF:
|
||||
switch (ParseTopLevel( input_file ))
|
||||
switch (ParseTopLevel( input_file, 1 ))
|
||||
{
|
||||
case SPEC_WIN16:
|
||||
fatal_error( "Cannot yet build .def file for 16-bit dlls\n" );
|
||||
|
|
|
@ -508,7 +508,7 @@ static void sort_names(void)
|
|||
*
|
||||
* Parse a spec file.
|
||||
*/
|
||||
SPEC_TYPE ParseTopLevel( FILE *file )
|
||||
SPEC_TYPE ParseTopLevel( FILE *file, int def_only )
|
||||
{
|
||||
const char *token;
|
||||
|
||||
|
@ -582,12 +582,16 @@ SPEC_TYPE ParseTopLevel( FILE *file )
|
|||
}
|
||||
else fatal_error( "Unknown option '%s' for import directive\n", name );
|
||||
}
|
||||
add_import_dll( name, delay );
|
||||
if (!def_only) add_import_dll( name, delay );
|
||||
}
|
||||
else if (strcmp(token, "rsrc") == 0)
|
||||
{
|
||||
if (SpecType != SPEC_WIN16) load_res32_file( GetToken(0) );
|
||||
else load_res16_file( GetToken(0) );
|
||||
if (!def_only)
|
||||
{
|
||||
if (SpecType != SPEC_WIN16) load_res32_file( GetToken(0) );
|
||||
else load_res16_file( GetToken(0) );
|
||||
}
|
||||
else GetToken(0); /* skip it */
|
||||
}
|
||||
else if (strcmp(token, "owner") == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue