botsense/bsProxy/bsProxyMod.c
static char *ModDllNewCanonicalName(const char *sModName)
{
  char   *s = NULL;
  char   *t = NULL;
  size_t  m, n;

  // canonicalize module path name
  if( (s = NewSearchPathCanonicalized(sModName)) == NULL )
  {
    LOGERROR("NewSearchPathCanonicalized(\"%s\") failed.", sModName);
    return NULL;
  }

  m = strlen(s);
  n = strlen(DLL_EXT);

  // append library extension
  if( (DLL_EXT != NULL) && ((m <= n) || strncasecmp(s+m-n, DLL_EXT, n)) )
  {
    t = NEWSTR(m+n);
    sprintf(t, "%s%s", s, DLL_EXT);
    delete(s);
  }
  else
  {
    t = s;
  }

  return t;
}
/*!
 * \brief Make DLL canonical file name.
 *
 * The library path is expanded, canonicalized and any necessary file extension is 
 * appended.
 *
 * \param  sModName   DLL library path name.
 *
 * \return
 * On success, an allocated, canonical library path name is returned.\n
 * On failure, NULL is returned.
 */
\brief Make DLL canonical file name.
The library path is expanded, canonicalized and any necessary file extension is
appended.

\param  sModName   DLL library path name.

\return
On success, an allocated, canonical library path name is returned.\n
On failure, NULL is returned.
\ brief Make DLL canonical file name . The library path is expanded canonicalized and any necessary file extension is appended . \ param sModName DLL library path name . \ return On success an allocated canonical library path name is returned . \ n On failure NULL is returned .
static char *ModDllNewCanonicalName(const char *sModName)
{
  char   *s = NULL;
  char   *t = NULL;
  size_t  m, n;
  if( (s = NewSearchPathCanonicalized(sModName)) == NULL )
  {
    LOGERROR("NewSearchPathCanonicalized(\"%s\") failed.", sModName);
    return NULL;
  }
  m = strlen(s);
  n = strlen(DLL_EXT);
  if( (DLL_EXT != NULL) && ((m <= n) || strncasecmp(s+m-n, DLL_EXT, n)) )
  {
    t = NEWSTR(m+n);
    sprintf(t, "%s%s", s, DLL_EXT);
    delete(s);
  }
  else
  {
    t = s;
  }
  return t;
}
static char * ModDllNewCanonicalName ( const char * sModName ) { char * s = NULL ; char * t = NULL ; size_t m , n ; if ( ( s = NewSearchPathCanonicalized ( sModName ) ) == NULL ) { LOGERROR ( " \" \" " , sModName ) ; return NULL ; } m = strlen ( s ) ; n = strlen ( DLL_EXT ) ; if ( ( DLL_EXT != NULL ) && ( ( m <= n ) || strncasecmp ( s + m - n , DLL_EXT , n ) ) ) { t = NEWSTR ( m + n ) ; sprintf ( t , " " , s , DLL_EXT ) ; delete ( s ) ; } else { t = s ; } return t ; }
\brief Make DLL canonical file name.
\ brief Make DLL canonical file name .
// canonicalize module path name // append library extension