Ignore:
Timestamp:
Aug 18, 1999, 7:18:01 PM (26 years ago)
Author:
sandervl
Message:

PE loader changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/windll.cpp

    r544 r550  
    1 /* $Id: windll.cpp,v 1.9 1999-08-18 12:24:16 sandervl Exp $ */
     1/* $Id: windll.cpp,v 1.10 1999-08-18 17:18:00 sandervl Exp $ */
    22
    33/*
     
    2929#include <wprocess.h>
    3030#include "cio.h"
    31 #include "os2util.h"
    3231
    3332/***********************************
     
    4746  head = this;
    4847
    49   strcpy(szModule, StripPath(szFileName));
    50   UpCase(szModule);
    51   char *dot = strstr(szModule, ".");
    52   while(dot) {
    53         char *newdot = strstr(dot+1, ".");
    54         if(newdot == NULL)      break;
    55         dot = newdot;
    56   }
    57   if(dot)
    58         *dot = 0;
    5948  dprintf(("Win32Dll::Win32Dll %s %s", szFileName, szModule));
    6049}
     
    7160  head = this;
    7261
    73   char *name = OS2GetDllName(hinstance);
    74   strcpy(szModule, name);
    75   UpCase(szModule);
    76   char *dot = strstr(szModule, ".");
    77   while(dot) {
    78         char *newdot = strstr(dot+1, ".");
    79         if(newdot == NULL)      break;
    80         dot = newdot;
    81   }
    82   if(dot)
    83         *dot = 0;
    84 
    8562  dprintf(("Win32Dll::Win32Dll %s", szModule));
    8663}
     
    9269  dllEntryPoint = DllEntryPoint;
    9370  fUnloaded     = FALSE;
    94 
    95   char *name = OS2GetDllName(hinstance);
    96   strcpy(szModule, name);
    97   UpCase(szModule);
    98   char *dot = strstr(szModule, ".");
    99   while(dot) {
    100         char *newdot = strstr(dot+1, ".");
    101         if(newdot == NULL)      break;
    102         dot = newdot;
    103   }
    104   if(dot)
    105         *dot = 0;
    10671
    10772  Win32Image::OS2ImageInit(hinstance, NameTableId, Win32TableId);
     
    208173
    209174  strcpy(szModule, szFileName);
    210   UpCase(szModule);
     175  strupr(szModule);
    211176  dot = strstr(szModule, ".");
    212177  if(dot)
     
    427392 Win32Dll *dll = head;
    428393 char szDllName[CCHMAXPATH];
    429  char *dot;
     394 char *dot, *temp;
    430395
    431396  dprintf(("findModule %s", dllname));
    432   strcpy(szDllName, dllname);
    433   UpCase(szDllName);
     397
     398  strcpy(szDllName, StripPath(dllname));
     399  strupr(szDllName);
    434400  dot = strstr(szDllName, ".");
    435401  if(dot)
     
    476442//******************************************************************************
    477443//******************************************************************************
    478 char *Win32Dll::StripPath(char *path)
    479 {
    480   /* @@@PH what does this function do ? Strip the path from a FQFN name ? */
    481   char *pszFilename;
    482  
    483   pszFilename = strrchr(path, '\\');                 /* find rightmost slash */
    484   if (pszFilename != NULL)
    485     return (pszFilename++);              /* return pointer to next character */
    486  
    487   pszFilename = strrchr(path, '/');                  /* find rightmost slash */
    488   if (pszFilename != NULL)
    489     return (pszFilename++);              /* return pointer to next character */
    490  
    491   return (path);                                     /* default return value */
    492  
    493 #if 0
    494   char *fname = path, *prevname = path-1;
    495  
    496   while(TRUE)
    497   {
    498     @@@PH causes endless loop here !
    499     fname = strchr(fname, '\\');
    500     if(fname == NULL)
    501       break;
    502    
    503     prevname = fname;
    504   }
    505   return(prevname+1);
    506 #endif
    507 }
    508 /******************************************************************************/
    509 /******************************************************************************/
    510444Win32Dll *Win32Dll::head = NULL;
Note: See TracChangeset for help on using the changeset viewer.