Annotation of parser3/src/include/pa_types.h, revision 1.53
1.17 paf 1: /** @file
1.18 paf 2: Parser: generally used types & constants decls.
3:
1.52 moko 4: Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com)
1.37 paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.2 paf 6: */
7:
1.1 paf 8: #ifndef PA_TYPES_H
9: #define PA_TYPES_H
1.42 paf 10:
1.53 ! moko 11: #define IDENT_PA_TYPES_H "$Id: pa_types.h,v 1.52 2015/10/26 01:21:56 moko Exp $"
1.1 paf 12:
1.23 paf 13: #include "pa_config_includes.h"
1.4 paf 14:
1.17 paf 15: /// for rare cases of undefined length using this-sized strings
1.15 paf 16: #define MAX_STRING 0x400
1.50 misha 17: /// buffer size for parser.log
18: #define MAX_LOG_STRING 0x400*4
1.17 paf 19: /// for snprintf(buf, MAX_NUMBER, "%.2f")
1.12 paf 20: #define MAX_NUMBER 40
1.2 paf 21:
1.40 paf 22: //{@ handy types
1.34 paf 23: #undef uchar
24: typedef unsigned char uchar;
25:
1.33 paf 26: #undef ushort
27: typedef unsigned short ushort;
1.34 paf 28:
1.1 paf 29: #undef uint
1.33 paf 30: typedef unsigned int uint;
1.34 paf 31:
1.24 paf 32: #undef ulong
33: typedef unsigned long ulong;
1.40 paf 34: //}@
1.2 paf 35:
1.53 ! moko 36: #ifndef LLONG_MAX
! 37: #define LLONG_MAX 9223372036854775807LL
! 38: #endif
! 39:
! 40: #ifndef ULLONG_MAX
! 41: #define ULLONG_MAX 18446744073709551615ULL
! 42: #endif
! 43:
! 44: #ifndef INT32_MAX
! 45: #define INT32_MAX 2147483647L
! 46: #endif
! 47:
! 48: #ifndef UINT32_MAX
! 49: #define UINT32_MAX 4294967295UL
! 50: #endif
! 51:
! 52: #ifndef SSIZE_MAX
! 53: #define SSIZE_MAX (sizeof(size_t)==4 ? INT32_MAX : LLONG_MAX)
! 54: #endif
1.1 paf 55:
56: #endif
E-mail: