20000321-01:10 GMT+1 Victor Szakats <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
2000-03-21 00:08:33 +00:00
parent 10eb30aebc
commit bf9fe43d73
7 changed files with 48 additions and 13 deletions

View File

@@ -1,3 +1,22 @@
20000321-01:10 GMT+1 Victor Szakats <info@szelvesz.hu>
* source/rtl/gtapi.c
! hb_gtBox() bottom/left corner draw bug fixed. Introduced around today.
* source/rtl/diskspac.c
! Fixed the default case for Win32.
* source/rtl/getenv.c
! Fixed to not modify the item buffer directly.
! Fixed to convert the envvar name to uppercase on DOS and OS/2 platforms.
! Consistent handling of \0 char in the envvar name.
! Fixed stripping of the '=' character.
* source/rtl/strings.c
source/rtl/stuff.c
source/rtl/word.c
- Superfluous #includes removed.
20000320-22:30 GMT+1 Victor Szakats <info@szelvesz.hu>
* samples/guestbk/bld_b32.bat

View File

@@ -50,6 +50,7 @@
#include "hbapi.h"
#include "hbapierr.h"
#include "hbapifs.h"
#if defined(DOS) || defined(__WATCOMC__)
#include <dos.h>
@@ -89,6 +90,9 @@ HARBOUR HB_DISKSPACE( void )
DWORD dwNumberOfFreeClusters;
DWORD dwTotalNumberOfClusters;
if( uiDrive == 0 )
uiDrive = hb_fsCurDrv() + 1;
szPath[ 0 ] = uiDrive + 'A' - 1;
szPath[ 1 ] = ':';
szPath[ 2 ] = '\\';

View File

@@ -57,24 +57,40 @@ HARBOUR HB_GETENV( void )
if( pName )
{
char * szName = hb_itemGetCPtr( pName );
ULONG ulName = hb_itemGetCLen( pName );
char * pszName = hb_itemGetC( pName );
ULONG ulName = strlen( pszName );
ULONG ulPos;
while( ulName && szName[ ulName - 1 ] == '=' )
/* strip the '=' or else it will clear the variable! */
for( ulPos = 0; ulPos < ulName; ulPos++ )
{
/* strip the '=' or else it will clear the variable! */
szName[ ulName - 1 ] = '\0';
ulName--;
if( pszName[ ulPos ] == '=' )
{
pszName[ ulPos ] = '\0';
break;
}
}
if( ulName )
if( pszName[ 0 ] != '\0' )
{
char * szValue = getenv( szName );
char * szValue;
/* NOTE: Convert the envvar name to uppercase. This is required for
DOS and OS/2 systems. [vszakats] */
#if defined(HB_OS_DOS) || defined(HB_OS_OS2)
hb_strupr( pszName );
#endif
szValue = getenv( pszName );
hb_retc( szValue ? szValue : ( ( ISCHAR( 2 ) ? hb_parc( 2 ) : "" ) ) );
}
else
hb_retc( "" );
hb_itemFreeC( pszName );
}
else
hb_retc( "" );

View File

@@ -244,7 +244,7 @@ USHORT hb_gtBox( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, B
if( height > 1 && width > 1 )
{
hb_gtWriteAt( uiBottom, uiCol , pszBox + 6, sizeof( BYTE ) ); /* Bottom left corner */
hb_gtWriteAt( uiBottom, uiLeft, pszBox + 6, sizeof( BYTE ) ); /* Bottom left corner */
uiCol = ( height > 1 ? uiLeft + 1 : uiLeft );

View File

@@ -51,8 +51,6 @@
#include <ctype.h>
#include "hbapi.h"
#include "hbapiitm.h"
#include "hbapierr.h"
BOOL hb_strEmpty( const char * szText, ULONG ulLen )
{

View File

@@ -34,7 +34,6 @@
*/
#include "hbapi.h"
#include "hbapiitm.h"
/* replaces characters in a string */
HARBOUR HB_STUFF( void )

View File

@@ -35,7 +35,6 @@
#include "hbapi.h"
#include "hbapierr.h"
#include "hbapiitm.h"
/* NOTE: The Clipper NG states that WORD() will only work when used
in CALL commands parameter list, otherwise it will return