Files
harbour-core/contrib/hbnf/invclr.prg
vszakats 9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00

45 lines
1.3 KiB
Plaintext

/*
* Author....: David Husnian
* CIS ID....: ?
*
* This is an original work by David Husnian and is placed in the
* public domain.
*
* Modification history:
* ---------------------
*
* Rev 1.2 15 Aug 1991 23:03:44 GLENN
* Forest Belt proofread/edited/cleaned up doc
*
* Rev 1.1 14 Jun 1991 19:52:00 GLENN
* Minor edit to file header
*
* Rev 1.0 01 Apr 1991 01:01:30 GLENN
* Nanforum Toolkit
*
*/
FUNCTION ft_InvClr( cDsrdColor )
LOCAL cBackground // The Background Color, New Foreground
LOCAL cForeground // The Foreground Color, New Background
LOCAL cModifiers // Any Color Modifiers (+*)
__defaultNIL( @cDsrdColor, SetColor() )
// Remove Anything Past 1st Color
cDsrdColor := Left( cDsrdColor, At( ",", cDsrdColor + "," ) - 1 )
// Get Any Modifiers
cModifiers := ;
iif( "*" $ cDsrdColor, "*", "" ) + ;
iif( "+" $ cDsrdColor, "+", "" )
// Separate the Fore/Background Colors
cForeground := AllTrim( Left( cDsrdColor, At( "/", cDsrdColor ) - 1 ) )
cBackground := AllTrim( SubStr( cDsrdColor, At( "/", cDsrdColor ) + 1 ) )
RETURN ;
StrTran( StrTran( cBackground, "+" ), "*" ) + cModifiers + "/" + ;
StrTran( StrTran( cForeground, "+" ), "*" )