From bb5de4a84028591282a617c52760ca5159cdc7ec Mon Sep 17 00:00:00 2001 From: "Gonzalo A. Diethelm" Date: Wed, 5 May 1999 23:43:31 +0000 Subject: [PATCH] ChangeLogTag:Wed May 05 18:51:06 1999 Gonzalo A. Diethelm --- harbour/ChangeLog | 9 +++++++ harbour/include/ctoharb.h | 2 +- harbour/source/rtl/arrays.c | 24 +++++++++++------ harbour/source/rtl/files.c | 50 +++++++++++++++++++---------------- harbour/source/rtl/transfrm.c | 8 +++--- harbour/source/vm/dynsym.c | 32 +++++++++++----------- 6 files changed, 74 insertions(+), 51 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 950aef48ac..8904f1ee6c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,12 @@ +Wed May 05 18:51:06 1999 Gonzalo A. Diethelm + + * include/ctoharb.h: + * source/rtl/arrays.c: + * source/rtl/files.c: + * source/rtl/transfrm.c: + * source/vm/dynsym.c: + Replaced C++-style comments (//) with C-style commens (/* */). + Wed May 05 18:36:53 1999 Gonzalo A. Diethelm * include/ctoharb.h: diff --git a/harbour/include/ctoharb.h b/harbour/include/ctoharb.h index a432cdc675..41cc49774e 100644 --- a/harbour/include/ctoharb.h +++ b/harbour/include/ctoharb.h @@ -2,7 +2,7 @@ * $Id$ */ -// Calling Harbour from C code +/* Calling Harbour from C code */ /* executing Harbour code from C */ void PushSymbol( PSYMBOL pSym ); /* pushes a function pointer onto the stack */ diff --git a/harbour/source/rtl/arrays.c b/harbour/source/rtl/arrays.c index 08d08d0e78..8b2b10119c 100644 --- a/harbour/source/rtl/arrays.c +++ b/harbour/source/rtl/arrays.c @@ -8,9 +8,11 @@ extern STACK stack; extern SYMBOL symEval; -// ------------- -// Internal -// ------------- +/* + * ------------- + * Internal + * ------------- + */ void Array( PITEM pItem, ULONG ulLen ) /* creates a new array */ { PBASEARRAY pBaseArray = ( PBASEARRAY ) _xgrab( sizeof( BASEARRAY ) ); @@ -223,7 +225,9 @@ void ArrayDel( PITEM pArray, ULONG ulIndex ) pBaseArray->pItems + ( ulIndex + 1 ) ); ItemRelease( pBaseArray->pItems + ( ulLen - 1 ) ); -// ( pBaseArray->pItems + ( ulLen - 1 ) )->wType = IT_NIL; +#if 0 + ( pBaseArray->pItems + ( ulLen - 1 ) )->wType = IT_NIL; +#endif } } /* QUESTION: Should we raise an error here ? */ @@ -246,7 +250,9 @@ void ArrayIns( PITEM pArray, ULONG ulIndex ) pBaseArray->pItems + ( ulLen - 1 ) ); ItemRelease( pBaseArray->pItems + ulLen ); -// ( pBaseArray->pItems + ulLen )->wType = IT_NIL; /* set nil value */ +#if 0 + ( pBaseArray->pItems + ulLen )->wType = IT_NIL; /* set nil value */ +#endif } } } @@ -371,9 +377,11 @@ void ArrayRelease( PITEM pArray ) } } -// ------------- -// HARBOUR -// ------------- +/* + * ------------- + * HARBOUR + * ------------- + */ HARBOUR ARRAY( void ) { Array( &stack.Return, _parnl( 1 ) ); diff --git a/harbour/source/rtl/files.c b/harbour/source/rtl/files.c index 88e3e53a2e..6a860afc04 100644 --- a/harbour/source/rtl/files.c +++ b/harbour/source/rtl/files.c @@ -39,14 +39,14 @@ static int last_error = 0; #if !defined(PATH_MAX) -// if PATH_MAX isn't defined, 256 bytes is a good number :) +/* if PATH_MAX isn't defined, 256 bytes is a good number :) */ #define PATH_MAX 256 #endif #define MKLONG(_1,_2,_3,_4) (((long)_4)<<24)|(((long)_3)<<16)|(((long)_2)<<8)|_1 #define MKINT(_1,_2) (((long)_2)<<8)|_1 -// FLAGS TO FOPEN +/* FLAGS TO FOPEN */ #define FO_READ 0 #define FO_WRITE 1 #define FO_READWRITE 2 @@ -57,30 +57,32 @@ static int last_error = 0; #define FO_DENYONE 64 #define FO_SHARE FO_DENYONE -// FLAGS TO FCREATE +/* FLAGS TO FCREATE */ #define FC_NORMAL 0 #define FC_READONLY 1 #define FC_HIDDEN 2 #define FC_SYSTEM 4 -// FLAGS TO SEEK +/* FLAGS TO SEEK */ #define FS_SET 0 #define FS_RELATIVE 1 #define FS_END 2 -// NOTE: for avoid include stdio.h, -// this include define as an 'struct FILE' -// and we have a HARBOUR function named FILE() this -// made a name conflict +/* + * NOTE: for avoid include stdio.h, + * this include define as an 'struct FILE' + * and we have a HARBOUR function named FILE() this + * made a name conflict + */ extern int rename( const char *, const char * ); -// Convert HARBOUR flags to IO subsystem flags +/* Convert HARBOUR flags to IO subsystem flags */ #if defined(HAVE_POSIX_IO) static int convert_open_flags( int flags ) { - // by default FO_READ+FO_COMPAT is set + /* by default FO_READ+FO_COMPAT is set */ int result_flags = 0; result_flags |= O_BINARY; @@ -88,14 +90,14 @@ static int convert_open_flags( int flags ) if( flags == 0 ) result_flags |= O_RDONLY|SH_COMPAT; - // read & write flags + /* read & write flags */ if( flags & FO_WRITE ) result_flags |= O_WRONLY; if( flags & FO_READWRITE ) result_flags |= O_RDWR; - // shared flags + /* shared flags */ if( flags & FO_EXCLUSIVE ) result_flags |= SH_DENYRW; @@ -116,7 +118,7 @@ static int convert_open_flags( int flags ) static int convert_seek_flags( int flags ) { - // by default FS_SET is set + /* by default FS_SET is set */ int result_flags=0; result_flags = SEEK_SET; @@ -132,7 +134,7 @@ static int convert_seek_flags( int flags ) static int convert_create_flags( int flags ) { - // by default FC_NORMAL is set + /* by default FC_NORMAL is set */ int result_flags=S_IWUSR; if( flags & FC_READONLY ) @@ -150,8 +152,9 @@ static int convert_create_flags( int flags ) #endif -// FILESYS.API FUNCTIONS -- -// ------------------------ +/* + * FILESYS.API FUNCTIONS -- + */ int _fsOpen( char * name, int flags ) { @@ -231,7 +234,7 @@ int _fsLock( int handle, long start, long length, long mode ) int result=0; #if defined(HAVE_POSIX_IO) -// TODO: I'm thinking about this :) +/* TODO: I'm thinking about this :) */ #endif return result; @@ -240,7 +243,7 @@ int _fsLock( int handle, long start, long length, long mode ) void _fsCommit( int handle ) { #if defined(HAVE_POSIX_IO) -// TODO: I'm thinking about this :) +/* TODO: I'm thinking about this :) */ #endif return; } @@ -312,14 +315,15 @@ long _fsIsDrv( int driver ) #ifdef NOT_IMPLEMENTED_YET -// Unknow that it make :( if anyone can say me !! +/* Unknow that it make :( if anyone can say me !! */ int _fsExtOpen(PBYTE filename, PBYTE defExt, ULONG flags, PBYTE paths, ERRORP error ); #endif -// -- HARBOUR FUNCTIONS -- -// ----------------------- +/* + * -- HARBOUR FUNCTIONS -- + */ #ifdef FOPEN #define HB_FOPEN FOPEN @@ -451,7 +455,7 @@ HARBOUR FCLOSE() if( arg1_it ) { result=close(_parni(1)); - //last_error = errno; + /* last_error = errno; */ } _retl(result>=0?1:0); @@ -517,7 +521,7 @@ HARBOUR _FILE() if( arg1_it ) { - // TODO: I'm thinking about this :( + /* TODO: I'm thinking about this :( */ } _retl(0); return; diff --git a/harbour/source/rtl/transfrm.c b/harbour/source/rtl/transfrm.c index 5cf13704e4..651fb73776 100644 --- a/harbour/source/rtl/transfrm.c +++ b/harbour/source/rtl/transfrm.c @@ -188,8 +188,10 @@ char *NumPicture( char *szPic, long lPic, int iPicFlags, double dValue, PushInteger( iDecimals ); /* Push decimals */ Function( 3 ); /* 3 Parameters */ pItem = &stack.Return; -// StackPop(); -// ItemCopy( pItem, &stack.Return ); /* Get return value */ +#if 0 + StackPop(); + ItemCopy( pItem, &stack.Return ); /* Get return value */ +#endif if( pItem->wType == IT_STRING ) /* Is it a string */ { szStr = pItem->value.szText; @@ -298,7 +300,7 @@ char *NumPicture( char *szPic, long lPic, int iPicFlags, double dValue, { printf( "\nThis should never happen" ); /* TODO: Serious error */ } -// ItemRelease( pItem ); + /* ItemRelease( pItem ); */ return(szRet); } diff --git a/harbour/source/vm/dynsym.c b/harbour/source/vm/dynsym.c index fba6e5a7c1..e2b482344c 100644 --- a/harbour/source/vm/dynsym.c +++ b/harbour/source/vm/dynsym.c @@ -156,22 +156,22 @@ PDYNSYM FindDynSym( char * szName ) } else { /* Classic Tree Insert Sort Mechanism - // - // Insert Sort means the new item is entered alphabetically into - // the array. In this case pDynItems ! - // - // 1) We start in the middle of the array. - // 2a) If the symbols are equal -> we have found the symbol !! - // Champagne ! We're done. - // b) If the symbol we are looking for ('ge') is greater than the - // middle ('po'), we start looking left. - // Only the first part of the array is going to be searched. - // Go to (1) - // c) If the symbol we are looking for ('ge') is smaller than the - // middle ('ko'), we start looking right - // Only the last part of the array is going to be searched. - // Go to (1) - */ + * + * Insert Sort means the new item is entered alphabetically into + * the array. In this case pDynItems ! + * + * 1) We start in the middle of the array. + * 2a) If the symbols are equal -> we have found the symbol !! + * Champagne ! We're done. + * b) If the symbol we are looking for ('ge') is greater than the + * middle ('po'), we start looking left. + * Only the first part of the array is going to be searched. + * Go to (1) + * c) If the symbol we are looking for ('ge') is smaller than the + * middle ('ko'), we start looking right + * Only the last part of the array is going to be searched. + * Go to (1) + */ wClosestDynSym = wMiddle; /* Start in the middle */ while( wFirst < wLast )