1 /*----------------------------------------------------------------------------- 2 lint.h - Include file to allow parsing mcs51 specific code with syntax 3 checking tools 4 5 Copyright (c) 2005, Dr. Frieder Ferlemann <Frieder.Ferlemann AT web.de> 6 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 10 later version. 11 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. 16 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, 20 MA 02110-1301, USA. 21 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 -------------------------------------------------------------------------*/ 29 30 #ifndef _LINT_H 31 #define _LINT_H 32 33 #if !defined(__SDCC_mcs51) 34 35 #define __data 36 #define __near 37 #define __idata 38 #define __xdata 39 #define __far 40 #define __pdata 41 #define __code 42 #define __bit bool 43 #define __sfr volatile unsigned char 44 #define __sbit volatile bool 45 #define __critical 46 #define __at(x) /* use "__at (0xab)" instead of "__at 0xab" */ 47 #define __using(x) 48 #define __interrupt(x) 49 #define __naked 50 51 #define data 52 #define near 53 #define idata 54 #define xdata 55 #define far 56 #define pdata 57 #define code 58 #define bit bool 59 #define sfr volatile unsigned char 60 #define sbit volatile bool 61 #define critical 62 #define at(x) 63 #define using(x) 64 #define interrupt(x) 65 #define naked 66 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. 70 */ 71 #if defined(S_SPLINT_S) 72 73 /* Behaviour of splint can be modified by special comments. 74 Some examples are shown below. 75 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. 81 82 Note 2: you need brackets around arguments for special 83 keywords, so f.e. it's "interrupt (1)" instead of "interrupt 1". 84 */ 85 86 /*@ +charindex @*/ 87 88 #endif 89 90 #endif 91 92 #endif 93