From d81d19db7545cb7e6ed3426c01de2474577d02ae Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 3 Feb 2009 01:09:52 +0000 Subject: [PATCH] 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. --- harbour/ChangeLog | 38 +++++++++++++++++++++++++++++++ harbour/contrib/hbct/addascii.c | 12 +++++----- harbour/contrib/hbct/asciisum.c | 10 ++++----- harbour/contrib/hbct/atadjust.c | 8 +++---- harbour/contrib/hbct/atnum.c | 10 ++++----- harbour/contrib/hbct/atrepl.c | 8 +++---- harbour/contrib/hbct/charmirr.c | 10 ++++----- harbour/contrib/hbct/charmix.c | 8 +++---- harbour/contrib/hbct/charop.c | 12 +++++----- harbour/contrib/hbct/charrepl.c | 26 ++++++++++----------- harbour/contrib/hbct/charsort.c | 6 ++--- harbour/contrib/hbct/charswap.c | 6 ++--- harbour/contrib/hbct/ctc.c | 8 +++---- harbour/contrib/hbct/ctmath.c | 4 ++-- harbour/contrib/hbct/ctmath2.c | 40 ++++++++++++++++----------------- harbour/contrib/hbct/ctstr.c | 20 ++++++++--------- harbour/contrib/hbct/finan.c | 24 ++++++++++---------- harbour/contrib/hbct/num1.c | 14 ++++++------ harbour/contrib/hbct/numat.c | 4 ++-- harbour/contrib/hbct/pos2.c | 16 ++++++------- harbour/contrib/hbct/posdiff.c | 10 ++++----- harbour/contrib/hbct/range.c | 16 ++++++------- harbour/contrib/hbct/relation.c | 6 ++--- harbour/contrib/hbct/strdiff.c | 34 ++++++++++++++-------------- harbour/contrib/hbct/strswap.c | 2 +- harbour/contrib/hbct/tab.c | 20 ++++++++--------- harbour/contrib/hbct/token1.c | 36 ++++++++++++++--------------- harbour/contrib/hbct/token2.c | 32 +++++++++++++------------- harbour/contrib/hbct/trig.c | 38 +++++++++++++++---------------- harbour/contrib/hbct/wordrepl.c | 18 +++++++-------- harbour/contrib/hbct/wordtoch.c | 2 +- 31 files changed, 268 insertions(+), 230 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 76d0098984..92aa4c2da1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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() diff --git a/harbour/contrib/hbct/addascii.c b/harbour/contrib/hbct/addascii.c index 659a9d80fb..73641f91b0 100644 --- a/harbour/contrib/hbct/addascii.c +++ b/harbour/contrib/hbct/addascii.c @@ -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 ) diff --git a/harbour/contrib/hbct/asciisum.c b/harbour/contrib/hbct/asciisum.c index 38da84dfdd..745e01dacf 100644 --- a/harbour/contrib/hbct/asciisum.c +++ b/harbour/contrib/hbct/asciisum.c @@ -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 ); } diff --git a/harbour/contrib/hbct/atadjust.c b/harbour/contrib/hbct/atadjust.c index 7cf0291b59..df46b48158 100644 --- a/harbour/contrib/hbct/atadjust.c +++ b/harbour/contrib/hbct/atadjust.c @@ -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 ); } diff --git a/harbour/contrib/hbct/atnum.c b/harbour/contrib/hbct/atnum.c index 8363c08f6c..99cd465f74 100644 --- a/harbour/contrib/hbct/atnum.c +++ b/harbour/contrib/hbct/atnum.c @@ -8,7 +8,7 @@ * * - AFTERATNUM() * - BEFORATNUM() - * - ATNUM() + * - ATNUM() * * Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany * Author: Martin Vogel @@ -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 ); } diff --git a/harbour/contrib/hbct/atrepl.c b/harbour/contrib/hbct/atrepl.c index 9b4a10d307..b50968e995 100644 --- a/harbour/contrib/hbct/atrepl.c +++ b/harbour/contrib/hbct/atrepl.c @@ -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$ * is the substring searched for in * is the processed string - * is the replacement for sequences found + * is the replacement for sequences found * [] specifies the number of replacements * Default: last occurence * [] if set to .T., only the 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 ); } diff --git a/harbour/contrib/hbct/charmirr.c b/harbour/contrib/hbct/charmirr.c index 69a7a1da91..a712921f94 100644 --- a/harbour/contrib/hbct/charmirr.c +++ b/harbour/contrib/hbct/charmirr.c @@ -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 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 ); } diff --git a/harbour/contrib/hbct/charmix.c b/harbour/contrib/hbct/charmix.c index 4b64641762..6e08656558 100644 --- a/harbour/contrib/hbct/charmix.c +++ b/harbour/contrib/hbct/charmix.c @@ -7,7 +7,7 @@ * CHARMIX() CT3 function * * Initial code: Copyright 1999-2001 Viktor Szakats - * + * * CT3 conformity: Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany * Author: Martin Vogel * @@ -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 ); } diff --git a/harbour/contrib/hbct/charop.c b/harbour/contrib/hbct/charop.c index f1dd53f288..836019432d 100644 --- a/harbour/contrib/hbct/charop.c +++ b/harbour/contrib/hbct/charop.c @@ -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 ); } diff --git a/harbour/contrib/hbct/charrepl.c b/harbour/contrib/hbct/charrepl.c index 0b1d36bd4f..29ef857b66 100644 --- a/harbour/contrib/hbct/charrepl.c +++ b/harbour/contrib/hbct/charrepl.c @@ -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 . Be aware that if the same characters occur * in both and , the character on a - * certain position in can be replaced multiple times. + * certain position in can be replaced multiple times. * if is set to .T., the function takes the characters in * one after the other, searches for them in 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 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 ); } diff --git a/harbour/contrib/hbct/charsort.c b/harbour/contrib/hbct/charsort.c index db4707215c..3d27c0f43c 100644 --- a/harbour/contrib/hbct/charsort.c +++ b/harbour/contrib/hbct/charsort.c @@ -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 ); } diff --git a/harbour/contrib/hbct/charswap.c b/harbour/contrib/hbct/charswap.c index d7e7f75df9..22842efd40 100644 --- a/harbour/contrib/hbct/charswap.c +++ b/harbour/contrib/hbct/charswap.c @@ -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 ); } } diff --git a/harbour/contrib/hbct/ctc.c b/harbour/contrib/hbct/ctc.c index e966b2dc21..120c76233d 100644 --- a/harbour/contrib/hbct/ctc.c +++ b/harbour/contrib/hbct/ctc.c @@ -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 ); } } } diff --git a/harbour/contrib/hbct/ctmath.c b/harbour/contrib/hbct/ctmath.c index 5771618556..dfc29b61d0 100644 --- a/harbour/contrib/hbct/ctmath.c +++ b/harbour/contrib/hbct/ctmath.c @@ -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 ); } } diff --git a/harbour/contrib/hbct/ctmath2.c b/harbour/contrib/hbct/ctmath2.c index 0223783884..74ec73f998 100644 --- a/harbour/contrib/hbct/ctmath2.c +++ b/harbour/contrib/hbct/ctmath2.c @@ -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 - * - * Documentation and changes concerning error handling Copyright 2001 + * + * Documentation and changes concerning error handling Copyright 2001 * IntTec GmbH, Freiburg, Germany, Author: Martin Vogel * * 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$ * number to round down * $RETURNS$ * the rounded number * $DESCRIPTION$ * The function FLOOR() determines the biggest integer that is smaller - * than . + * than . * $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$ * number to round up * $RETURNS$ * the rounded number * $DESCRIPTION$ * The function CEILING() determines the smallest integer that is bigger - * than . + * than . * $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$ - * a number + * $ARGUMENTS$ + * a number * $RETURNS$ * sign of * $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$ * number to logarithm * $RETURNS$ * decadic logarithm of @@ -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$ * number between 0 and 21 * $RETURNS$ * the faculty of @@ -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 ) diff --git a/harbour/contrib/hbct/ctstr.c b/harbour/contrib/hbct/ctstr.c index 2a247b27da..0f86e37fe5 100644 --- a/harbour/contrib/hbct/ctstr.c +++ b/harbour/contrib/hbct/ctstr.c @@ -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 ) * * 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 ); } } } diff --git a/harbour/contrib/hbct/finan.c b/harbour/contrib/hbct/finan.c index 2cfb5643eb..766157574e 100644 --- a/harbour/contrib/hbct/finan.c +++ b/harbour/contrib/hbct/finan.c @@ -15,7 +15,7 @@ * * Copyright 2001 Alejandro de Garate * - * Documentation and changes concerning error handling Copyright 2001 + * Documentation and changes concerning error handling Copyright 2001 * IntTec GmbH, Freiburg, Germany, Author: Martin Vogel * * 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: * * = *(/100)/(1-(1+/100)^(-)) - * + * * However, this equation can not be solved for in a "closed" * manner, i.e. = ..., 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 ); } diff --git a/harbour/contrib/hbct/num1.c b/harbour/contrib/hbct/num1.c index eacd19f492..d48c192b38 100644 --- a/harbour/contrib/hbct/num1.c +++ b/harbour/contrib/hbct/num1.c @@ -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 - * - * Documentation and changes concerning error handling Copyright 2001 + * + * Documentation and changes concerning error handling Copyright 2001 * IntTec GmbH, Freiburg, Germany, Author: Martin Vogel * * 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$ * 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$ diff --git a/harbour/contrib/hbct/numat.c b/harbour/contrib/hbct/numat.c index f8ac9c4e39..78c35af64a 100644 --- a/harbour/contrib/hbct/numat.c +++ b/harbour/contrib/hbct/numat.c @@ -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 ); } diff --git a/harbour/contrib/hbct/pos2.c b/harbour/contrib/hbct/pos2.c index 060cd53438..7742a79d6f 100644 --- a/harbour/contrib/hbct/pos2.c +++ b/harbour/contrib/hbct/pos2.c @@ -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 ); } diff --git a/harbour/contrib/hbct/posdiff.c b/harbour/contrib/hbct/posdiff.c index dd166a641b..a1e64210d7 100644 --- a/harbour/contrib/hbct/posdiff.c +++ b/harbour/contrib/hbct/posdiff.c @@ -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 ); } diff --git a/harbour/contrib/hbct/range.c b/harbour/contrib/hbct/range.c index cd76919ecd..8e3092e29c 100644 --- a/harbour/contrib/hbct/range.c +++ b/harbour/contrib/hbct/range.c @@ -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 ); } diff --git a/harbour/contrib/hbct/relation.c b/harbour/contrib/hbct/relation.c index 7ae7dc07d4..d5c02f36ef 100644 --- a/harbour/contrib/hbct/relation.c +++ b/harbour/contrib/hbct/relation.c @@ -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 (, , * , <[@]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 ); } diff --git a/harbour/contrib/hbct/strdiff.c b/harbour/contrib/hbct/strdiff.c index dc2b08c313..aeb51b3f89 100644 --- a/harbour/contrib/hbct/strdiff.c +++ b/harbour/contrib/hbct/strdiff.c @@ -65,7 +65,7 @@ * $ONELINER$ * Evaluate the "Edit (Levensthein) Distance" of two strings * $SYNTAX$ - * STRDIFF (, , [], [], + * STRDIFF (, , [], [], * []) -> * $ARGUMENTS$ * string at the "starting point" of the transformation process, default is "" @@ -76,28 +76,28 @@ * $RETURNS$ * penalty point sum of all operations needed to transform to * $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 into 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 ); } diff --git a/harbour/contrib/hbct/strswap.c b/harbour/contrib/hbct/strswap.c index 44642869b2..d20a438d0c 100644 --- a/harbour/contrib/hbct/strswap.c +++ b/harbour/contrib/hbct/strswap.c @@ -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 ); } diff --git a/harbour/contrib/hbct/tab.c b/harbour/contrib/hbct/tab.c index c2d5ac9edc..6bdc5fb6d2 100644 --- a/harbour/contrib/hbct/tab.c +++ b/harbour/contrib/hbct/tab.c @@ -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 (, [], [], + * TABPACK (, [], [], * [], [], * []) -> 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 ) diff --git a/harbour/contrib/hbct/token1.c b/harbour/contrib/hbct/token1.c index ef50de9d3d..5e28375105 100644 --- a/harbour/contrib/hbct/token1.c +++ b/harbour/contrib/hbct/token1.c @@ -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 diff --git a/harbour/contrib/hbct/token2.c b/harbour/contrib/hbct/token2.c index dc49ebb5f3..4566597edf 100644 --- a/harbour/contrib/hbct/token2.c +++ b/harbour/contrib/hbct/token2.c @@ -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 ) diff --git a/harbour/contrib/hbct/trig.c b/harbour/contrib/hbct/trig.c index 09fdbe836f..4d0db1e18a 100644 --- a/harbour/contrib/hbct/trig.c +++ b/harbour/contrib/hbct/trig.c @@ -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 * - * Documentation and changes concerning error handling Copyright 2001 + * Documentation and changes concerning error handling Copyright 2001 * IntTec GmbH, Freiburg, Germany, Author: Martin Vogel * * 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 must be between -1 and 1 and that - * 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 must be between -1 and 1 and that - * 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 ) diff --git a/harbour/contrib/hbct/wordrepl.c b/harbour/contrib/hbct/wordrepl.c index 2720f28a9a..6a909de442 100644 --- a/harbour/contrib/hbct/wordrepl.c +++ b/harbour/contrib/hbct/wordrepl.c @@ -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 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 ); } diff --git a/harbour/contrib/hbct/wordtoch.c b/harbour/contrib/hbct/wordtoch.c index 6f2392e8b4..c6b4766d6a 100644 --- a/harbour/contrib/hbct/wordtoch.c +++ b/harbour/contrib/hbct/wordtoch.c @@ -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 ); }