aboutsummaryrefslogtreecommitdiffhomepage
path: root/complete.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-07-03 20:39:57 +1000
committerGravatar axel <axel@liljencrantz.se>2006-07-03 20:39:57 +1000
commitd56ab1d365e6d54535f5942c323c36baebaa7e65 (patch)
treea1b31411698d88391d6ad7460beea99f31f0877a /complete.c
parent38175cdd30cb4897ee3fda8c9afcd9f23d0525f4 (diff)
Switch from die_mem function to DIE_MEM macro in order to be able to give a line and file for the OOM message
darcs-hash:20060703103957-ac50b-8d7a860d931fd087f6d1759bc1e934dba1cfefe2.gz
Diffstat (limited to 'complete.c')
-rw-r--r--complete.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/complete.c b/complete.c
index 349a353a..8343ae8a 100644
--- a/complete.c
+++ b/complete.c
@@ -268,7 +268,7 @@ static int condition_test( const wchar_t *condition )
condition_cache = malloc( sizeof( hash_table_t ) );
if( !condition_cache )
{
- die_mem();
+ DIE_MEM();
}
@@ -397,7 +397,7 @@ void complete_add( const wchar_t *cmd,
{
if( !(c = malloc( sizeof(complete_entry) )))
{
- die_mem();
+ DIE_MEM();
}
c->next = first_entry;
@@ -412,7 +412,7 @@ void complete_add( const wchar_t *cmd,
if( !(opt = malloc( sizeof( complete_entry_opt ) )))
{
- die_mem();
+ DIE_MEM();
}
opt->next = c->first_option;
@@ -649,7 +649,7 @@ int complete_is_valid_option( const wchar_t *str,
if( !(short_validated = halloc( context, wcslen( opt ) )))
{
- die_mem();
+ DIE_MEM();
}
@@ -860,7 +860,7 @@ static const wchar_t *complete_get_desc_suffix( const wchar_t *suff_orig )
{
suffix_hash = malloc( sizeof( hash_table_t) );
if( !suffix_hash )
- die_mem();
+ DIE_MEM();
hash_init( suffix_hash, &hash_wcs_func, &hash_wcs_cmp );
}
@@ -1687,7 +1687,7 @@ static int complete_param( wchar_t *cmd_orig,
wchar_t *next_opt =
malloc( sizeof(wchar_t)*(3 + wcslen(desc)));
if( !next_opt )
- die_mem();
+ DIE_MEM();
next_opt[0]=o->short_opt;
next_opt[1]=COMPLETE_SEP;