2009-02-03 02:07 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

* contrib/hbct/strdiff.c
  * contrib/hbct/token2.c
  * contrib/hbct/atadjust.c
  * contrib/hbct/ctmath.c
  * contrib/hbct/charsort.c
  * contrib/hbct/charmix.c
  * contrib/hbct/wordrepl.c
  * contrib/hbct/charrepl.c
  * contrib/hbct/strswap.c
  * contrib/hbct/trig.c
  * contrib/hbct/charswap.c
  * contrib/hbct/charop.c
  * contrib/hbct/num1.c
  * contrib/hbct/ctstr.c
  * contrib/hbct/token1.c
  * contrib/hbct/charmirr.c
  * contrib/hbct/ctc.c
  * contrib/hbct/relation.c
  * contrib/hbct/atnum.c
  * contrib/hbct/posdiff.c
  * contrib/hbct/finan.c
  * contrib/hbct/range.c
  * contrib/hbct/addascii.c
  * contrib/hbct/ctmath2.c
  * contrib/hbct/tab.c
  * contrib/hbct/asciisum.c
  * contrib/hbct/pos2.c
  * contrib/hbct/numat.c
  * contrib/hbct/atrepl.c
  * contrib/hbct/wordtoch.c
    % Using HB_ERR_FUNCNAME.

  * contrib/hbct/charop.c
    ! Fixed CHARADD(), CHARSUB(), CHARAND(), CHAROR(), CHARXOR()
      showing wrong function name in error message when first
      passed parameter is invalid.
This commit is contained in:
Viktor Szakats
2009-02-03 01:09:52 +00:00
parent 3ebad5fb4e
commit d81d19db75
31 changed files with 268 additions and 230 deletions

View File

@@ -8,6 +8,44 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-02-03 02:07 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbct/strdiff.c
* contrib/hbct/token2.c
* contrib/hbct/atadjust.c
* contrib/hbct/ctmath.c
* contrib/hbct/charsort.c
* contrib/hbct/charmix.c
* contrib/hbct/wordrepl.c
* contrib/hbct/charrepl.c
* contrib/hbct/strswap.c
* contrib/hbct/trig.c
* contrib/hbct/charswap.c
* contrib/hbct/charop.c
* contrib/hbct/num1.c
* contrib/hbct/ctstr.c
* contrib/hbct/token1.c
* contrib/hbct/charmirr.c
* contrib/hbct/ctc.c
* contrib/hbct/relation.c
* contrib/hbct/atnum.c
* contrib/hbct/posdiff.c
* contrib/hbct/finan.c
* contrib/hbct/range.c
* contrib/hbct/addascii.c
* contrib/hbct/ctmath2.c
* contrib/hbct/tab.c
* contrib/hbct/asciisum.c
* contrib/hbct/pos2.c
* contrib/hbct/numat.c
* contrib/hbct/atrepl.c
* contrib/hbct/wordtoch.c
% Using HB_ERR_FUNCNAME.
* contrib/hbct/charop.c
! Fixed CHARADD(), CHARSUB(), CHARAND(), CHAROR(), CHARXOR()
showing wrong function name in error message when first
passed parameter is invalid.
2009-02-03 01:49 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbct/charop.c
! Fixed CHARADD(), CHARSUB(), CHARAND(), CHAROR(), CHARXOR()

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
* ADDASCII() CT3 string function
*
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
@@ -93,11 +93,11 @@
* $EXAMPLES$
* // Add 32 to the ASCII value of the character at the last position
* // in the string
*
*
* ? addascii ("SmitH", 32) --> "Smith"
* $TESTS$
* addascii ("0000", 1, 1) == "1000"
* addascii ("0000", 1) == "0001"
* addascii ("0000", 1) == "0001"
* addascii ("AAAA", -255, 1) == "BAAA"
* addascii ("AAAA", -255) == "AAAB"
* addascii ("AAAA", 1, 2, .T.) == "ABAA"
@@ -116,7 +116,7 @@
* $FILES$
* Source is addascii.c, library is ct3.
* $SEEALSO$
* CSETREF()
* CSETREF()
* $END$
*/
@@ -148,7 +148,7 @@ HB_FUNC( ADDASCII )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ADDASCII, NULL,
"ADDASCII", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
/* return string unchanged */
if( iNoRet )
@@ -209,7 +209,7 @@ HB_FUNC( ADDASCII )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ADDASCII,
NULL, "ADDASCII", 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
* ASCIISUM CT3 string function
*
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
@@ -78,9 +78,9 @@
* ? asciisum ("ABC") --> 197
* ? asciisum ("ACB") --> 197
* $TESTS$
* asciisum (replicate ("A", 10000)) == 650000
* asciisum ("0123456789") == 525
* asciisum (nil) == 0
* asciisum (replicate ("A", 10000)) == 650000
* asciisum ("0123456789") == 525
* asciisum (nil) == 0
* $STATUS$
* Ready
* $COMPLIANCE$
@@ -117,7 +117,7 @@ HB_FUNC( ASCIISUM )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_ASCIISUM, NULL, "ASCIISUM", 0,
CT_ERROR_ASCIISUM, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
* ATADJUST() CT3 string function
*
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
@@ -131,7 +131,7 @@ HB_FUNC( ATADJUST )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATADJUST, NULL, "ATADJUST", 0,
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATADJUST, NULL, HB_ERR_FUNCNAME, 0,
EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retclen( pcString, sStrLen );
@@ -150,7 +150,7 @@ HB_FUNC( ATADJUST )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATADJUST, NULL, "ATADJUST", 0,
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATADJUST, NULL, HB_ERR_FUNCNAME, 0,
EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retclen( pcString, sStrLen );
@@ -308,7 +308,7 @@ HB_FUNC( ATADJUST )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_ATADJUST, NULL, "ATADJUST", 0,
CT_ERROR_ATADJUST, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -8,7 +8,7 @@
*
* - AFTERATNUM()
* - BEFORATNUM()
* - ATNUM()
* - ATNUM()
*
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
* Author: Martin Vogel <vogel@inttec.de>
@@ -96,7 +96,7 @@ static void do_atnum( int iSwitch )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_AFTERATNUM, NULL,
"AFTERATNUM", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retc( NULL );
break;
@@ -109,7 +109,7 @@ static void do_atnum( int iSwitch )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_BEFORATNUM, NULL,
"BEFORATNUM", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retc( NULL );
break;
@@ -121,7 +121,7 @@ static void do_atnum( int iSwitch )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATNUM, NULL, "ATNUM", 0,
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATNUM, NULL, HB_ERR_FUNCNAME, 0,
EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retni( 0 );
@@ -296,7 +296,7 @@ static void do_atnum( int iSwitch )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATNUM,
NULL, "ATNUM", 0, EF_CANSUBSTITUTE,
NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE,
HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
* ATREPL() CT3 string function
*
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
@@ -69,7 +69,7 @@
* $ARGUMENTS$
* <cStringToMatch> is the substring searched for in <cString>
* <cString> is the processed string
* <cReplacement> is the replacement for sequences found
* <cReplacement> is the replacement for sequences found
* [<nCounter>] specifies the number of replacements
* Default: last occurence
* [<lMode>] if set to .T., only the <nCounter>th sequence
@@ -155,7 +155,7 @@ HB_FUNC( ATREPL )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATREPL, NULL,
"ATREPL", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retclen( pcString, sStrLen );
return;
@@ -334,7 +334,7 @@ HB_FUNC( ATREPL )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_ATREPL, NULL, "ATREPL", 0,
CT_ERROR_ATREPL, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
* CT3 string function CHARMIRR()
*
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
@@ -81,11 +81,11 @@
* switch to .T., but <cString> must then be passed by reference to get
* a result.
* $EXAMPLES$
* ? charmirr ("racecar") // "racecar"
* ? charmirr ("racecar") // "racecar"
* ? charmirr ("racecar ", .T.) // "racecar "
* ? charmirr ("racecar ", .F.) // " racecar"
* $TESTS$
* charmirr ("racecar") == "racecar"
* charmirr ("racecar") == "racecar"
* charmirr ("racecar ", .T.) == "racecar "
* charmirr ("racecar ", .F.) == " racecar"
* $STATUS$
@@ -129,7 +129,7 @@ HB_FUNC( CHARMIRR )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARMIRR, NULL,
"CHARMIRR", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
if( iNoRet )
hb_retl( 0 );
@@ -179,7 +179,7 @@ HB_FUNC( CHARMIRR )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_CHARMIRR, NULL, "CHARMIRR", 0,
CT_ERROR_CHARMIRR, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -7,7 +7,7 @@
* CHARMIX() CT3 function
*
* Initial code: Copyright 1999-2001 Viktor Szakats <viktor.szakats@syenar.hu>
*
*
* CT3 conformity: Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
* Author: Martin Vogel <vogel@inttec.de>
*
@@ -124,7 +124,7 @@ HB_FUNC( CHARMIX )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARMIX, NULL, "CHARMIX", 0,
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARMIX, NULL, HB_ERR_FUNCNAME, 0,
EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retc( NULL );
@@ -142,7 +142,7 @@ HB_FUNC( CHARMIX )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARMIX,
NULL, "CHARMIX", 0,
NULL, HB_ERR_FUNCNAME, 0,
EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retclen( pcString1, sLen1 );
@@ -175,7 +175,7 @@ HB_FUNC( CHARMIX )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_CHARMIX, NULL, "CHARMIX", 0,
CT_ERROR_CHARMIX, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -211,7 +211,7 @@ static void do_charop( int iSwitch )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARADD,
NULL, "CHARADD", 0,
NULL, HB_ERR_FUNCNAME, 0,
EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_xmemcpy( pucResult, pucString, sStrLen );
@@ -237,7 +237,7 @@ static void do_charop( int iSwitch )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARSUB,
NULL, "CHARSUB", 0,
NULL, HB_ERR_FUNCNAME, 0,
EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_xmemcpy( pucResult, pucString, sStrLen );
@@ -262,7 +262,7 @@ static void do_charop( int iSwitch )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARAND, NULL, "CHARAND", 0,
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARAND, NULL, HB_ERR_FUNCNAME, 0,
EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_xmemcpy( pucResult, pucString, sStrLen );
@@ -287,7 +287,7 @@ static void do_charop( int iSwitch )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHAROR, NULL, "CHAROR", 0,
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHAROR, NULL, HB_ERR_FUNCNAME, 0,
EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_xmemcpy( pucResult, pucString, sStrLen );
@@ -312,7 +312,7 @@ static void do_charop( int iSwitch )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARXOR, NULL, "CHARXOR", 0,
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARXOR, NULL, HB_ERR_FUNCNAME, 0,
EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_xmemcpy( pucResult, pucString, sStrLen );
@@ -379,7 +379,7 @@ static void do_charop( int iSwitch )
break;
}
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, iError,
NULL, "CHARRLR", 0, EF_CANSUBSTITUTE,
NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE,
HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
* CT3 string function CHARREPL()
*
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
@@ -83,7 +83,7 @@
* and, if successful, replaces them with the corresponding character
* of <cReplaceString>. Be aware that if the same characters occur
* in both <cSearchString> and <cReplaceString>, the character on a
* certain position in <cString> can be replaced multiple times.
* certain position in <cString> can be replaced multiple times.
* if <lMode> is set to .T., the function takes the characters in <cString>
* one after the other, searches for them in <cSearchString> and, if
* successful, replaces them with the corresponding character of
@@ -95,17 +95,17 @@
* One can omit the return value by setting the CSETREF() switch to .T.,
* but then one must pass <cString> by reference to get the result.
* $EXAMPLES$
* ? charrepl ("1234", "1x2y3z", "abcd") // "axbycz"
* ? charrepl ("abcdefghij", "jhfdb", "1234567890") // "08642"
* ? charrepl ("abcdefghij", "jhfdb", "12345") // "55542"
* ? charrepl ("1234", "1234", "234A") // "AAAA"
* ? charrepl ("1234", "1234", "234A", .T.) // "234A"
* ? charrepl ("1234", "1x2y3z", "abcd") // "axbycz"
* ? charrepl ("abcdefghij", "jhfdb", "1234567890") // "08642"
* ? charrepl ("abcdefghij", "jhfdb", "12345") // "55542"
* ? charrepl ("1234", "1234", "234A") // "AAAA"
* ? charrepl ("1234", "1234", "234A", .T.) // "234A"
* $TESTS$
* charrepl ("1234", "1x2y3z", "abcd") == "axbycz"
* charrepl ("abcdefghij", "jhfdb", "1234567890") == "08642"
* charrepl ("abcdefghij", "jhfdb", "12345") == "55542"
* charrepl ("1234", "1234", "234A") == "AAAA"
* charrepl ("1234", "1234", "234A", .T.) == "234A"
* charrepl ("1234", "1x2y3z", "abcd") == "axbycz"
* charrepl ("abcdefghij", "jhfdb", "1234567890") == "08642"
* charrepl ("abcdefghij", "jhfdb", "12345") == "55542"
* charrepl ("1234", "1234", "234A") == "AAAA"
* charrepl ("1234", "1234", "234A", .T.) == "234A"
* $STATUS$
* Ready
* $COMPLIANCE$
@@ -230,7 +230,7 @@ HB_FUNC( CHARREPL )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_CHARREPL, NULL, "CHARREPL", 0,
CT_ERROR_CHARREPL, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
* CHARSORT() CT3 string functions
*
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
@@ -231,7 +231,7 @@ HB_FUNC( CHARSORT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARSORT,
NULL, "CHARSORT", 0, EF_CANDEFAULT,
NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT,
HB_ERR_ARGS_BASEPARAMS );
}
if( iNoRet )
@@ -269,7 +269,7 @@ HB_FUNC( CHARSORT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_CHARSORT, NULL, "CHARSORT", 0,
CT_ERROR_CHARSORT, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
* CT3 string functions
* - CHARSWAP()
* - WORDSWAP()
@@ -164,14 +164,14 @@ static void do_charswap( int iSwitch )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_CHARSWAP,
NULL, "CHARSWAP", 0, EF_CANSUBSTITUTE,
NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE,
HB_ERR_ARGS_BASEPARAMS );
}
else
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_WORDSWAP,
NULL, "WORDSWAP", 0, EF_CANSUBSTITUTE,
NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE,
HB_ERR_ARGS_BASEPARAMS );
}
}

View File

@@ -124,7 +124,7 @@ USHORT ct_error( USHORT uiSeverity, ULONG ulGenCode, ULONG ulSubCode,
}
/* throwing a CT-subsystem error with value substitution
/* throwing a CT-subsystem error with value substitution
- function adapted from errorapi.c */
PHB_ITEM ct_error_subst( USHORT uiSeverity, ULONG ulGenCode, ULONG ulSubCode,
const char *szDescription, const char *szOperation, USHORT uiOsCode, USHORT uiFlags, ULONG ulArgCount, ... )
@@ -227,7 +227,7 @@ int ct_getargerrormode( void )
* CT_ARGERR_WARNING corresponds to ES_WARNING
* CT_ARGERR_ERROR corresponds to ES_ERROR
* CT_ARGERR_CATASTROPHIC corresponds to ES_CATASTROPHIC
* CT_ARGERR_IGNORE
* CT_ARGERR_IGNORE
* The last is the default behaviour and switches any argument error
* throwing off.
* $EXAMPLES$
@@ -267,7 +267,7 @@ HB_FUNC( CSETARGERR )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CSETARGERR,
NULL, "CSETARGERR", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
}
}
@@ -278,7 +278,7 @@ HB_FUNC( CSETARGERR )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CSETARGERR, NULL,
"CSETARGERR", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
}
}

View File

@@ -129,7 +129,7 @@ HB_FUNC( SETPREC )
if( iArgErrorMode != CT_ARGERR_IGNORE )
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_SETPREC, NULL,
"SETPREC", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retc( NULL );
}
@@ -173,6 +173,6 @@ HB_FUNC( GETPREC )
if( iArgErrorMode != CT_ARGERR_IGNORE )
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_GETPREC, NULL,
"GETPREC", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
}

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
*
* CT3 mathematical functions
* - FLOOR
@@ -15,8 +15,8 @@
* NOTE: All these functions were builded using Borland C++ 5.5 (free version)
*
* Copyright 2001 Alejandro de Garate <alex_degarate@hotmail.com>
*
* Documentation and changes concerning error handling Copyright 2001
*
* Documentation and changes concerning error handling Copyright 2001
* IntTec GmbH, Freiburg, Germany, Author: Martin Vogel <vogel@inttec.de>
*
* www - http://www.harbour-project.org
@@ -59,7 +59,7 @@
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*
*/
@@ -75,13 +75,13 @@
* Rounds down a number to the next integer
* $SYNTAX$
* FLOOR (nNumber) -> nDownRoundedNumber
* $ARGUMENTS$
* $ARGUMENTS$
* <nNumber> number to round down
* $RETURNS$
* <nDownRoundedNumber> the rounded number
* $DESCRIPTION$
* The function FLOOR() determines the biggest integer that is smaller
* than <nNumber>.
* than <nNumber>.
* $EXAMPLES$
* ? floor (1.1) --> 1.0
* ? floor (-1.1) --> -2.0
@@ -128,7 +128,7 @@ HB_FUNC( FLOOR )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst =
ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_FLOOR, NULL, "FLOOR", 0,
ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_FLOOR, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -148,13 +148,13 @@ HB_FUNC( FLOOR )
* Rounds up a number to the next integer
* $SYNTAX$
* CEILING (nNumber) -> nUpRoundedNumber
* $ARGUMENTS$
* $ARGUMENTS$
* <nNumber> number to round up
* $RETURNS$
* <nUpRoundedNumber> the rounded number
* $DESCRIPTION$
* The function CEILING() determines the smallest integer that is bigger
* than <nNumber>.
* than <nNumber>.
* $EXAMPLES$
* ? ceiling (1.1) --> 2.0
* ? ceiling (-1.1) --> -1.0
@@ -201,7 +201,7 @@ HB_FUNC( CEILING )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_CEILING, NULL, "CEILING", 0,
CT_ERROR_CEILING, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -221,8 +221,8 @@ HB_FUNC( CEILING )
* Sign of a number
* $SYNTAX$
* SIGN (nNumber) -> nSign
* $ARGUMENTS$
* <nNumber> a number
* $ARGUMENTS$
* <nNumber> a number
* $RETURNS$
* <nSign> sign of <nNumber>
* $DESCRIPTION$
@@ -234,7 +234,7 @@ HB_FUNC( CEILING )
* ? sign (1.1) --> 1
* ? sign (-1.1) --> -1
* ? sign (0.0) --> 0
* $TESTS$
* $TESTS$
* sign (1.1) == 1
* sign (-1.1) == -1
* sign (0.0) == 0
@@ -276,7 +276,7 @@ HB_FUNC( SIGN )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_SIGN, NULL, "SIGN", 0,
CT_ERROR_SIGN, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -293,10 +293,10 @@ HB_FUNC( SIGN )
* $CATEGORY$
* CT3 math functions
* $ONELINER$
* Decadic logarithm of a number
* Decadic logarithm of a number
* $SYNTAX$
* LOG10 (nNumber) -> nLogarithm
* $ARGUMENTS$
* $ARGUMENTS$
* <nNumber> number to logarithm
* $RETURNS$
* <nLogarithm> decadic logarithm of <nNumber>
@@ -361,7 +361,7 @@ HB_FUNC( LOG10 )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_LOG10, NULL, "LOG10", 0,
CT_ERROR_LOG10, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -378,10 +378,10 @@ HB_FUNC( LOG10 )
* $CATEGORY$
* CT3 math functions
* $ONELINER$
* Calculates faculty
* Calculates faculty
* $SYNTAX$
* FACT (nNumber) -> nFaculty
* $ARGUMENTS$
* $ARGUMENTS$
* <nNumber> number between 0 and 21
* $RETURNS$
* <nFaculty> the faculty of <nNumber>
@@ -435,7 +435,7 @@ HB_FUNC( FACT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_FACT, NULL, "FACT", 0,
CT_ERROR_FACT, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
* internal and switch functions for CT3 string functions
*
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
@@ -281,7 +281,7 @@ char *ct_at_charset_backward( char *pcString, size_t sStrLen,
}
/*
/*
* CSETREF() stuff
*/
@@ -376,7 +376,7 @@ HB_FUNC( CSETREF )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CSETREF,
NULL, "CSETREF", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
}
}
@@ -419,7 +419,7 @@ int ct_getatmupa( void )
* current state of the switch
* $DESCRIPTION$
* CSETATMUPA determines how the following CT3 string functions
*
*
* ATNUM() AFTERATNUM() BEFORATNUM()
* ATREPL() NUMAT() ATADJUST()
* WORDTOCHAR() WORDREPL()
@@ -460,7 +460,7 @@ HB_FUNC( CSETATMUPA )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CSETATMUPA, NULL,
"CSETATMUPA", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
}
}
@@ -538,11 +538,11 @@ char ct_getatlikechar( void )
*
* <nMode> can be one of the following values that are defined
* in ct.ch
*
*
* Definition | Value
* ----------------------|------
* CT_SETATLIKE_EXACT | 0
* CT_SETATLIKE_WILDCARD | 1
* CT_SETATLIKE_EXACT | 0
* CT_SETATLIKE_WILDCARD | 1
*
* $EXAMPLES$
* $TESTS$
@@ -582,7 +582,7 @@ HB_FUNC( SETATLIKE )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_SETATLIKE,
NULL, "SETATLIKE", 0, EF_CANDEFAULT,
NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT,
HB_ERR_ARGS_BASEPARAMS );
}
}
@@ -614,7 +614,7 @@ HB_FUNC( SETATLIKE )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_SETATLIKE, NULL,
"SETATLIKE", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
}
}

View File

@@ -15,7 +15,7 @@
*
* Copyright 2001 Alejandro de Garate <alex_degarate@hotmail.com>
*
* Documentation and changes concerning error handling Copyright 2001
* Documentation and changes concerning error handling Copyright 2001
* IntTec GmbH, Freiburg, Germany, Author: Martin Vogel <vogel@inttec.de>
*
* www - http://www.harbour-project.org
@@ -99,7 +99,7 @@
* $EXAMPLES$
* // Payment of 1000 per year for 10 years at a interest rate
* // of 5 per cent per year
*
*
* ? fv (1000, 0.05, 10) --> 12577.893
* $TESTS$
* fv (1000, 0.00, 10) == 10000.0
@@ -155,7 +155,7 @@ HB_FUNC( FV )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_FV, NULL, "FV", 0,
CT_ERROR_FV, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -200,7 +200,7 @@ HB_FUNC( FV )
* // at a interest rate of 0.5% per month (6% per year), so instead
* // of 6000 Dollars (the amount you will pay back) the bank will pay
* // you
*
*
* ? pv (100, 0.005, 60) --> 5172.56
* $TESTS$
* pv (100, 0.0, 60) == 6000.0
@@ -256,7 +256,7 @@ HB_FUNC( PV )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_PV, NULL, "PV", 0,
CT_ERROR_PV, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -299,7 +299,7 @@ HB_FUNC( PV )
* // You get a loan of 5172.56 at a interest rate of 0.5% per
* // month (6% per year).
* // For 5 years, you have to pay back every month
*
*
* ? payment (5172.56, 0.005, 60) --> 100.00
* $TESTS$
* payment (5172.56, 0.0, 60) == 86.21
@@ -355,7 +355,7 @@ HB_FUNC( PAYMENT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_PAYMENT, NULL, "PAYMENT", 0,
CT_ERROR_PAYMENT, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -401,7 +401,7 @@ HB_FUNC( PAYMENT )
* // You get a loan of 5172.56 at a interest rate of 0.5% per
* // month (6% per year).
* // You can afford to pay 100 back every month, so you need
*
*
* ? periods (5172.56, 100, 0.005) --> 60.0
*
* // months to cancel the loan.
@@ -476,7 +476,7 @@ HB_FUNC( PERIODS )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_PERIODS, NULL, "PERIODS", 0,
CT_ERROR_PERIODS, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -509,14 +509,14 @@ HB_FUNC( PERIODS )
* the same equation used in the PAYMENT() or PERIODS() function:
*
* <nPayment> = <nLoan>*(<nInterest>/100)/(1-(1+<nInterest>/100)^(-<nPeriods>))
*
*
* However, this equation can not be solved for <nInterest> in a "closed"
* manner, i.e. <nInterest> = ..., so that the result can only be estimated.
* $EXAMPLES$
* // You get a loan of 5172.56, pay 100 back every month for
* // 5 years (60 months). The effective interest rate per
* // period (=month) is
*
*
* ? rate (5172.56, 100, 60) --> 0.005
*
* $TESTS$
@@ -592,7 +592,7 @@ HB_FUNC( RATE )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_RATE, NULL, "RATE", 0,
CT_ERROR_RATE, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
*
* CT3 Numeric functions - PART 1
* - CELSIUS
@@ -13,8 +13,8 @@
* NOTE: All these functions were builded using Borland C++ 5.5 (free version)
*
* Copyright 2001 Alejandro de Garate <alex_degarate@hotmail.com>
*
* Documentation and changes concerning error handling Copyright 2001
*
* Documentation and changes concerning error handling Copyright 2001
* IntTec GmbH, Freiburg, Germany, Author: Martin Vogel <vogel@inttec.de>
*
* www - http://www.harbour-project.org
@@ -58,7 +58,7 @@
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*
*/
@@ -120,7 +120,7 @@ HB_FUNC( CELSIUS )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_CELSIUS, NULL, "CELSIUS", 0,
CT_ERROR_CELSIUS, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -187,7 +187,7 @@ HB_FUNC( FAHRENHEIT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_FAHRENHEIT, NULL, "FAHRENHEIT", 0,
CT_ERROR_FAHRENHEIT, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -218,7 +218,7 @@ HB_FUNC( FAHRENHEIT )
* $RETURNS$
* <nLargestNumber> the largest floating point number available in the system
* $DESCRIPTION$
* INFINITY() returns the largest floating point number available
* INFINITY() returns the largest floating point number available
* in the system. For platform independance, this is set to DBL_MAX.
* $EXAMPLES$
* $TESTS$

View File

@@ -111,7 +111,7 @@ HB_FUNC( NUMAT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_NUMAT, NULL,
"NUMAT", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retni( 0 );
return;
@@ -163,7 +163,7 @@ HB_FUNC( NUMAT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_NUMAT, NULL, "NUMAT", 0,
CT_ERROR_NUMAT, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -137,7 +137,7 @@ HB_FUNC( POSCHAR )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_POSCHAR, NULL, "POSCHAR", 0,
CT_ERROR_POSCHAR, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -157,7 +157,7 @@ HB_FUNC( POSCHAR )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_POSCHAR, NULL, "POSCHAR", 0,
CT_ERROR_POSCHAR, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -253,7 +253,7 @@ HB_FUNC( POSDEL )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_POSDEL, NULL, "POSDEL", 0,
CT_ERROR_POSDEL, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -326,7 +326,7 @@ HB_FUNC( POSINS )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSINS,
NULL, "POSINS", 0, EF_CANDEFAULT,
NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT,
HB_ERR_ARGS_BASEPARAMS );
}
hb_retclen( pcString, sStrLen );
@@ -362,7 +362,7 @@ HB_FUNC( POSINS )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_POSINS, NULL, "POSINS", 0,
CT_ERROR_POSINS, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -451,7 +451,7 @@ HB_FUNC( POSREPL )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSREPL,
NULL, "POSREPL", 0, EF_CANDEFAULT,
NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT,
HB_ERR_ARGS_BASEPARAMS );
}
@@ -503,7 +503,7 @@ HB_FUNC( POSREPL )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_POSREPL, NULL, "POSREPL", 0,
CT_ERROR_POSREPL, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -523,7 +523,7 @@ HB_FUNC( POSREPL )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_POSREPL, NULL, "POSREPL", 0,
CT_ERROR_POSREPL, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -107,7 +107,7 @@ HB_FUNC( POSDIFF )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSDIFF, NULL,
"POSDIFF", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retni( 0 );
return;
@@ -140,7 +140,7 @@ HB_FUNC( POSDIFF )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_POSDIFF, NULL, "POSDIFF", 0,
CT_ERROR_POSDIFF, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -210,7 +210,7 @@ HB_FUNC( POSEQUAL )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSEQUAL, NULL,
"POSEQUAL", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retni( 0 );
return;
@@ -223,7 +223,7 @@ HB_FUNC( POSEQUAL )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSEQUAL, NULL,
"POSEQUAL", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retni( 0 );
return;
@@ -266,7 +266,7 @@ HB_FUNC( POSEQUAL )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_POSEQUAL, NULL, "POSEQUAL", 0,
CT_ERROR_POSEQUAL, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -75,9 +75,9 @@
* // and from chr(0) to "0"
* ? rangerem ("0","9","yearcurr.dbf") // "yearcurr.dbf", test leaving string untouched
* $TESTS$
* rangerem ("0","9","year2002.dbf") == "year.dbf"
* rangerem ("9","0","year2002.dbf") == "22"
* rangerem ("0","9","yearcurr.dbf") == "yearcurr.dbf"
* rangerem ("0","9","year2002.dbf") == "year.dbf"
* rangerem ("9","0","year2002.dbf") == "22"
* rangerem ("0","9","yearcurr.dbf") == "yearcurr.dbf"
* $STATUS$
* Started
* $COMPLIANCE$
@@ -145,7 +145,7 @@ HB_FUNC( RANGEREM )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_RANGEREM, NULL, "RANGEREM", 0,
CT_ERROR_RANGEREM, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -179,9 +179,9 @@ HB_FUNC( RANGEREM )
* // and from chr(0) to "0"
* ? rangerepl ("0","9","yearcurr.dbf","?") // "yearcurr.dbf", test leaving string untouched
* $TESTS$
* rangerepl ("0","9","year2002.dbf","?") == "year????.dbf"
* rangerepl ("9","0","year2002.dbf","?") == "????2??2????"
* rangerepl ("0","9","yearcurr.dbf","?") == "yearcurr.dbf"
* rangerepl ("0","9","year2002.dbf","?") == "year????.dbf"
* rangerepl ("9","0","year2002.dbf","?") == "????2??2????"
* rangerepl ("0","9","yearcurr.dbf","?") == "yearcurr.dbf"
* $STATUS$
* Started
* $COMPLIANCE$
@@ -273,7 +273,7 @@ HB_FUNC( RANGEREPL )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_RANGEREPL, NULL, "RANGEREPL", 0,
CT_ERROR_RANGEREPL, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -153,7 +153,7 @@ HB_FUNC( CHARRELA )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_CHARRELA, NULL, "CHARRELA", 0,
CT_ERROR_CHARRELA, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
@@ -171,7 +171,7 @@ HB_FUNC( CHARRELA )
* $CATEGORY$
* CT3 string functions
* $ONELINER$
* Relation dependant character replacement
* Relation dependant character replacement
* $SYNTAX$
* CHARRELREP (<cStringToMatch1>, <cString1>,
* <cStringToMatch2>, <[@]cString2>,
@@ -313,7 +313,7 @@ HB_FUNC( CHARRELREP )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_CHARRELREP, NULL, "CHARRELREP", 0,
CT_ERROR_CHARRELREP, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -65,7 +65,7 @@
* $ONELINER$
* Evaluate the "Edit (Levensthein) Distance" of two strings
* $SYNTAX$
* STRDIFF (<cString1>, <cString2>, [<nReplacementPenalty>], [<nDeletionPenalty>],
* STRDIFF (<cString1>, <cString2>, [<nReplacementPenalty>], [<nDeletionPenalty>],
* [<nInsertionPenalty>]) -> <nDistance>
* $ARGUMENTS$
* <cString1> string at the "starting point" of the transformation process, default is ""
@@ -76,28 +76,28 @@
* $RETURNS$
* <nDistance> penalty point sum of all operations needed to transform <cString1> to <cString2>
* $DESCRIPTION$
* The STRDIFF() functions calculates the so called "Edit" or "Levensthein" distance of two strings.
* The STRDIFF() functions calculates the so called "Edit" or "Levensthein" distance of two strings.
* This distance is a measure for the number of single character replace/insert/delete operations (so called
* "point mutations") required to transform <cString1> into <cString2> and its value will be the smallest sum of
* the penalty points of the required operations.
*
* Be aware that this function is both quite time - O(len(cString1)*len(cString2)) - and memory consuming -
* O((len(cString1)+1)*(len(cString2)+1)*sizeof(int)) - so keep the strings as short as possible.
* E.g., on common 32 bit systems (sizeof(int) == 4), calling strdiff() with two strings of 1024 bytes
* Be aware that this function is both quite time - O(len(cString1)*len(cString2)) - and memory consuming -
* O((len(cString1)+1)*(len(cString2)+1)*sizeof(int)) - so keep the strings as short as possible.
* E.g., on common 32 bit systems (sizeof(int) == 4), calling strdiff() with two strings of 1024 bytes
* in length will consume 4 MB of memory. To not impose unneeded restrictions, the function will only check if
* (len(cString1)+1)*(len(cString2)+1)*sizeof(int) <= UINT_MAX, although allocing UINT_MAX bytes will not
* work on most systems. If this simple check fails, -1 is returned.
*
* Also, be aware that there can be an overflow when the penalty points are summed up: Assuming that the
* number of transformation operations is in the order of max(len(cString1),len(cString2)), the penalty point
* sum, that is internally stored in an "int" variable, is in the order of
* (max(len(cString1),len(cString2))*max(nReplacementPenalty,nDeletionPenalty,nInsertionPentaly).
* The STRDIFF() does not do an overflow check due to time performance reasons. Future versions of STRDIFF()
* number of transformation operations is in the order of max(len(cString1),len(cString2)), the penalty point
* sum, that is internally stored in an "int" variable, is in the order of
* (max(len(cString1),len(cString2))*max(nReplacementPenalty,nDeletionPenalty,nInsertionPentaly).
* The STRDIFF() does not do an overflow check due to time performance reasons. Future versions of STRDIFF()
* could use a type different to "int" to store the penalty point sum to save memory or to avoid overflows.
*
* The function is aware of the settings done by SETATLIKE(), that means that the wildchar character
* is considered equal to ALL characters.
*
*
* $EXAMPLES$
* ? strdiff("ABC", "ADC") // 3, one character replaced
* ? strdiff("ABC", "AEC") // 3, dito
@@ -106,11 +106,11 @@
* ? strdiff("AXBC", "ABC") // 6, one character removed
* ? strdiff("AXBC", "ADC") // 9, one character removed and one replaced
* $TESTS$
* strdiff("ABC", "ADC") == 3
* strdiff("ABC", "AEC") == 3
* strdiff("CBA", "ABC") == 6
* strdiff("ABC", "AXBC") == 1
* strdiff("AXBC", "ABC") == 6
* strdiff("ABC", "ADC") == 3
* strdiff("ABC", "AEC") == 3
* strdiff("CBA", "ABC") == 6
* strdiff("ABC", "AXBC") == 1
* strdiff("AXBC", "ABC") == 6
* strdiff("AXBC", "ADC") == 9
* $STATUS$
* Ready
@@ -182,7 +182,7 @@ HB_FUNC( STRDIFF )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_STRDIFF, NULL,
"STRDIFF", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retni( -1 );
return;
@@ -246,7 +246,7 @@ HB_FUNC( STRDIFF )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_STRDIFF, NULL, "STRDIFF", 0,
CT_ERROR_STRDIFF, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -154,7 +154,7 @@ HB_FUNC( STRSWAP )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_STRSWAP, NULL, "STRSWAP", 0,
CT_ERROR_STRSWAP, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -84,13 +84,13 @@
* TODO: add documentation
* $EXAMPLES$
* $TESTS$
* tabexpand("-"+chr(9)+"!") == "- !"
* tabexpand("----"+chr(9) +"!") == "---- !"
* tabexpand("-"+chr(9)+"!",, "+") == "-+++++++!"
* tabexpand("-"+chr(9)+ "!", 4) == "- !"
* tabexpand("----"+chr(9)+ "!", 8) == "---- !"
* tabexpand("----"+chr(9)+ "!", 8, "+") == "----++++!"
* tabexpand("-"+chr(9)+"!"+hb_osnewline()+"----"+chr(9)+ "!",, "+") == "-+++++++!"+hb_osnewline()+"----++++!"
* tabexpand("-"+chr(9)+"!") == "- !"
* tabexpand("----"+chr(9) +"!") == "---- !"
* tabexpand("-"+chr(9)+"!",, "+") == "-+++++++!"
* tabexpand("-"+chr(9)+ "!", 4) == "- !"
* tabexpand("----"+chr(9)+ "!", 8) == "---- !"
* tabexpand("----"+chr(9)+ "!", 8, "+") == "----++++!"
* tabexpand("-"+chr(9)+"!"+hb_osnewline()+"----"+chr(9)+ "!",, "+") == "-+++++++!"+hb_osnewline()+"----++++!"
* $STATUS$
* Started
* $COMPLIANCE$
@@ -253,7 +253,7 @@ HB_FUNC( TABEXPAND )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_TABEXPAND, NULL, "TABEXPAND", 0,
CT_ERROR_TABEXPAND, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -272,7 +272,7 @@ HB_FUNC( TABEXPAND )
* $ONELINER$
* Pack fill characters to appropriate tab characters
* $SYNTAX$
* TABPACK (<cString>, [<nTabWidth>], [<cFillChar|nFillChar>],
* TABPACK (<cString>, [<nTabWidth>], [<cFillChar|nFillChar>],
* [<cNewLineCharacters>], [<cTabChar|nTabChar>],
* [<lIgnore141>]) -> cPackedString
* $ARGUMENTS$
@@ -488,7 +488,7 @@ HB_FUNC( TABPACK )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_TABPACK, NULL, "TABPACK", 0,
CT_ERROR_TABPACK, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )

View File

@@ -3,13 +3,13 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
* CT3 string functions
* - TOKEN()
* - NUMTOKEN()
* - ATTOKEN()
* - TOKENLOWER()
* - TOKENUPPER()
* - TOKENUPPER()
* - TOKENSEP()
*
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
@@ -198,7 +198,7 @@ static void do_token1( int iSwitch )
if( sSubStrLen == 0 )
{
/* string ends with tokenizer (null string after tokenizer at
/* string ends with tokenizer (null string after tokenizer at
end of string is not a token) */
switch ( iSwitch )
{
@@ -258,7 +258,7 @@ static void do_token1( int iSwitch )
break;
case DO_TOKEN1_TOKENUPPER:
if( pcSubStr != pc ) /* letters can be tokenizers, too,
if( pcSubStr != pc ) /* letters can be tokenizers, too,
but they should not be uppercase'd */
*( pcRet + ( pcSubStr - pcString ) ) = ( char ) hb_charUpper( ( UCHAR ) *pcSubStr );
break;
@@ -377,7 +377,7 @@ static void do_token1( int iSwitch )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_TOKEN, NULL, "TOKEN", 0,
CT_ERROR_TOKEN, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE,
HB_ERR_ARGS_BASEPARAMS );
}
@@ -473,7 +473,7 @@ static void do_token1( int iSwitch )
* parameter to a value different than 0, you can specify how many tokenizing
* characters are combined at most to one token stop. Be aware that
* this can result to empty tokens there the start position is not
* defined clearly. Then, ATTOKEN() returns the position there the
* defined clearly. Then, ATTOKEN() returns the position there the
* token WOULD start if its length is larger than 0. To check for
* empty tokens, simply look if the character at the returned position
* is within the tokenizer list.
@@ -550,15 +550,15 @@ HB_FUNC( ATTOKEN )
* Therefore, additional calls to the TOKENSEP() function are not
* necessary.
* $EXAMPLES$
* ? token ("Hello, World!") --> "World"
* ? token ("Hello, World!",,2,1) --> ""
* ? token ("Hello, World!") --> "World"
* ? token ("Hello, World!",,2,1) --> ""
* ? token ("Hello, World!",",",2,1) --> " World!"
* ? token ("Hello, World!"," ",2,1) --> "World!"
* ? token ("Hello, World!"," ",2,1) --> "World!"
* $TESTS$
* token ("Hello, World!") == "World"
* token ("Hello, World!",,2,1) == ""
* token ("Hello, World!") == "World"
* token ("Hello, World!",,2,1) == ""
* token ("Hello, World!",",",2,1) == " World!"
* token ("Hello, World!"," ",2,1) == "World!"
* token ("Hello, World!"," ",2,1) == "World!"
* $STATUS$
* Ready
* $COMPLIANCE$
@@ -594,9 +594,9 @@ HB_FUNC( TOKEN )
* $DESCRIPTION$
* $EXAMPLES$
* $TESTS$
* numtoken ("Hello, World!") == 2
* numtoken ("Hello, World!") == 2
* numtoken ("This is good. See you! How do you do?",".!?") == 3
* numtoken ("one,,three,four,,six",",",1) == 6
* numtoken ("one,,three,four,,six",",",1) == 6
* $STATUS$
* Ready
* $COMPLIANCE$
@@ -653,13 +653,13 @@ HB_FUNC( NUMTOKEN )
* the result.
* $EXAMPLES$
* ? tokenlower("Hello, World, here I am!") // "hello, world, here i am!"
* ? tokenlower("Hello, World, here I am!",,3) // "hello, world, here I am!"
* ? tokenlower("Hello, World, here I am!",",",3) // "hello, World, here I am!"
* ? tokenlower("Hello, World, here I am!",,3) // "hello, world, here I am!"
* ? tokenlower("Hello, World, here I am!",",",3) // "hello, World, here I am!"
* ? tokenlower("Hello, World, here I am!"," W") // "hello, World, here i am!"
* $TESTS$
* tokenlower("Hello, World, here I am!") == "hello, world, here i am!"
* tokenlower("Hello, World, here I am!",,3) == "hello, world, here I am!"
* tokenlower("Hello, World, here I am!",",",3) == "hello, World, here I am!"
* tokenlower("Hello, World, here I am!",,3) == "hello, world, here I am!"
* tokenlower("Hello, World, here I am!",",",3) == "hello, World, here I am!"
* tokenlower("Hello, World, here I am!"," W") == "hello, World, here i am!"
* $STATUS$
* Ready

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
* CT3 string functions
* - TOKENINIT()
* - TOKENEXIT()
@@ -322,7 +322,7 @@ static void sTokSet( TOKEN_ENVIRONMENT env )
* to be tokenized since the tokenization has to take place only once
* whereas the TOKEN() function must always start the tokenizing process
* from scratch.
*
*
* Unlike CTIII, this function provides two mechanisms of storing the
* resulting token environment. If a variable is passed by reference
* as 4th parameter, the token environment is stored in this variable,
@@ -407,7 +407,7 @@ HB_FUNC( TOKENINIT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_MEM, CT_ERROR_TOKENINIT,
NULL, "TOKENINIT", 0, EF_CANDEFAULT,
NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT,
HB_ERR_ARGS_BASEPARAMS );
}
hb_retl( 0 );
@@ -452,7 +452,7 @@ HB_FUNC( TOKENINIT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_MEM, CT_ERROR_TOKENINIT,
NULL, "TOKENINIT", 0, EF_CANDEFAULT,
NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT,
HB_ERR_ARGS_BASEPARAMS );
}
sTokEnvDel( sTokenEnvironment );
@@ -503,7 +503,7 @@ HB_FUNC( TOKENINIT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_TOKENINIT, NULL, "TOKENINIT", 0,
CT_ERROR_TOKENINIT, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -595,7 +595,7 @@ HB_FUNC( TOKENNEXT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT,
NULL, "TOKENNEXT", 0, EF_CANDEFAULT,
NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT,
HB_ERR_ARGS_BASEPARAMS );
}
hb_retc( NULL );
@@ -614,7 +614,7 @@ HB_FUNC( TOKENNEXT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT,
NULL, "TOKENNEXT", 0, EF_CANDEFAULT,
NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT,
HB_ERR_ARGS_BASEPARAMS );
}
hb_retc( NULL );
@@ -643,7 +643,7 @@ HB_FUNC( TOKENNEXT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT, NULL,
"TOKENNEXT", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
if( ISCHAR( 3 ) && ISBYREF( 3 ) )
{
@@ -677,7 +677,7 @@ HB_FUNC( TOKENNEXT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_TOKENNEXT, NULL, "TOKENNEXT", 0,
CT_ERROR_TOKENNEXT, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -709,7 +709,7 @@ HB_FUNC( TOKENNEXT )
* otherwise the global TE is used.
* $EXAMPLES$
* tokeninit ("a.b.c.d", ".", 1) // initialize global TE
* ? tokennum() // --> 4
* ? tokennum() // --> 4
* $TESTS$
* $STATUS$
* Ready
@@ -743,7 +743,7 @@ HB_FUNC( TOKENNUM )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_TOKENNUM, NULL, "TOKENNUM", 0,
CT_ERROR_TOKENNUM, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -816,7 +816,7 @@ HB_FUNC( TOKENEND )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_TOKENEND, NULL, "TOKENEND", 0,
CT_ERROR_TOKENEND, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -956,7 +956,7 @@ HB_FUNC( TOKENAT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENAT,
NULL, "TOKENAT", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retni( 0 );
return;
@@ -975,7 +975,7 @@ HB_FUNC( TOKENAT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENAT, NULL,
"TOKENAT", 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS );
}
hb_retni( 0 );
return;
@@ -1085,7 +1085,7 @@ HB_FUNC( RESTTOKEN )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
ct_error( ( USHORT ) iArgErrorMode, EG_MEM, CT_ERROR_RESTTOKEN,
NULL, "RESTTOKEN", 0, EF_CANDEFAULT,
NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT,
HB_ERR_ARGS_BASEPARAMS );
}
hb_retc( NULL );
@@ -1114,7 +1114,7 @@ HB_FUNC( RESTTOKEN )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_RESTTOKEN, NULL, "RESTTOKEN", 0,
CT_ERROR_RESTTOKEN, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )

View File

@@ -3,8 +3,8 @@
*/
/*
* Harbour Project source code:
* CT3 trigonometric functions
* Harbour Project source code:
* CT3 trigonometric functions
* - PI
* - SIN
* - COS
@@ -24,7 +24,7 @@
*
* Copyright 2001 Alejandro de Garate <alex_degarate@hotmail.com>
*
* Documentation and changes concerning error handling Copyright 2001
* Documentation and changes concerning error handling Copyright 2001
* IntTec GmbH, Freiburg, Germany, Author: Martin Vogel <vogel@inttec.de>
*
* www - http://www.harbour-project.org
@@ -181,7 +181,7 @@ HB_FUNC( SIN )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_SIN, NULL, "SIN", 0,
CT_ERROR_SIN, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -259,7 +259,7 @@ HB_FUNC( COS )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_COS, NULL, "COS", 0,
CT_ERROR_COS, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -337,7 +337,7 @@ HB_FUNC( TAN )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_TAN, NULL, "TAN", 0,
CT_ERROR_TAN, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -410,7 +410,7 @@ HB_FUNC( COT )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_COT, NULL, "COT", 0,
CT_ERROR_COT, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -440,7 +440,7 @@ HB_FUNC( COT )
* The return value is given in radiants (full angle equals 2*Pi -
* see DTOR() if you need to convert it into degress).
* Note, that <nSine> must be between -1 and 1 and that <nRadiant>
* is always between -PI()/2 and PI()/2.
* is always between -PI()/2 and PI()/2.
* $EXAMPLES$
* ? asin (0.0) --> 0.0
* ? asin (0.5) --> 0.5235...
@@ -489,7 +489,7 @@ HB_FUNC( ASIN )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_ASIN, NULL, "ASIN", 0,
CT_ERROR_ASIN, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -519,7 +519,7 @@ HB_FUNC( ASIN )
* The return value is given in radiants (full angle equals 2*Pi -
* see DTOR() if you need to convert it into degress).
* Note, that <nCosine> must be between -1 and 1 and that <nRadiant>
* is always between 0 and PI().
* is always between 0 and PI().
* $EXAMPLES$
* ? acos (0.0) --> PI()/2
* ? acos (0.5) --> 1.04719...
@@ -569,7 +569,7 @@ HB_FUNC( ACOS )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_ACOS, NULL, "ACOS", 0,
CT_ERROR_ACOS, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -634,7 +634,7 @@ HB_FUNC( ATAN )
else
{
/* atan normally don't error, but it's save to return PI()/2
or -PI()/2, respectively, as these
or -PI()/2, respectively, as these
are the boundary result values */
if( dArg < 0.0 )
hb_retnd( -CT_PI / 2.0 );
@@ -653,7 +653,7 @@ HB_FUNC( ATAN )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_ATAN, NULL, "ATAN", 0,
CT_ERROR_ATAN, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -750,7 +750,7 @@ HB_FUNC( ATN2 )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_ATN2, NULL, "ATN2", 0,
CT_ERROR_ATN2, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -834,7 +834,7 @@ HB_FUNC( SINH )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_SINH, NULL, "SINH", 0,
CT_ERROR_SINH, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -913,7 +913,7 @@ HB_FUNC( COSH )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_COSH, NULL, "COSH", 0,
CT_ERROR_COSH, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -993,7 +993,7 @@ HB_FUNC( TANH )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_TANH, NULL, "TANH", 0,
CT_ERROR_TANH, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -1057,7 +1057,7 @@ HB_FUNC( RTOD )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_RTOD, NULL, "RTOD", 0,
CT_ERROR_RTOD, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )
@@ -1120,7 +1120,7 @@ HB_FUNC( DTOR )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_DTOR, NULL, "DTOR", 0,
CT_ERROR_DTOR, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}
if( pSubst != NULL )

View File

@@ -3,7 +3,7 @@
*/
/*
* Harbour Project source code:
* Harbour Project source code:
* CT3 string function WORDREPL()
*
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
@@ -96,16 +96,16 @@
* to .T., but one must then pass <cString> by reference to get a result.
* $EXAMPLES$
* ? wordrepl("CC", "AABBCCDDEE", "XX") // "AABBXXDDEE"
* ? wordrepl("aa", "1aaaa", "ba") // "1abaa"
* ? wordrepl("aa", "1aaaa", "ba", .T.) // "1baba"
* ? wordrepl("aa", "1aaaa", "ba") // "1abaa"
* ? wordrepl("aa", "1aaaa", "ba", .T.) // "1baba"
* csetatmupa(.T.)
* ? wordrepl("aa", "1aaaa", "ba") // "1abaa"
* ? wordrepl("aa", "1aaaa", "ba", .T.) // "1bbba"
* ? wordrepl("aa", "1aaaa", "ba") // "1abaa"
* ? wordrepl("aa", "1aaaa", "ba", .T.) // "1bbba"
* $TESTS$
* wordrepl("CC", "AABBCCDDEE", "XX") == "AABBXXDDEE"
* wordrepl("aa", "1aaaa", "ba") == "1abaa"
* wordrepl("aa", "1aaaa", "ba", .T.) == "1baba"
* eval ({||csetatmupa(.T.),wordrepl("aa", "1aaaa", "ba")}) == "1abaa"
* wordrepl("aa", "1aaaa", "ba") == "1abaa"
* wordrepl("aa", "1aaaa", "ba", .T.) == "1baba"
* eval ({||csetatmupa(.T.),wordrepl("aa", "1aaaa", "ba")}) == "1abaa"
* eval ({||csetatmupa(.T.),wordrepl("aa", "1aaaa", "ba", .T.)}) == "1bbba"
* $STATUS$
* Ready
@@ -223,7 +223,7 @@ HB_FUNC( WORDREPL )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_WORDREPL, NULL, "WORDREPL", 0,
CT_ERROR_WORDREPL, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -159,7 +159,7 @@ HB_FUNC( WORDTOCHAR )
if( iArgErrorMode != CT_ARGERR_IGNORE )
{
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
CT_ERROR_WORDTOCHAR, NULL, "WORDTOCHAR", 0,
CT_ERROR_WORDTOCHAR, NULL, HB_ERR_FUNCNAME, 0,
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
}