1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* xreadline.c: New. Based on the iobuf_read_line function.

* no-libgcrypt.c (gcry_realloc, gcry_xmalloc, gcry_xcalloc): New.

* gpgconf-comp.c (retrieve_options_from_program)
(retrieve_options_from_file, change_options_file)
(change_options_program, gc_component_change_options): Replaced
getline by read_line and test for allocation failure.
This commit is contained in:
Werner Koch 2004-06-14 08:32:07 +00:00
parent 5836ea925a
commit feb40e2c6e
7 changed files with 183 additions and 36 deletions

View file

@ -38,6 +38,12 @@ out_of_core (void)
}
void *
gcry_malloc (size_t n)
{
return malloc (n);
}
void *
gcry_xmalloc (size_t n)
{
@ -47,6 +53,13 @@ gcry_xmalloc (size_t n)
return p;
}
void *
gcry_realloc (void *a, size_t n)
{
return realloc (a, n);
}
void *
gcry_xrealloc (void *a, size_t n)
{
@ -56,6 +69,14 @@ gcry_xrealloc (void *a, size_t n)
return p;
}
void *
gcry_calloc (size_t n, size_t m)
{
return calloc (n, m);
}
void *
gcry_xcalloc (size_t n, size_t m)
{
@ -65,6 +86,7 @@ gcry_xcalloc (size_t n, size_t m)
return p;
}
char *
gcry_xstrdup (const char *string)
{