]> andersk Git - splint.git/commitdiff
added some files to repository
authordlaroche <dlaroche>
Tue, 3 Jul 2001 19:03:19 +0000 (19:03 +0000)
committerdlaroche <dlaroche>
Tue, 3 Jul 2001 19:03:19 +0000 (19:03 +0000)
src/Headers/modifiesClause.h [new file with mode: 0644]
src/globalsClause.c [new file with mode: 0644]

diff --git a/src/Headers/modifiesClause.h b/src/Headers/modifiesClause.h
new file mode 100644 (file)
index 0000000..21c9bfe
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
+** See ../LICENSE for license information.
+**
+*/
+/*
+** modifiesClause.h
+*/
+
+# ifndef MODIFIESCLAUSE_H
+# define MODIFIESCLAUSE_H
+
+struct s_modifiesClause {
+  bool isnomods;
+  fileloc loc;
+  sRefSet srs;
+} ;
+
+extern modifiesClause modifiesClause_createNoMods (/*@only@*/ lltok) /*@*/ ;
+
+extern bool modifiesClause_isNoMods (modifiesClause) ;
+# define modifiesClause_isNoMods(m) ((m)->isnomods)
+
+extern /*@observer@*/ sRefSet modifiesClause_getMods (modifiesClause) ;
+extern /*@only@*/ sRefSet modifiesClause_takeMods (modifiesClause) ;
+
+extern /*@observer@*/ fileloc modifiesClause_getLoc (modifiesClause) /*@*/ ;
+# define modifiesClause_getLoc(gl) ((gl)->loc)
+
+extern modifiesClause 
+   modifiesClause_create (/*@only@*/ lltok, /*@only@*/ sRefSet) /*@*/ ;
+
+extern cstring modifiesClause_unparse (modifiesClause p_node) /*@*/ ;
+extern void modifiesClause_free (/*@only@*/ modifiesClause) ;
+
+# else
+# error "Multiple include"
+# endif
diff --git a/src/globalsClause.c b/src/globalsClause.c
new file mode 100644 (file)
index 0000000..c194d13
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+** LCLint - annotation-assisted static program checker
+** Copyright (C) 1994-2001 University of Virginia,
+**         Massachusetts Institute of Technology
+**
+** 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.
+** 
+** 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.
+** 
+** The GNU General Public License is available from http://www.gnu.org/ or
+** 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 more information: http://lclint.cs.virginia.edu
+*/
+/*
+** globalsClause.c
+*/
+
+# include "lclintMacros.nf"
+# include "basic.h"
+
+extern globalsClause 
+globalsClause_create (lltok tok, globSet gl)
+{
+  globalsClause res = (globalsClause) dmalloc (sizeof (*res));
+  res->globs = gl;
+  res->loc = lltok_stealLoc (tok);
+  /*@i423@*/ return res; /* releases doesn't seem to work right here... */
+}
+
+globSet globalsClause_getGlobs (globalsClause gclause)
+{
+  return gclause->globs;
+}
+
+globSet globalsClause_takeGlobs (globalsClause gclause)
+{
+  globSet globs = gclause->globs;
+  gclause->globs = globSet_undefined;
+  return globs;
+}
+
+extern void globalsClause_free (globalsClause gclause)
+{
+  globSet_free (gclause->globs);
+  sfree (gclause);
+}
+
+extern cstring globalsClause_unparse (globalsClause node)
+{
+  return message ("globals %q", globSet_unparse (node->globs));
+}
+
This page took 0.071865 seconds and 5 git commands to generate.