New GT.M plugin wraps select POSIX functions

GT.M's open architecture is easily extended with small. simple, wrappers for functions in popular libraries external to GT.M.  By enhancing the "gtm" script to automatically assign values to needed environment variables for standard-format wrappers in a plugin subdirectory, GT.M V5.5-000 provided a framework for plugins that could be dropped into a GT.M installation.  At that time, FIS released a small plugin for zlib, the popular compression library.  By wrapping select POSIX functions, the new POSIX plugin now extends GT.M functionality with regular expressions, microsecond resolution time measurement, logging to the system log, and more.  Each plugin consists of low level functions that wrap individual POSIX functions and higher level functions that package the new functionality in a form more familiar to GT.M programmers.  For example, the higher level extrinsic special variable $$zhorolog^%POSIX extends the intrinsic special variable $horolog with microsecond resolution by invoking the low level function &posix.gettimeofday() which in turn wraps the POSIX gettimeofday() function.

Plugins are released as source code with a readme on installation and usage them and can be downloaded from http://sourceforge.net/projects/fis-gtm/files/Plugins; the new POSIX plugin also includes a Makefile.

 

 

 

 

 

Related Events