1 /*-----------------------------------------------------------------------------
2 lint.h - Include file to allow parsing mcs51 specific code with syntax
5 Copyright (c) 2005, Dr. Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7 This library is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 2, or (at your option) any
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this library; see the file COPYING. If not, write to the
19 Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
22 As a special exception, if you link this library with other files,
23 some of which are compiled with SDCC, to produce an executable,
24 this library does not by itself cause the resulting executable to
25 be covered by the GNU General Public License. This exception does
26 not however invalidate any other reasons why the executable file
27 might be covered by the GNU General Public License.
28 -------------------------------------------------------------------------*/
33 #if !defined(__SDCC_mcs51)
43 #define __sfr volatile unsigned char
44 #define __sbit volatile bool
46 #define __at(x) /* use "__at (0xab)" instead of "__at 0xab" */
48 #define __interrupt(x)
59 #define sfr volatile unsigned char
60 #define sbit volatile bool
67 /* The tool Splint is available at http://www.splint.org
68 Other tools might also be used for statically checking c-sources.
69 Traditionally they could have "lint" in their name.
71 #if defined(S_SPLINT_S)
73 /* Behaviour of splint can be modified by special comments.
74 Some examples are shown below.
76 Note 1: most probably you'll want to copy this complete file into
77 your source directory, adapt the settings to your needs and use
78 #include "lint.h" as the first include in your source file(s).
79 You should then be able to either directly compile your file
80 or to run a check with splint over it without other changes.
82 Note 2: you need brackets around arguments for special
83 keywords, so f.e. it's "interrupt (1)" instead of "interrupt 1".