diff options
author | Moritz Schulte <mo@g10code.com> | 2003-03-01 23:22:12 +0000 |
---|---|---|
committer | Moritz Schulte <mo@g10code.com> | 2003-03-01 23:22:12 +0000 |
commit | 5b5237c23ffda1415f239407eeed3983a8e0adbe (patch) | |
tree | b3c648553cbdcb8d698f9406a94e344f26e7daea /src/g10lib.h | |
parent | 622a9c5c3e7aaf1bb0296ca1d072cc57e8469135 (diff) | |
download | libgcrypt-5b5237c23ffda1415f239407eeed3983a8e0adbe.tar.gz |
2003-02-28 Moritz Schulte <moritz@g10code.com>
* secmem.c (DEFAULT_PAGESIZE): New symbol.
(init_pool): Use DEFAULT_PAGESIZE.
2003-02-23 Moritz Schulte <moritz@g10code.com>
* secmem.h: Fix typo in declaration of _gcry_secmem_term.
* sexp.c: Move macro definitions of `digitp', `octdigit', `alphap'
and `hexdigit' ...
* g10lib.h: ... here.
* misc.c (_gcry_burn_stack): New function (former name:
burn_stack).
* g10lib.h (burn_stack): Declare _gcry_burn_stack().
Diffstat (limited to 'src/g10lib.h')
-rw-r--r-- | src/g10lib.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/g10lib.h b/src/g10lib.h index 106c18f7..6eb03b4a 100644 --- a/src/g10lib.h +++ b/src/g10lib.h @@ -1,5 +1,5 @@ /* g10lib.h - internal defintions for libgcrypt - * Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. * * This header is to be used inside of libgcrypt in place of gcrypt.h. * This way we can better distinguish between internal and external @@ -185,5 +185,18 @@ int strcasecmp (const char *a, const char *b) GCC_ATTR_PURE; #define DIM(v) (sizeof(v)/sizeof((v)[0])) #define DIMof(type,member) DIM(((type *)0)->member) +/* Stack burning. */ + +void _gcry_burn_stack (int bytes); + +/* Digit predicates. */ + +#define digitp(p) (*(p) >= '0' && *(p) <= '9') +#define octdigitp(p) (*(p) >= '0' && *(p) <= '7') +#define alphap(a) ( (*(a) >= 'A' && *(a) <= 'Z') \ + || (*(a) >= 'a' && *(a) <= 'z')) +#define hexdigitp(a) (digitp (a) \ + || (*(a) >= 'A' && *(a) <= 'F') \ + || (*(a) >= 'a' && *(a) <= 'f')) #endif /* G10LIB_H */ |