Skip to content

Commit

Permalink
wmake: change loaddll directive to use case-sensitive command name
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalak committed Apr 27, 2024
1 parent 358d771 commit 33a76d8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 29 deletions.
35 changes: 14 additions & 21 deletions bld/wmake/c/mpreproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ STATIC const char * const directives[] = { /* table must be lexically sorted *
* EOL at the start of a line...
* This is a slight optimization for the critical code in PreGetCHR().
*/
STATIC char atStartOfLine;
STATIC char atStartOfLine;
STATIC STRM_T lastChar;
STATIC bool doingPreProc; /* are we doing some preprocessing? */
/*
Expand Down Expand Up @@ -757,34 +757,27 @@ STATIC void bangLoadDLL( void )
FreeSafe( text );
return;
}
p = CmdGetFileName( p, &cmd_name, true );
if( *p == NULLCHAR ) {
FreeSafe( text );
return;
}
p = SkipWS( p );
if( *p == NULLCHAR ) {
FreeSafe( text );
return;
}
p = CmdGetFileName( p, &dll_name, true );
/*
* command name is case-sensitive
*/
p = SkipWS( CmdGetFileName( p, &cmd_name, false ) );
if( *p == NULLCHAR ) {
OSLoadDLL( cmd_name, dll_name, NULL );
FreeSafe( text );
return;
}
ent_name = SkipWS( p );
/*
* DLL name is OS case-sensitive
*/
ent_name = SkipWS( CmdGetFileName( p, &dll_name, true ) );
if( *ent_name == NULLCHAR ) {
OSLoadDLL( cmd_name, dll_name, NULL );
FreeSafe( text );
return;
}
/*
* entry name is case-sensitive
*/
p = skipUntilWS( ent_name );
if( *p == NULLCHAR ) {
OSLoadDLL( cmd_name, dll_name, ent_name );
FreeSafe( text );
return;
}
*p = NULLCHAR;
OSLoadDLL( cmd_name, dll_name, ent_name );
FreeSafe( text );
Expand Down Expand Up @@ -1141,7 +1134,7 @@ STRM_T PreGetCHR( void )
}
return( s );
}

if( Glob.compat_nmake
&& s == MS_LINECONT_C ) {
s = GetCHR();
Expand Down Expand Up @@ -1672,7 +1665,7 @@ STATIC void nextToken( void )
/*
* no more tokens
*/
currentToken.type = OP_ERROR;
currentToken.type = OP_ERROR;
}
}

Expand Down
13 changes: 5 additions & 8 deletions bld/wmake/c/msysdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Open Watcom Project
*
* Copyright (c) 2002-2022 The Open Watcom Contributors. All Rights Reserved.
* Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved.
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
* ========================================================================
Expand Down Expand Up @@ -286,7 +286,7 @@ DLL_CMD *OSFindDLL( char const *cmd_name )
DLL_CMD *n;

for( n = dllCommandList; n != NULL; n = n->next ) {
if( 0 == stricmp( cmd_name, n->cmd_name ) ) {
if( 0 == strcmp( cmd_name, n->cmd_name ) ) {
break;
}
}
Expand Down Expand Up @@ -338,20 +338,17 @@ STATIC void cleanDLLCmd( void )
{
#ifdef DLLS_IMPLEMENTED
DLL_CMD *n;
DLL_CMD *temp;

n = dllCommandList;
while( n != NULL ) {
while( (n = dllCommandList) != NULL ) {
dllCommandList = n->next;
FreeSafe( (char *)n->cmd_name );
if( n->inf.dll_name != NULL ) {
FreeSafe( (char*) n->inf.dll_name );
}
if( n->inf.ent_name != NULL ) {
FreeSafe( (char *)n->inf.ent_name );
}
temp = n;
n = n->next;
FreeSafe( temp );
FreeSafe( n );
}
#endif
}
Expand Down

0 comments on commit 33a76d8

Please sign in to comment.