From c8982877aafe64fdd624c5de978007ccc856fb3c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 30 Jan 2000 21:43:48 +0000 Subject: [PATCH] 20000130-22:41 GMT+1 Victor Szel --- harbour/ChangeLog | 9 +++++++++ harbour/source/rtl/environ.c | 18 ++++++++++-------- harbour/source/rtl/memoline.c | 2 +- harbour/source/rtl/mlcount.c | 2 +- harbour/source/rtl/mlpos.c | 2 +- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3cb4df9f3f..8541260017 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,12 @@ +20000130-22:41 GMT+1 Victor Szel + * source/rtl/mlcount.c + source/rtl/memoline.c + source/rtl/mlpos.c + ! Fixed GPF when the first passed parameter was not a string. + * source/rtl/environ.c + ! Fixed VERSION() reporing service pack level on NT/2000. + ! Fixed minor doc formatting problem. + 20000130-17:05 GMT+3 Alexander Kresin * source/pp/hbpp.c * Bug fixed, noted by Ryszard Glab diff --git a/harbour/source/rtl/environ.c b/harbour/source/rtl/environ.c index 885182a8ca..ca57b688e3 100644 --- a/harbour/source/rtl/environ.c +++ b/harbour/source/rtl/environ.c @@ -95,6 +95,7 @@ #define INT_86 int86 #endif #endif + /* $DOC$ * $FUNCNAME$ * OS() @@ -219,15 +220,15 @@ HARBOUR HB_OS( void ) hb_osletter = LOWORD(osVer.dwBuildNumber); if( hb_osmajor == 3 && hb_osminor == 10 ) - hb_os = "Windows NT 3.1"; + hb_os = "Windows NT 3.1"; else if( hb_osmajor == 3 && hb_osminor == 50 ) - hb_os = "Windows NT 3.5"; + hb_os = "Windows NT 3.5"; else if( hb_osmajor == 3 && hb_osminor == 51 ) - hb_os = "Windows NT 3.51"; + hb_os = "Windows NT 3.51"; else if( hb_osmajor == 4 ) - hb_os = "Windows NT 4"; + hb_os = "Windows NT 4"; else if( hb_osmajor == 5 ) - hb_os = "Windows 2000"; + hb_os = "Windows 2000"; else hb_os = "Windows NT"; @@ -240,7 +241,8 @@ HARBOUR HB_OS( void ) i++; wServicePack = (WORD)( atoi( &osVer.szCSDVersion[ i ] ) ); - sprintf( szBuild, "%i", wServicePack ); + if( wServicePack ) + sprintf( szBuild, " SP%i", wServicePack ); } /* TODO: Add support for: * NT Stand Alone Server @@ -591,8 +593,8 @@ HARBOUR HB_VERSION( void ) * can be found, the value of the function will be a empty string. * $EXAMPLES$ * ? QOUT(GETENV('PATH')) - ? QOUT(GETENV('CONFIG')) - ? QOUT(GETENV('HARBOURCMD', '-n -l -es2')) + * ? QOUT(GETENV('CONFIG')) + * ? QOUT(GETENV('HARBOURCMD', '-n -l -es2')) * $TESTS$ * * $STATUS$ diff --git a/harbour/source/rtl/memoline.c b/harbour/source/rtl/memoline.c index a4c5bf9134..67bca4b7a6 100644 --- a/harbour/source/rtl/memoline.c +++ b/harbour/source/rtl/memoline.c @@ -37,7 +37,7 @@ HARBOUR HB_MEMOLINE( void ) { - char * pszString = hb_parc( 1 ); + char * pszString = ISCHAR( 1 ) ? hb_parc( 1 ) : ""; ULONG ulLineLength = ISNUM( 2 ) ? hb_parni( 2 ) : 79; ULONG ulLineNumber = ISNUM( 3 ) ? hb_parni( 3 ) : 1; ULONG ulTabLength = ISNUM( 4 ) ? hb_parni( 4 ) : 4; diff --git a/harbour/source/rtl/mlcount.c b/harbour/source/rtl/mlcount.c index 541d1c8d67..ead9f228e5 100644 --- a/harbour/source/rtl/mlcount.c +++ b/harbour/source/rtl/mlcount.c @@ -37,7 +37,7 @@ HARBOUR HB_MLCOUNT( void ) { - char * pszString = hb_parc( 1 ); + char * pszString = ISCHAR( 1 ) ? hb_parc( 1 ) : ""; ULONG ulLineLength = ISNUM( 2 ) ? hb_parni( 2 ) : 79; ULONG ulTabLength = ISNUM( 3 ) ? hb_parni( 3 ) : 4; ULONG ulLastSpace = 0; diff --git a/harbour/source/rtl/mlpos.c b/harbour/source/rtl/mlpos.c index 3338e605ac..eff5fe1e75 100644 --- a/harbour/source/rtl/mlpos.c +++ b/harbour/source/rtl/mlpos.c @@ -37,7 +37,7 @@ HARBOUR HB_MLPOS( void ) { - char * pszString = hb_parc( 1 ); + char * pszString = ISCHAR( 1 ) ? hb_parc( 1 ) : ""; ULONG ulLineLength = hb_parni( 2 ); ULONG ulLine = hb_parni( 3 ); ULONG ulTabLength = ISNUM( 4 ) ? hb_parni( 4 ) : 4;