OWL Next Updates




This page contains unofficial updates to the latest version of OWLNext.

The latest official patch can be downloaded here.


Fixes:
TRegConfigFile bug fix by Jogy
When using TRegConfigFile::ReadString() a potential problem is that the returned buffer will not be null-terminated, if it is written no null-terminated in the registry, which is the default for TRegConfigFile::WriteString(). This can be fixed by adding the line

	buffer[size] = '\0';	
	
at the end of the function TRegConfigFile::ReadString(), before the statement

	return (int)size;
	


Enhancemets:
TFileName enhancement by Jogy
Function which adds a subfolder to the current path contained in the TFileName object.

In filename.h add the lines

bool AddSubDir(LPCTSTR subdir);
bool AddSubDir(const owl_string& subdir);
	
in the declaration of the class TFileName, preferably after the function CreateDir().

In filename.cpp add the lines

bool
TFileName::AddSubDir(LPCTSTR subdir)
{
  if (_tcschr(dirSeparator, subdir[0]) == 0) // The subdir does not begin with the separator
    PathStr += dirSeparatorStr;

  PathStr += subdir;

  if (_tcschr(dirSeparator, PathStr[PathStr.length() - 1]) != 0)  // The resultring string ends with the separator
    PathStr = PathStr.substr(0, PathStr.length() - 1);

  return true;
}

bool
TFileName::AddSubDir(const owl_string& subdir)
{
  return AddSubDir(subdir.c_str());
}
	
preferably after the definition of the function CreateDir().



Suggestions:
Rename diagnostic macros by Steve Ahlgren
OWL diagnostic macros TRACE, TRY, CATCH, etc. may interfere with MFC ones when both frameworks are used together, so Steve suggests to rename them to OWL_TRACE, OWL_TRY, OWL_CATCH, etc.

Back to home Back to main

Hosted by www.Geocities.ws

1