X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=handy.h;h=88d7b13f7a9e6140358c224e3d4bf6942680c51a;hb=ea0672253453b958f0828f9b0ae963e7fb211e00;hp=6936c20df092b3fb26423caea0d04ff7ce074114;hpb=20b634c2cddd73f32cb58e435a5061f5c6e53570;p=p5sagit%2Fp5-mst-13.2.git diff --git a/handy.h b/handy.h index 6936c20..88d7b13 100644 --- a/handy.h +++ b/handy.h @@ -357,7 +357,7 @@ Converts the specified character to lowercase. # define isGRAPH(c) (isALNUM(c) || isPUNCT(c)) # define isPRINT(c) (((c) > 32 && (c) < 127) || (c) == ' ') # define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126)) -# define isXDIGIT(c) (isdigit(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) +# define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) # define toUPPER(c) (isLOWER(c) ? (c) - ('a' - 'A') : (c)) # define toLOWER(c) (isUPPER(c) ? (c) + ('a' - 'A') : (c)) #endif @@ -512,12 +512,12 @@ Converts the specified character to lowercase. # define toCTRL(c) (toUPPER(c) ^ 64) #endif -/* Line numbers are unsigned, 16 bits. */ -typedef U16 line_t; +/* Line numbers are unsigned, 32 bits. */ +typedef U32 line_t; #ifdef lint #define NOLINE ((line_t)0) #else -#define NOLINE ((line_t) 65535) +#define NOLINE ((line_t) 4294967295UL) #endif @@ -619,6 +619,8 @@ hopefully catches attempts to access uninitialized memory. #define StructCopy(s,d,t) Copy(s,d,1,t) #endif +#define C_ARRAY_LENGTH(a) (sizeof(a)/sizeof((a)[0])) + #ifdef NEED_VA_COPY # ifdef va_copy # define Perl_va_copy(s, d) va_copy(d, s)