diff --git a/harbour/ChangeLog b/harbour/ChangeLog index acb582ebcd..d0e9e54dd7 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,32 @@ The license applies to all entries newer than 2009-04-28. */ +2012-09-26 01:35 UTC+0200 Viktor Szakats (harbour syenar.net) + - website/samples/_notes + - website/samples/_notes/dwsync.xml + - deleted trash + + * contrib/hbnf/caplock.c + * contrib/hbnf/chdir.c + * contrib/hbnf/dispc.c + * contrib/hbnf/ftattr.c + * contrib/hbnf/ftisprn.c + * contrib/hbnf/getenvrn.c + * contrib/hbnf/getver.c + * contrib/hbnf/getvid.c + * contrib/hbnf/iamidle.c + * contrib/hbnf/kspeed.c + * contrib/hbnf/mkdir.c + * contrib/hbnf/mouse.c + * contrib/hbnf/numlock.c + * contrib/hbnf/peek.c + * contrib/hbnf/poke.c + * contrib/hbnf/putkey.c + * contrib/hbnf/rmdir.c + * contrib/hbnf/setkeys.c + * contrib/hbnf/setlastk.c + * formatted using uncrustify + 2012-09-26 01:24 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbnf/aading.prg * contrib/hbnf/aemaxlen.prg diff --git a/harbour/contrib/hbnf/caplock.c b/harbour/contrib/hbnf/caplock.c index 795fd6361a..778e93392f 100644 --- a/harbour/contrib/hbnf/caplock.c +++ b/harbour/contrib/hbnf/caplock.c @@ -37,22 +37,22 @@ HB_FUNC( FT_CAPLOCK ) { - int iState = 0, iNewState; - HB_GT_INFO gtInfo; + int iState = 0, iNewState; + HB_GT_INFO gtInfo; memset( >Info, 0, sizeof( gtInfo ) ); hb_gtInfo( HB_GTI_KBDSHIFTS, >Info ); if( gtInfo.pResult ) { - iState = hb_itemGetNI( gtInfo.pResult ); + iState = hb_itemGetNI( gtInfo.pResult ); gtInfo.pNewVal = gtInfo.pResult; gtInfo.pResult = NULL; } if( HB_ISLOG( 1 ) ) { - iNewState = hb_parl( 1 ) ? ( iState | HB_GTI_KBD_CAPSLOCK ) : - ( iState & ~HB_GTI_KBD_CAPSLOCK ); + iNewState = hb_parl( 1 ) ? ( iState | HB_GTI_KBD_CAPSLOCK ) : + ( iState & ~HB_GTI_KBD_CAPSLOCK ); gtInfo.pNewVal = hb_itemPutNI( gtInfo.pNewVal, iNewState ); hb_gtInfo( HB_GTI_KBDSHIFTS, >Info ); } diff --git a/harbour/contrib/hbnf/chdir.c b/harbour/contrib/hbnf/chdir.c index b1598f9c39..6246a72e9e 100644 --- a/harbour/contrib/hbnf/chdir.c +++ b/harbour/contrib/hbnf/chdir.c @@ -3,54 +3,54 @@ */ /* File......: chdir.asm -* Author....: Ted Means -* CIS ID....: 73067,3332 -* -* This is an original work by Ted Means and is placed in the -* public domain. -* -* Modification history: -* --------------------- -* -* Rev 1.2 15 Aug 1991 23:07:20 GLENN -* Forest Belt proofread/edited/cleaned up doc -* -* Rev 1.1 14 Jun 1991 19:54:20 GLENN -* Minor edit to file header -* -* Rev 1.0 01 Apr 1991 01:03:10 GLENN -* Nanforum Toolkit -* -*/ + * Author....: Ted Means + * CIS ID....: 73067,3332 + * + * This is an original work by Ted Means and is placed in the + * public domain. + * + * Modification history: + * --------------------- + * + * Rev 1.2 15 Aug 1991 23:07:20 GLENN + * Forest Belt proofread/edited/cleaned up doc + * + * Rev 1.1 14 Jun 1991 19:54:20 GLENN + * Minor edit to file header + * + * Rev 1.0 01 Apr 1991 01:03:10 GLENN + * Nanforum Toolkit + * + */ /*This is the Original FT_CHDIR() code -IDEAL -MODEL HUGE -Public _HB_FUN_FT_CHDIR + IDEAL + MODEL HUGE + Public _HB_FUN_FT_CHDIR -Extrn _hb_ftdir:Far + Extrn _hb_ftdir:Far -Segment _NanFor Word Public "CODE" + Segment _NanFor Word Public "CODE" Assume CS:_NanFor -Proc _HB_FUN_FT_CHDIR Far + Proc _HB_FUN_FT_CHDIR Far Mov AH,3Bh * DOS service -- change directory Push AX * Save on stack Call _hb_ftdir * Call generic directory routine Add SP,2 * Realign stack RetF -Endp _HB_FUN_FT_CHDIR -Ends _NanFor -End -*/ + Endp _HB_FUN_FT_CHDIR + Ends _NanFor + End + */ /* This is the New one Rewriten in C*/ #include "hbapi.h" #include "hbapifs.h" -HB_FUNC( FT_CHDIR) +HB_FUNC( FT_CHDIR ) { hb_retl( HB_ISCHAR( 1 ) && hb_fsChDir( hb_parc( 1 ) ) ); } diff --git a/harbour/contrib/hbnf/dispc.c b/harbour/contrib/hbnf/dispc.c index 55449b9669..a8a0b7760f 100644 --- a/harbour/contrib/hbnf/dispc.c +++ b/harbour/contrib/hbnf/dispc.c @@ -773,8 +773,8 @@ HB_FUNC( FT_DISPFILE ) if( keytype == K_STRING ) { - rval[ 0 ] = ( char ) ch; - rval[ 1 ] = '\0'; + rval[ 0 ] = ( char ) ch; + rval[ 1 ] = '\0'; hb_retc( rval ); } else diff --git a/harbour/contrib/hbnf/ftattr.c b/harbour/contrib/hbnf/ftattr.c index d0fa51476e..e08ece00d6 100644 --- a/harbour/contrib/hbnf/ftattr.c +++ b/harbour/contrib/hbnf/ftattr.c @@ -26,38 +26,38 @@ */ /* This is the original FT_SAVEATT() code -IDEAL + IDEAL -Public FT_SaveAtt + Public FT_SaveAtt -Extrn __ParNI:Far -Extrn __RetCLen:Far -Extrn __xGrab:Far -Extrn __xFree:Far -Extrn __gtSave:Far + Extrn __ParNI:Far + Extrn __RetCLen:Far + Extrn __xGrab:Far + Extrn __xFree:Far + Extrn __gtSave:Far -nTop EQU Word Ptr BP - 2 -nLeft EQU Word Ptr BP - 4 -nBottom EQU Word Ptr BP - 6 -nRight EQU Word Ptr BP - 8 -nAttr EQU Byte Ptr BP - 10 -nBufLen EQU Word Ptr BP - 12 + nTop EQU Word Ptr BP - 2 + nLeft EQU Word Ptr BP - 4 + nBottom EQU Word Ptr BP - 6 + nRight EQU Word Ptr BP - 8 + nAttr EQU Byte Ptr BP - 10 + nBufLen EQU Word Ptr BP - 12 -cBuffer EQU DWord Ptr BP - 16 -nBufOfs EQU Word Ptr BP - 16 -nBufSeg EQU Word Ptr BP - 14 + cBuffer EQU DWord Ptr BP - 16 + nBufOfs EQU Word Ptr BP - 16 + nBufSeg EQU Word Ptr BP - 14 -Segment _NanFor Word Public "CODE" + Segment _NanFor Word Public "CODE" Assume CS:_NanFor -Proc FT_SaveAtt Far + Proc FT_SaveAtt Far Push BP ; Save BP Mov BP,SP ; Set up stack reference Sub SP,16 ; Allocate locals Mov CX,4 ; Set param count -@@Coord: Push CX ; Put on stack + @@Coord: Push CX ; Put on stack Call __ParNI ; Retrieve param Pop CX ; Get count back Push AX ; Put value on stack @@ -79,7 +79,7 @@ Proc FT_SaveAtt Far SHL AX,1 ; Calc buffer size Mov [nBufLen],AX ; Store buffer size -@@Alloc: Push AX ; Put size on stack + @@Alloc: Push AX ; Put size on stack Call __xGrab ; Allocate memory Add SP,2 ; Realign stack Mov [nBufSeg],DX ; Store segment @@ -108,7 +108,7 @@ Proc FT_SaveAtt Far Mov CX,[nBufLen] ; Load buffer length SHR CX,1 ; Divide by two -@@Attr: Lodsw ; Grab a screen word + @@Attr: Lodsw ; Grab a screen word Stosb ; Store attribute only Loop @@Attr ; Do next @@ -116,7 +116,7 @@ Proc FT_SaveAtt Far Pop SI Pop DS -Done: Mov AX,[nBufLen] ; Load buffer length + Done: Mov AX,[nBufLen] ; Load buffer length SHR AX,1 ; Divide by 2 Push AX ; Put length on stack Push [nBufSeg] ; Put segment on stack @@ -126,10 +126,10 @@ Done: Mov AX,[nBufLen] ; Load buffer length Mov SP,BP ; Realign stack Pop BP ; Restore BP Ret -Endp FT_SaveAtt -Ends _NanFor -End -*/ + Endp FT_SaveAtt + Ends _NanFor + End + */ #include "hbapi.h" #include "hbapigt.h" @@ -138,16 +138,16 @@ End HB_FUNC( FT_SAVEATT ) { - int iTop = hb_parni( 1 ); /* Defaults to zero on bad type */ - int iLeft = hb_parni( 2 ); /* Defaults to zero on bad type */ - int iMaxRow = hb_gtMaxRow(); - int iMaxCol = hb_gtMaxCol(); - int iBottom = hb_parnidef( 3, iMaxRow ); - int iRight = hb_parnidef( 4, iMaxRow ); + int iTop = hb_parni( 1 ); /* Defaults to zero on bad type */ + int iLeft = hb_parni( 2 ); /* Defaults to zero on bad type */ + int iMaxRow = hb_gtMaxRow(); + int iMaxCol = hb_gtMaxCol(); + int iBottom = hb_parnidef( 3, iMaxRow ); + int iRight = hb_parnidef( 4, iMaxRow ); - HB_SIZE ulSize; - char * pBuffer; - char * pAttrib; + HB_SIZE ulSize; + char * pBuffer; + char * pAttrib; if( iTop < 0 ) iTop = 0; @@ -160,16 +160,16 @@ HB_FUNC( FT_SAVEATT ) if( iTop <= iBottom && iLeft <= iRight ) { - ulSize = ( iBottom - iTop + 1 ) * ( iRight - iLeft + 1 ); - pBuffer = pAttrib = ( char * ) hb_xgrab( ulSize + 1 ); + ulSize = ( iBottom - iTop + 1 ) * ( iRight - iLeft + 1 ); + pBuffer = pAttrib = ( char * ) hb_xgrab( ulSize + 1 ); while( iTop <= iBottom ) { int iCol = iLeft; while( iCol <= iRight ) { - int iColor; - HB_BYTE bAttr; - HB_USHORT usChar; + int iColor; + HB_BYTE bAttr; + HB_USHORT usChar; hb_gtGetChar( iTop, iCol, &iColor, &bAttr, &usChar ); *pBuffer++ = ( char ) iColor; ++iCol; @@ -207,39 +207,39 @@ HB_FUNC( FT_SAVEATT ) */ /* This is the Original FT_RESTATT() code -IDEAL + IDEAL -Public FT_RestAtt + Public FT_RestAtt -Extrn __ParNI:Far -Extrn __ParC:Far -Extrn __XGrab:Far -Extrn __XFree:Far -Extrn __gtSave:Far -Extrn __gtRest:Far + Extrn __ParNI:Far + Extrn __ParC:Far + Extrn __XGrab:Far + Extrn __XFree:Far + Extrn __gtSave:Far + Extrn __gtRest:Far -nTop EQU Word Ptr BP - 2 -nLeft EQU Word Ptr BP - 4 -nBottom EQU Word Ptr BP - 6 -nRight EQU Word Ptr BP - 8 -nAttr EQU Byte Ptr BP - 10 -nBufLen EQU Word Ptr BP - 12 + nTop EQU Word Ptr BP - 2 + nLeft EQU Word Ptr BP - 4 + nBottom EQU Word Ptr BP - 6 + nRight EQU Word Ptr BP - 8 + nAttr EQU Byte Ptr BP - 10 + nBufLen EQU Word Ptr BP - 12 -cBuffer EQU DWord Ptr BP - 16 -nBufOfs EQU Word Ptr BP - 16 -nBufSeg EQU Word Ptr BP - 14 + cBuffer EQU DWord Ptr BP - 16 + nBufOfs EQU Word Ptr BP - 16 + nBufSeg EQU Word Ptr BP - 14 -Segment _NanFor Word Public "CODE" + Segment _NanFor Word Public "CODE" Assume CS:_NanFor -Proc FT_RestAtt Far + Proc FT_RestAtt Far Push BP ; Save BP Mov BP,SP ; Set up stack reference Sub SP,16 ; Allocate locals Mov CX,4 ; Set param count -@@Coord: Push CX ; Put on stack + @@Coord: Push CX ; Put on stack Call __ParNI ; Retrieve param Pop CX ; Get count back Push AX ; Put value on stack @@ -261,7 +261,7 @@ Proc FT_RestAtt Far SHL AX,1 ; Calc buffer size Mov [nBufLen],AX ; Store buffer size -@@Alloc: Push AX ; Put size on stack + @@Alloc: Push AX ; Put size on stack Call __xGrab ; Allocate memory Add SP,2 ; Realign stack Mov [nBufSeg],DX ; Store segment @@ -291,7 +291,7 @@ Proc FT_RestAtt Far Mov CX,[nBufLen] ; Load buffer length SHR CX,1 ; Divide by two -@@Attr: Inc DI ; Point DI to attribute + @@Attr: Inc DI ; Point DI to attribute Lodsb ; Grab an attribute byte Stosb ; Store attribute Loop @@Attr ; Do next @@ -301,31 +301,32 @@ Proc FT_RestAtt Far Pop DS Call __gtRest ; Restore screen image -Done: Push [nBufSeg] ; Put segment on stack + Done: Push [nBufSeg] ; Put segment on stack Push [nBufOfs] ; Put offset on stack Call __xFree ; Free memory Mov SP,BP ; Realign stack Pop BP ; Restore BP Ret -Endp FT_RestAtt -Ends _NanFor -End -*/ + Endp FT_RestAtt + Ends _NanFor + End + */ /* This is the New one Rewriten in C */ HB_FUNC( FT_RESTATT ) { HB_SIZE ulLen = hb_parclen( 5 ); + if( ulLen ) { - int iTop = hb_parni( 1 ); /* Defaults to zero on bad type */ - int iLeft = hb_parni( 2 ); /* Defaults to zero on bad type */ - int iMaxRow = hb_gtMaxRow(); - int iMaxCol = hb_gtMaxCol(); - int iBottom = hb_parnidef( 3, iMaxRow ); - int iRight = hb_parnidef( 4, iMaxCol ); - const char * pAttrib = hb_parc( 5 ); + int iTop = hb_parni( 1 ); /* Defaults to zero on bad type */ + int iLeft = hb_parni( 2 ); /* Defaults to zero on bad type */ + int iMaxRow = hb_gtMaxRow(); + int iMaxCol = hb_gtMaxCol(); + int iBottom = hb_parnidef( 3, iMaxRow ); + int iRight = hb_parnidef( 4, iMaxCol ); + const char * pAttrib = hb_parc( 5 ); if( iTop < 0 ) iTop = 0; @@ -338,14 +339,14 @@ HB_FUNC( FT_RESTATT ) if( iTop <= iBottom && iLeft <= iRight ) { - while( ulLen && iTop <= iBottom) + while( ulLen && iTop <= iBottom ) { int iCol = iLeft; while( ulLen && iCol <= iRight ) { - int iColor; - HB_BYTE bAttr; - HB_USHORT usChar; + int iColor; + HB_BYTE bAttr; + HB_USHORT usChar; hb_gtGetChar( iTop, iCol, &iColor, &bAttr, &usChar ); iColor = ( HB_UCHAR ) *pAttrib++; hb_gtPutChar( iTop, iCol, iColor, bAttr, usChar ); diff --git a/harbour/contrib/hbnf/ftisprn.c b/harbour/contrib/hbnf/ftisprn.c index 2a981293d4..b2c0afcb4b 100644 --- a/harbour/contrib/hbnf/ftisprn.c +++ b/harbour/contrib/hbnf/ftisprn.c @@ -48,33 +48,33 @@ * whether to permit this exception to apply to your modifications. * If you do not wish that, delete this exception notice. * -*/ + */ /* File......: isprint.asm -* Author....: Ted Means -* CIS ID....: 73067,3332 -* -* This function is an original work by Ted Means and is placed in the -* public domain. I got the idea from Norm Mongeau, but the code is -* all mine. -* -* Modification history: -* --------------------- -* -* Rev 1.3 16 Jul 1993 00:00:18 GLENN -* Modified for compatibility in protected mode under ExoSpace. Should -* work in real mode as well. -* -* Rev 1.2 15 Aug 1991 23:07:56 GLENN -* Forest Belt proofread/edited/cleaned up doc -* -* Rev 1.1 14 Jun 1991 19:54:38 GLENN -* Minor edit to file header -* -* Rev 1.0 01 Apr 1991 01:03:26 GLENN -* Nanforum Toolkit -* -*/ + * Author....: Ted Means + * CIS ID....: 73067,3332 + * + * This function is an original work by Ted Means and is placed in the + * public domain. I got the idea from Norm Mongeau, but the code is + * all mine. + * + * Modification history: + * --------------------- + * + * Rev 1.3 16 Jul 1993 00:00:18 GLENN + * Modified for compatibility in protected mode under ExoSpace. Should + * work in real mode as well. + * + * Rev 1.2 15 Aug 1991 23:07:56 GLENN + * Forest Belt proofread/edited/cleaned up doc + * + * Rev 1.1 14 Jun 1991 19:54:38 GLENN + * Minor edit to file header + * + * Rev 1.0 01 Apr 1991 01:03:26 GLENN + * Nanforum Toolkit + * + */ #include "hbapi.h" diff --git a/harbour/contrib/hbnf/getenvrn.c b/harbour/contrib/hbnf/getenvrn.c index ac63bad742..159618f01a 100644 --- a/harbour/contrib/hbnf/getenvrn.c +++ b/harbour/contrib/hbnf/getenvrn.c @@ -34,70 +34,70 @@ # include # if defined( HB_OS_DARWIN ) # include -# define environ (*_NSGetEnviron()) -# elif !defined( __WATCOMC__ ) -extern char **environ; +# define environ ( *_NSGetEnviron() ) +# elif ! defined( __WATCOMC__ ) +extern char ** environ; # endif #elif defined( HB_OS_DOS ) -# define environ _environ -extern char **_environ; +# define environ _environ +extern char ** _environ; #elif defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) # include "hbwinuni.h" # include #endif -#define NORETURN 0 -#define CHARTYPE 1 -#define ARRAYTYPE 2 -#define CRLF "\x0D\x0A" +#define NORETURN 0 +#define CHARTYPE 1 +#define ARRAYTYPE 2 +#define CRLF "\x0D\x0A" HB_FUNC( FT_GETE ) { #if defined( HB_OS_DOS ) || defined( HB_OS_UNIX ) { - char *buffer = NULL; - int x; - int buffsize = 0; - int rettype = HB_ISARRAY( 1 ) ? ARRAYTYPE : - ( HB_ISCHAR( 1 ) && HB_ISBYREF( 1 ) ? CHARTYPE : NORETURN ); + char * buffer = NULL; + int x; + int buffsize = 0; + int rettype = HB_ISARRAY( 1 ) ? ARRAYTYPE : + ( HB_ISCHAR( 1 ) && HB_ISBYREF( 1 ) ? CHARTYPE : NORETURN ); /* scan strings first and add up total size */ if( rettype == CHARTYPE ) { - for( x = 0; environ[x]; x++ ) + for( x = 0; environ[ x ]; x++ ) { /* add length of this string plus 2 for the crlf */ - buffsize += ( strlen( environ[x] ) + 2 ); + buffsize += ( strlen( environ[ x ] ) + 2 ); } /* add 1 more byte for final nul character */ buffsize++; /* now allocate that much memory and make sure 1st byte is a nul */ - buffer = ( char * ) hb_xgrab( buffsize + 1 ); - buffer[0] = '\0'; + buffer = ( char * ) hb_xgrab( buffsize + 1 ); + buffer[ 0 ] = '\0'; } - for( x = 0; environ[x]; x++ ) + for( x = 0; environ[ x ]; x++ ) { - if( !environ[x] ) + if( ! environ[ x ] ) /* null string, we're done */ break; if( rettype == CHARTYPE ) { /* tack string onto end of buffer */ - hb_strncat( buffer, environ[x], buffsize ); + hb_strncat( buffer, environ[ x ], buffsize ); /* add crlf at end of each string */ hb_strncat( buffer, CRLF, buffsize ); } else if( rettype == ARRAYTYPE ) /* store string to next array element */ - hb_storvc( environ[x], 1, x + 1 ); + hb_storvc( environ[ x ], 1, x + 1 ); } if( rettype == CHARTYPE ) { /* return buffer to app and free memory */ - if( !hb_storclen_buffer( buffer, strlen( buffer ), 1 ) ) + if( ! hb_storclen_buffer( buffer, strlen( buffer ), 1 ) ) hb_xfree( buffer ); } @@ -106,12 +106,12 @@ HB_FUNC( FT_GETE ) } #elif defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) { - LPTCH lpEnviron = GetEnvironmentStrings(), lpEnv; - LPTSTR lpResult = NULL, lpDst; - HB_SIZE nSize = 0, nCount = 0; - PHB_ITEM pArray = NULL; - int rettype = HB_ISARRAY( 1 ) ? ARRAYTYPE : - ( HB_ISCHAR( 1 ) && HB_ISBYREF( 1 ) ? CHARTYPE : NORETURN ); + LPTCH lpEnviron = GetEnvironmentStrings(), lpEnv; + LPTSTR lpResult = NULL, lpDst; + HB_SIZE nSize = 0, nCount = 0; + PHB_ITEM pArray = NULL; + int rettype = HB_ISARRAY( 1 ) ? ARRAYTYPE : + ( HB_ISCHAR( 1 ) && HB_ISBYREF( 1 ) ? CHARTYPE : NORETURN ); if( lpEnviron ) { @@ -135,7 +135,9 @@ HB_FUNC( FT_GETE ) if( rettype == CHARTYPE ) { do + { *lpDst++ = *lpEnv++; + } while( *lpEnv ); *lpDst++ = '\r'; *lpDst++ = '\n'; @@ -143,7 +145,8 @@ HB_FUNC( FT_GETE ) else if( rettype == ARRAYTYPE ) { nSize = 0; - while( lpEnv[ ++nSize ] ); + while( lpEnv[ ++nSize ] ) + ; HB_ARRAYSETSTRLEN( pArray, nCount, lpEnv, nSize - 1 ); lpEnv += nSize; } @@ -154,7 +157,7 @@ HB_FUNC( FT_GETE ) if( rettype == CHARTYPE ) { PHB_ITEM pItem = HB_ITEMPUTSTRLEN( NULL, lpResult, nSize ); - if( !hb_itemParamStoreRelease( 1, pItem ) ) + if( ! hb_itemParamStoreRelease( 1, pItem ) ) hb_itemRelease( pItem ); hb_xfree( lpResult ); } diff --git a/harbour/contrib/hbnf/getver.c b/harbour/contrib/hbnf/getver.c index 25f95d063e..07147ae97d 100644 --- a/harbour/contrib/hbnf/getver.c +++ b/harbour/contrib/hbnf/getver.c @@ -49,7 +49,7 @@ * whether to permit this exception to apply to your modifications. * If you do not wish that, delete this exception notice. * -*/ + */ #include "hbapi.h" #include "hbapiitm.h" @@ -63,11 +63,11 @@ HB_FUNC( _GET_DOSVER ) { #if defined( HB_OS_DOS ) { - char * pszPlatform; - union REGS regs; + char * pszPlatform; + union REGS regs; pszPlatform = ( char * ) hb_xgrab( 256 ); - regs.h.ah = 0x30; + regs.h.ah = 0x30; HB_DOS_INT86( 0x21, ®s, ®s ); hb_snprintf( pszPlatform, 256, "%d.%02d", regs.h.al, regs.h.ah ); @@ -80,13 +80,14 @@ HB_FUNC( _GET_DOSVER ) HB_FUNC( _FT_ISSHARE ) { int iShare; + #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0x1000; - regs.HB_XREGS.cx = 0; + regs.HB_XREGS.ax = 0x1000; + regs.HB_XREGS.cx = 0; HB_DOS_INT86( 0x2F, ®s, ®s ); - iShare = regs.h.al; + iShare = regs.h.al; } #else { @@ -99,12 +100,13 @@ HB_FUNC( _FT_ISSHARE ) HB_FUNC( _FT_NWKSTAT ) { int iConnect; + #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0xDC; + regs.HB_XREGS.ax = 0xDC; HB_DOS_INT86( 0x2F, ®s, ®s ); - iConnect = regs.h.al; + iConnect = regs.h.al; } #else { @@ -119,8 +121,8 @@ HB_FUNC( _FT_SETMODE ) #if defined( HB_OS_DOS ) { union REGS regs; - regs.h.ah = 0; - regs.h.al = hb_parni( 1 ); + regs.h.ah = 0; + regs.h.al = hb_parni( 1 ); HB_DOS_INT86( 0x10, ®s, ®s ); } #endif @@ -129,12 +131,13 @@ HB_FUNC( _FT_SETMODE ) HB_FUNC( _FT_GETMODE ) { int iMode; + #if defined( HB_OS_DOS ) { union REGS regs; - regs.h.ah = 0x0F; + regs.h.ah = 0x0F; HB_DOS_INT86( 0x10, ®s, ®s ); - iMode = regs.h.al; + iMode = regs.h.al; } #else { @@ -146,30 +149,30 @@ HB_FUNC( _FT_GETMODE ) HB_FUNC( _FT_TEMPFIL ) { - int nax; - int iflags; - const char * cPath; + int nax; + int iflags; + const char * cPath; -#if defined( HB_OS_DOS ) && !defined( HB_OS_DOS_32 ) +#if defined( HB_OS_DOS ) && ! defined( HB_OS_DOS_32 ) { - int iMode = hb_parni( 2 ); - union REGS regs; - struct SREGS sregs; + int iMode = hb_parni( 2 ); + union REGS regs; + struct SREGS sregs; segread( &sregs ); - cPath = hb_parcx( 1 ); - regs.h.ah = 0x5A; - regs.HB_XREGS.cx = iMode; - sregs.ds = FP_SEG( cPath ); - regs.HB_XREGS.dx = FP_OFF( cPath ); + cPath = hb_parcx( 1 ); + regs.h.ah = 0x5A; + regs.HB_XREGS.cx = iMode; + sregs.ds = FP_SEG( cPath ); + regs.HB_XREGS.dx = FP_OFF( cPath ); HB_DOS_INT86X( 0x21, ®s, ®s, &sregs ); - nax = regs.HB_XREGS.ax; - iflags = regs.HB_XREGS.flags; + nax = regs.HB_XREGS.ax; + iflags = regs.HB_XREGS.flags; } #else { - nax = 0; - iflags = 0; - cPath = hb_parcx( 1 ); + nax = 0; + iflags = 0; + cPath = hb_parcx( 1 ); } #endif { diff --git a/harbour/contrib/hbnf/getvid.c b/harbour/contrib/hbnf/getvid.c index f974194cf7..0c03478e68 100644 --- a/harbour/contrib/hbnf/getvid.c +++ b/harbour/contrib/hbnf/getvid.c @@ -49,7 +49,7 @@ * whether to permit this exception to apply to your modifications. * If you do not wish that, delete this exception notice. * -*/ + */ #include "hbapi.h" #if defined( HB_OS_DOS ) @@ -65,7 +65,7 @@ HB_FUNC( _FT_GETVPG ) union REGS registers; registers.h.ah = 0x0F; HB_DOS_INT86( 0x10, ®isters, ®isters ); - iPage = registers.h.bh; + iPage = registers.h.bh; } #else { @@ -80,9 +80,9 @@ HB_FUNC( _V_SETVPG ) { #if defined( HB_OS_DOS ) { - int iPage; - union REGS registers; - iPage = hb_parni( 1 ); + int iPage; + union REGS registers; + iPage = hb_parni( 1 ); registers.h.ah = 0x05; registers.h.al = iPage; HB_DOS_INT86( 0x10, ®isters, ®isters ); diff --git a/harbour/contrib/hbnf/iamidle.c b/harbour/contrib/hbnf/iamidle.c index f261c10ad7..89b27da5c9 100644 --- a/harbour/contrib/hbnf/iamidle.c +++ b/harbour/contrib/hbnf/iamidle.c @@ -48,23 +48,23 @@ * whether to permit this exception to apply to your modifications. * If you do not wish that, delete this exception notice. * -*/ + */ /* -* File......: adapter.asm -* Author....: Ted Means -* CIS ID....: 73067,3332 -* -* This is an original work by Ted Means and is placed in the -* public domain. -* -* Modification history: -* --------------------- -* -* Rev 1.0 01 Jan 1995 03:01:00 TED -* Nanforum Toolkit -* -*/ + * File......: adapter.asm + * Author....: Ted Means + * CIS ID....: 73067,3332 + * + * This is an original work by Ted Means and is placed in the + * public domain. + * + * Modification history: + * --------------------- + * + * Rev 1.0 01 Jan 1995 03:01:00 TED + * Nanforum Toolkit + * + */ #include "hbapi.h" diff --git a/harbour/contrib/hbnf/kspeed.c b/harbour/contrib/hbnf/kspeed.c index 15d2951463..4453e1b98e 100644 --- a/harbour/contrib/hbnf/kspeed.c +++ b/harbour/contrib/hbnf/kspeed.c @@ -3,37 +3,37 @@ */ /* -* File......: kspeed.asm -* Author....: James R. Zack -* CIS ID....: 75410,1567 -* -* This is an original work by James R. Zack and is placed in the -* public domain. -* -* Modification history: -* --------------------- -* -* Rev 1.2 15 Aug 1991 23:06:54 GLENN -* Forest Belt proofread/edited/cleaned up doc -* -* Rev 1.1 14 Jun 1991 19:54:40 GLENN -* Minor edit to file header -* -* Rev 1.0 01 Apr 1991 01:03:28 GLENN -* Nanforum Toolkit -* -*/ + * File......: kspeed.asm + * Author....: James R. Zack + * CIS ID....: 75410,1567 + * + * This is an original work by James R. Zack and is placed in the + * public domain. + * + * Modification history: + * --------------------- + * + * Rev 1.2 15 Aug 1991 23:06:54 GLENN + * Forest Belt proofread/edited/cleaned up doc + * + * Rev 1.1 14 Jun 1991 19:54:40 GLENN + * Minor edit to file header + * + * Rev 1.0 01 Apr 1991 01:03:28 GLENN + * Nanforum Toolkit + * + */ /*This is the Original FT_SETRATE() code -PUBLIC FT_SETRATE * MAKE ROUTINE VISIBLE + PUBLIC FT_SETRATE * MAKE ROUTINE VISIBLE -EXTRN __PARNI:FAR * DECLARE EXTERNALS -EXTRN __RET:FAR -EXTRN __PARINFO:FAR + EXTRN __PARNI:FAR * DECLARE EXTERNALS + EXTRN __RET:FAR + EXTRN __PARINFO:FAR -_NANFOR SEGMENT 'CODE' + _NANFOR SEGMENT 'CODE' ASSUME CS:_NANFOR * POINT CS TO MY CODE -FT_SETRATE PROC FAR + FT_SETRATE PROC FAR PUSH BP * SAVE BASE POINTER MOV BP,SP * POINT TO TOP OF STACK PUSH DS * SAVE REGISTERS @@ -47,9 +47,9 @@ FT_SETRATE PROC FAR CMP AX,2 * WERE BOTH PARMS PASSED? JL DEFAULTS * NO, USE DEFAULTS JMP GETPARMS * OTHERWISE, LETS GET SOME PARAMS. -DEFAULTS: MOV BX,010CH * SET UP DEFAULTS (for AT) + DEFAULTS: MOV BX,010CH * SET UP DEFAULTS (for AT) jmp goodparm * and make the int call. -getparms: mov ax,01h * First param is repeat rate + getparms: mov ax,01h * First param is repeat rate push ax * Set up for __PARNI call __PARNI * Get first param add sp,2 * Adjust stack @@ -63,19 +63,19 @@ getparms: mov ax,01h * First param is repeat rate mov bh,al * Put delay into BH cmp bh,04h * Is BH > 04h (max value) jg defaults * Yes, then use defaults -goodparm: mov ax,0305h * BIOS Function 03 Subfunction 05 + goodparm: mov ax,0305h * BIOS Function 03 Subfunction 05 int 16h * Set Typematic Rate and Delay -exit: pop di * Retore registers + exit: pop di * Retore registers pop si pop es pop ds pop bp call __RET * Clean up for Clipper ret * Pass control back to Clipper -FT_SETRATE ENDP -_NanFor ENDS + FT_SETRATE ENDP + _NanFor ENDS END -*/ + */ /* This is the New one Rewriten in C*/ @@ -88,23 +88,23 @@ HB_FUNC( FT_SETRATE ) { #if defined( HB_OS_DOS ) { - union REGS registers; - int tempo = 0, nrepete = 0; + union REGS registers; + int tempo = 0, nrepete = 0; switch( hb_pcount() ) { - case 0: - tempo = 0; - nrepete = 0; - break; - case 1: - tempo = hb_parni( 1 ); - nrepete = 0; - break; - case 2: - tempo = hb_parni( 1 ); - nrepete = hb_parni( 2 ); - break; + case 0: + tempo = 0; + nrepete = 0; + break; + case 1: + tempo = hb_parni( 1 ); + nrepete = 0; + break; + case 2: + tempo = hb_parni( 1 ); + nrepete = hb_parni( 2 ); + break; } registers.h.ah = 0x03; diff --git a/harbour/contrib/hbnf/mkdir.c b/harbour/contrib/hbnf/mkdir.c index 6dc321dca2..559599885f 100644 --- a/harbour/contrib/hbnf/mkdir.c +++ b/harbour/contrib/hbnf/mkdir.c @@ -3,49 +3,49 @@ */ /* -; File......: mkdir.asm -; Author....: Ted Means -; CIS ID....: 73067,3332 -; -; This is an original work by Ted Means and is placed in the -; public domain. -; -; Modification history: -; --------------------- -; -; Rev 1.2 15 Aug 1991 23:06:58 GLENN -; Forest Belt proofread/edited/cleaned up doc -; -; Rev 1.1 14 Jun 1991 19:54:44 GLENN -; Minor edit to file header -; -; Rev 1.0 01 Apr 1991 01:03:32 GLENN -; Nanforum Toolkit -; -; -*/ + ; File......: mkdir.asm + ; Author....: Ted Means + ; CIS ID....: 73067,3332 + ; + ; This is an original work by Ted Means and is placed in the + ; public domain. + ; + ; Modification history: + ; --------------------- + ; + ; Rev 1.2 15 Aug 1991 23:06:58 GLENN + ; Forest Belt proofread/edited/cleaned up doc + ; + ; Rev 1.1 14 Jun 1991 19:54:44 GLENN + ; Minor edit to file header + ; + ; Rev 1.0 01 Apr 1991 01:03:32 GLENN + ; Nanforum Toolkit + ; + ; + */ /*This is the Original FT_CHDIR() code -IDEAL -MODEL HUGE -Public _HB_FUN_FT_MKDIR + IDEAL + MODEL HUGE + Public _HB_FUN_FT_MKDIR -Extrn _hb_ftdir:Far + Extrn _hb_ftdir:Far -Segment _NanFor Word Public "CODE" + Segment _NanFor Word Public "CODE" Assume CS:_NanFor -Proc _HB_FUN_FT_MKDIR Far + Proc _HB_FUN_FT_MKDIR Far Mov AH,39h * DOS service--create directory Push AX * Save on stack Call _hb_ftdir * Call generic directory routine Add SP,2 * Realign stack Ret -Endp _HB_FUN_FT_MKDIR -Ends _NanFor -End -*/ + Endp _HB_FUN_FT_MKDIR + Ends _NanFor + End + */ /* This is the New one Rewriten in C*/ diff --git a/harbour/contrib/hbnf/mouse.c b/harbour/contrib/hbnf/mouse.c index a53cc34fb7..bd9a6f835f 100644 --- a/harbour/contrib/hbnf/mouse.c +++ b/harbour/contrib/hbnf/mouse.c @@ -49,7 +49,7 @@ * whether to permit this exception to apply to your modifications. * If you do not wish that, delete this exception notice. * -*/ + */ #include "hbapi.h" #if defined( HB_OS_DOS ) @@ -61,12 +61,13 @@ HB_FUNC( _MGET_PAGE ) { int iPage; + #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0x1E; + regs.HB_XREGS.ax = 0x1E; HB_DOS_INT86( 0x33, ®s, ®s ); - iPage = regs.HB_XREGS.bx; + iPage = regs.HB_XREGS.bx; } #else { @@ -81,8 +82,8 @@ HB_FUNC( _MSET_PAGE ) #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0x1D; - regs.HB_XREGS.bx = hb_parni( 1 ); + regs.HB_XREGS.ax = 0x1D; + regs.HB_XREGS.bx = hb_parni( 1 ); HB_DOS_INT86( 0x33, ®s, ®s ); } #endif @@ -90,29 +91,29 @@ HB_FUNC( _MSET_PAGE ) HB_FUNC( _MGET_MVERSION ) { - int iMinor; - int iType; - int iIRQ; - int iMajor; + int iMinor; + int iType; + int iIRQ; + int iMajor; #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0x24; + regs.HB_XREGS.ax = 0x24; HB_DOS_INT86( 0x33, ®s, ®s ); - iMinor = regs.h.bl; - iType = regs.h.ch; - iIRQ = regs.h.cl; - iMajor = regs.h.bh; + iMinor = regs.h.bl; + iType = regs.h.ch; + iIRQ = regs.h.cl; + iMajor = regs.h.bh; } #else { - iMinor = 0; - iType = 0; - iIRQ = 0; - iMajor = 0; + iMinor = 0; + iType = 0; + iIRQ = 0; + iMajor = 0; } #endif @@ -135,9 +136,9 @@ HB_FUNC( _MGET_HORISPEED ) #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0x1B; + regs.HB_XREGS.ax = 0x1B; HB_DOS_INT86( 0x33, ®s, ®s ); - iSpeed = regs.HB_XREGS.bx; + iSpeed = regs.HB_XREGS.bx; } #else { @@ -150,12 +151,13 @@ HB_FUNC( _MGET_HORISPEED ) HB_FUNC( _MGET_VERSPEED ) { int iSpeed; + #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0x1B; + regs.HB_XREGS.ax = 0x1B; HB_DOS_INT86( 0x33, ®s, ®s ); - iSpeed = regs.HB_XREGS.cx; + iSpeed = regs.HB_XREGS.cx; } #else { @@ -168,12 +170,13 @@ HB_FUNC( _MGET_VERSPEED ) HB_FUNC( _MGET_DOUBLESPEED ) { int iSpeed; + #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0x1B; + regs.HB_XREGS.ax = 0x1B; HB_DOS_INT86( 0x33, ®s, ®s ); - iSpeed = regs.HB_XREGS.dx; + iSpeed = regs.HB_XREGS.dx; } #else { @@ -188,10 +191,10 @@ HB_FUNC( _MSET_SENSITIVE ) /* nHoriz,nVert,nDouble) */ #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0x1A; - regs.HB_XREGS.bx = hb_parni( 1 ); - regs.HB_XREGS.cx = hb_parni( 2 ); - regs.HB_XREGS.dx = hb_parni( 3 ); + regs.HB_XREGS.ax = 0x1A; + regs.HB_XREGS.bx = hb_parni( 1 ); + regs.HB_XREGS.cx = hb_parni( 2 ); + regs.HB_XREGS.dx = hb_parni( 3 ); HB_DOS_INT86( 0x33, ®s, ®s ); } #endif @@ -202,11 +205,11 @@ HB_FUNC( _MSE_CONOFF ) /* nTop*8,nLeft*8,nBotton*8,nRight*8) */ #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0x1A; - regs.HB_XREGS.cx = hb_parni( 2 ); - regs.HB_XREGS.dx = hb_parni( 1 ); - regs.HB_XREGS.si = hb_parni( 4 ); - regs.HB_XREGS.di = hb_parni( 3 ); + regs.HB_XREGS.ax = 0x1A; + regs.HB_XREGS.cx = hb_parni( 2 ); + regs.HB_XREGS.dx = hb_parni( 1 ); + regs.HB_XREGS.si = hb_parni( 4 ); + regs.HB_XREGS.di = hb_parni( 3 ); HB_DOS_INT86( 0x33, ®s, ®s ); } #endif @@ -214,15 +217,16 @@ HB_FUNC( _MSE_CONOFF ) /* nTop*8,nLeft*8,nBotton*8,nRight*8) */ HB_FUNC( _MGET_MICS ) { - int iHori; - int iVert; + int iHori; + int iVert; + #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0x0B; + regs.HB_XREGS.ax = 0x0B; HB_DOS_INT86( 0x33, ®s, ®s ); - iHori = regs.HB_XREGS.cx; - iVert = regs.HB_XREGS.dx; + iHori = regs.HB_XREGS.cx; + iVert = regs.HB_XREGS.dx; } #else { @@ -243,12 +247,13 @@ HB_FUNC( _MGET_MICS ) HB_FUNC( _M_RESET ) { int iMouse; + #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0; + regs.HB_XREGS.ax = 0; HB_DOS_INT86( 0x33, ®s, ®s ); - iMouse = regs.HB_XREGS.ax; + iMouse = regs.HB_XREGS.ax; } #else { @@ -284,15 +289,16 @@ HB_FUNC( _MSE_MHIDECRS ) HB_FUNC( _MSE_GETPOS ) { - int iHori; - int iVert; + int iHori; + int iVert; + #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 3; + regs.HB_XREGS.ax = 3; HB_DOS_INT86( 0x33, ®s, ®s ); - iHori = regs.HB_XREGS.cx; - iVert = regs.HB_XREGS.dx; + iHori = regs.HB_XREGS.cx; + iVert = regs.HB_XREGS.dx; } #else { @@ -313,12 +319,13 @@ HB_FUNC( _MSE_GETPOS ) HB_FUNC( _M_GETX ) { int iRow; + #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 3; + regs.HB_XREGS.ax = 3; HB_DOS_INT86( 0x33, ®s, ®s ); - iRow = regs.HB_XREGS.dx; + iRow = regs.HB_XREGS.dx; } #else { @@ -331,12 +338,13 @@ HB_FUNC( _M_GETX ) HB_FUNC( _M_GETY ) { int iCol; + #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 3; + regs.HB_XREGS.ax = 3; HB_DOS_INT86( 0x33, ®s, ®s ); - iCol = regs.HB_XREGS.cx; + iCol = regs.HB_XREGS.cx; } #else { @@ -351,9 +359,9 @@ HB_FUNC( _M_MSETPOS ) #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 4; - regs.HB_XREGS.cx = hb_parni( 1 ); - regs.HB_XREGS.dx = hb_parni( 2 ); + regs.HB_XREGS.ax = 4; + regs.HB_XREGS.cx = hb_parni( 1 ); + regs.HB_XREGS.dx = hb_parni( 2 ); HB_DOS_INT86( 0x33, ®s, ®s ); } #endif @@ -364,9 +372,9 @@ HB_FUNC( _M_MSETCOORD ) #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 4; - regs.HB_XREGS.cx = hb_parni( 1 ); - regs.HB_XREGS.dx = hb_parni( 2 ); + regs.HB_XREGS.ax = 4; + regs.HB_XREGS.cx = hb_parni( 1 ); + regs.HB_XREGS.dx = hb_parni( 2 ); HB_DOS_INT86( 0x33, ®s, ®s ); } #endif @@ -376,13 +384,13 @@ HB_FUNC( _M_MXLIMIT ) { #if defined( HB_OS_DOS ) { - union REGS regs; - int iMaxRow = hb_parni( 2 ); - int iMinRow = hb_parni( 1 ); + union REGS regs; + int iMaxRow = hb_parni( 2 ); + int iMinRow = hb_parni( 1 ); - regs.HB_XREGS.ax = 7; - regs.HB_XREGS.cx = iMinRow; - regs.HB_XREGS.dx = iMaxRow; + regs.HB_XREGS.ax = 7; + regs.HB_XREGS.cx = iMinRow; + regs.HB_XREGS.dx = iMaxRow; HB_DOS_INT86( 0x33, ®s, ®s ); } @@ -393,13 +401,13 @@ HB_FUNC( _M_MYLIMIT ) { #if defined( HB_OS_DOS ) { - union REGS regs; - int iMaxCol = hb_parni( 2 ); - int iMinCol = hb_parni( 1 ); - regs.HB_XREGS.ax = 8; + union REGS regs; + int iMaxCol = hb_parni( 2 ); + int iMinCol = hb_parni( 1 ); + regs.HB_XREGS.ax = 8; - regs.HB_XREGS.cx = iMinCol; - regs.HB_XREGS.dx = iMaxCol; + regs.HB_XREGS.cx = iMinCol; + regs.HB_XREGS.dx = iMaxCol; HB_DOS_INT86( 0x33, ®s, ®s ); } #endif @@ -407,28 +415,29 @@ HB_FUNC( _M_MYLIMIT ) HB_FUNC( _M_MBUTPRS ) { - int inX; - int inY; - int inButton; - int lStatus; + int inX; + int inY; + int inButton; + int lStatus; + #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 6; - regs.HB_XREGS.bx = hb_parni( 1 ); + regs.HB_XREGS.ax = 6; + regs.HB_XREGS.bx = hb_parni( 1 ); HB_DOS_INT86( 0x33, ®s, ®s ); - inY = regs.HB_XREGS.cx; - inX = regs.HB_XREGS.dx; - inButton = regs.HB_XREGS.bx; - lStatus = regs.HB_XREGS.ax; + inY = regs.HB_XREGS.cx; + inX = regs.HB_XREGS.dx; + inButton = regs.HB_XREGS.bx; + lStatus = regs.HB_XREGS.ax; } #else { - inY = 0; - inX = 0; + inY = 0; + inX = 0; inButton = 0; - lStatus = 0; + lStatus = 0; } #endif { @@ -447,8 +456,8 @@ HB_FUNC( _M_MBUTREL ) { #if defined( HB_OS_DOS ) union REGS regs; - regs.HB_XREGS.ax = 0x0A; - regs.HB_XREGS.bx = hb_parni( 1 ); + regs.HB_XREGS.ax = 0x0A; + regs.HB_XREGS.bx = hb_parni( 1 ); HB_DOS_INT86( 0x33, ®s, ®s ); @@ -471,10 +480,10 @@ HB_FUNC( _M_MDEFCRS ) #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 0x0A; - regs.HB_XREGS.bx = hb_parni( 1 ); - regs.HB_XREGS.cx = hb_parni( 2 ); - regs.HB_XREGS.dx = hb_parni( 3 ); + regs.HB_XREGS.ax = 0x0A; + regs.HB_XREGS.bx = hb_parni( 1 ); + regs.HB_XREGS.cx = hb_parni( 2 ); + regs.HB_XREGS.dx = hb_parni( 3 ); HB_DOS_INT86( 0x33, ®s, ®s ); } @@ -483,24 +492,24 @@ HB_FUNC( _M_MDEFCRS ) HB_FUNC( _M_MGETCOORD ) { - int inX; - int inY; - int inButton; + int inX; + int inY; + int inButton; #if defined( HB_OS_DOS ) { union REGS regs; - regs.HB_XREGS.ax = 3; + regs.HB_XREGS.ax = 3; HB_DOS_INT86( 0x33, ®s, ®s ); - inButton = regs.HB_XREGS.bx; - inY = regs.HB_XREGS.cx; - inX = regs.HB_XREGS.dx; + inButton = regs.HB_XREGS.bx; + inY = regs.HB_XREGS.cx; + inX = regs.HB_XREGS.dx; } #else { - inX = 0; - inY = 0; + inX = 0; + inY = 0; inButton = 0; } #endif diff --git a/harbour/contrib/hbnf/numlock.c b/harbour/contrib/hbnf/numlock.c index 40a38dcc78..7e2e1afec0 100644 --- a/harbour/contrib/hbnf/numlock.c +++ b/harbour/contrib/hbnf/numlock.c @@ -34,22 +34,22 @@ HB_FUNC( FT_NUMLOCK ) { - int iState = 0, iNewState; - HB_GT_INFO gtInfo; + int iState = 0, iNewState; + HB_GT_INFO gtInfo; memset( >Info, 0, sizeof( gtInfo ) ); hb_gtInfo( HB_GTI_KBDSHIFTS, >Info ); if( gtInfo.pResult ) { - iState = hb_itemGetNI( gtInfo.pResult ); + iState = hb_itemGetNI( gtInfo.pResult ); gtInfo.pNewVal = gtInfo.pResult; gtInfo.pResult = NULL; } if( HB_ISLOG( 1 ) ) { - iNewState = hb_parl( 1 ) ? ( iState | HB_GTI_KBD_NUMLOCK ) : - ( iState & ~HB_GTI_KBD_NUMLOCK ); + iNewState = hb_parl( 1 ) ? ( iState | HB_GTI_KBD_NUMLOCK ) : + ( iState & ~HB_GTI_KBD_NUMLOCK ); gtInfo.pNewVal = hb_itemPutNI( gtInfo.pNewVal, iNewState ); hb_gtInfo( HB_GTI_KBDSHIFTS, >Info ); } diff --git a/harbour/contrib/hbnf/peek.c b/harbour/contrib/hbnf/peek.c index 659ca7d225..ef54c7c5a2 100644 --- a/harbour/contrib/hbnf/peek.c +++ b/harbour/contrib/hbnf/peek.c @@ -54,11 +54,11 @@ HB_FUNC( FT_PEEK ) goto Bogus; } - _retni( ( int ) *bytePtr ); + hb_retni( ( int ) *bytePtr ); if( ProtMode ) hb_cpmiFreeSelector( FP_SEG( bytePtr ) ); } else - Bogus: hb_retni( -1 ); + Bogus: hb_retni( -1 ); } diff --git a/harbour/contrib/hbnf/poke.c b/harbour/contrib/hbnf/poke.c index eeb6ec3f54..19604e4bf1 100644 --- a/harbour/contrib/hbnf/poke.c +++ b/harbour/contrib/hbnf/poke.c @@ -62,5 +62,5 @@ HB_FUNC( FT_POKE ) hb_retl( HB_TRUE ); } else - Bogus: hb_retl( HB_FALSE ); + Bogus: hb_retl( HB_FALSE ); } diff --git a/harbour/contrib/hbnf/putkey.c b/harbour/contrib/hbnf/putkey.c index 41d1e7cb46..95439341aa 100644 --- a/harbour/contrib/hbnf/putkey.c +++ b/harbour/contrib/hbnf/putkey.c @@ -3,49 +3,49 @@ */ /* -* File......: putkey.asm -* Author....: Ted Means -* CIS ID....: 73067,3332 -* -* This is an original work by Ted Means and is placed in the -* public domain. -* -* Modification history: -* --------------------- -* -* Rev 1.4 16 Oct 1992 00:00:56 GLENN -* Just making sure we have Ted's latest revisions. -* -* Rev 1.3 01 Jul 1992 01:07:02 GLENN -* putkey.asm now bypasses the BIOS completely and uses Clipper's -* internal event handler to stuff the keystroke. Modifications by -* Ted Means. -* -* Rev 1.2 15 Aug 1991 23:07:10 GLENN -* Forest Belt proofread/edited/cleaned up doc -* -* Rev 1.1 14 Jun 1991 19:54:56 GLENN -* Minor edit to file header -* -* Rev 1.0 01 Apr 1991 01:03:48 GLENN -* Nanforum Toolkit -*/ + * File......: putkey.asm + * Author....: Ted Means + * CIS ID....: 73067,3332 + * + * This is an original work by Ted Means and is placed in the + * public domain. + * + * Modification history: + * --------------------- + * + * Rev 1.4 16 Oct 1992 00:00:56 GLENN + * Just making sure we have Ted's latest revisions. + * + * Rev 1.3 01 Jul 1992 01:07:02 GLENN + * putkey.asm now bypasses the BIOS completely and uses Clipper's + * internal event handler to stuff the keystroke. Modifications by + * Ted Means. + * + * Rev 1.2 15 Aug 1991 23:07:10 GLENN + * Forest Belt proofread/edited/cleaned up doc + * + * Rev 1.1 14 Jun 1991 19:54:56 GLENN + * Minor edit to file header + * + * Rev 1.0 01 Apr 1991 01:03:48 GLENN + * Nanforum Toolkit + */ /*This is the Original FT_PUTKEY() code -IDEAL + IDEAL -Public FT_PutKey + Public FT_PutKey -Extrn __ParInfo:Far -Extrn __Parni:Far -Extrn __RetL:Far -Extrn __evLow:Far ; Internal!! Sniveling cowards + Extrn __ParInfo:Far + Extrn __Parni:Far + Extrn __RetL:Far + Extrn __evLow:Far ; Internal!! Sniveling cowards ; beware! -Segment _NanFor Word Public "CODE" + Segment _NanFor Word Public "CODE" Assume CS:_NanFor -Proc FT_PutKey Far + Proc FT_PutKey Far Xor AX,AX ; Prepare to count params Push AX ; Save on stack @@ -55,16 +55,16 @@ Proc FT_PutKey Far JNZ Test1 ; If not, continue Jmp Done ; Return value = false, go to end -Test1: Mov AX,1 ; Prepare to check parameter #1 + Test1: Mov AX,1 ; Prepare to check parameter #1 Push AX ; Save parameter # on stack Call __ParInfo ; Call parameter info routine Add SP,2 ; Realign stack Test AX,2 ; Is parameter numeric? JNZ Get1 ; If so, continue -BadParam:Xor AX,AX ; Set return value to false + BadParam:Xor AX,AX ; Set return value to false Jmp Done ; Go to end -Get1: Mov AX,1 ; Prepare to retrieve parameter #1 + Get1: Mov AX,1 ; Prepare to retrieve parameter #1 Push AX ; Save parameter # on stack Call __ParNI ; Retrieve parameter Add SP,2 ; Realign stack @@ -74,7 +74,7 @@ Get1: Mov AX,1 ; Prepare to retrieve parameter #1 Cmp AX,-39 ; Test lowest INKEY() JL BadParam ; Bad INKEY() value -CtrlF1: Mov CL,0 ; Set ASCII value to null + CtrlF1: Mov CL,0 ; Set ASCII value to null Cmp AX,-10 ; Is Ctrl F1 thru Alt F10? JG F2 ; If not, check next range Neg AX ; Get absolute value of AX @@ -82,90 +82,90 @@ CtrlF1: Mov CL,0 ; Set ASCII value to null Mov CH,AL ; Move scan code to CH Jmp StuffIt ; Stuff the keystroke -F2: Or AX,AX ; See if key is F2 thru F10 + F2: Or AX,AX ; See if key is F2 thru F10 JNS F1 ; If not, check next range Neg AX ; Get absolute value of AX Add AL,59 ; Translate INKEY() to scan code Mov CH,AL ; Move scan code to CH Jmp StuffIt ; Stuff the keystroke -F1: Cmp AX,28 ; See if key is F1 + F1: Cmp AX,28 ; See if key is F1 JNE CtrlF ; If not, check next key Mov CH,59 ; Supply scan code for F1 Jmp StuffIt ; Stuff the keystroke -CtrlF: Cmp AX,6 ; See if key is Ctrl F or End + CtrlF: Cmp AX,6 ; See if key is Ctrl F or End JNE CtrlW ; If not, check next key Mov CH,79 ; Supply scan code for End Jmp StuffIt ; Stuff the keystroke -CtrlW: Cmp AX,23 ; See if key is Ctrl W or Ctrl End + CtrlW: Cmp AX,23 ; See if key is Ctrl W or Ctrl End JNE CtrlHome ; If not, check next key Mov CH,117 ; Supply scan code for Ctrl End Jmp StuffIt ; Stuff the keystroke -CtrlHome:Cmp AX,29 ; See if key is Ctrl Home or Ctrl] + CtrlHome:Cmp AX,29 ; See if key is Ctrl Home or Ctrl] JNE CtrlV ; If not, check next key Mov CH,119 ; Supply scan code for Ctrl Home Jmp StuffIt ; Stuff the keystroke -CtrlV: Cmp AX,22 ; See if key is Ins or Ctrl V + CtrlV: Cmp AX,22 ; See if key is Ins or Ctrl V JNE ShiftTab ; If not, check next key Mov CH,82 ; Supply scan code for Ctrl V Jmp StuffIt ; Stuff the keystroke -ShiftTab:Cmp AX,271 ; See if key is Shift Tab + ShiftTab:Cmp AX,271 ; See if key is Shift Tab JNE CtrlPgDn ; If not, check next key Mov CH,15 ; Supply scan code for Shift Tab Jmp StuffIt ; Stuff the keystroke -CtrlPgDn:Cmp AX,30 ; See if key is Ctrl PgDn + CtrlPgDn:Cmp AX,30 ; See if key is Ctrl PgDn JNE CtrlPgUp ; If not, check next key Mov CH,118 ; Supply scan code for Ctrl PgDn Jmp StuffIt ; Stuff the keystroke -CtrlPgUp:Cmp AX,31 ; See if key is Ctrl PgUp + CtrlPgUp:Cmp AX,31 ; See if key is Ctrl PgUp JNE AltQ ; If not, check next key Mov CH,132 ; Supply scan code for Ctrl PgUp Jmp StuffIt ; Stuff the keystroke -AltQ: Cmp AX,272 ; See if key is Alt Q . . . + AltQ: Cmp AX,272 ; See if key is Alt Q . . . JL ASCII Cmp AX,281 ; . . . thru Alt P JG AltA Mov CH,AL Jmp StuffIt -AltA: Cmp AX,286 ; See if key is Alt A . . . + AltA: Cmp AX,286 ; See if key is Alt A . . . JNL AltL Jmp BadParam -AltL: Cmp AX,294 ; . . . thru Alt L + AltL: Cmp AX,294 ; . . . thru Alt L JG AltZ Mov CH,AL Jmp StuffIt -AltZ: Cmp AX,300 ; See if key is Alt Z . . . + AltZ: Cmp AX,300 ; See if key is Alt Z . . . JNL AltM Jmp BadParam -AltM: Cmp AX,306 ; . . . thru Alt M + AltM: Cmp AX,306 ; . . . thru Alt M JG Alt1 Mov CH,AL Mov CL,0 Jmp StuffIt -Alt1: Cmp AX,376 ; See if key is Alt 1 . . . + Alt1: Cmp AX,376 ; See if key is Alt 1 . . . JNL AltNum Jmp BadParam -AltNum: Mov CH,AL + AltNum: Mov CH,AL Mov CL,0 Jmp StuffIt -ASCII: Or AH,AH ; See if key is plain ASCII + ASCII: Or AH,AH ; See if key is plain ASCII JZ Okay Jmp BadParam -Okay: Mov CX,AX + Okay: Mov CX,AX -StuffIt: Push BP ; Save BP + StuffIt: Push BP ; Save BP Mov BP,SP ; Set up stack reference Sub SP,10 ; Allocate local structure Mov [Word Ptr BP - 10],5 ; Choose keystroke event @@ -184,14 +184,14 @@ StuffIt: Push BP ; Save BP Mov SP,BP ; Restore stack alignment Pop BP ; Restore BP -Done: Push AX ; Save return value on stack + Done: Push AX ; Save return value on stack Call __RetL ; Return it to Clipper app Add SP,2 ; Realign stack Ret -Endp FT_PutKey -Ends _NanFor -End -*/ + Endp FT_PutKey + Ends _NanFor + End + */ /* This is the New one Rewriten in C*/ @@ -204,7 +204,7 @@ HB_FUNC( FT_PUTKEY ) if( HB_ISNUM( 1 ) ) { - int iKey = hb_parni(1); + int iKey = hb_parni( 1 ); if( iKey >= -39 && iKey <= 385 ) { diff --git a/harbour/contrib/hbnf/rmdir.c b/harbour/contrib/hbnf/rmdir.c index 19ef6bdf74..b96a13428b 100644 --- a/harbour/contrib/hbnf/rmdir.c +++ b/harbour/contrib/hbnf/rmdir.c @@ -3,48 +3,48 @@ */ /* -* File......: rmdir.asm -* Author....: Ted Means -* CIS ID....: 73067,3332 -* -* This function is an original work by Ted Means and is placed in the -* public domain. -* -* Modification history: -* --------------------- -* -* Rev 1.2 15 Aug 1991 23:07:12 GLENN -* Forest Belt proofread/edited/cleaned up doc -* -* Rev 1.1 14 Jun 1991 19:54:58 GLENN -* Minor edit to file header -* -* Rev 1.0 01 Apr 1991 01:03:52 GLENN -* Nanforum Toolkit -* -*/ + * File......: rmdir.asm + * Author....: Ted Means + * CIS ID....: 73067,3332 + * + * This function is an original work by Ted Means and is placed in the + * public domain. + * + * Modification history: + * --------------------- + * + * Rev 1.2 15 Aug 1991 23:07:12 GLENN + * Forest Belt proofread/edited/cleaned up doc + * + * Rev 1.1 14 Jun 1991 19:54:58 GLENN + * Minor edit to file header + * + * Rev 1.0 01 Apr 1991 01:03:52 GLENN + * Nanforum Toolkit + * + */ /*This is the Original FT_RMDIR() code -IDEAL + IDEAL -Public FT_RMDIR + Public FT_RMDIR -Extrn __ftdir:Far + Extrn __ftdir:Far -Segment _NanFor Word Public "CODE" + Segment _NanFor Word Public "CODE" Assume CS:_NanFor -Proc FT_RMDIR Far + Proc FT_RMDIR Far Mov AH,3Ah * DOS service--remove directory Push AX * Save on stack Call __ftdir * Call generic directory routine Add SP,2 * Realign stack Ret -Endp FT_RMDIR -Ends _NanFor -End -*/ + Endp FT_RMDIR + Ends _NanFor + End + */ /* This is the New one Rewriten in C*/ diff --git a/harbour/contrib/hbnf/setkeys.c b/harbour/contrib/hbnf/setkeys.c index 43bb8956ce..734b676908 100644 --- a/harbour/contrib/hbnf/setkeys.c +++ b/harbour/contrib/hbnf/setkeys.c @@ -48,23 +48,23 @@ * whether to permit this exception to apply to your modifications. * If you do not wish that, delete this exception notice. * -*/ + */ /* -* File......: setlastk.asm -* Author....: Ted Means -* CIS ID....: 73067,3332 -* -* This is an original work by Ted Means and is placed in the -* public domain. -* -* Modification history: -* --------------------- -* -* Rev 1.0 01 Jul 1992 01:23:06 GLENN -* Initial revision. -* -*/ + * File......: setlastk.asm + * Author....: Ted Means + * CIS ID....: 73067,3332 + * + * This is an original work by Ted Means and is placed in the + * public domain. + * + * Modification history: + * --------------------- + * + * Rev 1.0 01 Jul 1992 01:23:06 GLENN + * Initial revision. + * + */ #include "hbapi.h" diff --git a/harbour/contrib/hbnf/setlastk.c b/harbour/contrib/hbnf/setlastk.c index 74e8cb8282..949ce0322c 100644 --- a/harbour/contrib/hbnf/setlastk.c +++ b/harbour/contrib/hbnf/setlastk.c @@ -48,23 +48,23 @@ * whether to permit this exception to apply to your modifications. * If you do not wish that, delete this exception notice. * -*/ + */ /* -* File......: setlastk.asm -* Author....: Ted Means -* CIS ID....: 73067,3332 -* -* This is an original work by Ted Means and is placed in the -* public domain. -* -* Modification history: -* --------------------- -* -* Rev 1.0 01 Jul 1992 01:23:06 GLENN -* Initial revision. -* -*/ + * File......: setlastk.asm + * Author....: Ted Means + * CIS ID....: 73067,3332 + * + * This is an original work by Ted Means and is placed in the + * public domain. + * + * Modification history: + * --------------------- + * + * Rev 1.0 01 Jul 1992 01:23:06 GLENN + * Initial revision. + * + */ #include "hbapi.h" diff --git a/harbour/website/samples/_notes/dwsync.xml b/harbour/website/samples/_notes/dwsync.xml deleted file mode 100644 index 258aa0ad61..0000000000 --- a/harbour/website/samples/_notes/dwsync.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file