Jump to content

REXXSEM: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
REXXSEM is an OS/2-native DLL which allows [[REXX]] scripts access to native OS/2 semaphoring APIs. A few other goodies are thrown in which can greatly simplify your REXX code in a number of other areas. Over and above the simple API calls that OS/2 allows (all of which are available through RXSem), RXSem will keep track of your semaphores for you, allowing you to query RXSem for which semaphores you have in use for your given process.


==Description==
RXSem is also developer-friendly with a unique capability for returning error messages that describe the current problem instead of aborting your script, as is normal for REXX libraries. Finally, a few other goodies are thrown in which can greatly simplify your REXX code in a number of other areas (priority settings, process detection and killing, launching Netscape via DDE, word wrap, set window title).
REXXSEM is an OS/2-native DLL which allows REXX scripts (programs?) access to native OS/2 semaphoring APIs. A few other goodies are thrown in which can greatly simplify your REXX code in a number of other areas.  


====What is RXSem?====
Note that this program was developed before [[REXXUTIL]] supported semaphores, that version of REXXUTIL comes with all variants of OS/2 Warp. While this DLL has some more fine-grained control in some respects than what REXXUTIL offers, you should look into the latter functions first since they are effectively built into the OS.
 
RXSem, at the basest level, is a DLL that provides your REXX scripts with access to the OS/2 semaphore APIs. Look at this library from a higher perspective, however, and you can see an OS/2 semaphore management subsystem. Over and above the simple API calls that OS/2 allows (all of which are available through RXSem), RXSem will keep track of your semaphores for you, allowing you to query RXSem for which semaphores you have in use for your given process.
 
RXSem is also developer-friendly with a unique capability for returning error messages that describe the current problem instead of aborting your script, as is normal for REXX libraries.
 
Finally, a few other goodies are thrown in which can greatly simplify your REXX code in a number of other areas (priority settings, process detection and killing, launching Netscape via DDE, word wrap, set window title).
 
====Change History====
 
Changes to the library:
<PRE>
December 10, 2000 (1.05)
 
! Fixed a few other glaring problems in trace points
 
        + Added docs on SemTraceFile.  Basically, only use it if I ask you to.
 
        + Added more trace points to find the problem above.
 
December 9, 2000
 
! Fixed WordWrap - it overwrote its own memory if used repeatedly.
 
August 27, 2000 (1.04)
 
+ Finished adding trace points (well, unless new specific problems arise that
          aren't covered here...)
 
August 18, 2000
 
! Docs for RxSemListWindows had wrong function name!
 
        + Added SemTraceFile - tracing for some functions enabled, will be doing more
          as time progresses.
 
August 10, 2000
 
! Fixed more memory leaks, and other miscellaneous well-hidden bugs.
 
July 26, 2000
 
+ Added an icon - anyone else have a better one?
 
July 22, 2000 (1.03)
 
+ Added RxSemWindowList and RxSemToggleSwitchVisibility
 
July 14, 2000
 
! Fixed a memory leak when setting REXX variables
 
        + Started using LXLite to compress the DLL.  Chopped over 30% off its
          size.
 
April 30, 2000
 
! Reference (HTML) didn't have SemEWait in its TOC... woops.  Found
          this while looking it up for help using it myself.
 
February 23, 2000 (1.02)
 
+ Added SetTextScreenSize so I wouldn't need to create another process
          to run 'mode'.
 
August 19, 1999 (1.01)
 
+ Added POSTONE and AUTORESET to SemECreate, under advice from
          Scott E. Garfinkle <seg@austin.rr.com>.
 
July 28, 1999 (1.00)
 
+ Added SemMQuerySemHandle, SemEQuerySemHandle, indirect request from
          Daniel Hellesretin <danielh@crosslink.net>
 
        ! Claiming a mutex with a wait of zero waited forever, as if no
          wait was specified.  (Reported by Daniel Hellesretin
          <danielh@crosslink.net>.)
 
July 7, 1999
 
+ Added ChecksumFile
 
June 24, 1999
 
+ Added MyProcessID and ChecksumString
 
June 20, 1999
 
        + Added registration codes so that I can pull this software out
          of beta (finally!).  Available on Hobbes.  Semaphores are not
          limited, only the extra miscellaneous functions, except for
          opening Netscape windows.
 
June 16, 1999
 
+ Very late at night, added KillProcess.  (See the reference to
          see what I mean.)
 
June 13, 1999
 
        + Added PriorityQuery and PrioritySet
 
June 6, 1999 (0.7b)
 
+ Added *GetAllSems because it was only about 12 lines of code,
          and could be of some use to some people.  This also returns back
          the *name* of the semaphores.
 
        * Changed the reference to .htm (I'm still FAT-compliant).
 
        + Added everything to new website: http://tower.to.org/rexxsem
 
        + Finished (and even debugged) event semaphores.
 
May 16, 1999
 
! Rewrote (this is too common of a word here ...) the semaphore
          interface.  All mutex-semaphore functions (16- and 32-bit) have
          been renamed to SemM* from Sem*.  This, so that I can add Event
          semaphores as SemE*.
 
        + Started work on Event semaphores, something intended back in 1998,
          but only started now 'cuz someone almost requested it.
 
        * Changed dates in this file to be Y2K compliant.  Now the entire
          product is Y2K compiant, not just the code.  :-)
 
        + Added SemMCreate which will determine if you want a 32-bit or
          16-bit semaphore based on the semaphore name - whether it starts
          with "\SEM32\" or "\SEM\".
 
Sep 04, 1998
 
+ Created RxWinSetTitle.
 
        + SemLogState changed to not create an empty file if there is
          nothing to log.  This will let you leave your 'debug' code in
          even when nothing goes wrong.
 
Jun 22, 1998 (0.6b)
 
! Something changed - first SemCreate wasn't working, next SemClose
          wasn't working (as advertised anyway).  Cleaned these up!  Boy
          am *I* glad I said this was BETA!
 
        + Created SemVersion to return the version info.  Returns
          "REXXSEM v<version>".  Starts at "REXXSEM v0.6b".
 
Jun 21, 1998
 
+ Added explicit licencing information to the documentation after
          request for same from Matthew Davis <prs@twave.net>
 
May 31, 1998 (0.5b)
 
        * Rewrote to use VAC++ rather than Watcom partly because I no longer
          have Watcom installed, but do have IBM's Visual Age installed.  I
          hope not to have to remove VAC++ anytime soon...
 
        + Added language-independence.  Can use other languages if someone
          is willing to translate for me.  This is the creation of
          SemSetLanguageDll.  Will ship languages in the archive as they
          are created.
 
        + Added OpenNetscapeWindow, ProcessIDsOf, WordWrap.
 
        * Renamed REXXSEM.TXT to REXXSEM.REF since it was really a
          reference file.  Created new TXT file as an overview
          description.
 
Mar 23, 1997
 
! Changing the interface broke it.  Would display wrong string
          when had to wait for semaphore.  Now displays correct string.
 
Mar 05, 1997 (0.4b)
 
* Changed the interface to SemClaim to make a bit more sense.
 
Mar 02, 1997
 
+ Added optional message parameter to SemClaim.  This simplifies any
          user-friendly rexx coding immensely.  This is what happens when...
 
        * Author finally started using his own code.  :-)  Got tired of having
          to code (in rexx) all the user-friendly stuff the same way, so I
          cheated - I put it into the rexx code.  :-)
 
Jan 19, 1997
 
+ Added SemCloseAll to simplify closing all semaphores.
 
Jan 9, 1997 (0.2b)
 
! SemClaim returned the wrong values when using a timeout.  Fixed.
          (Reported indirectly by Tony Koker <74105.1432@CompuServe.COM>)
 
        * SemClaim would "lock" if attempting to claim a second time.  Now
          it simply returns "CLAIMED".  This is to prevent a lock in otherwise
          invalid behaviour (you should not claim an already-claimed semaphore)
          (Reported by Tony Koker <74105.1432@CompuServe.COM>)
 
        * SemRelease probably returned invalid values if releasing a non-claimed
          semaphore, or releasing an already-released semaphore.  Don't know
          what it did, but it will always return successfully now in these
          cases.  However, again, you should only be releasing semaphores that
          are already claimed. (Reported indirectly by
          Tony Koker <74105.1432@CompuServe.COM>)
</PRE>


==Version==
==Version==
* Latest Version: December 10, 2000. Version 1.05.
* 1.05 (2000-12-10)


==Links==
==License==
* http://www.bmtmicro.com/BMTCatalog/os2/rxsem.html
Darin McBride gave authorization to release RXSem (REXXSEM) as unsupported "AS IS" freeware. The source code and key generator of this program got lost. He gave permission to hack their binaries.
* http://ftp2.bmtmicro.com/rxsem105.zip
* http://web.archive.org/web/20080828211203/http://tower.to.org/software.html


 
Author: [[Darin McBride]]
==License==
Darin McBride gave authorization to release RXSem (REXXSEM) as unsupported "AS IS" freeware. The source code and key generator of this program got lost.


==Related Articles==
==Related Articles==
Line 230: Line 17:
* [[REXXSEM:The Reference]]
* [[REXXSEM:The Reference]]


==Author==
==Links==
* [[Darin McBride]]
* http://ftp2.bmtmicro.com/rxsem105.zip
* http://web.archive.org/web/20080828211203/http://tower.to.org/software.html


[[Category:Tools]]
[[Category:REXX Function Library]]

Latest revision as of 18:49, 29 October 2023

REXXSEM is an OS/2-native DLL which allows REXX scripts access to native OS/2 semaphoring APIs. A few other goodies are thrown in which can greatly simplify your REXX code in a number of other areas. Over and above the simple API calls that OS/2 allows (all of which are available through RXSem), RXSem will keep track of your semaphores for you, allowing you to query RXSem for which semaphores you have in use for your given process.

RXSem is also developer-friendly with a unique capability for returning error messages that describe the current problem instead of aborting your script, as is normal for REXX libraries. Finally, a few other goodies are thrown in which can greatly simplify your REXX code in a number of other areas (priority settings, process detection and killing, launching Netscape via DDE, word wrap, set window title).

Note that this program was developed before REXXUTIL supported semaphores, that version of REXXUTIL comes with all variants of OS/2 Warp. While this DLL has some more fine-grained control in some respects than what REXXUTIL offers, you should look into the latter functions first since they are effectively built into the OS.

Version

  • 1.05 (2000-12-10)

License

Darin McBride gave authorization to release RXSem (REXXSEM) as unsupported "AS IS" freeware. The source code and key generator of this program got lost. He gave permission to hack their binaries.

Author: Darin McBride

Related Articles

Links