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

flagMarker.c File Reference

#include "lclintMacros.nf"
#include "basic.h"

Go to the source code of this file.

Functions

flagMarker flagMarker_createLocalSet (flagcode code, ynm set, fileloc loc)
flagMarker flagMarker_createSuppress (flagcode code, fileloc loc)
flagMarker flagMarker_createIgnoreOn (fileloc loc)
flagMarker flagMarker_createIgnoreCount (int count, fileloc loc)
flagMarker flagMarker_createIgnoreOff (fileloc loc)
ynm flagMarker_getSet (flagMarker f)
flagcode flagMarker_getCode (flagMarker f)
int flagMarker_getCount (flagMarker f)
cstring flagMarker_unparse (flagMarker c)
void flagMarker_free ( flagMarker c)
bool flagMarker_sameFile (flagMarker c, fileloc loc)
bool flagMarker_beforeMarker (flagMarker c, fileloc loc)


Function Documentation

bool flagMarker_beforeMarker ( flagMarker c,
fileloc loc )
 

Definition at line 149 of file flagMarker.c.

00150 {
00151   return  (!fileloc_notAfter (c->loc, loc));
00152 }

flagMarker flagMarker_createIgnoreCount ( int count,
fileloc loc )
 

Definition at line 65 of file flagMarker.c.

00066 {
00067   flagMarker c = (flagMarker) dmalloc (sizeof (*c));
00068   
00069   c->kind = FMK_IGNORECOUNT;
00070   c->code = INVALID_FLAG;
00071   c->info.nerrors = count;
00072   c->loc = fileloc_copy (loc); 
00073 
00074   return c;
00075 }

flagMarker flagMarker_createIgnoreOff ( fileloc loc )
 

Definition at line 77 of file flagMarker.c.

00078 {
00079   flagMarker c = (flagMarker) dmalloc (sizeof (*c));
00080   
00081   c->kind = FMK_IGNOREOFF;
00082   c->code = INVALID_FLAG;
00083   c->loc = fileloc_copy (loc); 
00084 
00085   return c;
00086 }

flagMarker flagMarker_createIgnoreOn ( fileloc loc )
 

Definition at line 54 of file flagMarker.c.

00055 {
00056   flagMarker c = (flagMarker) dmalloc (sizeof (*c));
00057   
00058   c->kind = FMK_IGNOREON;
00059   c->code = INVALID_FLAG;
00060   c->loc = fileloc_copy (loc); 
00061 
00062   return c;
00063 }

flagMarker flagMarker_createLocalSet ( flagcode code,
ynm set,
fileloc loc )
 

Definition at line 31 of file flagMarker.c.

00032 {
00033   flagMarker c = (flagMarker) dmalloc (sizeof (*c));
00034   
00035   c->kind = FMK_LOCALSET;
00036   c->code = code;
00037   c->info.set = set;
00038   c->loc = fileloc_copy (loc); 
00039 
00040   return c;
00041 }

flagMarker flagMarker_createSuppress ( flagcode code,
fileloc loc )
 

Definition at line 43 of file flagMarker.c.

00044 {
00045   flagMarker c = (flagMarker) dmalloc (sizeof (*c));
00046   
00047   c->kind = FMK_SUPPRESS;
00048   c->code = code;
00049   c->loc = fileloc_copy (loc); 
00050 
00051   return c;
00052 }

void flagMarker_free ( flagMarker c )
 

Definition at line 135 of file flagMarker.c.

Referenced by flagMarkerList_add(), and flagMarkerList_free().

00136 {
00137   sfree (c);
00138 }

flagcode flagMarker_getCode ( flagMarker f )
 

Definition at line 95 of file flagMarker.c.

Referenced by flagMarkerList_suppressError().

00096 {
00097   llassert (f->kind == FMK_LOCALSET|| f->kind == FMK_SUPPRESS);
00098 
00099   return f->code;
00100 }

int flagMarker_getCount ( flagMarker f )
 

Definition at line 102 of file flagMarker.c.

Referenced by flagMarkerList_checkSuppressCounts().

00103 {
00104   llassert (f->kind == FMK_IGNORECOUNT);
00105 
00106   return f->info.nerrors;
00107 }

ynm flagMarker_getSet ( flagMarker f )
 

Definition at line 88 of file flagMarker.c.

Referenced by flagMarkerList_suppressError().

00089 {
00090   llassert (f->kind == FMK_LOCALSET);
00091 
00092   return f->info.set;
00093 }

bool flagMarker_sameFile ( flagMarker c,
fileloc loc )
 

Definition at line 140 of file flagMarker.c.

Referenced by flagMarkerList_add(), flagMarkerList_inIgnore(), and flagMarkerList_suppressError().

00141 {
00142   return (fileloc_almostSameFile (c->loc, loc));
00143 }

cstring flagMarker_unparse ( flagMarker c )
 

Definition at line 109 of file flagMarker.c.

00110 {
00111   switch (c->kind)
00112     {
00113     case FMK_LOCALSET:
00114       return (message ("%q: %s%s", 
00115                        fileloc_unparse (c->loc), ynm_unparseCode (c->info.set), 
00116                        flagcode_name (c->code)));
00117     case FMK_IGNORECOUNT:
00118       return (message ("%q: ignore count %d", 
00119                        fileloc_unparse (c->loc), c->info.nerrors));
00120     case FMK_IGNOREON:
00121       return (message ("%q: ignore on", 
00122                        fileloc_unparse (c->loc)));
00123     case FMK_IGNOREOFF:
00124       return (message ("%q: ignore off", 
00125                        fileloc_unparse (c->loc)));
00126     case FMK_SUPPRESS:
00127       return (message ("%q: suppress %s", 
00128                        fileloc_unparse (c->loc),
00129                        flagcode_name (c->code)));
00130     }
00131 
00132   BADBRANCH;
00133 }


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