APPFS
Advanced practical programming for scientists
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
lint.h
Go to the documentation of this file.
1 /* $Id: lint.h,v 1.19 2014/03/03 16:44:13 bzfkocht Exp $ */
2 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
3 /* */
4 /* File....: lint.h */
5 /* Name....: Lint defines */
6 /* Author..: Thorsten Koch */
7 /* Copyright by Author, All rights reserved */
8 /* */
9 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
10 /*
11  * Copyright (C) 2001-2014 by Thorsten Koch <koch@zib.de>
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public License
15  * as published by the Free Software Foundation; either version 3
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
26  */
27 
28 #ifndef _LINT_H_
29 #define _LINT_H_
30 
31 /* Use this file only if we are linting
32  */
33 #ifdef _lint
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /* Unfortunately strdup() is not a POSIX function.
40  */
41 /*lint -sem(strdup, 1p && nulterm(1), @P == malloc(1P) && nulterm(@p)) */
42 extern char* strdup(const char* s);
43 
44 /* It is not clear if isinf() and isnan() are already POSIX
45  * or only in the next Draft.
46  */
47 extern int isinf(double);
48 extern int isnan(double);
49 extern int isfinite(double);
50 extern int finite(double); /* This is probably not POSIX */
51 
52 /*lint -esym(757, optarg, optind, opterr, optopt) */
53 /*lint -sem(getopt, 1n > 0 && 2p && 3p) */
54 extern int getopt(int argc, char* const argv[], const char* optstring);
55 extern char* optarg;
56 extern int optind;
57 extern int opterr;
58 extern int optopt;
59 
60 /*lint -function(fopen, popen) */
61 extern FILE* popen(const char *command, const char *type);
62 /*lint -function(fclose, pclose) */
63 /*lint -esym(534, pclose) */
64 extern int pclose(FILE *stream);
65 /*lint -sem(fsync, 1n >= 0, @n <= 0) */
66 extern int fsync(int fd);
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 #endif /* _lint */
72 
73 #if defined(__GNUC__) || defined(__CLANG__)
74 #define UNUSED __attribute__ ((unused))
75 #define NORETURN __attribute__ ((noreturn))
76 #else
77 #define UNUSED
78 #define NORETURN
79 #endif /* __GNUC__ || __CLANG__ */
80 
81 #endif /* _LINT_H_ */
82 
83 
84 
#define strdup(a)
Definition: mshell.h:56