]> andersk Git - splint.git/blob - src/fileloc.c
729c633debbf41413e101988bca191d1ab16724b
[splint.git] / src / fileloc.c
1 /*
2 ** Splint - annotation-assisted static program checker
3 ** Copyright (C) 1994-2002 University of Virginia,
4 **         Massachusetts Institute of Technology
5 **
6 ** This program is free software; you can redistribute it and/or modify it
7 ** under the terms of the GNU General Public License as published by the
8 ** Free Software Foundation; either version 2 of the License, or (at your
9 ** option) any later version.
10 ** 
11 ** This program is distributed in the hope that it will be useful, but
12 ** WITHOUT ANY WARRANTY; without even the implied warranty of
13 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 ** General Public License for more details.
15 ** 
16 ** The GNU General Public License is available from http://www.gnu.org/ or
17 ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18 ** MA 02111-1307, USA.
19 **
20 ** For information on splint: info@splint.org
21 ** To report a bug: splint-bug@splint.org
22 ** For more information: http://www.splint.org
23 */
24 /*
25 ** fileloc.c
26 */
27 /*
28  * Modified by Herbert 04/19/97:
29  * - added new include file portab.h.
30  * - added new private function fileloc_filenameForCpp() to handle
31  *   filenames belonging to "#line" statements for OS/2 and MSDOS. It
32  *   gets called by fileloc_lineMarker() and fileloc_previousLineMarker()
33  *   instead of fileloc_unparseFilename().
34  */
35
36 # include "splintMacros.nf"
37 # include "llbasic.h"
38 # include "fileIdList.h"
39 # include "osd.h"
40 # include "portab.h"
41
42 static /*@only@*/ fileloc fileloc_createPrim (flkind p_kind, fileId p_fid, int p_line, int p_col);
43
44 static flkind fileId_kind (fileId s)
45 {
46   cstring fname = fileTable_rootFileName (s);
47   
48   if (fileLib_isLCLFile (fname))
49     {
50       return (FL_SPEC);
51     }
52   else if (cstring_equalPrefix (fname, cstring_makeLiteralTemp (SYSTEM_LIBDIR)))
53     {
54       return (FL_STDHDR); 
55     }
56   else
57     {
58       return (FL_NORMAL);
59     }
60 }  
61
62 fileloc
63 fileloc_decColumn (fileloc f, int x)
64 {
65   fileloc ret = fileloc_copy (f);
66
67   llassert (x >= 0);
68
69   if (x > 0 && fileloc_isDefined (ret))
70     {
71       llassertprint (ret->column > x, ("decColumn: %d", x));
72       ret->column -= x;
73     }
74
75   return ret;
76 }
77
78 fileloc
79 fileloc_noColumn (fileloc f)
80 {
81   if (fileloc_isDefined (f))
82     {
83       fileloc ret = fileloc_copy (f);
84
85       if (fileloc_isDefined (ret))
86         {
87           ret->column = 0;
88         }
89
90       return ret;
91     }
92   else
93     {
94       return fileloc_undefined;
95     }
96 }
97
98 void
99 fileloc_subColumn (fileloc f, int x)
100 {
101   if (x > 0 && fileloc_isDefined (f))
102     {
103       llassert (f->column > x);
104       f->column -= x;
105     }
106 }
107
108 fileloc fileloc_copy (fileloc f)
109 {
110   if (fileloc_isDefined (f))
111     {
112       if (fileloc_isBuiltin (f) || fileloc_isExternal (f))
113         {
114           /*
115           ** Legitimate (spurious) errors reported since no copy
116           ** is made.
117           */
118
119           /*@i3@*/ return f; /* No copy is necessary. */
120         }
121       else
122         {
123           return (fileloc_createPrim (f->kind, f->fid, f->lineno, f->column));
124         }
125     }
126   else
127     {
128       return fileloc_undefined;
129     }
130 }
131
132 fileloc fileloc_update (/*@only@*/ fileloc old, fileloc fnew)
133 {
134   if (fileloc_isUndefined (fnew))
135     {
136       fileloc_free (old);
137       return fileloc_undefined;
138     }
139   else if (fileloc_isUndefined (old) || fileloc_isBuiltin (old) || fileloc_isExternal (old))
140     {
141       return (fileloc_copy (fnew));
142     }
143   else
144     {
145       old->kind   = fnew->kind;
146       old->fid    = fnew->fid; 
147       old->lineno = fnew->lineno;
148       old->column = fnew->column;
149
150       return old;
151     }
152 }
153
154 fileloc fileloc_updateFileId (/*@only@*/ fileloc old, fileId s)
155 {
156   if (fileloc_isUndefined (old) || fileloc_isBuiltin (old) || fileloc_isExternal (old))
157     {
158       return (fileloc_create (s, 1, 1));
159     }
160   else
161     {
162       old->kind   = fileId_kind (s);
163       old->fid    = s; 
164       old->lineno = 1;
165       old->column = 1;
166
167       return old;
168     }
169 }
170
171 void
172 fileloc_free (/*@only@*/ fileloc f)
173 {
174   if (fileloc_isDefined (f))
175     {
176       if (f != g_currentloc)
177         {
178           if (fileloc_isBuiltin (f) || fileloc_isExternal (f))
179             {
180               ; /* don't free */
181             }
182           else
183             {
184               sfree (f);  
185               /*@-branchstate@*/ 
186             } 
187         }
188       else
189         {
190           ; /* Don't free g_currentloc ever! */
191         }
192       /*@=branchstate@*/
193     }
194 }
195
196 void
197 fileloc_reallyFree (/*@only@*/ fileloc f)
198 {
199   if (fileloc_isDefined (f))
200     {
201       if (fileloc_isBuiltin (f) || fileloc_isExternal (f))
202         {
203           ; /* don't free */
204         }
205       else
206         {
207           sfree (f);  
208         /*@-branchstate@*/ } /*@=branchstate@*/
209     }
210 }
211
212 cstring fileloc_getBase (fileloc f)
213 {
214   llassert (fileloc_isDefined (f));
215
216   return (fileTable_fileNameBase (f->fid));
217 }
218
219 bool
220 fileloc_equal (fileloc f1, fileloc f2)
221 {
222   return ((f1 == f2)
223           || (fileloc_isDefined (f1) && fileloc_isDefined (f2) 
224               && ((f1->column == f2->column) && 
225                   (f1->lineno == f2->lineno) && fileloc_sameFile (f1, f2))));
226 }
227
228 int
229 fileloc_compare (fileloc f1, fileloc f2)
230 {
231   if (fileloc_isUndefined (f1))
232     {
233       if (fileloc_isUndefined (f2)) return 0;
234       return -1;
235     }
236   
237   if (fileloc_isUndefined (f2))
238     return 1;
239
240   /*@access fileId@*/ 
241   INTCOMPARERETURN (f1->fid, f2->fid); 
242   /*@noaccess fileId@*/
243
244
245   /* drl 8-11-01 fix what I think is a bug
246      lineno should more important than column number*/
247
248   INTCOMPARERETURN (f1->lineno, f2->lineno);   
249   INTCOMPARERETURN (f1->column, f2->column);
250   
251   return 0;
252 }
253
254 bool
255 fileloc_withinLines (fileloc f1, fileloc f2, int n)
256 {
257   
258   return (fileloc_isDefined (f1) && 
259           fileloc_isDefined (f2) &&
260           ((f2->lineno <= f1->lineno + n) 
261            && (f2->lineno >= f1->lineno)
262            && fileloc_sameFile (f1, f2)));
263 }
264
265 bool
266 fileloc_lessthan (fileloc f1, fileloc f2)
267 {
268   /*@access fileId*/
269   return ((fileloc_isDefined (f1) && fileloc_isDefined (f2))
270           && ((f1->fid < f2->fid)
271               || ((f1->fid == f2->fid)
272                   && ((f1->lineno < f2->lineno)
273                       || ((f1->lineno == f2->lineno)
274                           && (f1->column < f2->column))))));
275   /*@noaccess fileId*/
276 }
277
278 /*
279 ** returns true if f1 and f2 are different files,
280 ** or f1 is before f2 in same file
281 */
282
283 bool
284 fileloc_notAfter (fileloc f1, fileloc f2)
285 {
286   /*@access fileId*/
287   return ((fileloc_isDefined (f1) && fileloc_isDefined (f2))
288           && ((f1->fid != f2->fid)
289               || ((f1->lineno < f2->lineno)
290                   || ((f1->lineno == f2->lineno)
291                       && (f1->column <= f2->column)))));
292   /*@noaccess fileId@*/
293 }
294
295 # ifndef NOLCL
296 bool
297 fileloc_isStandardLibrary (fileloc f)
298 {
299   cstring s = fileloc_getBase (f);
300
301   return (cstring_equalLit (s, LLSTDLIBS_NAME)
302           || cstring_equalLit (s, LLSTRICTLIBS_NAME)
303           || cstring_equalLit (s, LLUNIXLIBS_NAME)
304           || cstring_equalLit (s, LLUNIXSTRICTLIBS_NAME)
305           || cstring_equalLit (s, LLPOSIXSTRICTLIBS_NAME)
306           || cstring_equalLit (s, LLPOSIXLIBS_NAME));
307 }
308 # endif
309
310 bool
311 fileloc_sameFileAndLine (fileloc f1, fileloc f2)
312 {
313   return (fileloc_sameFile (f1, f2)
314           && (fileloc_isDefined (f1) && fileloc_isDefined (f2)
315               && f1->lineno == f2->lineno));
316 }
317
318 bool
319 fileloc_sameFile (fileloc f1, fileloc f2)
320 {
321   if ((fileloc_isUndefined (f1) || (fileloc_isUndefined (f2)) 
322        || (fileloc_isLib (f1)) || (fileloc_isLib (f2))))
323     {
324       return FALSE;
325     }
326   else
327     {
328       return (fileId_equal (f1->fid, f2->fid));
329     }
330 }
331
332 bool
333 fileloc_sameModule (fileloc f1, fileloc f2)
334 {
335   if (fileloc_isUndefined (f1))
336     {
337       return (fileloc_isUndefined (f2));
338     }
339   else if (fileloc_isUndefined (f2))
340     {
341       return (FALSE);
342     }
343   else
344     {
345       if (fileloc_isBuiltin (f1) || fileloc_isBuiltin (f2)
346           || fileloc_isExternal (f1) || fileloc_isExternal (f2))
347         {
348           return fileloc_sameFile (f1, f2);
349         }
350       else
351         {
352           cstring s1 = fileloc_getBase (f1);
353           cstring s2 = fileloc_getBase (f2);
354           
355           return (cstring_equal (s1, s2)); 
356         }
357     }
358 }
359
360 bool
361 fileloc_sameBaseFile (fileloc f1, fileloc f2)
362 {
363   if (fileloc_isUndefined (f1))
364     {
365       return (fileloc_isUndefined (f2));
366     }
367   else if (fileloc_isUndefined (f2))
368     {
369       return (FALSE);
370     }
371   else
372     {
373       return (fileId_baseEqual (f1->fid, f2->fid));
374     }
375 }
376
377 bool fileloc_isSystemFile (fileloc f1)
378 {
379   if (fileloc_isDefined (f1)
380       && !fileloc_isBuiltin (f1)
381       && !fileloc_isExternal (f1))
382     {
383       return (fileTable_isSystemFile (context_fileTable (), f1->fid));
384     }
385
386   return FALSE;
387 }
388
389 bool fileloc_isXHFile (fileloc f1)
390 {
391   if (fileloc_isDefined (f1)
392       && !fileloc_isBuiltin (f1)
393       && !fileloc_isExternal (f1))
394     {
395       DPRINTF (("Fileloc is XH: [%p] %s", f1, fileloc_unparse (f1)));
396       return (fileTable_isXHFile (context_fileTable (), f1->fid));
397     }
398   
399   return FALSE;
400 }
401
402 bool
403 fileloc_almostSameFile (fileloc f1, fileloc f2)
404 {
405   if ((fileloc_isUndefined (f1) || (fileloc_isUndefined (f2)) 
406        || (fileloc_isLib (f1)) || (fileloc_isLib (f2))))
407     {
408       return FALSE;
409     }
410   else
411     {
412       if (fileId_baseEqual (f1->fid, f2->fid))
413         {
414           return TRUE;
415         }
416       else if (fileTable_isSystemFile (context_fileTable (), f1->fid)
417                || fileTable_isSystemFile (context_fileTable (), f2->fid))
418         {
419           return TRUE;
420         }
421       else if (fileTable_isSpecialFile (context_fileTable (), f1->fid)
422                || fileTable_isSpecialFile (context_fileTable (), f2->fid))
423         {
424           return (cstring_equal (fileloc_getBase (f1), 
425                                  fileloc_getBase (f2)));
426         }
427       else 
428         {
429           return FALSE;
430         }
431     }
432 }
433
434 # ifndef NOLCL
435 /*@only@*/ fileloc
436 fileloc_fromTok (ltoken t) 
437 {
438   cstring fname = ltoken_fileName (t);
439   fileId fid = fileTable_lookup (context_fileTable (), fname);
440   fileloc fl;
441
442   if (!fileId_isValid (fid))
443     {
444       fid = fileTable_addLCLFile (context_fileTable (), fname);
445     }
446   
447   fl = fileloc_create (fid, (int) ltoken_getLine (t), (int) ltoken_getCol (t));
448   
449   return (fl);
450 }
451 # endif
452
453 /*@only@*/ fileloc
454 fileloc_createLib (cstring ln)
455 {
456   flkind fk = FL_LIB;
457   fileId fid = fileTable_lookup (context_fileTable (), ln);
458
459   if (!fileId_isValid (fid))
460     {
461       fid = fileTable_addLibraryFile (context_fileTable (), ln);
462     }
463
464   if (cstring_equalPrefix (ln, cstring_makeLiteralTemp (SYSTEM_LIBDIR)))
465     {
466       fk = FL_STDLIB;
467     }
468
469   return (fileloc_createPrim (fk, fid, 0, 0));
470 }
471
472 fileloc fileloc_createRc (cstring name)
473 {
474   fileId fid = fileTable_addFile (context_fileTable (), name);
475
476   return (fileloc_createPrim (FL_RC, fid, 0, 0));
477 }
478
479 fileloc fileloc_createExternal (void)
480 {
481   /*@i@*/ return (fileloc_getExternal ()); 
482 }
483
484 fileloc fileloc_getExternal (void)
485 {
486   static /*@owned@*/ fileloc res = fileloc_undefined;
487
488   if (res == fileloc_undefined) 
489     {
490       res = fileloc_createPrim (FL_EXTERNAL, fileId_invalid, 0, 0);
491     }
492
493   return res;
494 }
495
496 fileloc fileloc_observeBuiltin ()
497 {
498   /*@-onlytrans@*/ return (fileloc_getBuiltin ()); /*@=onlytrans@*/
499 }
500
501 fileloc fileloc_getBuiltin ()
502 {
503   static /*@owned@*/ fileloc res = fileloc_undefined;
504
505   if (res == fileloc_undefined)
506     {
507       res = fileloc_createPrim (FL_BUILTIN, fileId_invalid, 0, 0); 
508     }
509
510   return res;
511 }
512
513 fileloc
514 fileloc_makePreproc (fileloc loc)
515 {
516   if (fileloc_isDefined (loc))
517     {
518       return (fileloc_createPrim (FL_PREPROC, loc->fid, 
519                                   loc->lineno, loc->column));
520     }
521
522   return (fileloc_createPrim (FL_PREPROC, fileId_invalid, 0, 0));
523 }
524
525 fileloc
526 fileloc_makePreprocPrevious (fileloc loc)
527 {
528   if (fileloc_isDefined (loc))
529     {
530       if (loc->lineno > 1)
531         {
532           return (fileloc_createPrim (FL_PREPROC, loc->fid,
533                                       loc->lineno - 1, 0));
534         }
535       else
536         {
537           return (fileloc_createPrim (FL_PREPROC, loc->fid,
538                                       loc->lineno, 0));
539         }
540     }
541
542   return (fileloc_createPrim (FL_PREPROC, fileId_invalid, 0, 0));
543 }
544
545 /*@only@*/ fileloc
546 fileloc_createBuiltin ()
547 {
548   return (fileloc_createPrim (FL_BUILTIN, fileId_invalid, 0, 0)); 
549 }
550
551 # ifndef NOLCL
552 /*@only@*/ fileloc
553 fileloc_createImport (cstring fname, int lineno)
554 {
555   fileId fid = fileTable_lookup (context_fileTable (), fname);
556
557   if (!fileId_isValid (fid))
558     {
559       fid = fileTable_addImportFile (context_fileTable (), fname);
560     }
561
562   return (fileloc_createPrim (FL_IMPORT, fid, lineno, 0));
563 }
564 # endif
565
566 static /*@only@*/ fileloc
567 fileloc_createPrim (flkind kind, fileId fid, int line, int col)
568 {
569   fileloc f = (fileloc) dmalloc (sizeof (*f));
570   
571   f->kind   = kind;
572   f->fid    = fid; 
573   f->lineno = line;
574   f->column = col;
575
576   DPRINTF (("Fileloc create: [%p] %s", f, fileloc_unparse (f)));
577   return (f);
578 }
579
580 # ifndef NOLCL
581 /*@only@*/ fileloc
582 fileloc_createSpec (fileId fid, int line, int col)
583 {
584   return (fileloc_createPrim (FL_SPEC, fid, line, col));
585 }
586 # endif
587
588 fileloc fileloc_create (fileId fid, int line, int col)
589 {
590   return (fileloc_createPrim (fileId_kind (fid), fid, line, col));
591 }
592
593 /*@observer@*/ cstring
594 fileloc_filename (fileloc f)
595 {
596   return (fileloc_isDefined (f) ? fileTable_rootFileName (f->fid) : cstring_makeLiteralTemp ("<unknown>"));
597 }
598
599 /*@only@*/ cstring fileloc_outputFilename (fileloc f)
600 {
601   if (fileloc_isDefined (f))
602     {
603       return osd_outputPath (fileTable_rootFileName (f->fid));
604     }
605   else
606     {
607       return cstring_makeLiteral ("<unknown>");
608     }
609 }
610
611 cstring
612 fileloc_unparseFilename (fileloc f)
613 {
614   if (fileloc_isDefined (f))
615     {
616       switch (f->kind)
617         {
618         case FL_LIB:
619           return (message ("load file %q", fileloc_outputFilename (f)));
620         case FL_BUILTIN:
621           return (cstring_makeLiteral ("# builtin #"));
622         case FL_IMPORT:
623           return (message ("import file %q", fileloc_outputFilename (f)));
624         case FL_EXTERNAL:
625           return (cstring_makeLiteral ("<external>"));
626         default: 
627           return (fileloc_outputFilename (f));
628         }
629     }
630   return cstring_undefined;
631 }
632
633 int
634 fileloc_lineno (fileloc f)
635 {
636   return (fileloc_isDefined (f) ? f->lineno : -1);
637 }
638
639 int
640 fileloc_column (fileloc f)
641 {
642   return (fileloc_isDefined (f) ? f->column : -1);
643 }
644
645 /*@only@*/ cstring
646 fileloc_unparse (fileloc f)
647 {
648   bool parenFormat = context_getFlag (FLG_PARENFILEFORMAT); 
649   bool htmlFormat = context_getFlag (FLG_HTMLFILEFORMAT);
650   cstring res = cstring_undefined;
651
652   if (fileloc_isDefined (f))
653     {
654        switch (f->kind)
655         {
656         case FL_BUILTIN:
657           return (cstring_makeLiteral ("Command Line"));
658         case FL_IMPORT:
659           if (parenFormat)
660             {
661               res = message ("import file %q(%d)", fileloc_outputFilename (f), f->lineno);
662             }
663           else
664             {
665               res = message ("import file %q:%d", fileloc_outputFilename (f), f->lineno);
666             }
667           break;
668         case FL_PREPROC:
669           {
670             if (parenFormat)
671               {
672                 res = message ("%q(%d)", fileloc_outputFilename (f), f->lineno);
673               }
674             else
675               {
676                 res = message ("%q:%d", fileloc_outputFilename (f), f->lineno);
677               }
678             
679             break;
680           }
681         case FL_EXTERNAL:
682           res = cstring_makeLiteral ("<external>");
683           break;
684         default:
685           {
686             cstring fname;
687             
688             if (f->kind == FL_LIB)
689               {
690                 fname = message ("load file %q", fileloc_outputFilename (f));
691               }
692             else
693               {
694                 fname = fileloc_outputFilename (f);
695               }
696
697             if (context_getFlag (FLG_SHOWCOL))
698               {
699                 if (fileloc_linenoDefined (f))
700                   {
701                     if (fileloc_columnDefined (f))
702                       {
703                         if (parenFormat)
704                           {
705                             res = message ("%q(%d,%d)", fname, f->lineno, f->column);
706                           }
707                         else
708                           {
709                             res = message ("%q:%d:%d", fname, f->lineno, f->column);
710                           }
711                       }
712                     else
713                       {
714                         if (parenFormat)
715                           {
716                             res = message ("%q(%d)", fname, f->lineno);
717                           }
718                         else
719                           {
720                             res = message ("%q:%d", fname, f->lineno);
721                           }
722                       }
723                   }
724                 else
725                   {
726                     res = fname;
727                   }
728               }
729             else if (fileloc_linenoDefined (f))
730               {
731                 if (parenFormat)
732                   {
733                     res = message ("%q(%d)", fname, f->lineno);
734                   }
735                 else
736                   {
737                     res = message ("%q:%d", fname, f->lineno);
738                   }
739               }
740             else
741               {
742                 res = fname;
743               }
744           }
745         }
746
747        if (htmlFormat && fileloc_linenoDefined (f))
748          {
749            res = message ("<a href=\"#line%d\">%s</a>", f->lineno, res);
750          }
751     }
752   else
753     {
754       res = cstring_makeLiteral ("< Location unknown >");
755     }
756   
757   return res;
758 }
759
760 /*@only@*/ cstring
761 fileloc_unparseRaw (cstring fname, int lineno)
762 {
763   if (!cstring_isEmpty (fname))
764     {
765       bool parenFormat = context_getFlag (FLG_PARENFILEFORMAT); 
766       
767       if (parenFormat)
768         {
769           return (message ("%q(%d)", osd_outputPath (fname), lineno));
770         }
771       else
772         {
773           return (message ("%q:%d", osd_outputPath (fname), lineno));
774         }
775     }
776   else
777     {
778       return cstring_makeLiteral ("Command Line");
779     }
780 }
781
782 /*@only@*/ cstring
783 fileloc_unparseRawCol (cstring fname, int lineno, int col)
784 {
785   if (!cstring_isEmpty (fname))
786     {
787       if (context_getFlag (FLG_SHOWCOL)) 
788         {
789           bool parenFormat = context_getFlag (FLG_PARENFILEFORMAT); 
790           
791           if (parenFormat)
792             {
793               return (message ("%q(%d,%d)", osd_outputPath (fname), lineno, col));
794             }
795           else
796             {
797               return (message ("%q:%d:%d", osd_outputPath (fname), lineno, col));
798             }
799         }
800       else
801         {
802           return fileloc_unparseRaw (fname, lineno);
803         }
804     }
805   else
806     {
807       return cstring_makeLiteral ("Command Line");
808     }
809 }
810
811 bool fileloc_isSpecialFile (fileloc f)
812 {
813   if (fileloc_isDefined (f) 
814       && fileId_isValid (f->fid))
815     {
816       return (fileTable_isSpecialFile (context_fileTable (), f->fid));
817     }
818   else
819     {
820       return FALSE;
821     }
822 }
823
824 bool fileloc_isHeader (fileloc f)
825 {
826   /* returns true if is not a .c file */
827
828   return (fileloc_isDefined (f) && fileId_isValid (f->fid)
829           && fileId_isHeader (f->fid));
830 }
831
832 bool fileloc_isSpec (fileloc f)
833 {
834   return (fileloc_isDefined (f) && 
835           (f->kind == FL_LIB || f->kind == FL_STDLIB || f->kind == FL_SPEC));
836 }
837
838 bool fileloc_isRealSpec (fileloc f)
839 {
840   return (fileloc_isDefined (f) && (f->kind == FL_SPEC));
841 }
842
843 bool fileloc_isLib (fileloc f)
844 {
845   return (fileloc_isDefined (f) 
846           && (f->kind == FL_LIB || f->kind == FL_STDHDR || f->kind == FL_STDLIB));
847 }
848
849 bool fileloc_isStandardLib (fileloc f)
850 {
851   return (fileloc_isDefined (f) && f->kind == FL_STDLIB);
852 }
853
854 /*@only@*/ cstring fileloc_unparseDirect (fileloc fl)
855 {
856   if (fileloc_isDefined (fl))
857     {
858       return (message ("%d:%d:%d",
859                        /*@access fileId@*/ (int) fl->fid, /*@noaccess fileId@*/
860                        fl->lineno, fl->column));
861     }
862   else
863     {
864       return (cstring_makeLiteral ("<undef>"));
865     }
866 }
867
868 bool fileloc_isUser (fileloc f)
869 {
870   return (fileloc_isDefined (f) 
871           && f->kind == FL_NORMAL);
872 }
873
874
875
876
This page took 0.092047 seconds and 3 git commands to generate.