See ChangeLog entry 19990616-23:30 EDT David G. Holm <dholm@jsd-llc.com>

This commit is contained in:
David G. Holm
1999-06-17 04:43:23 +00:00
parent 887ef3cdc6
commit 76558fe6f7
13 changed files with 539 additions and 457 deletions

View File

@@ -1,3 +1,33 @@
19990616-23:30 EDT David G. Holm <dholm@jsd-llc.com>
* makefile.icc
- Added or corrected various include file dependencies
* include/error.api
- Moved all #defines to errorapi.h
- Added "#include <errorapi.h>"
- Added #defines to convert all _errFunctions to hb_errFunctions
+ include/errorapi.h
- Added function declarations for all hb_errFunctions
- Moved all #defines from error.api and errorapi.c
* source/rtl/arrays.c
- Convert all _errFunctions to hb_errFunctions
* source/rtl/classes.c
- Convert all _errFunctions to hb_errFunctions
* source/rtl/dates.c
- Convert all _errFunctions to hb_errFunctions
* source/rtl/errorapi.c
- Convert all _errFunctions to hb_errFunctions
* source/rtl/math.c
- Convert all _errFunctions to hb_errFunctions
- Added ( char * ) override to _xgrab() call in HB_ROUND()
* source/rtl/set.c
- Convert all _errFunctions to hb_errFunctions
* source/rtl/strings.c
- Convert all _errFunctions to hb_errFunctions
* source/rtl/transfrm.c
- Convert all _errFunctions to hb_errFunctions
* source/vm/hvm.c
- Convert all _errFunctions to hb_errFunctions
19990616-22:50 EDT David G. Holm <dholm@jsd-llc.com>
* source/hbpp/hbppint.c
- Added ParseDefine( "__HARBOUR__" ) to Hbpp_init()

View File

@@ -1,31 +1,32 @@
// error.api
// error.api
//
#ifndef _ERROR_API
#define _ERROR_API
//+
// Harbour project
//
// 99.04.25 initial posting.
// compatible
// 99.04.25 initial posting.
// compatible
//-
#include "error.ch"
#include "errorapi.h"
//
// error flag definations
//
#define EF_CANRETRY 1
#define EF_CANDEFAULT 4
//
// error codes (returned from _errLaunch())
//
#define E_BREAK 0xffff
#define E_RETRY 1
#define E_DEFAULT 0
#define _errNew hb_errNew
#define _errGetDescription hb_errGetDescription
#define _errPutDescription hb_errPutDescription
#define _errGetFileName hb_errGetFileName
#define _errPutFileNaem hb_errPutFileName
#define _errGetGenCode hb_errGetGenCode
#define _errPutGenCode hb_errPutGenCode
#define _errGetOperation hb_errGetOperation
#define _errPutOperation hb_errPutOperation
#define _errGetOsCode hb_errGetOsCode
#define _errPutOsCode hb_errPutOsCode
#define _errPutSeverity hb_errPutSeverity
#define _errPutSubCode hb_errPutSubCode
#define _errPutSubSystem hb_errPutSubSystem
#define _errPutTries hb_errPutTries
#define _errLaunch hb_errLaunch
#define _errRelease hb_errRelease
#endif

View File

@@ -0,0 +1,48 @@
// error.api
//
#ifndef _ERROR_H
#define _ERROR_H
//+
// Harbour project
//
// 99.04.25 initial posting.
// compatible
//-
#include "error.ch"
//
// error flag definations
//
#define EF_CANRETRY 1
#define EF_CANDEFAULT 4
//
// error codes (returned from _errLaunch())
//
#define E_BREAK 0xffff
#define E_RETRY 1
#define E_DEFAULT 0
PHB_ITEM hb_errNew( void );
char * hb_errGetDescription( PHB_ITEM pError );
PHB_ITEM hb_errPutDescription( PHB_ITEM pError, char * szDescription );
char * hb_errGetFileName( PHB_ITEM pError );
PHB_ITEM hb_errPutFileName( PHB_ITEM pError, char * szFileName );
USHORT hb_errGetGenCode( PHB_ITEM pError );
PHB_ITEM hb_errPutGenCode( PHB_ITEM pError, USHORT uiGenCode );
char * hb_errGetOperation( PHB_ITEM pError );
PHB_ITEM hb_errPutOperation( PHB_ITEM pError, char * szOperation );
USHORT hb_errGetOsCode( PHB_ITEM pError );
PHB_ITEM hb_errPutOsCode( PHB_ITEM pError, USHORT uiOsCode );
PHB_ITEM hb_errPutSeverity( PHB_ITEM pError, USHORT uiSeverity );
PHB_ITEM hb_errPutSubCode( PHB_ITEM pError, USHORT uiSubCode );
PHB_ITEM hb_errPutSubSystem( PHB_ITEM pError, char * szSubSystem );
PHB_ITEM hb_errPutTries( PHB_ITEM pError, USHORT uiTries );
WORD hb_errLaunch( PHB_ITEM pError );
void hb_errRelease( PHB_ITEM pError );
#endif

View File

@@ -86,16 +86,16 @@ $(path_obj)\gtos2.obj : {$(path_c)}gtos2.c $(path_h)\extend.h $(path_h)\types.
icc /C+ $(c_opt) /Fo$@ /Tpsource\rtl\gt\gtos2.c
ilib .\libs\icc\terminal.lib -+$@,,
$(path_obj)\arrays.obj : {$(path_c)}arrays.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\itemapi.h $(path_h)\ctoharb.h
$(path_obj)\classes.obj : {$(path_c)}classes.c $(path_h)\extend.h $(path_h)\types.h
$(path_obj)\arrays.obj : {$(path_c)}arrays.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\itemapi.h $(path_h)\errorapi.h $(path_h)\ctoharb.h $(path_h)\error.ch
$(path_obj)\classes.obj : {$(path_c)}classes.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\errorapi.h $(path_h)\ctoharb.h $(path_h)\error.ch
$(path_obj)\codebloc.obj : {$(path_c)}codebloc.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\itemapi.h
$(path_obj)\dates.obj : {$(path_c)}dates.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\dates.h $(path_h)\set.h
$(path_obj)\dates.obj : {$(path_c)}dates.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\dates.h $(path_h)\set.h $(path_h)\errorapi.h $(path_h)\error.ch
$(path_obj)\datesx.obj : {$(path_c)}datesx.c $(path_h)\extend.h $(path_h)\types.h
$(path_obj)\debug.obj : {$(path_c)}debug.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\ctoharb.h $(path_h)\itemapi.h
$(path_obj)\debug.obj : {$(path_c)}debug.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\itemapi.h $(path_h)\ctoharb.h
$(path_obj)\descend.obj : {$(path_c)}descend.c $(path_h)\extend.h $(path_h)\types.h
$(path_obj)\dir.obj : {$(path_c)}dir.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\ctoharb.h $(path_h)\itemapi.h
$(path_obj)\dir.obj : {$(path_c)}dir.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\itemapi.h
$(path_obj)\environ.obj : {$(path_c)}environ.c $(path_h)\extend.h $(path_h)\types.h
$(path_obj)\errorapi.obj : {$(path_c)}errorapi.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\ctoharb.h
$(path_obj)\errorapi.obj : {$(path_c)}errorapi.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\errorapi.h $(path_h)\error.ch $(path_h)\ctoharb.h
$(path_obj)\extend.obj : {$(path_c)}extend.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\set.h
$(path_obj)\files.obj : {$(path_c)}files.c $(path_h)\extend.h $(path_h)\types.h
$(path_obj)\gtapi.obj : {$(path_c)}gtapi.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\gtapi.h
@@ -103,15 +103,15 @@ $(path_obj)\hardcr.obj : {$(path_c)}hardcr.c $(path_h)\extend.h $(path_h)\ty
$(path_obj)\hb_f.obj : {$(path_c)}hb_f.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\filesys.h
$(path_obj)\io.obj : {$(path_c)}io.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\filesys.h
$(path_obj)\initsymb.obj : {$(path_c)}initsymb.c $(path_h)\extend.h $(path_h)\types.h
$(path_obj)\itemapi.obj : {$(path_c)}itemapi.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\ctoharb.h $(path_h)\itemapi.h $(path_h)\set.h
$(path_obj)\math.obj : {$(path_c)}math.c $(path_h)\extend.h $(path_h)\types.h
$(path_obj)\itemapi.obj : {$(path_c)}itemapi.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\itemapi.h $(path_h)\set.h $(path_h)\ctoharb.h
$(path_obj)\math.obj : {$(path_c)}math.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\errorapi.h $(path_h)\error.ch
$(path_obj)\mathx.obj : {$(path_c)}mathx.c $(path_h)\extend.h $(path_h)\types.h
$(path_obj)\mtran.obj : {$(path_c)}mtran.c $(path_h)\extend.h $(path_h)\types.h
$(path_obj)\set.obj : {$(path_c)}set.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\set.h
$(path_obj)\set.obj : {$(path_c)}set.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\set.h $(path_h)\errorapi.h $(path_h)\error.ch
$(path_obj)\strcmp.obj : {$(path_c)}strcmp.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\set.h
$(path_obj)\strings.obj : {$(path_c)}strings.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\set.h
$(path_obj)\strings.obj : {$(path_c)}strings.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\set.h $(path_h)\errorapi.h $(path_h)\error.ch
$(path_obj)\stringsx.obj : {$(path_c)}stringsx.c $(path_h)\extend.h $(path_h)\types.h
$(path_obj)\transfrm.obj : {$(path_c)}transfrm.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\ctoharb.h $(path_h)\set.h
$(path_obj)\transfrm.obj : {$(path_c)}transfrm.c $(path_h)\extend.h $(path_h)\types.h $(path_h)\set.h $(path_h)\errorapi.h $(path_h)\ctoharb.h $(path_h)\error.ch
$(path_obj)\asciisum.obj : {$(path_c)}asciisum.c $(path_h)\extend.h $(path_h)\types.h
$(path_obj)\ascpos.obj : {$(path_c)}ascpos.c $(path_h)\extend.h $(path_h)\types.h

View File

@@ -4,6 +4,7 @@
#include <itemapi.h>
#include <extend.h>
#include <errorapi.h>
#include <ctoharb.h>
HARBOUR HB_AADD(void);
@@ -95,18 +96,18 @@ void hb_arrayGet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem )
ItemCopy( pItem, ( ( PBASEARRAY ) pArray->value.pBaseArray )->pItems + ( ulIndex - 1 ) );
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szBoundError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szBoundError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -125,18 +126,18 @@ char *hb_arrayGetString( PHB_ITEM pArray, ULONG ulIndex )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szBoundError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szBoundError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
return "";
}
@@ -156,18 +157,18 @@ ULONG hb_arrayGetStringLen( PHB_ITEM pArray, ULONG ulIndex )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szBoundError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szBoundError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
return 0;
}
@@ -183,10 +184,10 @@ int hb_arrayGetType( PHB_ITEM pArray, ULONG ulIndex )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, "Bound error: Array access" );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, "Bound error: Array access" );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
return 0;
@@ -207,10 +208,10 @@ ULONG hb_arrayLen( PHB_ITEM pArray )
return ( ( PBASEARRAY ) pArray->value.pBaseArray )->ulLen;
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
return 0;
}
@@ -223,18 +224,18 @@ void hb_arraySet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem )
ItemCopy( ( ( PBASEARRAY ) pArray->value.pBaseArray )->pItems + ( ulIndex - 1 ), pItem );
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szBoundError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szBoundError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -274,10 +275,10 @@ void hb_arraySize( PHB_ITEM pArray, ULONG ulLen )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -304,10 +305,10 @@ void hb_arrayFill( PHB_ITEM pArray, PHB_ITEM pValue, ULONG ulStart, ULONG ulCoun
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -330,18 +331,18 @@ void hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szBoundError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szBoundError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -364,18 +365,18 @@ void hb_arrayIns( PHB_ITEM pArray, ULONG ulIndex )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szBoundError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szBoundError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -449,10 +450,10 @@ int hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, ULONG ulStart, ULONG ulCount
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
return 0;
}
@@ -487,10 +488,10 @@ void hb_arrayEval( PHB_ITEM pArray, PHB_ITEM bBlock, ULONG ulStart, ULONG ulCoun
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -516,10 +517,10 @@ void hb_arrayRelease( PHB_ITEM pArray )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -557,10 +558,10 @@ void hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArray, ULONG ulStart,
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -597,10 +598,10 @@ PHB_ITEM hb_arrayClone( PHB_ITEM pSrcArray )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
PHB_ITEM pError = hb_errNew();
hb_errPutDescription( pError, szArgumentError );
hb_errLaunch( pError );
hb_errRelease( pError );
}
return pDstArray;
}

View File

@@ -3,6 +3,7 @@
*/
#include <extend.h>
#include <errorapi.h>
#include <itemapi.h>
#include <ctoharb.h>
@@ -438,10 +439,10 @@ HARBOUR HB_CLASSMOD(void)
_param( 3, IT_BLOCK ) );
else if( ( pFunc == SetData ) || ( pFunc == GetData ) )
{ /* Not allowed for DATA */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "CLASSMOD: Cannot modify a DATA item");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "CLASSMOD: Cannot modify a DATA item");
hb_errLaunch(pError);
hb_errRelease(pError);
}
else /* Modify METHOD */
pClass->pMethods[ wAt ].pFunction = ( HARBOURFUNC ) _parnl( 3 );
@@ -762,10 +763,10 @@ HARBOUR HB_ISMESSAGE(void)
_retl( hb_isMessage( pObject, pString->value.szText ) != 0 );
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: ISMESSAGE");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: ISMESSAGE");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -788,10 +789,10 @@ HARBOUR HB_OCLONE( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: OCLONE");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: OCLONE");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -818,10 +819,10 @@ HARBOUR HB_OSEND(void)
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: OSEND");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: OSEND");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -962,10 +963,10 @@ HARBOUR HB___INSTSUPER( void )
if( !IS_OBJECT( &stack.Return ) )
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "INSTSUPER : Super class does not return an object");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "INSTSUPER : Super class does not return an object");
hb_errLaunch(pError);
hb_errRelease(pError);
}
for( w = 0; !bFound && w < wClasses; w++ )
@@ -979,10 +980,10 @@ HARBOUR HB___INSTSUPER( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "INSTSUPER : Cannot find super class");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "INSTSUPER : Cannot find super class");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
if( !bFound )

View File

@@ -3,6 +3,7 @@
*/
#include <extend.h>
#include <errorapi.h>
#include <set.h>
#include <ctype.h>
#include <time.h>
@@ -392,19 +393,19 @@ HARBOUR HB_DTOS( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: DTOS");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: DTOS");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: DTOS");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: DTOS");
hb_errLaunch(pError);
hb_errRelease(pError);
}
#endif
}
@@ -427,10 +428,10 @@ HARBOUR HB_DAY( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Error BASE/1114 Argument error: DAY");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Error BASE/1114 Argument error: DAY");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -447,10 +448,10 @@ HARBOUR HB_MONTH( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Error BASE/1113 Argument error: MONTH");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Error BASE/1113 Argument error: MONTH");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -467,10 +468,10 @@ HARBOUR HB_YEAR( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Error BASE/1112 Argument error: YEAR");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Error BASE/1112 Argument error: YEAR");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -491,10 +492,10 @@ oTime->tm_sec);
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: TIME");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: TIME");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -515,10 +516,10 @@ oTime->tm_mday);
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: DATE");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: DATE");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
long hb_dow( long d, long m, long y )
@@ -553,10 +554,10 @@ HARBOUR HB_DOW( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Error BASE/1115 Argument error: DOW");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Error BASE/1115 Argument error: DOW");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -574,19 +575,19 @@ HARBOUR HB_CMONTH( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Error BASE/1116 Argument error: CMONTH");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Error BASE/1116 Argument error: CMONTH");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: CMONTH");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: CMONTH");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -604,19 +605,19 @@ HARBOUR HB_CDOW( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Error BASE/1117 Argument error: CDOW");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Error BASE/1117 Argument error: CDOW");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: CDOW");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: CDOW");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -627,9 +628,9 @@ HARBOUR HB_SECONDS( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: SECONDS");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: SECONDS");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}

View File

@@ -5,21 +5,16 @@
#include <extend.h>
#include <ctoharb.h>
#include <itemapi.h>
#include <errorapi.h>
#define EF_CANRETRY 1
#define EF_CANDEFAULT 4
/* error codes ( returned from hb_errLaunch() ) */
/* error codes ( returned from _errLaunch() ) */
#define E_BREAK 0xffff
#define E_RETRY 1
#define E_DEFAULT 0
extern HB_ITEM errorBlock;
extern STACK stack;
extern SYMBOL symEval;
PHB_ITEM _errNew( void )
PHB_ITEM hb_errNew( void )
{
PHB_ITEM pReturn = hb_itemNew( NULL );
@@ -32,7 +27,7 @@ PHB_ITEM _errNew( void )
return pReturn;
}
char * _errGetDescription( PHB_ITEM pError )
char * hb_errGetDescription( PHB_ITEM pError )
{
PushSymbol( GetDynSym( "DESCRIPTION" )->pSymbol );
Push( pError );
@@ -40,7 +35,7 @@ char * _errGetDescription( PHB_ITEM pError )
return stack.Return.value.szText;
}
PHB_ITEM _errPutDescription( PHB_ITEM pError, char * szDescription )
PHB_ITEM hb_errPutDescription( PHB_ITEM pError, char * szDescription )
{
PushSymbol( GetDynSym( "_DESCRIPTION" )->pSymbol );
Push( pError );
@@ -50,7 +45,7 @@ PHB_ITEM _errPutDescription( PHB_ITEM pError, char * szDescription )
return pError;
}
char * _errGetFileName( PHB_ITEM pError )
char * hb_errGetFileName( PHB_ITEM pError )
{
PushSymbol( GetDynSym( "FILENAME" )->pSymbol );
Push( pError );
@@ -58,7 +53,7 @@ char * _errGetFileName( PHB_ITEM pError )
return stack.Return.value.szText;
}
PHB_ITEM _errPutFileName( PHB_ITEM pError, char * szFileName )
PHB_ITEM hb_errPutFileName( PHB_ITEM pError, char * szFileName )
{
PushSymbol( GetDynSym( "_FILENAME" )->pSymbol );
Push( pError );
@@ -67,7 +62,7 @@ PHB_ITEM _errPutFileName( PHB_ITEM pError, char * szFileName )
return pError;
}
USHORT _errGetGenCode( PHB_ITEM pError )
USHORT hb_errGetGenCode( PHB_ITEM pError )
{
PushSymbol( GetDynSym( "GENCODE" )->pSymbol );
Push( pError );
@@ -75,7 +70,7 @@ USHORT _errGetGenCode( PHB_ITEM pError )
return stack.Return.value.iNumber;
}
PHB_ITEM _errPutGenCode( PHB_ITEM pError, USHORT uiGenCode )
PHB_ITEM hb_errPutGenCode( PHB_ITEM pError, USHORT uiGenCode )
{
PushSymbol( GetDynSym( "_GENCODE" )->pSymbol );
Push( pError );
@@ -84,7 +79,7 @@ PHB_ITEM _errPutGenCode( PHB_ITEM pError, USHORT uiGenCode )
return pError;
}
char * _errGetOperation( PHB_ITEM pError )
char * hb_errGetOperation( PHB_ITEM pError )
{
PushSymbol( GetDynSym( "OPERATION" )->pSymbol );
Push( pError );
@@ -92,7 +87,7 @@ char * _errGetOperation( PHB_ITEM pError )
return stack.Return.value.szText;
}
PHB_ITEM _errPutOperation( PHB_ITEM pError, char * szOperation )
PHB_ITEM hb_errPutOperation( PHB_ITEM pError, char * szOperation )
{
PushSymbol( GetDynSym( "_OPERATION" )->pSymbol );
Push( pError );
@@ -101,7 +96,7 @@ PHB_ITEM _errPutOperation( PHB_ITEM pError, char * szOperation )
return pError;
}
USHORT _errGetOsCode( PHB_ITEM pError )
USHORT hb_errGetOsCode( PHB_ITEM pError )
{
PushSymbol( GetDynSym( "OSCODE" )->pSymbol );
Push( pError );
@@ -109,7 +104,7 @@ USHORT _errGetOsCode( PHB_ITEM pError )
return stack.Return.value.iNumber;
}
PHB_ITEM _errPutOsCode( PHB_ITEM pError, USHORT uiOsCode )
PHB_ITEM hb_errPutOsCode( PHB_ITEM pError, USHORT uiOsCode )
{
PushSymbol( GetDynSym( "_OSCODE" )->pSymbol );
Push( pError );
@@ -118,7 +113,7 @@ PHB_ITEM _errPutOsCode( PHB_ITEM pError, USHORT uiOsCode )
return pError;
}
PHB_ITEM _errPutSeverity( PHB_ITEM pError, USHORT uiSeverity )
PHB_ITEM hb_errPutSeverity( PHB_ITEM pError, USHORT uiSeverity )
{
PushSymbol( GetDynSym( "_SEVERITY" )->pSymbol );
Push( pError );
@@ -127,7 +122,7 @@ PHB_ITEM _errPutSeverity( PHB_ITEM pError, USHORT uiSeverity )
return pError;
}
PHB_ITEM _errPutSubCode( PHB_ITEM pError, USHORT uiSubCode )
PHB_ITEM hb_errPutSubCode( PHB_ITEM pError, USHORT uiSubCode )
{
PushSymbol( GetDynSym( "_SUBCODE" )->pSymbol );
Push( pError );
@@ -136,7 +131,7 @@ PHB_ITEM _errPutSubCode( PHB_ITEM pError, USHORT uiSubCode )
return pError;
}
PHB_ITEM _errPutSubSystem( PHB_ITEM pError, char * szSubSystem )
PHB_ITEM hb_errPutSubSystem( PHB_ITEM pError, char * szSubSystem )
{
PushSymbol( GetDynSym( "_SUBSYSTEM" )->pSymbol );
Push( pError );
@@ -145,7 +140,7 @@ PHB_ITEM _errPutSubSystem( PHB_ITEM pError, char * szSubSystem )
return pError;
}
PHB_ITEM _errPutTries( PHB_ITEM pError, USHORT uiTries )
PHB_ITEM hb_errPutTries( PHB_ITEM pError, USHORT uiTries )
{
PushSymbol( GetDynSym( "_TRIES" )->pSymbol );
Push( pError );
@@ -154,7 +149,7 @@ PHB_ITEM _errPutTries( PHB_ITEM pError, USHORT uiTries )
return pError;
}
WORD _errLaunch( PHB_ITEM pError )
WORD hb_errLaunch( PHB_ITEM pError )
{
PushSymbol( &symEval );
Push( &errorBlock );
@@ -164,7 +159,7 @@ WORD _errLaunch( PHB_ITEM pError )
return stack.Return.value.iNumber; /* TODO: _parnl( -1 ) */
}
void _errRelease( PHB_ITEM pError )
void hb_errRelease( PHB_ITEM pError )
{
hb_itemRelease( pError );
}

View File

@@ -3,6 +3,7 @@
*/
#include <extend.h>
#include <errorapi.h>
#include <math.h>
extern STACK stack;
@@ -39,7 +40,7 @@ HARBOUR HB_ABS( void )
if( _pcount() == 1 )
{
PHB_ITEM pNumber = _param(1, IT_NUMERIC);
if( pNumber ) switch( pNumber->wType )
{
case IT_INTEGER:
@@ -48,14 +49,14 @@ HARBOUR HB_ABS( void )
else
_retni( -pNumber->value.iNumber );
break;
case IT_LONG:
if( pNumber->value.lNumber >= 0 )
_retnl( pNumber->value.lNumber );
else
_retnl( -pNumber->value.lNumber );
break;
case IT_DOUBLE:
if( pNumber->value.dNumber >= 0.0 )
_retnd( pNumber->value.dNumber );
@@ -64,19 +65,19 @@ HARBOUR HB_ABS( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: ABS");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: ABS");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: ABS");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: ABS");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -92,19 +93,19 @@ HARBOUR HB_EXP( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: EXP");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: EXP");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: EXP");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: EXP");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -116,19 +117,19 @@ HARBOUR HB_INT( void )
_retnl( _parnd( 1 ) );
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: INT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: INT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: INT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: INT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -149,19 +150,19 @@ HARBOUR HB_LOG( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: LOG");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: LOG");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: LOG");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: LOG");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -187,19 +188,19 @@ HARBOUR HB_MAX( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: MAX");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: MAX");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: MAX");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: MAX");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -225,19 +226,19 @@ HARBOUR HB_MIN( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: MIN");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: MIN");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: MIN");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: MIN");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -245,14 +246,14 @@ HARBOUR HB_MOD( void )
{
/*
FUNCTION MOD(cl_num, cl_base)
LOCAL cl_result
cl_result = cl_num % cl_base
cl_result = cl_num % cl_base
RETURN IF( cl_base = 0, ;
cl_num,;
IF(cl_result * cl_base < 0, cl_result + cl_base, cl_result) )
RETURN IF( cl_base = 0, ;
cl_num,;
IF(cl_result * cl_base < 0, cl_result + cl_base, cl_result) )
*/
PHB_ITEM pNumber = _param(1, IT_NUMERIC);
PHB_ITEM pBase = _param(2, IT_NUMERIC);
@@ -266,7 +267,7 @@ FUNCTION MOD(cl_num, cl_base)
if( dBase )
{
dResult = dNumber - ((long)(dNumber / dBase) * dBase);
if( dResult * dBase < 0 )
_retnd(dResult + dBase);
else
@@ -301,7 +302,7 @@ HARBOUR HB_ROUND( void )
dResult = floor( dResult * dAdjust + 0.5 );
dResult = dResult / dAdjust;
}
szResult = _xgrab( iSize + iDec );
szResult = ( char * )_xgrab( iSize + iDec );
if( szResult )
{
sprintf( szResult, "%*.*f", iSize, iDec, dResult );
@@ -313,19 +314,19 @@ HARBOUR HB_ROUND( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: ROUND");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: ROUND");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: INT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: INT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -347,19 +348,19 @@ HARBOUR HB_SQRT( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: SQRT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: SQRT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: SQRT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: SQRT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}

View File

@@ -8,6 +8,7 @@
#include <ctype.h>
#include <extend.h>
#include <errorapi.h>
#include <fcntl.h>
#include <io.h>
#include <sys/stat.h>
@@ -15,7 +16,7 @@
#include <errno.h>
#ifndef O_BINARY
#define O_BINARY 0 /* O_BINARY not defined on Linux */
#define O_BINARY 0 /* O_BINARY not defined on Linux */
#endif
HB_set_struct hb_set;
@@ -100,7 +101,7 @@ static int open_handle (char * file_name, BOOL bMode, char * def_ext)
BOOL bExt = FALSE, bSep = FALSE;
long index;
char path [_POSIX_PATH_MAX + 1];
/* Check to see if the file name has an extension? */
for (index = strlen (file_name); index; index--)
{
@@ -139,16 +140,16 @@ static int open_handle (char * file_name, BOOL bMode, char * def_ext)
/* Open the file either in append (bMode) or truncate mode (!bMode), but
always use binary mode */
handle = open (path,
O_BINARY|O_WRONLY|O_CREAT|(bMode?O_APPEND:O_TRUNC),
S_IWRITE );
O_BINARY|O_WRONLY|O_CREAT|(bMode?O_APPEND:O_TRUNC),
S_IWRITE );
if (handle < 0)
{
char error_message [32];
PHB_ITEM pError = _errNew();
PHB_ITEM pError = hb_errNew();
sprintf( error_message, "create error %d: SET", errno );
_errPutDescription(pError, error_message);
_errLaunch(pError);
_errRelease(pError);
hb_errPutDescription(pError, error_message);
hb_errLaunch(pError);
hb_errRelease(pError);
}
return handle;
}
@@ -162,7 +163,7 @@ HARBOUR HB_SETCENTURY (void)
/* Start by returning the current setting */
_retl (hb_set_century);
/*
/*
* Then change the setting if the parameter is a logical value, or is
* either "ON" or "OFF" (regardless of case)
*/
@@ -196,7 +197,7 @@ HARBOUR HB_SETCENTURY (void)
for (count = 0; count < size; count++)
{
digit = toupper (szDateFormat [count]);
if (digit == 'Y')
if (digit == 'Y')
{
if (y_start == -1) y_start = count;
}
@@ -236,7 +237,7 @@ HARBOUR HB_SETFIXED (void)
/* Start by returning the current setting */
_retl (hb_set_fixed);
/*
/*
* Then change the setting if the parameter is a logical value, or is
* either "ON" or "OFF" (regardless of case)
*/
@@ -507,7 +508,7 @@ void InitializeSets (void)
*hb_set.HB_SET_PATH = 0;
hb_set.HB_SET_PRINTER = FALSE;
hb_set.HB_SET_PRINTFILE = (char*)_xgrab (4);
memcpy (hb_set.HB_SET_PRINTFILE, "PRN", 4); /* Default printer device */
memcpy (hb_set.HB_SET_PRINTFILE, "PRN", 4); /* Default printer device */
hb_set.HB_SET_SCOREBOARD = TRUE;
hb_set.HB_SET_SCROLLBREAK = TRUE;
hb_set.HB_SET_SOFTSEEK = FALSE;

View File

@@ -3,6 +3,7 @@
*/
#include <extend.h>
#include <errorapi.h>
#include <ctype.h>
#include <set.h>
@@ -151,19 +152,19 @@ HARBOUR HB_LTRIM( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: LTRIM");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: LTRIM");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: LTRIM");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: LTRIM");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -203,10 +204,10 @@ HARBOUR HB_RTRIM( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: RTRIM");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: RTRIM");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -379,7 +380,7 @@ ULONG hb_strAt(char *szSub, long lSubLen, char *szText, long lLen)
}
/* locates a substring in a string */
/* TEST: QOUT( "at( 'cde', 'abcdefgfedcba' ) = '" + at( 'cde', 'abcdefgfedcba' ) + "'" ) */
/* TEST: QOUT( "at( 'cde', 'abcdefgfedcba' ) = '" + at( 'cde', 'abcsefgfedcba' ) + "'" ) */
HARBOUR HB_AT( void )
{
PHB_ITEM pSub = _param(1, IT_ANY);
@@ -393,19 +394,19 @@ HARBOUR HB_AT( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: AT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: AT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: AT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: AT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -458,19 +459,19 @@ HARBOUR HB_CHR( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: CHR");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: CHR");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: CHR");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: CHR");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -490,19 +491,19 @@ HARBOUR HB_ASC(void)
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: ASC");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: ASC");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: ASC");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: ASC");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -531,27 +532,27 @@ HARBOUR HB_LEFT( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: LEFT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: LEFT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: LEFT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: LEFT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: LEFT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: LEFT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -580,27 +581,27 @@ HARBOUR HB_RIGHT( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: RIGHT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: RIGHT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: RIGHT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: RIGHT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: RIGHT");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: RIGHT");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -652,19 +653,19 @@ HARBOUR HB_SUBSTR( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: SUBSTR");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: SUBSTR");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: SUBSTR");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: SUBSTR");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -692,19 +693,19 @@ HARBOUR HB_LOWER( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: LOWER");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: LOWER");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: LOWER");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: LOWER");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -732,19 +733,19 @@ HARBOUR HB_UPPER( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: LOWER");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: LOWER");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: LOWER");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: LOWER");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -782,19 +783,19 @@ HARBOUR HB_REPLICATE( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: REPLICATE");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: REPLICATE");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: REPLICATE");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: REPLICATE");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -823,19 +824,19 @@ HARBOUR HB_SPACE( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: SPACE");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: SPACE");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: SPACE");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: SPACE");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
@@ -1061,26 +1062,26 @@ HARBOUR HB_VAL( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: VAL");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: VAL");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: VAL");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: VAL");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
/* converts a numeric to a string with optional width & precision.
This function should be used by any function that wants to format numeric
data for displaying, printing, or putting in a database.
Note: The caller is responsible for calling _xfree to free the results buffer,
but ONLY if the return value is not a NULL pointer!
*/
@@ -1139,7 +1140,7 @@ char * hb_str( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec )
/* We at least have a width value */
int iBytes;
int iSize = (iDec ? iWidth + 1 + iDec : iWidth);
/* Be paranoid and use a large amount of padding */
szResult = (char *)_xgrab( iWidth + iDec + 64 );
@@ -1227,18 +1228,18 @@ HARBOUR HB_STR( void )
}
else
{
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: STR");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Argument error: STR");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}
else
{
/* QUESTION: Clipper catches this at compile time! */
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: STR");
_errLaunch(pError);
_errRelease(pError);
PHB_ITEM pError = hb_errNew();
hb_errPutDescription(pError, "Incorrect number of arguments: STR");
hb_errLaunch(pError);
hb_errRelease(pError);
}
}

View File

@@ -3,6 +3,7 @@
*/
#include <extend.h>
#include <errorapi.h>
#include <ctoharb.h>
#include <ctype.h>
#include <set.h>
@@ -536,7 +537,7 @@ HARBOUR HB_TRANSFORM( void )
{
for( n = lPic; n; n--)
szResult[lResultPos++] = *szPic; /* Export remainder */
}
}
_retclen(szResult, lResultPos);
_xfree(szResult);
break;
@@ -623,22 +624,22 @@ HARBOUR HB_TRANSFORM( void )
}
default:
{
PHB_ITEM pError = _errNew();
PHB_ITEM pError = hb_errNew();
_errPutDescription(pError, "Argument error: TRANSFORM");
_errLaunch(pError);
_errRelease(pError);
hb_errPutDescription(pError, "Argument error: TRANSFORM");
hb_errLaunch(pError);
hb_errRelease(pError);
_retc("");
}
}
}
else
{
PHB_ITEM pError = _errNew();
PHB_ITEM pError = hb_errNew();
_errPutDescription(pError, "Argument error: TRANSFORM");
_errLaunch(pError);
_errRelease(pError);
hb_errPutDescription(pError, "Argument error: TRANSFORM");
hb_errLaunch(pError);
hb_errRelease(pError);
_retc("");
}
}
@@ -686,11 +687,11 @@ HARBOUR HB_TRANSFORM( void )
}
default:
{
PHB_ITEM pError = _errNew();
PHB_ITEM pError = hb_errNew();
_errPutDescription(pError, "Argument error: TRANSFORM");
_errLaunch(pError);
_errRelease(pError);
hb_errPutDescription(pError, "Argument error: TRANSFORM");
hb_errLaunch(pError);
hb_errRelease(pError);
_retc("");
}
}

View File

@@ -22,6 +22,7 @@
#include "hbsetup.h" /* main configuration file */
#include <extend.h>
#include <errorapi.h>
#include <pcode.h>
#include <set.h>
@@ -596,10 +597,10 @@ void And( void )
}
else
{
pError = _errNew();
_errPutDescription( pError, "Argument error: conditional" );
_errLaunch( pError );
_errRelease( pError );
pError = hb_errNew();
hb_errPutDescription( pError, "Argument error: conditional" );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -1044,10 +1045,10 @@ void Inc( void )
}
else
{
pError = _errNew();
_errPutDescription( pError, "Error BASE/1086 Argument error: ++" );
_errLaunch( pError );
_errRelease( pError );
pError = hb_errNew();
hb_errPutDescription( pError, "Error BASE/1086 Argument error: ++" );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -1092,11 +1093,11 @@ void Instring( void )
}
else
{
PHB_ITEM pError = _errNew();
PHB_ITEM pError = hb_errNew();
_errPutDescription( pError, "Error BASE/1109 Argument error: $" );
_errLaunch( pError );
_errRelease( pError );
hb_errPutDescription( pError, "Error BASE/1109 Argument error: $" );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -1384,10 +1385,10 @@ void Or( void )
}
else
{
pError = _errNew();
_errPutDescription( pError, "Argument error: conditional" );
_errLaunch( pError );
_errRelease( pError );
pError = hb_errNew();
hb_errPutDescription( pError, "Argument error: conditional" );
hb_errLaunch( pError );
hb_errRelease( pError );
}
}
@@ -1550,10 +1551,10 @@ int PopLogical( void )
return stack.pPos->value.iLogical;
else
{
pError = _errNew();
_errPutDescription( pError, "Argument error: conditional" );
_errLaunch( pError );
_errRelease( pError );
pError = hb_errNew();
hb_errPutDescription( pError, "Argument error: conditional" );
hb_errLaunch( pError );
hb_errRelease( pError );
return 0;
}
}
@@ -2255,11 +2256,11 @@ HARBOUR HB_PVALUE(void) /* PValue( <nArg> )
hb_itemReturn( pBase + 1 + wParam );
else
{
PHB_ITEM pError = _errNew();
PHB_ITEM pError = hb_errNew();
_errPutDescription(pError, "Argument error: PVALUE");
_errLaunch(pError);
_errRelease(pError);
hb_errPutDescription(pError, "Argument error: PVALUE");
hb_errLaunch(pError);
hb_errRelease(pError);
_ret();
}
}