Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

llerror.c File Reference

#include "lclintMacros.nf"
#include <string.h>
#include <errno.h>
#include "llbasic.h"
#include "llmain.h"
#include "version.h"

Go to the source code of this file.

Defines

#define MAXSEARCH   20
#define MINLINE   35

Typedefs

typedef char* nd_charp

Functions

void prepareMessage (void)
void closeMessage (void)
void llmsg ( cstring s)
void lldiagmsg ( cstring s)
void llmsgplain ( cstring s)
void flagWarning (cstring s)
void llhint (cstring s)
void cleanupMessages ()
void llgenmsg ( cstring s, fileloc fl)
void llgenindentmsg ( cstring s, fileloc fl)
void llgenindentmsgnoloc ( cstring s)
bool llgentypeerror (ctype t1, exprNode e1, ctype t2, exprNode e2, cstring s, fileloc fl)
bool llgenformattypeerror (ctype t1, exprNode e1, ctype t2, exprNode e2, cstring s, fileloc fl)
bool llgenerror (flagcode o, cstring s, fileloc fl)
bool llgenhinterror (flagcode o, cstring s, cstring hint, fileloc fl)
void llforceerror (flagcode code, cstring s, fileloc fl)
void llfatalbug ( cstring s)
void lclfatalbug (char *msg)
void checkParseError (void)
void llbugaux (cstring file, int line, cstring s)
void lclbug ( cstring s)
void llfatalerror (cstring s)
void llfatalerrorLoc ( cstring s)
void llgloberror ( cstring s)
bool lclHadError (void)
bool lclHadNewError (void)
int lclNumberErrors (void)
void lclerror (ltoken t, cstring msg)
void lclplainerror ( cstring msg)
void lclfatalerror (ltoken t, cstring msg)
void lclplainfatalerror ( cstring msg)
void lclRedeclarationError (ltoken id)
void genppllerror (flagcode code, cstring s)
void genppllerrorhint (flagcode code, cstring s, cstring hint)
void ppllerror ( cstring s)
void pplldiagmsg (cstring s)
void loadllmsg (cstring s)
bool lloptgenerror (flagcode o, cstring s, fileloc loc)
bool optgenerror2 (flagcode f1, flagcode f2, cstring s, fileloc loc)
bool optgenerror2n (flagcode f1, flagcode f2, cstring s, fileloc loc)
bool llnoptgenerror (flagcode o, cstring s, fileloc loc)
void llparseerror (cstring s)
bool doCheck (bool x, cstring pred, cstring file, int line)
cstring lldecodeerror ( int errnum)
void llquietbugaux (cstring s, cstring file, int line)
void llflush (void)


Define Documentation

#define MAXSEARCH   20
 

Definition at line 241 of file llerror.c.

#define MINLINE   35
 

Definition at line 244 of file llerror.c.


Typedef Documentation

typedef char* nd_charp
 

Definition at line 246 of file llerror.c.


Function Documentation

void checkParseError ( void )
 

Definition at line 1131 of file llerror.c.

01132 {
01133   if (fileloc_withinLines (lastparseerror, g_currentloc, 10))
01134     {
01135       llfatalerror (message ("%q: Cannot recover from parse error.",
01136                              fileloc_unparse (g_currentloc)));
01137     }
01138 }

void cleanupMessages ( )
 

Definition at line 394 of file llerror.c.

Referenced by context_exitFile(), context_processAllMacros(), macrocache_processUndefinedElements(), main(), and usymtab_allUsed().

00395 {
00396   parseerrorcount = 0;
00397 
00398   if (context_unlimitedMessages ())
00399     {
00400      ;
00401     }
00402   else
00403     {
00404       int unprinted = mcount - context_getLimit ();
00405 
00406       if (unprinted > 0)
00407         {
00408           if (unprinted == 1 && cstring_isDefined (saveOneMessage))
00409             {
00410               prepareMessage ();
00411               printError (g_msgstream, saveOneMessage);
00412               closeMessage ();
00413               saveOneMessage = cstring_undefined;
00414             }
00415           else
00416             {
00417               if (cstring_isDefined (saveOneMessage))
00418                 {
00419                   /* cstring_free (saveOneMessage); */
00420                   saveOneMessage = cstring_undefined;
00421                 }
00422 
00423               fprintf (g_msgstream, "%s: (%d more similar errors unprinted)\n",
00424                        cstring_toCharsSafe (fileloc_filename (g_currentloc)),
00425                        mcount - context_getLimit ());
00426             }
00427         }
00428     }
00429 
00430   mcount = 0;
00431 }

void closeMessage ( void )
 

Definition at line 92 of file llerror.c.

Referenced by cleanupMessages(), cppReader_error(), cppReader_errorWithLine(), cppReader_warning(), genppllerrorhint(), lclbug(), llbugaux(), lldiagmsg(), llforceerror(), llgenerror(), llgenhinterror(), llgenindentmsg(), llgenindentmsgnoloc(), llgenmsg(), llgloberror(), llmsg(), llmsgplain(), llnoptgenerror(), lloptgenerror(), optgenerror2(), and optgenerror2n().

00093 {
00094   if (context_isPreprocessing ()
00095       && context_getDebug (FLG_SHOWSCAN))
00096     {
00097       llflush ();
00098       fprintf (stderr, "< more preprocessing .");
00099 
00100       llassert (!s_needsPrepare);
00101       s_needsPrepare = TRUE;
00102     }
00103   else
00104     {
00105       llflush ();
00106     }
00107 }

bool doCheck ( bool x,
cstring pred,
cstring file,
int line )
 

Definition at line 1605 of file llerror.c.

01606 {
01607   if (!x) {
01608     llbug (message ("%q: Check Failed: %s",
01609                     fileloc_unparseRaw (file, line),
01610                     pred));
01611   }
01612 
01613   return x;
01614 }

void flagWarning ( cstring s )
 

Definition at line 136 of file llerror.c.

Referenced by context_setString(), and context_userSetFlag().

00137 {
00138   if (context_getFlag (FLG_WARNFLAGS))
00139     {
00140       showHerald ();
00141 
00142       if (fileloc_isBuiltin (g_currentloc))
00143         {
00144           llmsg (message ("Warning: %s", s));
00145         }
00146       else
00147         {
00148           llgenmsg (message ("Warning: %s", s), g_currentloc);
00149         }
00150     }
00151 }

void genppllerror ( flagcode code,
cstring s )
 

Definition at line 1354 of file llerror.c.

Referenced by ppllerror().

01355 {
01356   if (context_inSuppressZone (g_currentloc))
01357     {
01358       cstring_free (s);
01359     }
01360   else
01361     {
01362       if (context_getFlag (code))
01363         {
01364           if (context_getFlag (FLG_SHOWSCAN) && !context_isInCommandLine ())
01365             {
01366               fprintf (g_msgstream, " >\n");
01367             }
01368 
01369           llerror (code, s);
01370 
01371           if (code != FLG_PREPROC)
01372             {
01373               llsuppresshint ('-', code);
01374             }
01375 
01376           if (context_getFlag (FLG_SHOWSCAN) && !context_isInCommandLine ())
01377             {
01378               fprintf (stderr, "< more preprocessing .");
01379             }
01380         }
01381       else
01382         {
01383           cstring_free (s);
01384         }
01385     }
01386 }

void genppllerrorhint ( flagcode code,
cstring s,
cstring hint )
 

Definition at line 1388 of file llerror.c.

01390 {
01391   if (context_inSuppressZone (g_currentloc))
01392     {
01393       cstring_free (s);
01394       cstring_free (hint);
01395     }
01396   else
01397     {
01398       if (context_getFlag (code))
01399         {
01400           prepareMessage ();
01401           context_clearPreprocessing ();
01402           llerror (code, s);
01403           llgenhint (hint);
01404           context_setPreprocessing ();
01405           closeMessage ();
01406         }
01407       else
01408         {
01409           cstring_free (s);
01410           cstring_free (hint);
01411         }
01412     }
01413 }

bool lclHadError ( void )
 

Definition at line 1261 of file llerror.c.

01262 {
01263   return (lclerrors > 0);
01264 }

bool lclHadNewError ( void )
 

Definition at line 1267 of file llerror.c.

01268 {
01269   static int lastcall = 0;
01270 
01271   if (lclerrors > lastcall)
01272     {
01273       lastcall = lclerrors;
01274       return TRUE;
01275     }
01276   else
01277     {
01278       return FALSE;
01279     }
01280 }

int lclNumberErrors ( void )
 

Definition at line 1283 of file llerror.c.

Referenced by main().

01284 {
01285   return (lclerrors);
01286 }

void lclRedeclarationError ( ltoken id )
 

Definition at line 1333 of file llerror.c.

Referenced by symtable_enterFct(), symtable_enterType(), and symtable_enterVar().

01334 {
01335   cstring s = ltoken_getRawString (id);
01336 
01337 
01338   if (usymtab_existsEither (s))
01339     {
01340       uentry le = usymtab_lookupEither (s);
01341 
01342       lclerror (id, message ("Respecification of %s", s));
01343       llgenindentmsg (message ("Previous specification of %q",
01344                                uentry_getName (le)),
01345                 uentry_whereSpecified (le));
01346     }
01347   else
01348     {
01349       lclerror (id, message ("Identifier redeclared: %s", s));
01350     }
01351 }

void lclbug ( cstring s )
 

Definition at line 1207 of file llerror.c.

Referenced by importCTrait(), o_fctInfo(), sort_import(), and symtable_enterType().

01208 {
01209   prepareMessage ();
01210   printError (stderr, message ("*** Internal Bug: %q", s));
01211   printCodePoint ();
01212   printBugReport ();
01213   fprintf (stderr, "       (attempting to continue, results may be incorrect)\n");
01214   closeMessage ();
01215 }

void lclerror ( ltoken t,
cstring msg )
 

Definition at line 1289 of file llerror.c.

Referenced by LCLScanEofToken(), checkAndEnterTag(), checkLclPredicate(), checkSort(), computePossibleSorts(), lclRedeclarationError(), lclfatalerror(), makeCTypesNode(), makeEnumSpecNode(), makeEnumSpecNode2(), makeFcnNode(), makeForwardstrOrUnionNode(), makeInterfaceNodeImports(), makeIterNode(), makeLetDeclNode(), makeModifyNodeRef(), makeTypeSpecifier(), makeUnchangedTermNode2(), makeVarDeclarationNode(), and makestrOrUnionNode().

01290 {
01291   lclerrors++;
01292 
01293   if (ltoken_getCode (t) != NOTTOKEN)
01294     {
01295       cstring loc = ltoken_unparseLoc (t);
01296 
01297       lastfileloclen = cstring_length (loc);
01298 
01299       printError (g_msgstream, message ("%q: %q", loc, msg));
01300     }
01301   else
01302     {
01303       printError (g_msgstream, msg);
01304     }
01305 }

void lclfatalbug ( char * msg )
 

Definition at line 1119 of file llerror.c.

Referenced by LSLGenTopPopShiftStack().

01120 {
01121   prepareMessage ();
01122   printError (stderr,
01123               message ("*** Fatal Bug: %s", cstring_fromChars (msg)));
01124   printCodePoint ();
01125   printBugReport ();
01126   llexit (LLFAILURE);
01127 }

void lclfatalerror ( ltoken t,
cstring msg )
 

Definition at line 1316 of file llerror.c.

Referenced by processImport(), sort_import(), and symtable_import().

01317 {
01318   lclerror (t, msg);
01319   (void) fflush (g_msgstream);
01320   printError (stderr, cstring_makeLiteral ("*** Cannot continue"));
01321   llexit (LLFAILURE);
01322 }

void lclplainerror ( cstring msg )
 

Definition at line 1308 of file llerror.c.

Referenced by lhInit(), o_fctInfo(), and outputLCSFile().

01309 {
01310   lclerrors++;
01311 
01312   printError (g_msgstream, msg);
01313 }

void lclplainfatalerror ( cstring msg )
 

Definition at line 1325 of file llerror.c.

Referenced by parseOpLine().

01326 {
01327   (void) fflush (g_msgstream);
01328   printError (stderr, message ("*** Cannot continue: %q", msg));
01329   llexit (LLFAILURE);
01330 }

void llbugaux ( cstring file,
int line,
cstring s )
 

Definition at line 1140 of file llerror.c.

01141 {
01142   /*@unchecked@*/
01143   static int numbugs = 0;
01144   static bool inbug = FALSE;
01145 
01146   if (inbug)
01147     {
01148       cstring temps = fileloc_unparseRaw (file, line);
01149 
01150       fprintf (stderr, "%s: Recursive bug detected: %s\n",
01151                cstring_toCharsSafe (temps),
01152                cstring_toCharsSafe (s));
01153       cstring_free (temps);
01154 
01155       llexit (LLFAILURE);
01156     }
01157 
01158   inbug = TRUE;
01159 
01160   prepareMessage ();
01161 
01162   if (fileloc_isRealLib (g_currentloc))
01163     {
01164       llfatalerror (message ("%q: Library file appears to be corrupted.  Error: %q:%s",
01165                              fileloc_unparse (g_currentloc), 
01166                              fileloc_unparseRaw (file, line), s));
01167     }
01168 
01169   if (fileloc_withinLines (lastparseerror, g_currentloc, 7))
01170     {
01171       llfatalerror (message ("%q: Cannot recover from parse error.",
01172                              fileloc_unparse (g_currentloc)));
01173     }
01174 
01175   (void) fflush (g_msgstream);
01176   printError (stderr, message ("%q: *** Internal Bug at %q: %q [errno: %d]",
01177                                fileloc_unparse (g_currentloc),
01178                                fileloc_unparseRaw (file, line),
01179                                s, errno));
01180   printCodePoint ();
01181 
01182   (void) fflush (stderr);
01183   perror ("Possible system error diagnostic: ");
01184   (void) fflush (stderr);
01185 
01186   printBugReport ();
01187 
01188   numbugs++;
01189 
01190   if (numbugs > 5 && fileloc_withinLines (lastbug, g_currentloc, 2))
01191     {
01192       llfatalerror (message ("%q: Cannot recover from last bug.",
01193                              fileloc_unparse (g_currentloc)));
01194     }
01195 
01196   fprintf (stderr, "       (attempting to continue, results may be incorrect)\n");
01197   fileloc_free (lastbug);
01198   lastbug = fileloc_copy (g_currentloc);
01199   closeMessage ();
01200 
01201   (void) fflush (stderr);
01202   inbug = FALSE;
01203 }

cstring lldecodeerror ( int errnum )
 

Definition at line 1616 of file llerror.c.

01617 {
01618   char *result;
01619 
01620 #ifndef VMS
01621 #ifndef HAVE_STRERROR
01622   result = NULL;
01623 #else
01624   result = strerror (errnum);
01625 #endif
01626 #else   /* VMS */
01627   /* VAXCRTL's strerror() takes an optional second argument, which only
01628      matters when the first argument is EVMSERR.  However, it's simplest
01629      just to pass it unconditionally.  `vaxc$errno' is declared in
01630      <errno.h>, and maintained by the library in parallel with `errno'.
01631      We assume that caller's `errnum' either matches the last setting of
01632      `errno' by the library or else does not have the value `EVMSERR'.  */
01633 
01634   result = strerror (errnum, vaxc$errno);
01635 #endif
01636 
01637   if (result == NULL)
01638     {
01639       result = cstring_toCharsSafe (message ("undocumented I/O error: %d", errnum));
01640     }
01641 
01642   return cstring_fromChars (result);
01643 }

void lldiagmsg ( cstring s )
 

Definition at line 119 of file llerror.c.

Referenced by YY_RULE_SETUP(), fileTable_addltemp(), lhCleanup(), loadStandardState(), loadllmsg(), macrocache_processUndefinedElements(), main(), pplldiagmsg(), and tsource_nextLine().

00120 {
00121   context_setNeednl ();
00122   prepareMessage ();
00123   printMessage (stderr, s);
00124   closeMessage ();
00125 }

void llfatalbug ( cstring s )
 

Definition at line 1107 of file llerror.c.

Referenced by LCLSetTokenHasSyn(), LCLUpdateToken(), LSLScanFreshToken(), LSLUpdateToken(), YY_RULE_SETUP(), context_getHeader(), doDeclareType(), docheckChar(), exportNode_unparse(), lclTypeSpecNode_unparse(), opFormNode_unparse(), privateNode_unparse(), sort_makeTuple(), sort_makeUnionVal(), sort_makeVal(), typeNode_unparse(), usymtab_enterFunctionScope(), usymtab_getParam(), usymtab_lookupExpose(), and usymtab_lookupGlob().

01108 {
01109   prepareMessage ();
01110   printError (stderr, message ("%q: *** Fatal bug: %q",
01111                                fileloc_unparse (g_currentloc), s));
01112   printCodePoint ();
01113   printBugReport ();
01114   llexit (LLFAILURE);
01115 }

void llfatalerror ( cstring s )
 

Definition at line 1219 of file llerror.c.

Referenced by callLSL(), checkParseError(), cppProcess(), doneParams(), llbugaux(), llparseerror(), loadStandardState(), loadState(), main(), sRef_undump(), sRef_undumpGlobal(), and usymtab_lookupEither().

01220 {
01221   prepareMessage ();
01222   printError (stderr, s);
01223   printError (stderr, cstring_makeLiteral ("*** Cannot continue."));
01224   llexit (LLFAILURE);
01225 }

void llfatalerrorLoc ( cstring s )
 

Definition at line 1228 of file llerror.c.

Referenced by doVaDcl(), and processImport().

01229 {
01230   prepareMessage ();
01231   (void) fflush (g_msgstream);
01232   printError (stderr, message ("%q: %q", fileloc_unparse (g_currentloc), s));
01233   printError (stderr, cstring_makeLiteral ("*** Cannot continue."));
01234   llexit (LLFAILURE);
01235 }

void llflush ( void )
 

Definition at line 1662 of file llerror.c.

Referenced by closeMessage(), llquietbugaux(), main(), prepareMessage(), and showHerald().

01663 {
01664   (void) fflush (g_msgstream);
01665   (void) fflush (stderr);
01666 }

void llforceerror ( flagcode code,
cstring s,
fileloc fl )
 

Definition at line 775 of file llerror.c.

00776 {
00777   flagcode_recordError (code);
00778   (void) llgenerrorreal (s, fl, TRUE, FALSE);
00779   closeMessage ();
00780 }

bool llgenerror ( flagcode o,
cstring s,
fileloc fl )
 

Definition at line 700 of file llerror.c.

00701 {
00702   if (llgenerroraux (s, fl, TRUE, FALSE))
00703     {
00704       llnosuppresshint (o);
00705       flagcode_recordError (o);
00706       closeMessage ();
00707       return TRUE;
00708     }
00709   else
00710     {
00711       flagcode_recordSuppressed (o);
00712       return FALSE;
00713     }
00714 }

bool llgenformattypeerror ( ctype t1,
exprNode e1,
ctype t2,
exprNode e2,
cstring s,
fileloc fl )
 

Definition at line 693 of file llerror.c.

00695 {
00696   return llgentypeerroraux (FLG_FORMATTYPE, t1, e1, t2, e2, s, fl);
00697 }

bool llgenhinterror ( flagcode o,
cstring s,
cstring hint,
fileloc fl )
 

Definition at line 717 of file llerror.c.

00719 {
00720   if (!context_suppressFlagMsg (o, fl))
00721     {
00722       if (llgenerroraux (s, fl, TRUE, FALSE))
00723         {
00724           flagcode_recordError (o);
00725 
00726           if (context_getFlag (FLG_HINTS))
00727             {
00728               llgenhint (hint);
00729             }
00730           else
00731             {
00732               cstring_free (hint);
00733             }
00734 
00735           closeMessage ();
00736           return TRUE;
00737         }
00738 
00739       cstring_free (hint);
00740     }
00741   else
00742     {
00743       cstring_free (hint);
00744       cstring_free (s);
00745     }
00746 
00747   flagcode_recordSuppressed (o);
00748   return FALSE;
00749 }

void llgenindentmsg ( cstring s,
fileloc fl )
 

Definition at line 445 of file llerror.c.

Referenced by filelocStack_printIncludes(), lclRedeclarationError(), sRef_showExpInfo(), sRef_showNullInfo(), sRef_showRefKilled(), sRef_showRefLost(), sRef_showStateInfo(), uentry_checkDecl(), uentry_mergeDefinition(), uentry_setDefined(), uentry_showDefSpecInfo(), uentry_showWhereAny(), uentry_showWhereDeclared(), uentry_showWhereDefined(), uentry_showWhereLast(), uentry_showWhereLastExtra(), uentry_showWhereLastPlain(), uentry_showWhereSpecified(), and uentry_showWhereSpecifiedExtra().

00446 {
00447   cstring flstring = fileloc_unparse (fl);
00448 
00449   prepareMessage ();
00450   (void) printIndentMessage (g_msgstream, message ("%q: %q", flstring, s), 3);
00451   closeMessage ();
00452 }

void llgenindentmsgnoloc ( cstring s )
 

Definition at line 455 of file llerror.c.

Referenced by main().

00456 {
00457   prepareMessage ();
00458   (void) printIndentMessage (g_msgstream, s, 3);
00459   closeMessage ();
00460 }

void llgenmsg ( cstring s,
fileloc fl )
 

Definition at line 434 of file llerror.c.

Referenced by MAXBASEDEPTH(), fixUentryList(), flagWarning(), and uentryList_mergeFields().

00435 {
00436   cstring flstring = fileloc_unparse (fl);
00437   lastfileloclen = cstring_length (flstring);
00438 
00439   prepareMessage ();
00440   (void) printError (g_msgstream, message ("%q: %q", flstring, s));
00441   closeMessage ();
00442 }

bool llgentypeerror ( ctype t1,
exprNode e1,
ctype t2,
exprNode e2,
cstring s,
fileloc fl )
 

Definition at line 686 of file llerror.c.

00688 {
00689   return llgentypeerroraux (FLG_TYPE, t1, e1, t2, e2, s, fl);
00690 }

void llgloberror ( cstring s )
 

Definition at line 1242 of file llerror.c.

Referenced by dumpState(), and main().

01243 {
01244   if (context_inSuppressRegion ())
01245     {
01246       cstring_free (s);
01247     }
01248   else
01249     {
01250       context_setNeednl ();
01251       prepareMessage ();
01252       context_hasError ();
01253       flagcode_recordError (FLG_SPECIAL);
01254       printError (g_msgstream, s);
01255       closeMessage ();
01256     }
01257 }

void llhint ( cstring s )
 

Definition at line 161 of file llerror.c.

Referenced by yyerror().

00162 {
00163   if (context_getFlag (FLG_HINTS) &&
00164       !(context_inSuppressRegion () || context_inSuppressZone (g_currentloc)))
00165     {
00166       llgenhint (s);
00167     }
00168   else
00169     {
00170       cstring_free (s);
00171     }
00172 }

void llmsg ( cstring s )
 

Definition at line 110 of file llerror.c.

Referenced by context_enterSuppressRegion(), cstringList_printSpaced(), cstringSList_printSpaced(), flagWarning(), listAllCategories(), main(), printAllFlags(), printCategory(), sRef_destroyMod(), summarizeErrors(), usymtab_displayAllUses(), and usymtab_printGuards().

00111 {
00112   context_setNeednl ();
00113   prepareMessage ();
00114   printMessage (g_msgstream, s);
00115   closeMessage ();
00116 }

void llmsgplain ( cstring s )
 

Definition at line 128 of file llerror.c.

Referenced by summarizeErrors().

00129 {
00130   context_setNeednl ();
00131   prepareMessage ();
00132   printMessage (g_msgstream, s);
00133   closeMessage ();
00134 }

bool llnoptgenerror ( flagcode o,
cstring s,
fileloc loc )
 

Definition at line 1538 of file llerror.c.

01539 {
01540   if (llrealerror (s, loc))
01541     {
01542       llsuppresshint ('+', o);
01543       flagcode_recordError (o);
01544       closeMessage ();
01545       return TRUE;
01546     }
01547 
01548   flagcode_recordSuppressed (o);
01549   return FALSE;
01550 }

bool lloptgenerror ( flagcode o,
cstring s,
fileloc loc )
 

Definition at line 1463 of file llerror.c.

01464 {
01465   if (llrealerror (s, loc))
01466     {
01467       llsuppresshint ('-', o);
01468       closeMessage ();
01469       flagcode_recordError (o);
01470       return TRUE;
01471     }
01472 
01473   flagcode_recordSuppressed (o);
01474   return FALSE;
01475 }

void llparseerror ( cstring s )
 

Definition at line 1552 of file llerror.c.

Referenced by context_exitTrueClause(), declareFunction(), declareStaticFunction(), processNamedDecl(), usymtab_enterFunctionScope(), and yyerror().

01553 {
01554   if (context_getFlag (FLG_TRYTORECOVER))
01555     {
01556       parseerrorcount++;
01557 
01558       if (parseerrorcount > GIVEUPPARSE)
01559         {
01560           if (cstring_isDefined (s))
01561             {
01562               llfatalerror (message ("%q: Parse Error: %q.  "
01563                                      "Too many errors, giving up.",
01564                                      fileloc_unparse (g_currentloc), s));
01565             }
01566           else
01567             {
01568               llfatalerror (message ("%q: Parse Error.  Too many errors, giving up.",
01569                                      fileloc_unparse (g_currentloc)));
01570             }
01571         }
01572       else
01573         {
01574           if (cstring_isDefined (s))
01575             {
01576               llreportparseerror (message ("Parse Error: %q. Attempting to continue.",
01577                                            s));
01578             }
01579           else
01580             {
01581               llreportparseerror (message ("Parse Error. Attempting to continue."));
01582             }
01583         }
01584     }
01585   else
01586     {
01587       cstring msg;
01588 
01589       if (cstring_isDefined (s))
01590         {
01591           msg = message ("Parse Error: %q.", s);
01592         }
01593       else
01594         {
01595           msg = message ("Parse Error.");
01596         }
01597 
01598       llfatalerror
01599         (message ("%q: %s (For help on parse errors, "
01600                   "see lclint -help parseerrors.)",
01601                   fileloc_unparse (g_currentloc), msg));
01602     }
01603 }

void llquietbugaux ( cstring s,
cstring file,
int line )
 

Definition at line 1645 of file llerror.c.

01646 {
01647 # if 0
01648 # ifdef HOMEVERSION
01649   llflush ();
01650   printError (stderr, message ("%q: *** Internal Bug at %q: %q [errno: %d]",
01651                                fileloc_unparse (g_currentloc),
01652                                fileloc_unparseRaw (file, line),
01653                                s, errno));
01654   printCodePoint ();
01655   llflush ();
01656 # endif
01657 # else
01658   cstring_free (s);
01659 # endif
01660 }

void loadllmsg ( cstring s )
 

Definition at line 1434 of file llerror.c.

Referenced by BUFLEN().

01435 {
01436   if (context_getDebug (FLG_SHOWSCAN))
01437     {
01438       fprintf (stderr, " >\n");
01439       lldiagmsg (s);
01440       fprintf (stderr, "< .");
01441     }
01442   else
01443     {
01444       lldiagmsg (s);
01445     }
01446 }

bool optgenerror2 ( flagcode f1,
flagcode f2,
cstring s,
fileloc loc )
 

Definition at line 1477 of file llerror.c.

01478 {
01479   if (context_suppressFlagMsg (f1, loc))
01480     {
01481       flagcode_recordSuppressed (f1);
01482       cstring_free (s);
01483     }
01484   else
01485     {
01486       if (context_suppressFlagMsg (f2, loc))
01487         {
01488           flagcode_recordSuppressed (f2);
01489           cstring_free (s);
01490         }
01491       else
01492         {
01493           if (llrealerror (s, loc))
01494             {
01495               llsuppresshint ('-', f2);
01496               flagcode_recordError (f2);
01497               closeMessage ();
01498               return TRUE;
01499             }
01500 
01501           flagcode_recordSuppressed (f2);
01502         }
01503     }
01504   return FALSE;
01505 }

bool optgenerror2n ( flagcode f1,
flagcode f2,
cstring s,
fileloc loc )
 

Definition at line 1507 of file llerror.c.

01508 {
01509 
01510   if (context_suppressFlagMsg (f1, loc))
01511     {
01512       flagcode_recordSuppressed (f1);
01513       cstring_free (s);
01514     }
01515   else
01516     {
01517       if (context_suppressNotFlagMsg (f2, loc))
01518         {
01519           flagcode_recordSuppressed (f2);
01520           cstring_free (s);
01521         }
01522       else
01523         {
01524           if (llrealerror (s, loc))
01525             {
01526               llsuppresshint ('+', f2);
01527               flagcode_recordError (f2);
01528               closeMessage ();
01529               return TRUE;
01530             }
01531 
01532           flagcode_recordSuppressed (f2);
01533         }
01534     }
01535   return FALSE;
01536 }

void pplldiagmsg ( cstring s )
 

Definition at line 1420 of file llerror.c.

01421 {
01422   if (context_getDebug (FLG_SHOWSCAN) && !context_isInCommandLine ())
01423     {
01424       fprintf (stderr, " >\n");
01425       lldiagmsg (s);
01426       fprintf (stderr, "< more preprocessing .");
01427     }
01428   else
01429     {
01430       lldiagmsg (s);
01431     }
01432 }

void ppllerror ( cstring s )
 

Definition at line 1415 of file llerror.c.

01416 {
01417   genppllerror (FLG_PREPROC, s);
01418 }

void prepareMessage ( void )
 

Definition at line 78 of file llerror.c.

Referenced by cleanupMessages(), cppReader_error(), cppReader_errorWithLine(), cppReader_warning(), genppllerrorhint(), lclbug(), lclfatalbug(), llbugaux(), lldiagmsg(), llfatalbug(), llfatalerror(), llfatalerrorLoc(), llgenindentmsg(), llgenindentmsgnoloc(), llgenmsg(), llgloberror(), llmsg(), and llmsgplain().

00079 {
00080   if (context_isPreprocessing ()
00081       && s_needsPrepare
00082       && context_getDebug (FLG_SHOWSCAN))
00083     {
00084       llflush ();
00085       fprintf (stderr, " >\n");
00086       s_needsPrepare = FALSE;
00087     }
00088 
00089   llflush ();
00090 }


Generated at Fri Nov 3 18:58:01 2000 for LCLint by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000