/*
** Splint - annotation-assisted static program checker
-** Copyright (C) 1994-2001 University of Virginia,
+** Copyright (C) 1994-2002 University of Virginia,
** Massachusetts Institute of Technology
**
** This program is free software; you can redistribute it and/or modify it
** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
** MA 02111-1307, USA.
**
-** For information on lclint: lclint-request@cs.virginia.edu
-** To report a bug: lclint-bug@cs.virginia.edu
+** For information on splint: info@splint.org
+** To report a bug: splint-bug@splint.org
** For more information: http://www.splint.org
*/
/*
** Joe Wild, Technical Languages and Environments, DECspec project
*/
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
# include "llbasic.h"
# include "osd.h"
# include "portab.h"
extern int inputStream_peekNChar (inputStream s, int n)
/* Doesn't work across lines! */
{
+ llassert (inputStream_isDefined (s));
llassert (s->curLine != NULL);
llassert (s->charNo + n < strlen (s->curLine));
return ((int) s->curLine [s->charNo + n]);
extern int inputStream_peekChar (inputStream s)
{
+ llassert (inputStream_isDefined (s));
+
if (s->curLine == NULL)
{
char *cur;
char *currentLine;
int len;
+ llassert (inputStream_isDefined (s));
llassert (s->curLine == NULL);
s->charNo = 0;
extern bool
inputStream_open (inputStream s)
{
+ llassert (inputStream_isDefined (s));
if (s->fromString)
{
/* not an error: tail is dependent */
return TRUE;
}
- DPRINTF (("Open: %s", s->name));
- s->file = fileTable_openFile (context_fileTable (), s->name, "r");
+ DPRINTF (("Opening: %s", s->name));
+ s->file = fileTable_openReadFile (context_fileTable (), s->name);
return (s->file != 0 || s->fromString);
}
/*:open:*/ FILE *inputStream_getFile (inputStream s)
{
llassert (inputStream_isDefined (s));
+ llassert (s->file != NULL);
return s->file;
}