URL
https://opencores.org/ocsvn/layer2/layer2/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
2 |
idiolatrie |
/******************************************************************************
|
2 |
|
|
* Standard Definitions *
|
3 |
|
|
******************************************************************************
|
4 |
|
|
* Copyright (C)2011 Mathias Hörtnagl <mathias.hoertnagl@gmail.com> *
|
5 |
|
|
* *
|
6 |
|
|
* This program is free software: you can redistribute it and/or modify *
|
7 |
|
|
* it under the terms of the GNU General Public License as published by *
|
8 |
|
|
* the Free Software Foundation, either version 3 of the License, or *
|
9 |
|
|
* (at your option) any later version. *
|
10 |
|
|
* *
|
11 |
|
|
* This program is distributed in the hope that it will be useful, *
|
12 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
13 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
14 |
|
|
* GNU General Public License for more details. *
|
15 |
|
|
* *
|
16 |
|
|
* You should have received a copy of the GNU General Public License *
|
17 |
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
18 |
|
|
******************************************************************************/
|
19 |
|
|
#ifndef _STDDEF_H
|
20 |
|
|
#define _STDDEF_H
|
21 |
|
|
|
22 |
|
|
#ifndef NULL
|
23 |
|
|
#define NULL ( (void *) 0 )
|
24 |
|
|
#endif
|
25 |
|
|
|
26 |
|
|
#ifndef TRUE
|
27 |
|
|
#define TRUE 1
|
28 |
|
|
#endif
|
29 |
|
|
|
30 |
|
|
#ifndef FALSE
|
31 |
|
|
#define FALSE 0
|
32 |
|
|
#endif
|
33 |
|
|
|
34 |
|
|
#define isdigit(c) ( (c >= '0') && (c <= '9') )
|
35 |
|
|
#define islower(c) ( (c >= 'a') && (c <= 'z') )
|
36 |
|
|
#define isupper(c) ( (c >= 'A') && (c <= 'Z') )
|
37 |
|
|
#define isalpha(c) ( islower(c) || isupper(c) )
|
38 |
|
|
#define isalnum(c) ( isalpha(c) || isdigit(c) )
|
39 |
|
|
|
40 |
|
|
#define tolower(c) ( isupper(c) ? (c + 0x20) : c )
|
41 |
|
|
#define toupper(c) ( islower(c) ? (c - 0x20) : c )
|
42 |
|
|
|
43 |
|
|
typedef unsigned char uchar;
|
44 |
|
|
typedef unsigned short ushort;
|
45 |
|
|
typedef unsigned long uint;
|
46 |
|
|
|
47 |
|
|
#endif
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.