/usr/share/splint/imports/stdlib.lcl is in splint-data 3.1.2.dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | /*
** stdlib.lcl
**
** based on red-cross:/usr/include/stdlib.h
** also includes misc functions from man bcopy
** man memory
*/
typedef unsigned int size_t;
typedef unsigned int wchar_t;
typedef struct {
int quot; /* quotient */
int rem; /* remainder */
} div_t; /* result of div() */
typedef struct {
long quot; /* quotient */
long rem; /* remainder */
} ldiv_t; /* result of ldiv() */
constant null void *NULL; /* should be constant */
constant int EXIT_FAILURE, EXIT_SUCCESS;
constant long RAND_MAX;
constant int MB_CUR_MAX;
void abort(void)
{
ensures true;
}
int abs(int i)
{
ensures result = abs(i);
}
int atexit (void (*f)())
{
ensures true;
}
double atof (char *nptr)
{
ensures true ; /* sprintf(result) = nptr^ ? */
}
int atoi (char *nptr)
{
ensures true ;
}
long atol (char *nptr)
{
ensures true ;
}
void *bsearch (void *key, void *base, size_t nel, size_t size,
int (*compar)(void *, void *))
{
ensures true ;
}
void *calloc (size_t nelem, size_t size)
{
ensures true ;
}
div_t div (int numer, int denom)
{
ensures true;
}
void exit(int status)
{
ensures true;
}
void free(void *ptr)
{
modifies *ptr;
ensures true; /* trashed(ptr); */
}
char *getenv (char *name)
{
ensures true;
}
long labs (long j)
{
ensures true;
}
ldiv_t ldiv (long numer, long denum)
{
ensures true;
}
void *malloc (size_t size)
{
ensures true;
}
int mblen (char *s, size_t n)
{
ensures true;
}
size_t mbstowcs ( wchar_t *pwcs, char *s, size_t n)
{
modifies *pwcs;
ensures true;
}
int mbtowc (wchar_t *pwc, char *s, size_t n)
{
modifies *pwc;
ensures true;
}
void qsort (void *base, size_t nel, size_t width,
int (*compar)(void *, void *))
{
modifies *base;
ensures true;
}
int rand (void)
{
ensures true;
}
void *realloc(void *ptr, size_t size)
{
ensures true;
}
void srand (unsigned int seed)
{
ensures true;
}
double strtod (char *nptr, char **eptr)
{
modifies *eptr;
ensures true;
}
long strtol (char *nptr, char **eptr, int base)
{
modifies *eptr;
ensures true;
}
unsigned long strtoul (char *nptr, char **eptr, int base)
{
modifies *eptr;
ensures true;
}
int system (char *string)
{
ensures true;
}
size_t wcstombs (char *s, wchar_t *pwcs, size_t n)
{
modifies *s;
ensures true;
}
int wctomb (char *s, wchar_t wchar)
{
modifies *s;
ensures true;
}
/*
** not part of stdlib.h, but built in to c?
*/
void bcopy (char *b1, char *b2, int length)
{
modifies *b2;
ensures true;
}
| bool : int | bcmp (char *b1, char *b2, int length)
{
ensures true;
}
void bzero (char *b1, int length)
{
modifies *b1;
ensures true;
}
int ffs (int i)
{
ensures true;
}
void *memccpy (void *s1, void *s2, int c, size_t n)
{
modifies *s1;
ensures true;
}
void *memchr (void *s, int c, size_t n)
{
ensures true;
}
| bool : int | memcmp (void *s1, void *s2, size_t n)
{
ensures true;
}
void *memcpy (void *s1, void *s2, size_t n)
{
modifies *s1;
ensures true;
}
void *memset (void *s, int c, size_t n)
{
modifies *s;
ensures true;
}
void *memmove (void *s1, void *s2, size_t n)
{
modifies *s1;
ensures true;
}
|