-void *
-abook_malloc(size_t size)
-{
- void *ptr;
-
- if ( (ptr = malloc(size)) == NULL ) {
- if( is_ui_initialized() )
- quit_abook(QUIT_SAVE);
- perror("malloc() failed");
- exit(1);
- }
-
- return ptr;
-}
-
-void *
-abook_realloc(void *ptr, size_t size)
-{
- ptr = realloc(ptr, size);
-
- if(size == 0)
- return NULL;
-
- if(ptr == NULL) {
- if(is_ui_initialized())
- quit_abook(QUIT_SAVE);
- perror("realloc() failed");
- exit(1);
- }
-
- return ptr;
-}
-