From 17c1e7f357e6287bd10e10b5e86f1320effdc10f Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Mon, 29 Sep 2003 11:21:17 +0000 Subject: [PATCH] 2003-09-29 15:20 UTC+0300 Alexander Kresin --- harbour/ChangeLog | 9 +++++++++ harbour/bin/pack_src.sh | 2 +- harbour/make_tgz.sh | 2 +- harbour/source/rtl/strcase.c | 30 +++++++++++++++++++++--------- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 05c72b2bd4..8f6fbf53fd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,15 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-09-29 15:20 UTC+0300 Alexander Kresin + *source/rtl/strcase.c + ! hb_strncpyUpper() is fixed ( borrowed from xHarbour ). + * make_tgz.sh + * bin/pack_src.sh + * release info changed + * include/hbver.h + * Release info has been corrected again :). + 2003-09-29 11:47 UTC+0300 Chen Kedem * doc/whatsnew.txt + Added information about builds 10..25, 43 based on information diff --git a/harbour/bin/pack_src.sh b/harbour/bin/pack_src.sh index 50e5da67c4..f1bafe236b 100644 --- a/harbour/bin/pack_src.sh +++ b/harbour/bin/pack_src.sh @@ -4,7 +4,7 @@ # # This script requires "TAR" utilities for compression. -hb_ver="0.42.0" +hb_ver="0.43.0" hb_archbin="tar" hb_archopt="-cz --ignore-failed-read -f" diff --git a/harbour/make_tgz.sh b/harbour/make_tgz.sh index 6ab0879d90..3e2e7f1b67 100644 --- a/harbour/make_tgz.sh +++ b/harbour/make_tgz.sh @@ -18,7 +18,7 @@ hb_platform=`rel=$(rpm -q --queryformat='.%{VERSION}' mandrake-release 2>/dev/nu [ "${hb_platform}" = "" ] || hb_platform="-${hb_platform}" name="harbour" -hb_ver="0.42.0" +hb_ver="0.43.0" hb_lnkso="yes" hb_pref="hb" hb_libs="vm pp rtl rdd dbfdbt dbffpt dbfcdx dbfntx macro common lang codepage gtnul gtcrs gtsln gtcgi gtstd gtpca odbc ct debug profiler" diff --git a/harbour/source/rtl/strcase.c b/harbour/source/rtl/strcase.c index f903b1953c..53685cce0b 100644 --- a/harbour/source/rtl/strcase.c +++ b/harbour/source/rtl/strcase.c @@ -97,17 +97,29 @@ char * hb_strUpper( char * szText, ULONG ulLen ) */ char * hb_strncpyUpper( char * pDest, const char * pSource, ULONG ulLen ) { - HB_TRACE(HB_TR_DEBUG, ("hb_strncpyUpper(%p, %s, %lu)", pDest, pSource, ulLen)); + char *pBuf = pDest; - pDest[ ulLen ] ='\0'; - while( ulLen-- ) - { - /* some compilers impliment toupper as a macro, and this has side effects! */ - /* *pDest++ = toupper( *pSource++ ); */ - pDest[ ulLen ] = toupper( (unsigned char) pSource[ ulLen ] ); - } + HB_TRACE(HB_TR_DEBUG, ("hb_strncpyUpper(%p, %s, %lu)", pDest, pSource, ulLen)); - return pDest; + pDest[ ulLen ] ='\0'; + + /* some compilers impliment toupper as a macro, and this has side effects! */ + /* *pDest++ = toupper( *pSource++ ); */ + while( ulLen && (*pDest++ = toupper( *pSource ))) + { + ulLen--; + pSource++; + } + + if( ulLen ) + { + while (--ulLen) + { + *pDest++ = '\0'; + } + } + + return pBuf; } /* This function copies and converts szText to upper case AND Trims it