libksba  1.6.0
About: KSBA is a library to make the tasks of working with X.509 certificates, CMS data and related objects more easy.
  Fossies Dox: libksba-1.6.0.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

gen-help.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define xtrymalloc(a)   malloc ((a))
 
#define stpcpy(a, b)   gen_help_stpcpy ((a), (b))
 
#define DIM(v)   (sizeof(v)/sizeof((v)[0]))
 
#define DIMof(type, member)   DIM(((type *)0)->member)
 
#define STR(v)   #v
 
#define STR2(v)   STR(v)
 
#define return_if_fail(expr)
 
#define return_null_if_fail(expr)
 
#define return_val_if_fail(expr, val)
 
#define never_reached()
 
#define GPG_ERR_GENERAL   1
 
#define GPG_ERR_SYNTAX   29
 
#define GPG_ERR_INV_VALUE   55
 
#define GPG_ERR_BUG   59
 
#define GPG_ERR_ELEMENT_NOT_FOUND   136
 
#define GPG_ERR_IDENTIFIER_NOT_FOUND   137
 
#define gpg_error(a)   (a)
 
#define gpg_error_from_syserror()   (GPG_ERR_GENERAL);
 

Typedefs

typedef struct ksba_asn_tree_sksba_asn_tree_t
 

Functions

void * xmalloc (size_t n)
 
void * xcalloc (size_t n, size_t m)
 
void * xrealloc (void *mem, size_t n)
 
char * xstrdup (const char *str)
 
void xfree (void *a)
 
char * gen_help_stpcpy (char *a, const char *b)
 
const char * gpg_strerror (int err)
 
int ksba_asn_parse_file (const char *filename, ksba_asn_tree_t *result, int debug)
 
void ksba_asn_tree_dump (ksba_asn_tree_t tree, const char *name, FILE *fp)
 

Macro Definition Documentation

◆ DIM

#define DIM (   v)    (sizeof(v)/sizeof((v)[0]))

Definition at line 46 of file gen-help.h.

◆ DIMof

#define DIMof (   type,
  member 
)    DIM(((type *)0)->member)

Definition at line 47 of file gen-help.h.

◆ GPG_ERR_BUG

#define GPG_ERR_BUG   59

Definition at line 83 of file gen-help.h.

◆ GPG_ERR_ELEMENT_NOT_FOUND

#define GPG_ERR_ELEMENT_NOT_FOUND   136

Definition at line 84 of file gen-help.h.

◆ GPG_ERR_GENERAL

#define GPG_ERR_GENERAL   1

Definition at line 80 of file gen-help.h.

◆ GPG_ERR_IDENTIFIER_NOT_FOUND

#define GPG_ERR_IDENTIFIER_NOT_FOUND   137

Definition at line 85 of file gen-help.h.

◆ GPG_ERR_INV_VALUE

#define GPG_ERR_INV_VALUE   55

Definition at line 82 of file gen-help.h.

◆ GPG_ERR_SYNTAX

#define GPG_ERR_SYNTAX   29

Definition at line 81 of file gen-help.h.

◆ gpg_error

#define gpg_error (   a)    (a)

Definition at line 87 of file gen-help.h.

◆ gpg_error_from_syserror

#define gpg_error_from_syserror ( )    (GPG_ERR_GENERAL);

Definition at line 88 of file gen-help.h.

◆ never_reached

#define never_reached ( )
Value:
do { \
fprintf (stderr, "%s:%d: oops; should never get here\n", \
__FILE__, __LINE__ ); \
} while (0)

Definition at line 73 of file gen-help.h.

◆ return_if_fail

#define return_if_fail (   expr)
Value:
do { \
if (!(expr)) { \
fprintf (stderr, "%s:%d: assertion `%s' failed\n", \
__FILE__, __LINE__, #expr ); \
return; \
} } while (0)

Definition at line 55 of file gen-help.h.

◆ return_null_if_fail

#define return_null_if_fail (   expr)
Value:
do { \
if (!(expr)) { \
fprintf (stderr, "%s:%d: assertion `%s' failed\n", \
__FILE__, __LINE__, #expr ); \
return NULL; \
} } while (0)

Definition at line 61 of file gen-help.h.

◆ return_val_if_fail

#define return_val_if_fail (   expr,
  val 
)
Value:
do { \
if (!(expr)) { \
fprintf (stderr, "%s:%d: assertion `%s' failed\n", \
__FILE__, __LINE__, #expr ); \
return (val); \
} } while (0)

Definition at line 67 of file gen-help.h.

◆ stpcpy

#define stpcpy (   a,
 
)    gen_help_stpcpy ((a), (b))

Definition at line 41 of file gen-help.h.

◆ STR

#define STR (   v)    #v

Definition at line 49 of file gen-help.h.

◆ STR2

#define STR2 (   v)    STR(v)

Definition at line 52 of file gen-help.h.

◆ xtrymalloc

#define xtrymalloc (   a)    malloc ((a))

Definition at line 38 of file gen-help.h.

Typedef Documentation

◆ ksba_asn_tree_t

Definition at line 92 of file gen-help.h.

Function Documentation

◆ gen_help_stpcpy()

char* gen_help_stpcpy ( char *  a,
const char *  b 
)

Definition at line 86 of file gen-help.c.

◆ gpg_strerror()

const char* gpg_strerror ( int  err)

◆ ksba_asn_parse_file()

int ksba_asn_parse_file ( const char *  filename,
ksba_asn_tree_t result,
int  debug 
)

◆ ksba_asn_tree_dump()

void ksba_asn_tree_dump ( ksba_asn_tree_t  tree,
const char *  name,
FILE *  fp 
)

◆ xcalloc()

void* xcalloc ( size_t  n,
size_t  m 
)

Definition at line 48 of file gen-help.c.

References out_of_core().

◆ xfree()

void xfree ( void *  a)

Definition at line 76 of file gen-help.c.

References free().

◆ xmalloc()

void* xmalloc ( size_t  n)

Definition at line 39 of file gen-help.c.

References malloc(), and out_of_core().

◆ xrealloc()

void* xrealloc ( void *  mem,
size_t  n 
)

Definition at line 57 of file gen-help.c.

References out_of_core().

◆ xstrdup()

char* xstrdup ( const char *  str)

Definition at line 67 of file gen-help.c.

References out_of_core().