* include/hbvmpub.h
* include/extend.api
* include/hbwince.h
* include/hb_io.h
* include/hbdefs.h
* include/hbsetup.h
* include/hbinit.h
* include/clipdefs.h
* include/hbmath.h
* include/hbzlib.h
* include/hbregex.h
* include/hbexprb.c
* source/pp/hbpp.c
* source/lang/msgrukoi.c
* source/lang/msgzhgb.c
* source/lang/msgruwin.c
* source/lang/msgelwin.c
* source/lang/msgro.c
* source/lang/msghriso.c
* source/lang/msgcskam.c
* source/lang/msggl.c
* source/lang/msges.c
* source/lang/msgde.c
* source/lang/msgru866.c
* source/lang/msgcs852.c
* source/lang/msgplmaz.c
* source/lang/msgpliso.c
* source/lang/msgplwin.c
* source/lang/msgid.c
* source/lang/msgel.c
* source/lang/msgdewin.c
* source/lang/msghr437.c
* source/lang/msghr852.c
* source/lang/msgcsiso.c
* source/lang/msgcswin.c
* source/lang/msgeswin.c
* source/vm/macro.c
* source/vm/mainwin.c
* source/vm/maindll.c
* source/vm/itemapi.c
* source/vm/hvm.c
* source/vm/cmdarg.c
* source/vm/mainstd.c
* source/vm/maindllp.c
* source/vm/fm.c
* source/vm/extrap.c
* source/vm/thread.c
* source/vm/main.c
* source/vm/break.c
* source/vm/dynlibhb.c
* source/vm/set.c
* source/vm/classes.c
* source/debug/dbgtwin.prg
* source/debug/dbgtmenu.prg
* source/debug/dbgmenu.prg
* source/debug/dbgthsh.prg
* source/debug/dbgwa.prg
* source/common/hbgete.c
* source/common/hbver.c
* source/common/hbprintf.c
* source/common/hbfsapi.c
* source/common/hbverdsp.c
* source/common/hbwince.c
* source/common/hbfopen.c
* source/common/hbdate.c
* source/macro/macroa.c
* source/macro/macrob.c
* source/rtl/lennum.c
* source/rtl/gtdos/gtdos.c
* source/rtl/setposbs.c
* source/rtl/gtwin/gtwin.c
* source/rtl/typefile.prg
* source/rtl/math.c
* source/rtl/getsys53.prg
* source/rtl/tobject.prg
* source/rtl/gtcrs/gtcrs.c
* source/rtl/gtcrs/gtcrs.h
* source/rtl/philesx.c
* source/rtl/filehb.c
* source/rtl/hbtoken.c
* source/rtl/fstemp.c
* source/rtl/ampm.c
* source/rtl/maxrow.c
* source/rtl/hbstrfmt.c
* source/rtl/transfrm.c
* source/rtl/gttone.c
* source/rtl/datec.c
* source/rtl/fserr.c
* source/rtl/pushbtn.prg
* source/rtl/memvarbl.prg
* source/rtl/hbregexc.c
* source/rtl/profiler.prg
* source/rtl/hbini.prg
* source/rtl/dbedit.prg
* source/rtl/filesys.c
* source/rtl/lang.c
* source/rtl/einstv52.prg
* source/rtl/hbbit.c
* source/rtl/isprint.c
* source/rtl/altd.prg
* source/rtl/diskspac.c
* source/rtl/console.c
* source/rtl/gtos2/gtos2.c
* source/rtl/adir.prg
* source/rtl/gui.prg
* source/rtl/hbgtcore.c
* source/rtl/dirdrive.c
* source/rtl/wait.prg
* source/rtl/mlcfunc.c
* source/rtl/scrollbr.prg
* source/rtl/gtapiu.c
* source/rtl/tbrowsys.prg
* source/rtl/oemansi.c
* source/rtl/philes53.c
* source/rtl/color53.prg
* source/rtl/xsavescr.c
* source/rtl/tgetlist.prg
* source/rtl/gtsln/mousesln.c
* source/rtl/gtsln/kbsln.c
* source/rtl/gtsln/gtsln.h
* source/rtl/disksphb.c
* source/rtl/tlabel.prg
* source/rtl/radiogrp.prg
* source/rtl/scrrow.c
* source/rtl/net.c
* source/rtl/stuff.c
* source/rtl/checkbox.prg
* source/rtl/filebuf.c
* source/rtl/mtran.c
* source/rtl/gete.c
* source/rtl/hbproces.c
* source/rtl/gtwvt/gtwvt.c
* source/rtl/fssize.c
* source/rtl/memofile.c
* source/rtl/hbffind.c
* source/rtl/tmenuitm.prg
* source/rtl/gtsys.c
* source/rtl/devoutp.prg
* source/codepage/uckoi8.c
* source/codepage/uckoi8u.c
* source/codepage/cphu852s.c
* source/codepage/cpes850c.c
* source/codepage/cphuisos.c
* source/codepage/ucmaz.c
* source/codepage/cptr857.c
* source/codepage/ucmik.c
* source/codepage/cphr437.c
* source/codepage/cphuwins.c
* source/rdd/dbjoin.prg
* source/rdd/dbnubs.c
* source/rdd/dbfuncs.prg
* source/rdd/dbtotal.prg
* source/rdd/dbstrux.prg
* source/rdd/dbsort.prg
* source/rdd/dbfcdx/dbfcdx1.c
* source/rdd/hbsix/sxcompr.c
* source/compiler/hbmain.c
* source/compiler/expropta.c
* source/compiler/exproptb.c
* source/compiler/fixflex.c
* source/compiler/compi18n.c
* source/compiler/gencobj.c
* source/compiler/hbopt.c
* source/compiler/hbgenerr.c
* utils/hbtest/rt_main.h
* utils/hbtest/rt_main.ch
* utils/hbtest/rt_trans.prg
* utils/hbtest/rt_misc.prg
* utils/hbtest/rt_vars.ch
* contrib/gtalleg/gtalleg.c
* contrib/gtalleg/ssf.h
* contrib/hbmysql/mysqlold.c
* contrib/hbmysql/mysql.c
* contrib/hbct/charlist.c
* contrib/hbct/ctnet.c
* contrib/hbct/charonly.c
* contrib/hbct/ctset.c
* contrib/hbct/ctset.h
* contrib/hbct/cterror.ch
* contrib/hbct/ftoc.c
* contrib/hbct/charevod.c
* contrib/hbct/exponent.c
* contrib/hbct/dattime3.c
* contrib/hbct/ct.prg
* contrib/hbct/cursor.c
* contrib/hbct/color.c
* contrib/hbct/charone.c
* contrib/hbct/numconv.prg
* contrib/hbct/cttime.prg
* contrib/hbct/ctstr.h
* contrib/hbct/atnum.c
* contrib/hbct/disk.c
* contrib/hbct/misc1.c
* contrib/hbct/print.c
* contrib/xhb/hblog.ch
* contrib/xhb/bkgtsks.c
* contrib/xhb/wintypes.ch
* contrib/xhb/classex.ch
* contrib/xhb/hbcomprs.c
* contrib/xhb/ttable.ch
* contrib/xhb/hbcompat.ch
* contrib/xhb/arrayblk.prg
* contrib/xhb/hbctypes.ch
* contrib/xhb/xhbextrn.ch
* contrib/xhb/filestat.c
* contrib/xhb/hblogdef.ch
* contrib/xhb/xhbcopyf.c
* contrib/xhb/hbserv.c
* contrib/xhb/xhbfunc.c
* contrib/hbodbc/odbcold.c
* contrib/hbtpathy/telepath.ch
* contrib/hbmzip/hbmzip.c
* contrib/hbblat/hbblat.ch
* contrib/hbxbp/xbpfiledialog.prg
* contrib/hbxbp/gra.ch
* contrib/hbxbp/xbpwindow.prg
* contrib/hbxbp/xbp.ch
* contrib/hbxbp/xbphtmlviewer.prg
* contrib/hbxbp/xbptoolbar.prg
* contrib/hbxbp/appevent.ch
* contrib/hbxbp/xbpgeneric.prg
* contrib/xpp/philesx.c
* contrib/hbnf/acctyear.prg
* contrib/hbnf/byteneg.prg
* contrib/hbnf/isshare.prg
* contrib/hbnf/kspeed.c
* contrib/hbnf/prtscr.c
* contrib/hbnf/ftshadow.c
* contrib/hbnf/descendn.c
* contrib/hbnf/scancode.prg
* contrib/hbnf/vidmode.prg
* contrib/hbnf/acctadj.prg
* contrib/hbnf/vidcur.prg
* contrib/hbnf/iamidle.c
* contrib/hbnf/acctmnth.prg
* contrib/hbnf/madd.prg
* contrib/hbnf/fttext.c
* contrib/hbnf/mouse1.prg
* contrib/hbnf/settime.prg
* contrib/hbnf/page.prg
* contrib/hbnf/setkeys.c
* contrib/hbnf/month.prg
* contrib/hbnf/acctweek.prg
* contrib/hbnf/acctqtr.prg
* contrib/hbnf/dosver.prg
* contrib/hbnf/metaph.prg
* contrib/hbnf/menu1.prg
* contrib/hbnf/byteand.prg
* contrib/hbnf/bytexor.prg
* contrib/hbnf/byteor.prg
* contrib/hbnf/asum.prg
* contrib/hbnf/wda.prg
* contrib/hbnf/aavg.prg
* contrib/hbnf/mouse.c
* contrib/hbnf/setdate.prg
* contrib/hbnf/amedian.prg
* contrib/hbnf/blink.prg
* contrib/hbnf/getvid.c
* contrib/hbnf/getver.c
* contrib/hbnf/nwuid.prg
* contrib/hbnf/aemaxlen.prg
* contrib/hbnf/bitset.prg
* contrib/hbnf/nwlstat.prg
* contrib/hbnf/tempfile.prg
* contrib/hbnf/diskfunc.prg
* contrib/hbnf/d2e.prg
* contrib/hbnf/mouse2.prg
* contrib/hbnf/firstday.prg
* contrib/hbnf/menutonf.prg
* contrib/hbnf/pvid.prg
* contrib/hbnf/isbit.prg
* contrib/hbnf/datecnfg.prg
* contrib/hbnf/putkey.c
* contrib/hbnf/getenvrn.c
* contrib/hbnf/bytenot.prg
* contrib/hbnf/aeminlen.prg
* contrib/hbnf/year.prg
* contrib/hbnf/ftmenuto.ch
* contrib/hbnf/rmdir.c
* contrib/hbnf/sysmem.prg
* contrib/hbnf/bitclr.prg
* contrib/hbnf/setlastk.c
* contrib/hbnf/clrsel.prg
* contrib/hbcurl/hbcurl.ch
* contrib/gtwvg/gtwvg.c
* contrib/gtwvg/wvgax.prg
* contrib/gtwvg/gtwvg.h
* contrib/gtwvg/wvggui.c
* contrib/gtwvg/wvggui.h
* contrib/gtwvg/wvgwin.c
* contrib/gtwvg/wvgutils.c
* contrib/gtwvg/wvgcore.c
* contrib/gtwvg/wvgtabpg.prg
* contrib/gtwvg/wvgsink.c
* contrib/gtwvg/wvgwing.c
* contrib/hbclipsm/num.c
* contrib/hbclipsm/stack.c
* contrib/rddads/rddads.h
* contrib/rddads/ads1.c
* contrib/hbfimage/fi_winfu.c
* contrib/hbfimage/fi_wrp.c
* contrib/hbgd/gd.ch
* contrib/hbgd/gdchart.prg
* contrib/hbgd/gdimage.prg
* contrib/hbgd/gdwrp.c
* contrib/hbmisc/nconvert.prg
* contrib/hbmisc/stringsx.c
* contrib/hbmisc/spd.c
* contrib/hbmisc/stringp.prg
* contrib/hbwin/win_prn2.c
* contrib/hbwin/wapi_commctrl.c
* contrib/hbwin/wapi_winbase.c
* contrib/hbwin/wapi_winuser.c
* contrib/hbwin/hbwinole.h
* contrib/hbwin/win_dll.c
* contrib/hbwin/axfunc.prg
* contrib/hbwin/win_prn1.c
* contrib/hbvpdf/hbvpdf.ch
* examples/hboleold/win_ole.c
* Formatting:
- Removing EOL whitespaces.
- Removing extra empty lines at EOF.
- Adding EOL at EOF if missing.
(except in foreign code)
274 lines
10 KiB
C
274 lines
10 KiB
C
/*
|
|
* $Id$
|
|
*/
|
|
|
|
/*
|
|
* Harbour Project source code:
|
|
* Compiler parse errors & warnings messages
|
|
*
|
|
* Copyright 1999 {list of individual authors and e-mail addresses}
|
|
* www - http://www.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 of the License, or
|
|
* (at your option) any later version, with one exception:
|
|
*
|
|
* 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 program; if not, write to the Free Software
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
|
* their web site at http://www.gnu.org/).
|
|
*
|
|
*/
|
|
|
|
#include "hbcomp.h"
|
|
|
|
/* Table with parse errors */
|
|
const char * hb_comp_szErrors[] =
|
|
{
|
|
"Statement not allowed outside of procedure or function",
|
|
"Redefinition of procedure or function '%s'",
|
|
"Duplicate variable declaration '%s'",
|
|
"%s declaration follows executable statement",
|
|
"Outer codeblock variable '%s' is out of reach",
|
|
"Invalid numeric format '.'",
|
|
"Unterminated string '%s'",
|
|
"Redefinition of predefined function %s as '%s'",
|
|
"Illegal variable '%s' initializer '%s'",
|
|
"ENDIF does not match IF",
|
|
"ENDDO does not match WHILE",
|
|
"ENDCASE does not match DO CASE",
|
|
"NEXT does not match FOR",
|
|
"ELSE does not match IF",
|
|
"ELSEIF does not match IF",
|
|
"Syntax error '%s'",
|
|
"Unclosed control structure '%s'",
|
|
"%s statement with no loop in sight",
|
|
"Syntax error '%s' in '%s'",
|
|
"Incomplete statement or unbalanced delimiters",
|
|
"Incorrect number of arguments in %s %s",
|
|
"Invalid lvalue '%s'",
|
|
"Invalid use of '@' (pass by reference) '%s'",
|
|
"Formal parameters already declared",
|
|
"Invalid %s from within of SEQUENCE code",
|
|
"Unterminated array index",
|
|
"Could not allocate %s byte(s)",
|
|
"Could not reallocate %s byte(s)",
|
|
"Freeing a NULL memory pointer",
|
|
"Syntax error \"%s at '%s'\"",
|
|
"Jump offset too long",
|
|
"Can't create output file '%s'",
|
|
"Can't create preprocessed output file '%s'",
|
|
"Bad command line option '%s'",
|
|
"Bad command line parameter '%s'",
|
|
"Invalid filename '%s'",
|
|
"Mayhem in CASE handler",
|
|
"Operation not supported for data type '%s'",
|
|
"Invalid alias expression '%s'",
|
|
"Invalid array index expression '%s'",
|
|
"Bound error '%s'",
|
|
"Macro of declared symbol '%s'",
|
|
"Invalid selector '%s' in send",
|
|
"ANNOUNCEd procedure '%s' must be a public symbol",
|
|
"Jump PCode not found",
|
|
"CASE or OTHERWISE does not match DO CASE",
|
|
"Code block contains both macro and declared symbol references '%s'",
|
|
"GET contains complex macro",
|
|
"Unterminated inline block in function '%s'",
|
|
"Too many inline blocks %s",
|
|
"Inline C requires C output generation, use -gc[n]",
|
|
"Too many local variables [%s] or parameters [%s]",
|
|
"Too many enumerate variables in FOR EACH loop",
|
|
"Incorrect number of enumerate variables",
|
|
"CASE requires either numeric or string constant",
|
|
"String too long for SWITCH",
|
|
"Invalid date constant '%s'",
|
|
"Invalid timestamp constant '%s'",
|
|
"Memory buffer overflow",
|
|
"Memory corruption detected",
|
|
"Implicit send operator with no WITH OBJECT in sight",
|
|
"Input buffer overflow",
|
|
"Unsupported output language option",
|
|
"String too long",
|
|
"Code block size too big",
|
|
"%s not declared with variable number of parameters",
|
|
"Can't find %s file",
|
|
"Invalid ALWAYS after %s in RECOVER code",
|
|
"File write error",
|
|
/* Some historical, funny sounding error messages from original CA-Cl*pper.
|
|
They serve no purpose whatsoever. [vszakats] */
|
|
"END wreaks terrible vengeance on control stack",
|
|
"Control level closure leaves gaping wound in control stack",
|
|
"Ford Maverick error number",
|
|
"Something terrible has happened"
|
|
};
|
|
|
|
/* Table with parse warnings */
|
|
/* NOTE: The first character stores the warning's level that triggers this
|
|
* warning. The warning's level is set by -w<n> command line option.
|
|
*/
|
|
const char * hb_comp_szWarnings[] =
|
|
{
|
|
"1Ambiguous reference '%s'",
|
|
"1Ambiguous reference, assuming memvar '%s'",
|
|
"2Variable '%s' declared but not used in function '%s'",
|
|
"2Codeblock parameter '%s' declared but not used in function '%s'",
|
|
"1RETURN statement with no return value in function",
|
|
"1Procedure returns value",
|
|
"1Function '%s' does not end with RETURN statement",
|
|
"3Incompatible type in assignment to '%s', expected '%s'",
|
|
"3Incompatible operand type '%s', expected '%s'",
|
|
"3Incompatible operand types '%s' and '%s'",
|
|
"4Suspicious type in assignment to '%s', expected '%s'",
|
|
"4Suspicious operand type 'unknown', expected '%s'",
|
|
"3Can't use array index with non-array",
|
|
"3Incompatible return type '%s', expected '%s'",
|
|
"4Suspicious return type '%s', expected '%s'",
|
|
"3Invalid number of parameters %s, expected %s",
|
|
"3Incompatible parameter '%s', expected '%s'",
|
|
"4Suspicious parameter '%s', expected '%s'",
|
|
"3Duplicate declaration of %s '%s'",
|
|
"3Function '%s' conflicting with its declaration",
|
|
"3Variable '%s' used but never initialized",
|
|
"3Value of Variable '%s' never used",
|
|
"3Incompatible type in assignment to declared array element expected '%s'",
|
|
"4Suspicious type in assignment to declared array element expected '%s'",
|
|
"3Class '%s' not known in declaration of '%s'",
|
|
"3Message '%s' not known in class '%s'",
|
|
"0Meaningless use of expression '%s'",
|
|
"2Unreachable code",
|
|
"1Redundant 'ANNOUNCE %s' statement ignored",
|
|
"0Duplicate variable '%s' in nested FOR loop",
|
|
"0Invalid variable '%s' for enumerator message",
|
|
"3Variable '%s' is assigned but not used in function '%s'",
|
|
"3Variable '%s' is never assigned in function '%s'"
|
|
};
|
|
|
|
static void hb_compDispMessage( HB_COMP_DECL, char cPrefix, int iValue,
|
|
const char * szText, const char * szPar1, const char * szPar2 )
|
|
{
|
|
char buffer[ 512 ];
|
|
|
|
if( HB_COMP_PARAM->currModule )
|
|
{
|
|
hb_snprintf( buffer, sizeof( buffer ), "\r%s(%i) ",
|
|
HB_COMP_PARAM->currModule, HB_COMP_PARAM->currLine );
|
|
hb_compOutErr( HB_COMP_PARAM, buffer );
|
|
}
|
|
|
|
hb_snprintf( buffer, sizeof( buffer ), "%s %c%04i ",
|
|
cPrefix == 'W' ? "Warning" : "Error", cPrefix, iValue );
|
|
hb_compOutErr( HB_COMP_PARAM, buffer );
|
|
hb_snprintf( buffer, sizeof( buffer ), szText, szPar1, szPar2 );
|
|
hb_compOutErr( HB_COMP_PARAM, buffer );
|
|
hb_compOutErr( HB_COMP_PARAM, "\n" );
|
|
}
|
|
|
|
void hb_compGenError( HB_COMP_DECL, const char * szErrors[], char cPrefix, int iError, const char * szError1, const char * szError2 )
|
|
{
|
|
if( !HB_COMP_PARAM->fExit && ( cPrefix == 'F' || !HB_COMP_PARAM->fError ) )
|
|
{
|
|
PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast;
|
|
|
|
hb_compDispMessage( HB_COMP_PARAM, cPrefix, iError,
|
|
szErrors[ iError - 1 ], szError1, szError2 );
|
|
|
|
HB_COMP_PARAM->iErrorCount++;
|
|
HB_COMP_PARAM->fError = TRUE;
|
|
while( pFunc )
|
|
{
|
|
pFunc->bError = TRUE;
|
|
pFunc = pFunc->pOwner;
|
|
}
|
|
/* fatal error - exit immediately */
|
|
if( cPrefix == 'F' )
|
|
HB_COMP_PARAM->fExit = TRUE;
|
|
}
|
|
}
|
|
|
|
void hb_compGenWarning( HB_COMP_DECL, const char * szWarnings[], char cPrefix, int iWarning, const char * szWarning1, const char * szWarning2)
|
|
{
|
|
const char * szText = szWarnings[ iWarning - 1 ];
|
|
|
|
if( !HB_COMP_PARAM->fExit && ( ( int ) ( szText[ 0 ] - '0' ) <= HB_COMP_PARAM->iWarnings ) )
|
|
{
|
|
hb_compDispMessage( HB_COMP_PARAM, cPrefix, iWarning,
|
|
szText + 1, szWarning1, szWarning2 );
|
|
|
|
HB_COMP_PARAM->fAnyWarning = TRUE; /* report warnings at exit */
|
|
}
|
|
}
|
|
|
|
HB_EXPR_PTR hb_compErrorLValue( HB_COMP_DECL, HB_EXPR_PTR pExpr )
|
|
{
|
|
const char * szDesc = hb_compExprDescription( pExpr );
|
|
hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_INVALID_LVALUE, szDesc, NULL );
|
|
return pExpr;
|
|
}
|
|
|
|
HB_EXPR_PTR hb_compErrorIndex( HB_COMP_DECL, HB_EXPR_PTR pExpr )
|
|
{
|
|
const char * szDesc = hb_compExprDescription( pExpr );
|
|
hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_INVALID_INDEX, szDesc, NULL );
|
|
return pExpr;
|
|
}
|
|
|
|
HB_EXPR_PTR hb_compErrorBound( HB_COMP_DECL, HB_EXPR_PTR pExpr )
|
|
{
|
|
const char * szDesc = hb_compExprDescription( pExpr );
|
|
hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_INVALID_BOUND, szDesc, NULL );
|
|
return pExpr;
|
|
}
|
|
|
|
HB_EXPR_PTR hb_compErrorAlias( HB_COMP_DECL, HB_EXPR_PTR pExpr )
|
|
{
|
|
const char * szDesc = hb_compExprDescription( pExpr );
|
|
hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_INVALID_ALIAS, szDesc, NULL );
|
|
return pExpr;
|
|
}
|
|
|
|
HB_EXPR_PTR hb_compErrorStatic( HB_COMP_DECL, const char * szVarName, HB_EXPR_PTR pExpr )
|
|
{
|
|
const char * szDesc = hb_compExprDescription( pExpr );
|
|
hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_ILLEGAL_INIT, szVarName, szDesc );
|
|
return pExpr;
|
|
}
|
|
|
|
HB_EXPR_PTR hb_compWarnMeaningless( HB_COMP_DECL, HB_EXPR_PTR pExpr )
|
|
{
|
|
if( !HB_COMP_PARAM->fMeaningful )
|
|
{
|
|
const char * szDesc = hb_compExprDescription( pExpr );
|
|
hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_MEANINGLESS, szDesc, NULL );
|
|
}
|
|
return pExpr;
|
|
}
|
|
|
|
void hb_compErrorCodeblock( HB_COMP_DECL, const char * szBlock )
|
|
{
|
|
BOOL fError = HB_COMP_PARAM->fError;
|
|
hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_BLOCK, szBlock, NULL );
|
|
HB_COMP_PARAM->fError = fError; /* restore error flag for this line */
|
|
}
|
|
|
|
void hb_compErrorMacro( HB_COMP_DECL, const char *szText )
|
|
{
|
|
hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_BAD_MACRO, szText, NULL );
|
|
}
|
|
|
|
HB_EXPR_PTR hb_compErrorRefer( HB_COMP_DECL, HB_EXPR_PTR pExpr, const char * szDesc )
|
|
{
|
|
hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_INVALID_REFER, szDesc, NULL );
|
|
return pExpr;
|
|
}
|
|
|
|
void hb_compErrorVParams( HB_COMP_DECL, const char * szFuncOrBlock )
|
|
{
|
|
hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_NOT_VPARAMS, szFuncOrBlock, NULL );
|
|
}
|