]> andersk Git - splint.git/blobdiff - src/Headers/constants.h
Added support for ISO C99 _Bool and stdbool bool/true/false. The
[splint.git] / src / Headers / constants.h
index bfe9bb9bcc9f0540887392a9e5aef771876e6b86..9c0ef2af648484bc4218a83ad37a64523240b0d0 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
+** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
 ** See ../LICENSE for license information.
 **
 */
@@ -8,7 +8,7 @@
 */
 
 /*
- * This is constants.h from Mike Smith's Win32 port of lclint.
+ * This is constants.h from Mike Smith's Win32 port of splint.
  * Modified by Herbert 04/19/97:
  * added conditional 'OS2' to conditional 'MSDOS'
  */
 # ifndef CONSTANTS_H
 # define CONSTANTS_H
 
-# if defined(MSDOS) || defined(OS2)
+# if defined(MSDOS) 
 /*@constant observer char *RCFILE; @*/
-# define RCFILE         "lclint.rc"
+# define RCFILE         "splint.rc"
 # else
 /*@constant observer char *RCFILE; @*/
-# define RCFILE         ".lclintrc"
+# define RCFILE         ".splintrc"
+
+/*@constant observer char *ALTRCFILE; @*/
+# define ALTRCFILE      ".lclintrc"
 # endif
 
 /*@constant observer cstring LARCH_PATH; @*/
 # define LCLIMPORTDIR           "LCLIMPORTDIR"
 
 /*@constant observer char *LLSTDLIBS_NAME; @*/
-# define LLSTDLIBS_NAME          "ansi"
+# define LLSTDLIBS_NAME          "standard"
 
 /*@constant observer char *LLSTRICTLIBS_NAME; @*/
-# define LLSTRICTLIBS_NAME      "ansistrict"
+# define LLSTRICTLIBS_NAME      "standardstrict"
 
 /*@constant observer char *LLUNIXLIBS_NAME; @*/
 # define LLUNIXLIBS_NAME        "unix"
 /*@constant observer char *DUMP_SUFFIX; @*/
 # define DUMP_SUFFIX ".lcd"
 
-/*@constant int MAX_NAME_LENGTH; @*/
-# define MAX_NAME_LENGTH 256
+/*
+** All valid libraries start with this
+*/
+
+/*@constant observer char *LIBRARY_MARKER@*/
+# define LIBRARY_MARKER ";;; Splint Library "
 
-/*@constant int MAX_LINE_LENGTH; @*/
+/*@constant int MAX_NAME_LENGTH=256; @*/
+# define MAX_NAME_LENGTH 1024
+
+/*@constant int MAX_LINE_LENGTH=1024; @*/
 # define MAX_LINE_LENGTH 1024
 
-/*@constant int MAX_DUMP_LINE_LENGTH; @*/
+/*@constant int MAX_DUMP_LINE_LENGTH=16384; @*/
 # define MAX_DUMP_LINE_LENGTH 16384
 
-/*@constant int MINLINELEN; @*/
+/*@constant int MINLINELEN=20; @*/
 # define MINLINELEN 20
 
+
 /*
 ** WARNING: Can't use macros in token for cgrammar.l -->
 **   must keep these consistent!
 /*@constant char DEFAULT_COMMENTCHAR; @*/
 # define DEFAULT_COMMENTCHAR '@'
 
-/*@constant int DEFAULT_LINELEN; @*/
+/*@constant int DEFAULT_LINELEN=80; @*/
 # define DEFAULT_LINELEN 80
 
-/*@constant int DEFAULT_BUGSLIMIT; @*/
+/*@constant int DEFAULT_BUGSLIMIT=3; @*/
 # define DEFAULT_BUGSLIMIT 3
 
-/*@constant int DEFAULT_INDENTSPACES; @*/
+/*@constant int DEFAULT_INDENTSPACES=3; @*/
 # define DEFAULT_INDENTSPACES 3
 
+/*
+** Setting this to 0 means emacs compile mode will
+** jump to the locations in message hints.
+*/
+
+/*@constant int DEFAULT_LOCINDENTSPACES=3; @*/
+# define DEFAULT_LOCINDENTSPACES 3
+
 /*
 ** These constants are based on implementation limits in ANSI standard,
 ** Section 3.1. 
 */
 
-/*@constant int DEFAULT_EXTERNALNAMELEN; @*/
-# define DEFAULT_EXTERNALNAMELEN 6
+/*@constant int ANSI89_EXTERNALNAMELEN=6; @*/
+# define ANSI89_EXTERNALNAMELEN 6
 
-/*@constant int DEFAULT_INTERNALNAMELEN; @*/
-# define DEFAULT_INTERNALNAMELEN 31
+/*@constant int ANSI89_INTERNALNAMELEN=31; @*/
+# define ANSI89_INTERNALNAMELEN 31
 
-/*@constant int DEFAULT_CONTROLNESTDEPTH; @*/
-# define DEFAULT_CONTROLNESTDEPTH 15
+/*@constant int ANSI89_CONTROLNESTDEPTH=15; @*/
+# define ANSI89_CONTROLNESTDEPTH 15
 
-/*@constant int DEFAULT_STRINGLITERALLEN; @*/
-# define DEFAULT_STRINGLITERALLEN 509
+/*@constant int ANSI89_STRINGLITERALLEN=509; @*/
+# define ANSI89_STRINGLITERALLEN 509
 
-/*@constant int DEFAULT_INCLUDENEST; @*/
-# define DEFAULT_INCLUDENEST 8
+/*@constant int ANSI89_INCLUDENEST=8; @*/
+# define ANSI89_INCLUDENEST 8
 
-/*@constant int DEFAULT_NUMSTRUCTFIELDS; @*/
-# define DEFAULT_NUMSTRUCTFIELDS 127
+/*@constant int ANSI89_NUMSTRUCTFIELDS=127; @*/
+# define ANSI89_NUMSTRUCTFIELDS 127
 
-/*@constant int DEFAULT_NUMENUMMEMBERS; @*/
-# define DEFAULT_NUMENUMMEMBERS 127
+/*@constant int ANSI89_NUMENUMMEMBERS=127; @*/
+# define ANSI89_NUMENUMMEMBERS 127
+
+/*
+** From ISO C99 5.2.4.1
+*/
 
-/*@constant int DEFAULT_LIMIT; @*/
+/*@constant int ISO99_EXTERNALNAMELEN=31; @*/
+# define ISO99_EXTERNALNAMELEN 31
+
+/*@constant int ISO99_INTERNALNAMELEN=63; @*/
+# define ISO99_INTERNALNAMELEN 63
+
+/*@constant int ISO99_CONTROLNESTDEPTH=63; @*/
+# define ISO99_CONTROLNESTDEPTH 63
+
+/*@constant int ISO99_STRINGLITERALLEN=4095; @*/
+# define ISO99_STRINGLITERALLEN 4095
+
+/*@constant int ISO99_INCLUDENEST=63; @*/
+# define ISO99_INCLUDENEST 63
+
+/*@constant int ISO99_NUMSTRUCTFIELDS=1023 @*/
+# define ISO99_NUMSTRUCTFIELDS 1023
+
+/*@constant int ISO99_NUMENUMMEMBERS=1023 @*/
+# define ISO99_NUMENUMMEMBERS 1023
+
+/*@constant int DEFAULT_LIMIT=-1; @*/
 # define DEFAULT_LIMIT -1    /* unlimited messages */
 
 /*@constant char PFX_UPPERCASE; @*/
 
 /*@constant char PFX_ANYLETTERDIGIT; @*/
 # define PFX_ANYLETTERDIGIT '/'
-
+         
 /*
-** Note: this name is wired into ansi.h!
+** _Bool is defined by ISO C99 (replaced old lltx_Bool)
 */
 
 /*@constant observer char *DEFAULT_BOOLTYPE;@*/
-# define DEFAULT_BOOLTYPE "lltX_bool"
+# define DEFAULT_BOOLTYPE "_Bool"
 
 /*@constant observer char *PRAGMA_EXPAND; @*/
 # define PRAGMA_EXPAND "expand"
 
-/*@constant int PRAGMA_LEN_EXPAND; @*/
+/*@constant int PRAGMA_LEN_EXPAND=6; @*/
 # define PRAGMA_LEN_EXPAND 6
 
 /*@constant int MAX_PRAGMA_LEN; @*/
 # define MAX_PRAGMA_LEN PRAGMA_LEN_EXPAND
 
-/*
-** Minimum version with compatible libraries.
-*/
-
-/*@constant float LCLINT_LIBVERSION; @*/
-# define LCLINT_LIBVERSION 2.6
-
 /*
 ** Flex doesn't pre-process input, so remember to copy these manually
 ** to cscanner.l.
This page took 0.044866 seconds and 4 git commands to generate.