2000-08-28 22:50 UTC+0100 Victor Szakats <info@szelvesz.hu>
This commit is contained in:
@@ -7,6 +7,7 @@ ifndef MK
|
||||
all : first
|
||||
|
||||
HB_GT_LIBS=\
|
||||
gtcgi \
|
||||
gtdos \
|
||||
gtpca \
|
||||
gtstd \
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
all : first
|
||||
|
||||
HB_GT_LIBS=\
|
||||
gtcgi \
|
||||
gtcrs \
|
||||
gtpca \
|
||||
gtsln \
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
all : first
|
||||
|
||||
HB_GT_LIBS=\
|
||||
gtcgi \
|
||||
gtos2 \
|
||||
gtpca \
|
||||
gtstd \
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
all : first
|
||||
|
||||
HB_GT_LIBS=\
|
||||
gtcgi \
|
||||
gtpca \
|
||||
gtstd \
|
||||
gtwin \
|
||||
|
||||
@@ -16,6 +16,7 @@ C_HEADERS=\
|
||||
hbapirdd.h \
|
||||
hbcomp.h \
|
||||
hbdate.h \
|
||||
hbdbsort.h \
|
||||
hbdefs.h \
|
||||
hberrors.h \
|
||||
hbexprop.h \
|
||||
@@ -24,6 +25,10 @@ C_HEADERS=\
|
||||
hbmacro.h \
|
||||
hbpcode.h \
|
||||
hbpp.h \
|
||||
hbrdddbf.h \
|
||||
hbrdddel.h \
|
||||
hbrddsdf.h \
|
||||
hbrddwrk.h \
|
||||
hbset.h \
|
||||
hbsetup.h \
|
||||
hbtrace.h \
|
||||
|
||||
@@ -52,7 +52,7 @@ void hb_compPrintUsage( char * szSelf )
|
||||
"\n %cgo output type: Windows/DOS OBJ32 (.obj)",
|
||||
"\n %cgh output type: Harbour Portable Object (.hrb)",
|
||||
"\n %cgj output type: Java source (.java)",
|
||||
"\n %ci<path> add #include file search path",
|
||||
"\n %ci<path> #include file search path",
|
||||
"\n %cl suppress line number information",
|
||||
"\n %cm compile module only",
|
||||
"\n %cn no implicit starting procedure",
|
||||
|
||||
@@ -38,7 +38,6 @@ FUNCTION __dbSort( cToFileName, aFields, bFor, bWhile, nNext, nRecord, lRest )
|
||||
LOCAL nToArea
|
||||
LOCAL aStruct
|
||||
LOCAL oError
|
||||
LOCAL lError := .F.
|
||||
|
||||
nArea := Select()
|
||||
|
||||
@@ -55,9 +54,6 @@ FUNCTION __dbSort( cToFileName, aFields, bFor, bWhile, nNext, nRecord, lRest )
|
||||
__dbArrange( nToArea, aStruct, bFor, bWhile, nNext, nRecord, lRest, aFields )
|
||||
|
||||
RECOVER USING oError
|
||||
|
||||
lError := .T.
|
||||
|
||||
END SEQUENCE
|
||||
|
||||
IF nToArea != NIL
|
||||
@@ -67,8 +63,8 @@ FUNCTION __dbSort( cToFileName, aFields, bFor, bWhile, nNext, nRecord, lRest )
|
||||
|
||||
dbSelectArea( nArea )
|
||||
|
||||
IF lError
|
||||
IF oError != NIL
|
||||
Break( oError )
|
||||
ENDIF
|
||||
|
||||
RETURN .T.
|
||||
RETURN .T.
|
||||
|
||||
@@ -57,10 +57,10 @@ FUNCTION __dbCopyXStruct( cFileName )
|
||||
dbSelectArea( 0 )
|
||||
__dbCreate( cFileName, NIL, NIL, .F., NIL )
|
||||
|
||||
aEval( aStruct, {| aField | iif( aField[ DBS_TYPE ] == "C" .AND. aField[ DBS_LEN ] > 255, ;
|
||||
AEval( aStruct, {| aField | iif( aField[ DBS_TYPE ] == "C" .AND. aField[ DBS_LEN ] > 255, ;
|
||||
( aField[ DBS_DEC ] := Int( aField[ DBS_LEN ] / 256 ), aField[ DBS_LEN ] := aField[ DBS_LEN ] % 256 ), NIL ) } )
|
||||
|
||||
aEval( aStruct, {| aField | dbAppend(),;
|
||||
AEval( aStruct, {| aField | dbAppend(),;
|
||||
FIELD->FIELD_NAME := aField[ DBS_NAME ],;
|
||||
FIELD->FIELD_TYPE := aField[ DBS_TYPE ],;
|
||||
FIELD->FIELD_LEN := aField[ DBS_LEN ], ;
|
||||
@@ -109,7 +109,7 @@ FUNCTION __dbCreate( cFileName, cFileFrom, cRDDName, lNew, cAlias )
|
||||
|
||||
dbUseArea( lNew,, cFileFrom )
|
||||
|
||||
dbEval( {|| aAdd( aStruct, { FIELD->FIELD_NAME ,;
|
||||
dbEval( {|| AAdd( aStruct, { FIELD->FIELD_NAME ,;
|
||||
FIELD->FIELD_TYPE ,;
|
||||
FIELD->FIELD_LEN ,;
|
||||
FIELD->FIELD_DEC } ) } )
|
||||
@@ -119,7 +119,7 @@ FUNCTION __dbCreate( cFileName, cFileFrom, cRDDName, lNew, cAlias )
|
||||
dbSelectArea( nOldArea )
|
||||
ENDIF
|
||||
|
||||
aEval( aStruct, {| aField | iif( aField[ DBS_TYPE ] == "C" .AND. aField[ DBS_DEC ] != 0, ;
|
||||
AEval( aStruct, {| aField | iif( aField[ DBS_TYPE ] == "C" .AND. aField[ DBS_DEC ] != 0, ;
|
||||
aField[ DBS_LEN ] := aField[ DBS_LEN ] + aField[ DBS_DEC ] * 256, NIL ) } )
|
||||
|
||||
dbCreate( cFileName, aStruct, cRDDName )
|
||||
@@ -159,8 +159,8 @@ FUNCTION __dbStructFilter( aStruct, aFieldList )
|
||||
aStructFiltered := {}
|
||||
bFindName := {| aField | aField[ DBS_NAME ] == RTrim( Upper(cName ) ) }
|
||||
|
||||
aEval( aFieldList, {| cFieldName, nIndex | cName := cFieldName, nIndex := aScan( aStruct, bFindName ),;
|
||||
iif( nIndex == 0, NIL, aAdd( aStructFiltered, aStruct[ nIndex] ) ) } )
|
||||
AEval( aFieldList, {| cFieldName, nIndex | cName := cFieldName, nIndex := aScan( aStruct, bFindName ),;
|
||||
iif( nIndex == 0, NIL, AAdd( aStructFiltered, aStruct[ nIndex] ) ) } )
|
||||
|
||||
RETURN aStructFiltered
|
||||
|
||||
|
||||
@@ -398,7 +398,7 @@ static void hb_conDevPos( SHORT iRow, SHORT iCol )
|
||||
hb_gtSetPos( iRow, iCol );
|
||||
}
|
||||
|
||||
/* NOTE: This should be placed after the hb_devpos() definition. */
|
||||
/* NOTE: This should be placed after the hb_conDevPos() definition. */
|
||||
|
||||
HB_FUNC( DEVPOS ) /* Sets the screen and/or printer position */
|
||||
{
|
||||
|
||||
@@ -861,25 +861,7 @@ BOOL hb_fsLock ( FHANDLE hFileHandle, ULONG ulStart,
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_fsLock(%p, %lu, %lu, %hu)", hFileHandle, ulStart, ulLength, uiMode));
|
||||
|
||||
#if defined(HAVE_POSIX_IO) && !defined(__GNUC__) && !defined(__IBMCPP__) && !defined(HB_OS_OS2)
|
||||
|
||||
errno = 0;
|
||||
switch( uiMode )
|
||||
{
|
||||
case FL_LOCK:
|
||||
iResult = lock( hFileHandle, ulStart, ulLength );
|
||||
break;
|
||||
|
||||
case FL_UNLOCK:
|
||||
iResult = unlock( hFileHandle, ulStart, ulLength );
|
||||
break;
|
||||
|
||||
default:
|
||||
iResult = 0;
|
||||
}
|
||||
s_uiErrorLast = errno;
|
||||
|
||||
#elif defined(HB_OS_OS2)
|
||||
#if defined(HB_OS_OS2)
|
||||
|
||||
{
|
||||
struct _FILELOCK fl, ful;
|
||||
@@ -1015,6 +997,24 @@ BOOL hb_fsLock ( FHANDLE hFileHandle, ULONG ulStart,
|
||||
s_uiErrorLast = errno;
|
||||
}
|
||||
|
||||
#elif defined(HAVE_POSIX_IO) && !defined(__IBMCPP__)
|
||||
|
||||
errno = 0;
|
||||
switch( uiMode )
|
||||
{
|
||||
case FL_LOCK:
|
||||
iResult = lock( hFileHandle, ulStart, ulLength );
|
||||
break;
|
||||
|
||||
case FL_UNLOCK:
|
||||
iResult = unlock( hFileHandle, ulStart, ulLength );
|
||||
break;
|
||||
|
||||
default:
|
||||
iResult = 0;
|
||||
}
|
||||
s_uiErrorLast = errno;
|
||||
|
||||
#else
|
||||
|
||||
iResult = 1;
|
||||
|
||||
@@ -84,9 +84,7 @@ int hb_inkey( BOOL bWait, double dSeconds, HB_inkey_enum event_mask )
|
||||
if( ( event_mask & ( INKEY_ALL + INKEY_RAW ) ) != 0 )
|
||||
{
|
||||
while( hb_inkeyNext() == 0 )
|
||||
{
|
||||
hb_idleState();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -94,9 +92,7 @@ int hb_inkey( BOOL bWait, double dSeconds, HB_inkey_enum event_mask )
|
||||
clock_t end_clock = clock() + ( clock_t ) ( dSeconds * CLOCKS_PER_SEC );
|
||||
|
||||
while( hb_inkeyNext() == 0 && clock() < end_clock )
|
||||
{
|
||||
hb_idleState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,8 +123,11 @@ int hb_inkeyGet( void ) /* Extract the next key from the keyboard buffer *
|
||||
key = s_inkeyLast;
|
||||
}
|
||||
}
|
||||
else key = s_inkeyLast = s_inkeyForce; /* Typeahead support is disabled */
|
||||
else
|
||||
key = s_inkeyLast = s_inkeyForce; /* Typeahead support is disabled */
|
||||
|
||||
s_inkeyForce = 0;
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
@@ -143,8 +142,6 @@ int hb_inkeyLast( void ) /* Return the value of the last key that was extra
|
||||
|
||||
int hb_inkeyNext( void ) /* Return the next key without extracting it */
|
||||
{
|
||||
int key;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_inkeyNext()"));
|
||||
|
||||
hb_inkeyPoll();
|
||||
@@ -153,14 +150,12 @@ int hb_inkeyNext( void ) /* Return the next key without extracting it */
|
||||
{
|
||||
/* Proper typeahead support is enabled */
|
||||
if( s_inkeyHead == s_inkeyTail )
|
||||
key = 0; /* No key */
|
||||
return 0; /* No key */
|
||||
else
|
||||
key = s_inkeyBuffer[ s_inkeyTail ]; /* Next key */
|
||||
return s_inkeyBuffer[ s_inkeyTail ]; /* Next key */
|
||||
}
|
||||
else
|
||||
key = s_inkeyForce; /* Typeahead support is disabled */
|
||||
|
||||
return key;
|
||||
return s_inkeyForce; /* Typeahead support is disabled */
|
||||
}
|
||||
|
||||
void hb_inkeyPoll( void ) /* Poll the console keyboard to stuff the Harbour buffer */
|
||||
@@ -202,7 +197,8 @@ void hb_inkeyReset( BOOL allocate ) /* Reset the keyboard buffer */
|
||||
if( allocate )
|
||||
{
|
||||
/* If the buffer already exists, free it */
|
||||
if( s_inkeyBuffer ) hb_xfree( s_inkeyBuffer );
|
||||
if( s_inkeyBuffer )
|
||||
hb_xfree( s_inkeyBuffer );
|
||||
|
||||
/* Always allocate a new buffer, unless it's being freed from hb_setRelease() */
|
||||
if( hb_set.HB_SET_TYPEAHEAD > -1 )
|
||||
@@ -253,7 +249,8 @@ HB_FUNC( __KEYBOARD )
|
||||
while( size-- )
|
||||
{
|
||||
int ch = *fPtr++;
|
||||
if( ch == 59 ) ch = 13; /* Convert ";" to CR, like Clipper does */
|
||||
if( ch == 59 )
|
||||
ch = 13; /* Convert ";" to CR, like Clipper does */
|
||||
hb_inkeyPut( ch );
|
||||
}
|
||||
}
|
||||
@@ -270,6 +267,7 @@ void hb_inkeyPut( int ch )
|
||||
{
|
||||
/* Proper typeahead support is set */
|
||||
int head = s_inkeyHead;
|
||||
|
||||
s_inkeyBuffer[ head++ ] = ch;
|
||||
if( head >= hb_set.HB_SET_TYPEAHEAD ) head = 0;
|
||||
if( head != s_inkeyTail ) s_inkeyHead = head;
|
||||
|
||||
@@ -234,7 +234,7 @@ FUNCTION __objDelData( oObject, cSymbol )
|
||||
RETURN oObject
|
||||
|
||||
FUNCTION __objDerivedFrom( oObject, xSuper )
|
||||
Local cClassName
|
||||
LOCAL cClassName
|
||||
|
||||
IF !ISOBJECT( oObject )
|
||||
__errRT_BASE( EG_ARG, 3101, NIL, ProcName( 0 ) )
|
||||
@@ -248,5 +248,5 @@ FUNCTION __objDerivedFrom( oObject, xSuper )
|
||||
__errRT_BASE( EG_ARG, 3101, NIL, ProcName( 0 ) )
|
||||
ENDIF
|
||||
|
||||
RETURN __ClsParent( oObject:ClassH, cClassName )
|
||||
RETURN __clsParent( oObject:ClassH, cClassName )
|
||||
|
||||
|
||||
@@ -43,16 +43,14 @@
|
||||
HB_FUNC( __RUN )
|
||||
{
|
||||
#if defined(__TURBOC__) || defined(__BORLANDC__) || defined(_MSC_VER) || defined(__IBMCPP__) || defined(__GNUC__)
|
||||
if( ISCHAR( 1 ) )
|
||||
if( ISCHAR( 1 ) && hb_gtSuspend() )
|
||||
{
|
||||
if ( hb_gtSuspend() )
|
||||
system( hb_parc( 1 ) );
|
||||
|
||||
if( ! hb_gtResume() )
|
||||
{
|
||||
system( hb_parc( 1 ) );
|
||||
if ( !hb_gtResume() )
|
||||
{
|
||||
/* an error should be generated here !! Something like */
|
||||
/* hb_errRT_BASE_Ext1( EG_GTRESUME, 9999, NULL, "__RUN", 0, EF_CANDEFAULT ); */
|
||||
}
|
||||
/* an error should be generated here !! Something like */
|
||||
/* hb_errRT_BASE_Ext1( EG_GTRESUME, 9999, NULL, "__RUN", 0, EF_CANDEFAULT ); */
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
* Improving class(y) compatibility
|
||||
* adding messages :error() and ::MsgNotFound()
|
||||
*
|
||||
*
|
||||
* See doc/license.txt for licensing terms.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#ifndef __HARBOUR__
|
||||
#ifndef __XPP__
|
||||
#ifndef __FLAGSHIP__ /* QUESTION: is this the correct constant ? */
|
||||
#ifndef FlagShip
|
||||
#ifndef __VO__ /* QUESTION: is this the correct constant ? */
|
||||
#define __CLIPPER__
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user