From 34c3faace96003fd1e0d4fa44ae0c390c3a5462b Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 13 Nov 2011 10:42:47 +0000 Subject: [PATCH] 2011-11-13 11:42 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) - contrib/hbclipsm * contrib/hbplist * doc/dirstruc.txt - deleted local implementation of CA-Cl*pper SOURCE/SAMPLE functions. Many of these have equivalents in hbct, hbmisc libs and core, and some functions had implementation bugs (notably ADDMONTH(), even in original Cl*pper implementation, though a different one there). Simply compile original Cl*pper sources to use these functions in your app or use the alternatives. --- harbour/ChangeLog | 11 + harbour/contrib/hbclipsm/date.c | 243 -------------------- harbour/contrib/hbclipsm/environ.c | 122 ---------- harbour/contrib/hbclipsm/gauge.c | 194 ---------------- harbour/contrib/hbclipsm/hbclipsm.hbc | 7 - harbour/contrib/hbclipsm/hbclipsm.hbp | 25 -- harbour/contrib/hbclipsm/hbclipsm.hbx | 70 ------ harbour/contrib/hbclipsm/num.c | 189 --------------- harbour/contrib/hbclipsm/numceil.c | 63 ----- harbour/contrib/hbclipsm/numfloor.c | 63 ----- harbour/contrib/hbclipsm/stack.c | 108 --------- harbour/contrib/hbclipsm/status.c | 102 -------- harbour/contrib/hbclipsm/tests/hbmk.hbm | 7 - harbour/contrib/hbclipsm/tests/testdate.prg | 37 --- harbour/contrib/hbclipsm/tests/testenv.prg | 18 -- harbour/contrib/hbclipsm/tests/testgaug.prg | 54 ----- harbour/contrib/hbclipsm/tests/testnum.prg | 24 -- harbour/contrib/hbclipsm/tests/teststat.prg | 16 -- harbour/contrib/hbclipsm/tests/testtime.prg | 25 -- harbour/contrib/hbclipsm/tests/tststack.prg | 26 --- harbour/contrib/hbclipsm/time.c | 115 --------- harbour/contrib/hbclipsm/time87.ch | 10 - harbour/contrib/hbplist | 1 - harbour/doc/dirstruc.txt | 4 - 24 files changed, 11 insertions(+), 1523 deletions(-) delete mode 100644 harbour/contrib/hbclipsm/date.c delete mode 100644 harbour/contrib/hbclipsm/environ.c delete mode 100644 harbour/contrib/hbclipsm/gauge.c delete mode 100644 harbour/contrib/hbclipsm/hbclipsm.hbc delete mode 100644 harbour/contrib/hbclipsm/hbclipsm.hbp delete mode 100644 harbour/contrib/hbclipsm/hbclipsm.hbx delete mode 100644 harbour/contrib/hbclipsm/num.c delete mode 100644 harbour/contrib/hbclipsm/numceil.c delete mode 100644 harbour/contrib/hbclipsm/numfloor.c delete mode 100644 harbour/contrib/hbclipsm/stack.c delete mode 100644 harbour/contrib/hbclipsm/status.c delete mode 100644 harbour/contrib/hbclipsm/tests/hbmk.hbm delete mode 100644 harbour/contrib/hbclipsm/tests/testdate.prg delete mode 100644 harbour/contrib/hbclipsm/tests/testenv.prg delete mode 100644 harbour/contrib/hbclipsm/tests/testgaug.prg delete mode 100644 harbour/contrib/hbclipsm/tests/testnum.prg delete mode 100644 harbour/contrib/hbclipsm/tests/teststat.prg delete mode 100644 harbour/contrib/hbclipsm/tests/testtime.prg delete mode 100644 harbour/contrib/hbclipsm/tests/tststack.prg delete mode 100644 harbour/contrib/hbclipsm/time.c delete mode 100644 harbour/contrib/hbclipsm/time87.ch diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e72992109a..d0c7226484 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2011-11-13 11:42 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + - contrib/hbclipsm + * contrib/hbplist + * doc/dirstruc.txt + - deleted local implementation of CA-Cl*pper SOURCE/SAMPLE + functions. Many of these have equivalents in hbct, hbmisc + libs and core, and some functions had implementation bugs + (notably ADDMONTH(), even in original Cl*pper implementation, + though a different one there). Simply compile original Cl*pper + sources to use these functions in your app or use the alternatives. + 2011-11-10 10:34 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/gtxwc/gtxwc.c ! create initial console window in fullscreen mode if user called diff --git a/harbour/contrib/hbclipsm/date.c b/harbour/contrib/hbclipsm/date.c deleted file mode 100644 index 1d2b77c9ee..0000000000 --- a/harbour/contrib/hbclipsm/date.c +++ /dev/null @@ -1,243 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Sample date functions rewritten in C - * - * Copyright 2000 Jose Lalin - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * 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" -#include "hbset.h" -#include "hbdate.h" - -/* MDY( ) --> "month dd, yyyy" -*/ -HB_FUNC( MDY ) -{ - int iYear, iMonth, iDay; - char szDate[ 9 ]; - char szFormatted[ 11 ]; - char * szReturn; - HB_ISIZ iBufferLen; - HB_ISIZ iYearLen; - HB_ISIZ iLen; - - hb_dateDecode( hb_pardl( 1 ), &iYear, &iMonth, &iDay ); - hb_dateFormat( hb_pardsbuff( szDate, 1 ), szFormatted, "MM/DD/YYYY" ); - - iLen = strlen( hb_dateCMonth( iMonth ) ); - iYearLen = hb_setGetCentury() ? 4 : 2; - - iBufferLen = iLen + 5 + iYearLen; - szReturn = ( char * ) hb_xgrab( iBufferLen + 1 ); - - memset( szReturn, ' ', iBufferLen ); - memcpy( szReturn, hb_dateCMonth( iMonth ), iLen ); - memcpy( szReturn + iLen + 1, szFormatted + 3, 2 ); - szReturn[ iLen + 3 ] = ','; - memcpy( szReturn + iLen + 5, szFormatted + 10 - iYearLen, iYearLen ); - - hb_retclen_buffer( szReturn, iBufferLen ); -} - -/* DMY( ) --> "dd month yyyy" (european date format) -*/ -HB_FUNC( DMY ) -{ - int iYear, iMonth, iDay; - char szDate[ 9 ]; - char szFormatted[ 11 ]; - char * szReturn; - HB_ISIZ iBufferLen; - HB_ISIZ iYearLen; - HB_ISIZ iLen; - - hb_dateDecode( hb_pardl( 1 ), &iYear, &iMonth, &iDay ); - hb_dateFormat( hb_pardsbuff( szDate, 1 ), szFormatted, "MM/DD/YYYY" ); - - iLen = strlen( hb_dateCMonth( iMonth ) ); - iYearLen = hb_setGetCentury() ? 4 : 2; - - iBufferLen = iLen + 4 + iYearLen; - szReturn = ( char * ) hb_xgrab( iBufferLen + 1 ); - - memset( szReturn, ' ', iBufferLen ); - memcpy( szReturn, szFormatted + 3, 2 ); - memcpy( szReturn + 3, hb_dateCMonth( iMonth ), iLen ); - memcpy( szReturn + iLen + 4, szFormatted + 10 - iYearLen, iYearLen ); - - hb_retclen_buffer( szReturn, iBufferLen ); -} - -/* DATEASAGE( ) --> -*/ -HB_FUNC( DATEASAGE ) -{ - int iAge = 0; - PHB_ITEM pDate = hb_param( 1, HB_IT_DATETIME ); - - if( pDate ) - { - int iYear, iMonth, iDay; - int iThisYear, iThisMonth, iThisDay; - - hb_dateToday( &iThisYear, &iThisMonth, &iThisDay ); - hb_dateDecode( hb_itemGetDL( pDate ), &iYear, &iMonth, &iDay ); - - if( iThisYear > iYear ) - { - iAge = iThisYear - iYear; - - if( iThisMonth < iMonth || ( iThisMonth == iMonth && iThisDay < iDay ) ) - --iAge; - } - } - - hb_retni( iAge ); -} - -/* ADDMONTH( , ) --> - NOTE: Caller must validate dNewDate. -*/ -HB_FUNC( ADDMONTH ) -{ - int iMonths = hb_parnl( 2 ); - int iYear, iMonth, iDay; - - int iLimit, iMonthAdd, iYearAdd; - long lNew; - - hb_dateDecode( hb_pardl( 1 ), &iYear, &iMonth, &iDay ); - - iLimit = 12 - iMonth + 1; - iYearAdd = iMonths / 12; - iMonths %= 12; - - if( iMonths >= iLimit ) - iYearAdd++; - - iYear += iYearAdd; - - iMonthAdd = iMonths % 12; - iMonth = ( iMonth + iMonthAdd ) % 12; - - if( iMonth == 0 ) - iMonth = 12; - - lNew = hb_dateEncode( iYear, iMonth, iDay ); - - if( !lNew ) - { - iMonth = ( iMonth + 1 ) % 12; - iDay = 1; - iYear = iYear + ( ( iMonth + 1 ) / 12 ); - } - - hb_retd( iYear, iMonth, iDay ); -} - -/* DATEASARRAY( ) --> { Year, Month, Day } - NOTE: Returns an empty array if is not a valid date. -*/ -HB_FUNC( DATEASARRAY ) -{ - PHB_ITEM pDate = hb_param( 1, HB_IT_DATETIME ); - - if( pDate ) - { - PHB_ITEM pReturn = hb_itemArrayNew( 3 ); /* Create array */ - int iYear, iMonth, iDay; - - hb_dateDecode( hb_itemGetDL( pDate ), &iYear, &iMonth, &iDay ); - - hb_arraySetNI( pReturn, 1, iYear ); - hb_arraySetNI( pReturn, 2, iMonth ); - hb_arraySetNI( pReturn, 3, iDay ); - - hb_itemReturnRelease( pReturn ); - } - else - hb_reta( 0 ); -} - -/* ARRAYASDATE( { , , } ) --> -*/ -HB_FUNC( ARRAYASDATE ) -{ - PHB_ITEM pArray = hb_param( 1, HB_IT_ARRAY ); - - if( pArray ) - hb_retd( hb_arrayGetNI( pArray, 1 ), hb_arrayGetNI( pArray, 2 ), hb_arrayGetNI( pArray, 3 ) ); - else - hb_retdl( 0 ); -} - -/* DATEISLEAP( ) --> -*/ -HB_FUNC( DATEISLEAP ) -{ - PHB_ITEM pDate = hb_param( 1, HB_IT_DATETIME ); - - if( pDate ) - { - int iYear, iMonth, iDay; - - hb_dateDecode( hb_itemGetDL( pDate ), &iYear, &iMonth, &iDay ); - - hb_retl( ( iYear % 4 == 0 && iYear % 100 != 0 ) || ( iYear % 400 == 0 ) ); - } - else - hb_retl( HB_FALSE ); -} - -/* NTOD( , , ) --> -*/ -HB_FUNC( NTOD ) -{ - hb_retd( hb_parni( 3 ), hb_parni( 1 ), hb_parni( 2 ) ); -} diff --git a/harbour/contrib/hbclipsm/environ.c b/harbour/contrib/hbclipsm/environ.c deleted file mode 100644 index 79f62fae7f..0000000000 --- a/harbour/contrib/hbclipsm/environ.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Sample file functions - * - * Copyright 2000 Jose Lalin - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - * - */ - -#include "hbapi.h" -#include "hbapifs.h" - -/* FilePath( ) --> cFilePath - Extract the full path name from a complete file name - * FilePath( "C:\harbour\bin\harbour.exe" ) --> "C:\harbour\bin\" -*/ -HB_FUNC( FILEPATH ) -{ - const char * szPath = hb_parc( 1 ); - if( szPath ) - { - PHB_FNAME pFileName = hb_fsFNameSplit( szPath ); - hb_retc( pFileName->szPath ); - hb_xfree( pFileName ); - } - else - hb_retc_null(); -} - -/* FileBase( ) --> cFileBase -*/ -HB_FUNC( FILEBASE ) -{ - const char * szPath = hb_parc( 1 ); - if( szPath ) - { - PHB_FNAME pFileName = hb_fsFNameSplit( szPath ); - hb_retc( pFileName->szName ); - hb_xfree( pFileName ); - } - else - hb_retc_null(); -} - -/* FileExt( ) --> cFileExt -*/ -HB_FUNC( FILEEXT ) -{ - const char * szPath = hb_parc( 1 ); - if( szPath ) - { - PHB_FNAME pFileName = hb_fsFNameSplit( szPath ); - if( pFileName->szExtension != NULL ) - hb_retc( pFileName->szExtension + 1 ); /* Skip the dot */ - else - hb_retc_null(); - hb_xfree( pFileName ); - } - else - hb_retc_null(); -} - -/* FileDrive( ) --> cFileDrive -*/ -HB_FUNC( FILEDRIVE ) -{ - const char * szPath = hb_parc( 1 ); - if( szPath ) - { - PHB_FNAME pFileName = hb_fsFNameSplit( szPath ); - if( pFileName->szDrive ) - hb_retclen( pFileName->szDrive, 1 ); /* Only the drive letter */ - else - hb_retc_null(); - hb_xfree( pFileName ); - } - else - hb_retc_null(); -} diff --git a/harbour/contrib/hbclipsm/gauge.c b/harbour/contrib/hbclipsm/gauge.c deleted file mode 100644 index ee46a4e3a3..0000000000 --- a/harbour/contrib/hbclipsm/gauge.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Gauge functions - * - * Copyright 2000 Jose Lalin - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * 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" -#include "hbapigt.h" - -/* Box array definitions */ -#define B_TOP 1 -#define B_LEFT 2 -#define B_BOTTOM 3 -#define B_RIGHT 4 -#define B_BACKCOLOR 5 -#define B_BARCOLOR 6 -#define B_DISPLAYNUM 8 -#define B_BARCHAR 7 -#define B_PERCENT 9 -#define B_LEN B_PERCENT - -#define B_BOXLINES "ÚÄ¿³ÙÄÀ³" - -static void hb_gaugeUpdate( PHB_ITEM pArray, float fPercent ) -{ - int iCenter = ( ( hb_arrayGetNI( pArray, B_RIGHT ) - hb_arrayGetNI( pArray, B_LEFT ) ) / 2 ) + 1; - int iRatio = hb_arrayGetNI( pArray, B_RIGHT ) - hb_arrayGetNI( pArray, B_LEFT ) - 1; - int iRow; - int iCols; - int iMax; - char szOldColor[ HB_CLRSTR_LEN ]; - char szPct[ 5 ]; - - hb_gtGetColorStr( szOldColor ); - hb_gtSetColorStr( hb_arrayGetCPtr( pArray, B_BARCOLOR ) ); - - fPercent = ( fPercent < 0 ? 0 : ( fPercent > 1 ? 1 : fPercent ) ); - iCols = ( int ) ( fPercent * iRatio ); - - if( hb_arrayGetL( pArray, B_DISPLAYNUM ) ) - { - hb_snprintf( szPct, sizeof( szPct ), "%3.0f%%", fPercent * 100 ); - hb_gtWriteAt( hb_arrayGetNI( pArray, B_TOP ), - iCenter + 2, - szPct, 4 ); - } - - hb_gtBox( hb_arrayGetNI( pArray, B_TOP ) + 1, - hb_arrayGetNI( pArray, B_LEFT ) + 1, - hb_arrayGetNI( pArray, B_BOTTOM ) - 1, - hb_arrayGetNI( pArray, B_RIGHT ) - 1, - " " ); - - iMax = hb_arrayGetNI( pArray, B_BOTTOM ) - hb_arrayGetNI( pArray, B_TOP ) - 1; - for( iRow = 1; iRow <= iMax; iRow++ ) - { - hb_gtRepChar( hb_arrayGetNI( pArray, B_TOP ) + iRow, - hb_arrayGetNI( pArray, B_LEFT ) + 1, - * hb_arrayGetCPtr( pArray, B_BARCHAR ), - ( HB_SIZE ) iCols ); - } - - hb_gtSetColorStr( szOldColor ); -} - -/* GaugeNew( , , , , - [], - [], - [] ) --> aGauge -*/ -HB_FUNC( GAUGENEW ) -{ - PHB_ITEM pReturn = hb_itemArrayNew( B_LEN ); /* Create array */ - - hb_arraySetNI( pReturn, B_TOP, hb_parni( B_TOP ) ); - hb_arraySetNI( pReturn, B_LEFT, hb_parni( B_LEFT ) ); - hb_arraySetNI( pReturn, B_BOTTOM, - HB_ISNUM( B_BOTTOM ) ? - ( hb_parni( B_BOTTOM ) < hb_parni( B_TOP ) + 2 ? - hb_parni( B_TOP ) + 2 : hb_parni( B_BOTTOM ) ) : 0 ); - hb_arraySetNI( pReturn, B_RIGHT, - HB_ISNUM( B_RIGHT ) ? - ( hb_parni( B_RIGHT ) < hb_parni( B_LEFT ) + 4 ? - hb_parni( B_LEFT ) + 4 : hb_parni( B_RIGHT ) ) : 0 ); - hb_arraySetC( pReturn, B_BACKCOLOR, HB_ISCHAR( B_BACKCOLOR ) ? hb_parc( B_BACKCOLOR ) : "W/N" ); - hb_arraySetC( pReturn, B_BARCOLOR, HB_ISCHAR( B_BARCOLOR ) ? hb_parc( B_BARCOLOR ) : "W+/N" ); - hb_arraySetL( pReturn, B_DISPLAYNUM, - !( HB_ISNUM( B_RIGHT ) && - HB_ISNUM( B_LEFT ) && - ( hb_parni( B_RIGHT ) < hb_parni( B_LEFT ) + 9 ) ) ); - hb_arraySetC( pReturn, B_BARCHAR, HB_ISCHAR( B_BARCHAR ) ? hb_parc( B_BARCHAR ) : "\xdb" ); - hb_arraySetND( pReturn, B_PERCENT, 0.0 ); - - hb_itemReturnRelease( pReturn ); -} - -/* GaugeDisplay( aGauge ) --> aGauge -*/ -HB_FUNC( GAUGEDISPLAY ) -{ - PHB_ITEM pArray = hb_param( 1, HB_IT_ARRAY ); - - if( pArray ) - { - int iCenter = ( ( hb_arrayGetNI( pArray, B_RIGHT ) - hb_arrayGetNI( pArray, B_LEFT ) ) / 2 ) + 1; - char szOldColor[ HB_CLRSTR_LEN ]; - - hb_gtGetColorStr( szOldColor ); - hb_gtSetColorStr( hb_arrayGetCPtr( pArray, B_BACKCOLOR ) ); - - hb_gtBox( hb_arrayGetNI( pArray, B_TOP ), - hb_arrayGetNI( pArray, B_LEFT ), - hb_arrayGetNI( pArray, B_BOTTOM ), - hb_arrayGetNI( pArray, B_RIGHT ), - " " ); - - hb_gtBox( hb_arrayGetNI( pArray, B_TOP ), - hb_arrayGetNI( pArray, B_LEFT ), - hb_arrayGetNI( pArray, B_BOTTOM ), - hb_arrayGetNI( pArray, B_RIGHT ), - B_BOXLINES ); - - if( hb_arrayGetL( pArray, B_DISPLAYNUM ) ) - hb_gtWriteAt( hb_arrayGetNI( pArray, B_TOP ), - iCenter, - "[ ]", 8 ); - - hb_gtSetColorStr( szOldColor ); - - hb_gaugeUpdate( pArray, ( float ) hb_arrayGetND( pArray, B_PERCENT ) ); - - hb_itemReturn( pArray ); - } -} - -/* GaugeUpdate( aGauge, nPercent ) --> aGauge -*/ -HB_FUNC( GAUGEUPDATE ) -{ - PHB_ITEM pArray = hb_param( 1, HB_IT_ARRAY ); - - if( pArray ) - { - hb_gaugeUpdate( pArray, ( float ) hb_parnd( 2 ) ); - hb_itemReturn( pArray ); - } -} diff --git a/harbour/contrib/hbclipsm/hbclipsm.hbc b/harbour/contrib/hbclipsm/hbclipsm.hbc deleted file mode 100644 index 1e7989e430..0000000000 --- a/harbour/contrib/hbclipsm/hbclipsm.hbc +++ /dev/null @@ -1,7 +0,0 @@ -# -# $Id$ -# - -incpaths=. - -libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF} diff --git a/harbour/contrib/hbclipsm/hbclipsm.hbp b/harbour/contrib/hbclipsm/hbclipsm.hbp deleted file mode 100644 index 4b31160cb9..0000000000 --- a/harbour/contrib/hbclipsm/hbclipsm.hbp +++ /dev/null @@ -1,25 +0,0 @@ -# -# $Id$ -# - --hblib --inc - --o${hb_name} - --w3 -es2 - --instfile=inc:time87.ch --instfile=inc:hbclipsm.hbx - -hbclipsm.hbx - -date.c -environ.c -gauge.c -num.c -numceil.c -numfloor.c -stack.c -status.c -time.c diff --git a/harbour/contrib/hbclipsm/hbclipsm.hbx b/harbour/contrib/hbclipsm/hbclipsm.hbx deleted file mode 100644 index 45505e1a75..0000000000 --- a/harbour/contrib/hbclipsm/hbclipsm.hbx +++ /dev/null @@ -1,70 +0,0 @@ -/* - * $Id$ - */ - -/* -------------------------------------------------------------------- */ -/* NOTE: You can add manual override which functions to include or */ -/* exclude from automatically generated EXTERNAL/DYNAMIC list. */ -/* Syntax: // HB_FUNC_INCLUDE */ -/* // HB_FUNC_EXCLUDE */ -/* -------------------------------------------------------------------- */ - -/* -------------------------------------------------------------------- */ -/* WARNING: Automatically generated code below. DO NOT EDIT! */ -/* Regenerate using hbmk2 '-hbx=' option. */ -/* -------------------------------------------------------------------- */ - -#ifndef __HBEXTERN_CH__HBCLIPSM__ -#define __HBEXTERN_CH__HBCLIPSM__ - -#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBCLIPSM__ANNOUNCE ) - ANNOUNCE __HBEXTERN__HBCLIPSM__ -#endif - -#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBCLIPSM__REQUEST ) - #command DYNAMIC => EXTERNAL -#endif - -DYNAMIC ADDMONTH -DYNAMIC ARRAYASDATE -DYNAMIC CEILING -DYNAMIC DATEASAGE -DYNAMIC DATEASARRAY -DYNAMIC DATEISLEAP -DYNAMIC DMY -DYNAMIC DTOR -DYNAMIC FILEBASE -DYNAMIC FILEDRIVE -DYNAMIC FILEEXT -DYNAMIC FILEPATH -DYNAMIC FLOOR -DYNAMIC GAUGEDISPLAY -DYNAMIC GAUGENEW -DYNAMIC GAUGEUPDATE -DYNAMIC MDY -DYNAMIC NTOD -DYNAMIC NUMASCURRENCY -DYNAMIC NUMASLOG10 -DYNAMIC NUMGETDECIMALS -DYNAMIC NUMGETLEN -DYNAMIC RTOD -DYNAMIC SECONDSASDAYS -DYNAMIC SIGN -DYNAMIC STACKISEMPTY -DYNAMIC STACKNEW -DYNAMIC STACKPOP -DYNAMIC STACKPUSH -DYNAMIC STACKTOP -DYNAMIC STATUSNEW -DYNAMIC STATUSUPDATE -DYNAMIC TIMEASAMPM -DYNAMIC TIMEASSECONDS -DYNAMIC TIMEASSTRING -DYNAMIC TIMEDIFF -DYNAMIC TIMEISVALID - -#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBCLIPSM__REQUEST ) - #uncommand DYNAMIC => EXTERNAL -#endif - -#endif diff --git a/harbour/contrib/hbclipsm/num.c b/harbour/contrib/hbclipsm/num.c deleted file mode 100644 index c75dc9cf1e..0000000000 --- a/harbour/contrib/hbclipsm/num.c +++ /dev/null @@ -1,189 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Number manipulation - * - * Copyright 2000 Jose Lalin - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * 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" -#include "hbmath.h" - -#ifndef PI -# define PI ( 3.1415926535897932384626433 ) -#endif - -/* DtoR( ) --> nRadians - Convert an angle size specified in radians to degrees -*/ -HB_FUNC( DTOR ) -{ - hb_retndlen( ( hb_parnd( 1 ) / 180 ) * PI, 10, 9 ); -} - -/* NumAsLog10( ) --> nLog10 - Convert a positive number to log base 10 -*/ -HB_FUNC( NUMASLOG10 ) -{ - if( HB_ISNUM( 1 ) ) - hb_retnd( log10( hb_parnd(1) ) ); -} - -/* NumGetDecimals( ) --> nDecimals - Determine the number of decimal digits -*/ -HB_FUNC( NUMGETDECIMALS ) -{ - int iDec = 0; - - if( HB_ISNUM( 1 ) ) - hb_itemGetNLen( hb_param( 1, HB_IT_NUMERIC ), NULL, &iDec ); - - hb_retni( iDec ); -} - -/* NumGetLen( ) --> nDigits - Determine the number of whole number digits -*/ -HB_FUNC( NUMGETLEN ) -{ - HB_SIZE ulLen = 0; - - if( HB_ISNUM( 1 ) ) - { - char * szBuffer = hb_itemStr( hb_param( 1, HB_IT_NUMERIC ), NULL, NULL ); - char * ptr = szBuffer; - - while( HB_ISSPACE( *ptr ) ) - ptr++; - - if( !strchr( ptr, '.' ) ) - { - while( *ptr ) - { - ptr++; - ulLen++; - } - } - else - { - while( *ptr != '.' ) - { - ptr++; - ulLen++; - } - } - - if( szBuffer ) - hb_xfree( szBuffer ); - } - - hb_retns( ulLen ); -} - -/* RtoD( ) --> nDegrees - Convert an angle size specified in radians to degrees -*/ -HB_FUNC( RTOD ) -{ - hb_retnd( 180 * ( hb_parnd( 1 ) / PI ) ); -} - -/* Sign( ) --> nSign - Return the sign of a number as follows: - 0 - is zero - 1 - is positive - -1 - is negative -*/ -HB_FUNC( SIGN ) -{ - if( HB_ISNUM( 1 ) ) - { - long lNumber = hb_parnl( 1 ); - - hb_retni( lNumber == 0 ? 0 : ( lNumber > 0 ? 1 : -1 ) ); - } -} - -/* NumAsCurrency( , , ) --> cCurrency - Convert number to currency format, floating dollar symbol -*/ -HB_FUNC( NUMASCURRENCY ) -{ - char * szBuffer = hb_itemStr( hb_param( 1, HB_IT_NUMERIC ), NULL, NULL ); - HB_SIZE ulSymbolLen = hb_itemGetCLen( hb_param( 2, HB_IT_STRING ) ); - char * ptr = szBuffer; - char * szCurrency; - HB_SIZE ulLen; - - ulLen = strlen( ptr ); - szCurrency = ( char * ) hb_xgrab( ulLen + ulSymbolLen ); - - if( hb_parni( 3 ) < 0 ) - { - while( HB_ISSPACE( *ptr ) ) - ptr++; - - ulLen = strlen( ptr ); - - memcpy( szCurrency, hb_parc( 2 ), ulSymbolLen ); - memcpy( szCurrency + ulSymbolLen, ptr, ulLen ); - } - else - { - memcpy( szCurrency, ptr, ulLen ); - memcpy( szCurrency + ulLen, hb_parc( 2 ), ulSymbolLen ); - } - - if( szBuffer ) - hb_xfree( szBuffer ); - - hb_retclen( szCurrency, ulLen + ulSymbolLen ); - hb_xfree( szCurrency ); -} diff --git a/harbour/contrib/hbclipsm/numceil.c b/harbour/contrib/hbclipsm/numceil.c deleted file mode 100644 index 82a2ec868a..0000000000 --- a/harbour/contrib/hbclipsm/numceil.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Number manipulation - * - * Copyright 2000 Jose Lalin - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * 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" -#include "hbmath.h" - -/* Ceiling( ) --> nInteger - Return the smallest integer that is greater than or equal to -*/ -HB_FUNC( CEILING ) -{ - hb_retnl( ( long ) ceil( hb_parnd( 1 ) ) ); -} diff --git a/harbour/contrib/hbclipsm/numfloor.c b/harbour/contrib/hbclipsm/numfloor.c deleted file mode 100644 index 6ffa1413bd..0000000000 --- a/harbour/contrib/hbclipsm/numfloor.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Number manipulation - * - * Copyright 2000 Jose Lalin - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * 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" -#include "hbmath.h" - -/* Floor( ) --> nInteger - Return the largest integer that is less than or equal to -*/ -HB_FUNC( FLOOR ) -{ - hb_retnl( ( long ) floor( hb_parnd( 1 ) ) ); -} diff --git a/harbour/contrib/hbclipsm/stack.c b/harbour/contrib/hbclipsm/stack.c deleted file mode 100644 index b64e55cf06..0000000000 --- a/harbour/contrib/hbclipsm/stack.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Stack structure - * - * Copyright 2000 Jose Lalin - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * 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" - -/* StackNew() --> -*/ -HB_FUNC( STACKNEW ) -{ - hb_itemReturnRelease( hb_itemArrayNew( 0 ) ); /* Create array */ -} - -/* StackPush( , ) --> -*/ -HB_FUNC( STACKPUSH ) -{ - hb_arrayAdd( hb_param( 1, HB_IT_ARRAY ), - hb_param( 2, HB_IT_ANY ) ); -} - -/* StackPop( ) --> - Returns NIL if the stack is empty -*/ -HB_FUNC( STACKPOP ) -{ - PHB_ITEM pArray = hb_param( 1, HB_IT_ARRAY ); - HB_ISIZ ulLen = hb_arrayLen( pArray ); - PHB_ITEM pLast = hb_itemNew( NULL ); - - if( ulLen ) - { - hb_arrayLast( pArray, pLast ); - hb_arrayDel( pArray, ulLen ); - --ulLen; - hb_arraySize( pArray, HB_MAX( ulLen, 0 ) ); - } - - hb_itemReturnRelease( pLast ); -} - -/* StackIsEmpty( ) --> -*/ -HB_FUNC( STACKISEMPTY ) -{ - hb_retl( hb_arrayLen( hb_param( 1, HB_IT_ARRAY ) ) == 0 ); -} - -/* StackTop( ) --> - Returns the top item -*/ -HB_FUNC( STACKTOP ) -{ - PHB_ITEM pLast = hb_itemNew( NULL ); - - hb_arrayLast( hb_param( 1, HB_IT_ARRAY ), pLast ); - - hb_itemReturnRelease( pLast ); -} diff --git a/harbour/contrib/hbclipsm/status.c b/harbour/contrib/hbclipsm/status.c deleted file mode 100644 index 87d698ce12..0000000000 --- a/harbour/contrib/hbclipsm/status.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Moving indicator for large processes - * - * Copyright 2000 Jose Lalin - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * 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" -#include "hbapigt.h" - -#define ST_ROW 1 /* Status item display row */ -#define ST_COL 2 /* Status item display column */ -#define ST_COLOR 3 /* Status item color */ -#define ST_CURRENT 4 /* Status item current position in aDisplay */ - -#define ST_LEN ST_CURRENT /* Length of status array */ - -/* StatusNew( [], [], [] ) --> -*/ -HB_FUNC( STATUSNEW ) -{ - PHB_ITEM pReturn = hb_itemArrayNew( ST_LEN ); /* Create array */ - - hb_arraySetNI( pReturn, ST_ROW, hb_parni( ST_ROW ) ); - hb_arraySetNI( pReturn, ST_COL, hb_parni( ST_COL ) ); - hb_arraySetC( pReturn, ST_COLOR, HB_ISCHAR( ST_COLOR ) ? hb_parc( ST_COLOR ) : "W+/N" ); - hb_arraySetNL( pReturn, ST_CURRENT, 1 ); - - hb_itemReturnRelease( pReturn ); -} - -/* StatusUpdate( ) --> nil -*/ -HB_FUNC( STATUSUPDATE ) -{ - PHB_ITEM pArray = hb_param( 1, HB_IT_ARRAY ); - - if( pArray ) - { - static const char * s_szDisplay = "|/-\\"; - - long lCurrent = hb_arrayGetNL( pArray, ST_CURRENT ); - char szOldColor[ HB_CLRSTR_LEN ]; - - lCurrent = ( ++lCurrent > 4 ? 1 : lCurrent ); - hb_arraySetNL( pArray, ST_CURRENT, lCurrent ); - - hb_gtGetColorStr( szOldColor ); - hb_gtSetColorStr( hb_arrayGetCPtr( pArray, ST_COLOR ) ); - hb_gtWriteAt( hb_arrayGetNI( pArray, ST_ROW ), - hb_arrayGetNI( pArray, ST_COL ), - s_szDisplay + lCurrent - 1, 1 ); - - hb_gtSetColorStr( szOldColor ); - } -} diff --git a/harbour/contrib/hbclipsm/tests/hbmk.hbm b/harbour/contrib/hbclipsm/tests/hbmk.hbm deleted file mode 100644 index a80d99ff41..0000000000 --- a/harbour/contrib/hbclipsm/tests/hbmk.hbm +++ /dev/null @@ -1,7 +0,0 @@ -# -# $Id$ -# - -../hbclipsm.hbc - --w3 -es2 diff --git a/harbour/contrib/hbclipsm/tests/testdate.prg b/harbour/contrib/hbclipsm/tests/testdate.prg deleted file mode 100644 index 1a7f160a1b..0000000000 --- a/harbour/contrib/hbclipsm/tests/testdate.prg +++ /dev/null @@ -1,37 +0,0 @@ -/* - * $Id$ - */ - -function Test() - - local dDate - local aDate - - SET DATE FORMAT "dd/mm/yyyy" - dDate := CTOD( "19/07/71" ) - - SET CENTURY OFF - ? "[" + MDY( dDate ) + "]" - ? "[" + DMY( dDate ) + "]" - ? DateAsAge( dDate ) - aDate := DateAsArray( dDate ) - ? aDate[1], aDate[2], aDate[3] - ? ArrayAsDate( aDate ) - ? DateIsLeap( dDate ) - ? NtoD( aDate[2], aDate[3], aDate[1] ) - ? AddMonth( dDate, 12 ) - ? AddMonth( dDate, 18 ) - - SET CENTURY ON - ? "[" + MDY( dDate ) + "]" - ? "[" + DMY( dDate ) + "]" - ? DateAsAge( dDate ) - aDate := DateAsArray( dDate ) - ? aDate[1], aDate[2], aDate[3] - ? ArrayAsDate( aDate ) - ? DateIsLeap( dDate ) - ? NtoD( aDate[2], aDate[3], aDate[1] ) - ? AddMonth( dDate, 12 ) - ? AddMonth( dDate, 18 ) - -return nil diff --git a/harbour/contrib/hbclipsm/tests/testenv.prg b/harbour/contrib/hbclipsm/tests/testenv.prg deleted file mode 100644 index 41e59bd80f..0000000000 --- a/harbour/contrib/hbclipsm/tests/testenv.prg +++ /dev/null @@ -1,18 +0,0 @@ -/* - * $Id$ - */ - -#include "common.ch" - -function Test( cParam ) - - LOCAL cFile := "C:\harbour\bin\harbour.exe" - - DEFAULT cParam TO cFile - - ? FilePath( cParam ) - ? FileBase( cParam ) - ? FileExt( cParam ) - ? FileDrive( cParam ) - -return nil diff --git a/harbour/contrib/hbclipsm/tests/testgaug.prg b/harbour/contrib/hbclipsm/tests/testgaug.prg deleted file mode 100644 index 8a833f9018..0000000000 --- a/harbour/contrib/hbclipsm/tests/testgaug.prg +++ /dev/null @@ -1,54 +0,0 @@ -/* - * $Id$ - */ - -/* Testing Harbour's Gauge */ - -#include "inkey.ch" -#include "setcurs.ch" - -function Test() - - LOCAL aGauge - LOCAL i := 0 - LOCAL nPercent := 0 - - CLS - SetCursor( SC_NONE ) - - aGauge := GaugeNew( 5, 5, 7, MaxCol() - 5, "W/B", "W+/B" ) - - @ 1, 0 SAY PadC( "Harbour Gauge Demo", MaxCol() ) COLOR "W+/N" - @ 3, 0 SAY PadC( "Use , , PgUp and PgDn to move gauge, Esc to exit", MaxCol() ) COLOR "W/N" - - GaugeDisplay( aGauge ) - - while i != K_ESC - i := Inkey( 0 ) - do case - case i == K_UP - nPercent += .01 - case i == K_DOWN - nPercent -= .01 - case i == K_PGUP - nPercent += .1 - case i == K_PGDN - nPercent -= .1 - end case - - if nPercent < 0 - Tone( 300, 1 ) - nPercent := 0 - endif - - if nPercent > 1 - Tone( 300, 1 ) - nPercent := 1 - endif - - GaugeUpdate( aGauge, nPercent ) - end do - - SetCursor( SC_NORMAL ) - -return nil diff --git a/harbour/contrib/hbclipsm/tests/testnum.prg b/harbour/contrib/hbclipsm/tests/testnum.prg deleted file mode 100644 index 1347204d8b..0000000000 --- a/harbour/contrib/hbclipsm/tests/testnum.prg +++ /dev/null @@ -1,24 +0,0 @@ -/* - * $Id$ - */ - -function Test() - - ? Ceiling( 3.2 ) - ? DToR( 180 ) - ? Floor( 3.2 ) - ? NumAsCurrency( 3000, "$", -1 ) - ? NumAsCurrency( 3000, "$", 1 ) - ? NumAsCurrency( 3000, "Euro", -1 ) - ? NumAsCurrency( 3000, "Euro", 1 ) - ? NumAsLog10( 1 ) - ? NumGetDecimals( 1 ) - ? NumGetDecimals( 1.2345 ) - ? NumGetLen( 1 ) - ? NumGetLen( 1.2345 ) - ? RToD( 180 ) - ? Sign( 0 ) - ? Sign( 33 ) - ? Sign( -33 ) - -return nil diff --git a/harbour/contrib/hbclipsm/tests/teststat.prg b/harbour/contrib/hbclipsm/tests/teststat.prg deleted file mode 100644 index 37e71ea6f9..0000000000 --- a/harbour/contrib/hbclipsm/tests/teststat.prg +++ /dev/null @@ -1,16 +0,0 @@ -/* - * $Id$ - */ - -function test() - - local aStat := StatusNew( 10, 5, "R/N" ) - local i - - CLS - for i := 1 to 40 - StatusUpdate( aStat ) - Inkey( .1 ) - next - -return nil diff --git a/harbour/contrib/hbclipsm/tests/testtime.prg b/harbour/contrib/hbclipsm/tests/testtime.prg deleted file mode 100644 index a6520e381d..0000000000 --- a/harbour/contrib/hbclipsm/tests/testtime.prg +++ /dev/null @@ -1,25 +0,0 @@ -/* - * $Id$ - */ - -function Test() - -? Days( 145604 ) -? SecondsAsDays( 145604 ) - -? AMPM( "01:02:03" ) -? TIMEASAMPM( "01:02:03" ) - -? SECS( "01:02:03" ) -? TIMEASSECONDS( "01:02:03" ) - -? TSTRING( 2000 ) -? TIMEASSTRING( 2000 ) - -? ELAPTIME( "01:02:03", "01:12:03" ) -? TIMEDIFF( "01:02:03", "01:12:03" ) - -? TIMEISVALID( "01:02:03" ) -? TIMEISVALID( "25:02:03" ) - -return nil diff --git a/harbour/contrib/hbclipsm/tests/tststack.prg b/harbour/contrib/hbclipsm/tests/tststack.prg deleted file mode 100644 index c2d37801af..0000000000 --- a/harbour/contrib/hbclipsm/tests/tststack.prg +++ /dev/null @@ -1,26 +0,0 @@ -/* - * $Id$ - */ - -function Test() - - LOCAL a := StackNew() - - ? Valtype( a ) - ? Len( a ) // 0 - StackPush( a, "POWER" ) - ? Len( a ) // 1 - StackPush( a, "HARBOUR" ) - ? Len( a ) // 2 - ? StackPop( a ) // HARBOUR - ? Len( a ) // 1 - ? StackPop( a ) // POWER - ? Len( a ) // 0 - ? StackPop( a ) // NIL - ? Len( a ) // 0 - ? StackIsEmpty( a ) // TRUE - StackPush( a, "HARBOUR" ) - ? StackTop( a ) // HARBOUR - ? StackIsEmpty( a ) // FALSE - -return nil diff --git a/harbour/contrib/hbclipsm/time.c b/harbour/contrib/hbclipsm/time.c deleted file mode 100644 index 3cc3cfe86d..0000000000 --- a/harbour/contrib/hbclipsm/time.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Time functions - * - * Copyright 2000 Jose Lalin - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * 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" - -HB_FUNC_EXTERN( DAYS ); -HB_FUNC_EXTERN( AMPM ); -HB_FUNC_EXTERN( SECS ); -HB_FUNC_EXTERN( TSTRING ); -HB_FUNC_EXTERN( ELAPTIME ); - -/* SECONDSASDAYS( ) --> -*/ -HB_FUNC( SECONDSASDAYS ) -{ - HB_FUNC_EXEC( DAYS ); -} - -/* TIMEASAMPM( ) --> + " am" / " pm" -*/ -HB_FUNC( TIMEASAMPM ) -{ - HB_FUNC_EXEC( AMPM ); -} - -/* TIMEASSECONDS( ) --> -*/ -HB_FUNC( TIMEASSECONDS ) -{ - HB_FUNC_EXEC( SECS ); -} - -/* TIMEASSTRING( ) --> -*/ -HB_FUNC( TIMEASSTRING ) -{ - HB_FUNC_EXEC( TSTRING ); -} - -/* TIMEDIFF( , ) --> -*/ -HB_FUNC( TIMEDIFF ) -{ - HB_FUNC_EXEC( ELAPTIME ); -} - -/* TIMEISVALID( ) --> -*/ -HB_FUNC( TIMEISVALID ) -{ - const char * pszTime = hb_parc( 1 ); - HB_BOOL bRet = HB_FALSE; - - if( pszTime ) - { - if( atol( pszTime ) < 24 && - atol( pszTime + 3 ) < 60 && - atol( pszTime + 6 ) < 60 ) - { - bRet = HB_TRUE; - } - } - - hb_retl( bRet ); -} diff --git a/harbour/contrib/hbclipsm/time87.ch b/harbour/contrib/hbclipsm/time87.ch deleted file mode 100644 index 0bc0b6f413..0000000000 --- a/harbour/contrib/hbclipsm/time87.ch +++ /dev/null @@ -1,10 +0,0 @@ -/* - * $Id$ - */ - -#translate Days( ) => SecondsAsDays( ) -#translate AmPm( ) => TimeAsAMPM( ) -#translate Secs( ) => TimeAsSeconds( ) -#translate TString( ) => TimeAsString( ) -#translate Elaptime( , ) => TimeDiff( , ) -#translate ValidTime( ) => TimeIsValid( ) diff --git a/harbour/contrib/hbplist b/harbour/contrib/hbplist index a8291f885d..c65d9271b5 100644 --- a/harbour/contrib/hbplist +++ b/harbour/contrib/hbplist @@ -8,7 +8,6 @@ hbblat/hbblat.hbp hbblink/hbblink.hbp hbbz2/hbbz2.hbp # uses: bz2 (locally hosted) hbcairo/hbcairo.hbp -hbclipsm/hbclipsm.hbp hbcomm/hbcomm.hbp hbct/hbct.hbp hbcups/hbcups.hbp diff --git a/harbour/doc/dirstruc.txt b/harbour/doc/dirstruc.txt index a8765e1972..af2ad7b079 100644 --- a/harbour/doc/dirstruc.txt +++ b/harbour/doc/dirstruc.txt @@ -53,10 +53,6 @@ track of all files (read the FAQ if you don't know what SVN is). | +---hbbmcdx - DBFCDX RDD with bitmap filters compatible with | | CA-Cl*pper 5.3 | | -| +---hbclipsm - Miscellaneous contribution files. -| | | -| | +---tests - Test programs. -| | | +---hbct - CA-T**ls Compatible Library for Harbour. | | | | | +---tests - Test programs.