 
 
 
Top: Introduction: 
Changes 
Version 2.1.0
- 64-bit file positioning is now fully supported in stream classes. New methods tellx() and seekx() were added for this. Old methods tell() and seek() still return 32-bit offsets and may raise an exception if the returned value doesn't fit. 
- In addition to Intel and PowerPC processors, atomic functions for SPARC were rewritten in the assembly language, too (previously a mutex hash table was used).
- All socket interfaces now have a virtual function sockopt() that can be overridden in descendant classes. This function is always called immediately after a socket descriptor is created, so that you can set up any additional socket options via a system call setsockopt().
- semaphore::wait() now handles EINTR which may occur if a process catches a signal.  (Bug report)
Version 2.0.3
- Bug fixed that affected pack() and grow() methods in list classes (Bug report)
- Bug fixed in del(string& ...) (Bug report)
- Bug fixed in instm::seek() with IO_CURRENT (Bug report)
- Bug fixed in outmemory::seek() for unlimited streams (Bug report)
- Bug fixed in thread::~thread() for thread objects that never ran (Bug report)
- Visual C project files are now in DOS text format. (Problem report)
- PTypes-1.8 compatibility code removed (1.9-style lists are still supported)
- Author's email has changed, please see Introduction.
Version 2.0.2
- The memory corruption problem with the LinuxThreads library fixed (Problem 
report).
- Added versions of ipmessage::receive() that also 
return the source IP address.
- Added new properties and methods to inmemory and 
outmemory classes to allow reusability of objects of 
these types. Also cleaned up implementation of outmemory 
so that the increment property is no longer needed.
- Added textmap::getkey() method.
- Added const versions of operator[] for string 
and tpodlist.
- Bug fixed in pexchange() on PowerPC with gcc 3.3 
(Bug 
report) 
- Bug fixed in the string class (Bug 
report)
- Bugs fixed in the memory stream classes (Bug 
report1, Bug 
report 2)
Version 2.0.1
Version 2.0.0
- The list class/template family has been redesigned and expanded with new, 
more flexible interfaces. An overview is given in the Introduction 
to lists. The old interfaces are preserved in the headers for backward compatibility.
- Ported the library to Cygwin.
- 'make install' copies the header files and the binaries 
to default system locations.
- Jobqueue and msgqueue 
are now protected from overflows by an extra semaphore. If the number of unhandled 
messages in a queue reaches limit (a parameter set through 
the constructor) the post/send operation waits on a semaphore until the queue 
becomes available again.
- Windows DLLs now called: ptypes20.dll and ptypes20g.dll, generted by MSVC 
and GCC respectively.
- Added __stdcall (ptdecl 
macro) modifiers for all public functions in the library to be independent from 
the compiler command-line options on Windows.
- Variant arrays have been optimized for memory usage.
- All classes in the library are now either copyable or non-copyable explicitly.
- The last parameter of copy() and del() 
for strings is now optional.
- Fixed a bug in instm::seek(). (Bug 
report)
Version 1.9.0
- A new class jobqueue has been added. As 
shown in the multithreading examples, it helps to easily implement a thread-pool 
model.
- Multithreading examples have been re-written. 
Example 2 is now a full-featured multithreaded server template with a thread pool.
- Atomic functions for PowerPC have been implemented in the assembly language.
- UNIX shared object naming style has been changed. The shared library is now 
named libptypes.so.19 (libptypes.19.dylib on MacOS). The shared object now 'remembers' 
its real name (with the -soname option) for correct linking of user applications. 
(Bug 
report)
- Windows/MSVC DLL has been renamed to ptypes19.dll because of incompatible 
changes in the library structures. The DLL built by Dev-C++ has been renamed to 
ptypes19dc.dll for the same reason and also to avoid clashing with MSVC-generated 
DLL.
- The multithreaded version of the dynamic string class has been improved.
- A minor performance fixup in msgqueue::send() - 
the semaphore is no longer allocated dynamically.
- The exceptobj class has been renamed to exception, 
tsemaphore - to timedsem. 
The old names are typedef'ed for compatibility with older versions of the library.
- The message class now uses a portable typedef pinptr 
for the param and result fields. 
This allows to use these fields both as integers and pointers when necessary. 
The id field can now be in the range 0 
to INT_MAX; the internal value MSG_QUIT 
is now a negative value.
- Bind() and bindall() now 
return values that can be used in call to poll() and 
serve() for ipserver objects.
- setlength(string&) now returns a char* 
value.
- A bug has been fixed in the trigger class. (Bug 
report)
- The contains() family of functions has been fixed 
to correctly handle empty test strings. (Bug 
report)
- The ins() family of functions has been fixed to 
correctly handle values of at beyond the last character 
of a string. (Bug 
report)
- A bug has been fixed in the internal function psockname() 
that caused get_myport() methods (ipstream 
and ipmessage classes) to return an incorrect value. 
(Bug 
report)
- Compiler warning (and a potential problem) has been fixed on 64-bit systems. 
(Problem 
report)
Version 1.8.3
- Public header files are now included in the documentation in browsable form 
(see Header files).
- Delete notification mechanism for components, previously undocumented, now 
described in section Unknown & Component.
- Variant-to-string typecast problem has been fixed that caused compilation 
errors with GCC 3.3 (Problem 
report)
- A problem has been solved that allowed template lists to accept any class 
type, even if it's not derived from unknown. (Problem 
report)
- A better explanation of the librarie's policies and philosophy is given in 
section 'Why use PTypes?' (see Introduction).
Version 1.8.2
- The library has been ported to BSD/OS (BSDI). There is also limited support 
for OpenBSD and NetBSD without makefiles.
- The library now compiles with Visual C/C++ 7.1 (.NET) after considerable changes 
in <ptypes.h>
- A bug has been fixed in instm::token() that caused 
segfaults. (Bug 
report)
- A problem has been fixed in phost*() functions that 
caused segfaults on SuSE Linux. (Bug 
report)
- A bug has been fixed in wshare: the plus sign '+' should not be decoded as 
space in URL components other than query. (Bug 
report)
Version 1.8.1
- The following functions have been fixed to be thread-safe on UNIX systems: 
phostbyname(), phostbyaddr(), 
phostcname(), nowstring(), 
and also now() and tzoffset() 
on MacOS X. (Bug 
report 1, Bug 
report 2)
Version 1.8.0
- The library now compiles in 3 versions: static single-threaded, static multithreaded 
and dynamic (shared) multithreaded (see Compiling). 
On some platforms single-threaded dynamic strings can be twice as faster than 
multithreaded. 
- New format specifiers for outstm::putf() 
introduced: %a for IP addresses and %t 
for timestamps. 
- New classes scopelock, scoperead 
and scopewrite added in pasync.h.
- New conversion functions added stringtoie() and 
stringtoue() (see String 
conversion).
- A bug has been fixed in tsemaphore::wait(). This 
bug affected all platforms except Windows. (Bug 
report)
- SO_REUSEADDR problem fixed on Windows. (Bug 
report)
- A bug has been fixed in stringtoi(). (Bug 
report)
Version 1.7.6
- The library now compiles with Dev-C++/MinGW on Windows. Dev-C++ project files 
have been created for building the static and shared libraries, as well as the 
demo and testing programs.
- A new file output class called logfile 
has been created as a result of a discussion around this bug 
report.
- Wshare can now downgrade process privileges (setuid/setgid) 
on UNIX. Also, file handling and server status report has moved to separate optional 
modules mod_file.cxx and mod_wstat.cxx.
- A new section has been added in the documentation: Resources. 
This page can be accessed only on-line on the master server, since changes here 
may appear more frequently than in the library documentation.
- Bugs have been fixed in tzoffset() for Windows and 
Solaris (Bug 
report 1, Bug 
report 2).
- A bug has been fixed in strmap::strmap() constructor 
(Bug 
report).
- Thread creation routine has been changed on Windows to ensure thread-safety 
of system static variables (Bug 
report).
Version 1.7.5
- A tv_usec-related bug fixed in all socket/pipe waiting 
and polling routines. Non-integral timeout values were treated incorrectly in 
the previous versions of the library. (Bug 
report)
- Fixed return type for tstrmap::operator[]. (Bug 
report)
- instm::putback() added.
Version 1.7.4
- A new class unit has been added. Unit is a mini-process 
with its own main() and input/output 'plugs'; several 
unit objects within the framework of one application can be connected to form 
pipes, like processes in the UNIX shell.
- A new method for creating local pipes, infile::pipe(), 
has been added.
- Null output stream object has been added as a static variable pnull.
- __ptypes_version and the DLL version resource were 
not incremented in the previous release. Now they both show 1.7.4.
- outmemory::get_strdata() added.
Version 1.7.3
- Wrapper templates for objlist, strlist 
and strmap have been created. These templates help to 
avoid extra (dangerous) pointer typecasts and provide better compile-time type 
checking when using lists with objects derived from unknown. 
See introduction to Lists.
- A new class template compref has been added that 
implements a 'smart' pointer to a reference-counted component 
object.
- Function template tpexchange() has been added 
as a type-safe wrapper for pexchange().
- New methods ipstream::get_myport() and ipmessage::get_myport() 
have been added.
Version 1.7.2
- Fixed compilation and linking parameters for Linux and FreeBSD to build the 
shared library correctly (thanks to Alan Eldridge).
- Bug fixed in wshare/urlutils.cxx: the URL parameters (protocol parameters, 
query string and fragment) were treated incorrectly in previous versions.
Version 1.7.1
- A new section called "Deploying the shared (dynamic) 
library" is now included in the documentation. It describes in detail 
the procedure of using and deploying the shared (dynamic) library, discusses advantages 
and disadvantages of dynamic linking vs. static linking.
- PTypes.DLL now contains a version resource. In addition, the library declares 
a global variable __ptypes_version, which can be checked at run-time or during 
installation on UNIX.
- strlist::compare() is declared as virtual to allow 
alternate sorting algorithms in descendant classes.
 Version 1.7.0
- Variant class implemented. A variant 
variable can hold values of many fundamental types (int, bool, datetime, float, 
string) plus associative arrays of variants and reference-counted pointers to 
objects. Variants can be used for designing interpreters for higher-level languages, 
designing or working with databases and spreadsheets, etc.
- Message-oriented networking classes (ipmessage 
and ipmsgserver) implemented based on the 
UDP protocol.
- The library now compiles both as a shared object (DLL on Windows) and a static 
library. The shared object (or DLL) is placed in so/ 
when building the library.
- outstm::putf() is now atomic with respect to multithreading.
- Ipsocket renamed to ipstream, 
ipserver renamed to ipstmserver. 
The old names are available as typedef's for compatibility.
Version 1.6.1
- Read/write lock (rwlock) algorithm improved 
to be "fairer" with respect to both readers and writers.
- Trigger algorithm fixed to be fully compatible 
with Windows event interface.
- psleep() fixed on Solaris to be reentrant (multithreaded).
Version 1.6.0
- Portable named pipes added - namedpipe 
and npserver.
- Read/write lock class rwlock (a smarter mutex) 
added.
- Trigger (a simplified semaphore) class added.
- Memory stream classes inmemory and outmemory, 
previously undocumented, now described in section Streams.
-  Windows InterlockedXXX calls replaced with internal assembly code to work 
as expected even on Win95.
- A string-to-int (64-bit) conversion routine added - stringtoi().
- ipsocket::get_myip() added.
- Dynamic string assignment and itostring() optimized.
- Better diagnostics messages for ipserver.
Version 1.5.3
- Token extraction methods can now optionally limit input and throw en exception 
if the token exceeds the limit. This new feature is targeted to real-world networking 
applications.
- A new section "Portability and Performance 
Issues" and an alphabetical reference of all public 
symbols added in the documentation.
- Examples for the sockets interface and some other modules rewritten to be 
cleaner and more educational.
-  GCC 3.x compilation problem solved in pinet.h (friend class declaration).
Version 1.5.2
-  Dynamic strings have been optimized and thoroughly tested. Compared to MFC 
CString class, PTypes dynamic strings now show much better performance.
-  Bug fixed in decodedate(). This function worked 
incorrectly for the last day (12/31) of each leap year.
Version 1.5.1
-  Documentation cleanup.
-  A sample compile-time module for wshare, which responds to http://hostname/.about 
requests. Code cleanup in wshare.
Version 1.5.0
-  Wshare is becoming modular/scalable. Custom handlers for a new HTTP method, 
file extension or a nonexistent path can be easily incorporated into wshare at 
compile time. Currently this feature is documented only in the source files.
-  Wshare can show the server status report through http://localhost/.wstat
-  Standard input, output and error devices are declared in <pstreams.h> 
as pin, pout and perr stream objects respectively.
-  New printf-style formatted output method outstm::putf(). 
Accepts only a subset of format specifiers common to all platforms.
-  Bug fix in outstm::put().
-  Handle leak on Windows fixed.
-  realloc-related memory leak on UNIX fixed.
-  Bug in string class fixed: s += s was working incorrectly 
in previous versions.
Version 1.4.1
-  The MD5 module is replaced with L. Peter Deutsch's implementation. Please, 
see comments in src/pmd5.cxx.
-  Wshare: code cleanup in various modules; Borland C++ port (wshare/wshare.mak); 
a new option -x to ignore default index files and always 
show directory indexes.
-  Include directives in src/pipserver.cxx and src/pipsocket.cxx 
have been reordered to avoid compiler errors on some Linux systems.
Version 1.4.0
-  A big sample program called wshare is now included in the project. Wshare 
is a simple and fast HTTP/1.1 web server; it demonstrates the full power of PTypes. 
Currently wshare lacks server-side scripting functionality, however, it can be 
used to quickly share local files over the web.
-  Waiting for data with timeout on a socket object is implemented (ipsocket::waitfor()).
-  SIGPIPE is now blocked on UNIX when using PTypes' 
sockets.
-  A new utility function utodatetime() for converting 
UNIX time_t values to PTypes datetime.
-  Atomic exchange for pointers is implemented separately, since on 64-bit platforms 
the size of a void pointer differs from the size of int.
-  A bug fix for autofree threads. Please note that semantics of thread::waitfor() 
has changed (see documentation for details).
Version 1.3.2
-  Ported to MacOS X (Darwin).
-  Important fixes in the thread module (src/pthread.cxx): 
PTypes now ensures proper operation and memory cleanup on all platforms, even 
with buggy implementation of the POSIX threads specs.
-  Compiled under Linux/Alpha, Linux/PowerPC and Linux/Sparc with minor fixes: 
ipaddress type is now castable to unsigned long instead 
of signed long; variables of type ipaddress must be compared with ipnone instead 
of -1.
Version 1.3.1
-  CVS repository setup at SourceForge.net (see the main page for details).
-  Various fixes in the documentation.
-  Fixes in the BCC makefile src/ptypes.mak.
Version 1.3
-  IP socket manipulation classes and utilities, finally!
-  The new datetime type along with time/calendar manipulation 
utilities.
-  Timed semaphore class tsemaphore.
-  The library now compiles within a namespace "pt" by default.
-  semaphore::post() and semaphore::wait() 
now do not return any values. If these functions fail, a fatal non-recoverable 
error is raised instead of returning an error code to the caller. It is senseless 
to run a multithreaded application if the system fails to operate semaphores.
-  Bug fixed in non-Intel version of pexchange().
Version 1.2
-  The entire library can now be conditionally enclosed within a namespace to 
avoid name conflicts in large projects. By default the library does NOT compile 
within a namespace.
-  Several fixes to improve performance of the dynamic string class, as well 
as to make it thread safe (see introduction to string class).
-  Ported to SunOS. (The library should now compile virtually on any UNIX platform. 
Need some time and access to different computers.)
-  Compiled with Borland C++ 5.5 (aka C++ Builder) under Windows. The makefile 
is src/ptypes.mak.
-  MD5 (message digest) algorithm is implemented as an output stream class outmd5.
-  Bug fixes in src/pinstm.cxx and src/poutstm.cxx.
Version 1.1 was the first public release
PTypes home