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.
This commit is contained in:
Viktor Szakats
2011-11-13 10:42:47 +00:00
parent 7f7d2e8f04
commit 34c3faace9
24 changed files with 11 additions and 1523 deletions

View File

@@ -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

View File

@@ -1,243 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Sample date functions rewritten in C
*
* Copyright 2000 Jose Lalin <dezac@corevia.com>
* 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( <dDate> ) --> "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( <dDate> ) --> "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( <dDate> ) --> <nYears>
*/
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( <dDate>, <nMonths> ) --> <dNewDate>
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( <dDate> ) --> { Year, Month, Day }
NOTE: Returns an empty array if <dDate> 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( { <Year>, <Month>, <Day> } ) --> <dDate>
*/
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( <dDate> ) --> <lIsLeapYear>
*/
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( <nMonth>, <nDay>, <nYear> ) --> <dDate>
*/
HB_FUNC( NTOD )
{
hb_retd( hb_parni( 3 ), hb_parni( 1 ), hb_parni( 2 ) );
}

View File

@@ -1,122 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Sample file functions
*
* Copyright 2000 Jose Lalin <dezac@corevia.com>
* 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( <cFile> ) --> 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( <cFile> ) --> 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( <cFile> ) --> 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( <cFile> ) --> 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();
}

View File

@@ -1,194 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Gauge functions
*
* Copyright 2000 Jose Lalin <dezac@corevia.com>
* 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( <nRowTop>, <nColumnTop>, <nRowBottom>, <nColumnBottom>,
[<cBackgroundColor>],
[<cGaugeColor>],
[<cGaugeCharacter>] ) --> 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 );
}
}

View File

@@ -1,7 +0,0 @@
#
# $Id$
#
incpaths=.
libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF}

View File

@@ -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

View File

@@ -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 <func> */
/* // HB_FUNC_EXCLUDE <func> */
/* -------------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* 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 <fncs,...> => EXTERNAL <fncs>
#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 <fncs,...> => EXTERNAL <fncs>
#endif
#endif

View File

@@ -1,189 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Number manipulation
*
* Copyright 2000 Jose Lalin <dezac@corevia.com>
* 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( <nDegrees> ) --> nRadians
Convert an angle size specified in radians to degrees
*/
HB_FUNC( DTOR )
{
hb_retndlen( ( hb_parnd( 1 ) / 180 ) * PI, 10, 9 );
}
/* NumAsLog10( <nNumber> ) --> nLog10
Convert a positive number to log base 10
*/
HB_FUNC( NUMASLOG10 )
{
if( HB_ISNUM( 1 ) )
hb_retnd( log10( hb_parnd(1) ) );
}
/* NumGetDecimals( <nNumber> ) --> 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( <nNumber> ) --> 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( <nRadians> ) --> nDegrees
Convert an angle size specified in radians to degrees
*/
HB_FUNC( RTOD )
{
hb_retnd( 180 * ( hb_parnd( 1 ) / PI ) );
}
/* Sign( <nNumber> ) --> nSign
Return the sign of a number as follows:
0 - <nNumber> is zero
1 - <nNumber> is positive
-1 - <nNumber> is negative
*/
HB_FUNC( SIGN )
{
if( HB_ISNUM( 1 ) )
{
long lNumber = hb_parnl( 1 );
hb_retni( lNumber == 0 ? 0 : ( lNumber > 0 ? 1 : -1 ) );
}
}
/* NumAsCurrency( <nNumber>, <cSymbol>, <nSide> ) --> 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 );
}

View File

@@ -1,63 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Number manipulation
*
* Copyright 2000 Jose Lalin <dezac@corevia.com>
* 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( <nNumber> ) --> nInteger
Return the smallest integer that is greater than or equal to <nNumber>
*/
HB_FUNC( CEILING )
{
hb_retnl( ( long ) ceil( hb_parnd( 1 ) ) );
}

View File

@@ -1,63 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Number manipulation
*
* Copyright 2000 Jose Lalin <dezac@corevia.com>
* 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( <nNumber> ) --> nInteger
Return the largest integer that is less than or equal to <nNumber>
*/
HB_FUNC( FLOOR )
{
hb_retnl( ( long ) floor( hb_parnd( 1 ) ) );
}

View File

@@ -1,108 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Stack structure
*
* Copyright 2000 Jose Lalin <dezac@corevia.com>
* 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() --> <aStack>
*/
HB_FUNC( STACKNEW )
{
hb_itemReturnRelease( hb_itemArrayNew( 0 ) ); /* Create array */
}
/* StackPush( <aStack>, <xValue> ) --> <aStack>
*/
HB_FUNC( STACKPUSH )
{
hb_arrayAdd( hb_param( 1, HB_IT_ARRAY ),
hb_param( 2, HB_IT_ANY ) );
}
/* StackPop( <aStack> ) --> <xValue>
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( <aStack> ) --> <lEmpty>
*/
HB_FUNC( STACKISEMPTY )
{
hb_retl( hb_arrayLen( hb_param( 1, HB_IT_ARRAY ) ) == 0 );
}
/* StackTop( <aStack> ) --> <xValue>
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 );
}

View File

@@ -1,102 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Moving indicator for large processes
*
* Copyright 2000 Jose Lalin <dezac@corevia.com>
* 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( [<nRow>], [<nCol>], [<cColor>] ) --> <aStat>
*/
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( <aStat> ) --> 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 );
}
}

View File

@@ -1,7 +0,0 @@
#
# $Id$
#
../hbclipsm.hbc
-w3 -es2

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1,115 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Time functions
*
* Copyright 2000 Jose Lalin <dezac@corevia.com>
* 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( <nSeconds> ) --> <nDays>
*/
HB_FUNC( SECONDSASDAYS )
{
HB_FUNC_EXEC( DAYS );
}
/* TIMEASAMPM( <cTime> ) --> <cTime> + " am" / " pm"
*/
HB_FUNC( TIMEASAMPM )
{
HB_FUNC_EXEC( AMPM );
}
/* TIMEASSECONDS( <cTime> ) --> <nSecondsFromMidnight>
*/
HB_FUNC( TIMEASSECONDS )
{
HB_FUNC_EXEC( SECS );
}
/* TIMEASSTRING( <nSeconds> ) --> <cTime>
*/
HB_FUNC( TIMEASSTRING )
{
HB_FUNC_EXEC( TSTRING );
}
/* TIMEDIFF( <cStartTime>, <cEndTime> ) --> <cDiffTime>
*/
HB_FUNC( TIMEDIFF )
{
HB_FUNC_EXEC( ELAPTIME );
}
/* TIMEISVALID( <cTime> ) --> <lValid>
*/
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 );
}

View File

@@ -1,10 +0,0 @@
/*
* $Id$
*/
#translate Days( <nSeconds> ) => SecondsAsDays( <nSeconds> )
#translate AmPm( <cTime> ) => TimeAsAMPM( <cTime> )
#translate Secs( <cTime> ) => TimeAsSeconds( <cTime> )
#translate TString( <nSeconds> ) => TimeAsString( <nSeconds> )
#translate Elaptime( <cStartTime>, <cEndTime> ) => TimeDiff( <cStartTime>, <cEndTime> )
#translate ValidTime( <cTime> ) => TimeIsValid( <cTime> )

View File

@@ -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

View File

@@ -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.